Files
libreoffice/sw/source/ui/table/chartins.cxx

276 lines
11 KiB
C++
Raw Normal View History

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2000-09-18 16:15:01 +00:00
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2000-09-18 16:15:01 +00:00
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
2000-09-18 16:15:01 +00:00
*
* OpenOffice.org - a multi-platform office productivity suite
2000-09-18 16:15:01 +00:00
*
* This file is part of OpenOffice.org.
2000-09-18 16:15:01 +00:00
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
2000-09-18 16:15:01 +00:00
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
2000-09-18 16:15:01 +00:00
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
2000-09-18 16:15:01 +00:00
*
************************************************************************/
#include <sfx2/viewfrm.hxx>
#include <vcl/msgbox.hxx>
#include <sfx2/dispatch.hxx>
INTEGRATION: CWS chart2mst3 (1.8.248); FILE MERGED 2007/02/19 14:29:24 tl 1.8.248.22: #i74540# handling multiple charts; GetChartDataProvider improved 2007/01/29 14:07:20 tl 1.8.248.21: #i55007#, #i73791# automatic update for charts, and update charts for undo-actions 2006/12/07 11:20:30 tl 1.8.248.20: #i71244# update chart in writer 2006/11/29 09:49:46 tl 1.8.248.19: #i71246# child window removed 2006/11/22 13:22:23 tl 1.8.248.18: #i71246# positioning of the new chart wizard to not hide the already inserted chart 2006/11/10 13:47:56 tl 1.8.248.17: #i71245#, #i69313#; old chart removed, fixed incorrectly shown default chart 2006/11/09 08:41:07 ama 1.8.248.16: Fix #i68825#: No Redo for canceled chart 2006/10/19 09:27:43 bm 1.8.248.15: RESYNC: (1.14-1.15); FILE MERGED 2006/08/03 12:15:52 tl 1.8.248.14: #i66176# delte chart object when wizard dialog was canceled 2006/08/03 10:48:52 tl 1.8.248.13: #i66176# delte chart object when wizard dialog was canceled 2006/06/20 17:10:59 bm 1.8.248.12: #i66558# correct evaluation of return value of XExecutableDialog::execute() 2006/05/05 18:35:18 bm 1.8.248.11: RESYNC: (1.13-1.14); FILE MERGED 2005/11/15 16:31:41 bm 1.8.248.10: dispose chart wizard dialog after use 2005/10/09 06:39:33 bm 1.8.248.9: RESYNC: (1.12-1.13); FILE MERGED 2005/09/08 11:49:57 iha 1.8.248.8: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter of the parent 2005/08/15 13:10:12 bm 1.8.248.7: XDataReceiver changed 2005/08/05 12:59:51 bm 1.8.248.6: insert new charts as real OLE objects 2005/05/09 09:56:11 bm 1.8.248.5: moved chart2 API to data namespace 2005/03/17 18:11:10 bm 1.8.248.4: RESYNC: (1.10-1.12); FILE MERGED 2004/11/02 18:40:28 bm 1.8.248.3: RESYNC: (1.8-1.10); FILE MERGED 2004/06/10 11:56:35 tl 1.8.248.2: #i30052# chart2 support 2004/05/06 14:56:28 iha 1.8.248.1: #i20344# new wizard for new chart - old stuff has to be removed from code still
2007-05-22 15:39:27 +00:00
#include <sfx2/basedlgs.hxx>
#include <IDocumentUndoRedo.hxx>
2000-09-18 16:15:01 +00:00
#include <sfx2/app.hxx>
2000-09-18 16:15:01 +00:00
#include <swtypes.hxx>
#include <swmodule.hxx>
#include <wrtsh.hxx>
INTEGRATION: CWS chart2mst3 (1.8.248); FILE MERGED 2007/02/19 14:29:24 tl 1.8.248.22: #i74540# handling multiple charts; GetChartDataProvider improved 2007/01/29 14:07:20 tl 1.8.248.21: #i55007#, #i73791# automatic update for charts, and update charts for undo-actions 2006/12/07 11:20:30 tl 1.8.248.20: #i71244# update chart in writer 2006/11/29 09:49:46 tl 1.8.248.19: #i71246# child window removed 2006/11/22 13:22:23 tl 1.8.248.18: #i71246# positioning of the new chart wizard to not hide the already inserted chart 2006/11/10 13:47:56 tl 1.8.248.17: #i71245#, #i69313#; old chart removed, fixed incorrectly shown default chart 2006/11/09 08:41:07 ama 1.8.248.16: Fix #i68825#: No Redo for canceled chart 2006/10/19 09:27:43 bm 1.8.248.15: RESYNC: (1.14-1.15); FILE MERGED 2006/08/03 12:15:52 tl 1.8.248.14: #i66176# delte chart object when wizard dialog was canceled 2006/08/03 10:48:52 tl 1.8.248.13: #i66176# delte chart object when wizard dialog was canceled 2006/06/20 17:10:59 bm 1.8.248.12: #i66558# correct evaluation of return value of XExecutableDialog::execute() 2006/05/05 18:35:18 bm 1.8.248.11: RESYNC: (1.13-1.14); FILE MERGED 2005/11/15 16:31:41 bm 1.8.248.10: dispose chart wizard dialog after use 2005/10/09 06:39:33 bm 1.8.248.9: RESYNC: (1.12-1.13); FILE MERGED 2005/09/08 11:49:57 iha 1.8.248.8: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter of the parent 2005/08/15 13:10:12 bm 1.8.248.7: XDataReceiver changed 2005/08/05 12:59:51 bm 1.8.248.6: insert new charts as real OLE objects 2005/05/09 09:56:11 bm 1.8.248.5: moved chart2 API to data namespace 2005/03/17 18:11:10 bm 1.8.248.4: RESYNC: (1.10-1.12); FILE MERGED 2004/11/02 18:40:28 bm 1.8.248.3: RESYNC: (1.8-1.10); FILE MERGED 2004/06/10 11:56:35 tl 1.8.248.2: #i30052# chart2 support 2004/05/06 14:56:28 iha 1.8.248.1: #i20344# new wizard for new chart - old stuff has to be removed from code still
2007-05-22 15:39:27 +00:00
#include <docsh.hxx>
2000-09-18 16:15:01 +00:00
#include <view.hxx>
#include <chartins.hxx>
#include <tablemgr.hxx>
#include <frmfmt.hxx>
#include <swtable.hxx>
#include <tblsel.hxx>
INTEGRATION: CWS chart2mst3 (1.8.248); FILE MERGED 2007/02/19 14:29:24 tl 1.8.248.22: #i74540# handling multiple charts; GetChartDataProvider improved 2007/01/29 14:07:20 tl 1.8.248.21: #i55007#, #i73791# automatic update for charts, and update charts for undo-actions 2006/12/07 11:20:30 tl 1.8.248.20: #i71244# update chart in writer 2006/11/29 09:49:46 tl 1.8.248.19: #i71246# child window removed 2006/11/22 13:22:23 tl 1.8.248.18: #i71246# positioning of the new chart wizard to not hide the already inserted chart 2006/11/10 13:47:56 tl 1.8.248.17: #i71245#, #i69313#; old chart removed, fixed incorrectly shown default chart 2006/11/09 08:41:07 ama 1.8.248.16: Fix #i68825#: No Redo for canceled chart 2006/10/19 09:27:43 bm 1.8.248.15: RESYNC: (1.14-1.15); FILE MERGED 2006/08/03 12:15:52 tl 1.8.248.14: #i66176# delte chart object when wizard dialog was canceled 2006/08/03 10:48:52 tl 1.8.248.13: #i66176# delte chart object when wizard dialog was canceled 2006/06/20 17:10:59 bm 1.8.248.12: #i66558# correct evaluation of return value of XExecutableDialog::execute() 2006/05/05 18:35:18 bm 1.8.248.11: RESYNC: (1.13-1.14); FILE MERGED 2005/11/15 16:31:41 bm 1.8.248.10: dispose chart wizard dialog after use 2005/10/09 06:39:33 bm 1.8.248.9: RESYNC: (1.12-1.13); FILE MERGED 2005/09/08 11:49:57 iha 1.8.248.8: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter of the parent 2005/08/15 13:10:12 bm 1.8.248.7: XDataReceiver changed 2005/08/05 12:59:51 bm 1.8.248.6: insert new charts as real OLE objects 2005/05/09 09:56:11 bm 1.8.248.5: moved chart2 API to data namespace 2005/03/17 18:11:10 bm 1.8.248.4: RESYNC: (1.10-1.12); FILE MERGED 2004/11/02 18:40:28 bm 1.8.248.3: RESYNC: (1.8-1.10); FILE MERGED 2004/06/10 11:56:35 tl 1.8.248.2: #i30052# chart2 support 2004/05/06 14:56:28 iha 1.8.248.1: #i20344# new wizard for new chart - old stuff has to be removed from code still
2007-05-22 15:39:27 +00:00
#include <unochart.hxx>
#include <autoedit.hxx>
#include <doc.hxx>
#include <edtwin.hxx>
2000-09-18 16:15:01 +00:00
#include <cmdid.h>
#include <chartins.hrc>
INTEGRATION: CWS chart2mst3 (1.8.248); FILE MERGED 2007/02/19 14:29:24 tl 1.8.248.22: #i74540# handling multiple charts; GetChartDataProvider improved 2007/01/29 14:07:20 tl 1.8.248.21: #i55007#, #i73791# automatic update for charts, and update charts for undo-actions 2006/12/07 11:20:30 tl 1.8.248.20: #i71244# update chart in writer 2006/11/29 09:49:46 tl 1.8.248.19: #i71246# child window removed 2006/11/22 13:22:23 tl 1.8.248.18: #i71246# positioning of the new chart wizard to not hide the already inserted chart 2006/11/10 13:47:56 tl 1.8.248.17: #i71245#, #i69313#; old chart removed, fixed incorrectly shown default chart 2006/11/09 08:41:07 ama 1.8.248.16: Fix #i68825#: No Redo for canceled chart 2006/10/19 09:27:43 bm 1.8.248.15: RESYNC: (1.14-1.15); FILE MERGED 2006/08/03 12:15:52 tl 1.8.248.14: #i66176# delte chart object when wizard dialog was canceled 2006/08/03 10:48:52 tl 1.8.248.13: #i66176# delte chart object when wizard dialog was canceled 2006/06/20 17:10:59 bm 1.8.248.12: #i66558# correct evaluation of return value of XExecutableDialog::execute() 2006/05/05 18:35:18 bm 1.8.248.11: RESYNC: (1.13-1.14); FILE MERGED 2005/11/15 16:31:41 bm 1.8.248.10: dispose chart wizard dialog after use 2005/10/09 06:39:33 bm 1.8.248.9: RESYNC: (1.12-1.13); FILE MERGED 2005/09/08 11:49:57 iha 1.8.248.8: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter of the parent 2005/08/15 13:10:12 bm 1.8.248.7: XDataReceiver changed 2005/08/05 12:59:51 bm 1.8.248.6: insert new charts as real OLE objects 2005/05/09 09:56:11 bm 1.8.248.5: moved chart2 API to data namespace 2005/03/17 18:11:10 bm 1.8.248.4: RESYNC: (1.10-1.12); FILE MERGED 2004/11/02 18:40:28 bm 1.8.248.3: RESYNC: (1.8-1.10); FILE MERGED 2004/06/10 11:56:35 tl 1.8.248.2: #i30052# chart2 support 2004/05/06 14:56:28 iha 1.8.248.1: #i20344# new wizard for new chart - old stuff has to be removed from code still
2007-05-22 15:39:27 +00:00
#include <anchoredobject.hxx>
2000-09-18 16:15:01 +00:00
#include <sot/clsids.hxx>
2000-09-18 16:15:01 +00:00
INTEGRATION: CWS chart2mst3 (1.8.248); FILE MERGED 2007/02/19 14:29:24 tl 1.8.248.22: #i74540# handling multiple charts; GetChartDataProvider improved 2007/01/29 14:07:20 tl 1.8.248.21: #i55007#, #i73791# automatic update for charts, and update charts for undo-actions 2006/12/07 11:20:30 tl 1.8.248.20: #i71244# update chart in writer 2006/11/29 09:49:46 tl 1.8.248.19: #i71246# child window removed 2006/11/22 13:22:23 tl 1.8.248.18: #i71246# positioning of the new chart wizard to not hide the already inserted chart 2006/11/10 13:47:56 tl 1.8.248.17: #i71245#, #i69313#; old chart removed, fixed incorrectly shown default chart 2006/11/09 08:41:07 ama 1.8.248.16: Fix #i68825#: No Redo for canceled chart 2006/10/19 09:27:43 bm 1.8.248.15: RESYNC: (1.14-1.15); FILE MERGED 2006/08/03 12:15:52 tl 1.8.248.14: #i66176# delte chart object when wizard dialog was canceled 2006/08/03 10:48:52 tl 1.8.248.13: #i66176# delte chart object when wizard dialog was canceled 2006/06/20 17:10:59 bm 1.8.248.12: #i66558# correct evaluation of return value of XExecutableDialog::execute() 2006/05/05 18:35:18 bm 1.8.248.11: RESYNC: (1.13-1.14); FILE MERGED 2005/11/15 16:31:41 bm 1.8.248.10: dispose chart wizard dialog after use 2005/10/09 06:39:33 bm 1.8.248.9: RESYNC: (1.12-1.13); FILE MERGED 2005/09/08 11:49:57 iha 1.8.248.8: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter of the parent 2005/08/15 13:10:12 bm 1.8.248.7: XDataReceiver changed 2005/08/05 12:59:51 bm 1.8.248.6: insert new charts as real OLE objects 2005/05/09 09:56:11 bm 1.8.248.5: moved chart2 API to data namespace 2005/03/17 18:11:10 bm 1.8.248.4: RESYNC: (1.10-1.12); FILE MERGED 2004/11/02 18:40:28 bm 1.8.248.3: RESYNC: (1.8-1.10); FILE MERGED 2004/06/10 11:56:35 tl 1.8.248.2: #i30052# chart2 support 2004/05/06 14:56:28 iha 1.8.248.1: #i20344# new wizard for new chart - old stuff has to be removed from code still
2007-05-22 15:39:27 +00:00
#include <cppuhelper/bootstrap.hxx>
#include <cppuhelper/component_context.hxx>
#include <comphelper/processfactory.hxx>
#include <com/sun/star/chart2/data/XDataProvider.hpp>
#include <com/sun/star/chart2/data/XDataReceiver.hpp>
#include <com/sun/star/chart/ChartDataRowSource.hpp>
#include <com/sun/star/frame/XComponentLoader.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
#include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp>
#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
2000-09-18 16:15:01 +00:00
INTEGRATION: CWS chart2mst3 (1.8.248); FILE MERGED 2007/02/19 14:29:24 tl 1.8.248.22: #i74540# handling multiple charts; GetChartDataProvider improved 2007/01/29 14:07:20 tl 1.8.248.21: #i55007#, #i73791# automatic update for charts, and update charts for undo-actions 2006/12/07 11:20:30 tl 1.8.248.20: #i71244# update chart in writer 2006/11/29 09:49:46 tl 1.8.248.19: #i71246# child window removed 2006/11/22 13:22:23 tl 1.8.248.18: #i71246# positioning of the new chart wizard to not hide the already inserted chart 2006/11/10 13:47:56 tl 1.8.248.17: #i71245#, #i69313#; old chart removed, fixed incorrectly shown default chart 2006/11/09 08:41:07 ama 1.8.248.16: Fix #i68825#: No Redo for canceled chart 2006/10/19 09:27:43 bm 1.8.248.15: RESYNC: (1.14-1.15); FILE MERGED 2006/08/03 12:15:52 tl 1.8.248.14: #i66176# delte chart object when wizard dialog was canceled 2006/08/03 10:48:52 tl 1.8.248.13: #i66176# delte chart object when wizard dialog was canceled 2006/06/20 17:10:59 bm 1.8.248.12: #i66558# correct evaluation of return value of XExecutableDialog::execute() 2006/05/05 18:35:18 bm 1.8.248.11: RESYNC: (1.13-1.14); FILE MERGED 2005/11/15 16:31:41 bm 1.8.248.10: dispose chart wizard dialog after use 2005/10/09 06:39:33 bm 1.8.248.9: RESYNC: (1.12-1.13); FILE MERGED 2005/09/08 11:49:57 iha 1.8.248.8: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter of the parent 2005/08/15 13:10:12 bm 1.8.248.7: XDataReceiver changed 2005/08/05 12:59:51 bm 1.8.248.6: insert new charts as real OLE objects 2005/05/09 09:56:11 bm 1.8.248.5: moved chart2 API to data namespace 2005/03/17 18:11:10 bm 1.8.248.4: RESYNC: (1.10-1.12); FILE MERGED 2004/11/02 18:40:28 bm 1.8.248.3: RESYNC: (1.8-1.10); FILE MERGED 2004/06/10 11:56:35 tl 1.8.248.2: #i30052# chart2 support 2004/05/06 14:56:28 iha 1.8.248.1: #i20344# new wizard for new chart - old stuff has to be removed from code still
2007-05-22 15:39:27 +00:00
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using ::rtl::OUString;
2000-09-18 16:15:01 +00:00
INTEGRATION: CWS chart2mst3 (1.8.248); FILE MERGED 2007/02/19 14:29:24 tl 1.8.248.22: #i74540# handling multiple charts; GetChartDataProvider improved 2007/01/29 14:07:20 tl 1.8.248.21: #i55007#, #i73791# automatic update for charts, and update charts for undo-actions 2006/12/07 11:20:30 tl 1.8.248.20: #i71244# update chart in writer 2006/11/29 09:49:46 tl 1.8.248.19: #i71246# child window removed 2006/11/22 13:22:23 tl 1.8.248.18: #i71246# positioning of the new chart wizard to not hide the already inserted chart 2006/11/10 13:47:56 tl 1.8.248.17: #i71245#, #i69313#; old chart removed, fixed incorrectly shown default chart 2006/11/09 08:41:07 ama 1.8.248.16: Fix #i68825#: No Redo for canceled chart 2006/10/19 09:27:43 bm 1.8.248.15: RESYNC: (1.14-1.15); FILE MERGED 2006/08/03 12:15:52 tl 1.8.248.14: #i66176# delte chart object when wizard dialog was canceled 2006/08/03 10:48:52 tl 1.8.248.13: #i66176# delte chart object when wizard dialog was canceled 2006/06/20 17:10:59 bm 1.8.248.12: #i66558# correct evaluation of return value of XExecutableDialog::execute() 2006/05/05 18:35:18 bm 1.8.248.11: RESYNC: (1.13-1.14); FILE MERGED 2005/11/15 16:31:41 bm 1.8.248.10: dispose chart wizard dialog after use 2005/10/09 06:39:33 bm 1.8.248.9: RESYNC: (1.12-1.13); FILE MERGED 2005/09/08 11:49:57 iha 1.8.248.8: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter of the parent 2005/08/15 13:10:12 bm 1.8.248.7: XDataReceiver changed 2005/08/05 12:59:51 bm 1.8.248.6: insert new charts as real OLE objects 2005/05/09 09:56:11 bm 1.8.248.5: moved chart2 API to data namespace 2005/03/17 18:11:10 bm 1.8.248.4: RESYNC: (1.10-1.12); FILE MERGED 2004/11/02 18:40:28 bm 1.8.248.3: RESYNC: (1.8-1.10); FILE MERGED 2004/06/10 11:56:35 tl 1.8.248.2: #i30052# chart2 support 2004/05/06 14:56:28 iha 1.8.248.1: #i20344# new wizard for new chart - old stuff has to be removed from code still
2007-05-22 15:39:27 +00:00
Point SwGetChartDialogPos( const Window *pParentWin, const Size& rDialogSize, const Rectangle& rLogicChart )
2000-09-18 16:15:01 +00:00
{
INTEGRATION: CWS chart2mst3 (1.8.248); FILE MERGED 2007/02/19 14:29:24 tl 1.8.248.22: #i74540# handling multiple charts; GetChartDataProvider improved 2007/01/29 14:07:20 tl 1.8.248.21: #i55007#, #i73791# automatic update for charts, and update charts for undo-actions 2006/12/07 11:20:30 tl 1.8.248.20: #i71244# update chart in writer 2006/11/29 09:49:46 tl 1.8.248.19: #i71246# child window removed 2006/11/22 13:22:23 tl 1.8.248.18: #i71246# positioning of the new chart wizard to not hide the already inserted chart 2006/11/10 13:47:56 tl 1.8.248.17: #i71245#, #i69313#; old chart removed, fixed incorrectly shown default chart 2006/11/09 08:41:07 ama 1.8.248.16: Fix #i68825#: No Redo for canceled chart 2006/10/19 09:27:43 bm 1.8.248.15: RESYNC: (1.14-1.15); FILE MERGED 2006/08/03 12:15:52 tl 1.8.248.14: #i66176# delte chart object when wizard dialog was canceled 2006/08/03 10:48:52 tl 1.8.248.13: #i66176# delte chart object when wizard dialog was canceled 2006/06/20 17:10:59 bm 1.8.248.12: #i66558# correct evaluation of return value of XExecutableDialog::execute() 2006/05/05 18:35:18 bm 1.8.248.11: RESYNC: (1.13-1.14); FILE MERGED 2005/11/15 16:31:41 bm 1.8.248.10: dispose chart wizard dialog after use 2005/10/09 06:39:33 bm 1.8.248.9: RESYNC: (1.12-1.13); FILE MERGED 2005/09/08 11:49:57 iha 1.8.248.8: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter of the parent 2005/08/15 13:10:12 bm 1.8.248.7: XDataReceiver changed 2005/08/05 12:59:51 bm 1.8.248.6: insert new charts as real OLE objects 2005/05/09 09:56:11 bm 1.8.248.5: moved chart2 API to data namespace 2005/03/17 18:11:10 bm 1.8.248.4: RESYNC: (1.10-1.12); FILE MERGED 2004/11/02 18:40:28 bm 1.8.248.3: RESYNC: (1.8-1.10); FILE MERGED 2004/06/10 11:56:35 tl 1.8.248.2: #i30052# chart2 support 2004/05/06 14:56:28 iha 1.8.248.1: #i20344# new wizard for new chart - old stuff has to be removed from code still
2007-05-22 15:39:27 +00:00
// !! positioning code according to spepc; similar to Calc fuins2.cxx
2000-09-18 16:15:01 +00:00
INTEGRATION: CWS chart2mst3 (1.8.248); FILE MERGED 2007/02/19 14:29:24 tl 1.8.248.22: #i74540# handling multiple charts; GetChartDataProvider improved 2007/01/29 14:07:20 tl 1.8.248.21: #i55007#, #i73791# automatic update for charts, and update charts for undo-actions 2006/12/07 11:20:30 tl 1.8.248.20: #i71244# update chart in writer 2006/11/29 09:49:46 tl 1.8.248.19: #i71246# child window removed 2006/11/22 13:22:23 tl 1.8.248.18: #i71246# positioning of the new chart wizard to not hide the already inserted chart 2006/11/10 13:47:56 tl 1.8.248.17: #i71245#, #i69313#; old chart removed, fixed incorrectly shown default chart 2006/11/09 08:41:07 ama 1.8.248.16: Fix #i68825#: No Redo for canceled chart 2006/10/19 09:27:43 bm 1.8.248.15: RESYNC: (1.14-1.15); FILE MERGED 2006/08/03 12:15:52 tl 1.8.248.14: #i66176# delte chart object when wizard dialog was canceled 2006/08/03 10:48:52 tl 1.8.248.13: #i66176# delte chart object when wizard dialog was canceled 2006/06/20 17:10:59 bm 1.8.248.12: #i66558# correct evaluation of return value of XExecutableDialog::execute() 2006/05/05 18:35:18 bm 1.8.248.11: RESYNC: (1.13-1.14); FILE MERGED 2005/11/15 16:31:41 bm 1.8.248.10: dispose chart wizard dialog after use 2005/10/09 06:39:33 bm 1.8.248.9: RESYNC: (1.12-1.13); FILE MERGED 2005/09/08 11:49:57 iha 1.8.248.8: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter of the parent 2005/08/15 13:10:12 bm 1.8.248.7: XDataReceiver changed 2005/08/05 12:59:51 bm 1.8.248.6: insert new charts as real OLE objects 2005/05/09 09:56:11 bm 1.8.248.5: moved chart2 API to data namespace 2005/03/17 18:11:10 bm 1.8.248.4: RESYNC: (1.10-1.12); FILE MERGED 2004/11/02 18:40:28 bm 1.8.248.3: RESYNC: (1.8-1.10); FILE MERGED 2004/06/10 11:56:35 tl 1.8.248.2: #i30052# chart2 support 2004/05/06 14:56:28 iha 1.8.248.1: #i20344# new wizard for new chart - old stuff has to be removed from code still
2007-05-22 15:39:27 +00:00
Point aRet;
2000-09-18 16:15:01 +00:00
OSL_ENSURE( pParentWin, "Window not found" );
INTEGRATION: CWS chart2mst3 (1.8.248); FILE MERGED 2007/02/19 14:29:24 tl 1.8.248.22: #i74540# handling multiple charts; GetChartDataProvider improved 2007/01/29 14:07:20 tl 1.8.248.21: #i55007#, #i73791# automatic update for charts, and update charts for undo-actions 2006/12/07 11:20:30 tl 1.8.248.20: #i71244# update chart in writer 2006/11/29 09:49:46 tl 1.8.248.19: #i71246# child window removed 2006/11/22 13:22:23 tl 1.8.248.18: #i71246# positioning of the new chart wizard to not hide the already inserted chart 2006/11/10 13:47:56 tl 1.8.248.17: #i71245#, #i69313#; old chart removed, fixed incorrectly shown default chart 2006/11/09 08:41:07 ama 1.8.248.16: Fix #i68825#: No Redo for canceled chart 2006/10/19 09:27:43 bm 1.8.248.15: RESYNC: (1.14-1.15); FILE MERGED 2006/08/03 12:15:52 tl 1.8.248.14: #i66176# delte chart object when wizard dialog was canceled 2006/08/03 10:48:52 tl 1.8.248.13: #i66176# delte chart object when wizard dialog was canceled 2006/06/20 17:10:59 bm 1.8.248.12: #i66558# correct evaluation of return value of XExecutableDialog::execute() 2006/05/05 18:35:18 bm 1.8.248.11: RESYNC: (1.13-1.14); FILE MERGED 2005/11/15 16:31:41 bm 1.8.248.10: dispose chart wizard dialog after use 2005/10/09 06:39:33 bm 1.8.248.9: RESYNC: (1.12-1.13); FILE MERGED 2005/09/08 11:49:57 iha 1.8.248.8: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter of the parent 2005/08/15 13:10:12 bm 1.8.248.7: XDataReceiver changed 2005/08/05 12:59:51 bm 1.8.248.6: insert new charts as real OLE objects 2005/05/09 09:56:11 bm 1.8.248.5: moved chart2 API to data namespace 2005/03/17 18:11:10 bm 1.8.248.4: RESYNC: (1.10-1.12); FILE MERGED 2004/11/02 18:40:28 bm 1.8.248.3: RESYNC: (1.8-1.10); FILE MERGED 2004/06/10 11:56:35 tl 1.8.248.2: #i30052# chart2 support 2004/05/06 14:56:28 iha 1.8.248.1: #i20344# new wizard for new chart - old stuff has to be removed from code still
2007-05-22 15:39:27 +00:00
if (pParentWin)
2000-09-18 16:15:01 +00:00
{
INTEGRATION: CWS chart2mst3 (1.8.248); FILE MERGED 2007/02/19 14:29:24 tl 1.8.248.22: #i74540# handling multiple charts; GetChartDataProvider improved 2007/01/29 14:07:20 tl 1.8.248.21: #i55007#, #i73791# automatic update for charts, and update charts for undo-actions 2006/12/07 11:20:30 tl 1.8.248.20: #i71244# update chart in writer 2006/11/29 09:49:46 tl 1.8.248.19: #i71246# child window removed 2006/11/22 13:22:23 tl 1.8.248.18: #i71246# positioning of the new chart wizard to not hide the already inserted chart 2006/11/10 13:47:56 tl 1.8.248.17: #i71245#, #i69313#; old chart removed, fixed incorrectly shown default chart 2006/11/09 08:41:07 ama 1.8.248.16: Fix #i68825#: No Redo for canceled chart 2006/10/19 09:27:43 bm 1.8.248.15: RESYNC: (1.14-1.15); FILE MERGED 2006/08/03 12:15:52 tl 1.8.248.14: #i66176# delte chart object when wizard dialog was canceled 2006/08/03 10:48:52 tl 1.8.248.13: #i66176# delte chart object when wizard dialog was canceled 2006/06/20 17:10:59 bm 1.8.248.12: #i66558# correct evaluation of return value of XExecutableDialog::execute() 2006/05/05 18:35:18 bm 1.8.248.11: RESYNC: (1.13-1.14); FILE MERGED 2005/11/15 16:31:41 bm 1.8.248.10: dispose chart wizard dialog after use 2005/10/09 06:39:33 bm 1.8.248.9: RESYNC: (1.12-1.13); FILE MERGED 2005/09/08 11:49:57 iha 1.8.248.8: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter of the parent 2005/08/15 13:10:12 bm 1.8.248.7: XDataReceiver changed 2005/08/05 12:59:51 bm 1.8.248.6: insert new charts as real OLE objects 2005/05/09 09:56:11 bm 1.8.248.5: moved chart2 API to data namespace 2005/03/17 18:11:10 bm 1.8.248.4: RESYNC: (1.10-1.12); FILE MERGED 2004/11/02 18:40:28 bm 1.8.248.3: RESYNC: (1.8-1.10); FILE MERGED 2004/06/10 11:56:35 tl 1.8.248.2: #i30052# chart2 support 2004/05/06 14:56:28 iha 1.8.248.1: #i20344# new wizard for new chart - old stuff has to be removed from code still
2007-05-22 15:39:27 +00:00
Rectangle aObjPixel = pParentWin->LogicToPixel( rLogicChart, pParentWin->GetMapMode() );
Rectangle aObjAbs( pParentWin->OutputToAbsoluteScreenPixel( aObjPixel.TopLeft() ),
pParentWin->OutputToAbsoluteScreenPixel( aObjPixel.BottomRight() ) );
2000-09-18 16:15:01 +00:00
INTEGRATION: CWS chart2mst3 (1.8.248); FILE MERGED 2007/02/19 14:29:24 tl 1.8.248.22: #i74540# handling multiple charts; GetChartDataProvider improved 2007/01/29 14:07:20 tl 1.8.248.21: #i55007#, #i73791# automatic update for charts, and update charts for undo-actions 2006/12/07 11:20:30 tl 1.8.248.20: #i71244# update chart in writer 2006/11/29 09:49:46 tl 1.8.248.19: #i71246# child window removed 2006/11/22 13:22:23 tl 1.8.248.18: #i71246# positioning of the new chart wizard to not hide the already inserted chart 2006/11/10 13:47:56 tl 1.8.248.17: #i71245#, #i69313#; old chart removed, fixed incorrectly shown default chart 2006/11/09 08:41:07 ama 1.8.248.16: Fix #i68825#: No Redo for canceled chart 2006/10/19 09:27:43 bm 1.8.248.15: RESYNC: (1.14-1.15); FILE MERGED 2006/08/03 12:15:52 tl 1.8.248.14: #i66176# delte chart object when wizard dialog was canceled 2006/08/03 10:48:52 tl 1.8.248.13: #i66176# delte chart object when wizard dialog was canceled 2006/06/20 17:10:59 bm 1.8.248.12: #i66558# correct evaluation of return value of XExecutableDialog::execute() 2006/05/05 18:35:18 bm 1.8.248.11: RESYNC: (1.13-1.14); FILE MERGED 2005/11/15 16:31:41 bm 1.8.248.10: dispose chart wizard dialog after use 2005/10/09 06:39:33 bm 1.8.248.9: RESYNC: (1.12-1.13); FILE MERGED 2005/09/08 11:49:57 iha 1.8.248.8: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter of the parent 2005/08/15 13:10:12 bm 1.8.248.7: XDataReceiver changed 2005/08/05 12:59:51 bm 1.8.248.6: insert new charts as real OLE objects 2005/05/09 09:56:11 bm 1.8.248.5: moved chart2 API to data namespace 2005/03/17 18:11:10 bm 1.8.248.4: RESYNC: (1.10-1.12); FILE MERGED 2004/11/02 18:40:28 bm 1.8.248.3: RESYNC: (1.8-1.10); FILE MERGED 2004/06/10 11:56:35 tl 1.8.248.2: #i30052# chart2 support 2004/05/06 14:56:28 iha 1.8.248.1: #i20344# new wizard for new chart - old stuff has to be removed from code still
2007-05-22 15:39:27 +00:00
Rectangle aDesktop = pParentWin->GetDesktopRectPixel();
Size aSpace = pParentWin->LogicToPixel( Size( 8, 12 ), MAP_APPFONT );
2000-09-18 16:15:01 +00:00
sal_Bool bLayoutRTL = ::GetActiveView()->GetWrtShell().IsTableRightToLeft();
INTEGRATION: CWS chart2mst3 (1.8.248); FILE MERGED 2007/02/19 14:29:24 tl 1.8.248.22: #i74540# handling multiple charts; GetChartDataProvider improved 2007/01/29 14:07:20 tl 1.8.248.21: #i55007#, #i73791# automatic update for charts, and update charts for undo-actions 2006/12/07 11:20:30 tl 1.8.248.20: #i71244# update chart in writer 2006/11/29 09:49:46 tl 1.8.248.19: #i71246# child window removed 2006/11/22 13:22:23 tl 1.8.248.18: #i71246# positioning of the new chart wizard to not hide the already inserted chart 2006/11/10 13:47:56 tl 1.8.248.17: #i71245#, #i69313#; old chart removed, fixed incorrectly shown default chart 2006/11/09 08:41:07 ama 1.8.248.16: Fix #i68825#: No Redo for canceled chart 2006/10/19 09:27:43 bm 1.8.248.15: RESYNC: (1.14-1.15); FILE MERGED 2006/08/03 12:15:52 tl 1.8.248.14: #i66176# delte chart object when wizard dialog was canceled 2006/08/03 10:48:52 tl 1.8.248.13: #i66176# delte chart object when wizard dialog was canceled 2006/06/20 17:10:59 bm 1.8.248.12: #i66558# correct evaluation of return value of XExecutableDialog::execute() 2006/05/05 18:35:18 bm 1.8.248.11: RESYNC: (1.13-1.14); FILE MERGED 2005/11/15 16:31:41 bm 1.8.248.10: dispose chart wizard dialog after use 2005/10/09 06:39:33 bm 1.8.248.9: RESYNC: (1.12-1.13); FILE MERGED 2005/09/08 11:49:57 iha 1.8.248.8: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter of the parent 2005/08/15 13:10:12 bm 1.8.248.7: XDataReceiver changed 2005/08/05 12:59:51 bm 1.8.248.6: insert new charts as real OLE objects 2005/05/09 09:56:11 bm 1.8.248.5: moved chart2 API to data namespace 2005/03/17 18:11:10 bm 1.8.248.4: RESYNC: (1.10-1.12); FILE MERGED 2004/11/02 18:40:28 bm 1.8.248.3: RESYNC: (1.8-1.10); FILE MERGED 2004/06/10 11:56:35 tl 1.8.248.2: #i30052# chart2 support 2004/05/06 14:56:28 iha 1.8.248.1: #i20344# new wizard for new chart - old stuff has to be removed from code still
2007-05-22 15:39:27 +00:00
bool bCenterHor = false;
2000-09-18 16:15:01 +00:00
INTEGRATION: CWS chart2mst3 (1.8.248); FILE MERGED 2007/02/19 14:29:24 tl 1.8.248.22: #i74540# handling multiple charts; GetChartDataProvider improved 2007/01/29 14:07:20 tl 1.8.248.21: #i55007#, #i73791# automatic update for charts, and update charts for undo-actions 2006/12/07 11:20:30 tl 1.8.248.20: #i71244# update chart in writer 2006/11/29 09:49:46 tl 1.8.248.19: #i71246# child window removed 2006/11/22 13:22:23 tl 1.8.248.18: #i71246# positioning of the new chart wizard to not hide the already inserted chart 2006/11/10 13:47:56 tl 1.8.248.17: #i71245#, #i69313#; old chart removed, fixed incorrectly shown default chart 2006/11/09 08:41:07 ama 1.8.248.16: Fix #i68825#: No Redo for canceled chart 2006/10/19 09:27:43 bm 1.8.248.15: RESYNC: (1.14-1.15); FILE MERGED 2006/08/03 12:15:52 tl 1.8.248.14: #i66176# delte chart object when wizard dialog was canceled 2006/08/03 10:48:52 tl 1.8.248.13: #i66176# delte chart object when wizard dialog was canceled 2006/06/20 17:10:59 bm 1.8.248.12: #i66558# correct evaluation of return value of XExecutableDialog::execute() 2006/05/05 18:35:18 bm 1.8.248.11: RESYNC: (1.13-1.14); FILE MERGED 2005/11/15 16:31:41 bm 1.8.248.10: dispose chart wizard dialog after use 2005/10/09 06:39:33 bm 1.8.248.9: RESYNC: (1.12-1.13); FILE MERGED 2005/09/08 11:49:57 iha 1.8.248.8: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter of the parent 2005/08/15 13:10:12 bm 1.8.248.7: XDataReceiver changed 2005/08/05 12:59:51 bm 1.8.248.6: insert new charts as real OLE objects 2005/05/09 09:56:11 bm 1.8.248.5: moved chart2 API to data namespace 2005/03/17 18:11:10 bm 1.8.248.4: RESYNC: (1.10-1.12); FILE MERGED 2004/11/02 18:40:28 bm 1.8.248.3: RESYNC: (1.8-1.10); FILE MERGED 2004/06/10 11:56:35 tl 1.8.248.2: #i30052# chart2 support 2004/05/06 14:56:28 iha 1.8.248.1: #i20344# new wizard for new chart - old stuff has to be removed from code still
2007-05-22 15:39:27 +00:00
if ( aDesktop.Bottom() - aObjAbs.Bottom() >= rDialogSize.Height() + aSpace.Height() )
{
// first preference: below the chart
aRet.Y() = aObjAbs.Bottom() + aSpace.Height();
bCenterHor = true;
}
else if ( aObjAbs.Top() - aDesktop.Top() >= rDialogSize.Height() + aSpace.Height() )
{
// second preference: above the chart
aRet.Y() = aObjAbs.Top() - rDialogSize.Height() - aSpace.Height();
bCenterHor = true;
}
else
{
bool bFitLeft = ( aObjAbs.Left() - aDesktop.Left() >= rDialogSize.Width() + aSpace.Width() );
bool bFitRight = ( aDesktop.Right() - aObjAbs.Right() >= rDialogSize.Width() + aSpace.Width() );
2000-09-18 16:15:01 +00:00
INTEGRATION: CWS chart2mst3 (1.8.248); FILE MERGED 2007/02/19 14:29:24 tl 1.8.248.22: #i74540# handling multiple charts; GetChartDataProvider improved 2007/01/29 14:07:20 tl 1.8.248.21: #i55007#, #i73791# automatic update for charts, and update charts for undo-actions 2006/12/07 11:20:30 tl 1.8.248.20: #i71244# update chart in writer 2006/11/29 09:49:46 tl 1.8.248.19: #i71246# child window removed 2006/11/22 13:22:23 tl 1.8.248.18: #i71246# positioning of the new chart wizard to not hide the already inserted chart 2006/11/10 13:47:56 tl 1.8.248.17: #i71245#, #i69313#; old chart removed, fixed incorrectly shown default chart 2006/11/09 08:41:07 ama 1.8.248.16: Fix #i68825#: No Redo for canceled chart 2006/10/19 09:27:43 bm 1.8.248.15: RESYNC: (1.14-1.15); FILE MERGED 2006/08/03 12:15:52 tl 1.8.248.14: #i66176# delte chart object when wizard dialog was canceled 2006/08/03 10:48:52 tl 1.8.248.13: #i66176# delte chart object when wizard dialog was canceled 2006/06/20 17:10:59 bm 1.8.248.12: #i66558# correct evaluation of return value of XExecutableDialog::execute() 2006/05/05 18:35:18 bm 1.8.248.11: RESYNC: (1.13-1.14); FILE MERGED 2005/11/15 16:31:41 bm 1.8.248.10: dispose chart wizard dialog after use 2005/10/09 06:39:33 bm 1.8.248.9: RESYNC: (1.12-1.13); FILE MERGED 2005/09/08 11:49:57 iha 1.8.248.8: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter of the parent 2005/08/15 13:10:12 bm 1.8.248.7: XDataReceiver changed 2005/08/05 12:59:51 bm 1.8.248.6: insert new charts as real OLE objects 2005/05/09 09:56:11 bm 1.8.248.5: moved chart2 API to data namespace 2005/03/17 18:11:10 bm 1.8.248.4: RESYNC: (1.10-1.12); FILE MERGED 2004/11/02 18:40:28 bm 1.8.248.3: RESYNC: (1.8-1.10); FILE MERGED 2004/06/10 11:56:35 tl 1.8.248.2: #i30052# chart2 support 2004/05/06 14:56:28 iha 1.8.248.1: #i20344# new wizard for new chart - old stuff has to be removed from code still
2007-05-22 15:39:27 +00:00
if ( bFitLeft || bFitRight )
{
// if both fit, prefer right in RTL mode, left otherwise
bool bPutRight = bFitRight && ( bLayoutRTL || !bFitLeft );
if ( bPutRight )
aRet.X() = aObjAbs.Right() + aSpace.Width();
else
aRet.X() = aObjAbs.Left() - rDialogSize.Width() - aSpace.Width();
// center vertically
aRet.Y() = aObjAbs.Top() + ( aObjAbs.GetHeight() - rDialogSize.Height() ) / 2;
}
else
{
// doesn't fit on any edge - put at the bottom of the screen
aRet.Y() = aDesktop.Bottom() - rDialogSize.Height();
bCenterHor = true;
}
}
if ( bCenterHor )
aRet.X() = aObjAbs.Left() + ( aObjAbs.GetWidth() - rDialogSize.Width() ) / 2;
// limit to screen (centering might lead to invalid positions)
if ( aRet.X() + rDialogSize.Width() - 1 > aDesktop.Right() )
aRet.X() = aDesktop.Right() - rDialogSize.Width() + 1;
if ( aRet.X() < aDesktop.Left() )
aRet.X() = aDesktop.Left();
if ( aRet.Y() + rDialogSize.Height() - 1 > aDesktop.Bottom() )
aRet.Y() = aDesktop.Bottom() - rDialogSize.Height() + 1;
if ( aRet.Y() < aDesktop.Top() )
aRet.Y() = aDesktop.Top();
2000-09-18 16:15:01 +00:00
}
INTEGRATION: CWS chart2mst3 (1.8.248); FILE MERGED 2007/02/19 14:29:24 tl 1.8.248.22: #i74540# handling multiple charts; GetChartDataProvider improved 2007/01/29 14:07:20 tl 1.8.248.21: #i55007#, #i73791# automatic update for charts, and update charts for undo-actions 2006/12/07 11:20:30 tl 1.8.248.20: #i71244# update chart in writer 2006/11/29 09:49:46 tl 1.8.248.19: #i71246# child window removed 2006/11/22 13:22:23 tl 1.8.248.18: #i71246# positioning of the new chart wizard to not hide the already inserted chart 2006/11/10 13:47:56 tl 1.8.248.17: #i71245#, #i69313#; old chart removed, fixed incorrectly shown default chart 2006/11/09 08:41:07 ama 1.8.248.16: Fix #i68825#: No Redo for canceled chart 2006/10/19 09:27:43 bm 1.8.248.15: RESYNC: (1.14-1.15); FILE MERGED 2006/08/03 12:15:52 tl 1.8.248.14: #i66176# delte chart object when wizard dialog was canceled 2006/08/03 10:48:52 tl 1.8.248.13: #i66176# delte chart object when wizard dialog was canceled 2006/06/20 17:10:59 bm 1.8.248.12: #i66558# correct evaluation of return value of XExecutableDialog::execute() 2006/05/05 18:35:18 bm 1.8.248.11: RESYNC: (1.13-1.14); FILE MERGED 2005/11/15 16:31:41 bm 1.8.248.10: dispose chart wizard dialog after use 2005/10/09 06:39:33 bm 1.8.248.9: RESYNC: (1.12-1.13); FILE MERGED 2005/09/08 11:49:57 iha 1.8.248.8: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter of the parent 2005/08/15 13:10:12 bm 1.8.248.7: XDataReceiver changed 2005/08/05 12:59:51 bm 1.8.248.6: insert new charts as real OLE objects 2005/05/09 09:56:11 bm 1.8.248.5: moved chart2 API to data namespace 2005/03/17 18:11:10 bm 1.8.248.4: RESYNC: (1.10-1.12); FILE MERGED 2004/11/02 18:40:28 bm 1.8.248.3: RESYNC: (1.8-1.10); FILE MERGED 2004/06/10 11:56:35 tl 1.8.248.2: #i30052# chart2 support 2004/05/06 14:56:28 iha 1.8.248.1: #i20344# new wizard for new chart - old stuff has to be removed from code still
2007-05-22 15:39:27 +00:00
return aRet;
2000-09-18 16:15:01 +00:00
}
INTEGRATION: CWS chart2mst3 (1.8.248); FILE MERGED 2007/02/19 14:29:24 tl 1.8.248.22: #i74540# handling multiple charts; GetChartDataProvider improved 2007/01/29 14:07:20 tl 1.8.248.21: #i55007#, #i73791# automatic update for charts, and update charts for undo-actions 2006/12/07 11:20:30 tl 1.8.248.20: #i71244# update chart in writer 2006/11/29 09:49:46 tl 1.8.248.19: #i71246# child window removed 2006/11/22 13:22:23 tl 1.8.248.18: #i71246# positioning of the new chart wizard to not hide the already inserted chart 2006/11/10 13:47:56 tl 1.8.248.17: #i71245#, #i69313#; old chart removed, fixed incorrectly shown default chart 2006/11/09 08:41:07 ama 1.8.248.16: Fix #i68825#: No Redo for canceled chart 2006/10/19 09:27:43 bm 1.8.248.15: RESYNC: (1.14-1.15); FILE MERGED 2006/08/03 12:15:52 tl 1.8.248.14: #i66176# delte chart object when wizard dialog was canceled 2006/08/03 10:48:52 tl 1.8.248.13: #i66176# delte chart object when wizard dialog was canceled 2006/06/20 17:10:59 bm 1.8.248.12: #i66558# correct evaluation of return value of XExecutableDialog::execute() 2006/05/05 18:35:18 bm 1.8.248.11: RESYNC: (1.13-1.14); FILE MERGED 2005/11/15 16:31:41 bm 1.8.248.10: dispose chart wizard dialog after use 2005/10/09 06:39:33 bm 1.8.248.9: RESYNC: (1.12-1.13); FILE MERGED 2005/09/08 11:49:57 iha 1.8.248.8: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter of the parent 2005/08/15 13:10:12 bm 1.8.248.7: XDataReceiver changed 2005/08/05 12:59:51 bm 1.8.248.6: insert new charts as real OLE objects 2005/05/09 09:56:11 bm 1.8.248.5: moved chart2 API to data namespace 2005/03/17 18:11:10 bm 1.8.248.4: RESYNC: (1.10-1.12); FILE MERGED 2004/11/02 18:40:28 bm 1.8.248.3: RESYNC: (1.8-1.10); FILE MERGED 2004/06/10 11:56:35 tl 1.8.248.2: #i30052# chart2 support 2004/05/06 14:56:28 iha 1.8.248.1: #i20344# new wizard for new chart - old stuff has to be removed from code still
2007-05-22 15:39:27 +00:00
void SwInsertChart(Window* pParent, SfxBindings* pBindings )
2000-09-18 16:15:01 +00:00
{
(void) pParent;
(void) pBindings;
INTEGRATION: CWS chart2mst3 (1.8.248); FILE MERGED 2007/02/19 14:29:24 tl 1.8.248.22: #i74540# handling multiple charts; GetChartDataProvider improved 2007/01/29 14:07:20 tl 1.8.248.21: #i55007#, #i73791# automatic update for charts, and update charts for undo-actions 2006/12/07 11:20:30 tl 1.8.248.20: #i71244# update chart in writer 2006/11/29 09:49:46 tl 1.8.248.19: #i71246# child window removed 2006/11/22 13:22:23 tl 1.8.248.18: #i71246# positioning of the new chart wizard to not hide the already inserted chart 2006/11/10 13:47:56 tl 1.8.248.17: #i71245#, #i69313#; old chart removed, fixed incorrectly shown default chart 2006/11/09 08:41:07 ama 1.8.248.16: Fix #i68825#: No Redo for canceled chart 2006/10/19 09:27:43 bm 1.8.248.15: RESYNC: (1.14-1.15); FILE MERGED 2006/08/03 12:15:52 tl 1.8.248.14: #i66176# delte chart object when wizard dialog was canceled 2006/08/03 10:48:52 tl 1.8.248.13: #i66176# delte chart object when wizard dialog was canceled 2006/06/20 17:10:59 bm 1.8.248.12: #i66558# correct evaluation of return value of XExecutableDialog::execute() 2006/05/05 18:35:18 bm 1.8.248.11: RESYNC: (1.13-1.14); FILE MERGED 2005/11/15 16:31:41 bm 1.8.248.10: dispose chart wizard dialog after use 2005/10/09 06:39:33 bm 1.8.248.9: RESYNC: (1.12-1.13); FILE MERGED 2005/09/08 11:49:57 iha 1.8.248.8: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter of the parent 2005/08/15 13:10:12 bm 1.8.248.7: XDataReceiver changed 2005/08/05 12:59:51 bm 1.8.248.6: insert new charts as real OLE objects 2005/05/09 09:56:11 bm 1.8.248.5: moved chart2 API to data namespace 2005/03/17 18:11:10 bm 1.8.248.4: RESYNC: (1.10-1.12); FILE MERGED 2004/11/02 18:40:28 bm 1.8.248.3: RESYNC: (1.8-1.10); FILE MERGED 2004/06/10 11:56:35 tl 1.8.248.2: #i30052# chart2 support 2004/05/06 14:56:28 iha 1.8.248.1: #i20344# new wizard for new chart - old stuff has to be removed from code still
2007-05-22 15:39:27 +00:00
SwView *pView = ::GetActiveView();
2000-09-18 16:15:01 +00:00
INTEGRATION: CWS chart2mst3 (1.8.248); FILE MERGED 2007/02/19 14:29:24 tl 1.8.248.22: #i74540# handling multiple charts; GetChartDataProvider improved 2007/01/29 14:07:20 tl 1.8.248.21: #i55007#, #i73791# automatic update for charts, and update charts for undo-actions 2006/12/07 11:20:30 tl 1.8.248.20: #i71244# update chart in writer 2006/11/29 09:49:46 tl 1.8.248.19: #i71246# child window removed 2006/11/22 13:22:23 tl 1.8.248.18: #i71246# positioning of the new chart wizard to not hide the already inserted chart 2006/11/10 13:47:56 tl 1.8.248.17: #i71245#, #i69313#; old chart removed, fixed incorrectly shown default chart 2006/11/09 08:41:07 ama 1.8.248.16: Fix #i68825#: No Redo for canceled chart 2006/10/19 09:27:43 bm 1.8.248.15: RESYNC: (1.14-1.15); FILE MERGED 2006/08/03 12:15:52 tl 1.8.248.14: #i66176# delte chart object when wizard dialog was canceled 2006/08/03 10:48:52 tl 1.8.248.13: #i66176# delte chart object when wizard dialog was canceled 2006/06/20 17:10:59 bm 1.8.248.12: #i66558# correct evaluation of return value of XExecutableDialog::execute() 2006/05/05 18:35:18 bm 1.8.248.11: RESYNC: (1.13-1.14); FILE MERGED 2005/11/15 16:31:41 bm 1.8.248.10: dispose chart wizard dialog after use 2005/10/09 06:39:33 bm 1.8.248.9: RESYNC: (1.12-1.13); FILE MERGED 2005/09/08 11:49:57 iha 1.8.248.8: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter of the parent 2005/08/15 13:10:12 bm 1.8.248.7: XDataReceiver changed 2005/08/05 12:59:51 bm 1.8.248.6: insert new charts as real OLE objects 2005/05/09 09:56:11 bm 1.8.248.5: moved chart2 API to data namespace 2005/03/17 18:11:10 bm 1.8.248.4: RESYNC: (1.10-1.12); FILE MERGED 2004/11/02 18:40:28 bm 1.8.248.3: RESYNC: (1.8-1.10); FILE MERGED 2004/06/10 11:56:35 tl 1.8.248.2: #i30052# chart2 support 2004/05/06 14:56:28 iha 1.8.248.1: #i20344# new wizard for new chart - old stuff has to be removed from code still
2007-05-22 15:39:27 +00:00
// get range string of marked data
SwWrtShell &rWrtShell = pView->GetWrtShell();
uno::Reference< chart2::data::XDataProvider > xDataProvider;
uno::Reference< frame::XModel > xChartModel;
OUString aRangeString;
2000-09-18 16:15:01 +00:00
INTEGRATION: CWS chart2mst3 (1.8.248); FILE MERGED 2007/02/19 14:29:24 tl 1.8.248.22: #i74540# handling multiple charts; GetChartDataProvider improved 2007/01/29 14:07:20 tl 1.8.248.21: #i55007#, #i73791# automatic update for charts, and update charts for undo-actions 2006/12/07 11:20:30 tl 1.8.248.20: #i71244# update chart in writer 2006/11/29 09:49:46 tl 1.8.248.19: #i71246# child window removed 2006/11/22 13:22:23 tl 1.8.248.18: #i71246# positioning of the new chart wizard to not hide the already inserted chart 2006/11/10 13:47:56 tl 1.8.248.17: #i71245#, #i69313#; old chart removed, fixed incorrectly shown default chart 2006/11/09 08:41:07 ama 1.8.248.16: Fix #i68825#: No Redo for canceled chart 2006/10/19 09:27:43 bm 1.8.248.15: RESYNC: (1.14-1.15); FILE MERGED 2006/08/03 12:15:52 tl 1.8.248.14: #i66176# delte chart object when wizard dialog was canceled 2006/08/03 10:48:52 tl 1.8.248.13: #i66176# delte chart object when wizard dialog was canceled 2006/06/20 17:10:59 bm 1.8.248.12: #i66558# correct evaluation of return value of XExecutableDialog::execute() 2006/05/05 18:35:18 bm 1.8.248.11: RESYNC: (1.13-1.14); FILE MERGED 2005/11/15 16:31:41 bm 1.8.248.10: dispose chart wizard dialog after use 2005/10/09 06:39:33 bm 1.8.248.9: RESYNC: (1.12-1.13); FILE MERGED 2005/09/08 11:49:57 iha 1.8.248.8: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter of the parent 2005/08/15 13:10:12 bm 1.8.248.7: XDataReceiver changed 2005/08/05 12:59:51 bm 1.8.248.6: insert new charts as real OLE objects 2005/05/09 09:56:11 bm 1.8.248.5: moved chart2 API to data namespace 2005/03/17 18:11:10 bm 1.8.248.4: RESYNC: (1.10-1.12); FILE MERGED 2004/11/02 18:40:28 bm 1.8.248.3: RESYNC: (1.8-1.10); FILE MERGED 2004/06/10 11:56:35 tl 1.8.248.2: #i30052# chart2 support 2004/05/06 14:56:28 iha 1.8.248.1: #i20344# new wizard for new chart - old stuff has to be removed from code still
2007-05-22 15:39:27 +00:00
if( rWrtShell.IsCrsrInTbl())
2000-09-18 16:15:01 +00:00
{
INTEGRATION: CWS chart2mst3 (1.8.248); FILE MERGED 2007/02/19 14:29:24 tl 1.8.248.22: #i74540# handling multiple charts; GetChartDataProvider improved 2007/01/29 14:07:20 tl 1.8.248.21: #i55007#, #i73791# automatic update for charts, and update charts for undo-actions 2006/12/07 11:20:30 tl 1.8.248.20: #i71244# update chart in writer 2006/11/29 09:49:46 tl 1.8.248.19: #i71246# child window removed 2006/11/22 13:22:23 tl 1.8.248.18: #i71246# positioning of the new chart wizard to not hide the already inserted chart 2006/11/10 13:47:56 tl 1.8.248.17: #i71245#, #i69313#; old chart removed, fixed incorrectly shown default chart 2006/11/09 08:41:07 ama 1.8.248.16: Fix #i68825#: No Redo for canceled chart 2006/10/19 09:27:43 bm 1.8.248.15: RESYNC: (1.14-1.15); FILE MERGED 2006/08/03 12:15:52 tl 1.8.248.14: #i66176# delte chart object when wizard dialog was canceled 2006/08/03 10:48:52 tl 1.8.248.13: #i66176# delte chart object when wizard dialog was canceled 2006/06/20 17:10:59 bm 1.8.248.12: #i66558# correct evaluation of return value of XExecutableDialog::execute() 2006/05/05 18:35:18 bm 1.8.248.11: RESYNC: (1.13-1.14); FILE MERGED 2005/11/15 16:31:41 bm 1.8.248.10: dispose chart wizard dialog after use 2005/10/09 06:39:33 bm 1.8.248.9: RESYNC: (1.12-1.13); FILE MERGED 2005/09/08 11:49:57 iha 1.8.248.8: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter of the parent 2005/08/15 13:10:12 bm 1.8.248.7: XDataReceiver changed 2005/08/05 12:59:51 bm 1.8.248.6: insert new charts as real OLE objects 2005/05/09 09:56:11 bm 1.8.248.5: moved chart2 API to data namespace 2005/03/17 18:11:10 bm 1.8.248.4: RESYNC: (1.10-1.12); FILE MERGED 2004/11/02 18:40:28 bm 1.8.248.3: RESYNC: (1.8-1.10); FILE MERGED 2004/06/10 11:56:35 tl 1.8.248.2: #i30052# chart2 support 2004/05/06 14:56:28 iha 1.8.248.1: #i20344# new wizard for new chart - old stuff has to be removed from code still
2007-05-22 15:39:27 +00:00
if (!rWrtShell.IsTableMode())
2000-09-18 16:15:01 +00:00
{
INTEGRATION: CWS chart2mst3 (1.8.248); FILE MERGED 2007/02/19 14:29:24 tl 1.8.248.22: #i74540# handling multiple charts; GetChartDataProvider improved 2007/01/29 14:07:20 tl 1.8.248.21: #i55007#, #i73791# automatic update for charts, and update charts for undo-actions 2006/12/07 11:20:30 tl 1.8.248.20: #i71244# update chart in writer 2006/11/29 09:49:46 tl 1.8.248.19: #i71246# child window removed 2006/11/22 13:22:23 tl 1.8.248.18: #i71246# positioning of the new chart wizard to not hide the already inserted chart 2006/11/10 13:47:56 tl 1.8.248.17: #i71245#, #i69313#; old chart removed, fixed incorrectly shown default chart 2006/11/09 08:41:07 ama 1.8.248.16: Fix #i68825#: No Redo for canceled chart 2006/10/19 09:27:43 bm 1.8.248.15: RESYNC: (1.14-1.15); FILE MERGED 2006/08/03 12:15:52 tl 1.8.248.14: #i66176# delte chart object when wizard dialog was canceled 2006/08/03 10:48:52 tl 1.8.248.13: #i66176# delte chart object when wizard dialog was canceled 2006/06/20 17:10:59 bm 1.8.248.12: #i66558# correct evaluation of return value of XExecutableDialog::execute() 2006/05/05 18:35:18 bm 1.8.248.11: RESYNC: (1.13-1.14); FILE MERGED 2005/11/15 16:31:41 bm 1.8.248.10: dispose chart wizard dialog after use 2005/10/09 06:39:33 bm 1.8.248.9: RESYNC: (1.12-1.13); FILE MERGED 2005/09/08 11:49:57 iha 1.8.248.8: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter of the parent 2005/08/15 13:10:12 bm 1.8.248.7: XDataReceiver changed 2005/08/05 12:59:51 bm 1.8.248.6: insert new charts as real OLE objects 2005/05/09 09:56:11 bm 1.8.248.5: moved chart2 API to data namespace 2005/03/17 18:11:10 bm 1.8.248.4: RESYNC: (1.10-1.12); FILE MERGED 2004/11/02 18:40:28 bm 1.8.248.3: RESYNC: (1.8-1.10); FILE MERGED 2004/06/10 11:56:35 tl 1.8.248.2: #i30052# chart2 support 2004/05/06 14:56:28 iha 1.8.248.1: #i20344# new wizard for new chart - old stuff has to be removed from code still
2007-05-22 15:39:27 +00:00
// select whole table
rWrtShell.GetView().GetViewFrame()->GetDispatcher()->
Execute(FN_TABLE_SELECT_ALL, SFX_CALLMODE_SYNCHRON);
2000-09-18 16:15:01 +00:00
}
INTEGRATION: CWS chart2mst3 (1.8.248); FILE MERGED 2007/02/19 14:29:24 tl 1.8.248.22: #i74540# handling multiple charts; GetChartDataProvider improved 2007/01/29 14:07:20 tl 1.8.248.21: #i55007#, #i73791# automatic update for charts, and update charts for undo-actions 2006/12/07 11:20:30 tl 1.8.248.20: #i71244# update chart in writer 2006/11/29 09:49:46 tl 1.8.248.19: #i71246# child window removed 2006/11/22 13:22:23 tl 1.8.248.18: #i71246# positioning of the new chart wizard to not hide the already inserted chart 2006/11/10 13:47:56 tl 1.8.248.17: #i71245#, #i69313#; old chart removed, fixed incorrectly shown default chart 2006/11/09 08:41:07 ama 1.8.248.16: Fix #i68825#: No Redo for canceled chart 2006/10/19 09:27:43 bm 1.8.248.15: RESYNC: (1.14-1.15); FILE MERGED 2006/08/03 12:15:52 tl 1.8.248.14: #i66176# delte chart object when wizard dialog was canceled 2006/08/03 10:48:52 tl 1.8.248.13: #i66176# delte chart object when wizard dialog was canceled 2006/06/20 17:10:59 bm 1.8.248.12: #i66558# correct evaluation of return value of XExecutableDialog::execute() 2006/05/05 18:35:18 bm 1.8.248.11: RESYNC: (1.13-1.14); FILE MERGED 2005/11/15 16:31:41 bm 1.8.248.10: dispose chart wizard dialog after use 2005/10/09 06:39:33 bm 1.8.248.9: RESYNC: (1.12-1.13); FILE MERGED 2005/09/08 11:49:57 iha 1.8.248.8: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter of the parent 2005/08/15 13:10:12 bm 1.8.248.7: XDataReceiver changed 2005/08/05 12:59:51 bm 1.8.248.6: insert new charts as real OLE objects 2005/05/09 09:56:11 bm 1.8.248.5: moved chart2 API to data namespace 2005/03/17 18:11:10 bm 1.8.248.4: RESYNC: (1.10-1.12); FILE MERGED 2004/11/02 18:40:28 bm 1.8.248.3: RESYNC: (1.8-1.10); FILE MERGED 2004/06/10 11:56:35 tl 1.8.248.2: #i30052# chart2 support 2004/05/06 14:56:28 iha 1.8.248.1: #i20344# new wizard for new chart - old stuff has to be removed from code still
2007-05-22 15:39:27 +00:00
if( ! rWrtShell.IsTblComplexForChart())
2000-09-18 16:15:01 +00:00
{
INTEGRATION: CWS chart2mst3 (1.8.248); FILE MERGED 2007/02/19 14:29:24 tl 1.8.248.22: #i74540# handling multiple charts; GetChartDataProvider improved 2007/01/29 14:07:20 tl 1.8.248.21: #i55007#, #i73791# automatic update for charts, and update charts for undo-actions 2006/12/07 11:20:30 tl 1.8.248.20: #i71244# update chart in writer 2006/11/29 09:49:46 tl 1.8.248.19: #i71246# child window removed 2006/11/22 13:22:23 tl 1.8.248.18: #i71246# positioning of the new chart wizard to not hide the already inserted chart 2006/11/10 13:47:56 tl 1.8.248.17: #i71245#, #i69313#; old chart removed, fixed incorrectly shown default chart 2006/11/09 08:41:07 ama 1.8.248.16: Fix #i68825#: No Redo for canceled chart 2006/10/19 09:27:43 bm 1.8.248.15: RESYNC: (1.14-1.15); FILE MERGED 2006/08/03 12:15:52 tl 1.8.248.14: #i66176# delte chart object when wizard dialog was canceled 2006/08/03 10:48:52 tl 1.8.248.13: #i66176# delte chart object when wizard dialog was canceled 2006/06/20 17:10:59 bm 1.8.248.12: #i66558# correct evaluation of return value of XExecutableDialog::execute() 2006/05/05 18:35:18 bm 1.8.248.11: RESYNC: (1.13-1.14); FILE MERGED 2005/11/15 16:31:41 bm 1.8.248.10: dispose chart wizard dialog after use 2005/10/09 06:39:33 bm 1.8.248.9: RESYNC: (1.12-1.13); FILE MERGED 2005/09/08 11:49:57 iha 1.8.248.8: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter of the parent 2005/08/15 13:10:12 bm 1.8.248.7: XDataReceiver changed 2005/08/05 12:59:51 bm 1.8.248.6: insert new charts as real OLE objects 2005/05/09 09:56:11 bm 1.8.248.5: moved chart2 API to data namespace 2005/03/17 18:11:10 bm 1.8.248.4: RESYNC: (1.10-1.12); FILE MERGED 2004/11/02 18:40:28 bm 1.8.248.3: RESYNC: (1.8-1.10); FILE MERGED 2004/06/10 11:56:35 tl 1.8.248.2: #i30052# chart2 support 2004/05/06 14:56:28 iha 1.8.248.1: #i20344# new wizard for new chart - old stuff has to be removed from code still
2007-05-22 15:39:27 +00:00
SwFrmFmt* pTblFmt = rWrtShell.GetTableFmt();
String aCurrentTblName = pTblFmt->GetName();
aRangeString = aCurrentTblName;
aRangeString += OUString::valueOf( sal_Unicode('.') );
aRangeString += rWrtShell.GetBoxNms();
// get table data provider
xDataProvider.set( pView->GetDocShell()->getIDocumentChartDataProviderAccess()->GetChartDataProvider( true ) );
2000-09-18 16:15:01 +00:00
}
}
INTEGRATION: CWS chart2mst3 (1.8.248); FILE MERGED 2007/02/19 14:29:24 tl 1.8.248.22: #i74540# handling multiple charts; GetChartDataProvider improved 2007/01/29 14:07:20 tl 1.8.248.21: #i55007#, #i73791# automatic update for charts, and update charts for undo-actions 2006/12/07 11:20:30 tl 1.8.248.20: #i71244# update chart in writer 2006/11/29 09:49:46 tl 1.8.248.19: #i71246# child window removed 2006/11/22 13:22:23 tl 1.8.248.18: #i71246# positioning of the new chart wizard to not hide the already inserted chart 2006/11/10 13:47:56 tl 1.8.248.17: #i71245#, #i69313#; old chart removed, fixed incorrectly shown default chart 2006/11/09 08:41:07 ama 1.8.248.16: Fix #i68825#: No Redo for canceled chart 2006/10/19 09:27:43 bm 1.8.248.15: RESYNC: (1.14-1.15); FILE MERGED 2006/08/03 12:15:52 tl 1.8.248.14: #i66176# delte chart object when wizard dialog was canceled 2006/08/03 10:48:52 tl 1.8.248.13: #i66176# delte chart object when wizard dialog was canceled 2006/06/20 17:10:59 bm 1.8.248.12: #i66558# correct evaluation of return value of XExecutableDialog::execute() 2006/05/05 18:35:18 bm 1.8.248.11: RESYNC: (1.13-1.14); FILE MERGED 2005/11/15 16:31:41 bm 1.8.248.10: dispose chart wizard dialog after use 2005/10/09 06:39:33 bm 1.8.248.9: RESYNC: (1.12-1.13); FILE MERGED 2005/09/08 11:49:57 iha 1.8.248.8: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter of the parent 2005/08/15 13:10:12 bm 1.8.248.7: XDataReceiver changed 2005/08/05 12:59:51 bm 1.8.248.6: insert new charts as real OLE objects 2005/05/09 09:56:11 bm 1.8.248.5: moved chart2 API to data namespace 2005/03/17 18:11:10 bm 1.8.248.4: RESYNC: (1.10-1.12); FILE MERGED 2004/11/02 18:40:28 bm 1.8.248.3: RESYNC: (1.8-1.10); FILE MERGED 2004/06/10 11:56:35 tl 1.8.248.2: #i30052# chart2 support 2004/05/06 14:56:28 iha 1.8.248.1: #i20344# new wizard for new chart - old stuff has to be removed from code still
2007-05-22 15:39:27 +00:00
SwFlyFrmFmt *pFlyFrmFmt = 0;
xChartModel.set( SwTableFUNC( &rWrtShell, sal_False ).InsertChart( xDataProvider, (sal_True == xDataProvider.is()), aRangeString, &pFlyFrmFmt ));
INTEGRATION: CWS chart2mst3 (1.8.248); FILE MERGED 2007/02/19 14:29:24 tl 1.8.248.22: #i74540# handling multiple charts; GetChartDataProvider improved 2007/01/29 14:07:20 tl 1.8.248.21: #i55007#, #i73791# automatic update for charts, and update charts for undo-actions 2006/12/07 11:20:30 tl 1.8.248.20: #i71244# update chart in writer 2006/11/29 09:49:46 tl 1.8.248.19: #i71246# child window removed 2006/11/22 13:22:23 tl 1.8.248.18: #i71246# positioning of the new chart wizard to not hide the already inserted chart 2006/11/10 13:47:56 tl 1.8.248.17: #i71245#, #i69313#; old chart removed, fixed incorrectly shown default chart 2006/11/09 08:41:07 ama 1.8.248.16: Fix #i68825#: No Redo for canceled chart 2006/10/19 09:27:43 bm 1.8.248.15: RESYNC: (1.14-1.15); FILE MERGED 2006/08/03 12:15:52 tl 1.8.248.14: #i66176# delte chart object when wizard dialog was canceled 2006/08/03 10:48:52 tl 1.8.248.13: #i66176# delte chart object when wizard dialog was canceled 2006/06/20 17:10:59 bm 1.8.248.12: #i66558# correct evaluation of return value of XExecutableDialog::execute() 2006/05/05 18:35:18 bm 1.8.248.11: RESYNC: (1.13-1.14); FILE MERGED 2005/11/15 16:31:41 bm 1.8.248.10: dispose chart wizard dialog after use 2005/10/09 06:39:33 bm 1.8.248.9: RESYNC: (1.12-1.13); FILE MERGED 2005/09/08 11:49:57 iha 1.8.248.8: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter of the parent 2005/08/15 13:10:12 bm 1.8.248.7: XDataReceiver changed 2005/08/05 12:59:51 bm 1.8.248.6: insert new charts as real OLE objects 2005/05/09 09:56:11 bm 1.8.248.5: moved chart2 API to data namespace 2005/03/17 18:11:10 bm 1.8.248.4: RESYNC: (1.10-1.12); FILE MERGED 2004/11/02 18:40:28 bm 1.8.248.3: RESYNC: (1.8-1.10); FILE MERGED 2004/06/10 11:56:35 tl 1.8.248.2: #i30052# chart2 support 2004/05/06 14:56:28 iha 1.8.248.1: #i20344# new wizard for new chart - old stuff has to be removed from code still
2007-05-22 15:39:27 +00:00
//open wizard
//@todo get context from writer if that has one
uno::Reference< uno::XComponentContext > xContext(
::cppu::defaultBootstrap_InitialComponentContext() );
if( xContext.is() && xChartModel.is() && xDataProvider.is())
2000-09-18 16:15:01 +00:00
{
INTEGRATION: CWS chart2mst3 (1.8.248); FILE MERGED 2007/02/19 14:29:24 tl 1.8.248.22: #i74540# handling multiple charts; GetChartDataProvider improved 2007/01/29 14:07:20 tl 1.8.248.21: #i55007#, #i73791# automatic update for charts, and update charts for undo-actions 2006/12/07 11:20:30 tl 1.8.248.20: #i71244# update chart in writer 2006/11/29 09:49:46 tl 1.8.248.19: #i71246# child window removed 2006/11/22 13:22:23 tl 1.8.248.18: #i71246# positioning of the new chart wizard to not hide the already inserted chart 2006/11/10 13:47:56 tl 1.8.248.17: #i71245#, #i69313#; old chart removed, fixed incorrectly shown default chart 2006/11/09 08:41:07 ama 1.8.248.16: Fix #i68825#: No Redo for canceled chart 2006/10/19 09:27:43 bm 1.8.248.15: RESYNC: (1.14-1.15); FILE MERGED 2006/08/03 12:15:52 tl 1.8.248.14: #i66176# delte chart object when wizard dialog was canceled 2006/08/03 10:48:52 tl 1.8.248.13: #i66176# delte chart object when wizard dialog was canceled 2006/06/20 17:10:59 bm 1.8.248.12: #i66558# correct evaluation of return value of XExecutableDialog::execute() 2006/05/05 18:35:18 bm 1.8.248.11: RESYNC: (1.13-1.14); FILE MERGED 2005/11/15 16:31:41 bm 1.8.248.10: dispose chart wizard dialog after use 2005/10/09 06:39:33 bm 1.8.248.9: RESYNC: (1.12-1.13); FILE MERGED 2005/09/08 11:49:57 iha 1.8.248.8: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter of the parent 2005/08/15 13:10:12 bm 1.8.248.7: XDataReceiver changed 2005/08/05 12:59:51 bm 1.8.248.6: insert new charts as real OLE objects 2005/05/09 09:56:11 bm 1.8.248.5: moved chart2 API to data namespace 2005/03/17 18:11:10 bm 1.8.248.4: RESYNC: (1.10-1.12); FILE MERGED 2004/11/02 18:40:28 bm 1.8.248.3: RESYNC: (1.8-1.10); FILE MERGED 2004/06/10 11:56:35 tl 1.8.248.2: #i30052# chart2 support 2004/05/06 14:56:28 iha 1.8.248.1: #i20344# new wizard for new chart - old stuff has to be removed from code still
2007-05-22 15:39:27 +00:00
uno::Reference< lang::XMultiComponentFactory > xMCF( xContext->getServiceManager() );
if(xMCF.is())
2000-09-18 16:15:01 +00:00
{
INTEGRATION: CWS chart2mst3 (1.8.248); FILE MERGED 2007/02/19 14:29:24 tl 1.8.248.22: #i74540# handling multiple charts; GetChartDataProvider improved 2007/01/29 14:07:20 tl 1.8.248.21: #i55007#, #i73791# automatic update for charts, and update charts for undo-actions 2006/12/07 11:20:30 tl 1.8.248.20: #i71244# update chart in writer 2006/11/29 09:49:46 tl 1.8.248.19: #i71246# child window removed 2006/11/22 13:22:23 tl 1.8.248.18: #i71246# positioning of the new chart wizard to not hide the already inserted chart 2006/11/10 13:47:56 tl 1.8.248.17: #i71245#, #i69313#; old chart removed, fixed incorrectly shown default chart 2006/11/09 08:41:07 ama 1.8.248.16: Fix #i68825#: No Redo for canceled chart 2006/10/19 09:27:43 bm 1.8.248.15: RESYNC: (1.14-1.15); FILE MERGED 2006/08/03 12:15:52 tl 1.8.248.14: #i66176# delte chart object when wizard dialog was canceled 2006/08/03 10:48:52 tl 1.8.248.13: #i66176# delte chart object when wizard dialog was canceled 2006/06/20 17:10:59 bm 1.8.248.12: #i66558# correct evaluation of return value of XExecutableDialog::execute() 2006/05/05 18:35:18 bm 1.8.248.11: RESYNC: (1.13-1.14); FILE MERGED 2005/11/15 16:31:41 bm 1.8.248.10: dispose chart wizard dialog after use 2005/10/09 06:39:33 bm 1.8.248.9: RESYNC: (1.12-1.13); FILE MERGED 2005/09/08 11:49:57 iha 1.8.248.8: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter of the parent 2005/08/15 13:10:12 bm 1.8.248.7: XDataReceiver changed 2005/08/05 12:59:51 bm 1.8.248.6: insert new charts as real OLE objects 2005/05/09 09:56:11 bm 1.8.248.5: moved chart2 API to data namespace 2005/03/17 18:11:10 bm 1.8.248.4: RESYNC: (1.10-1.12); FILE MERGED 2004/11/02 18:40:28 bm 1.8.248.3: RESYNC: (1.8-1.10); FILE MERGED 2004/06/10 11:56:35 tl 1.8.248.2: #i30052# chart2 support 2004/05/06 14:56:28 iha 1.8.248.1: #i20344# new wizard for new chart - old stuff has to be removed from code still
2007-05-22 15:39:27 +00:00
uno::Reference< ui::dialogs::XExecutableDialog > xDialog(
xMCF->createInstanceWithContext(
2010-11-08 13:12:56 +00:00
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.chart2.WizardDialog"))
INTEGRATION: CWS chart2mst3 (1.8.248); FILE MERGED 2007/02/19 14:29:24 tl 1.8.248.22: #i74540# handling multiple charts; GetChartDataProvider improved 2007/01/29 14:07:20 tl 1.8.248.21: #i55007#, #i73791# automatic update for charts, and update charts for undo-actions 2006/12/07 11:20:30 tl 1.8.248.20: #i71244# update chart in writer 2006/11/29 09:49:46 tl 1.8.248.19: #i71246# child window removed 2006/11/22 13:22:23 tl 1.8.248.18: #i71246# positioning of the new chart wizard to not hide the already inserted chart 2006/11/10 13:47:56 tl 1.8.248.17: #i71245#, #i69313#; old chart removed, fixed incorrectly shown default chart 2006/11/09 08:41:07 ama 1.8.248.16: Fix #i68825#: No Redo for canceled chart 2006/10/19 09:27:43 bm 1.8.248.15: RESYNC: (1.14-1.15); FILE MERGED 2006/08/03 12:15:52 tl 1.8.248.14: #i66176# delte chart object when wizard dialog was canceled 2006/08/03 10:48:52 tl 1.8.248.13: #i66176# delte chart object when wizard dialog was canceled 2006/06/20 17:10:59 bm 1.8.248.12: #i66558# correct evaluation of return value of XExecutableDialog::execute() 2006/05/05 18:35:18 bm 1.8.248.11: RESYNC: (1.13-1.14); FILE MERGED 2005/11/15 16:31:41 bm 1.8.248.10: dispose chart wizard dialog after use 2005/10/09 06:39:33 bm 1.8.248.9: RESYNC: (1.12-1.13); FILE MERGED 2005/09/08 11:49:57 iha 1.8.248.8: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter of the parent 2005/08/15 13:10:12 bm 1.8.248.7: XDataReceiver changed 2005/08/05 12:59:51 bm 1.8.248.6: insert new charts as real OLE objects 2005/05/09 09:56:11 bm 1.8.248.5: moved chart2 API to data namespace 2005/03/17 18:11:10 bm 1.8.248.4: RESYNC: (1.10-1.12); FILE MERGED 2004/11/02 18:40:28 bm 1.8.248.3: RESYNC: (1.8-1.10); FILE MERGED 2004/06/10 11:56:35 tl 1.8.248.2: #i30052# chart2 support 2004/05/06 14:56:28 iha 1.8.248.1: #i20344# new wizard for new chart - old stuff has to be removed from code still
2007-05-22 15:39:27 +00:00
, xContext), uno::UNO_QUERY);
uno::Reference< lang::XInitialization > xInit( xDialog, uno::UNO_QUERY );
if( xInit.is() )
{
uno::Reference< awt::XWindow > xDialogParentWindow(0);
// initialize dialog
uno::Sequence<uno::Any> aSeq(2);
uno::Any* pArray = aSeq.getArray();
beans::PropertyValue aParam1;
2010-11-08 13:12:56 +00:00
aParam1.Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ParentWindow"));
INTEGRATION: CWS chart2mst3 (1.8.248); FILE MERGED 2007/02/19 14:29:24 tl 1.8.248.22: #i74540# handling multiple charts; GetChartDataProvider improved 2007/01/29 14:07:20 tl 1.8.248.21: #i55007#, #i73791# automatic update for charts, and update charts for undo-actions 2006/12/07 11:20:30 tl 1.8.248.20: #i71244# update chart in writer 2006/11/29 09:49:46 tl 1.8.248.19: #i71246# child window removed 2006/11/22 13:22:23 tl 1.8.248.18: #i71246# positioning of the new chart wizard to not hide the already inserted chart 2006/11/10 13:47:56 tl 1.8.248.17: #i71245#, #i69313#; old chart removed, fixed incorrectly shown default chart 2006/11/09 08:41:07 ama 1.8.248.16: Fix #i68825#: No Redo for canceled chart 2006/10/19 09:27:43 bm 1.8.248.15: RESYNC: (1.14-1.15); FILE MERGED 2006/08/03 12:15:52 tl 1.8.248.14: #i66176# delte chart object when wizard dialog was canceled 2006/08/03 10:48:52 tl 1.8.248.13: #i66176# delte chart object when wizard dialog was canceled 2006/06/20 17:10:59 bm 1.8.248.12: #i66558# correct evaluation of return value of XExecutableDialog::execute() 2006/05/05 18:35:18 bm 1.8.248.11: RESYNC: (1.13-1.14); FILE MERGED 2005/11/15 16:31:41 bm 1.8.248.10: dispose chart wizard dialog after use 2005/10/09 06:39:33 bm 1.8.248.9: RESYNC: (1.12-1.13); FILE MERGED 2005/09/08 11:49:57 iha 1.8.248.8: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter of the parent 2005/08/15 13:10:12 bm 1.8.248.7: XDataReceiver changed 2005/08/05 12:59:51 bm 1.8.248.6: insert new charts as real OLE objects 2005/05/09 09:56:11 bm 1.8.248.5: moved chart2 API to data namespace 2005/03/17 18:11:10 bm 1.8.248.4: RESYNC: (1.10-1.12); FILE MERGED 2004/11/02 18:40:28 bm 1.8.248.3: RESYNC: (1.8-1.10); FILE MERGED 2004/06/10 11:56:35 tl 1.8.248.2: #i30052# chart2 support 2004/05/06 14:56:28 iha 1.8.248.1: #i20344# new wizard for new chart - old stuff has to be removed from code still
2007-05-22 15:39:27 +00:00
aParam1.Value <<= uno::makeAny(xDialogParentWindow);
beans::PropertyValue aParam2;
2010-11-08 13:12:56 +00:00
aParam2.Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ChartModel"));
INTEGRATION: CWS chart2mst3 (1.8.248); FILE MERGED 2007/02/19 14:29:24 tl 1.8.248.22: #i74540# handling multiple charts; GetChartDataProvider improved 2007/01/29 14:07:20 tl 1.8.248.21: #i55007#, #i73791# automatic update for charts, and update charts for undo-actions 2006/12/07 11:20:30 tl 1.8.248.20: #i71244# update chart in writer 2006/11/29 09:49:46 tl 1.8.248.19: #i71246# child window removed 2006/11/22 13:22:23 tl 1.8.248.18: #i71246# positioning of the new chart wizard to not hide the already inserted chart 2006/11/10 13:47:56 tl 1.8.248.17: #i71245#, #i69313#; old chart removed, fixed incorrectly shown default chart 2006/11/09 08:41:07 ama 1.8.248.16: Fix #i68825#: No Redo for canceled chart 2006/10/19 09:27:43 bm 1.8.248.15: RESYNC: (1.14-1.15); FILE MERGED 2006/08/03 12:15:52 tl 1.8.248.14: #i66176# delte chart object when wizard dialog was canceled 2006/08/03 10:48:52 tl 1.8.248.13: #i66176# delte chart object when wizard dialog was canceled 2006/06/20 17:10:59 bm 1.8.248.12: #i66558# correct evaluation of return value of XExecutableDialog::execute() 2006/05/05 18:35:18 bm 1.8.248.11: RESYNC: (1.13-1.14); FILE MERGED 2005/11/15 16:31:41 bm 1.8.248.10: dispose chart wizard dialog after use 2005/10/09 06:39:33 bm 1.8.248.9: RESYNC: (1.12-1.13); FILE MERGED 2005/09/08 11:49:57 iha 1.8.248.8: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter of the parent 2005/08/15 13:10:12 bm 1.8.248.7: XDataReceiver changed 2005/08/05 12:59:51 bm 1.8.248.6: insert new charts as real OLE objects 2005/05/09 09:56:11 bm 1.8.248.5: moved chart2 API to data namespace 2005/03/17 18:11:10 bm 1.8.248.4: RESYNC: (1.10-1.12); FILE MERGED 2004/11/02 18:40:28 bm 1.8.248.3: RESYNC: (1.8-1.10); FILE MERGED 2004/06/10 11:56:35 tl 1.8.248.2: #i30052# chart2 support 2004/05/06 14:56:28 iha 1.8.248.1: #i20344# new wizard for new chart - old stuff has to be removed from code still
2007-05-22 15:39:27 +00:00
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() )
{
try
{
//get dialog size:
awt::Size aDialogAWTSize;
2010-10-27 11:38:46 +01:00
if( xDialogProps->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Size")) )
INTEGRATION: CWS chart2mst3 (1.8.248); FILE MERGED 2007/02/19 14:29:24 tl 1.8.248.22: #i74540# handling multiple charts; GetChartDataProvider improved 2007/01/29 14:07:20 tl 1.8.248.21: #i55007#, #i73791# automatic update for charts, and update charts for undo-actions 2006/12/07 11:20:30 tl 1.8.248.20: #i71244# update chart in writer 2006/11/29 09:49:46 tl 1.8.248.19: #i71246# child window removed 2006/11/22 13:22:23 tl 1.8.248.18: #i71246# positioning of the new chart wizard to not hide the already inserted chart 2006/11/10 13:47:56 tl 1.8.248.17: #i71245#, #i69313#; old chart removed, fixed incorrectly shown default chart 2006/11/09 08:41:07 ama 1.8.248.16: Fix #i68825#: No Redo for canceled chart 2006/10/19 09:27:43 bm 1.8.248.15: RESYNC: (1.14-1.15); FILE MERGED 2006/08/03 12:15:52 tl 1.8.248.14: #i66176# delte chart object when wizard dialog was canceled 2006/08/03 10:48:52 tl 1.8.248.13: #i66176# delte chart object when wizard dialog was canceled 2006/06/20 17:10:59 bm 1.8.248.12: #i66558# correct evaluation of return value of XExecutableDialog::execute() 2006/05/05 18:35:18 bm 1.8.248.11: RESYNC: (1.13-1.14); FILE MERGED 2005/11/15 16:31:41 bm 1.8.248.10: dispose chart wizard dialog after use 2005/10/09 06:39:33 bm 1.8.248.9: RESYNC: (1.12-1.13); FILE MERGED 2005/09/08 11:49:57 iha 1.8.248.8: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter of the parent 2005/08/15 13:10:12 bm 1.8.248.7: XDataReceiver changed 2005/08/05 12:59:51 bm 1.8.248.6: insert new charts as real OLE objects 2005/05/09 09:56:11 bm 1.8.248.5: moved chart2 API to data namespace 2005/03/17 18:11:10 bm 1.8.248.4: RESYNC: (1.10-1.12); FILE MERGED 2004/11/02 18:40:28 bm 1.8.248.3: RESYNC: (1.8-1.10); FILE MERGED 2004/06/10 11:56:35 tl 1.8.248.2: #i30052# chart2 support 2004/05/06 14:56:28 iha 1.8.248.1: #i20344# new wizard for new chart - old stuff has to be removed from code still
2007-05-22 15:39:27 +00:00
>>= aDialogAWTSize )
{
Size aDialogSize( aDialogAWTSize.Width, aDialogAWTSize.Height );
if ( aDialogSize.Width() > 0 && aDialogSize.Height() > 0 )
{
//calculate and set new position
SwRect aSwRect;
if (pFlyFrmFmt)
aSwRect = pFlyFrmFmt->GetAnchoredObj()->GetObjRectWithSpaces();
Rectangle aRect( aSwRect.SVRect() );
Point aDialogPos = SwGetChartDialogPos( &rWrtShell.GetView().GetEditWin(), aDialogSize, aRect );
2010-10-27 11:38:46 +01:00
xDialogProps->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Position")),
INTEGRATION: CWS chart2mst3 (1.8.248); FILE MERGED 2007/02/19 14:29:24 tl 1.8.248.22: #i74540# handling multiple charts; GetChartDataProvider improved 2007/01/29 14:07:20 tl 1.8.248.21: #i55007#, #i73791# automatic update for charts, and update charts for undo-actions 2006/12/07 11:20:30 tl 1.8.248.20: #i71244# update chart in writer 2006/11/29 09:49:46 tl 1.8.248.19: #i71246# child window removed 2006/11/22 13:22:23 tl 1.8.248.18: #i71246# positioning of the new chart wizard to not hide the already inserted chart 2006/11/10 13:47:56 tl 1.8.248.17: #i71245#, #i69313#; old chart removed, fixed incorrectly shown default chart 2006/11/09 08:41:07 ama 1.8.248.16: Fix #i68825#: No Redo for canceled chart 2006/10/19 09:27:43 bm 1.8.248.15: RESYNC: (1.14-1.15); FILE MERGED 2006/08/03 12:15:52 tl 1.8.248.14: #i66176# delte chart object when wizard dialog was canceled 2006/08/03 10:48:52 tl 1.8.248.13: #i66176# delte chart object when wizard dialog was canceled 2006/06/20 17:10:59 bm 1.8.248.12: #i66558# correct evaluation of return value of XExecutableDialog::execute() 2006/05/05 18:35:18 bm 1.8.248.11: RESYNC: (1.13-1.14); FILE MERGED 2005/11/15 16:31:41 bm 1.8.248.10: dispose chart wizard dialog after use 2005/10/09 06:39:33 bm 1.8.248.9: RESYNC: (1.12-1.13); FILE MERGED 2005/09/08 11:49:57 iha 1.8.248.8: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter of the parent 2005/08/15 13:10:12 bm 1.8.248.7: XDataReceiver changed 2005/08/05 12:59:51 bm 1.8.248.6: insert new charts as real OLE objects 2005/05/09 09:56:11 bm 1.8.248.5: moved chart2 API to data namespace 2005/03/17 18:11:10 bm 1.8.248.4: RESYNC: (1.10-1.12); FILE MERGED 2004/11/02 18:40:28 bm 1.8.248.3: RESYNC: (1.8-1.10); FILE MERGED 2004/06/10 11:56:35 tl 1.8.248.2: #i30052# chart2 support 2004/05/06 14:56:28 iha 1.8.248.1: #i20344# new wizard for new chart - old stuff has to be removed from code still
2007-05-22 15:39:27 +00:00
uno::makeAny( awt::Point(aDialogPos.getX(),aDialogPos.getY()) ) );
}
}
}
2011-11-22 09:06:06 +00:00
catch (const uno::Exception&)
INTEGRATION: CWS chart2mst3 (1.8.248); FILE MERGED 2007/02/19 14:29:24 tl 1.8.248.22: #i74540# handling multiple charts; GetChartDataProvider improved 2007/01/29 14:07:20 tl 1.8.248.21: #i55007#, #i73791# automatic update for charts, and update charts for undo-actions 2006/12/07 11:20:30 tl 1.8.248.20: #i71244# update chart in writer 2006/11/29 09:49:46 tl 1.8.248.19: #i71246# child window removed 2006/11/22 13:22:23 tl 1.8.248.18: #i71246# positioning of the new chart wizard to not hide the already inserted chart 2006/11/10 13:47:56 tl 1.8.248.17: #i71245#, #i69313#; old chart removed, fixed incorrectly shown default chart 2006/11/09 08:41:07 ama 1.8.248.16: Fix #i68825#: No Redo for canceled chart 2006/10/19 09:27:43 bm 1.8.248.15: RESYNC: (1.14-1.15); FILE MERGED 2006/08/03 12:15:52 tl 1.8.248.14: #i66176# delte chart object when wizard dialog was canceled 2006/08/03 10:48:52 tl 1.8.248.13: #i66176# delte chart object when wizard dialog was canceled 2006/06/20 17:10:59 bm 1.8.248.12: #i66558# correct evaluation of return value of XExecutableDialog::execute() 2006/05/05 18:35:18 bm 1.8.248.11: RESYNC: (1.13-1.14); FILE MERGED 2005/11/15 16:31:41 bm 1.8.248.10: dispose chart wizard dialog after use 2005/10/09 06:39:33 bm 1.8.248.9: RESYNC: (1.12-1.13); FILE MERGED 2005/09/08 11:49:57 iha 1.8.248.8: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter of the parent 2005/08/15 13:10:12 bm 1.8.248.7: XDataReceiver changed 2005/08/05 12:59:51 bm 1.8.248.6: insert new charts as real OLE objects 2005/05/09 09:56:11 bm 1.8.248.5: moved chart2 API to data namespace 2005/03/17 18:11:10 bm 1.8.248.4: RESYNC: (1.10-1.12); FILE MERGED 2004/11/02 18:40:28 bm 1.8.248.3: RESYNC: (1.8-1.10); FILE MERGED 2004/06/10 11:56:35 tl 1.8.248.2: #i30052# chart2 support 2004/05/06 14:56:28 iha 1.8.248.1: #i20344# new wizard for new chart - old stuff has to be removed from code still
2007-05-22 15:39:27 +00:00
{
OSL_FAIL("Chart wizard couldn't be positioned automatically\n" );
INTEGRATION: CWS chart2mst3 (1.8.248); FILE MERGED 2007/02/19 14:29:24 tl 1.8.248.22: #i74540# handling multiple charts; GetChartDataProvider improved 2007/01/29 14:07:20 tl 1.8.248.21: #i55007#, #i73791# automatic update for charts, and update charts for undo-actions 2006/12/07 11:20:30 tl 1.8.248.20: #i71244# update chart in writer 2006/11/29 09:49:46 tl 1.8.248.19: #i71246# child window removed 2006/11/22 13:22:23 tl 1.8.248.18: #i71246# positioning of the new chart wizard to not hide the already inserted chart 2006/11/10 13:47:56 tl 1.8.248.17: #i71245#, #i69313#; old chart removed, fixed incorrectly shown default chart 2006/11/09 08:41:07 ama 1.8.248.16: Fix #i68825#: No Redo for canceled chart 2006/10/19 09:27:43 bm 1.8.248.15: RESYNC: (1.14-1.15); FILE MERGED 2006/08/03 12:15:52 tl 1.8.248.14: #i66176# delte chart object when wizard dialog was canceled 2006/08/03 10:48:52 tl 1.8.248.13: #i66176# delte chart object when wizard dialog was canceled 2006/06/20 17:10:59 bm 1.8.248.12: #i66558# correct evaluation of return value of XExecutableDialog::execute() 2006/05/05 18:35:18 bm 1.8.248.11: RESYNC: (1.13-1.14); FILE MERGED 2005/11/15 16:31:41 bm 1.8.248.10: dispose chart wizard dialog after use 2005/10/09 06:39:33 bm 1.8.248.9: RESYNC: (1.12-1.13); FILE MERGED 2005/09/08 11:49:57 iha 1.8.248.8: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter of the parent 2005/08/15 13:10:12 bm 1.8.248.7: XDataReceiver changed 2005/08/05 12:59:51 bm 1.8.248.6: insert new charts as real OLE objects 2005/05/09 09:56:11 bm 1.8.248.5: moved chart2 API to data namespace 2005/03/17 18:11:10 bm 1.8.248.4: RESYNC: (1.10-1.12); FILE MERGED 2004/11/02 18:40:28 bm 1.8.248.3: RESYNC: (1.8-1.10); FILE MERGED 2004/06/10 11:56:35 tl 1.8.248.2: #i30052# chart2 support 2004/05/06 14:56:28 iha 1.8.248.1: #i20344# new wizard for new chart - old stuff has to be removed from code still
2007-05-22 15:39:27 +00:00
}
}
sal_Int16 nDialogRet = xDialog->execute();
if( nDialogRet == ui::dialogs::ExecutableDialogResults::CANCEL )
{
rWrtShell.Undo();
rWrtShell.GetIDocumentUndoRedo().ClearRedo();
INTEGRATION: CWS chart2mst3 (1.8.248); FILE MERGED 2007/02/19 14:29:24 tl 1.8.248.22: #i74540# handling multiple charts; GetChartDataProvider improved 2007/01/29 14:07:20 tl 1.8.248.21: #i55007#, #i73791# automatic update for charts, and update charts for undo-actions 2006/12/07 11:20:30 tl 1.8.248.20: #i71244# update chart in writer 2006/11/29 09:49:46 tl 1.8.248.19: #i71246# child window removed 2006/11/22 13:22:23 tl 1.8.248.18: #i71246# positioning of the new chart wizard to not hide the already inserted chart 2006/11/10 13:47:56 tl 1.8.248.17: #i71245#, #i69313#; old chart removed, fixed incorrectly shown default chart 2006/11/09 08:41:07 ama 1.8.248.16: Fix #i68825#: No Redo for canceled chart 2006/10/19 09:27:43 bm 1.8.248.15: RESYNC: (1.14-1.15); FILE MERGED 2006/08/03 12:15:52 tl 1.8.248.14: #i66176# delte chart object when wizard dialog was canceled 2006/08/03 10:48:52 tl 1.8.248.13: #i66176# delte chart object when wizard dialog was canceled 2006/06/20 17:10:59 bm 1.8.248.12: #i66558# correct evaluation of return value of XExecutableDialog::execute() 2006/05/05 18:35:18 bm 1.8.248.11: RESYNC: (1.13-1.14); FILE MERGED 2005/11/15 16:31:41 bm 1.8.248.10: dispose chart wizard dialog after use 2005/10/09 06:39:33 bm 1.8.248.9: RESYNC: (1.12-1.13); FILE MERGED 2005/09/08 11:49:57 iha 1.8.248.8: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter of the parent 2005/08/15 13:10:12 bm 1.8.248.7: XDataReceiver changed 2005/08/05 12:59:51 bm 1.8.248.6: insert new charts as real OLE objects 2005/05/09 09:56:11 bm 1.8.248.5: moved chart2 API to data namespace 2005/03/17 18:11:10 bm 1.8.248.4: RESYNC: (1.10-1.12); FILE MERGED 2004/11/02 18:40:28 bm 1.8.248.3: RESYNC: (1.8-1.10); FILE MERGED 2004/06/10 11:56:35 tl 1.8.248.2: #i30052# chart2 support 2004/05/06 14:56:28 iha 1.8.248.1: #i20344# new wizard for new chart - old stuff has to be removed from code still
2007-05-22 15:39:27 +00:00
}
else
{
OSL_ENSURE( nDialogRet == ui::dialogs::ExecutableDialogResults::OK,
INTEGRATION: CWS chart2mst3 (1.8.248); FILE MERGED 2007/02/19 14:29:24 tl 1.8.248.22: #i74540# handling multiple charts; GetChartDataProvider improved 2007/01/29 14:07:20 tl 1.8.248.21: #i55007#, #i73791# automatic update for charts, and update charts for undo-actions 2006/12/07 11:20:30 tl 1.8.248.20: #i71244# update chart in writer 2006/11/29 09:49:46 tl 1.8.248.19: #i71246# child window removed 2006/11/22 13:22:23 tl 1.8.248.18: #i71246# positioning of the new chart wizard to not hide the already inserted chart 2006/11/10 13:47:56 tl 1.8.248.17: #i71245#, #i69313#; old chart removed, fixed incorrectly shown default chart 2006/11/09 08:41:07 ama 1.8.248.16: Fix #i68825#: No Redo for canceled chart 2006/10/19 09:27:43 bm 1.8.248.15: RESYNC: (1.14-1.15); FILE MERGED 2006/08/03 12:15:52 tl 1.8.248.14: #i66176# delte chart object when wizard dialog was canceled 2006/08/03 10:48:52 tl 1.8.248.13: #i66176# delte chart object when wizard dialog was canceled 2006/06/20 17:10:59 bm 1.8.248.12: #i66558# correct evaluation of return value of XExecutableDialog::execute() 2006/05/05 18:35:18 bm 1.8.248.11: RESYNC: (1.13-1.14); FILE MERGED 2005/11/15 16:31:41 bm 1.8.248.10: dispose chart wizard dialog after use 2005/10/09 06:39:33 bm 1.8.248.9: RESYNC: (1.12-1.13); FILE MERGED 2005/09/08 11:49:57 iha 1.8.248.8: set number formatter independent from dataprovider thus also a chart with own data has the numberformatter of the parent 2005/08/15 13:10:12 bm 1.8.248.7: XDataReceiver changed 2005/08/05 12:59:51 bm 1.8.248.6: insert new charts as real OLE objects 2005/05/09 09:56:11 bm 1.8.248.5: moved chart2 API to data namespace 2005/03/17 18:11:10 bm 1.8.248.4: RESYNC: (1.10-1.12); FILE MERGED 2004/11/02 18:40:28 bm 1.8.248.3: RESYNC: (1.8-1.10); FILE MERGED 2004/06/10 11:56:35 tl 1.8.248.2: #i30052# chart2 support 2004/05/06 14:56:28 iha 1.8.248.1: #i20344# new wizard for new chart - old stuff has to be removed from code still
2007-05-22 15:39:27 +00:00
"dialog execution failed" );
}
}
uno::Reference< lang::XComponent > xComponent( xDialog, uno::UNO_QUERY );
if( xComponent.is())
xComponent->dispose();
2000-09-18 16:15:01 +00:00
}
}
}
2010-12-11 15:42:15 +01:00
void AutoEdit::KeyInput( const KeyEvent& rEvt )
2000-09-18 16:15:01 +00:00
{
sal_uInt16 nCode = rEvt.GetKeyCode().GetCode();
2000-09-18 16:15:01 +00:00
if( nCode != KEY_SPACE )
Edit::KeyInput( rEvt );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */