LCOV - code coverage report
Current view: top level - chart2/source/controller/main - ChartController_EditData.cxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 1 14 7.1 %
Date: 2015-06-13 12:38:46 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 :         Reference< ::com::sun::star::chart2::data::XDataProvider > xDataProvider( xChartDoc->getDataProvider());
      50             : 
      51             :         {
      52           0 :             SolarMutexGuard aSolarGuard;
      53             :             // using assignment for broken gcc 3.3
      54             :             UndoLiveUpdateGuardWithData aUndoGuard = UndoLiveUpdateGuardWithData(
      55             :                 SCH_RESSTR( STR_ACTION_EDIT_CHART_DATA ),
      56           0 :                 m_xUndoManager );
      57           0 :             ScopedVclPtrInstance<DataEditor> aDataEditorDialog( nullptr, xChartDoc, m_xCC );
      58           0 :             if (aDataEditorDialog->Execute() == RET_OK)
      59           0 :                 aDataEditorDialog->ApplyChangesToModel();
      60           0 :             aUndoGuard.commit();
      61           0 :         }
      62           0 :     }
      63           0 : }
      64             : 
      65          57 : } //  namespace chart
      66             : 
      67             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11