Files
libreoffice/sc/source/ui/drawfunc/fuins2.cxx

822 lines
31 KiB
C++
Raw Normal View History

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
re-base on ALv2 code. Includes: Patches contributed by Herbert Duerr i#118735 prevent endless loop if vlookup/hlookup doesn't find anything http://svn.apache.org/viewvc?view=revision&revision=1239673 Patches contributed by Andre Fischer remove lp_solver http://svn.apache.org/viewvc?view=revision&revision=1199180 i#118160: Added external CoinMP library. http://svn.apache.org/viewvc?view=revision&revision=1233909 Patches contributed by Armin Le-Grand i#118485 - Styles for OLEs are not saved. http://svn.apache.org/viewvc?view=revision&revision=1182166 i#118524: apply patch, followup fixes to 118485 http://svn.apache.org/viewvc?view=revision&revision=1186077 Patches contributed by lihuiibm i#108860 - Fix range validation. http://svn.apache.org/viewvc?view=revision&revision=1242846 i#118954 Chart data will lost after copy to different file http://svn.apache.org/viewvc?view=revision&revision=1301345 Patches contributed by Ariel Constenla-Haile Fix Linux build breaker: extra qualification on member http://svn.apache.org/viewvc?view=revision&revision=1301591 i#118696 - i#118697 - Fix some Sheet Tab Color API issues http://svn.apache.org/viewvc?view=revision&revision=1225428 i#118697 - Fix uninitialized variable http://svn.apache.org/viewvc?view=revision&revision=1225859 i#118771 - ScUndoImportTab should preserve tab background color http://svn.apache.org/viewvc?view=revision&revision=1230356 i#118921 - Repaint linked sheet tab background color after updating link http://svn.apache.org/viewvc?view=revision&revision=1245177 i#118927 - Undo/Redo "Update Link" does not reset sheet tab color http://svn.apache.org/viewvc?view=revision&revision=1245241 i#118747 - Copy tab color when transferring sheets across documents http://svn.apache.org/viewvc?view=revision&revision=1230355 Patch contributed by Oliver Rainer-Wittman i#118012 - methods <ScBroadcastAreaSlot::AreaBroadcast(..)> and <ScBroadcastAreaSlot::AreaBroadcastInRange(..)> adapt stl-container iteration in order to avoid destroyed iterators during iteration. http://svn.apache.org/viewvc?view=revision&revision=1297916 Patches contributed by Mathias Bauer gnumake4 work variously http://svn.apache.org/viewvc?view=revision&revision=1394707 http://svn.apache.org/viewvc?view=revision&revision=1394326 http://svn.apache.org/viewvc?view=revision&revision=1396797 http://svn.apache.org/viewvc?view=revision&revision=1397315 Patch contributed by Daniel Rentz calc69: #i116936# fix VBA symbol Cells http://svn.apache.org/viewvc?view=revision&revision=1172135 Patches contributed by leiw: i#118546 CPU 100% on switched off AutoCalculate with Conditional Formatting on date values http://svn.apache.org/viewvc?view=revision&revision=1301380 Re-add new function documentation. Many various cleanups. Add missing calc66: #o11817313# also look at formula result number format, remove redundant binaries.
2012-11-30 12:23:25 +00:00
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
2000-09-18 16:07:07 +00:00
#include <com/sun/star/embed/NoVisualAreaSizeException.hpp>
#include <com/sun/star/embed/Aspects.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <toolkit/helper/vclunohelper.hxx>
#include <sot/exchange.hxx>
#include <svl/globalnameitem.hxx>
2000-09-18 16:07:07 +00:00
#include <sfx2/viewfrm.hxx>
#include <sfx2/docfile.hxx>
#include <svl/stritem.hxx>
2000-09-18 16:07:07 +00:00
#include <svx/svdoole2.hxx>
#include <svx/pfiledlg.hxx>
#include <tools/urlobj.hxx>
#include <vcl/msgbox.hxx>
#include <vcl/syschild.hxx>
#include <vcl/openglwin.hxx>
#include <svl/urihelper.hxx>
#include <unotools/moduleoptions.hxx>
#include <svtools/insdlg.hxx>
#include <svtools/soerr.hxx>
#include <svtools/embedhlp.hxx>
#include <svx/svxdlg.hxx>
#include <comphelper/classids.hxx>
INTEGRATION: CWS chart2mst3 (1.12.10); FILE MERGED 2007/04/25 03:30:58 bm 1.12.10.33: RESYNC: (1.24-1.25); FILE MERGED 2007/04/20 10:41:20 nn 1.12.10.32: #i75307# FuInsertChart: MarkToMulti 2006/12/05 16:28:12 nn 1.12.10.31: #i71257# don't add undo action before the dialog is finished 2006/11/27 00:37:17 bm 1.12.10.30: aw024 adaptions 2006/11/24 18:24:58 bm 1.12.10.29: RESYNC: (1.23-1.24); FILE MERGED 2006/11/23 12:52:52 nn 1.12.10.28: #i71250# removed old chart code 2006/11/10 21:06:35 iha 1.12.10.27: prevent immidiate redraw in wizard and according dialogs (important for charts with many data) 2006/10/25 18:17:54 nn 1.12.10.26: allow range selection from inplace object without deactivating the object 2006/10/19 00:18:35 bm 1.12.10.25: RESYNC: (1.21-1.23); FILE MERGED 2006/10/11 15:10:11 nn 1.12.10.24: #i66867# auto-detect column/row headers 2006/08/04 14:34:01 bm 1.12.10.23: pass the document to the chart2 uno services instead of the docshell, as the shell itself is not really needed, and limits the creation of such objects unnecessarily to the ui 2006/06/24 13:04:39 iha 1.12.10.22: #i54915# chart wizard shouldn't overlap chart if possible 2006/06/22 15:42:13 nn 1.12.10.21: #i13379# default position for chart and dialog 2006/05/05 15:24:08 bm 1.12.10.20: RESYNC: (1.20-1.21); FILE MERGED 2006/05/05 14:32:41 bm 1.12.10.19: #i31098# leave draw shell after Cancel of inserting a chart 2006/05/03 15:46:49 bm 1.12.10.18: #i31098# Enable Cancel for Chart Wizard 2005/11/15 15:33:22 bm 1.12.10.17: dispose chart wizard dialog 2005/10/08 09:54:11 bm 1.12.10.16: RESYNC: (1.19-1.20); FILE MERGED 2005/09/08 11:44:48 iha 1.12.10.15: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter from calc 2005/08/15 13:09:29 bm 1.12.10.14: XDataReceiver changed 2005/08/05 12:43:19 bm 1.12.10.13: open chart creation wizard only when not called via API 2005/06/01 14:37:39 bm 1.12.10.12: Insert New Chart embedded 2005/05/17 13:01:42 bm 1.12.10.11: RESYNC: (1.18-1.19); FILE MERGED 2005/05/09 09:54:27 bm 1.12.10.10: moved chart2 API to data namespace 2005/03/17 13:45:10 bm 1.12.10.9: RESYNC: (1.16-1.18); FILE MERGED 2004/11/02 16:50:32 bm 1.12.10.8: RESYNC: (1.15-1.16); FILE MERGED 2004/08/30 18:08:08 bm 1.12.10.7: RESYNC: (1.13-1.15); FILE MERGED 2004/06/15 18:41:55 bm 1.12.10.6: RESYNC: (1.12-1.13); FILE MERGED 2004/05/05 16:34:56 iha 1.12.10.5: unmark automatic mark range; moved update call to chart 2004/04/08 12:21:47 iha 1.12.10.4: #i20344# init wizard correctly + update view 2004/04/08 09:03:14 iha 1.12.10.3: remove test code 2004/04/08 08:55:15 iha 1.12.10.2: get correct RangeString for chart 2004/04/07 22:03:58 iha 1.12.10.1: #i20344# changed chart creation process - added new chart wizard
2007-05-22 19:06:02 +00:00
#include <svx/svdpagv.hxx>
#include <svx/svdpage.hxx>
#include <svx/svdundo.hxx>
#include <sfx2/msgpool.hxx>
#include <svx/charthelper.hxx>
#include <scmod.hxx>
INTEGRATION: CWS chart2mst3 (1.12.10); FILE MERGED 2007/04/25 03:30:58 bm 1.12.10.33: RESYNC: (1.24-1.25); FILE MERGED 2007/04/20 10:41:20 nn 1.12.10.32: #i75307# FuInsertChart: MarkToMulti 2006/12/05 16:28:12 nn 1.12.10.31: #i71257# don't add undo action before the dialog is finished 2006/11/27 00:37:17 bm 1.12.10.30: aw024 adaptions 2006/11/24 18:24:58 bm 1.12.10.29: RESYNC: (1.23-1.24); FILE MERGED 2006/11/23 12:52:52 nn 1.12.10.28: #i71250# removed old chart code 2006/11/10 21:06:35 iha 1.12.10.27: prevent immidiate redraw in wizard and according dialogs (important for charts with many data) 2006/10/25 18:17:54 nn 1.12.10.26: allow range selection from inplace object without deactivating the object 2006/10/19 00:18:35 bm 1.12.10.25: RESYNC: (1.21-1.23); FILE MERGED 2006/10/11 15:10:11 nn 1.12.10.24: #i66867# auto-detect column/row headers 2006/08/04 14:34:01 bm 1.12.10.23: pass the document to the chart2 uno services instead of the docshell, as the shell itself is not really needed, and limits the creation of such objects unnecessarily to the ui 2006/06/24 13:04:39 iha 1.12.10.22: #i54915# chart wizard shouldn't overlap chart if possible 2006/06/22 15:42:13 nn 1.12.10.21: #i13379# default position for chart and dialog 2006/05/05 15:24:08 bm 1.12.10.20: RESYNC: (1.20-1.21); FILE MERGED 2006/05/05 14:32:41 bm 1.12.10.19: #i31098# leave draw shell after Cancel of inserting a chart 2006/05/03 15:46:49 bm 1.12.10.18: #i31098# Enable Cancel for Chart Wizard 2005/11/15 15:33:22 bm 1.12.10.17: dispose chart wizard dialog 2005/10/08 09:54:11 bm 1.12.10.16: RESYNC: (1.19-1.20); FILE MERGED 2005/09/08 11:44:48 iha 1.12.10.15: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter from calc 2005/08/15 13:09:29 bm 1.12.10.14: XDataReceiver changed 2005/08/05 12:43:19 bm 1.12.10.13: open chart creation wizard only when not called via API 2005/06/01 14:37:39 bm 1.12.10.12: Insert New Chart embedded 2005/05/17 13:01:42 bm 1.12.10.11: RESYNC: (1.18-1.19); FILE MERGED 2005/05/09 09:54:27 bm 1.12.10.10: moved chart2 API to data namespace 2005/03/17 13:45:10 bm 1.12.10.9: RESYNC: (1.16-1.18); FILE MERGED 2004/11/02 16:50:32 bm 1.12.10.8: RESYNC: (1.15-1.16); FILE MERGED 2004/08/30 18:08:08 bm 1.12.10.7: RESYNC: (1.13-1.15); FILE MERGED 2004/06/15 18:41:55 bm 1.12.10.6: RESYNC: (1.12-1.13); FILE MERGED 2004/05/05 16:34:56 iha 1.12.10.5: unmark automatic mark range; moved update call to chart 2004/04/08 12:21:47 iha 1.12.10.4: #i20344# init wizard correctly + update view 2004/04/08 09:03:14 iha 1.12.10.3: remove test code 2004/04/08 08:55:15 iha 1.12.10.2: get correct RangeString for chart 2004/04/07 22:03:58 iha 1.12.10.1: #i20344# changed chart creation process - added new chart wizard
2007-05-22 19:06:02 +00:00
#include <cppuhelper/component_context.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/storagehelper.hxx>
#include <com/sun/star/frame/XSynchronousFrameLoader.hpp>
#include <com/sun/star/frame/XComponentLoader.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
INTEGRATION: CWS chart2mst3 (1.12.10); FILE MERGED 2007/04/25 03:30:58 bm 1.12.10.33: RESYNC: (1.24-1.25); FILE MERGED 2007/04/20 10:41:20 nn 1.12.10.32: #i75307# FuInsertChart: MarkToMulti 2006/12/05 16:28:12 nn 1.12.10.31: #i71257# don't add undo action before the dialog is finished 2006/11/27 00:37:17 bm 1.12.10.30: aw024 adaptions 2006/11/24 18:24:58 bm 1.12.10.29: RESYNC: (1.23-1.24); FILE MERGED 2006/11/23 12:52:52 nn 1.12.10.28: #i71250# removed old chart code 2006/11/10 21:06:35 iha 1.12.10.27: prevent immidiate redraw in wizard and according dialogs (important for charts with many data) 2006/10/25 18:17:54 nn 1.12.10.26: allow range selection from inplace object without deactivating the object 2006/10/19 00:18:35 bm 1.12.10.25: RESYNC: (1.21-1.23); FILE MERGED 2006/10/11 15:10:11 nn 1.12.10.24: #i66867# auto-detect column/row headers 2006/08/04 14:34:01 bm 1.12.10.23: pass the document to the chart2 uno services instead of the docshell, as the shell itself is not really needed, and limits the creation of such objects unnecessarily to the ui 2006/06/24 13:04:39 iha 1.12.10.22: #i54915# chart wizard shouldn't overlap chart if possible 2006/06/22 15:42:13 nn 1.12.10.21: #i13379# default position for chart and dialog 2006/05/05 15:24:08 bm 1.12.10.20: RESYNC: (1.20-1.21); FILE MERGED 2006/05/05 14:32:41 bm 1.12.10.19: #i31098# leave draw shell after Cancel of inserting a chart 2006/05/03 15:46:49 bm 1.12.10.18: #i31098# Enable Cancel for Chart Wizard 2005/11/15 15:33:22 bm 1.12.10.17: dispose chart wizard dialog 2005/10/08 09:54:11 bm 1.12.10.16: RESYNC: (1.19-1.20); FILE MERGED 2005/09/08 11:44:48 iha 1.12.10.15: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter from calc 2005/08/15 13:09:29 bm 1.12.10.14: XDataReceiver changed 2005/08/05 12:43:19 bm 1.12.10.13: open chart creation wizard only when not called via API 2005/06/01 14:37:39 bm 1.12.10.12: Insert New Chart embedded 2005/05/17 13:01:42 bm 1.12.10.11: RESYNC: (1.18-1.19); FILE MERGED 2005/05/09 09:54:27 bm 1.12.10.10: moved chart2 API to data namespace 2005/03/17 13:45:10 bm 1.12.10.9: RESYNC: (1.16-1.18); FILE MERGED 2004/11/02 16:50:32 bm 1.12.10.8: RESYNC: (1.15-1.16); FILE MERGED 2004/08/30 18:08:08 bm 1.12.10.7: RESYNC: (1.13-1.15); FILE MERGED 2004/06/15 18:41:55 bm 1.12.10.6: RESYNC: (1.12-1.13); FILE MERGED 2004/05/05 16:34:56 iha 1.12.10.5: unmark automatic mark range; moved update call to chart 2004/04/08 12:21:47 iha 1.12.10.4: #i20344# init wizard correctly + update view 2004/04/08 09:03:14 iha 1.12.10.3: remove test code 2004/04/08 08:55:15 iha 1.12.10.2: get correct RangeString for chart 2004/04/07 22:03:58 iha 1.12.10.1: #i20344# changed chart creation process - added new chart wizard
2007-05-22 19:06:02 +00:00
#include <com/sun/star/chart2/data/XDataProvider.hpp>
#include <com/sun/star/chart2/data/XDataReceiver.hpp>
#include <com/sun/star/chart2/XChartDocument.hpp>
#include <com/sun/star/chart2/X3DChartWindowProvider.hpp>
INTEGRATION: CWS chart2mst3 (1.12.10); FILE MERGED 2007/04/25 03:30:58 bm 1.12.10.33: RESYNC: (1.24-1.25); FILE MERGED 2007/04/20 10:41:20 nn 1.12.10.32: #i75307# FuInsertChart: MarkToMulti 2006/12/05 16:28:12 nn 1.12.10.31: #i71257# don't add undo action before the dialog is finished 2006/11/27 00:37:17 bm 1.12.10.30: aw024 adaptions 2006/11/24 18:24:58 bm 1.12.10.29: RESYNC: (1.23-1.24); FILE MERGED 2006/11/23 12:52:52 nn 1.12.10.28: #i71250# removed old chart code 2006/11/10 21:06:35 iha 1.12.10.27: prevent immidiate redraw in wizard and according dialogs (important for charts with many data) 2006/10/25 18:17:54 nn 1.12.10.26: allow range selection from inplace object without deactivating the object 2006/10/19 00:18:35 bm 1.12.10.25: RESYNC: (1.21-1.23); FILE MERGED 2006/10/11 15:10:11 nn 1.12.10.24: #i66867# auto-detect column/row headers 2006/08/04 14:34:01 bm 1.12.10.23: pass the document to the chart2 uno services instead of the docshell, as the shell itself is not really needed, and limits the creation of such objects unnecessarily to the ui 2006/06/24 13:04:39 iha 1.12.10.22: #i54915# chart wizard shouldn't overlap chart if possible 2006/06/22 15:42:13 nn 1.12.10.21: #i13379# default position for chart and dialog 2006/05/05 15:24:08 bm 1.12.10.20: RESYNC: (1.20-1.21); FILE MERGED 2006/05/05 14:32:41 bm 1.12.10.19: #i31098# leave draw shell after Cancel of inserting a chart 2006/05/03 15:46:49 bm 1.12.10.18: #i31098# Enable Cancel for Chart Wizard 2005/11/15 15:33:22 bm 1.12.10.17: dispose chart wizard dialog 2005/10/08 09:54:11 bm 1.12.10.16: RESYNC: (1.19-1.20); FILE MERGED 2005/09/08 11:44:48 iha 1.12.10.15: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter from calc 2005/08/15 13:09:29 bm 1.12.10.14: XDataReceiver changed 2005/08/05 12:43:19 bm 1.12.10.13: open chart creation wizard only when not called via API 2005/06/01 14:37:39 bm 1.12.10.12: Insert New Chart embedded 2005/05/17 13:01:42 bm 1.12.10.11: RESYNC: (1.18-1.19); FILE MERGED 2005/05/09 09:54:27 bm 1.12.10.10: moved chart2 API to data namespace 2005/03/17 13:45:10 bm 1.12.10.9: RESYNC: (1.16-1.18); FILE MERGED 2004/11/02 16:50:32 bm 1.12.10.8: RESYNC: (1.15-1.16); FILE MERGED 2004/08/30 18:08:08 bm 1.12.10.7: RESYNC: (1.13-1.15); FILE MERGED 2004/06/15 18:41:55 bm 1.12.10.6: RESYNC: (1.12-1.13); FILE MERGED 2004/05/05 16:34:56 iha 1.12.10.5: unmark automatic mark range; moved update call to chart 2004/04/08 12:21:47 iha 1.12.10.4: #i20344# init wizard correctly + update view 2004/04/08 09:03:14 iha 1.12.10.3: remove test code 2004/04/08 08:55:15 iha 1.12.10.2: get correct RangeString for chart 2004/04/07 22:03:58 iha 1.12.10.1: #i20344# changed chart creation process - added new chart wizard
2007-05-22 19:06:02 +00:00
#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
#include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/chart/ChartDataRowSource.hpp>
#include <cppuhelper/bootstrap.hxx>
using namespace ::com::sun::star;
#include "chart2uno.hxx"
2000-09-18 16:07:07 +00:00
#include "fuinsert.hxx"
#include "tabvwsh.hxx"
#include "sc.hrc"
#include "chartarr.hxx"
#include "docsh.hxx"
#include "document.hxx"
#include "undotab.hxx"
#include "chartlis.hxx"
#include "uiitems.hxx"
#include "globstr.hrc"
#include "drawview.hxx"
#include "markdata.hxx"
#include "gridwin.hxx"
#include <boost/scoped_ptr.hpp>
2000-09-18 16:07:07 +00:00
2011-11-07 21:36:40 +01:00
namespace {
INTEGRATION: CWS chart2mst3 (1.12.10); FILE MERGED 2007/04/25 03:30:58 bm 1.12.10.33: RESYNC: (1.24-1.25); FILE MERGED 2007/04/20 10:41:20 nn 1.12.10.32: #i75307# FuInsertChart: MarkToMulti 2006/12/05 16:28:12 nn 1.12.10.31: #i71257# don't add undo action before the dialog is finished 2006/11/27 00:37:17 bm 1.12.10.30: aw024 adaptions 2006/11/24 18:24:58 bm 1.12.10.29: RESYNC: (1.23-1.24); FILE MERGED 2006/11/23 12:52:52 nn 1.12.10.28: #i71250# removed old chart code 2006/11/10 21:06:35 iha 1.12.10.27: prevent immidiate redraw in wizard and according dialogs (important for charts with many data) 2006/10/25 18:17:54 nn 1.12.10.26: allow range selection from inplace object without deactivating the object 2006/10/19 00:18:35 bm 1.12.10.25: RESYNC: (1.21-1.23); FILE MERGED 2006/10/11 15:10:11 nn 1.12.10.24: #i66867# auto-detect column/row headers 2006/08/04 14:34:01 bm 1.12.10.23: pass the document to the chart2 uno services instead of the docshell, as the shell itself is not really needed, and limits the creation of such objects unnecessarily to the ui 2006/06/24 13:04:39 iha 1.12.10.22: #i54915# chart wizard shouldn't overlap chart if possible 2006/06/22 15:42:13 nn 1.12.10.21: #i13379# default position for chart and dialog 2006/05/05 15:24:08 bm 1.12.10.20: RESYNC: (1.20-1.21); FILE MERGED 2006/05/05 14:32:41 bm 1.12.10.19: #i31098# leave draw shell after Cancel of inserting a chart 2006/05/03 15:46:49 bm 1.12.10.18: #i31098# Enable Cancel for Chart Wizard 2005/11/15 15:33:22 bm 1.12.10.17: dispose chart wizard dialog 2005/10/08 09:54:11 bm 1.12.10.16: RESYNC: (1.19-1.20); FILE MERGED 2005/09/08 11:44:48 iha 1.12.10.15: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter from calc 2005/08/15 13:09:29 bm 1.12.10.14: XDataReceiver changed 2005/08/05 12:43:19 bm 1.12.10.13: open chart creation wizard only when not called via API 2005/06/01 14:37:39 bm 1.12.10.12: Insert New Chart embedded 2005/05/17 13:01:42 bm 1.12.10.11: RESYNC: (1.18-1.19); FILE MERGED 2005/05/09 09:54:27 bm 1.12.10.10: moved chart2 API to data namespace 2005/03/17 13:45:10 bm 1.12.10.9: RESYNC: (1.16-1.18); FILE MERGED 2004/11/02 16:50:32 bm 1.12.10.8: RESYNC: (1.15-1.16); FILE MERGED 2004/08/30 18:08:08 bm 1.12.10.7: RESYNC: (1.13-1.15); FILE MERGED 2004/06/15 18:41:55 bm 1.12.10.6: RESYNC: (1.12-1.13); FILE MERGED 2004/05/05 16:34:56 iha 1.12.10.5: unmark automatic mark range; moved update call to chart 2004/04/08 12:21:47 iha 1.12.10.4: #i20344# init wizard correctly + update view 2004/04/08 09:03:14 iha 1.12.10.3: remove test code 2004/04/08 08:55:15 iha 1.12.10.2: get correct RangeString for chart 2004/04/07 22:03:58 iha 1.12.10.1: #i20344# changed chart creation process - added new chart wizard
2007-05-22 19:06:02 +00:00
void lcl_ChartInit( const uno::Reference < embed::XEmbeddedObject >& xObj, ScViewData* pViewData,
const OUString& rRangeParam )
2000-09-18 16:07:07 +00:00
{
INTEGRATION: CWS chart2mst3 (1.12.10); FILE MERGED 2007/04/25 03:30:58 bm 1.12.10.33: RESYNC: (1.24-1.25); FILE MERGED 2007/04/20 10:41:20 nn 1.12.10.32: #i75307# FuInsertChart: MarkToMulti 2006/12/05 16:28:12 nn 1.12.10.31: #i71257# don't add undo action before the dialog is finished 2006/11/27 00:37:17 bm 1.12.10.30: aw024 adaptions 2006/11/24 18:24:58 bm 1.12.10.29: RESYNC: (1.23-1.24); FILE MERGED 2006/11/23 12:52:52 nn 1.12.10.28: #i71250# removed old chart code 2006/11/10 21:06:35 iha 1.12.10.27: prevent immidiate redraw in wizard and according dialogs (important for charts with many data) 2006/10/25 18:17:54 nn 1.12.10.26: allow range selection from inplace object without deactivating the object 2006/10/19 00:18:35 bm 1.12.10.25: RESYNC: (1.21-1.23); FILE MERGED 2006/10/11 15:10:11 nn 1.12.10.24: #i66867# auto-detect column/row headers 2006/08/04 14:34:01 bm 1.12.10.23: pass the document to the chart2 uno services instead of the docshell, as the shell itself is not really needed, and limits the creation of such objects unnecessarily to the ui 2006/06/24 13:04:39 iha 1.12.10.22: #i54915# chart wizard shouldn't overlap chart if possible 2006/06/22 15:42:13 nn 1.12.10.21: #i13379# default position for chart and dialog 2006/05/05 15:24:08 bm 1.12.10.20: RESYNC: (1.20-1.21); FILE MERGED 2006/05/05 14:32:41 bm 1.12.10.19: #i31098# leave draw shell after Cancel of inserting a chart 2006/05/03 15:46:49 bm 1.12.10.18: #i31098# Enable Cancel for Chart Wizard 2005/11/15 15:33:22 bm 1.12.10.17: dispose chart wizard dialog 2005/10/08 09:54:11 bm 1.12.10.16: RESYNC: (1.19-1.20); FILE MERGED 2005/09/08 11:44:48 iha 1.12.10.15: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter from calc 2005/08/15 13:09:29 bm 1.12.10.14: XDataReceiver changed 2005/08/05 12:43:19 bm 1.12.10.13: open chart creation wizard only when not called via API 2005/06/01 14:37:39 bm 1.12.10.12: Insert New Chart embedded 2005/05/17 13:01:42 bm 1.12.10.11: RESYNC: (1.18-1.19); FILE MERGED 2005/05/09 09:54:27 bm 1.12.10.10: moved chart2 API to data namespace 2005/03/17 13:45:10 bm 1.12.10.9: RESYNC: (1.16-1.18); FILE MERGED 2004/11/02 16:50:32 bm 1.12.10.8: RESYNC: (1.15-1.16); FILE MERGED 2004/08/30 18:08:08 bm 1.12.10.7: RESYNC: (1.13-1.15); FILE MERGED 2004/06/15 18:41:55 bm 1.12.10.6: RESYNC: (1.12-1.13); FILE MERGED 2004/05/05 16:34:56 iha 1.12.10.5: unmark automatic mark range; moved update call to chart 2004/04/08 12:21:47 iha 1.12.10.4: #i20344# init wizard correctly + update view 2004/04/08 09:03:14 iha 1.12.10.3: remove test code 2004/04/08 08:55:15 iha 1.12.10.2: get correct RangeString for chart 2004/04/07 22:03:58 iha 1.12.10.1: #i20344# changed chart creation process - added new chart wizard
2007-05-22 19:06:02 +00:00
ScDocShell* pDocShell = pViewData->GetDocShell();
ScDocument& rScDoc = pDocShell->GetDocument();
INTEGRATION: CWS chart2mst3 (1.12.10); FILE MERGED 2007/04/25 03:30:58 bm 1.12.10.33: RESYNC: (1.24-1.25); FILE MERGED 2007/04/20 10:41:20 nn 1.12.10.32: #i75307# FuInsertChart: MarkToMulti 2006/12/05 16:28:12 nn 1.12.10.31: #i71257# don't add undo action before the dialog is finished 2006/11/27 00:37:17 bm 1.12.10.30: aw024 adaptions 2006/11/24 18:24:58 bm 1.12.10.29: RESYNC: (1.23-1.24); FILE MERGED 2006/11/23 12:52:52 nn 1.12.10.28: #i71250# removed old chart code 2006/11/10 21:06:35 iha 1.12.10.27: prevent immidiate redraw in wizard and according dialogs (important for charts with many data) 2006/10/25 18:17:54 nn 1.12.10.26: allow range selection from inplace object without deactivating the object 2006/10/19 00:18:35 bm 1.12.10.25: RESYNC: (1.21-1.23); FILE MERGED 2006/10/11 15:10:11 nn 1.12.10.24: #i66867# auto-detect column/row headers 2006/08/04 14:34:01 bm 1.12.10.23: pass the document to the chart2 uno services instead of the docshell, as the shell itself is not really needed, and limits the creation of such objects unnecessarily to the ui 2006/06/24 13:04:39 iha 1.12.10.22: #i54915# chart wizard shouldn't overlap chart if possible 2006/06/22 15:42:13 nn 1.12.10.21: #i13379# default position for chart and dialog 2006/05/05 15:24:08 bm 1.12.10.20: RESYNC: (1.20-1.21); FILE MERGED 2006/05/05 14:32:41 bm 1.12.10.19: #i31098# leave draw shell after Cancel of inserting a chart 2006/05/03 15:46:49 bm 1.12.10.18: #i31098# Enable Cancel for Chart Wizard 2005/11/15 15:33:22 bm 1.12.10.17: dispose chart wizard dialog 2005/10/08 09:54:11 bm 1.12.10.16: RESYNC: (1.19-1.20); FILE MERGED 2005/09/08 11:44:48 iha 1.12.10.15: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter from calc 2005/08/15 13:09:29 bm 1.12.10.14: XDataReceiver changed 2005/08/05 12:43:19 bm 1.12.10.13: open chart creation wizard only when not called via API 2005/06/01 14:37:39 bm 1.12.10.12: Insert New Chart embedded 2005/05/17 13:01:42 bm 1.12.10.11: RESYNC: (1.18-1.19); FILE MERGED 2005/05/09 09:54:27 bm 1.12.10.10: moved chart2 API to data namespace 2005/03/17 13:45:10 bm 1.12.10.9: RESYNC: (1.16-1.18); FILE MERGED 2004/11/02 16:50:32 bm 1.12.10.8: RESYNC: (1.15-1.16); FILE MERGED 2004/08/30 18:08:08 bm 1.12.10.7: RESYNC: (1.13-1.15); FILE MERGED 2004/06/15 18:41:55 bm 1.12.10.6: RESYNC: (1.12-1.13); FILE MERGED 2004/05/05 16:34:56 iha 1.12.10.5: unmark automatic mark range; moved update call to chart 2004/04/08 12:21:47 iha 1.12.10.4: #i20344# init wizard correctly + update view 2004/04/08 09:03:14 iha 1.12.10.3: remove test code 2004/04/08 08:55:15 iha 1.12.10.2: get correct RangeString for chart 2004/04/07 22:03:58 iha 1.12.10.1: #i20344# changed chart creation process - added new chart wizard
2007-05-22 19:06:02 +00:00
OUString aRangeString( rRangeParam );
if ( aRangeString.isEmpty() )
2000-09-18 16:07:07 +00:00
{
INTEGRATION: CWS chart2mst3 (1.12.10); FILE MERGED 2007/04/25 03:30:58 bm 1.12.10.33: RESYNC: (1.24-1.25); FILE MERGED 2007/04/20 10:41:20 nn 1.12.10.32: #i75307# FuInsertChart: MarkToMulti 2006/12/05 16:28:12 nn 1.12.10.31: #i71257# don't add undo action before the dialog is finished 2006/11/27 00:37:17 bm 1.12.10.30: aw024 adaptions 2006/11/24 18:24:58 bm 1.12.10.29: RESYNC: (1.23-1.24); FILE MERGED 2006/11/23 12:52:52 nn 1.12.10.28: #i71250# removed old chart code 2006/11/10 21:06:35 iha 1.12.10.27: prevent immidiate redraw in wizard and according dialogs (important for charts with many data) 2006/10/25 18:17:54 nn 1.12.10.26: allow range selection from inplace object without deactivating the object 2006/10/19 00:18:35 bm 1.12.10.25: RESYNC: (1.21-1.23); FILE MERGED 2006/10/11 15:10:11 nn 1.12.10.24: #i66867# auto-detect column/row headers 2006/08/04 14:34:01 bm 1.12.10.23: pass the document to the chart2 uno services instead of the docshell, as the shell itself is not really needed, and limits the creation of such objects unnecessarily to the ui 2006/06/24 13:04:39 iha 1.12.10.22: #i54915# chart wizard shouldn't overlap chart if possible 2006/06/22 15:42:13 nn 1.12.10.21: #i13379# default position for chart and dialog 2006/05/05 15:24:08 bm 1.12.10.20: RESYNC: (1.20-1.21); FILE MERGED 2006/05/05 14:32:41 bm 1.12.10.19: #i31098# leave draw shell after Cancel of inserting a chart 2006/05/03 15:46:49 bm 1.12.10.18: #i31098# Enable Cancel for Chart Wizard 2005/11/15 15:33:22 bm 1.12.10.17: dispose chart wizard dialog 2005/10/08 09:54:11 bm 1.12.10.16: RESYNC: (1.19-1.20); FILE MERGED 2005/09/08 11:44:48 iha 1.12.10.15: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter from calc 2005/08/15 13:09:29 bm 1.12.10.14: XDataReceiver changed 2005/08/05 12:43:19 bm 1.12.10.13: open chart creation wizard only when not called via API 2005/06/01 14:37:39 bm 1.12.10.12: Insert New Chart embedded 2005/05/17 13:01:42 bm 1.12.10.11: RESYNC: (1.18-1.19); FILE MERGED 2005/05/09 09:54:27 bm 1.12.10.10: moved chart2 API to data namespace 2005/03/17 13:45:10 bm 1.12.10.9: RESYNC: (1.16-1.18); FILE MERGED 2004/11/02 16:50:32 bm 1.12.10.8: RESYNC: (1.15-1.16); FILE MERGED 2004/08/30 18:08:08 bm 1.12.10.7: RESYNC: (1.13-1.15); FILE MERGED 2004/06/15 18:41:55 bm 1.12.10.6: RESYNC: (1.12-1.13); FILE MERGED 2004/05/05 16:34:56 iha 1.12.10.5: unmark automatic mark range; moved update call to chart 2004/04/08 12:21:47 iha 1.12.10.4: #i20344# init wizard correctly + update view 2004/04/08 09:03:14 iha 1.12.10.3: remove test code 2004/04/08 08:55:15 iha 1.12.10.2: get correct RangeString for chart 2004/04/07 22:03:58 iha 1.12.10.1: #i20344# changed chart creation process - added new chart wizard
2007-05-22 19:06:02 +00:00
SCCOL nCol1 = 0;
SCROW nRow1 = 0;
SCTAB nTab1 = 0;
SCCOL nCol2 = 0;
SCROW nRow2 = 0;
SCTAB nTab2 = 0;
ScMarkData& rMark = pViewData->GetMarkData();
if ( !rMark.IsMarked() )
2011-11-07 21:36:40 +01:00
pViewData->GetView()->MarkDataArea( true );
INTEGRATION: CWS chart2mst3 (1.12.10); FILE MERGED 2007/04/25 03:30:58 bm 1.12.10.33: RESYNC: (1.24-1.25); FILE MERGED 2007/04/20 10:41:20 nn 1.12.10.32: #i75307# FuInsertChart: MarkToMulti 2006/12/05 16:28:12 nn 1.12.10.31: #i71257# don't add undo action before the dialog is finished 2006/11/27 00:37:17 bm 1.12.10.30: aw024 adaptions 2006/11/24 18:24:58 bm 1.12.10.29: RESYNC: (1.23-1.24); FILE MERGED 2006/11/23 12:52:52 nn 1.12.10.28: #i71250# removed old chart code 2006/11/10 21:06:35 iha 1.12.10.27: prevent immidiate redraw in wizard and according dialogs (important for charts with many data) 2006/10/25 18:17:54 nn 1.12.10.26: allow range selection from inplace object without deactivating the object 2006/10/19 00:18:35 bm 1.12.10.25: RESYNC: (1.21-1.23); FILE MERGED 2006/10/11 15:10:11 nn 1.12.10.24: #i66867# auto-detect column/row headers 2006/08/04 14:34:01 bm 1.12.10.23: pass the document to the chart2 uno services instead of the docshell, as the shell itself is not really needed, and limits the creation of such objects unnecessarily to the ui 2006/06/24 13:04:39 iha 1.12.10.22: #i54915# chart wizard shouldn't overlap chart if possible 2006/06/22 15:42:13 nn 1.12.10.21: #i13379# default position for chart and dialog 2006/05/05 15:24:08 bm 1.12.10.20: RESYNC: (1.20-1.21); FILE MERGED 2006/05/05 14:32:41 bm 1.12.10.19: #i31098# leave draw shell after Cancel of inserting a chart 2006/05/03 15:46:49 bm 1.12.10.18: #i31098# Enable Cancel for Chart Wizard 2005/11/15 15:33:22 bm 1.12.10.17: dispose chart wizard dialog 2005/10/08 09:54:11 bm 1.12.10.16: RESYNC: (1.19-1.20); FILE MERGED 2005/09/08 11:44:48 iha 1.12.10.15: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter from calc 2005/08/15 13:09:29 bm 1.12.10.14: XDataReceiver changed 2005/08/05 12:43:19 bm 1.12.10.13: open chart creation wizard only when not called via API 2005/06/01 14:37:39 bm 1.12.10.12: Insert New Chart embedded 2005/05/17 13:01:42 bm 1.12.10.11: RESYNC: (1.18-1.19); FILE MERGED 2005/05/09 09:54:27 bm 1.12.10.10: moved chart2 API to data namespace 2005/03/17 13:45:10 bm 1.12.10.9: RESYNC: (1.16-1.18); FILE MERGED 2004/11/02 16:50:32 bm 1.12.10.8: RESYNC: (1.15-1.16); FILE MERGED 2004/08/30 18:08:08 bm 1.12.10.7: RESYNC: (1.13-1.15); FILE MERGED 2004/06/15 18:41:55 bm 1.12.10.6: RESYNC: (1.12-1.13); FILE MERGED 2004/05/05 16:34:56 iha 1.12.10.5: unmark automatic mark range; moved update call to chart 2004/04/08 12:21:47 iha 1.12.10.4: #i20344# init wizard correctly + update view 2004/04/08 09:03:14 iha 1.12.10.3: remove test code 2004/04/08 08:55:15 iha 1.12.10.2: get correct RangeString for chart 2004/04/07 22:03:58 iha 1.12.10.1: #i20344# changed chart creation process - added new chart wizard
2007-05-22 19:06:02 +00:00
if ( pViewData->GetSimpleArea( nCol1,nRow1,nTab1, nCol2,nRow2,nTab2 ) == SC_MARK_SIMPLE )
2000-09-18 16:07:07 +00:00
{
INTEGRATION: CWS chart2mst3 (1.12.10); FILE MERGED 2007/04/25 03:30:58 bm 1.12.10.33: RESYNC: (1.24-1.25); FILE MERGED 2007/04/20 10:41:20 nn 1.12.10.32: #i75307# FuInsertChart: MarkToMulti 2006/12/05 16:28:12 nn 1.12.10.31: #i71257# don't add undo action before the dialog is finished 2006/11/27 00:37:17 bm 1.12.10.30: aw024 adaptions 2006/11/24 18:24:58 bm 1.12.10.29: RESYNC: (1.23-1.24); FILE MERGED 2006/11/23 12:52:52 nn 1.12.10.28: #i71250# removed old chart code 2006/11/10 21:06:35 iha 1.12.10.27: prevent immidiate redraw in wizard and according dialogs (important for charts with many data) 2006/10/25 18:17:54 nn 1.12.10.26: allow range selection from inplace object without deactivating the object 2006/10/19 00:18:35 bm 1.12.10.25: RESYNC: (1.21-1.23); FILE MERGED 2006/10/11 15:10:11 nn 1.12.10.24: #i66867# auto-detect column/row headers 2006/08/04 14:34:01 bm 1.12.10.23: pass the document to the chart2 uno services instead of the docshell, as the shell itself is not really needed, and limits the creation of such objects unnecessarily to the ui 2006/06/24 13:04:39 iha 1.12.10.22: #i54915# chart wizard shouldn't overlap chart if possible 2006/06/22 15:42:13 nn 1.12.10.21: #i13379# default position for chart and dialog 2006/05/05 15:24:08 bm 1.12.10.20: RESYNC: (1.20-1.21); FILE MERGED 2006/05/05 14:32:41 bm 1.12.10.19: #i31098# leave draw shell after Cancel of inserting a chart 2006/05/03 15:46:49 bm 1.12.10.18: #i31098# Enable Cancel for Chart Wizard 2005/11/15 15:33:22 bm 1.12.10.17: dispose chart wizard dialog 2005/10/08 09:54:11 bm 1.12.10.16: RESYNC: (1.19-1.20); FILE MERGED 2005/09/08 11:44:48 iha 1.12.10.15: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter from calc 2005/08/15 13:09:29 bm 1.12.10.14: XDataReceiver changed 2005/08/05 12:43:19 bm 1.12.10.13: open chart creation wizard only when not called via API 2005/06/01 14:37:39 bm 1.12.10.12: Insert New Chart embedded 2005/05/17 13:01:42 bm 1.12.10.11: RESYNC: (1.18-1.19); FILE MERGED 2005/05/09 09:54:27 bm 1.12.10.10: moved chart2 API to data namespace 2005/03/17 13:45:10 bm 1.12.10.9: RESYNC: (1.16-1.18); FILE MERGED 2004/11/02 16:50:32 bm 1.12.10.8: RESYNC: (1.15-1.16); FILE MERGED 2004/08/30 18:08:08 bm 1.12.10.7: RESYNC: (1.13-1.15); FILE MERGED 2004/06/15 18:41:55 bm 1.12.10.6: RESYNC: (1.12-1.13); FILE MERGED 2004/05/05 16:34:56 iha 1.12.10.5: unmark automatic mark range; moved update call to chart 2004/04/08 12:21:47 iha 1.12.10.4: #i20344# init wizard correctly + update view 2004/04/08 09:03:14 iha 1.12.10.3: remove test code 2004/04/08 08:55:15 iha 1.12.10.2: get correct RangeString for chart 2004/04/07 22:03:58 iha 1.12.10.1: #i20344# changed chart creation process - added new chart wizard
2007-05-22 19:06:02 +00:00
PutInOrder( nCol1, nCol2 );
PutInOrder( nRow1, nRow2 );
if (nCol2 >= nCol1 || nRow2 >= nRow1)
INTEGRATION: CWS chart2mst3 (1.12.10); FILE MERGED 2007/04/25 03:30:58 bm 1.12.10.33: RESYNC: (1.24-1.25); FILE MERGED 2007/04/20 10:41:20 nn 1.12.10.32: #i75307# FuInsertChart: MarkToMulti 2006/12/05 16:28:12 nn 1.12.10.31: #i71257# don't add undo action before the dialog is finished 2006/11/27 00:37:17 bm 1.12.10.30: aw024 adaptions 2006/11/24 18:24:58 bm 1.12.10.29: RESYNC: (1.23-1.24); FILE MERGED 2006/11/23 12:52:52 nn 1.12.10.28: #i71250# removed old chart code 2006/11/10 21:06:35 iha 1.12.10.27: prevent immidiate redraw in wizard and according dialogs (important for charts with many data) 2006/10/25 18:17:54 nn 1.12.10.26: allow range selection from inplace object without deactivating the object 2006/10/19 00:18:35 bm 1.12.10.25: RESYNC: (1.21-1.23); FILE MERGED 2006/10/11 15:10:11 nn 1.12.10.24: #i66867# auto-detect column/row headers 2006/08/04 14:34:01 bm 1.12.10.23: pass the document to the chart2 uno services instead of the docshell, as the shell itself is not really needed, and limits the creation of such objects unnecessarily to the ui 2006/06/24 13:04:39 iha 1.12.10.22: #i54915# chart wizard shouldn't overlap chart if possible 2006/06/22 15:42:13 nn 1.12.10.21: #i13379# default position for chart and dialog 2006/05/05 15:24:08 bm 1.12.10.20: RESYNC: (1.20-1.21); FILE MERGED 2006/05/05 14:32:41 bm 1.12.10.19: #i31098# leave draw shell after Cancel of inserting a chart 2006/05/03 15:46:49 bm 1.12.10.18: #i31098# Enable Cancel for Chart Wizard 2005/11/15 15:33:22 bm 1.12.10.17: dispose chart wizard dialog 2005/10/08 09:54:11 bm 1.12.10.16: RESYNC: (1.19-1.20); FILE MERGED 2005/09/08 11:44:48 iha 1.12.10.15: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter from calc 2005/08/15 13:09:29 bm 1.12.10.14: XDataReceiver changed 2005/08/05 12:43:19 bm 1.12.10.13: open chart creation wizard only when not called via API 2005/06/01 14:37:39 bm 1.12.10.12: Insert New Chart embedded 2005/05/17 13:01:42 bm 1.12.10.11: RESYNC: (1.18-1.19); FILE MERGED 2005/05/09 09:54:27 bm 1.12.10.10: moved chart2 API to data namespace 2005/03/17 13:45:10 bm 1.12.10.9: RESYNC: (1.16-1.18); FILE MERGED 2004/11/02 16:50:32 bm 1.12.10.8: RESYNC: (1.15-1.16); FILE MERGED 2004/08/30 18:08:08 bm 1.12.10.7: RESYNC: (1.13-1.15); FILE MERGED 2004/06/15 18:41:55 bm 1.12.10.6: RESYNC: (1.12-1.13); FILE MERGED 2004/05/05 16:34:56 iha 1.12.10.5: unmark automatic mark range; moved update call to chart 2004/04/08 12:21:47 iha 1.12.10.4: #i20344# init wizard correctly + update view 2004/04/08 09:03:14 iha 1.12.10.3: remove test code 2004/04/08 08:55:15 iha 1.12.10.2: get correct RangeString for chart 2004/04/07 22:03:58 iha 1.12.10.1: #i20344# changed chart creation process - added new chart wizard
2007-05-22 19:06:02 +00:00
{
ScDocument* pDoc = pViewData->GetDocument();
pDoc->LimitChartArea( nTab1, nCol1,nRow1, nCol2,nRow2 );
2000-09-18 16:07:07 +00:00
INTEGRATION: CWS chart2mst3 (1.12.10); FILE MERGED 2007/04/25 03:30:58 bm 1.12.10.33: RESYNC: (1.24-1.25); FILE MERGED 2007/04/20 10:41:20 nn 1.12.10.32: #i75307# FuInsertChart: MarkToMulti 2006/12/05 16:28:12 nn 1.12.10.31: #i71257# don't add undo action before the dialog is finished 2006/11/27 00:37:17 bm 1.12.10.30: aw024 adaptions 2006/11/24 18:24:58 bm 1.12.10.29: RESYNC: (1.23-1.24); FILE MERGED 2006/11/23 12:52:52 nn 1.12.10.28: #i71250# removed old chart code 2006/11/10 21:06:35 iha 1.12.10.27: prevent immidiate redraw in wizard and according dialogs (important for charts with many data) 2006/10/25 18:17:54 nn 1.12.10.26: allow range selection from inplace object without deactivating the object 2006/10/19 00:18:35 bm 1.12.10.25: RESYNC: (1.21-1.23); FILE MERGED 2006/10/11 15:10:11 nn 1.12.10.24: #i66867# auto-detect column/row headers 2006/08/04 14:34:01 bm 1.12.10.23: pass the document to the chart2 uno services instead of the docshell, as the shell itself is not really needed, and limits the creation of such objects unnecessarily to the ui 2006/06/24 13:04:39 iha 1.12.10.22: #i54915# chart wizard shouldn't overlap chart if possible 2006/06/22 15:42:13 nn 1.12.10.21: #i13379# default position for chart and dialog 2006/05/05 15:24:08 bm 1.12.10.20: RESYNC: (1.20-1.21); FILE MERGED 2006/05/05 14:32:41 bm 1.12.10.19: #i31098# leave draw shell after Cancel of inserting a chart 2006/05/03 15:46:49 bm 1.12.10.18: #i31098# Enable Cancel for Chart Wizard 2005/11/15 15:33:22 bm 1.12.10.17: dispose chart wizard dialog 2005/10/08 09:54:11 bm 1.12.10.16: RESYNC: (1.19-1.20); FILE MERGED 2005/09/08 11:44:48 iha 1.12.10.15: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter from calc 2005/08/15 13:09:29 bm 1.12.10.14: XDataReceiver changed 2005/08/05 12:43:19 bm 1.12.10.13: open chart creation wizard only when not called via API 2005/06/01 14:37:39 bm 1.12.10.12: Insert New Chart embedded 2005/05/17 13:01:42 bm 1.12.10.11: RESYNC: (1.18-1.19); FILE MERGED 2005/05/09 09:54:27 bm 1.12.10.10: moved chart2 API to data namespace 2005/03/17 13:45:10 bm 1.12.10.9: RESYNC: (1.16-1.18); FILE MERGED 2004/11/02 16:50:32 bm 1.12.10.8: RESYNC: (1.15-1.16); FILE MERGED 2004/08/30 18:08:08 bm 1.12.10.7: RESYNC: (1.13-1.15); FILE MERGED 2004/06/15 18:41:55 bm 1.12.10.6: RESYNC: (1.12-1.13); FILE MERGED 2004/05/05 16:34:56 iha 1.12.10.5: unmark automatic mark range; moved update call to chart 2004/04/08 12:21:47 iha 1.12.10.4: #i20344# init wizard correctly + update view 2004/04/08 09:03:14 iha 1.12.10.3: remove test code 2004/04/08 08:55:15 iha 1.12.10.2: get correct RangeString for chart 2004/04/07 22:03:58 iha 1.12.10.1: #i20344# changed chart creation process - added new chart wizard
2007-05-22 19:06:02 +00:00
ScRange aRange( nCol1, nRow1, nTab1, nCol2, nRow2, nTab2 );
aRangeString = aRange.Format(SCR_ABS_3D, &rScDoc);
INTEGRATION: CWS chart2mst3 (1.12.10); FILE MERGED 2007/04/25 03:30:58 bm 1.12.10.33: RESYNC: (1.24-1.25); FILE MERGED 2007/04/20 10:41:20 nn 1.12.10.32: #i75307# FuInsertChart: MarkToMulti 2006/12/05 16:28:12 nn 1.12.10.31: #i71257# don't add undo action before the dialog is finished 2006/11/27 00:37:17 bm 1.12.10.30: aw024 adaptions 2006/11/24 18:24:58 bm 1.12.10.29: RESYNC: (1.23-1.24); FILE MERGED 2006/11/23 12:52:52 nn 1.12.10.28: #i71250# removed old chart code 2006/11/10 21:06:35 iha 1.12.10.27: prevent immidiate redraw in wizard and according dialogs (important for charts with many data) 2006/10/25 18:17:54 nn 1.12.10.26: allow range selection from inplace object without deactivating the object 2006/10/19 00:18:35 bm 1.12.10.25: RESYNC: (1.21-1.23); FILE MERGED 2006/10/11 15:10:11 nn 1.12.10.24: #i66867# auto-detect column/row headers 2006/08/04 14:34:01 bm 1.12.10.23: pass the document to the chart2 uno services instead of the docshell, as the shell itself is not really needed, and limits the creation of such objects unnecessarily to the ui 2006/06/24 13:04:39 iha 1.12.10.22: #i54915# chart wizard shouldn't overlap chart if possible 2006/06/22 15:42:13 nn 1.12.10.21: #i13379# default position for chart and dialog 2006/05/05 15:24:08 bm 1.12.10.20: RESYNC: (1.20-1.21); FILE MERGED 2006/05/05 14:32:41 bm 1.12.10.19: #i31098# leave draw shell after Cancel of inserting a chart 2006/05/03 15:46:49 bm 1.12.10.18: #i31098# Enable Cancel for Chart Wizard 2005/11/15 15:33:22 bm 1.12.10.17: dispose chart wizard dialog 2005/10/08 09:54:11 bm 1.12.10.16: RESYNC: (1.19-1.20); FILE MERGED 2005/09/08 11:44:48 iha 1.12.10.15: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter from calc 2005/08/15 13:09:29 bm 1.12.10.14: XDataReceiver changed 2005/08/05 12:43:19 bm 1.12.10.13: open chart creation wizard only when not called via API 2005/06/01 14:37:39 bm 1.12.10.12: Insert New Chart embedded 2005/05/17 13:01:42 bm 1.12.10.11: RESYNC: (1.18-1.19); FILE MERGED 2005/05/09 09:54:27 bm 1.12.10.10: moved chart2 API to data namespace 2005/03/17 13:45:10 bm 1.12.10.9: RESYNC: (1.16-1.18); FILE MERGED 2004/11/02 16:50:32 bm 1.12.10.8: RESYNC: (1.15-1.16); FILE MERGED 2004/08/30 18:08:08 bm 1.12.10.7: RESYNC: (1.13-1.15); FILE MERGED 2004/06/15 18:41:55 bm 1.12.10.6: RESYNC: (1.12-1.13); FILE MERGED 2004/05/05 16:34:56 iha 1.12.10.5: unmark automatic mark range; moved update call to chart 2004/04/08 12:21:47 iha 1.12.10.4: #i20344# init wizard correctly + update view 2004/04/08 09:03:14 iha 1.12.10.3: remove test code 2004/04/08 08:55:15 iha 1.12.10.2: get correct RangeString for chart 2004/04/07 22:03:58 iha 1.12.10.1: #i20344# changed chart creation process - added new chart wizard
2007-05-22 19:06:02 +00:00
}
2000-09-18 16:07:07 +00:00
}
}
if ( !aRangeString.isEmpty() )
2000-09-18 16:07:07 +00:00
{
INTEGRATION: CWS chart2mst3 (1.12.10); FILE MERGED 2007/04/25 03:30:58 bm 1.12.10.33: RESYNC: (1.24-1.25); FILE MERGED 2007/04/20 10:41:20 nn 1.12.10.32: #i75307# FuInsertChart: MarkToMulti 2006/12/05 16:28:12 nn 1.12.10.31: #i71257# don't add undo action before the dialog is finished 2006/11/27 00:37:17 bm 1.12.10.30: aw024 adaptions 2006/11/24 18:24:58 bm 1.12.10.29: RESYNC: (1.23-1.24); FILE MERGED 2006/11/23 12:52:52 nn 1.12.10.28: #i71250# removed old chart code 2006/11/10 21:06:35 iha 1.12.10.27: prevent immidiate redraw in wizard and according dialogs (important for charts with many data) 2006/10/25 18:17:54 nn 1.12.10.26: allow range selection from inplace object without deactivating the object 2006/10/19 00:18:35 bm 1.12.10.25: RESYNC: (1.21-1.23); FILE MERGED 2006/10/11 15:10:11 nn 1.12.10.24: #i66867# auto-detect column/row headers 2006/08/04 14:34:01 bm 1.12.10.23: pass the document to the chart2 uno services instead of the docshell, as the shell itself is not really needed, and limits the creation of such objects unnecessarily to the ui 2006/06/24 13:04:39 iha 1.12.10.22: #i54915# chart wizard shouldn't overlap chart if possible 2006/06/22 15:42:13 nn 1.12.10.21: #i13379# default position for chart and dialog 2006/05/05 15:24:08 bm 1.12.10.20: RESYNC: (1.20-1.21); FILE MERGED 2006/05/05 14:32:41 bm 1.12.10.19: #i31098# leave draw shell after Cancel of inserting a chart 2006/05/03 15:46:49 bm 1.12.10.18: #i31098# Enable Cancel for Chart Wizard 2005/11/15 15:33:22 bm 1.12.10.17: dispose chart wizard dialog 2005/10/08 09:54:11 bm 1.12.10.16: RESYNC: (1.19-1.20); FILE MERGED 2005/09/08 11:44:48 iha 1.12.10.15: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter from calc 2005/08/15 13:09:29 bm 1.12.10.14: XDataReceiver changed 2005/08/05 12:43:19 bm 1.12.10.13: open chart creation wizard only when not called via API 2005/06/01 14:37:39 bm 1.12.10.12: Insert New Chart embedded 2005/05/17 13:01:42 bm 1.12.10.11: RESYNC: (1.18-1.19); FILE MERGED 2005/05/09 09:54:27 bm 1.12.10.10: moved chart2 API to data namespace 2005/03/17 13:45:10 bm 1.12.10.9: RESYNC: (1.16-1.18); FILE MERGED 2004/11/02 16:50:32 bm 1.12.10.8: RESYNC: (1.15-1.16); FILE MERGED 2004/08/30 18:08:08 bm 1.12.10.7: RESYNC: (1.13-1.15); FILE MERGED 2004/06/15 18:41:55 bm 1.12.10.6: RESYNC: (1.12-1.13); FILE MERGED 2004/05/05 16:34:56 iha 1.12.10.5: unmark automatic mark range; moved update call to chart 2004/04/08 12:21:47 iha 1.12.10.4: #i20344# init wizard correctly + update view 2004/04/08 09:03:14 iha 1.12.10.3: remove test code 2004/04/08 08:55:15 iha 1.12.10.2: get correct RangeString for chart 2004/04/07 22:03:58 iha 1.12.10.1: #i20344# changed chart creation process - added new chart wizard
2007-05-22 19:06:02 +00:00
// connect to Calc data (if no range string, leave chart alone, with its own data)
uno::Reference< ::com::sun::star::chart2::data::XDataReceiver > xReceiver;
uno::Reference< embed::XComponentSupplier > xCompSupp( xObj, uno::UNO_QUERY );
if( xCompSupp.is())
xReceiver.set( xCompSupp->getComponent(), uno::UNO_QUERY );
OSL_ASSERT( xReceiver.is());
if( xReceiver.is() )
2000-09-18 16:07:07 +00:00
{
uno::Reference< chart2::data::XDataProvider > xDataProvider = new ScChart2DataProvider( &rScDoc );
INTEGRATION: CWS chart2mst3 (1.12.10); FILE MERGED 2007/04/25 03:30:58 bm 1.12.10.33: RESYNC: (1.24-1.25); FILE MERGED 2007/04/20 10:41:20 nn 1.12.10.32: #i75307# FuInsertChart: MarkToMulti 2006/12/05 16:28:12 nn 1.12.10.31: #i71257# don't add undo action before the dialog is finished 2006/11/27 00:37:17 bm 1.12.10.30: aw024 adaptions 2006/11/24 18:24:58 bm 1.12.10.29: RESYNC: (1.23-1.24); FILE MERGED 2006/11/23 12:52:52 nn 1.12.10.28: #i71250# removed old chart code 2006/11/10 21:06:35 iha 1.12.10.27: prevent immidiate redraw in wizard and according dialogs (important for charts with many data) 2006/10/25 18:17:54 nn 1.12.10.26: allow range selection from inplace object without deactivating the object 2006/10/19 00:18:35 bm 1.12.10.25: RESYNC: (1.21-1.23); FILE MERGED 2006/10/11 15:10:11 nn 1.12.10.24: #i66867# auto-detect column/row headers 2006/08/04 14:34:01 bm 1.12.10.23: pass the document to the chart2 uno services instead of the docshell, as the shell itself is not really needed, and limits the creation of such objects unnecessarily to the ui 2006/06/24 13:04:39 iha 1.12.10.22: #i54915# chart wizard shouldn't overlap chart if possible 2006/06/22 15:42:13 nn 1.12.10.21: #i13379# default position for chart and dialog 2006/05/05 15:24:08 bm 1.12.10.20: RESYNC: (1.20-1.21); FILE MERGED 2006/05/05 14:32:41 bm 1.12.10.19: #i31098# leave draw shell after Cancel of inserting a chart 2006/05/03 15:46:49 bm 1.12.10.18: #i31098# Enable Cancel for Chart Wizard 2005/11/15 15:33:22 bm 1.12.10.17: dispose chart wizard dialog 2005/10/08 09:54:11 bm 1.12.10.16: RESYNC: (1.19-1.20); FILE MERGED 2005/09/08 11:44:48 iha 1.12.10.15: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter from calc 2005/08/15 13:09:29 bm 1.12.10.14: XDataReceiver changed 2005/08/05 12:43:19 bm 1.12.10.13: open chart creation wizard only when not called via API 2005/06/01 14:37:39 bm 1.12.10.12: Insert New Chart embedded 2005/05/17 13:01:42 bm 1.12.10.11: RESYNC: (1.18-1.19); FILE MERGED 2005/05/09 09:54:27 bm 1.12.10.10: moved chart2 API to data namespace 2005/03/17 13:45:10 bm 1.12.10.9: RESYNC: (1.16-1.18); FILE MERGED 2004/11/02 16:50:32 bm 1.12.10.8: RESYNC: (1.15-1.16); FILE MERGED 2004/08/30 18:08:08 bm 1.12.10.7: RESYNC: (1.13-1.15); FILE MERGED 2004/06/15 18:41:55 bm 1.12.10.6: RESYNC: (1.12-1.13); FILE MERGED 2004/05/05 16:34:56 iha 1.12.10.5: unmark automatic mark range; moved update call to chart 2004/04/08 12:21:47 iha 1.12.10.4: #i20344# init wizard correctly + update view 2004/04/08 09:03:14 iha 1.12.10.3: remove test code 2004/04/08 08:55:15 iha 1.12.10.2: get correct RangeString for chart 2004/04/07 22:03:58 iha 1.12.10.1: #i20344# changed chart creation process - added new chart wizard
2007-05-22 19:06:02 +00:00
xReceiver->attachDataProvider( xDataProvider );
2000-09-18 16:07:07 +00:00
INTEGRATION: CWS chart2mst3 (1.12.10); FILE MERGED 2007/04/25 03:30:58 bm 1.12.10.33: RESYNC: (1.24-1.25); FILE MERGED 2007/04/20 10:41:20 nn 1.12.10.32: #i75307# FuInsertChart: MarkToMulti 2006/12/05 16:28:12 nn 1.12.10.31: #i71257# don't add undo action before the dialog is finished 2006/11/27 00:37:17 bm 1.12.10.30: aw024 adaptions 2006/11/24 18:24:58 bm 1.12.10.29: RESYNC: (1.23-1.24); FILE MERGED 2006/11/23 12:52:52 nn 1.12.10.28: #i71250# removed old chart code 2006/11/10 21:06:35 iha 1.12.10.27: prevent immidiate redraw in wizard and according dialogs (important for charts with many data) 2006/10/25 18:17:54 nn 1.12.10.26: allow range selection from inplace object without deactivating the object 2006/10/19 00:18:35 bm 1.12.10.25: RESYNC: (1.21-1.23); FILE MERGED 2006/10/11 15:10:11 nn 1.12.10.24: #i66867# auto-detect column/row headers 2006/08/04 14:34:01 bm 1.12.10.23: pass the document to the chart2 uno services instead of the docshell, as the shell itself is not really needed, and limits the creation of such objects unnecessarily to the ui 2006/06/24 13:04:39 iha 1.12.10.22: #i54915# chart wizard shouldn't overlap chart if possible 2006/06/22 15:42:13 nn 1.12.10.21: #i13379# default position for chart and dialog 2006/05/05 15:24:08 bm 1.12.10.20: RESYNC: (1.20-1.21); FILE MERGED 2006/05/05 14:32:41 bm 1.12.10.19: #i31098# leave draw shell after Cancel of inserting a chart 2006/05/03 15:46:49 bm 1.12.10.18: #i31098# Enable Cancel for Chart Wizard 2005/11/15 15:33:22 bm 1.12.10.17: dispose chart wizard dialog 2005/10/08 09:54:11 bm 1.12.10.16: RESYNC: (1.19-1.20); FILE MERGED 2005/09/08 11:44:48 iha 1.12.10.15: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter from calc 2005/08/15 13:09:29 bm 1.12.10.14: XDataReceiver changed 2005/08/05 12:43:19 bm 1.12.10.13: open chart creation wizard only when not called via API 2005/06/01 14:37:39 bm 1.12.10.12: Insert New Chart embedded 2005/05/17 13:01:42 bm 1.12.10.11: RESYNC: (1.18-1.19); FILE MERGED 2005/05/09 09:54:27 bm 1.12.10.10: moved chart2 API to data namespace 2005/03/17 13:45:10 bm 1.12.10.9: RESYNC: (1.16-1.18); FILE MERGED 2004/11/02 16:50:32 bm 1.12.10.8: RESYNC: (1.15-1.16); FILE MERGED 2004/08/30 18:08:08 bm 1.12.10.7: RESYNC: (1.13-1.15); FILE MERGED 2004/06/15 18:41:55 bm 1.12.10.6: RESYNC: (1.12-1.13); FILE MERGED 2004/05/05 16:34:56 iha 1.12.10.5: unmark automatic mark range; moved update call to chart 2004/04/08 12:21:47 iha 1.12.10.4: #i20344# init wizard correctly + update view 2004/04/08 09:03:14 iha 1.12.10.3: remove test code 2004/04/08 08:55:15 iha 1.12.10.2: get correct RangeString for chart 2004/04/07 22:03:58 iha 1.12.10.1: #i20344# changed chart creation process - added new chart wizard
2007-05-22 19:06:02 +00:00
uno::Reference< util::XNumberFormatsSupplier > xNumberFormatsSupplier( pDocShell->GetModel(), uno::UNO_QUERY );
xReceiver->attachNumberFormatsSupplier( xNumberFormatsSupplier );
2000-09-18 16:07:07 +00:00
INTEGRATION: CWS chart2mst3 (1.12.10); FILE MERGED 2007/04/25 03:30:58 bm 1.12.10.33: RESYNC: (1.24-1.25); FILE MERGED 2007/04/20 10:41:20 nn 1.12.10.32: #i75307# FuInsertChart: MarkToMulti 2006/12/05 16:28:12 nn 1.12.10.31: #i71257# don't add undo action before the dialog is finished 2006/11/27 00:37:17 bm 1.12.10.30: aw024 adaptions 2006/11/24 18:24:58 bm 1.12.10.29: RESYNC: (1.23-1.24); FILE MERGED 2006/11/23 12:52:52 nn 1.12.10.28: #i71250# removed old chart code 2006/11/10 21:06:35 iha 1.12.10.27: prevent immidiate redraw in wizard and according dialogs (important for charts with many data) 2006/10/25 18:17:54 nn 1.12.10.26: allow range selection from inplace object without deactivating the object 2006/10/19 00:18:35 bm 1.12.10.25: RESYNC: (1.21-1.23); FILE MERGED 2006/10/11 15:10:11 nn 1.12.10.24: #i66867# auto-detect column/row headers 2006/08/04 14:34:01 bm 1.12.10.23: pass the document to the chart2 uno services instead of the docshell, as the shell itself is not really needed, and limits the creation of such objects unnecessarily to the ui 2006/06/24 13:04:39 iha 1.12.10.22: #i54915# chart wizard shouldn't overlap chart if possible 2006/06/22 15:42:13 nn 1.12.10.21: #i13379# default position for chart and dialog 2006/05/05 15:24:08 bm 1.12.10.20: RESYNC: (1.20-1.21); FILE MERGED 2006/05/05 14:32:41 bm 1.12.10.19: #i31098# leave draw shell after Cancel of inserting a chart 2006/05/03 15:46:49 bm 1.12.10.18: #i31098# Enable Cancel for Chart Wizard 2005/11/15 15:33:22 bm 1.12.10.17: dispose chart wizard dialog 2005/10/08 09:54:11 bm 1.12.10.16: RESYNC: (1.19-1.20); FILE MERGED 2005/09/08 11:44:48 iha 1.12.10.15: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter from calc 2005/08/15 13:09:29 bm 1.12.10.14: XDataReceiver changed 2005/08/05 12:43:19 bm 1.12.10.13: open chart creation wizard only when not called via API 2005/06/01 14:37:39 bm 1.12.10.12: Insert New Chart embedded 2005/05/17 13:01:42 bm 1.12.10.11: RESYNC: (1.18-1.19); FILE MERGED 2005/05/09 09:54:27 bm 1.12.10.10: moved chart2 API to data namespace 2005/03/17 13:45:10 bm 1.12.10.9: RESYNC: (1.16-1.18); FILE MERGED 2004/11/02 16:50:32 bm 1.12.10.8: RESYNC: (1.15-1.16); FILE MERGED 2004/08/30 18:08:08 bm 1.12.10.7: RESYNC: (1.13-1.15); FILE MERGED 2004/06/15 18:41:55 bm 1.12.10.6: RESYNC: (1.12-1.13); FILE MERGED 2004/05/05 16:34:56 iha 1.12.10.5: unmark automatic mark range; moved update call to chart 2004/04/08 12:21:47 iha 1.12.10.4: #i20344# init wizard correctly + update view 2004/04/08 09:03:14 iha 1.12.10.3: remove test code 2004/04/08 08:55:15 iha 1.12.10.2: get correct RangeString for chart 2004/04/07 22:03:58 iha 1.12.10.1: #i20344# changed chart creation process - added new chart wizard
2007-05-22 19:06:02 +00:00
// Same behavior as with old chart: Always assume data series in columns
chart::ChartDataRowSource eDataRowSource = chart::ChartDataRowSource_COLUMNS;
bool bHasCategories = false;
bool bFirstCellAsLabel = false;
2000-09-18 16:07:07 +00:00
INTEGRATION: CWS chart2mst3 (1.12.10); FILE MERGED 2007/04/25 03:30:58 bm 1.12.10.33: RESYNC: (1.24-1.25); FILE MERGED 2007/04/20 10:41:20 nn 1.12.10.32: #i75307# FuInsertChart: MarkToMulti 2006/12/05 16:28:12 nn 1.12.10.31: #i71257# don't add undo action before the dialog is finished 2006/11/27 00:37:17 bm 1.12.10.30: aw024 adaptions 2006/11/24 18:24:58 bm 1.12.10.29: RESYNC: (1.23-1.24); FILE MERGED 2006/11/23 12:52:52 nn 1.12.10.28: #i71250# removed old chart code 2006/11/10 21:06:35 iha 1.12.10.27: prevent immidiate redraw in wizard and according dialogs (important for charts with many data) 2006/10/25 18:17:54 nn 1.12.10.26: allow range selection from inplace object without deactivating the object 2006/10/19 00:18:35 bm 1.12.10.25: RESYNC: (1.21-1.23); FILE MERGED 2006/10/11 15:10:11 nn 1.12.10.24: #i66867# auto-detect column/row headers 2006/08/04 14:34:01 bm 1.12.10.23: pass the document to the chart2 uno services instead of the docshell, as the shell itself is not really needed, and limits the creation of such objects unnecessarily to the ui 2006/06/24 13:04:39 iha 1.12.10.22: #i54915# chart wizard shouldn't overlap chart if possible 2006/06/22 15:42:13 nn 1.12.10.21: #i13379# default position for chart and dialog 2006/05/05 15:24:08 bm 1.12.10.20: RESYNC: (1.20-1.21); FILE MERGED 2006/05/05 14:32:41 bm 1.12.10.19: #i31098# leave draw shell after Cancel of inserting a chart 2006/05/03 15:46:49 bm 1.12.10.18: #i31098# Enable Cancel for Chart Wizard 2005/11/15 15:33:22 bm 1.12.10.17: dispose chart wizard dialog 2005/10/08 09:54:11 bm 1.12.10.16: RESYNC: (1.19-1.20); FILE MERGED 2005/09/08 11:44:48 iha 1.12.10.15: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter from calc 2005/08/15 13:09:29 bm 1.12.10.14: XDataReceiver changed 2005/08/05 12:43:19 bm 1.12.10.13: open chart creation wizard only when not called via API 2005/06/01 14:37:39 bm 1.12.10.12: Insert New Chart embedded 2005/05/17 13:01:42 bm 1.12.10.11: RESYNC: (1.18-1.19); FILE MERGED 2005/05/09 09:54:27 bm 1.12.10.10: moved chart2 API to data namespace 2005/03/17 13:45:10 bm 1.12.10.9: RESYNC: (1.16-1.18); FILE MERGED 2004/11/02 16:50:32 bm 1.12.10.8: RESYNC: (1.15-1.16); FILE MERGED 2004/08/30 18:08:08 bm 1.12.10.7: RESYNC: (1.13-1.15); FILE MERGED 2004/06/15 18:41:55 bm 1.12.10.6: RESYNC: (1.12-1.13); FILE MERGED 2004/05/05 16:34:56 iha 1.12.10.5: unmark automatic mark range; moved update call to chart 2004/04/08 12:21:47 iha 1.12.10.4: #i20344# init wizard correctly + update view 2004/04/08 09:03:14 iha 1.12.10.3: remove test code 2004/04/08 08:55:15 iha 1.12.10.2: get correct RangeString for chart 2004/04/07 22:03:58 iha 1.12.10.1: #i20344# changed chart creation process - added new chart wizard
2007-05-22 19:06:02 +00:00
// use ScChartPositioner to auto-detect column/row headers (like ScChartArray in old version)
ScRangeListRef aRangeListRef( new ScRangeList );
aRangeListRef->Parse( aRangeString, &rScDoc, SCA_VALID, rScDoc.GetAddressConvention() );
if ( !aRangeListRef->empty() )
INTEGRATION: CWS chart2mst3 (1.12.10); FILE MERGED 2007/04/25 03:30:58 bm 1.12.10.33: RESYNC: (1.24-1.25); FILE MERGED 2007/04/20 10:41:20 nn 1.12.10.32: #i75307# FuInsertChart: MarkToMulti 2006/12/05 16:28:12 nn 1.12.10.31: #i71257# don't add undo action before the dialog is finished 2006/11/27 00:37:17 bm 1.12.10.30: aw024 adaptions 2006/11/24 18:24:58 bm 1.12.10.29: RESYNC: (1.23-1.24); FILE MERGED 2006/11/23 12:52:52 nn 1.12.10.28: #i71250# removed old chart code 2006/11/10 21:06:35 iha 1.12.10.27: prevent immidiate redraw in wizard and according dialogs (important for charts with many data) 2006/10/25 18:17:54 nn 1.12.10.26: allow range selection from inplace object without deactivating the object 2006/10/19 00:18:35 bm 1.12.10.25: RESYNC: (1.21-1.23); FILE MERGED 2006/10/11 15:10:11 nn 1.12.10.24: #i66867# auto-detect column/row headers 2006/08/04 14:34:01 bm 1.12.10.23: pass the document to the chart2 uno services instead of the docshell, as the shell itself is not really needed, and limits the creation of such objects unnecessarily to the ui 2006/06/24 13:04:39 iha 1.12.10.22: #i54915# chart wizard shouldn't overlap chart if possible 2006/06/22 15:42:13 nn 1.12.10.21: #i13379# default position for chart and dialog 2006/05/05 15:24:08 bm 1.12.10.20: RESYNC: (1.20-1.21); FILE MERGED 2006/05/05 14:32:41 bm 1.12.10.19: #i31098# leave draw shell after Cancel of inserting a chart 2006/05/03 15:46:49 bm 1.12.10.18: #i31098# Enable Cancel for Chart Wizard 2005/11/15 15:33:22 bm 1.12.10.17: dispose chart wizard dialog 2005/10/08 09:54:11 bm 1.12.10.16: RESYNC: (1.19-1.20); FILE MERGED 2005/09/08 11:44:48 iha 1.12.10.15: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter from calc 2005/08/15 13:09:29 bm 1.12.10.14: XDataReceiver changed 2005/08/05 12:43:19 bm 1.12.10.13: open chart creation wizard only when not called via API 2005/06/01 14:37:39 bm 1.12.10.12: Insert New Chart embedded 2005/05/17 13:01:42 bm 1.12.10.11: RESYNC: (1.18-1.19); FILE MERGED 2005/05/09 09:54:27 bm 1.12.10.10: moved chart2 API to data namespace 2005/03/17 13:45:10 bm 1.12.10.9: RESYNC: (1.16-1.18); FILE MERGED 2004/11/02 16:50:32 bm 1.12.10.8: RESYNC: (1.15-1.16); FILE MERGED 2004/08/30 18:08:08 bm 1.12.10.7: RESYNC: (1.13-1.15); FILE MERGED 2004/06/15 18:41:55 bm 1.12.10.6: RESYNC: (1.12-1.13); FILE MERGED 2004/05/05 16:34:56 iha 1.12.10.5: unmark automatic mark range; moved update call to chart 2004/04/08 12:21:47 iha 1.12.10.4: #i20344# init wizard correctly + update view 2004/04/08 09:03:14 iha 1.12.10.3: remove test code 2004/04/08 08:55:15 iha 1.12.10.2: get correct RangeString for chart 2004/04/07 22:03:58 iha 1.12.10.1: #i20344# changed chart creation process - added new chart wizard
2007-05-22 19:06:02 +00:00
{
rScDoc.LimitChartIfAll( aRangeListRef ); // limit whole columns/rows to used area
// update string from modified ranges. The ranges must be in the current formula syntax.
OUString aTmpStr;
aRangeListRef->Format( aTmpStr, SCR_ABS_3D, &rScDoc, rScDoc.GetAddressConvention() );
aRangeString = aTmpStr;
ScChartPositioner aChartPositioner( &rScDoc, aRangeListRef );
const ScChartPositionMap* pPositionMap( aChartPositioner.GetPositionMap() );
if( pPositionMap )
{
SCSIZE nRowCount = pPositionMap->GetRowCount();
if( 1==nRowCount )
eDataRowSource = chart::ChartDataRowSource_ROWS;
}
INTEGRATION: CWS chart2mst3 (1.12.10); FILE MERGED 2007/04/25 03:30:58 bm 1.12.10.33: RESYNC: (1.24-1.25); FILE MERGED 2007/04/20 10:41:20 nn 1.12.10.32: #i75307# FuInsertChart: MarkToMulti 2006/12/05 16:28:12 nn 1.12.10.31: #i71257# don't add undo action before the dialog is finished 2006/11/27 00:37:17 bm 1.12.10.30: aw024 adaptions 2006/11/24 18:24:58 bm 1.12.10.29: RESYNC: (1.23-1.24); FILE MERGED 2006/11/23 12:52:52 nn 1.12.10.28: #i71250# removed old chart code 2006/11/10 21:06:35 iha 1.12.10.27: prevent immidiate redraw in wizard and according dialogs (important for charts with many data) 2006/10/25 18:17:54 nn 1.12.10.26: allow range selection from inplace object without deactivating the object 2006/10/19 00:18:35 bm 1.12.10.25: RESYNC: (1.21-1.23); FILE MERGED 2006/10/11 15:10:11 nn 1.12.10.24: #i66867# auto-detect column/row headers 2006/08/04 14:34:01 bm 1.12.10.23: pass the document to the chart2 uno services instead of the docshell, as the shell itself is not really needed, and limits the creation of such objects unnecessarily to the ui 2006/06/24 13:04:39 iha 1.12.10.22: #i54915# chart wizard shouldn't overlap chart if possible 2006/06/22 15:42:13 nn 1.12.10.21: #i13379# default position for chart and dialog 2006/05/05 15:24:08 bm 1.12.10.20: RESYNC: (1.20-1.21); FILE MERGED 2006/05/05 14:32:41 bm 1.12.10.19: #i31098# leave draw shell after Cancel of inserting a chart 2006/05/03 15:46:49 bm 1.12.10.18: #i31098# Enable Cancel for Chart Wizard 2005/11/15 15:33:22 bm 1.12.10.17: dispose chart wizard dialog 2005/10/08 09:54:11 bm 1.12.10.16: RESYNC: (1.19-1.20); FILE MERGED 2005/09/08 11:44:48 iha 1.12.10.15: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter from calc 2005/08/15 13:09:29 bm 1.12.10.14: XDataReceiver changed 2005/08/05 12:43:19 bm 1.12.10.13: open chart creation wizard only when not called via API 2005/06/01 14:37:39 bm 1.12.10.12: Insert New Chart embedded 2005/05/17 13:01:42 bm 1.12.10.11: RESYNC: (1.18-1.19); FILE MERGED 2005/05/09 09:54:27 bm 1.12.10.10: moved chart2 API to data namespace 2005/03/17 13:45:10 bm 1.12.10.9: RESYNC: (1.16-1.18); FILE MERGED 2004/11/02 16:50:32 bm 1.12.10.8: RESYNC: (1.15-1.16); FILE MERGED 2004/08/30 18:08:08 bm 1.12.10.7: RESYNC: (1.13-1.15); FILE MERGED 2004/06/15 18:41:55 bm 1.12.10.6: RESYNC: (1.12-1.13); FILE MERGED 2004/05/05 16:34:56 iha 1.12.10.5: unmark automatic mark range; moved update call to chart 2004/04/08 12:21:47 iha 1.12.10.4: #i20344# init wizard correctly + update view 2004/04/08 09:03:14 iha 1.12.10.3: remove test code 2004/04/08 08:55:15 iha 1.12.10.2: get correct RangeString for chart 2004/04/07 22:03:58 iha 1.12.10.1: #i20344# changed chart creation process - added new chart wizard
2007-05-22 19:06:02 +00:00
if ( eDataRowSource == chart::ChartDataRowSource_COLUMNS )
{
bHasCategories = aChartPositioner.HasRowHeaders();
bFirstCellAsLabel = aChartPositioner.HasColHeaders();
}
else // in case the default is changed
{
bHasCategories = aChartPositioner.HasColHeaders();
bFirstCellAsLabel = aChartPositioner.HasRowHeaders();
}
}
2000-09-18 16:07:07 +00:00
INTEGRATION: CWS chart2mst3 (1.12.10); FILE MERGED 2007/04/25 03:30:58 bm 1.12.10.33: RESYNC: (1.24-1.25); FILE MERGED 2007/04/20 10:41:20 nn 1.12.10.32: #i75307# FuInsertChart: MarkToMulti 2006/12/05 16:28:12 nn 1.12.10.31: #i71257# don't add undo action before the dialog is finished 2006/11/27 00:37:17 bm 1.12.10.30: aw024 adaptions 2006/11/24 18:24:58 bm 1.12.10.29: RESYNC: (1.23-1.24); FILE MERGED 2006/11/23 12:52:52 nn 1.12.10.28: #i71250# removed old chart code 2006/11/10 21:06:35 iha 1.12.10.27: prevent immidiate redraw in wizard and according dialogs (important for charts with many data) 2006/10/25 18:17:54 nn 1.12.10.26: allow range selection from inplace object without deactivating the object 2006/10/19 00:18:35 bm 1.12.10.25: RESYNC: (1.21-1.23); FILE MERGED 2006/10/11 15:10:11 nn 1.12.10.24: #i66867# auto-detect column/row headers 2006/08/04 14:34:01 bm 1.12.10.23: pass the document to the chart2 uno services instead of the docshell, as the shell itself is not really needed, and limits the creation of such objects unnecessarily to the ui 2006/06/24 13:04:39 iha 1.12.10.22: #i54915# chart wizard shouldn't overlap chart if possible 2006/06/22 15:42:13 nn 1.12.10.21: #i13379# default position for chart and dialog 2006/05/05 15:24:08 bm 1.12.10.20: RESYNC: (1.20-1.21); FILE MERGED 2006/05/05 14:32:41 bm 1.12.10.19: #i31098# leave draw shell after Cancel of inserting a chart 2006/05/03 15:46:49 bm 1.12.10.18: #i31098# Enable Cancel for Chart Wizard 2005/11/15 15:33:22 bm 1.12.10.17: dispose chart wizard dialog 2005/10/08 09:54:11 bm 1.12.10.16: RESYNC: (1.19-1.20); FILE MERGED 2005/09/08 11:44:48 iha 1.12.10.15: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter from calc 2005/08/15 13:09:29 bm 1.12.10.14: XDataReceiver changed 2005/08/05 12:43:19 bm 1.12.10.13: open chart creation wizard only when not called via API 2005/06/01 14:37:39 bm 1.12.10.12: Insert New Chart embedded 2005/05/17 13:01:42 bm 1.12.10.11: RESYNC: (1.18-1.19); FILE MERGED 2005/05/09 09:54:27 bm 1.12.10.10: moved chart2 API to data namespace 2005/03/17 13:45:10 bm 1.12.10.9: RESYNC: (1.16-1.18); FILE MERGED 2004/11/02 16:50:32 bm 1.12.10.8: RESYNC: (1.15-1.16); FILE MERGED 2004/08/30 18:08:08 bm 1.12.10.7: RESYNC: (1.13-1.15); FILE MERGED 2004/06/15 18:41:55 bm 1.12.10.6: RESYNC: (1.12-1.13); FILE MERGED 2004/05/05 16:34:56 iha 1.12.10.5: unmark automatic mark range; moved update call to chart 2004/04/08 12:21:47 iha 1.12.10.4: #i20344# init wizard correctly + update view 2004/04/08 09:03:14 iha 1.12.10.3: remove test code 2004/04/08 08:55:15 iha 1.12.10.2: get correct RangeString for chart 2004/04/07 22:03:58 iha 1.12.10.1: #i20344# changed chart creation process - added new chart wizard
2007-05-22 19:06:02 +00:00
uno::Sequence< beans::PropertyValue > aArgs( 4 );
aArgs[0] = beans::PropertyValue(
OUString("CellRangeRepresentation"), -1,
INTEGRATION: CWS chart2mst3 (1.12.10); FILE MERGED 2007/04/25 03:30:58 bm 1.12.10.33: RESYNC: (1.24-1.25); FILE MERGED 2007/04/20 10:41:20 nn 1.12.10.32: #i75307# FuInsertChart: MarkToMulti 2006/12/05 16:28:12 nn 1.12.10.31: #i71257# don't add undo action before the dialog is finished 2006/11/27 00:37:17 bm 1.12.10.30: aw024 adaptions 2006/11/24 18:24:58 bm 1.12.10.29: RESYNC: (1.23-1.24); FILE MERGED 2006/11/23 12:52:52 nn 1.12.10.28: #i71250# removed old chart code 2006/11/10 21:06:35 iha 1.12.10.27: prevent immidiate redraw in wizard and according dialogs (important for charts with many data) 2006/10/25 18:17:54 nn 1.12.10.26: allow range selection from inplace object without deactivating the object 2006/10/19 00:18:35 bm 1.12.10.25: RESYNC: (1.21-1.23); FILE MERGED 2006/10/11 15:10:11 nn 1.12.10.24: #i66867# auto-detect column/row headers 2006/08/04 14:34:01 bm 1.12.10.23: pass the document to the chart2 uno services instead of the docshell, as the shell itself is not really needed, and limits the creation of such objects unnecessarily to the ui 2006/06/24 13:04:39 iha 1.12.10.22: #i54915# chart wizard shouldn't overlap chart if possible 2006/06/22 15:42:13 nn 1.12.10.21: #i13379# default position for chart and dialog 2006/05/05 15:24:08 bm 1.12.10.20: RESYNC: (1.20-1.21); FILE MERGED 2006/05/05 14:32:41 bm 1.12.10.19: #i31098# leave draw shell after Cancel of inserting a chart 2006/05/03 15:46:49 bm 1.12.10.18: #i31098# Enable Cancel for Chart Wizard 2005/11/15 15:33:22 bm 1.12.10.17: dispose chart wizard dialog 2005/10/08 09:54:11 bm 1.12.10.16: RESYNC: (1.19-1.20); FILE MERGED 2005/09/08 11:44:48 iha 1.12.10.15: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter from calc 2005/08/15 13:09:29 bm 1.12.10.14: XDataReceiver changed 2005/08/05 12:43:19 bm 1.12.10.13: open chart creation wizard only when not called via API 2005/06/01 14:37:39 bm 1.12.10.12: Insert New Chart embedded 2005/05/17 13:01:42 bm 1.12.10.11: RESYNC: (1.18-1.19); FILE MERGED 2005/05/09 09:54:27 bm 1.12.10.10: moved chart2 API to data namespace 2005/03/17 13:45:10 bm 1.12.10.9: RESYNC: (1.16-1.18); FILE MERGED 2004/11/02 16:50:32 bm 1.12.10.8: RESYNC: (1.15-1.16); FILE MERGED 2004/08/30 18:08:08 bm 1.12.10.7: RESYNC: (1.13-1.15); FILE MERGED 2004/06/15 18:41:55 bm 1.12.10.6: RESYNC: (1.12-1.13); FILE MERGED 2004/05/05 16:34:56 iha 1.12.10.5: unmark automatic mark range; moved update call to chart 2004/04/08 12:21:47 iha 1.12.10.4: #i20344# init wizard correctly + update view 2004/04/08 09:03:14 iha 1.12.10.3: remove test code 2004/04/08 08:55:15 iha 1.12.10.2: get correct RangeString for chart 2004/04/07 22:03:58 iha 1.12.10.1: #i20344# changed chart creation process - added new chart wizard
2007-05-22 19:06:02 +00:00
uno::makeAny( aRangeString ), beans::PropertyState_DIRECT_VALUE );
aArgs[1] = beans::PropertyValue(
OUString("HasCategories"), -1,
INTEGRATION: CWS chart2mst3 (1.12.10); FILE MERGED 2007/04/25 03:30:58 bm 1.12.10.33: RESYNC: (1.24-1.25); FILE MERGED 2007/04/20 10:41:20 nn 1.12.10.32: #i75307# FuInsertChart: MarkToMulti 2006/12/05 16:28:12 nn 1.12.10.31: #i71257# don't add undo action before the dialog is finished 2006/11/27 00:37:17 bm 1.12.10.30: aw024 adaptions 2006/11/24 18:24:58 bm 1.12.10.29: RESYNC: (1.23-1.24); FILE MERGED 2006/11/23 12:52:52 nn 1.12.10.28: #i71250# removed old chart code 2006/11/10 21:06:35 iha 1.12.10.27: prevent immidiate redraw in wizard and according dialogs (important for charts with many data) 2006/10/25 18:17:54 nn 1.12.10.26: allow range selection from inplace object without deactivating the object 2006/10/19 00:18:35 bm 1.12.10.25: RESYNC: (1.21-1.23); FILE MERGED 2006/10/11 15:10:11 nn 1.12.10.24: #i66867# auto-detect column/row headers 2006/08/04 14:34:01 bm 1.12.10.23: pass the document to the chart2 uno services instead of the docshell, as the shell itself is not really needed, and limits the creation of such objects unnecessarily to the ui 2006/06/24 13:04:39 iha 1.12.10.22: #i54915# chart wizard shouldn't overlap chart if possible 2006/06/22 15:42:13 nn 1.12.10.21: #i13379# default position for chart and dialog 2006/05/05 15:24:08 bm 1.12.10.20: RESYNC: (1.20-1.21); FILE MERGED 2006/05/05 14:32:41 bm 1.12.10.19: #i31098# leave draw shell after Cancel of inserting a chart 2006/05/03 15:46:49 bm 1.12.10.18: #i31098# Enable Cancel for Chart Wizard 2005/11/15 15:33:22 bm 1.12.10.17: dispose chart wizard dialog 2005/10/08 09:54:11 bm 1.12.10.16: RESYNC: (1.19-1.20); FILE MERGED 2005/09/08 11:44:48 iha 1.12.10.15: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter from calc 2005/08/15 13:09:29 bm 1.12.10.14: XDataReceiver changed 2005/08/05 12:43:19 bm 1.12.10.13: open chart creation wizard only when not called via API 2005/06/01 14:37:39 bm 1.12.10.12: Insert New Chart embedded 2005/05/17 13:01:42 bm 1.12.10.11: RESYNC: (1.18-1.19); FILE MERGED 2005/05/09 09:54:27 bm 1.12.10.10: moved chart2 API to data namespace 2005/03/17 13:45:10 bm 1.12.10.9: RESYNC: (1.16-1.18); FILE MERGED 2004/11/02 16:50:32 bm 1.12.10.8: RESYNC: (1.15-1.16); FILE MERGED 2004/08/30 18:08:08 bm 1.12.10.7: RESYNC: (1.13-1.15); FILE MERGED 2004/06/15 18:41:55 bm 1.12.10.6: RESYNC: (1.12-1.13); FILE MERGED 2004/05/05 16:34:56 iha 1.12.10.5: unmark automatic mark range; moved update call to chart 2004/04/08 12:21:47 iha 1.12.10.4: #i20344# init wizard correctly + update view 2004/04/08 09:03:14 iha 1.12.10.3: remove test code 2004/04/08 08:55:15 iha 1.12.10.2: get correct RangeString for chart 2004/04/07 22:03:58 iha 1.12.10.1: #i20344# changed chart creation process - added new chart wizard
2007-05-22 19:06:02 +00:00
uno::makeAny( bHasCategories ), beans::PropertyState_DIRECT_VALUE );
aArgs[2] = beans::PropertyValue(
OUString("FirstCellAsLabel"), -1,
INTEGRATION: CWS chart2mst3 (1.12.10); FILE MERGED 2007/04/25 03:30:58 bm 1.12.10.33: RESYNC: (1.24-1.25); FILE MERGED 2007/04/20 10:41:20 nn 1.12.10.32: #i75307# FuInsertChart: MarkToMulti 2006/12/05 16:28:12 nn 1.12.10.31: #i71257# don't add undo action before the dialog is finished 2006/11/27 00:37:17 bm 1.12.10.30: aw024 adaptions 2006/11/24 18:24:58 bm 1.12.10.29: RESYNC: (1.23-1.24); FILE MERGED 2006/11/23 12:52:52 nn 1.12.10.28: #i71250# removed old chart code 2006/11/10 21:06:35 iha 1.12.10.27: prevent immidiate redraw in wizard and according dialogs (important for charts with many data) 2006/10/25 18:17:54 nn 1.12.10.26: allow range selection from inplace object without deactivating the object 2006/10/19 00:18:35 bm 1.12.10.25: RESYNC: (1.21-1.23); FILE MERGED 2006/10/11 15:10:11 nn 1.12.10.24: #i66867# auto-detect column/row headers 2006/08/04 14:34:01 bm 1.12.10.23: pass the document to the chart2 uno services instead of the docshell, as the shell itself is not really needed, and limits the creation of such objects unnecessarily to the ui 2006/06/24 13:04:39 iha 1.12.10.22: #i54915# chart wizard shouldn't overlap chart if possible 2006/06/22 15:42:13 nn 1.12.10.21: #i13379# default position for chart and dialog 2006/05/05 15:24:08 bm 1.12.10.20: RESYNC: (1.20-1.21); FILE MERGED 2006/05/05 14:32:41 bm 1.12.10.19: #i31098# leave draw shell after Cancel of inserting a chart 2006/05/03 15:46:49 bm 1.12.10.18: #i31098# Enable Cancel for Chart Wizard 2005/11/15 15:33:22 bm 1.12.10.17: dispose chart wizard dialog 2005/10/08 09:54:11 bm 1.12.10.16: RESYNC: (1.19-1.20); FILE MERGED 2005/09/08 11:44:48 iha 1.12.10.15: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter from calc 2005/08/15 13:09:29 bm 1.12.10.14: XDataReceiver changed 2005/08/05 12:43:19 bm 1.12.10.13: open chart creation wizard only when not called via API 2005/06/01 14:37:39 bm 1.12.10.12: Insert New Chart embedded 2005/05/17 13:01:42 bm 1.12.10.11: RESYNC: (1.18-1.19); FILE MERGED 2005/05/09 09:54:27 bm 1.12.10.10: moved chart2 API to data namespace 2005/03/17 13:45:10 bm 1.12.10.9: RESYNC: (1.16-1.18); FILE MERGED 2004/11/02 16:50:32 bm 1.12.10.8: RESYNC: (1.15-1.16); FILE MERGED 2004/08/30 18:08:08 bm 1.12.10.7: RESYNC: (1.13-1.15); FILE MERGED 2004/06/15 18:41:55 bm 1.12.10.6: RESYNC: (1.12-1.13); FILE MERGED 2004/05/05 16:34:56 iha 1.12.10.5: unmark automatic mark range; moved update call to chart 2004/04/08 12:21:47 iha 1.12.10.4: #i20344# init wizard correctly + update view 2004/04/08 09:03:14 iha 1.12.10.3: remove test code 2004/04/08 08:55:15 iha 1.12.10.2: get correct RangeString for chart 2004/04/07 22:03:58 iha 1.12.10.1: #i20344# changed chart creation process - added new chart wizard
2007-05-22 19:06:02 +00:00
uno::makeAny( bFirstCellAsLabel ), beans::PropertyState_DIRECT_VALUE );
aArgs[3] = beans::PropertyValue(
OUString("DataRowSource"), -1,
INTEGRATION: CWS chart2mst3 (1.12.10); FILE MERGED 2007/04/25 03:30:58 bm 1.12.10.33: RESYNC: (1.24-1.25); FILE MERGED 2007/04/20 10:41:20 nn 1.12.10.32: #i75307# FuInsertChart: MarkToMulti 2006/12/05 16:28:12 nn 1.12.10.31: #i71257# don't add undo action before the dialog is finished 2006/11/27 00:37:17 bm 1.12.10.30: aw024 adaptions 2006/11/24 18:24:58 bm 1.12.10.29: RESYNC: (1.23-1.24); FILE MERGED 2006/11/23 12:52:52 nn 1.12.10.28: #i71250# removed old chart code 2006/11/10 21:06:35 iha 1.12.10.27: prevent immidiate redraw in wizard and according dialogs (important for charts with many data) 2006/10/25 18:17:54 nn 1.12.10.26: allow range selection from inplace object without deactivating the object 2006/10/19 00:18:35 bm 1.12.10.25: RESYNC: (1.21-1.23); FILE MERGED 2006/10/11 15:10:11 nn 1.12.10.24: #i66867# auto-detect column/row headers 2006/08/04 14:34:01 bm 1.12.10.23: pass the document to the chart2 uno services instead of the docshell, as the shell itself is not really needed, and limits the creation of such objects unnecessarily to the ui 2006/06/24 13:04:39 iha 1.12.10.22: #i54915# chart wizard shouldn't overlap chart if possible 2006/06/22 15:42:13 nn 1.12.10.21: #i13379# default position for chart and dialog 2006/05/05 15:24:08 bm 1.12.10.20: RESYNC: (1.20-1.21); FILE MERGED 2006/05/05 14:32:41 bm 1.12.10.19: #i31098# leave draw shell after Cancel of inserting a chart 2006/05/03 15:46:49 bm 1.12.10.18: #i31098# Enable Cancel for Chart Wizard 2005/11/15 15:33:22 bm 1.12.10.17: dispose chart wizard dialog 2005/10/08 09:54:11 bm 1.12.10.16: RESYNC: (1.19-1.20); FILE MERGED 2005/09/08 11:44:48 iha 1.12.10.15: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter from calc 2005/08/15 13:09:29 bm 1.12.10.14: XDataReceiver changed 2005/08/05 12:43:19 bm 1.12.10.13: open chart creation wizard only when not called via API 2005/06/01 14:37:39 bm 1.12.10.12: Insert New Chart embedded 2005/05/17 13:01:42 bm 1.12.10.11: RESYNC: (1.18-1.19); FILE MERGED 2005/05/09 09:54:27 bm 1.12.10.10: moved chart2 API to data namespace 2005/03/17 13:45:10 bm 1.12.10.9: RESYNC: (1.16-1.18); FILE MERGED 2004/11/02 16:50:32 bm 1.12.10.8: RESYNC: (1.15-1.16); FILE MERGED 2004/08/30 18:08:08 bm 1.12.10.7: RESYNC: (1.13-1.15); FILE MERGED 2004/06/15 18:41:55 bm 1.12.10.6: RESYNC: (1.12-1.13); FILE MERGED 2004/05/05 16:34:56 iha 1.12.10.5: unmark automatic mark range; moved update call to chart 2004/04/08 12:21:47 iha 1.12.10.4: #i20344# init wizard correctly + update view 2004/04/08 09:03:14 iha 1.12.10.3: remove test code 2004/04/08 08:55:15 iha 1.12.10.2: get correct RangeString for chart 2004/04/07 22:03:58 iha 1.12.10.1: #i20344# changed chart creation process - added new chart wizard
2007-05-22 19:06:02 +00:00
uno::makeAny( eDataRowSource ), beans::PropertyState_DIRECT_VALUE );
xReceiver->setArguments( aArgs );
// don't create chart listener here (range may be modified in chart dialog)
}
2000-09-18 16:07:07 +00:00
}
}
2011-11-07 21:36:40 +01:00
}
FuInsertOLE::FuInsertOLE(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawView* pViewP,
2000-09-18 16:07:07 +00:00
SdrModel* pDoc, SfxRequest& rReq)
: FuPoor(pViewSh, pWin, pViewP, pDoc, rReq)
2000-09-18 16:07:07 +00:00
{
if( ! rReq.IsAPI() )
rReq.Done();
//! hier DLL's initalisieren, damit die Factories existieren?
uno::Reference < embed::XEmbeddedObject > xObj;
uno::Reference < embed::XStorage > xStorage = comphelper::OStorageHelper::GetTemporaryStorage();
bool bIsFromFile = false;
OUString aName;
2000-09-18 16:07:07 +00:00
sal_Int64 nAspect = embed::Aspects::MSOLE_CONTENT;
OUString aIconMediaType;
uno::Reference< io::XInputStream > xIconMetaFile;
sal_uInt16 nSlot = rReq.GetSlot();
SFX_REQUEST_ARG( rReq, pNameItem, SfxGlobalNameItem, SID_INSERT_OBJECT, false );
if ( nSlot == SID_INSERT_OBJECT && pNameItem )
2000-09-18 16:07:07 +00:00
{
SvGlobalName aClassName = pNameItem->GetValue();
xObj = pViewShell->GetViewFrame()->GetObjectShell()->GetEmbeddedObjectContainer().CreateEmbeddedObject( aClassName.GetByteSequence(), aName );
2000-09-18 16:07:07 +00:00
}
else if ( nSlot == SID_INSERT_SMATH )
2000-09-18 16:07:07 +00:00
{
2000-11-14 15:26:30 +00:00
if ( SvtModuleOptions().IsMath() )
{
nSlot = SID_INSERT_OBJECT;
xObj = pViewShell->GetViewFrame()->GetObjectShell()->GetEmbeddedObjectContainer().CreateEmbeddedObject( SvGlobalName( SO3_SM_CLASSID_60 ).GetByteSequence(), aName );
rReq.AppendItem( SfxGlobalNameItem( SID_INSERT_OBJECT, SvGlobalName( SO3_SM_CLASSID_60 ) ) );
}
2000-09-18 16:07:07 +00:00
}
else
2000-09-18 16:07:07 +00:00
{
SvObjectServerList aServerLst;
switch ( nSlot )
2000-09-18 16:07:07 +00:00
{
case SID_INSERT_OBJECT :
aServerLst.FillInsertObjects();
aServerLst.Remove( ScDocShell::Factory().GetClassId() ); // Starcalc nicht anzeigen
//TODO/LATER: currently no inserting of ClassId into SfxRequest!
case SID_INSERT_PLUGIN :
case SID_INSERT_FLOATINGFRAME :
2000-09-18 16:07:07 +00:00
{
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
boost::scoped_ptr<SfxAbstractInsertObjectDialog> pDlg(
pFact->CreateInsertObjectDialog( pViewShell->GetWindow(), SC_MOD()->GetSlotPool()->GetSlot(nSlot)->GetCommandString(),
xStorage, &aServerLst ));
if ( pDlg )
{
pDlg->Execute();
xObj = pDlg->GetObject();
xIconMetaFile = pDlg->GetIconIfIconified( &aIconMediaType );
if ( xIconMetaFile.is() )
nAspect = embed::Aspects::MSOLE_ICON;
if ( xObj.is() )
pViewSh->GetObjectShell()->GetEmbeddedObjectContainer().InsertEmbeddedObject( xObj, aName );
// damit DrawShell eingeschaltet wird (Objekt aktivieren ist unnoetig):
bIsFromFile = !pDlg->IsCreateNew();
}
break;
2000-09-18 16:07:07 +00:00
}
case SID_INSERT_SOUND :
case SID_INSERT_VIDEO :
2000-09-18 16:07:07 +00:00
{
// create special filedialog for plugins
SvxPluginFileDlg aPluginFileDialog(pWin, nSlot);
// open filedlg
if ( ERRCODE_NONE == aPluginFileDialog.Execute() )
{
// get URL
INetURLObject aURL;
aURL.SetSmartProtocol( INetProtocol::File );
if ( aURL.SetURL( aPluginFileDialog.GetPath() ) )
{
// create a plugin object
OUString aObjName;
SvGlobalName aClassId( SO3_PLUGIN_CLASSID );
comphelper::EmbeddedObjectContainer aCnt( xStorage );
xObj = aCnt.CreateEmbeddedObject( aClassId.GetByteSequence(), aObjName );
if ( xObj.is() && svt::EmbeddedObjectRef::TryRunningState( xObj ) )
{
// set properties from dialog
uno::Reference < beans::XPropertySet > xSet( xObj->getComponent(), uno::UNO_QUERY );
if ( xSet.is() )
{
xSet->setPropertyValue("PluginURL",
uno::makeAny( OUString( aURL.GetMainURL( INetURLObject::NO_DECODE ) ) ) );
}
}
}
else
{
2011-03-01 19:05:02 +01:00
OSL_FAIL("Invalid URL!");
//! error message
//! can this happen???
}
}
}
}
2000-09-18 16:07:07 +00:00
}
// SvInsertObjectDialog (alles in einem Dialog) wird nicht mehr benutzt
if (xObj.is())
2000-09-18 16:07:07 +00:00
{
pView->UnmarkAll();
try
{
::svt::EmbeddedObjectRef aObjRef( xObj, nAspect );
Size aSize;
MapMode aMap100( MAP_100TH_MM );
MapUnit aMapUnit = MAP_100TH_MM;
if ( nAspect == embed::Aspects::MSOLE_ICON )
{
aObjRef.SetGraphicStream( xIconMetaFile, aIconMediaType );
aSize = aObjRef.GetSize( &aMap100 );
}
else
{
awt::Size aSz;
try
{
aSz = xObj->getVisualAreaSize( nAspect );
}
catch( embed::NoVisualAreaSizeException& )
{
// the default size will be set later
}
aSize = Size( aSz.Width, aSz.Height );
2000-09-18 16:07:07 +00:00
aMapUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( xObj->getMapUnit( nAspect ) );
if (aSize.Height() == 0 || aSize.Width() == 0)
{
// Rechteck mit ausgewogenem Kantenverhaeltnis
aSize.Width() = 5000;
aSize.Height() = 5000;
Size aTmp = OutputDevice::LogicToLogic( aSize, MAP_100TH_MM, aMapUnit );
aSz.Width = aTmp.Width();
aSz.Height = aTmp.Height();
xObj->setVisualAreaSize( nAspect, aSz );
// re-convert aSize to 1/100th mm to avoid rounding errors in comparison below
aSize = vcl::Window::LogicToLogic( aTmp,
MapMode( aMapUnit ), aMap100 );
}
else
aSize = vcl::Window::LogicToLogic( aSize,
MapMode( aMapUnit ), aMap100 );
2000-09-18 16:07:07 +00:00
}
// Chart initialisieren ?
if ( SvtModuleOptions().IsChart() && SotExchange::IsChart( SvGlobalName( xObj->getClassID() ) ) )
lcl_ChartInit( xObj, &pViewSh->GetViewData(), OUString() );
2000-09-18 16:07:07 +00:00
ScViewData& rData = pViewSh->GetViewData();
2000-09-18 16:07:07 +00:00
Point aPnt = pViewSh->GetInsertPos();
if ( rData.GetDocument()->IsNegativePage( rData.GetTabNo() ) )
aPnt.X() -= aSize.Width(); // move position to left edge
2000-09-18 16:07:07 +00:00
Rectangle aRect (aPnt, aSize);
SdrOle2Obj* pObj = new SdrOle2Obj( aObjRef, aName, aRect);
SdrPageView* pPV = pView->GetSdrPageView();
pView->InsertObjectAtView(pObj, *pPV);
2000-09-18 16:07:07 +00:00
if ( nAspect != embed::Aspects::MSOLE_ICON )
2000-09-18 16:07:07 +00:00
{
2011-03-01 14:29:24 +01:00
// Math objects change their object size during InsertObject.
// New size must be set in SdrObject, or a wrong scale will be set at
// ActivateObject.
try
{
awt::Size aSz = xObj->getVisualAreaSize( nAspect );
Size aNewSize( aSz.Width, aSz.Height );
aNewSize = OutputDevice::LogicToLogic( aNewSize, aMapUnit, MAP_100TH_MM );
if ( aNewSize != aSize )
{
aRect.SetSize( aNewSize );
pObj->SetLogicRect( aRect );
}
}
catch( embed::NoVisualAreaSizeException& )
{}
2000-09-18 16:07:07 +00:00
}
if ( !rReq.IsAPI() )
{
// XXX Activate aus Makro ist toedlich !!! ???
if (bIsFromFile)
{
2011-03-01 14:29:24 +01:00
// Objekt ist selektiert, also Draw-Shell aktivieren
pViewShell->SetDrawShell( true );
2000-09-18 16:07:07 +00:00
}
else
{
pViewShell->ActivateObject( pObj, SVVERB_SHOW );
2000-09-18 16:07:07 +00:00
}
}
rReq.Done();
}
catch( uno::Exception& )
{
OSL_FAIL( "May need error handling here!\n" );
}
2000-09-18 16:07:07 +00:00
}
else
rReq.Ignore();
2000-09-18 16:07:07 +00:00
}
void FuInsertOLE::Activate()
{
FuPoor::Activate();
}
void FuInsertOLE::Deactivate()
{
FuPoor::Deactivate();
}
FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawView* pViewP,
2000-09-18 16:07:07 +00:00
SdrModel* pDoc, SfxRequest& rReq)
: FuPoor(pViewSh, pWin, pViewP, pDoc, rReq)
2000-09-18 16:07:07 +00:00
{
const SfxItemSet* pReqArgs = rReq.GetArgs();
if( ! rReq.IsAPI() )
rReq.Done();
if (!SvtModuleOptions().IsChart())
return;
// BM/IHA --
2000-09-18 16:07:07 +00:00
// get range
OUString aRangeString;
ScRange aPositionRange; // cell range for chart positioning
ScMarkData aMark = pViewSh->GetViewData().GetMarkData();
if( pReqArgs )
{
const SfxPoolItem* pItem;
if( pReqArgs->HasItem( FN_PARAM_5, &pItem ) )
aRangeString = OUString( static_cast<const SfxStringItem*>(pItem)->GetValue());
2000-09-18 16:07:07 +00:00
aPositionRange = pViewSh->GetViewData().GetCurPos();
}
else
{
bool bAutomaticMark = false;
if ( !aMark.IsMarked() && !aMark.IsMultiMarked() )
{
pViewSh->GetViewData().GetView()->MarkDataArea( true );
bAutomaticMark = true;
INTEGRATION: CWS chart2mst3 (1.12.10); FILE MERGED 2007/04/25 03:30:58 bm 1.12.10.33: RESYNC: (1.24-1.25); FILE MERGED 2007/04/20 10:41:20 nn 1.12.10.32: #i75307# FuInsertChart: MarkToMulti 2006/12/05 16:28:12 nn 1.12.10.31: #i71257# don't add undo action before the dialog is finished 2006/11/27 00:37:17 bm 1.12.10.30: aw024 adaptions 2006/11/24 18:24:58 bm 1.12.10.29: RESYNC: (1.23-1.24); FILE MERGED 2006/11/23 12:52:52 nn 1.12.10.28: #i71250# removed old chart code 2006/11/10 21:06:35 iha 1.12.10.27: prevent immidiate redraw in wizard and according dialogs (important for charts with many data) 2006/10/25 18:17:54 nn 1.12.10.26: allow range selection from inplace object without deactivating the object 2006/10/19 00:18:35 bm 1.12.10.25: RESYNC: (1.21-1.23); FILE MERGED 2006/10/11 15:10:11 nn 1.12.10.24: #i66867# auto-detect column/row headers 2006/08/04 14:34:01 bm 1.12.10.23: pass the document to the chart2 uno services instead of the docshell, as the shell itself is not really needed, and limits the creation of such objects unnecessarily to the ui 2006/06/24 13:04:39 iha 1.12.10.22: #i54915# chart wizard shouldn't overlap chart if possible 2006/06/22 15:42:13 nn 1.12.10.21: #i13379# default position for chart and dialog 2006/05/05 15:24:08 bm 1.12.10.20: RESYNC: (1.20-1.21); FILE MERGED 2006/05/05 14:32:41 bm 1.12.10.19: #i31098# leave draw shell after Cancel of inserting a chart 2006/05/03 15:46:49 bm 1.12.10.18: #i31098# Enable Cancel for Chart Wizard 2005/11/15 15:33:22 bm 1.12.10.17: dispose chart wizard dialog 2005/10/08 09:54:11 bm 1.12.10.16: RESYNC: (1.19-1.20); FILE MERGED 2005/09/08 11:44:48 iha 1.12.10.15: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter from calc 2005/08/15 13:09:29 bm 1.12.10.14: XDataReceiver changed 2005/08/05 12:43:19 bm 1.12.10.13: open chart creation wizard only when not called via API 2005/06/01 14:37:39 bm 1.12.10.12: Insert New Chart embedded 2005/05/17 13:01:42 bm 1.12.10.11: RESYNC: (1.18-1.19); FILE MERGED 2005/05/09 09:54:27 bm 1.12.10.10: moved chart2 API to data namespace 2005/03/17 13:45:10 bm 1.12.10.9: RESYNC: (1.16-1.18); FILE MERGED 2004/11/02 16:50:32 bm 1.12.10.8: RESYNC: (1.15-1.16); FILE MERGED 2004/08/30 18:08:08 bm 1.12.10.7: RESYNC: (1.13-1.15); FILE MERGED 2004/06/15 18:41:55 bm 1.12.10.6: RESYNC: (1.12-1.13); FILE MERGED 2004/05/05 16:34:56 iha 1.12.10.5: unmark automatic mark range; moved update call to chart 2004/04/08 12:21:47 iha 1.12.10.4: #i20344# init wizard correctly + update view 2004/04/08 09:03:14 iha 1.12.10.3: remove test code 2004/04/08 08:55:15 iha 1.12.10.2: get correct RangeString for chart 2004/04/07 22:03:58 iha 1.12.10.1: #i20344# changed chart creation process - added new chart wizard
2007-05-22 19:06:02 +00:00
}
ScMarkData aMultiMark( aMark );
aMultiMark.MarkToMulti();
ScRangeList aRanges;
aMultiMark.FillRangeListWithMarks( &aRanges, false );
OUString aStr;
ScDocument* pDocument = pViewSh->GetViewData().GetDocument();
aRanges.Format( aStr, SCR_ABS_3D, pDocument, pDocument->GetAddressConvention() );
aRangeString = aStr;
// get "total" range for positioning
if ( !aRanges.empty() )
{
aPositionRange = *aRanges[ 0 ];
for ( size_t i = 1, nCount = aRanges.size(); i < nCount; ++i )
INTEGRATION: CWS chart2mst3 (1.12.10); FILE MERGED 2007/04/25 03:30:58 bm 1.12.10.33: RESYNC: (1.24-1.25); FILE MERGED 2007/04/20 10:41:20 nn 1.12.10.32: #i75307# FuInsertChart: MarkToMulti 2006/12/05 16:28:12 nn 1.12.10.31: #i71257# don't add undo action before the dialog is finished 2006/11/27 00:37:17 bm 1.12.10.30: aw024 adaptions 2006/11/24 18:24:58 bm 1.12.10.29: RESYNC: (1.23-1.24); FILE MERGED 2006/11/23 12:52:52 nn 1.12.10.28: #i71250# removed old chart code 2006/11/10 21:06:35 iha 1.12.10.27: prevent immidiate redraw in wizard and according dialogs (important for charts with many data) 2006/10/25 18:17:54 nn 1.12.10.26: allow range selection from inplace object without deactivating the object 2006/10/19 00:18:35 bm 1.12.10.25: RESYNC: (1.21-1.23); FILE MERGED 2006/10/11 15:10:11 nn 1.12.10.24: #i66867# auto-detect column/row headers 2006/08/04 14:34:01 bm 1.12.10.23: pass the document to the chart2 uno services instead of the docshell, as the shell itself is not really needed, and limits the creation of such objects unnecessarily to the ui 2006/06/24 13:04:39 iha 1.12.10.22: #i54915# chart wizard shouldn't overlap chart if possible 2006/06/22 15:42:13 nn 1.12.10.21: #i13379# default position for chart and dialog 2006/05/05 15:24:08 bm 1.12.10.20: RESYNC: (1.20-1.21); FILE MERGED 2006/05/05 14:32:41 bm 1.12.10.19: #i31098# leave draw shell after Cancel of inserting a chart 2006/05/03 15:46:49 bm 1.12.10.18: #i31098# Enable Cancel for Chart Wizard 2005/11/15 15:33:22 bm 1.12.10.17: dispose chart wizard dialog 2005/10/08 09:54:11 bm 1.12.10.16: RESYNC: (1.19-1.20); FILE MERGED 2005/09/08 11:44:48 iha 1.12.10.15: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter from calc 2005/08/15 13:09:29 bm 1.12.10.14: XDataReceiver changed 2005/08/05 12:43:19 bm 1.12.10.13: open chart creation wizard only when not called via API 2005/06/01 14:37:39 bm 1.12.10.12: Insert New Chart embedded 2005/05/17 13:01:42 bm 1.12.10.11: RESYNC: (1.18-1.19); FILE MERGED 2005/05/09 09:54:27 bm 1.12.10.10: moved chart2 API to data namespace 2005/03/17 13:45:10 bm 1.12.10.9: RESYNC: (1.16-1.18); FILE MERGED 2004/11/02 16:50:32 bm 1.12.10.8: RESYNC: (1.15-1.16); FILE MERGED 2004/08/30 18:08:08 bm 1.12.10.7: RESYNC: (1.13-1.15); FILE MERGED 2004/06/15 18:41:55 bm 1.12.10.6: RESYNC: (1.12-1.13); FILE MERGED 2004/05/05 16:34:56 iha 1.12.10.5: unmark automatic mark range; moved update call to chart 2004/04/08 12:21:47 iha 1.12.10.4: #i20344# init wizard correctly + update view 2004/04/08 09:03:14 iha 1.12.10.3: remove test code 2004/04/08 08:55:15 iha 1.12.10.2: get correct RangeString for chart 2004/04/07 22:03:58 iha 1.12.10.1: #i20344# changed chart creation process - added new chart wizard
2007-05-22 19:06:02 +00:00
{
aPositionRange.ExtendTo( *aRanges[ i ] );
INTEGRATION: CWS chart2mst3 (1.12.10); FILE MERGED 2007/04/25 03:30:58 bm 1.12.10.33: RESYNC: (1.24-1.25); FILE MERGED 2007/04/20 10:41:20 nn 1.12.10.32: #i75307# FuInsertChart: MarkToMulti 2006/12/05 16:28:12 nn 1.12.10.31: #i71257# don't add undo action before the dialog is finished 2006/11/27 00:37:17 bm 1.12.10.30: aw024 adaptions 2006/11/24 18:24:58 bm 1.12.10.29: RESYNC: (1.23-1.24); FILE MERGED 2006/11/23 12:52:52 nn 1.12.10.28: #i71250# removed old chart code 2006/11/10 21:06:35 iha 1.12.10.27: prevent immidiate redraw in wizard and according dialogs (important for charts with many data) 2006/10/25 18:17:54 nn 1.12.10.26: allow range selection from inplace object without deactivating the object 2006/10/19 00:18:35 bm 1.12.10.25: RESYNC: (1.21-1.23); FILE MERGED 2006/10/11 15:10:11 nn 1.12.10.24: #i66867# auto-detect column/row headers 2006/08/04 14:34:01 bm 1.12.10.23: pass the document to the chart2 uno services instead of the docshell, as the shell itself is not really needed, and limits the creation of such objects unnecessarily to the ui 2006/06/24 13:04:39 iha 1.12.10.22: #i54915# chart wizard shouldn't overlap chart if possible 2006/06/22 15:42:13 nn 1.12.10.21: #i13379# default position for chart and dialog 2006/05/05 15:24:08 bm 1.12.10.20: RESYNC: (1.20-1.21); FILE MERGED 2006/05/05 14:32:41 bm 1.12.10.19: #i31098# leave draw shell after Cancel of inserting a chart 2006/05/03 15:46:49 bm 1.12.10.18: #i31098# Enable Cancel for Chart Wizard 2005/11/15 15:33:22 bm 1.12.10.17: dispose chart wizard dialog 2005/10/08 09:54:11 bm 1.12.10.16: RESYNC: (1.19-1.20); FILE MERGED 2005/09/08 11:44:48 iha 1.12.10.15: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter from calc 2005/08/15 13:09:29 bm 1.12.10.14: XDataReceiver changed 2005/08/05 12:43:19 bm 1.12.10.13: open chart creation wizard only when not called via API 2005/06/01 14:37:39 bm 1.12.10.12: Insert New Chart embedded 2005/05/17 13:01:42 bm 1.12.10.11: RESYNC: (1.18-1.19); FILE MERGED 2005/05/09 09:54:27 bm 1.12.10.10: moved chart2 API to data namespace 2005/03/17 13:45:10 bm 1.12.10.9: RESYNC: (1.16-1.18); FILE MERGED 2004/11/02 16:50:32 bm 1.12.10.8: RESYNC: (1.15-1.16); FILE MERGED 2004/08/30 18:08:08 bm 1.12.10.7: RESYNC: (1.13-1.15); FILE MERGED 2004/06/15 18:41:55 bm 1.12.10.6: RESYNC: (1.12-1.13); FILE MERGED 2004/05/05 16:34:56 iha 1.12.10.5: unmark automatic mark range; moved update call to chart 2004/04/08 12:21:47 iha 1.12.10.4: #i20344# init wizard correctly + update view 2004/04/08 09:03:14 iha 1.12.10.3: remove test code 2004/04/08 08:55:15 iha 1.12.10.2: get correct RangeString for chart 2004/04/07 22:03:58 iha 1.12.10.1: #i20344# changed chart creation process - added new chart wizard
2007-05-22 19:06:02 +00:00
}
}
INTEGRATION: CWS chart2mst3 (1.12.10); FILE MERGED 2007/04/25 03:30:58 bm 1.12.10.33: RESYNC: (1.24-1.25); FILE MERGED 2007/04/20 10:41:20 nn 1.12.10.32: #i75307# FuInsertChart: MarkToMulti 2006/12/05 16:28:12 nn 1.12.10.31: #i71257# don't add undo action before the dialog is finished 2006/11/27 00:37:17 bm 1.12.10.30: aw024 adaptions 2006/11/24 18:24:58 bm 1.12.10.29: RESYNC: (1.23-1.24); FILE MERGED 2006/11/23 12:52:52 nn 1.12.10.28: #i71250# removed old chart code 2006/11/10 21:06:35 iha 1.12.10.27: prevent immidiate redraw in wizard and according dialogs (important for charts with many data) 2006/10/25 18:17:54 nn 1.12.10.26: allow range selection from inplace object without deactivating the object 2006/10/19 00:18:35 bm 1.12.10.25: RESYNC: (1.21-1.23); FILE MERGED 2006/10/11 15:10:11 nn 1.12.10.24: #i66867# auto-detect column/row headers 2006/08/04 14:34:01 bm 1.12.10.23: pass the document to the chart2 uno services instead of the docshell, as the shell itself is not really needed, and limits the creation of such objects unnecessarily to the ui 2006/06/24 13:04:39 iha 1.12.10.22: #i54915# chart wizard shouldn't overlap chart if possible 2006/06/22 15:42:13 nn 1.12.10.21: #i13379# default position for chart and dialog 2006/05/05 15:24:08 bm 1.12.10.20: RESYNC: (1.20-1.21); FILE MERGED 2006/05/05 14:32:41 bm 1.12.10.19: #i31098# leave draw shell after Cancel of inserting a chart 2006/05/03 15:46:49 bm 1.12.10.18: #i31098# Enable Cancel for Chart Wizard 2005/11/15 15:33:22 bm 1.12.10.17: dispose chart wizard dialog 2005/10/08 09:54:11 bm 1.12.10.16: RESYNC: (1.19-1.20); FILE MERGED 2005/09/08 11:44:48 iha 1.12.10.15: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter from calc 2005/08/15 13:09:29 bm 1.12.10.14: XDataReceiver changed 2005/08/05 12:43:19 bm 1.12.10.13: open chart creation wizard only when not called via API 2005/06/01 14:37:39 bm 1.12.10.12: Insert New Chart embedded 2005/05/17 13:01:42 bm 1.12.10.11: RESYNC: (1.18-1.19); FILE MERGED 2005/05/09 09:54:27 bm 1.12.10.10: moved chart2 API to data namespace 2005/03/17 13:45:10 bm 1.12.10.9: RESYNC: (1.16-1.18); FILE MERGED 2004/11/02 16:50:32 bm 1.12.10.8: RESYNC: (1.15-1.16); FILE MERGED 2004/08/30 18:08:08 bm 1.12.10.7: RESYNC: (1.13-1.15); FILE MERGED 2004/06/15 18:41:55 bm 1.12.10.6: RESYNC: (1.12-1.13); FILE MERGED 2004/05/05 16:34:56 iha 1.12.10.5: unmark automatic mark range; moved update call to chart 2004/04/08 12:21:47 iha 1.12.10.4: #i20344# init wizard correctly + update view 2004/04/08 09:03:14 iha 1.12.10.3: remove test code 2004/04/08 08:55:15 iha 1.12.10.2: get correct RangeString for chart 2004/04/07 22:03:58 iha 1.12.10.1: #i20344# changed chart creation process - added new chart wizard
2007-05-22 19:06:02 +00:00
if(bAutomaticMark)
pViewSh->GetViewData().GetView()->Unmark();
}
INTEGRATION: CWS chart2mst3 (1.12.10); FILE MERGED 2007/04/25 03:30:58 bm 1.12.10.33: RESYNC: (1.24-1.25); FILE MERGED 2007/04/20 10:41:20 nn 1.12.10.32: #i75307# FuInsertChart: MarkToMulti 2006/12/05 16:28:12 nn 1.12.10.31: #i71257# don't add undo action before the dialog is finished 2006/11/27 00:37:17 bm 1.12.10.30: aw024 adaptions 2006/11/24 18:24:58 bm 1.12.10.29: RESYNC: (1.23-1.24); FILE MERGED 2006/11/23 12:52:52 nn 1.12.10.28: #i71250# removed old chart code 2006/11/10 21:06:35 iha 1.12.10.27: prevent immidiate redraw in wizard and according dialogs (important for charts with many data) 2006/10/25 18:17:54 nn 1.12.10.26: allow range selection from inplace object without deactivating the object 2006/10/19 00:18:35 bm 1.12.10.25: RESYNC: (1.21-1.23); FILE MERGED 2006/10/11 15:10:11 nn 1.12.10.24: #i66867# auto-detect column/row headers 2006/08/04 14:34:01 bm 1.12.10.23: pass the document to the chart2 uno services instead of the docshell, as the shell itself is not really needed, and limits the creation of such objects unnecessarily to the ui 2006/06/24 13:04:39 iha 1.12.10.22: #i54915# chart wizard shouldn't overlap chart if possible 2006/06/22 15:42:13 nn 1.12.10.21: #i13379# default position for chart and dialog 2006/05/05 15:24:08 bm 1.12.10.20: RESYNC: (1.20-1.21); FILE MERGED 2006/05/05 14:32:41 bm 1.12.10.19: #i31098# leave draw shell after Cancel of inserting a chart 2006/05/03 15:46:49 bm 1.12.10.18: #i31098# Enable Cancel for Chart Wizard 2005/11/15 15:33:22 bm 1.12.10.17: dispose chart wizard dialog 2005/10/08 09:54:11 bm 1.12.10.16: RESYNC: (1.19-1.20); FILE MERGED 2005/09/08 11:44:48 iha 1.12.10.15: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter from calc 2005/08/15 13:09:29 bm 1.12.10.14: XDataReceiver changed 2005/08/05 12:43:19 bm 1.12.10.13: open chart creation wizard only when not called via API 2005/06/01 14:37:39 bm 1.12.10.12: Insert New Chart embedded 2005/05/17 13:01:42 bm 1.12.10.11: RESYNC: (1.18-1.19); FILE MERGED 2005/05/09 09:54:27 bm 1.12.10.10: moved chart2 API to data namespace 2005/03/17 13:45:10 bm 1.12.10.9: RESYNC: (1.16-1.18); FILE MERGED 2004/11/02 16:50:32 bm 1.12.10.8: RESYNC: (1.15-1.16); FILE MERGED 2004/08/30 18:08:08 bm 1.12.10.7: RESYNC: (1.13-1.15); FILE MERGED 2004/06/15 18:41:55 bm 1.12.10.6: RESYNC: (1.12-1.13); FILE MERGED 2004/05/05 16:34:56 iha 1.12.10.5: unmark automatic mark range; moved update call to chart 2004/04/08 12:21:47 iha 1.12.10.4: #i20344# init wizard correctly + update view 2004/04/08 09:03:14 iha 1.12.10.3: remove test code 2004/04/08 08:55:15 iha 1.12.10.2: get correct RangeString for chart 2004/04/07 22:03:58 iha 1.12.10.1: #i20344# changed chart creation process - added new chart wizard
2007-05-22 19:06:02 +00:00
// adapted old code
pView->UnmarkAll();
INTEGRATION: CWS chart2mst3 (1.12.10); FILE MERGED 2007/04/25 03:30:58 bm 1.12.10.33: RESYNC: (1.24-1.25); FILE MERGED 2007/04/20 10:41:20 nn 1.12.10.32: #i75307# FuInsertChart: MarkToMulti 2006/12/05 16:28:12 nn 1.12.10.31: #i71257# don't add undo action before the dialog is finished 2006/11/27 00:37:17 bm 1.12.10.30: aw024 adaptions 2006/11/24 18:24:58 bm 1.12.10.29: RESYNC: (1.23-1.24); FILE MERGED 2006/11/23 12:52:52 nn 1.12.10.28: #i71250# removed old chart code 2006/11/10 21:06:35 iha 1.12.10.27: prevent immidiate redraw in wizard and according dialogs (important for charts with many data) 2006/10/25 18:17:54 nn 1.12.10.26: allow range selection from inplace object without deactivating the object 2006/10/19 00:18:35 bm 1.12.10.25: RESYNC: (1.21-1.23); FILE MERGED 2006/10/11 15:10:11 nn 1.12.10.24: #i66867# auto-detect column/row headers 2006/08/04 14:34:01 bm 1.12.10.23: pass the document to the chart2 uno services instead of the docshell, as the shell itself is not really needed, and limits the creation of such objects unnecessarily to the ui 2006/06/24 13:04:39 iha 1.12.10.22: #i54915# chart wizard shouldn't overlap chart if possible 2006/06/22 15:42:13 nn 1.12.10.21: #i13379# default position for chart and dialog 2006/05/05 15:24:08 bm 1.12.10.20: RESYNC: (1.20-1.21); FILE MERGED 2006/05/05 14:32:41 bm 1.12.10.19: #i31098# leave draw shell after Cancel of inserting a chart 2006/05/03 15:46:49 bm 1.12.10.18: #i31098# Enable Cancel for Chart Wizard 2005/11/15 15:33:22 bm 1.12.10.17: dispose chart wizard dialog 2005/10/08 09:54:11 bm 1.12.10.16: RESYNC: (1.19-1.20); FILE MERGED 2005/09/08 11:44:48 iha 1.12.10.15: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter from calc 2005/08/15 13:09:29 bm 1.12.10.14: XDataReceiver changed 2005/08/05 12:43:19 bm 1.12.10.13: open chart creation wizard only when not called via API 2005/06/01 14:37:39 bm 1.12.10.12: Insert New Chart embedded 2005/05/17 13:01:42 bm 1.12.10.11: RESYNC: (1.18-1.19); FILE MERGED 2005/05/09 09:54:27 bm 1.12.10.10: moved chart2 API to data namespace 2005/03/17 13:45:10 bm 1.12.10.9: RESYNC: (1.16-1.18); FILE MERGED 2004/11/02 16:50:32 bm 1.12.10.8: RESYNC: (1.15-1.16); FILE MERGED 2004/08/30 18:08:08 bm 1.12.10.7: RESYNC: (1.13-1.15); FILE MERGED 2004/06/15 18:41:55 bm 1.12.10.6: RESYNC: (1.12-1.13); FILE MERGED 2004/05/05 16:34:56 iha 1.12.10.5: unmark automatic mark range; moved update call to chart 2004/04/08 12:21:47 iha 1.12.10.4: #i20344# init wizard correctly + update view 2004/04/08 09:03:14 iha 1.12.10.3: remove test code 2004/04/08 08:55:15 iha 1.12.10.2: get correct RangeString for chart 2004/04/07 22:03:58 iha 1.12.10.1: #i20344# changed chart creation process - added new chart wizard
2007-05-22 19:06:02 +00:00
OUString aName;
const sal_Int64 nAspect = embed::Aspects::MSOLE_CONTENT;
2000-09-18 16:07:07 +00:00
uno::Reference < embed::XEmbeddedObject > xObj =
pViewShell->GetObjectShell()->GetEmbeddedObjectContainer().CreateEmbeddedObject( SvGlobalName( SO3_SCH_CLASSID_60 ).GetByteSequence(), aName );
uno::Reference< ::com::sun::star::chart2::data::XDataReceiver > xReceiver;
uno::Reference< embed::XComponentSupplier > xCompSupp( xObj, uno::UNO_QUERY );
if( xCompSupp.is())
xReceiver.set( xCompSupp->getComponent(), uno::UNO_QUERY );
INTEGRATION: CWS chart2mst3 (1.12.10); FILE MERGED 2007/04/25 03:30:58 bm 1.12.10.33: RESYNC: (1.24-1.25); FILE MERGED 2007/04/20 10:41:20 nn 1.12.10.32: #i75307# FuInsertChart: MarkToMulti 2006/12/05 16:28:12 nn 1.12.10.31: #i71257# don't add undo action before the dialog is finished 2006/11/27 00:37:17 bm 1.12.10.30: aw024 adaptions 2006/11/24 18:24:58 bm 1.12.10.29: RESYNC: (1.23-1.24); FILE MERGED 2006/11/23 12:52:52 nn 1.12.10.28: #i71250# removed old chart code 2006/11/10 21:06:35 iha 1.12.10.27: prevent immidiate redraw in wizard and according dialogs (important for charts with many data) 2006/10/25 18:17:54 nn 1.12.10.26: allow range selection from inplace object without deactivating the object 2006/10/19 00:18:35 bm 1.12.10.25: RESYNC: (1.21-1.23); FILE MERGED 2006/10/11 15:10:11 nn 1.12.10.24: #i66867# auto-detect column/row headers 2006/08/04 14:34:01 bm 1.12.10.23: pass the document to the chart2 uno services instead of the docshell, as the shell itself is not really needed, and limits the creation of such objects unnecessarily to the ui 2006/06/24 13:04:39 iha 1.12.10.22: #i54915# chart wizard shouldn't overlap chart if possible 2006/06/22 15:42:13 nn 1.12.10.21: #i13379# default position for chart and dialog 2006/05/05 15:24:08 bm 1.12.10.20: RESYNC: (1.20-1.21); FILE MERGED 2006/05/05 14:32:41 bm 1.12.10.19: #i31098# leave draw shell after Cancel of inserting a chart 2006/05/03 15:46:49 bm 1.12.10.18: #i31098# Enable Cancel for Chart Wizard 2005/11/15 15:33:22 bm 1.12.10.17: dispose chart wizard dialog 2005/10/08 09:54:11 bm 1.12.10.16: RESYNC: (1.19-1.20); FILE MERGED 2005/09/08 11:44:48 iha 1.12.10.15: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter from calc 2005/08/15 13:09:29 bm 1.12.10.14: XDataReceiver changed 2005/08/05 12:43:19 bm 1.12.10.13: open chart creation wizard only when not called via API 2005/06/01 14:37:39 bm 1.12.10.12: Insert New Chart embedded 2005/05/17 13:01:42 bm 1.12.10.11: RESYNC: (1.18-1.19); FILE MERGED 2005/05/09 09:54:27 bm 1.12.10.10: moved chart2 API to data namespace 2005/03/17 13:45:10 bm 1.12.10.9: RESYNC: (1.16-1.18); FILE MERGED 2004/11/02 16:50:32 bm 1.12.10.8: RESYNC: (1.15-1.16); FILE MERGED 2004/08/30 18:08:08 bm 1.12.10.7: RESYNC: (1.13-1.15); FILE MERGED 2004/06/15 18:41:55 bm 1.12.10.6: RESYNC: (1.12-1.13); FILE MERGED 2004/05/05 16:34:56 iha 1.12.10.5: unmark automatic mark range; moved update call to chart 2004/04/08 12:21:47 iha 1.12.10.4: #i20344# init wizard correctly + update view 2004/04/08 09:03:14 iha 1.12.10.3: remove test code 2004/04/08 08:55:15 iha 1.12.10.2: get correct RangeString for chart 2004/04/07 22:03:58 iha 1.12.10.1: #i20344# changed chart creation process - added new chart wizard
2007-05-22 19:06:02 +00:00
uno::Reference<chart2::XChartDocument> xChartDoc(xReceiver, uno::UNO_QUERY);
if (xChartDoc.is())
xChartDoc->createDefaultChart();
// lock the model to suppress any internal updates
uno::Reference< frame::XModel > xChartModel( xReceiver, uno::UNO_QUERY );
if( xChartModel.is() )
xChartModel->lockControllers();
INTEGRATION: CWS chart2mst3 (1.12.10); FILE MERGED 2007/04/25 03:30:58 bm 1.12.10.33: RESYNC: (1.24-1.25); FILE MERGED 2007/04/20 10:41:20 nn 1.12.10.32: #i75307# FuInsertChart: MarkToMulti 2006/12/05 16:28:12 nn 1.12.10.31: #i71257# don't add undo action before the dialog is finished 2006/11/27 00:37:17 bm 1.12.10.30: aw024 adaptions 2006/11/24 18:24:58 bm 1.12.10.29: RESYNC: (1.23-1.24); FILE MERGED 2006/11/23 12:52:52 nn 1.12.10.28: #i71250# removed old chart code 2006/11/10 21:06:35 iha 1.12.10.27: prevent immidiate redraw in wizard and according dialogs (important for charts with many data) 2006/10/25 18:17:54 nn 1.12.10.26: allow range selection from inplace object without deactivating the object 2006/10/19 00:18:35 bm 1.12.10.25: RESYNC: (1.21-1.23); FILE MERGED 2006/10/11 15:10:11 nn 1.12.10.24: #i66867# auto-detect column/row headers 2006/08/04 14:34:01 bm 1.12.10.23: pass the document to the chart2 uno services instead of the docshell, as the shell itself is not really needed, and limits the creation of such objects unnecessarily to the ui 2006/06/24 13:04:39 iha 1.12.10.22: #i54915# chart wizard shouldn't overlap chart if possible 2006/06/22 15:42:13 nn 1.12.10.21: #i13379# default position for chart and dialog 2006/05/05 15:24:08 bm 1.12.10.20: RESYNC: (1.20-1.21); FILE MERGED 2006/05/05 14:32:41 bm 1.12.10.19: #i31098# leave draw shell after Cancel of inserting a chart 2006/05/03 15:46:49 bm 1.12.10.18: #i31098# Enable Cancel for Chart Wizard 2005/11/15 15:33:22 bm 1.12.10.17: dispose chart wizard dialog 2005/10/08 09:54:11 bm 1.12.10.16: RESYNC: (1.19-1.20); FILE MERGED 2005/09/08 11:44:48 iha 1.12.10.15: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter from calc 2005/08/15 13:09:29 bm 1.12.10.14: XDataReceiver changed 2005/08/05 12:43:19 bm 1.12.10.13: open chart creation wizard only when not called via API 2005/06/01 14:37:39 bm 1.12.10.12: Insert New Chart embedded 2005/05/17 13:01:42 bm 1.12.10.11: RESYNC: (1.18-1.19); FILE MERGED 2005/05/09 09:54:27 bm 1.12.10.10: moved chart2 API to data namespace 2005/03/17 13:45:10 bm 1.12.10.9: RESYNC: (1.16-1.18); FILE MERGED 2004/11/02 16:50:32 bm 1.12.10.8: RESYNC: (1.15-1.16); FILE MERGED 2004/08/30 18:08:08 bm 1.12.10.7: RESYNC: (1.13-1.15); FILE MERGED 2004/06/15 18:41:55 bm 1.12.10.6: RESYNC: (1.12-1.13); FILE MERGED 2004/05/05 16:34:56 iha 1.12.10.5: unmark automatic mark range; moved update call to chart 2004/04/08 12:21:47 iha 1.12.10.4: #i20344# init wizard correctly + update view 2004/04/08 09:03:14 iha 1.12.10.3: remove test code 2004/04/08 08:55:15 iha 1.12.10.2: get correct RangeString for chart 2004/04/07 22:03:58 iha 1.12.10.1: #i20344# changed chart creation process - added new chart wizard
2007-05-22 19:06:02 +00:00
ScRangeListRef aDummy;
Rectangle aMarkDest;
SCTAB nMarkTab;
bool bDrawRect = pViewShell->GetChartArea( aDummy, aMarkDest, nMarkTab );
INTEGRATION: CWS chart2mst3 (1.12.10); FILE MERGED 2007/04/25 03:30:58 bm 1.12.10.33: RESYNC: (1.24-1.25); FILE MERGED 2007/04/20 10:41:20 nn 1.12.10.32: #i75307# FuInsertChart: MarkToMulti 2006/12/05 16:28:12 nn 1.12.10.31: #i71257# don't add undo action before the dialog is finished 2006/11/27 00:37:17 bm 1.12.10.30: aw024 adaptions 2006/11/24 18:24:58 bm 1.12.10.29: RESYNC: (1.23-1.24); FILE MERGED 2006/11/23 12:52:52 nn 1.12.10.28: #i71250# removed old chart code 2006/11/10 21:06:35 iha 1.12.10.27: prevent immidiate redraw in wizard and according dialogs (important for charts with many data) 2006/10/25 18:17:54 nn 1.12.10.26: allow range selection from inplace object without deactivating the object 2006/10/19 00:18:35 bm 1.12.10.25: RESYNC: (1.21-1.23); FILE MERGED 2006/10/11 15:10:11 nn 1.12.10.24: #i66867# auto-detect column/row headers 2006/08/04 14:34:01 bm 1.12.10.23: pass the document to the chart2 uno services instead of the docshell, as the shell itself is not really needed, and limits the creation of such objects unnecessarily to the ui 2006/06/24 13:04:39 iha 1.12.10.22: #i54915# chart wizard shouldn't overlap chart if possible 2006/06/22 15:42:13 nn 1.12.10.21: #i13379# default position for chart and dialog 2006/05/05 15:24:08 bm 1.12.10.20: RESYNC: (1.20-1.21); FILE MERGED 2006/05/05 14:32:41 bm 1.12.10.19: #i31098# leave draw shell after Cancel of inserting a chart 2006/05/03 15:46:49 bm 1.12.10.18: #i31098# Enable Cancel for Chart Wizard 2005/11/15 15:33:22 bm 1.12.10.17: dispose chart wizard dialog 2005/10/08 09:54:11 bm 1.12.10.16: RESYNC: (1.19-1.20); FILE MERGED 2005/09/08 11:44:48 iha 1.12.10.15: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter from calc 2005/08/15 13:09:29 bm 1.12.10.14: XDataReceiver changed 2005/08/05 12:43:19 bm 1.12.10.13: open chart creation wizard only when not called via API 2005/06/01 14:37:39 bm 1.12.10.12: Insert New Chart embedded 2005/05/17 13:01:42 bm 1.12.10.11: RESYNC: (1.18-1.19); FILE MERGED 2005/05/09 09:54:27 bm 1.12.10.10: moved chart2 API to data namespace 2005/03/17 13:45:10 bm 1.12.10.9: RESYNC: (1.16-1.18); FILE MERGED 2004/11/02 16:50:32 bm 1.12.10.8: RESYNC: (1.15-1.16); FILE MERGED 2004/08/30 18:08:08 bm 1.12.10.7: RESYNC: (1.13-1.15); FILE MERGED 2004/06/15 18:41:55 bm 1.12.10.6: RESYNC: (1.12-1.13); FILE MERGED 2004/05/05 16:34:56 iha 1.12.10.5: unmark automatic mark range; moved update call to chart 2004/04/08 12:21:47 iha 1.12.10.4: #i20344# init wizard correctly + update view 2004/04/08 09:03:14 iha 1.12.10.3: remove test code 2004/04/08 08:55:15 iha 1.12.10.2: get correct RangeString for chart 2004/04/07 22:03:58 iha 1.12.10.1: #i20344# changed chart creation process - added new chart wizard
2007-05-22 19:06:02 +00:00
// Objekt-Groesse
awt::Size aSz = xObj->getVisualAreaSize( nAspect );
Size aSize( aSz.Width, aSz.Height );
INTEGRATION: CWS chart2mst3 (1.12.10); FILE MERGED 2007/04/25 03:30:58 bm 1.12.10.33: RESYNC: (1.24-1.25); FILE MERGED 2007/04/20 10:41:20 nn 1.12.10.32: #i75307# FuInsertChart: MarkToMulti 2006/12/05 16:28:12 nn 1.12.10.31: #i71257# don't add undo action before the dialog is finished 2006/11/27 00:37:17 bm 1.12.10.30: aw024 adaptions 2006/11/24 18:24:58 bm 1.12.10.29: RESYNC: (1.23-1.24); FILE MERGED 2006/11/23 12:52:52 nn 1.12.10.28: #i71250# removed old chart code 2006/11/10 21:06:35 iha 1.12.10.27: prevent immidiate redraw in wizard and according dialogs (important for charts with many data) 2006/10/25 18:17:54 nn 1.12.10.26: allow range selection from inplace object without deactivating the object 2006/10/19 00:18:35 bm 1.12.10.25: RESYNC: (1.21-1.23); FILE MERGED 2006/10/11 15:10:11 nn 1.12.10.24: #i66867# auto-detect column/row headers 2006/08/04 14:34:01 bm 1.12.10.23: pass the document to the chart2 uno services instead of the docshell, as the shell itself is not really needed, and limits the creation of such objects unnecessarily to the ui 2006/06/24 13:04:39 iha 1.12.10.22: #i54915# chart wizard shouldn't overlap chart if possible 2006/06/22 15:42:13 nn 1.12.10.21: #i13379# default position for chart and dialog 2006/05/05 15:24:08 bm 1.12.10.20: RESYNC: (1.20-1.21); FILE MERGED 2006/05/05 14:32:41 bm 1.12.10.19: #i31098# leave draw shell after Cancel of inserting a chart 2006/05/03 15:46:49 bm 1.12.10.18: #i31098# Enable Cancel for Chart Wizard 2005/11/15 15:33:22 bm 1.12.10.17: dispose chart wizard dialog 2005/10/08 09:54:11 bm 1.12.10.16: RESYNC: (1.19-1.20); FILE MERGED 2005/09/08 11:44:48 iha 1.12.10.15: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter from calc 2005/08/15 13:09:29 bm 1.12.10.14: XDataReceiver changed 2005/08/05 12:43:19 bm 1.12.10.13: open chart creation wizard only when not called via API 2005/06/01 14:37:39 bm 1.12.10.12: Insert New Chart embedded 2005/05/17 13:01:42 bm 1.12.10.11: RESYNC: (1.18-1.19); FILE MERGED 2005/05/09 09:54:27 bm 1.12.10.10: moved chart2 API to data namespace 2005/03/17 13:45:10 bm 1.12.10.9: RESYNC: (1.16-1.18); FILE MERGED 2004/11/02 16:50:32 bm 1.12.10.8: RESYNC: (1.15-1.16); FILE MERGED 2004/08/30 18:08:08 bm 1.12.10.7: RESYNC: (1.13-1.15); FILE MERGED 2004/06/15 18:41:55 bm 1.12.10.6: RESYNC: (1.12-1.13); FILE MERGED 2004/05/05 16:34:56 iha 1.12.10.5: unmark automatic mark range; moved update call to chart 2004/04/08 12:21:47 iha 1.12.10.4: #i20344# init wizard correctly + update view 2004/04/08 09:03:14 iha 1.12.10.3: remove test code 2004/04/08 08:55:15 iha 1.12.10.2: get correct RangeString for chart 2004/04/07 22:03:58 iha 1.12.10.1: #i20344# changed chart creation process - added new chart wizard
2007-05-22 19:06:02 +00:00
MapUnit aMapUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( xObj->getMapUnit( nAspect ) );
INTEGRATION: CWS chart2mst3 (1.12.10); FILE MERGED 2007/04/25 03:30:58 bm 1.12.10.33: RESYNC: (1.24-1.25); FILE MERGED 2007/04/20 10:41:20 nn 1.12.10.32: #i75307# FuInsertChart: MarkToMulti 2006/12/05 16:28:12 nn 1.12.10.31: #i71257# don't add undo action before the dialog is finished 2006/11/27 00:37:17 bm 1.12.10.30: aw024 adaptions 2006/11/24 18:24:58 bm 1.12.10.29: RESYNC: (1.23-1.24); FILE MERGED 2006/11/23 12:52:52 nn 1.12.10.28: #i71250# removed old chart code 2006/11/10 21:06:35 iha 1.12.10.27: prevent immidiate redraw in wizard and according dialogs (important for charts with many data) 2006/10/25 18:17:54 nn 1.12.10.26: allow range selection from inplace object without deactivating the object 2006/10/19 00:18:35 bm 1.12.10.25: RESYNC: (1.21-1.23); FILE MERGED 2006/10/11 15:10:11 nn 1.12.10.24: #i66867# auto-detect column/row headers 2006/08/04 14:34:01 bm 1.12.10.23: pass the document to the chart2 uno services instead of the docshell, as the shell itself is not really needed, and limits the creation of such objects unnecessarily to the ui 2006/06/24 13:04:39 iha 1.12.10.22: #i54915# chart wizard shouldn't overlap chart if possible 2006/06/22 15:42:13 nn 1.12.10.21: #i13379# default position for chart and dialog 2006/05/05 15:24:08 bm 1.12.10.20: RESYNC: (1.20-1.21); FILE MERGED 2006/05/05 14:32:41 bm 1.12.10.19: #i31098# leave draw shell after Cancel of inserting a chart 2006/05/03 15:46:49 bm 1.12.10.18: #i31098# Enable Cancel for Chart Wizard 2005/11/15 15:33:22 bm 1.12.10.17: dispose chart wizard dialog 2005/10/08 09:54:11 bm 1.12.10.16: RESYNC: (1.19-1.20); FILE MERGED 2005/09/08 11:44:48 iha 1.12.10.15: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter from calc 2005/08/15 13:09:29 bm 1.12.10.14: XDataReceiver changed 2005/08/05 12:43:19 bm 1.12.10.13: open chart creation wizard only when not called via API 2005/06/01 14:37:39 bm 1.12.10.12: Insert New Chart embedded 2005/05/17 13:01:42 bm 1.12.10.11: RESYNC: (1.18-1.19); FILE MERGED 2005/05/09 09:54:27 bm 1.12.10.10: moved chart2 API to data namespace 2005/03/17 13:45:10 bm 1.12.10.9: RESYNC: (1.16-1.18); FILE MERGED 2004/11/02 16:50:32 bm 1.12.10.8: RESYNC: (1.15-1.16); FILE MERGED 2004/08/30 18:08:08 bm 1.12.10.7: RESYNC: (1.13-1.15); FILE MERGED 2004/06/15 18:41:55 bm 1.12.10.6: RESYNC: (1.12-1.13); FILE MERGED 2004/05/05 16:34:56 iha 1.12.10.5: unmark automatic mark range; moved update call to chart 2004/04/08 12:21:47 iha 1.12.10.4: #i20344# init wizard correctly + update view 2004/04/08 09:03:14 iha 1.12.10.3: remove test code 2004/04/08 08:55:15 iha 1.12.10.2: get correct RangeString for chart 2004/04/07 22:03:58 iha 1.12.10.1: #i20344# changed chart creation process - added new chart wizard
2007-05-22 19:06:02 +00:00
bool bSizeCh = false;
if (bDrawRect && !aMarkDest.IsEmpty())
{
aSize = aMarkDest.GetSize();
bSizeCh = true;
}
if (aSize.Height() <= 0 || aSize.Width() <= 0)
{
aSize.Width() = 5000;
aSize.Height() = 5000;
bSizeCh = true;
}
if (bSizeCh)
{
aSize = vcl::Window::LogicToLogic( aSize, MapMode( MAP_100TH_MM ), MapMode( aMapUnit ) );
aSz.Width = aSize.Width();
aSz.Height = aSize.Height();
xObj->setVisualAreaSize( nAspect, aSz );
}
INTEGRATION: CWS chart2mst3 (1.12.10); FILE MERGED 2007/04/25 03:30:58 bm 1.12.10.33: RESYNC: (1.24-1.25); FILE MERGED 2007/04/20 10:41:20 nn 1.12.10.32: #i75307# FuInsertChart: MarkToMulti 2006/12/05 16:28:12 nn 1.12.10.31: #i71257# don't add undo action before the dialog is finished 2006/11/27 00:37:17 bm 1.12.10.30: aw024 adaptions 2006/11/24 18:24:58 bm 1.12.10.29: RESYNC: (1.23-1.24); FILE MERGED 2006/11/23 12:52:52 nn 1.12.10.28: #i71250# removed old chart code 2006/11/10 21:06:35 iha 1.12.10.27: prevent immidiate redraw in wizard and according dialogs (important for charts with many data) 2006/10/25 18:17:54 nn 1.12.10.26: allow range selection from inplace object without deactivating the object 2006/10/19 00:18:35 bm 1.12.10.25: RESYNC: (1.21-1.23); FILE MERGED 2006/10/11 15:10:11 nn 1.12.10.24: #i66867# auto-detect column/row headers 2006/08/04 14:34:01 bm 1.12.10.23: pass the document to the chart2 uno services instead of the docshell, as the shell itself is not really needed, and limits the creation of such objects unnecessarily to the ui 2006/06/24 13:04:39 iha 1.12.10.22: #i54915# chart wizard shouldn't overlap chart if possible 2006/06/22 15:42:13 nn 1.12.10.21: #i13379# default position for chart and dialog 2006/05/05 15:24:08 bm 1.12.10.20: RESYNC: (1.20-1.21); FILE MERGED 2006/05/05 14:32:41 bm 1.12.10.19: #i31098# leave draw shell after Cancel of inserting a chart 2006/05/03 15:46:49 bm 1.12.10.18: #i31098# Enable Cancel for Chart Wizard 2005/11/15 15:33:22 bm 1.12.10.17: dispose chart wizard dialog 2005/10/08 09:54:11 bm 1.12.10.16: RESYNC: (1.19-1.20); FILE MERGED 2005/09/08 11:44:48 iha 1.12.10.15: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter from calc 2005/08/15 13:09:29 bm 1.12.10.14: XDataReceiver changed 2005/08/05 12:43:19 bm 1.12.10.13: open chart creation wizard only when not called via API 2005/06/01 14:37:39 bm 1.12.10.12: Insert New Chart embedded 2005/05/17 13:01:42 bm 1.12.10.11: RESYNC: (1.18-1.19); FILE MERGED 2005/05/09 09:54:27 bm 1.12.10.10: moved chart2 API to data namespace 2005/03/17 13:45:10 bm 1.12.10.9: RESYNC: (1.16-1.18); FILE MERGED 2004/11/02 16:50:32 bm 1.12.10.8: RESYNC: (1.15-1.16); FILE MERGED 2004/08/30 18:08:08 bm 1.12.10.7: RESYNC: (1.13-1.15); FILE MERGED 2004/06/15 18:41:55 bm 1.12.10.6: RESYNC: (1.12-1.13); FILE MERGED 2004/05/05 16:34:56 iha 1.12.10.5: unmark automatic mark range; moved update call to chart 2004/04/08 12:21:47 iha 1.12.10.4: #i20344# init wizard correctly + update view 2004/04/08 09:03:14 iha 1.12.10.3: remove test code 2004/04/08 08:55:15 iha 1.12.10.2: get correct RangeString for chart 2004/04/07 22:03:58 iha 1.12.10.1: #i20344# changed chart creation process - added new chart wizard
2007-05-22 19:06:02 +00:00
ScViewData& rData = pViewSh->GetViewData();
ScDocShell* pScDocSh = rData.GetDocShell();
ScDocument& rScDoc = pScDocSh->GetDocument();
bool bUndo (rScDoc.IsUndoEnabled());
if( pReqArgs )
{
const SfxPoolItem* pItem;
sal_uInt16 nToTable = 0;
INTEGRATION: CWS chart2mst3 (1.12.10); FILE MERGED 2007/04/25 03:30:58 bm 1.12.10.33: RESYNC: (1.24-1.25); FILE MERGED 2007/04/20 10:41:20 nn 1.12.10.32: #i75307# FuInsertChart: MarkToMulti 2006/12/05 16:28:12 nn 1.12.10.31: #i71257# don't add undo action before the dialog is finished 2006/11/27 00:37:17 bm 1.12.10.30: aw024 adaptions 2006/11/24 18:24:58 bm 1.12.10.29: RESYNC: (1.23-1.24); FILE MERGED 2006/11/23 12:52:52 nn 1.12.10.28: #i71250# removed old chart code 2006/11/10 21:06:35 iha 1.12.10.27: prevent immidiate redraw in wizard and according dialogs (important for charts with many data) 2006/10/25 18:17:54 nn 1.12.10.26: allow range selection from inplace object without deactivating the object 2006/10/19 00:18:35 bm 1.12.10.25: RESYNC: (1.21-1.23); FILE MERGED 2006/10/11 15:10:11 nn 1.12.10.24: #i66867# auto-detect column/row headers 2006/08/04 14:34:01 bm 1.12.10.23: pass the document to the chart2 uno services instead of the docshell, as the shell itself is not really needed, and limits the creation of such objects unnecessarily to the ui 2006/06/24 13:04:39 iha 1.12.10.22: #i54915# chart wizard shouldn't overlap chart if possible 2006/06/22 15:42:13 nn 1.12.10.21: #i13379# default position for chart and dialog 2006/05/05 15:24:08 bm 1.12.10.20: RESYNC: (1.20-1.21); FILE MERGED 2006/05/05 14:32:41 bm 1.12.10.19: #i31098# leave draw shell after Cancel of inserting a chart 2006/05/03 15:46:49 bm 1.12.10.18: #i31098# Enable Cancel for Chart Wizard 2005/11/15 15:33:22 bm 1.12.10.17: dispose chart wizard dialog 2005/10/08 09:54:11 bm 1.12.10.16: RESYNC: (1.19-1.20); FILE MERGED 2005/09/08 11:44:48 iha 1.12.10.15: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter from calc 2005/08/15 13:09:29 bm 1.12.10.14: XDataReceiver changed 2005/08/05 12:43:19 bm 1.12.10.13: open chart creation wizard only when not called via API 2005/06/01 14:37:39 bm 1.12.10.12: Insert New Chart embedded 2005/05/17 13:01:42 bm 1.12.10.11: RESYNC: (1.18-1.19); FILE MERGED 2005/05/09 09:54:27 bm 1.12.10.10: moved chart2 API to data namespace 2005/03/17 13:45:10 bm 1.12.10.9: RESYNC: (1.16-1.18); FILE MERGED 2004/11/02 16:50:32 bm 1.12.10.8: RESYNC: (1.15-1.16); FILE MERGED 2004/08/30 18:08:08 bm 1.12.10.7: RESYNC: (1.13-1.15); FILE MERGED 2004/06/15 18:41:55 bm 1.12.10.6: RESYNC: (1.12-1.13); FILE MERGED 2004/05/05 16:34:56 iha 1.12.10.5: unmark automatic mark range; moved update call to chart 2004/04/08 12:21:47 iha 1.12.10.4: #i20344# init wizard correctly + update view 2004/04/08 09:03:14 iha 1.12.10.3: remove test code 2004/04/08 08:55:15 iha 1.12.10.2: get correct RangeString for chart 2004/04/07 22:03:58 iha 1.12.10.1: #i20344# changed chart creation process - added new chart wizard
2007-05-22 19:06:02 +00:00
if( pReqArgs->HasItem( FN_PARAM_4, &pItem ) )
INTEGRATION: CWS chart2mst3 (1.12.10); FILE MERGED 2007/04/25 03:30:58 bm 1.12.10.33: RESYNC: (1.24-1.25); FILE MERGED 2007/04/20 10:41:20 nn 1.12.10.32: #i75307# FuInsertChart: MarkToMulti 2006/12/05 16:28:12 nn 1.12.10.31: #i71257# don't add undo action before the dialog is finished 2006/11/27 00:37:17 bm 1.12.10.30: aw024 adaptions 2006/11/24 18:24:58 bm 1.12.10.29: RESYNC: (1.23-1.24); FILE MERGED 2006/11/23 12:52:52 nn 1.12.10.28: #i71250# removed old chart code 2006/11/10 21:06:35 iha 1.12.10.27: prevent immidiate redraw in wizard and according dialogs (important for charts with many data) 2006/10/25 18:17:54 nn 1.12.10.26: allow range selection from inplace object without deactivating the object 2006/10/19 00:18:35 bm 1.12.10.25: RESYNC: (1.21-1.23); FILE MERGED 2006/10/11 15:10:11 nn 1.12.10.24: #i66867# auto-detect column/row headers 2006/08/04 14:34:01 bm 1.12.10.23: pass the document to the chart2 uno services instead of the docshell, as the shell itself is not really needed, and limits the creation of such objects unnecessarily to the ui 2006/06/24 13:04:39 iha 1.12.10.22: #i54915# chart wizard shouldn't overlap chart if possible 2006/06/22 15:42:13 nn 1.12.10.21: #i13379# default position for chart and dialog 2006/05/05 15:24:08 bm 1.12.10.20: RESYNC: (1.20-1.21); FILE MERGED 2006/05/05 14:32:41 bm 1.12.10.19: #i31098# leave draw shell after Cancel of inserting a chart 2006/05/03 15:46:49 bm 1.12.10.18: #i31098# Enable Cancel for Chart Wizard 2005/11/15 15:33:22 bm 1.12.10.17: dispose chart wizard dialog 2005/10/08 09:54:11 bm 1.12.10.16: RESYNC: (1.19-1.20); FILE MERGED 2005/09/08 11:44:48 iha 1.12.10.15: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter from calc 2005/08/15 13:09:29 bm 1.12.10.14: XDataReceiver changed 2005/08/05 12:43:19 bm 1.12.10.13: open chart creation wizard only when not called via API 2005/06/01 14:37:39 bm 1.12.10.12: Insert New Chart embedded 2005/05/17 13:01:42 bm 1.12.10.11: RESYNC: (1.18-1.19); FILE MERGED 2005/05/09 09:54:27 bm 1.12.10.10: moved chart2 API to data namespace 2005/03/17 13:45:10 bm 1.12.10.9: RESYNC: (1.16-1.18); FILE MERGED 2004/11/02 16:50:32 bm 1.12.10.8: RESYNC: (1.15-1.16); FILE MERGED 2004/08/30 18:08:08 bm 1.12.10.7: RESYNC: (1.13-1.15); FILE MERGED 2004/06/15 18:41:55 bm 1.12.10.6: RESYNC: (1.12-1.13); FILE MERGED 2004/05/05 16:34:56 iha 1.12.10.5: unmark automatic mark range; moved update call to chart 2004/04/08 12:21:47 iha 1.12.10.4: #i20344# init wizard correctly + update view 2004/04/08 09:03:14 iha 1.12.10.3: remove test code 2004/04/08 08:55:15 iha 1.12.10.2: get correct RangeString for chart 2004/04/07 22:03:58 iha 1.12.10.1: #i20344# changed chart creation process - added new chart wizard
2007-05-22 19:06:02 +00:00
{
if ( pItem->ISA( SfxUInt16Item ) )
nToTable = static_cast<const SfxUInt16Item*>(pItem)->GetValue();
else if ( pItem->ISA( SfxBoolItem ) )
{
// in der idl fuer Basic steht FN_PARAM_4 als SfxBoolItem
// -> wenn gesetzt, neue Tabelle, sonst aktuelle Tabelle
2000-09-18 16:07:07 +00:00
if ( static_cast<const SfxBoolItem*>(pItem)->GetValue() )
nToTable = static_cast<sal_uInt16>(rScDoc.GetTableCount());
else
nToTable = static_cast<sal_uInt16>(rData.GetTabNo());
}
}
else
{
if (bDrawRect)
nToTable = static_cast<sal_uInt16>(nMarkTab);
rReq.AppendItem( SfxUInt16Item( FN_PARAM_4, nToTable ) );
}
// auf neue Tabelle ausgeben?
if ( nToTable == rScDoc.GetTableCount() )
INTEGRATION: CWS chart2mst3 (1.12.10); FILE MERGED 2007/04/25 03:30:58 bm 1.12.10.33: RESYNC: (1.24-1.25); FILE MERGED 2007/04/20 10:41:20 nn 1.12.10.32: #i75307# FuInsertChart: MarkToMulti 2006/12/05 16:28:12 nn 1.12.10.31: #i71257# don't add undo action before the dialog is finished 2006/11/27 00:37:17 bm 1.12.10.30: aw024 adaptions 2006/11/24 18:24:58 bm 1.12.10.29: RESYNC: (1.23-1.24); FILE MERGED 2006/11/23 12:52:52 nn 1.12.10.28: #i71250# removed old chart code 2006/11/10 21:06:35 iha 1.12.10.27: prevent immidiate redraw in wizard and according dialogs (important for charts with many data) 2006/10/25 18:17:54 nn 1.12.10.26: allow range selection from inplace object without deactivating the object 2006/10/19 00:18:35 bm 1.12.10.25: RESYNC: (1.21-1.23); FILE MERGED 2006/10/11 15:10:11 nn 1.12.10.24: #i66867# auto-detect column/row headers 2006/08/04 14:34:01 bm 1.12.10.23: pass the document to the chart2 uno services instead of the docshell, as the shell itself is not really needed, and limits the creation of such objects unnecessarily to the ui 2006/06/24 13:04:39 iha 1.12.10.22: #i54915# chart wizard shouldn't overlap chart if possible 2006/06/22 15:42:13 nn 1.12.10.21: #i13379# default position for chart and dialog 2006/05/05 15:24:08 bm 1.12.10.20: RESYNC: (1.20-1.21); FILE MERGED 2006/05/05 14:32:41 bm 1.12.10.19: #i31098# leave draw shell after Cancel of inserting a chart 2006/05/03 15:46:49 bm 1.12.10.18: #i31098# Enable Cancel for Chart Wizard 2005/11/15 15:33:22 bm 1.12.10.17: dispose chart wizard dialog 2005/10/08 09:54:11 bm 1.12.10.16: RESYNC: (1.19-1.20); FILE MERGED 2005/09/08 11:44:48 iha 1.12.10.15: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter from calc 2005/08/15 13:09:29 bm 1.12.10.14: XDataReceiver changed 2005/08/05 12:43:19 bm 1.12.10.13: open chart creation wizard only when not called via API 2005/06/01 14:37:39 bm 1.12.10.12: Insert New Chart embedded 2005/05/17 13:01:42 bm 1.12.10.11: RESYNC: (1.18-1.19); FILE MERGED 2005/05/09 09:54:27 bm 1.12.10.10: moved chart2 API to data namespace 2005/03/17 13:45:10 bm 1.12.10.9: RESYNC: (1.16-1.18); FILE MERGED 2004/11/02 16:50:32 bm 1.12.10.8: RESYNC: (1.15-1.16); FILE MERGED 2004/08/30 18:08:08 bm 1.12.10.7: RESYNC: (1.13-1.15); FILE MERGED 2004/06/15 18:41:55 bm 1.12.10.6: RESYNC: (1.12-1.13); FILE MERGED 2004/05/05 16:34:56 iha 1.12.10.5: unmark automatic mark range; moved update call to chart 2004/04/08 12:21:47 iha 1.12.10.4: #i20344# init wizard correctly + update view 2004/04/08 09:03:14 iha 1.12.10.3: remove test code 2004/04/08 08:55:15 iha 1.12.10.2: get correct RangeString for chart 2004/04/07 22:03:58 iha 1.12.10.1: #i20344# changed chart creation process - added new chart wizard
2007-05-22 19:06:02 +00:00
{
// dann los...
OUString aTabName;
SCTAB nNewTab = rScDoc.GetTableCount();
rScDoc.CreateValidTabName( aTabName );
INTEGRATION: CWS chart2mst3 (1.12.10); FILE MERGED 2007/04/25 03:30:58 bm 1.12.10.33: RESYNC: (1.24-1.25); FILE MERGED 2007/04/20 10:41:20 nn 1.12.10.32: #i75307# FuInsertChart: MarkToMulti 2006/12/05 16:28:12 nn 1.12.10.31: #i71257# don't add undo action before the dialog is finished 2006/11/27 00:37:17 bm 1.12.10.30: aw024 adaptions 2006/11/24 18:24:58 bm 1.12.10.29: RESYNC: (1.23-1.24); FILE MERGED 2006/11/23 12:52:52 nn 1.12.10.28: #i71250# removed old chart code 2006/11/10 21:06:35 iha 1.12.10.27: prevent immidiate redraw in wizard and according dialogs (important for charts with many data) 2006/10/25 18:17:54 nn 1.12.10.26: allow range selection from inplace object without deactivating the object 2006/10/19 00:18:35 bm 1.12.10.25: RESYNC: (1.21-1.23); FILE MERGED 2006/10/11 15:10:11 nn 1.12.10.24: #i66867# auto-detect column/row headers 2006/08/04 14:34:01 bm 1.12.10.23: pass the document to the chart2 uno services instead of the docshell, as the shell itself is not really needed, and limits the creation of such objects unnecessarily to the ui 2006/06/24 13:04:39 iha 1.12.10.22: #i54915# chart wizard shouldn't overlap chart if possible 2006/06/22 15:42:13 nn 1.12.10.21: #i13379# default position for chart and dialog 2006/05/05 15:24:08 bm 1.12.10.20: RESYNC: (1.20-1.21); FILE MERGED 2006/05/05 14:32:41 bm 1.12.10.19: #i31098# leave draw shell after Cancel of inserting a chart 2006/05/03 15:46:49 bm 1.12.10.18: #i31098# Enable Cancel for Chart Wizard 2005/11/15 15:33:22 bm 1.12.10.17: dispose chart wizard dialog 2005/10/08 09:54:11 bm 1.12.10.16: RESYNC: (1.19-1.20); FILE MERGED 2005/09/08 11:44:48 iha 1.12.10.15: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter from calc 2005/08/15 13:09:29 bm 1.12.10.14: XDataReceiver changed 2005/08/05 12:43:19 bm 1.12.10.13: open chart creation wizard only when not called via API 2005/06/01 14:37:39 bm 1.12.10.12: Insert New Chart embedded 2005/05/17 13:01:42 bm 1.12.10.11: RESYNC: (1.18-1.19); FILE MERGED 2005/05/09 09:54:27 bm 1.12.10.10: moved chart2 API to data namespace 2005/03/17 13:45:10 bm 1.12.10.9: RESYNC: (1.16-1.18); FILE MERGED 2004/11/02 16:50:32 bm 1.12.10.8: RESYNC: (1.15-1.16); FILE MERGED 2004/08/30 18:08:08 bm 1.12.10.7: RESYNC: (1.13-1.15); FILE MERGED 2004/06/15 18:41:55 bm 1.12.10.6: RESYNC: (1.12-1.13); FILE MERGED 2004/05/05 16:34:56 iha 1.12.10.5: unmark automatic mark range; moved update call to chart 2004/04/08 12:21:47 iha 1.12.10.4: #i20344# init wizard correctly + update view 2004/04/08 09:03:14 iha 1.12.10.3: remove test code 2004/04/08 08:55:15 iha 1.12.10.2: get correct RangeString for chart 2004/04/07 22:03:58 iha 1.12.10.1: #i20344# changed chart creation process - added new chart wizard
2007-05-22 19:06:02 +00:00
if ( rScDoc.InsertTab( nNewTab, aTabName ) )
INTEGRATION: CWS chart2mst3 (1.12.10); FILE MERGED 2007/04/25 03:30:58 bm 1.12.10.33: RESYNC: (1.24-1.25); FILE MERGED 2007/04/20 10:41:20 nn 1.12.10.32: #i75307# FuInsertChart: MarkToMulti 2006/12/05 16:28:12 nn 1.12.10.31: #i71257# don't add undo action before the dialog is finished 2006/11/27 00:37:17 bm 1.12.10.30: aw024 adaptions 2006/11/24 18:24:58 bm 1.12.10.29: RESYNC: (1.23-1.24); FILE MERGED 2006/11/23 12:52:52 nn 1.12.10.28: #i71250# removed old chart code 2006/11/10 21:06:35 iha 1.12.10.27: prevent immidiate redraw in wizard and according dialogs (important for charts with many data) 2006/10/25 18:17:54 nn 1.12.10.26: allow range selection from inplace object without deactivating the object 2006/10/19 00:18:35 bm 1.12.10.25: RESYNC: (1.21-1.23); FILE MERGED 2006/10/11 15:10:11 nn 1.12.10.24: #i66867# auto-detect column/row headers 2006/08/04 14:34:01 bm 1.12.10.23: pass the document to the chart2 uno services instead of the docshell, as the shell itself is not really needed, and limits the creation of such objects unnecessarily to the ui 2006/06/24 13:04:39 iha 1.12.10.22: #i54915# chart wizard shouldn't overlap chart if possible 2006/06/22 15:42:13 nn 1.12.10.21: #i13379# default position for chart and dialog 2006/05/05 15:24:08 bm 1.12.10.20: RESYNC: (1.20-1.21); FILE MERGED 2006/05/05 14:32:41 bm 1.12.10.19: #i31098# leave draw shell after Cancel of inserting a chart 2006/05/03 15:46:49 bm 1.12.10.18: #i31098# Enable Cancel for Chart Wizard 2005/11/15 15:33:22 bm 1.12.10.17: dispose chart wizard dialog 2005/10/08 09:54:11 bm 1.12.10.16: RESYNC: (1.19-1.20); FILE MERGED 2005/09/08 11:44:48 iha 1.12.10.15: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter from calc 2005/08/15 13:09:29 bm 1.12.10.14: XDataReceiver changed 2005/08/05 12:43:19 bm 1.12.10.13: open chart creation wizard only when not called via API 2005/06/01 14:37:39 bm 1.12.10.12: Insert New Chart embedded 2005/05/17 13:01:42 bm 1.12.10.11: RESYNC: (1.18-1.19); FILE MERGED 2005/05/09 09:54:27 bm 1.12.10.10: moved chart2 API to data namespace 2005/03/17 13:45:10 bm 1.12.10.9: RESYNC: (1.16-1.18); FILE MERGED 2004/11/02 16:50:32 bm 1.12.10.8: RESYNC: (1.15-1.16); FILE MERGED 2004/08/30 18:08:08 bm 1.12.10.7: RESYNC: (1.13-1.15); FILE MERGED 2004/06/15 18:41:55 bm 1.12.10.6: RESYNC: (1.12-1.13); FILE MERGED 2004/05/05 16:34:56 iha 1.12.10.5: unmark automatic mark range; moved update call to chart 2004/04/08 12:21:47 iha 1.12.10.4: #i20344# init wizard correctly + update view 2004/04/08 09:03:14 iha 1.12.10.3: remove test code 2004/04/08 08:55:15 iha 1.12.10.2: get correct RangeString for chart 2004/04/07 22:03:58 iha 1.12.10.1: #i20344# changed chart creation process - added new chart wizard
2007-05-22 19:06:02 +00:00
{
if (bUndo)
{
bool bAppend = true;
pScDocSh->GetUndoManager()->AddUndoAction(
new ScUndoInsertTab( pScDocSh, nNewTab,
bAppend, aTabName ) );
2000-09-18 16:07:07 +00:00
}
pScDocSh->Broadcast( ScTablesHint( SC_TAB_INSERTED, nNewTab ) );
pViewSh->SetTabNo( nNewTab, true );
pScDocSh->PostPaintExtras(); //! erst hinterher ???
INTEGRATION: CWS chart2mst3 (1.12.10); FILE MERGED 2007/04/25 03:30:58 bm 1.12.10.33: RESYNC: (1.24-1.25); FILE MERGED 2007/04/20 10:41:20 nn 1.12.10.32: #i75307# FuInsertChart: MarkToMulti 2006/12/05 16:28:12 nn 1.12.10.31: #i71257# don't add undo action before the dialog is finished 2006/11/27 00:37:17 bm 1.12.10.30: aw024 adaptions 2006/11/24 18:24:58 bm 1.12.10.29: RESYNC: (1.23-1.24); FILE MERGED 2006/11/23 12:52:52 nn 1.12.10.28: #i71250# removed old chart code 2006/11/10 21:06:35 iha 1.12.10.27: prevent immidiate redraw in wizard and according dialogs (important for charts with many data) 2006/10/25 18:17:54 nn 1.12.10.26: allow range selection from inplace object without deactivating the object 2006/10/19 00:18:35 bm 1.12.10.25: RESYNC: (1.21-1.23); FILE MERGED 2006/10/11 15:10:11 nn 1.12.10.24: #i66867# auto-detect column/row headers 2006/08/04 14:34:01 bm 1.12.10.23: pass the document to the chart2 uno services instead of the docshell, as the shell itself is not really needed, and limits the creation of such objects unnecessarily to the ui 2006/06/24 13:04:39 iha 1.12.10.22: #i54915# chart wizard shouldn't overlap chart if possible 2006/06/22 15:42:13 nn 1.12.10.21: #i13379# default position for chart and dialog 2006/05/05 15:24:08 bm 1.12.10.20: RESYNC: (1.20-1.21); FILE MERGED 2006/05/05 14:32:41 bm 1.12.10.19: #i31098# leave draw shell after Cancel of inserting a chart 2006/05/03 15:46:49 bm 1.12.10.18: #i31098# Enable Cancel for Chart Wizard 2005/11/15 15:33:22 bm 1.12.10.17: dispose chart wizard dialog 2005/10/08 09:54:11 bm 1.12.10.16: RESYNC: (1.19-1.20); FILE MERGED 2005/09/08 11:44:48 iha 1.12.10.15: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter from calc 2005/08/15 13:09:29 bm 1.12.10.14: XDataReceiver changed 2005/08/05 12:43:19 bm 1.12.10.13: open chart creation wizard only when not called via API 2005/06/01 14:37:39 bm 1.12.10.12: Insert New Chart embedded 2005/05/17 13:01:42 bm 1.12.10.11: RESYNC: (1.18-1.19); FILE MERGED 2005/05/09 09:54:27 bm 1.12.10.10: moved chart2 API to data namespace 2005/03/17 13:45:10 bm 1.12.10.9: RESYNC: (1.16-1.18); FILE MERGED 2004/11/02 16:50:32 bm 1.12.10.8: RESYNC: (1.15-1.16); FILE MERGED 2004/08/30 18:08:08 bm 1.12.10.7: RESYNC: (1.13-1.15); FILE MERGED 2004/06/15 18:41:55 bm 1.12.10.6: RESYNC: (1.12-1.13); FILE MERGED 2004/05/05 16:34:56 iha 1.12.10.5: unmark automatic mark range; moved update call to chart 2004/04/08 12:21:47 iha 1.12.10.4: #i20344# init wizard correctly + update view 2004/04/08 09:03:14 iha 1.12.10.3: remove test code 2004/04/08 08:55:15 iha 1.12.10.2: get correct RangeString for chart 2004/04/07 22:03:58 iha 1.12.10.1: #i20344# changed chart creation process - added new chart wizard
2007-05-22 19:06:02 +00:00
}
else
INTEGRATION: CWS chart2mst3 (1.12.10); FILE MERGED 2007/04/25 03:30:58 bm 1.12.10.33: RESYNC: (1.24-1.25); FILE MERGED 2007/04/20 10:41:20 nn 1.12.10.32: #i75307# FuInsertChart: MarkToMulti 2006/12/05 16:28:12 nn 1.12.10.31: #i71257# don't add undo action before the dialog is finished 2006/11/27 00:37:17 bm 1.12.10.30: aw024 adaptions 2006/11/24 18:24:58 bm 1.12.10.29: RESYNC: (1.23-1.24); FILE MERGED 2006/11/23 12:52:52 nn 1.12.10.28: #i71250# removed old chart code 2006/11/10 21:06:35 iha 1.12.10.27: prevent immidiate redraw in wizard and according dialogs (important for charts with many data) 2006/10/25 18:17:54 nn 1.12.10.26: allow range selection from inplace object without deactivating the object 2006/10/19 00:18:35 bm 1.12.10.25: RESYNC: (1.21-1.23); FILE MERGED 2006/10/11 15:10:11 nn 1.12.10.24: #i66867# auto-detect column/row headers 2006/08/04 14:34:01 bm 1.12.10.23: pass the document to the chart2 uno services instead of the docshell, as the shell itself is not really needed, and limits the creation of such objects unnecessarily to the ui 2006/06/24 13:04:39 iha 1.12.10.22: #i54915# chart wizard shouldn't overlap chart if possible 2006/06/22 15:42:13 nn 1.12.10.21: #i13379# default position for chart and dialog 2006/05/05 15:24:08 bm 1.12.10.20: RESYNC: (1.20-1.21); FILE MERGED 2006/05/05 14:32:41 bm 1.12.10.19: #i31098# leave draw shell after Cancel of inserting a chart 2006/05/03 15:46:49 bm 1.12.10.18: #i31098# Enable Cancel for Chart Wizard 2005/11/15 15:33:22 bm 1.12.10.17: dispose chart wizard dialog 2005/10/08 09:54:11 bm 1.12.10.16: RESYNC: (1.19-1.20); FILE MERGED 2005/09/08 11:44:48 iha 1.12.10.15: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter from calc 2005/08/15 13:09:29 bm 1.12.10.14: XDataReceiver changed 2005/08/05 12:43:19 bm 1.12.10.13: open chart creation wizard only when not called via API 2005/06/01 14:37:39 bm 1.12.10.12: Insert New Chart embedded 2005/05/17 13:01:42 bm 1.12.10.11: RESYNC: (1.18-1.19); FILE MERGED 2005/05/09 09:54:27 bm 1.12.10.10: moved chart2 API to data namespace 2005/03/17 13:45:10 bm 1.12.10.9: RESYNC: (1.16-1.18); FILE MERGED 2004/11/02 16:50:32 bm 1.12.10.8: RESYNC: (1.15-1.16); FILE MERGED 2004/08/30 18:08:08 bm 1.12.10.7: RESYNC: (1.13-1.15); FILE MERGED 2004/06/15 18:41:55 bm 1.12.10.6: RESYNC: (1.12-1.13); FILE MERGED 2004/05/05 16:34:56 iha 1.12.10.5: unmark automatic mark range; moved update call to chart 2004/04/08 12:21:47 iha 1.12.10.4: #i20344# init wizard correctly + update view 2004/04/08 09:03:14 iha 1.12.10.3: remove test code 2004/04/08 08:55:15 iha 1.12.10.2: get correct RangeString for chart 2004/04/07 22:03:58 iha 1.12.10.1: #i20344# changed chart creation process - added new chart wizard
2007-05-22 19:06:02 +00:00
{
OSL_FAIL( "Could not create new table :-/" );
INTEGRATION: CWS chart2mst3 (1.12.10); FILE MERGED 2007/04/25 03:30:58 bm 1.12.10.33: RESYNC: (1.24-1.25); FILE MERGED 2007/04/20 10:41:20 nn 1.12.10.32: #i75307# FuInsertChart: MarkToMulti 2006/12/05 16:28:12 nn 1.12.10.31: #i71257# don't add undo action before the dialog is finished 2006/11/27 00:37:17 bm 1.12.10.30: aw024 adaptions 2006/11/24 18:24:58 bm 1.12.10.29: RESYNC: (1.23-1.24); FILE MERGED 2006/11/23 12:52:52 nn 1.12.10.28: #i71250# removed old chart code 2006/11/10 21:06:35 iha 1.12.10.27: prevent immidiate redraw in wizard and according dialogs (important for charts with many data) 2006/10/25 18:17:54 nn 1.12.10.26: allow range selection from inplace object without deactivating the object 2006/10/19 00:18:35 bm 1.12.10.25: RESYNC: (1.21-1.23); FILE MERGED 2006/10/11 15:10:11 nn 1.12.10.24: #i66867# auto-detect column/row headers 2006/08/04 14:34:01 bm 1.12.10.23: pass the document to the chart2 uno services instead of the docshell, as the shell itself is not really needed, and limits the creation of such objects unnecessarily to the ui 2006/06/24 13:04:39 iha 1.12.10.22: #i54915# chart wizard shouldn't overlap chart if possible 2006/06/22 15:42:13 nn 1.12.10.21: #i13379# default position for chart and dialog 2006/05/05 15:24:08 bm 1.12.10.20: RESYNC: (1.20-1.21); FILE MERGED 2006/05/05 14:32:41 bm 1.12.10.19: #i31098# leave draw shell after Cancel of inserting a chart 2006/05/03 15:46:49 bm 1.12.10.18: #i31098# Enable Cancel for Chart Wizard 2005/11/15 15:33:22 bm 1.12.10.17: dispose chart wizard dialog 2005/10/08 09:54:11 bm 1.12.10.16: RESYNC: (1.19-1.20); FILE MERGED 2005/09/08 11:44:48 iha 1.12.10.15: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter from calc 2005/08/15 13:09:29 bm 1.12.10.14: XDataReceiver changed 2005/08/05 12:43:19 bm 1.12.10.13: open chart creation wizard only when not called via API 2005/06/01 14:37:39 bm 1.12.10.12: Insert New Chart embedded 2005/05/17 13:01:42 bm 1.12.10.11: RESYNC: (1.18-1.19); FILE MERGED 2005/05/09 09:54:27 bm 1.12.10.10: moved chart2 API to data namespace 2005/03/17 13:45:10 bm 1.12.10.9: RESYNC: (1.16-1.18); FILE MERGED 2004/11/02 16:50:32 bm 1.12.10.8: RESYNC: (1.15-1.16); FILE MERGED 2004/08/30 18:08:08 bm 1.12.10.7: RESYNC: (1.13-1.15); FILE MERGED 2004/06/15 18:41:55 bm 1.12.10.6: RESYNC: (1.12-1.13); FILE MERGED 2004/05/05 16:34:56 iha 1.12.10.5: unmark automatic mark range; moved update call to chart 2004/04/08 12:21:47 iha 1.12.10.4: #i20344# init wizard correctly + update view 2004/04/08 09:03:14 iha 1.12.10.3: remove test code 2004/04/08 08:55:15 iha 1.12.10.2: get correct RangeString for chart 2004/04/07 22:03:58 iha 1.12.10.1: #i20344# changed chart creation process - added new chart wizard
2007-05-22 19:06:02 +00:00
}
}
else if ( nToTable != rData.GetTabNo() )
{
pViewSh->SetTabNo( nToTable, true );
}
}
2000-09-18 16:07:07 +00:00
lcl_ChartInit( xObj, &rData, aRangeString ); // set source range, auto-detect column/row headers
// Objekt-Position
2000-09-18 16:07:07 +00:00
Point aStart;
if ( bDrawRect )
aStart = aMarkDest.TopLeft(); // marked by hand
else
{
// get chart position (from window size and data range)
aStart = pViewSh->GetChartInsertPos( aSize, aPositionRange );
}
2000-09-18 16:07:07 +00:00
Rectangle aRect (aStart, aSize);
SdrOle2Obj* pObj = new SdrOle2Obj( svt::EmbeddedObjectRef( xObj, nAspect ), aName, aRect);
SdrPageView* pPV = pView->GetSdrPageView();
// #i121334# This call will change the chart's default background fill from white to transparent.
// Add here again if this is wanted (see task description for details)
// ChartHelper::AdaptDefaultsForChart( xObj );
INTEGRATION: CWS chart2mst3 (1.12.10); FILE MERGED 2007/04/25 03:30:58 bm 1.12.10.33: RESYNC: (1.24-1.25); FILE MERGED 2007/04/20 10:41:20 nn 1.12.10.32: #i75307# FuInsertChart: MarkToMulti 2006/12/05 16:28:12 nn 1.12.10.31: #i71257# don't add undo action before the dialog is finished 2006/11/27 00:37:17 bm 1.12.10.30: aw024 adaptions 2006/11/24 18:24:58 bm 1.12.10.29: RESYNC: (1.23-1.24); FILE MERGED 2006/11/23 12:52:52 nn 1.12.10.28: #i71250# removed old chart code 2006/11/10 21:06:35 iha 1.12.10.27: prevent immidiate redraw in wizard and according dialogs (important for charts with many data) 2006/10/25 18:17:54 nn 1.12.10.26: allow range selection from inplace object without deactivating the object 2006/10/19 00:18:35 bm 1.12.10.25: RESYNC: (1.21-1.23); FILE MERGED 2006/10/11 15:10:11 nn 1.12.10.24: #i66867# auto-detect column/row headers 2006/08/04 14:34:01 bm 1.12.10.23: pass the document to the chart2 uno services instead of the docshell, as the shell itself is not really needed, and limits the creation of such objects unnecessarily to the ui 2006/06/24 13:04:39 iha 1.12.10.22: #i54915# chart wizard shouldn't overlap chart if possible 2006/06/22 15:42:13 nn 1.12.10.21: #i13379# default position for chart and dialog 2006/05/05 15:24:08 bm 1.12.10.20: RESYNC: (1.20-1.21); FILE MERGED 2006/05/05 14:32:41 bm 1.12.10.19: #i31098# leave draw shell after Cancel of inserting a chart 2006/05/03 15:46:49 bm 1.12.10.18: #i31098# Enable Cancel for Chart Wizard 2005/11/15 15:33:22 bm 1.12.10.17: dispose chart wizard dialog 2005/10/08 09:54:11 bm 1.12.10.16: RESYNC: (1.19-1.20); FILE MERGED 2005/09/08 11:44:48 iha 1.12.10.15: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter from calc 2005/08/15 13:09:29 bm 1.12.10.14: XDataReceiver changed 2005/08/05 12:43:19 bm 1.12.10.13: open chart creation wizard only when not called via API 2005/06/01 14:37:39 bm 1.12.10.12: Insert New Chart embedded 2005/05/17 13:01:42 bm 1.12.10.11: RESYNC: (1.18-1.19); FILE MERGED 2005/05/09 09:54:27 bm 1.12.10.10: moved chart2 API to data namespace 2005/03/17 13:45:10 bm 1.12.10.9: RESYNC: (1.16-1.18); FILE MERGED 2004/11/02 16:50:32 bm 1.12.10.8: RESYNC: (1.15-1.16); FILE MERGED 2004/08/30 18:08:08 bm 1.12.10.7: RESYNC: (1.13-1.15); FILE MERGED 2004/06/15 18:41:55 bm 1.12.10.6: RESYNC: (1.12-1.13); FILE MERGED 2004/05/05 16:34:56 iha 1.12.10.5: unmark automatic mark range; moved update call to chart 2004/04/08 12:21:47 iha 1.12.10.4: #i20344# init wizard correctly + update view 2004/04/08 09:03:14 iha 1.12.10.3: remove test code 2004/04/08 08:55:15 iha 1.12.10.2: get correct RangeString for chart 2004/04/07 22:03:58 iha 1.12.10.1: #i20344# changed chart creation process - added new chart wizard
2007-05-22 19:06:02 +00:00
// pView->InsertObjectAtView(pObj, *pPV);//this call leads to an immidiate redraw and asks the chart for a visual representation
// use the page instead of the view to insert, so no undo action is created yet
SdrPage* pInsPage = pPV->GetPage();
pInsPage->InsertObject( pObj );
pView->UnmarkAllObj();
pView->MarkObj( pObj, pPV );
bool bAddUndo = true; // add undo action later, unless the dialog is canceled
if (rReq.IsAPI())
{
if( xChartModel.is() )
xChartModel->unlockControllers();
}
else
{
//the controller will be unlocked by the dialog when the dialog is told to do so
2000-09-18 16:07:07 +00:00
// only activate object if not called via API (e.g. macro)
pViewShell->ActivateObject( pObj, SVVERB_SHOW );
2000-09-18 16:07:07 +00:00
//open wizard
//@todo get context from calc if that has one
uno::Reference< uno::XComponentContext > xContext(
::cppu::defaultBootstrap_InitialComponentContext() );
if(xContext.is())
{
uno::Reference< lang::XMultiComponentFactory > xMCF( xContext->getServiceManager() );
if(xMCF.is())
INTEGRATION: CWS chart2mst3 (1.12.10); FILE MERGED 2007/04/25 03:30:58 bm 1.12.10.33: RESYNC: (1.24-1.25); FILE MERGED 2007/04/20 10:41:20 nn 1.12.10.32: #i75307# FuInsertChart: MarkToMulti 2006/12/05 16:28:12 nn 1.12.10.31: #i71257# don't add undo action before the dialog is finished 2006/11/27 00:37:17 bm 1.12.10.30: aw024 adaptions 2006/11/24 18:24:58 bm 1.12.10.29: RESYNC: (1.23-1.24); FILE MERGED 2006/11/23 12:52:52 nn 1.12.10.28: #i71250# removed old chart code 2006/11/10 21:06:35 iha 1.12.10.27: prevent immidiate redraw in wizard and according dialogs (important for charts with many data) 2006/10/25 18:17:54 nn 1.12.10.26: allow range selection from inplace object without deactivating the object 2006/10/19 00:18:35 bm 1.12.10.25: RESYNC: (1.21-1.23); FILE MERGED 2006/10/11 15:10:11 nn 1.12.10.24: #i66867# auto-detect column/row headers 2006/08/04 14:34:01 bm 1.12.10.23: pass the document to the chart2 uno services instead of the docshell, as the shell itself is not really needed, and limits the creation of such objects unnecessarily to the ui 2006/06/24 13:04:39 iha 1.12.10.22: #i54915# chart wizard shouldn't overlap chart if possible 2006/06/22 15:42:13 nn 1.12.10.21: #i13379# default position for chart and dialog 2006/05/05 15:24:08 bm 1.12.10.20: RESYNC: (1.20-1.21); FILE MERGED 2006/05/05 14:32:41 bm 1.12.10.19: #i31098# leave draw shell after Cancel of inserting a chart 2006/05/03 15:46:49 bm 1.12.10.18: #i31098# Enable Cancel for Chart Wizard 2005/11/15 15:33:22 bm 1.12.10.17: dispose chart wizard dialog 2005/10/08 09:54:11 bm 1.12.10.16: RESYNC: (1.19-1.20); FILE MERGED 2005/09/08 11:44:48 iha 1.12.10.15: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter from calc 2005/08/15 13:09:29 bm 1.12.10.14: XDataReceiver changed 2005/08/05 12:43:19 bm 1.12.10.13: open chart creation wizard only when not called via API 2005/06/01 14:37:39 bm 1.12.10.12: Insert New Chart embedded 2005/05/17 13:01:42 bm 1.12.10.11: RESYNC: (1.18-1.19); FILE MERGED 2005/05/09 09:54:27 bm 1.12.10.10: moved chart2 API to data namespace 2005/03/17 13:45:10 bm 1.12.10.9: RESYNC: (1.16-1.18); FILE MERGED 2004/11/02 16:50:32 bm 1.12.10.8: RESYNC: (1.15-1.16); FILE MERGED 2004/08/30 18:08:08 bm 1.12.10.7: RESYNC: (1.13-1.15); FILE MERGED 2004/06/15 18:41:55 bm 1.12.10.6: RESYNC: (1.12-1.13); FILE MERGED 2004/05/05 16:34:56 iha 1.12.10.5: unmark automatic mark range; moved update call to chart 2004/04/08 12:21:47 iha 1.12.10.4: #i20344# init wizard correctly + update view 2004/04/08 09:03:14 iha 1.12.10.3: remove test code 2004/04/08 08:55:15 iha 1.12.10.2: get correct RangeString for chart 2004/04/07 22:03:58 iha 1.12.10.1: #i20344# changed chart creation process - added new chart wizard
2007-05-22 19:06:02 +00:00
{
uno::Reference< ui::dialogs::XExecutableDialog > xDialog(
xMCF->createInstanceWithContext(
OUString("com.sun.star.comp.chart2.WizardDialog")
, xContext), uno::UNO_QUERY);
uno::Reference< lang::XInitialization > xInit( xDialog, uno::UNO_QUERY );
if( xChartModel.is() && xInit.is() )
2000-09-18 16:07:07 +00:00
{
uno::Reference< awt::XWindow > xDialogParentWindow(0);
// initialize dialog
uno::Sequence<uno::Any> aSeq(2);
uno::Any* pArray = aSeq.getArray();
beans::PropertyValue aParam1;
aParam1.Name = "ParentWindow";
aParam1.Value <<= uno::makeAny(xDialogParentWindow);
beans::PropertyValue aParam2;
aParam2.Name = "ChartModel";
aParam2.Value <<= uno::makeAny(xChartModel);
pArray[0] <<= uno::makeAny(aParam1);
pArray[1] <<= uno::makeAny(aParam2);
xInit->initialize( aSeq );
// try to set the dialog's position so it doesn't hide the chart
uno::Reference < beans::XPropertySet > xDialogProps( xDialog, uno::UNO_QUERY );
if ( xDialogProps.is() )
2000-09-18 16:07:07 +00:00
{
try
2000-09-18 16:07:07 +00:00
{
//get dialog size:
awt::Size aDialogAWTSize;
if( xDialogProps->getPropertyValue("Size")
>>= aDialogAWTSize )
{
Size aDialogSize( aDialogAWTSize.Width, aDialogAWTSize.Height );
if ( aDialogSize.Width() > 0 && aDialogSize.Height() > 0 )
{
//calculate and set new position
Point aDialogPos = pViewShell->GetChartDialogPos( aDialogSize, aRect );
xDialogProps->setPropertyValue("Position",
uno::makeAny( awt::Point(aDialogPos.getX(),aDialogPos.getY()) ) );
}
INTEGRATION: CWS chart2mst3 (1.12.10); FILE MERGED 2007/04/25 03:30:58 bm 1.12.10.33: RESYNC: (1.24-1.25); FILE MERGED 2007/04/20 10:41:20 nn 1.12.10.32: #i75307# FuInsertChart: MarkToMulti 2006/12/05 16:28:12 nn 1.12.10.31: #i71257# don't add undo action before the dialog is finished 2006/11/27 00:37:17 bm 1.12.10.30: aw024 adaptions 2006/11/24 18:24:58 bm 1.12.10.29: RESYNC: (1.23-1.24); FILE MERGED 2006/11/23 12:52:52 nn 1.12.10.28: #i71250# removed old chart code 2006/11/10 21:06:35 iha 1.12.10.27: prevent immidiate redraw in wizard and according dialogs (important for charts with many data) 2006/10/25 18:17:54 nn 1.12.10.26: allow range selection from inplace object without deactivating the object 2006/10/19 00:18:35 bm 1.12.10.25: RESYNC: (1.21-1.23); FILE MERGED 2006/10/11 15:10:11 nn 1.12.10.24: #i66867# auto-detect column/row headers 2006/08/04 14:34:01 bm 1.12.10.23: pass the document to the chart2 uno services instead of the docshell, as the shell itself is not really needed, and limits the creation of such objects unnecessarily to the ui 2006/06/24 13:04:39 iha 1.12.10.22: #i54915# chart wizard shouldn't overlap chart if possible 2006/06/22 15:42:13 nn 1.12.10.21: #i13379# default position for chart and dialog 2006/05/05 15:24:08 bm 1.12.10.20: RESYNC: (1.20-1.21); FILE MERGED 2006/05/05 14:32:41 bm 1.12.10.19: #i31098# leave draw shell after Cancel of inserting a chart 2006/05/03 15:46:49 bm 1.12.10.18: #i31098# Enable Cancel for Chart Wizard 2005/11/15 15:33:22 bm 1.12.10.17: dispose chart wizard dialog 2005/10/08 09:54:11 bm 1.12.10.16: RESYNC: (1.19-1.20); FILE MERGED 2005/09/08 11:44:48 iha 1.12.10.15: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter from calc 2005/08/15 13:09:29 bm 1.12.10.14: XDataReceiver changed 2005/08/05 12:43:19 bm 1.12.10.13: open chart creation wizard only when not called via API 2005/06/01 14:37:39 bm 1.12.10.12: Insert New Chart embedded 2005/05/17 13:01:42 bm 1.12.10.11: RESYNC: (1.18-1.19); FILE MERGED 2005/05/09 09:54:27 bm 1.12.10.10: moved chart2 API to data namespace 2005/03/17 13:45:10 bm 1.12.10.9: RESYNC: (1.16-1.18); FILE MERGED 2004/11/02 16:50:32 bm 1.12.10.8: RESYNC: (1.15-1.16); FILE MERGED 2004/08/30 18:08:08 bm 1.12.10.7: RESYNC: (1.13-1.15); FILE MERGED 2004/06/15 18:41:55 bm 1.12.10.6: RESYNC: (1.12-1.13); FILE MERGED 2004/05/05 16:34:56 iha 1.12.10.5: unmark automatic mark range; moved update call to chart 2004/04/08 12:21:47 iha 1.12.10.4: #i20344# init wizard correctly + update view 2004/04/08 09:03:14 iha 1.12.10.3: remove test code 2004/04/08 08:55:15 iha 1.12.10.2: get correct RangeString for chart 2004/04/07 22:03:58 iha 1.12.10.1: #i20344# changed chart creation process - added new chart wizard
2007-05-22 19:06:02 +00:00
}
//tell the dialog to unlock controller
xDialogProps->setPropertyValue("UnlockControllersOnExecute",
uno::makeAny( sal_True ) );
2000-09-18 16:07:07 +00:00
}
catch( uno::Exception& )
INTEGRATION: CWS chart2mst3 (1.12.10); FILE MERGED 2007/04/25 03:30:58 bm 1.12.10.33: RESYNC: (1.24-1.25); FILE MERGED 2007/04/20 10:41:20 nn 1.12.10.32: #i75307# FuInsertChart: MarkToMulti 2006/12/05 16:28:12 nn 1.12.10.31: #i71257# don't add undo action before the dialog is finished 2006/11/27 00:37:17 bm 1.12.10.30: aw024 adaptions 2006/11/24 18:24:58 bm 1.12.10.29: RESYNC: (1.23-1.24); FILE MERGED 2006/11/23 12:52:52 nn 1.12.10.28: #i71250# removed old chart code 2006/11/10 21:06:35 iha 1.12.10.27: prevent immidiate redraw in wizard and according dialogs (important for charts with many data) 2006/10/25 18:17:54 nn 1.12.10.26: allow range selection from inplace object without deactivating the object 2006/10/19 00:18:35 bm 1.12.10.25: RESYNC: (1.21-1.23); FILE MERGED 2006/10/11 15:10:11 nn 1.12.10.24: #i66867# auto-detect column/row headers 2006/08/04 14:34:01 bm 1.12.10.23: pass the document to the chart2 uno services instead of the docshell, as the shell itself is not really needed, and limits the creation of such objects unnecessarily to the ui 2006/06/24 13:04:39 iha 1.12.10.22: #i54915# chart wizard shouldn't overlap chart if possible 2006/06/22 15:42:13 nn 1.12.10.21: #i13379# default position for chart and dialog 2006/05/05 15:24:08 bm 1.12.10.20: RESYNC: (1.20-1.21); FILE MERGED 2006/05/05 14:32:41 bm 1.12.10.19: #i31098# leave draw shell after Cancel of inserting a chart 2006/05/03 15:46:49 bm 1.12.10.18: #i31098# Enable Cancel for Chart Wizard 2005/11/15 15:33:22 bm 1.12.10.17: dispose chart wizard dialog 2005/10/08 09:54:11 bm 1.12.10.16: RESYNC: (1.19-1.20); FILE MERGED 2005/09/08 11:44:48 iha 1.12.10.15: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter from calc 2005/08/15 13:09:29 bm 1.12.10.14: XDataReceiver changed 2005/08/05 12:43:19 bm 1.12.10.13: open chart creation wizard only when not called via API 2005/06/01 14:37:39 bm 1.12.10.12: Insert New Chart embedded 2005/05/17 13:01:42 bm 1.12.10.11: RESYNC: (1.18-1.19); FILE MERGED 2005/05/09 09:54:27 bm 1.12.10.10: moved chart2 API to data namespace 2005/03/17 13:45:10 bm 1.12.10.9: RESYNC: (1.16-1.18); FILE MERGED 2004/11/02 16:50:32 bm 1.12.10.8: RESYNC: (1.15-1.16); FILE MERGED 2004/08/30 18:08:08 bm 1.12.10.7: RESYNC: (1.13-1.15); FILE MERGED 2004/06/15 18:41:55 bm 1.12.10.6: RESYNC: (1.12-1.13); FILE MERGED 2004/05/05 16:34:56 iha 1.12.10.5: unmark automatic mark range; moved update call to chart 2004/04/08 12:21:47 iha 1.12.10.4: #i20344# init wizard correctly + update view 2004/04/08 09:03:14 iha 1.12.10.3: remove test code 2004/04/08 08:55:15 iha 1.12.10.2: get correct RangeString for chart 2004/04/07 22:03:58 iha 1.12.10.1: #i20344# changed chart creation process - added new chart wizard
2007-05-22 19:06:02 +00:00
{
OSL_FAIL( "Chart wizard couldn't be positioned automatically\n" );
}
}
sal_Int16 nDialogRet = xDialog->execute();
if( nDialogRet == ui::dialogs::ExecutableDialogResults::CANCEL )
{
// leave OLE inplace mode and unmark
OSL_ASSERT( pViewShell );
OSL_ASSERT( pView );
pViewShell->DeactivateOle();
pView->UnmarkAll();
INTEGRATION: CWS chart2mst3 (1.12.10); FILE MERGED 2007/04/25 03:30:58 bm 1.12.10.33: RESYNC: (1.24-1.25); FILE MERGED 2007/04/20 10:41:20 nn 1.12.10.32: #i75307# FuInsertChart: MarkToMulti 2006/12/05 16:28:12 nn 1.12.10.31: #i71257# don't add undo action before the dialog is finished 2006/11/27 00:37:17 bm 1.12.10.30: aw024 adaptions 2006/11/24 18:24:58 bm 1.12.10.29: RESYNC: (1.23-1.24); FILE MERGED 2006/11/23 12:52:52 nn 1.12.10.28: #i71250# removed old chart code 2006/11/10 21:06:35 iha 1.12.10.27: prevent immidiate redraw in wizard and according dialogs (important for charts with many data) 2006/10/25 18:17:54 nn 1.12.10.26: allow range selection from inplace object without deactivating the object 2006/10/19 00:18:35 bm 1.12.10.25: RESYNC: (1.21-1.23); FILE MERGED 2006/10/11 15:10:11 nn 1.12.10.24: #i66867# auto-detect column/row headers 2006/08/04 14:34:01 bm 1.12.10.23: pass the document to the chart2 uno services instead of the docshell, as the shell itself is not really needed, and limits the creation of such objects unnecessarily to the ui 2006/06/24 13:04:39 iha 1.12.10.22: #i54915# chart wizard shouldn't overlap chart if possible 2006/06/22 15:42:13 nn 1.12.10.21: #i13379# default position for chart and dialog 2006/05/05 15:24:08 bm 1.12.10.20: RESYNC: (1.20-1.21); FILE MERGED 2006/05/05 14:32:41 bm 1.12.10.19: #i31098# leave draw shell after Cancel of inserting a chart 2006/05/03 15:46:49 bm 1.12.10.18: #i31098# Enable Cancel for Chart Wizard 2005/11/15 15:33:22 bm 1.12.10.17: dispose chart wizard dialog 2005/10/08 09:54:11 bm 1.12.10.16: RESYNC: (1.19-1.20); FILE MERGED 2005/09/08 11:44:48 iha 1.12.10.15: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter from calc 2005/08/15 13:09:29 bm 1.12.10.14: XDataReceiver changed 2005/08/05 12:43:19 bm 1.12.10.13: open chart creation wizard only when not called via API 2005/06/01 14:37:39 bm 1.12.10.12: Insert New Chart embedded 2005/05/17 13:01:42 bm 1.12.10.11: RESYNC: (1.18-1.19); FILE MERGED 2005/05/09 09:54:27 bm 1.12.10.10: moved chart2 API to data namespace 2005/03/17 13:45:10 bm 1.12.10.9: RESYNC: (1.16-1.18); FILE MERGED 2004/11/02 16:50:32 bm 1.12.10.8: RESYNC: (1.15-1.16); FILE MERGED 2004/08/30 18:08:08 bm 1.12.10.7: RESYNC: (1.13-1.15); FILE MERGED 2004/06/15 18:41:55 bm 1.12.10.6: RESYNC: (1.12-1.13); FILE MERGED 2004/05/05 16:34:56 iha 1.12.10.5: unmark automatic mark range; moved update call to chart 2004/04/08 12:21:47 iha 1.12.10.4: #i20344# init wizard correctly + update view 2004/04/08 09:03:14 iha 1.12.10.3: remove test code 2004/04/08 08:55:15 iha 1.12.10.2: get correct RangeString for chart 2004/04/07 22:03:58 iha 1.12.10.1: #i20344# changed chart creation process - added new chart wizard
2007-05-22 19:06:02 +00:00
// old page view pointer is invalid after switching sheets
pPV = pView->GetSdrPageView();
INTEGRATION: CWS chart2mst3 (1.12.10); FILE MERGED 2007/04/25 03:30:58 bm 1.12.10.33: RESYNC: (1.24-1.25); FILE MERGED 2007/04/20 10:41:20 nn 1.12.10.32: #i75307# FuInsertChart: MarkToMulti 2006/12/05 16:28:12 nn 1.12.10.31: #i71257# don't add undo action before the dialog is finished 2006/11/27 00:37:17 bm 1.12.10.30: aw024 adaptions 2006/11/24 18:24:58 bm 1.12.10.29: RESYNC: (1.23-1.24); FILE MERGED 2006/11/23 12:52:52 nn 1.12.10.28: #i71250# removed old chart code 2006/11/10 21:06:35 iha 1.12.10.27: prevent immidiate redraw in wizard and according dialogs (important for charts with many data) 2006/10/25 18:17:54 nn 1.12.10.26: allow range selection from inplace object without deactivating the object 2006/10/19 00:18:35 bm 1.12.10.25: RESYNC: (1.21-1.23); FILE MERGED 2006/10/11 15:10:11 nn 1.12.10.24: #i66867# auto-detect column/row headers 2006/08/04 14:34:01 bm 1.12.10.23: pass the document to the chart2 uno services instead of the docshell, as the shell itself is not really needed, and limits the creation of such objects unnecessarily to the ui 2006/06/24 13:04:39 iha 1.12.10.22: #i54915# chart wizard shouldn't overlap chart if possible 2006/06/22 15:42:13 nn 1.12.10.21: #i13379# default position for chart and dialog 2006/05/05 15:24:08 bm 1.12.10.20: RESYNC: (1.20-1.21); FILE MERGED 2006/05/05 14:32:41 bm 1.12.10.19: #i31098# leave draw shell after Cancel of inserting a chart 2006/05/03 15:46:49 bm 1.12.10.18: #i31098# Enable Cancel for Chart Wizard 2005/11/15 15:33:22 bm 1.12.10.17: dispose chart wizard dialog 2005/10/08 09:54:11 bm 1.12.10.16: RESYNC: (1.19-1.20); FILE MERGED 2005/09/08 11:44:48 iha 1.12.10.15: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter from calc 2005/08/15 13:09:29 bm 1.12.10.14: XDataReceiver changed 2005/08/05 12:43:19 bm 1.12.10.13: open chart creation wizard only when not called via API 2005/06/01 14:37:39 bm 1.12.10.12: Insert New Chart embedded 2005/05/17 13:01:42 bm 1.12.10.11: RESYNC: (1.18-1.19); FILE MERGED 2005/05/09 09:54:27 bm 1.12.10.10: moved chart2 API to data namespace 2005/03/17 13:45:10 bm 1.12.10.9: RESYNC: (1.16-1.18); FILE MERGED 2004/11/02 16:50:32 bm 1.12.10.8: RESYNC: (1.15-1.16); FILE MERGED 2004/08/30 18:08:08 bm 1.12.10.7: RESYNC: (1.13-1.15); FILE MERGED 2004/06/15 18:41:55 bm 1.12.10.6: RESYNC: (1.12-1.13); FILE MERGED 2004/05/05 16:34:56 iha 1.12.10.5: unmark automatic mark range; moved update call to chart 2004/04/08 12:21:47 iha 1.12.10.4: #i20344# init wizard correctly + update view 2004/04/08 09:03:14 iha 1.12.10.3: remove test code 2004/04/08 08:55:15 iha 1.12.10.2: get correct RangeString for chart 2004/04/07 22:03:58 iha 1.12.10.1: #i20344# changed chart creation process - added new chart wizard
2007-05-22 19:06:02 +00:00
// remove the chart
OSL_ASSERT( pPV );
SdrPage * pPage( pPV->GetPage());
OSL_ASSERT( pPage );
OSL_ASSERT( pObj );
if( pPage )
{
// Remove the OLE2 object from the sdr page.
SdrObject* pRemoved = pPage->RemoveObject(pObj->GetOrdNum());
OSL_ASSERT(pRemoved == pObj);
SdrObject::Free(pRemoved); // Don't forget to free it.
}
INTEGRATION: CWS chart2mst3 (1.12.10); FILE MERGED 2007/04/25 03:30:58 bm 1.12.10.33: RESYNC: (1.24-1.25); FILE MERGED 2007/04/20 10:41:20 nn 1.12.10.32: #i75307# FuInsertChart: MarkToMulti 2006/12/05 16:28:12 nn 1.12.10.31: #i71257# don't add undo action before the dialog is finished 2006/11/27 00:37:17 bm 1.12.10.30: aw024 adaptions 2006/11/24 18:24:58 bm 1.12.10.29: RESYNC: (1.23-1.24); FILE MERGED 2006/11/23 12:52:52 nn 1.12.10.28: #i71250# removed old chart code 2006/11/10 21:06:35 iha 1.12.10.27: prevent immidiate redraw in wizard and according dialogs (important for charts with many data) 2006/10/25 18:17:54 nn 1.12.10.26: allow range selection from inplace object without deactivating the object 2006/10/19 00:18:35 bm 1.12.10.25: RESYNC: (1.21-1.23); FILE MERGED 2006/10/11 15:10:11 nn 1.12.10.24: #i66867# auto-detect column/row headers 2006/08/04 14:34:01 bm 1.12.10.23: pass the document to the chart2 uno services instead of the docshell, as the shell itself is not really needed, and limits the creation of such objects unnecessarily to the ui 2006/06/24 13:04:39 iha 1.12.10.22: #i54915# chart wizard shouldn't overlap chart if possible 2006/06/22 15:42:13 nn 1.12.10.21: #i13379# default position for chart and dialog 2006/05/05 15:24:08 bm 1.12.10.20: RESYNC: (1.20-1.21); FILE MERGED 2006/05/05 14:32:41 bm 1.12.10.19: #i31098# leave draw shell after Cancel of inserting a chart 2006/05/03 15:46:49 bm 1.12.10.18: #i31098# Enable Cancel for Chart Wizard 2005/11/15 15:33:22 bm 1.12.10.17: dispose chart wizard dialog 2005/10/08 09:54:11 bm 1.12.10.16: RESYNC: (1.19-1.20); FILE MERGED 2005/09/08 11:44:48 iha 1.12.10.15: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter from calc 2005/08/15 13:09:29 bm 1.12.10.14: XDataReceiver changed 2005/08/05 12:43:19 bm 1.12.10.13: open chart creation wizard only when not called via API 2005/06/01 14:37:39 bm 1.12.10.12: Insert New Chart embedded 2005/05/17 13:01:42 bm 1.12.10.11: RESYNC: (1.18-1.19); FILE MERGED 2005/05/09 09:54:27 bm 1.12.10.10: moved chart2 API to data namespace 2005/03/17 13:45:10 bm 1.12.10.9: RESYNC: (1.16-1.18); FILE MERGED 2004/11/02 16:50:32 bm 1.12.10.8: RESYNC: (1.15-1.16); FILE MERGED 2004/08/30 18:08:08 bm 1.12.10.7: RESYNC: (1.13-1.15); FILE MERGED 2004/06/15 18:41:55 bm 1.12.10.6: RESYNC: (1.12-1.13); FILE MERGED 2004/05/05 16:34:56 iha 1.12.10.5: unmark automatic mark range; moved update call to chart 2004/04/08 12:21:47 iha 1.12.10.4: #i20344# init wizard correctly + update view 2004/04/08 09:03:14 iha 1.12.10.3: remove test code 2004/04/08 08:55:15 iha 1.12.10.2: get correct RangeString for chart 2004/04/07 22:03:58 iha 1.12.10.1: #i20344# changed chart creation process - added new chart wizard
2007-05-22 19:06:02 +00:00
bAddUndo = false; // don't create the undo action for inserting
INTEGRATION: CWS chart2mst3 (1.12.10); FILE MERGED 2007/04/25 03:30:58 bm 1.12.10.33: RESYNC: (1.24-1.25); FILE MERGED 2007/04/20 10:41:20 nn 1.12.10.32: #i75307# FuInsertChart: MarkToMulti 2006/12/05 16:28:12 nn 1.12.10.31: #i71257# don't add undo action before the dialog is finished 2006/11/27 00:37:17 bm 1.12.10.30: aw024 adaptions 2006/11/24 18:24:58 bm 1.12.10.29: RESYNC: (1.23-1.24); FILE MERGED 2006/11/23 12:52:52 nn 1.12.10.28: #i71250# removed old chart code 2006/11/10 21:06:35 iha 1.12.10.27: prevent immidiate redraw in wizard and according dialogs (important for charts with many data) 2006/10/25 18:17:54 nn 1.12.10.26: allow range selection from inplace object without deactivating the object 2006/10/19 00:18:35 bm 1.12.10.25: RESYNC: (1.21-1.23); FILE MERGED 2006/10/11 15:10:11 nn 1.12.10.24: #i66867# auto-detect column/row headers 2006/08/04 14:34:01 bm 1.12.10.23: pass the document to the chart2 uno services instead of the docshell, as the shell itself is not really needed, and limits the creation of such objects unnecessarily to the ui 2006/06/24 13:04:39 iha 1.12.10.22: #i54915# chart wizard shouldn't overlap chart if possible 2006/06/22 15:42:13 nn 1.12.10.21: #i13379# default position for chart and dialog 2006/05/05 15:24:08 bm 1.12.10.20: RESYNC: (1.20-1.21); FILE MERGED 2006/05/05 14:32:41 bm 1.12.10.19: #i31098# leave draw shell after Cancel of inserting a chart 2006/05/03 15:46:49 bm 1.12.10.18: #i31098# Enable Cancel for Chart Wizard 2005/11/15 15:33:22 bm 1.12.10.17: dispose chart wizard dialog 2005/10/08 09:54:11 bm 1.12.10.16: RESYNC: (1.19-1.20); FILE MERGED 2005/09/08 11:44:48 iha 1.12.10.15: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter from calc 2005/08/15 13:09:29 bm 1.12.10.14: XDataReceiver changed 2005/08/05 12:43:19 bm 1.12.10.13: open chart creation wizard only when not called via API 2005/06/01 14:37:39 bm 1.12.10.12: Insert New Chart embedded 2005/05/17 13:01:42 bm 1.12.10.11: RESYNC: (1.18-1.19); FILE MERGED 2005/05/09 09:54:27 bm 1.12.10.10: moved chart2 API to data namespace 2005/03/17 13:45:10 bm 1.12.10.9: RESYNC: (1.16-1.18); FILE MERGED 2004/11/02 16:50:32 bm 1.12.10.8: RESYNC: (1.15-1.16); FILE MERGED 2004/08/30 18:08:08 bm 1.12.10.7: RESYNC: (1.13-1.15); FILE MERGED 2004/06/15 18:41:55 bm 1.12.10.6: RESYNC: (1.12-1.13); FILE MERGED 2004/05/05 16:34:56 iha 1.12.10.5: unmark automatic mark range; moved update call to chart 2004/04/08 12:21:47 iha 1.12.10.4: #i20344# init wizard correctly + update view 2004/04/08 09:03:14 iha 1.12.10.3: remove test code 2004/04/08 08:55:15 iha 1.12.10.2: get correct RangeString for chart 2004/04/07 22:03:58 iha 1.12.10.1: #i20344# changed chart creation process - added new chart wizard
2007-05-22 19:06:02 +00:00
// leave the draw shell
pViewShell->SetDrawShell( false );
// reset marked cell area
pViewSh->GetViewData().GetViewShell()->SetMarkData(aMark);
}
else
{
OSL_ASSERT( nDialogRet == ui::dialogs::ExecutableDialogResults::OK );
//@todo maybe move chart to different table
INTEGRATION: CWS chart2mst3 (1.12.10); FILE MERGED 2007/04/25 03:30:58 bm 1.12.10.33: RESYNC: (1.24-1.25); FILE MERGED 2007/04/20 10:41:20 nn 1.12.10.32: #i75307# FuInsertChart: MarkToMulti 2006/12/05 16:28:12 nn 1.12.10.31: #i71257# don't add undo action before the dialog is finished 2006/11/27 00:37:17 bm 1.12.10.30: aw024 adaptions 2006/11/24 18:24:58 bm 1.12.10.29: RESYNC: (1.23-1.24); FILE MERGED 2006/11/23 12:52:52 nn 1.12.10.28: #i71250# removed old chart code 2006/11/10 21:06:35 iha 1.12.10.27: prevent immidiate redraw in wizard and according dialogs (important for charts with many data) 2006/10/25 18:17:54 nn 1.12.10.26: allow range selection from inplace object without deactivating the object 2006/10/19 00:18:35 bm 1.12.10.25: RESYNC: (1.21-1.23); FILE MERGED 2006/10/11 15:10:11 nn 1.12.10.24: #i66867# auto-detect column/row headers 2006/08/04 14:34:01 bm 1.12.10.23: pass the document to the chart2 uno services instead of the docshell, as the shell itself is not really needed, and limits the creation of such objects unnecessarily to the ui 2006/06/24 13:04:39 iha 1.12.10.22: #i54915# chart wizard shouldn't overlap chart if possible 2006/06/22 15:42:13 nn 1.12.10.21: #i13379# default position for chart and dialog 2006/05/05 15:24:08 bm 1.12.10.20: RESYNC: (1.20-1.21); FILE MERGED 2006/05/05 14:32:41 bm 1.12.10.19: #i31098# leave draw shell after Cancel of inserting a chart 2006/05/03 15:46:49 bm 1.12.10.18: #i31098# Enable Cancel for Chart Wizard 2005/11/15 15:33:22 bm 1.12.10.17: dispose chart wizard dialog 2005/10/08 09:54:11 bm 1.12.10.16: RESYNC: (1.19-1.20); FILE MERGED 2005/09/08 11:44:48 iha 1.12.10.15: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter from calc 2005/08/15 13:09:29 bm 1.12.10.14: XDataReceiver changed 2005/08/05 12:43:19 bm 1.12.10.13: open chart creation wizard only when not called via API 2005/06/01 14:37:39 bm 1.12.10.12: Insert New Chart embedded 2005/05/17 13:01:42 bm 1.12.10.11: RESYNC: (1.18-1.19); FILE MERGED 2005/05/09 09:54:27 bm 1.12.10.10: moved chart2 API to data namespace 2005/03/17 13:45:10 bm 1.12.10.9: RESYNC: (1.16-1.18); FILE MERGED 2004/11/02 16:50:32 bm 1.12.10.8: RESYNC: (1.15-1.16); FILE MERGED 2004/08/30 18:08:08 bm 1.12.10.7: RESYNC: (1.13-1.15); FILE MERGED 2004/06/15 18:41:55 bm 1.12.10.6: RESYNC: (1.12-1.13); FILE MERGED 2004/05/05 16:34:56 iha 1.12.10.5: unmark automatic mark range; moved update call to chart 2004/04/08 12:21:47 iha 1.12.10.4: #i20344# init wizard correctly + update view 2004/04/08 09:03:14 iha 1.12.10.3: remove test code 2004/04/08 08:55:15 iha 1.12.10.2: get correct RangeString for chart 2004/04/07 22:03:58 iha 1.12.10.1: #i20344# changed chart creation process - added new chart wizard
2007-05-22 19:06:02 +00:00
}
}
uno::Reference< lang::XComponent > xComponent( xDialog, uno::UNO_QUERY );
if( xComponent.is())
xComponent->dispose();
}
2000-09-18 16:07:07 +00:00
}
}
2000-09-18 16:07:07 +00:00
if ( bAddUndo )
{
// add undo action the same way as in SdrEditView::InsertObjectAtView
// (using UndoActionHdl etc.)
pView->AddUndo(new SdrUndoNewObj(*pObj));
}
// BM/IHA --
2000-09-18 16:07:07 +00:00
}
void FuInsertChart::Activate()
{
FuPoor::Activate();
}
void FuInsertChart::Deactivate()
{
FuPoor::Deactivate();
}
FuInsertChartFromFile::FuInsertChartFromFile( ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawView* pViewP,
SdrModel* pDoc, SfxRequest& rReq, const OUString& rURL):
FuPoor(pViewSh, pWin, pViewP, pDoc, rReq)
{
uno::Reference< io::XInputStream > xStorage = comphelper::OStorageHelper::GetInputStreamFromURL(
rURL, comphelper::getProcessComponentContext());
comphelper::EmbeddedObjectContainer& rObjContainer =
pViewShell->GetObjectShell()->GetEmbeddedObjectContainer();
OUString aName;
uno::Reference< embed::XEmbeddedObject > xObj = rObjContainer.InsertEmbeddedObject( xStorage, aName );
const sal_Int64 nAspect = embed::Aspects::MSOLE_CONTENT;
awt::Size aSz = xObj->getVisualAreaSize( nAspect );
Size aSize( aSz.Width, aSz.Height );
ScRange aPositionRange = pViewSh->GetViewData().GetCurPos();
Point aStart = pViewSh->GetChartInsertPos( aSize, aPositionRange );
Rectangle aRect (aStart, aSize);
SdrOle2Obj* pObj = new SdrOle2Obj( svt::EmbeddedObjectRef( xObj, nAspect ), aName, aRect);
SdrPageView* pPV = pView->GetSdrPageView();
// use the page instead of the view to insert, so no undo action is created yet
SdrPage* pInsPage = pPV->GetPage();
pInsPage->InsertObject( pObj );
pView->UnmarkAllObj();
pView->MarkObj( pObj, pPV );
pViewShell->ActivateObject( pObj, SVVERB_SHOW );
}
void FuInsertChartFromFile::Activate()
{
FuPoor::Activate();
}
void FuInsertChartFromFile::Deactivate()
{
FuPoor::Deactivate();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */