LCOV - code coverage report
Current view: top level - chart2/source/controller/main - ChartController_EditData.cxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 1 15 6.7 %
Date: 2014-11-03 Functions: 2 3 66.7 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : 
      20             : #include "ChartController.hxx"
      21             : #include "macros.hxx"
      22             : 
      23             : #include "dlg_DataEditor.hxx"
      24             : #include "DataSourceHelper.hxx"
      25             : #include "DiagramHelper.hxx"
      26             : #include "ControllerLockGuard.hxx"
      27             : #include "UndoGuard.hxx"
      28             : #include "ResId.hxx"
      29             : #include "Strings.hrc"
      30             : 
      31             : #include <vcl/msgbox.hxx>
      32             : #include <vcl/svapp.hxx>
      33             : #include <osl/mutex.hxx>
      34             : #include <com/sun/star/chart2/XChartDocument.hpp>
      35             : 
      36             : using namespace ::com::sun::star;
      37             : 
      38             : using ::com::sun::star::uno::Reference;
      39             : using ::com::sun::star::uno::Sequence;
      40             : 
      41             : namespace chart
      42             : {
      43             : 
      44           0 : void ChartController::executeDispatch_EditData()
      45             : {
      46           0 :     Reference< chart2::XChartDocument > xChartDoc( getModel(), uno::UNO_QUERY );
      47           0 :     if( xChartDoc.is())
      48             :     {
      49           0 :         vcl::Window* pParent( NULL );
      50             : 
      51           0 :         Reference< ::com::sun::star::chart2::data::XDataProvider > xDataProvider( xChartDoc->getDataProvider());
      52             : 
      53             :         {
      54           0 :             SolarMutexGuard aSolarGuard;
      55             :             // using assignment for broken gcc 3.3
      56             :             UndoLiveUpdateGuardWithData aUndoGuard = UndoLiveUpdateGuardWithData(
      57             :                 SCH_RESSTR( STR_ACTION_EDIT_CHART_DATA ),
      58           0 :                 m_xUndoManager );
      59           0 :             DataEditor aDataEditorDialog( pParent, xChartDoc, m_xCC );
      60           0 :             if (aDataEditorDialog.Execute() == RET_OK)
      61           0 :                 aDataEditorDialog.ApplyChangesToModel();
      62           0 :             aUndoGuard.commit();
      63           0 :         }
      64           0 :     }
      65           0 : }
      66             : 
      67         102 : } //  namespace chart
      68             : 
      69             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10