diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2007-05-22 17:03:19 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2007-05-22 17:03:19 +0000 |
commit | 90b385c3a26cd8508f419b6accb07c246bea8b97 (patch) | |
tree | 18cac3eecf40a93ce7fe4f69187a5f95f904e4ef /chart2/source/controller/main/ChartController_EditData.cxx | |
parent | INTEGRATION: CWS chart2mst3 (1.5.4); FILE MERGED (diff) | |
download | core-90b385c3a26cd8508f419b6accb07c246bea8b97.tar.gz core-90b385c3a26cd8508f419b6accb07c246bea8b97.zip |
INTEGRATION: CWS chart2mst3 (1.1.4); FILE MERGED
2006/11/10 15:06:11 bm 1.1.4.18: #i67875# add undo for own data
2006/10/27 14:59:21 iha 1.1.4.17: name consolidation
2006/10/18 17:07:26 bm 1.1.4.16: RESYNC: (1.3-1.4); FILE MERGED
2006/07/19 15:55:25 bm 1.1.4.15: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role
2006/03/08 10:38:53 bm 1.1.4.14: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate
2005/11/22 10:53:19 bm 1.1.4.13: use correct undo strings
2005/11/15 20:49:34 iha 1.1.4.12: use UndoGuard
2005/11/15 20:22:33 iha 1.1.4.11: remove superfluous view updates
2005/11/07 21:02:21 iha 1.1.4.10: rectangular range for dataeditor
2005/10/18 14:35:26 bm 1.1.4.9: lock controllers during model change calls
2005/10/11 12:48:56 bm 1.1.4.8: #i27351# implement Undo
2005/10/07 11:33:42 bm 1.1.4.7: RESYNC: (1.2-1.3); FILE MERGED
2005/08/29 14:54:20 bm 1.1.4.6: don't clear solar mutex, because impl_rebuildView needs a lock, too
2005/08/26 09:46:10 bm 1.1.4.5: lock solar mutex around dialog
2005/08/19 15:28:30 bm 1.1.4.4: apply data changes
2005/08/17 16:55:11 bm 1.1.4.3: use new data edition dialog instead of Calc
2004/06/03 03:39:24 iha 1.1.4.2: RESYNC: (1.1-1.2); FILE MERGED
Embedding API modifications
2004/03/02 09:45:57 bm 1.1.4.1: if object is already active, bring the document to front
Diffstat (limited to 'chart2/source/controller/main/ChartController_EditData.cxx')
-rw-r--r-- | chart2/source/controller/main/ChartController_EditData.cxx | 75 |
1 files changed, 32 insertions, 43 deletions
diff --git a/chart2/source/controller/main/ChartController_EditData.cxx b/chart2/source/controller/main/ChartController_EditData.cxx index 66cdeae0759b..f7791544aca8 100644 --- a/chart2/source/controller/main/ChartController_EditData.cxx +++ b/chart2/source/controller/main/ChartController_EditData.cxx @@ -4,9 +4,9 @@ * * $RCSfile: ChartController_EditData.cxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: obo $ $Date: 2006-09-17 13:04:28 $ + * last change: $Author: vg $ $Date: 2007-05-22 18:03:19 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -38,27 +38,29 @@ #include "ChartController.hxx" #include "macros.hxx" -#ifndef _COM_SUN_STAR_EMBED_XEMBEDDEDOBJECT_HPP_ -#include <com/sun/star/embed/XEmbeddedObject.hpp> -#endif -#ifndef _COM_SUN_STAR_EMBED_EMBEDSTATES_HPP_ -#include <com/sun/star/embed/EmbedStates.hpp> -#endif -#ifndef _COM_SUN_STAR_EMBED_XVISUALOBJECT_HPP_ -#include <com/sun/star/embed/XVisualObject.hpp> +#include "dlg_DataEditor.hxx" +#include "DataSourceHelper.hxx" +#include "DiagramHelper.hxx" +#include "ControllerLockGuard.hxx" +#include "UndoGuard.hxx" +#include "ResId.hxx" +#include "Strings.hrc" + +// for RET_OK +#ifndef _SV_MSGBOX_HXX +#include <vcl/msgbox.hxx> #endif -#ifndef _COM_SUN_STAR_EMBED_ASPECTS_HPP_ -#include <com/sun/star/embed/Aspects.hpp> + +#ifndef _SV_SVAPP_HXX +#include <vcl/svapp.hxx> #endif -#ifndef _COM_SUN_STAR_EMBED_XCOMPONENTSUPPLIER_HPP_ -#include <com/sun/star/embed/XComponentSupplier.hpp> +#ifndef _VOS_MUTEX_HXX_ +#include <vos/mutex.hxx> #endif + #ifndef _COM_SUN_STAR_CHART2_XCHARTDOCUMENT_HPP_ #include <com/sun/star/chart2/XChartDocument.hpp> #endif -#ifndef _COM_SUN_STAR_SHEET_XRANGESELECTION_HPP_ -#include <com/sun/star/sheet/XRangeSelection.hpp> -#endif using namespace ::com::sun::star; @@ -73,34 +75,21 @@ void ChartController::executeDispatch_EditData() Reference< chart2::XChartDocument > xChartDoc( m_aModel->getModel(), uno::UNO_QUERY ); if( xChartDoc.is()) { - Reference< embed::XEmbeddedObject > xEmbObj( xChartDoc->getDataEditorForInternalData() ); - if( xEmbObj.is()) - { - try - { - xEmbObj->setContainerName( C2U( "Chart Data" )); - xEmbObj->changeState( embed::EmbedStates::ACTIVE ); + Window* pParent( NULL ); - Reference< embed::XVisualObject > xVisObj( xEmbObj, uno::UNO_QUERY ); - if( xVisObj.is()) - { - xVisObj->setVisualAreaSize( embed::Aspects::MSOLE_CONTENT, - awt::Size( 5000, 3000 )); - } + Reference< ::com::sun::star::chart2::data::XDataProvider > xDataProvider( xChartDoc->getDataProvider()); - // just a test -// Reference< embed::XComponentSupplier > xCompSupp( xEmbObj, uno::UNO_QUERY ); -// Reference< frame::XModel > xCalcModel( xCompSupp->getComponent(), uno::UNO_QUERY_THROW ); -// Reference< sheet::XRangeSelection > xRangeSel( -// xCalcModel->getCurrentController(), uno::UNO_QUERY_THROW ); - -// Sequence< beans::PropertyValue > aArgs; -// xRangeSel->startRangeSelection( aArgs ); - } - catch( const uno::Exception & ex ) - { - ASSERT_EXCEPTION( ex ); - } + { + // /-- + ::vos::OGuard aSolarGuard( Application::GetSolarMutex()); + UndoLiveUpdateGuardWithData aUndoGuard( + ::rtl::OUString( String( SchResId( STR_ACTION_EDIT_CHART_DATA ))), + m_aUndoManager, m_aModel->getModel()); + DataEditor aDataEditorDialog( pParent, xChartDoc, m_xCC ); + // the dialog has no OK/Cancel + aDataEditorDialog.Execute(); + aUndoGuard.commitAction(); + // \-- } } } |