Files
libreoffice/chart2/source/controller/dialogs/dlg_DataSource.cxx

222 lines
6.7 KiB
C++
Raw Normal View History

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* 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 .
*/
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/02/27 16:27:59 bm 1.1.2.37: #i71233# disable dialog commit when there are invalid ranges or series with missing mandatory roles 2007/02/27 13:45:31 bm 1.1.2.36: Disable controls and tabs when invalid ranges were entered 2007/02/09 12:31:17 bm 1.1.2.35: implement adaptions for different look in wizard and stand-alone source data dialog, according to spec FlexibleSourceRangeSelection 2007/02/08 21:25:33 iha 1.1.2.34: resync m195 -> m202 2006/10/27 14:59:19 iha 1.1.2.33: name consolidation 2006/10/24 11:55:16 bm 1.1.2.32: enable range chooser in Calc 2005/11/14 17:53:12 iha 1.1.2.31: don't update model again at end of execute as this was done already - undo is done outside of the dialog 2005/10/11 09:20:09 bm 1.1.2.30: license header change 2005/09/29 12:12:25 iha 1.1.2.29: #i55138# helpId 2005/09/27 15:02:53 iha 1.1.2.28: #i55138# enable helpids for data ranges dialog (resource depth must be <3 ) 2005/08/18 15:20:41 bm 1.1.2.27: (gs)etDiagram -> (gs)etFirstDiagram to avoid name clashes with old API 2005/04/15 14:48:07 bm 1.1.2.26: data source and range choose dialog rework 2004/06/30 16:14:16 bm 1.1.2.25: some fixes 2004/06/29 12:21:52 bm 1.1.2.24: shared data for range chooser and data source tab pages 2004/06/17 13:05:10 bm 1.1.2.23: some minor preliminary fixes 2004/06/17 10:03:24 bm 1.1.2.22: data source dialog is a tab dialog now using the same tabpages as the wizard 2004/06/03 09:31:41 bm 1.1.2.21: Embedding API changes 2004/05/24 17:47:44 bm 1.1.2.20: data source dialog is deprecated -> is a tabpage now 2004/05/17 17:33:48 iha 1.1.2.19: provide object naming; resource cleanup 2004/05/07 16:24:23 iha 1.1.2.18: #i20344# moved RefButton to RangeSelectionButton 2004/05/07 16:12:03 bm 1.1.2.17: get label text from ranges bigger than one cell 2004/05/05 20:46:59 iha 1.1.2.16: resource cleanup 2004/05/05 15:58:21 iha 1.1.2.15: update label content from spreadsheet cell 2004/04/28 19:07:01 iha 1.1.2.14: #i20344# icon cleanup, prepare line subtypes 2004/04/27 15:52:27 bm 1.1.2.13: warning removed 2004/04/27 14:27:41 bm 1.1.2.12: warnings removed 2004/04/27 13:28:29 bm 1.1.2.11: use internal role-name as key for role-entries. (listbox now contains internal-role-name (invisible), UI role-name, range string) 2004/04/15 17:25:32 bm 1.1.2.10: control-enabling DialogSeries is now declared in cxx 2004/04/14 12:20:06 bm 1.1.2.9: createRangeSelection: also works for embedded chart in calc 2004/04/13 09:53:11 bm 1.1.2.8: show correct string for multi-cell labels 2004/04/08 15:19:55 bm 1.1.2.7: disable categories range ('shrink') button 2004/04/08 15:16:19 bm 1.1.2.6: use values-x instead of domain-x 2004/04/08 14:56:31 bm 1.1.2.5: applying categories to model, accept changes made in editfields (no check yet) 2004/04/07 18:46:21 bm 1.1.2.4: dialog uses internal data structure, additional field for label range 2004/03/29 13:24:38 bm 1.1.2.3: XDataSource: getSourceRangeRepresentation -> getSourceIdentifier 2004/03/19 16:43:14 bm 1.1.2.2: show names of data series correctly 2004/03/19 14:26:19 bm 1.1.2.1: dialog for flexible source range selection
2007-05-22 16:33:25 +00:00
#include "dlg_DataSource.hxx"
#include "Strings.hrc"
#include "ResId.hxx"
#include "ChartTypeTemplateProvider.hxx"
#include "DiagramHelper.hxx"
#include "DialogModel.hxx"
#include "HelpIds.hrc"
#include "tp_RangeChooser.hxx"
#include "tp_DataSource.hxx"
#include <vcl/layout.hxx>
#include <vcl/msgbox.hxx> // for RET_OK
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/02/27 16:27:59 bm 1.1.2.37: #i71233# disable dialog commit when there are invalid ranges or series with missing mandatory roles 2007/02/27 13:45:31 bm 1.1.2.36: Disable controls and tabs when invalid ranges were entered 2007/02/09 12:31:17 bm 1.1.2.35: implement adaptions for different look in wizard and stand-alone source data dialog, according to spec FlexibleSourceRangeSelection 2007/02/08 21:25:33 iha 1.1.2.34: resync m195 -> m202 2006/10/27 14:59:19 iha 1.1.2.33: name consolidation 2006/10/24 11:55:16 bm 1.1.2.32: enable range chooser in Calc 2005/11/14 17:53:12 iha 1.1.2.31: don't update model again at end of execute as this was done already - undo is done outside of the dialog 2005/10/11 09:20:09 bm 1.1.2.30: license header change 2005/09/29 12:12:25 iha 1.1.2.29: #i55138# helpId 2005/09/27 15:02:53 iha 1.1.2.28: #i55138# enable helpids for data ranges dialog (resource depth must be <3 ) 2005/08/18 15:20:41 bm 1.1.2.27: (gs)etDiagram -> (gs)etFirstDiagram to avoid name clashes with old API 2005/04/15 14:48:07 bm 1.1.2.26: data source and range choose dialog rework 2004/06/30 16:14:16 bm 1.1.2.25: some fixes 2004/06/29 12:21:52 bm 1.1.2.24: shared data for range chooser and data source tab pages 2004/06/17 13:05:10 bm 1.1.2.23: some minor preliminary fixes 2004/06/17 10:03:24 bm 1.1.2.22: data source dialog is a tab dialog now using the same tabpages as the wizard 2004/06/03 09:31:41 bm 1.1.2.21: Embedding API changes 2004/05/24 17:47:44 bm 1.1.2.20: data source dialog is deprecated -> is a tabpage now 2004/05/17 17:33:48 iha 1.1.2.19: provide object naming; resource cleanup 2004/05/07 16:24:23 iha 1.1.2.18: #i20344# moved RefButton to RangeSelectionButton 2004/05/07 16:12:03 bm 1.1.2.17: get label text from ranges bigger than one cell 2004/05/05 20:46:59 iha 1.1.2.16: resource cleanup 2004/05/05 15:58:21 iha 1.1.2.15: update label content from spreadsheet cell 2004/04/28 19:07:01 iha 1.1.2.14: #i20344# icon cleanup, prepare line subtypes 2004/04/27 15:52:27 bm 1.1.2.13: warning removed 2004/04/27 14:27:41 bm 1.1.2.12: warnings removed 2004/04/27 13:28:29 bm 1.1.2.11: use internal role-name as key for role-entries. (listbox now contains internal-role-name (invisible), UI role-name, range string) 2004/04/15 17:25:32 bm 1.1.2.10: control-enabling DialogSeries is now declared in cxx 2004/04/14 12:20:06 bm 1.1.2.9: createRangeSelection: also works for embedded chart in calc 2004/04/13 09:53:11 bm 1.1.2.8: show correct string for multi-cell labels 2004/04/08 15:19:55 bm 1.1.2.7: disable categories range ('shrink') button 2004/04/08 15:16:19 bm 1.1.2.6: use values-x instead of domain-x 2004/04/08 14:56:31 bm 1.1.2.5: applying categories to model, accept changes made in editfields (no check yet) 2004/04/07 18:46:21 bm 1.1.2.4: dialog uses internal data structure, additional field for label range 2004/03/29 13:24:38 bm 1.1.2.3: XDataSource: getSourceRangeRepresentation -> getSourceIdentifier 2004/03/19 16:43:14 bm 1.1.2.2: show names of data series correctly 2004/03/19 14:26:19 bm 1.1.2.1: dialog for flexible source range selection
2007-05-22 16:33:25 +00:00
using namespace ::com::sun::star;
using namespace ::com::sun::star::chart2;
using namespace ::chart;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Sequence;
namespace chart
{
class DocumentChartTypeTemplateProvider : public ChartTypeTemplateProvider
{
public:
DocumentChartTypeTemplateProvider(
const Reference< chart2::XChartDocument > & xDoc );
virtual ~DocumentChartTypeTemplateProvider();
// ____ ChartTypeTemplateProvider ____
virtual Reference< chart2::XChartTypeTemplate > getCurrentTemplate() const SAL_OVERRIDE;
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/02/27 16:27:59 bm 1.1.2.37: #i71233# disable dialog commit when there are invalid ranges or series with missing mandatory roles 2007/02/27 13:45:31 bm 1.1.2.36: Disable controls and tabs when invalid ranges were entered 2007/02/09 12:31:17 bm 1.1.2.35: implement adaptions for different look in wizard and stand-alone source data dialog, according to spec FlexibleSourceRangeSelection 2007/02/08 21:25:33 iha 1.1.2.34: resync m195 -> m202 2006/10/27 14:59:19 iha 1.1.2.33: name consolidation 2006/10/24 11:55:16 bm 1.1.2.32: enable range chooser in Calc 2005/11/14 17:53:12 iha 1.1.2.31: don't update model again at end of execute as this was done already - undo is done outside of the dialog 2005/10/11 09:20:09 bm 1.1.2.30: license header change 2005/09/29 12:12:25 iha 1.1.2.29: #i55138# helpId 2005/09/27 15:02:53 iha 1.1.2.28: #i55138# enable helpids for data ranges dialog (resource depth must be <3 ) 2005/08/18 15:20:41 bm 1.1.2.27: (gs)etDiagram -> (gs)etFirstDiagram to avoid name clashes with old API 2005/04/15 14:48:07 bm 1.1.2.26: data source and range choose dialog rework 2004/06/30 16:14:16 bm 1.1.2.25: some fixes 2004/06/29 12:21:52 bm 1.1.2.24: shared data for range chooser and data source tab pages 2004/06/17 13:05:10 bm 1.1.2.23: some minor preliminary fixes 2004/06/17 10:03:24 bm 1.1.2.22: data source dialog is a tab dialog now using the same tabpages as the wizard 2004/06/03 09:31:41 bm 1.1.2.21: Embedding API changes 2004/05/24 17:47:44 bm 1.1.2.20: data source dialog is deprecated -> is a tabpage now 2004/05/17 17:33:48 iha 1.1.2.19: provide object naming; resource cleanup 2004/05/07 16:24:23 iha 1.1.2.18: #i20344# moved RefButton to RangeSelectionButton 2004/05/07 16:12:03 bm 1.1.2.17: get label text from ranges bigger than one cell 2004/05/05 20:46:59 iha 1.1.2.16: resource cleanup 2004/05/05 15:58:21 iha 1.1.2.15: update label content from spreadsheet cell 2004/04/28 19:07:01 iha 1.1.2.14: #i20344# icon cleanup, prepare line subtypes 2004/04/27 15:52:27 bm 1.1.2.13: warning removed 2004/04/27 14:27:41 bm 1.1.2.12: warnings removed 2004/04/27 13:28:29 bm 1.1.2.11: use internal role-name as key for role-entries. (listbox now contains internal-role-name (invisible), UI role-name, range string) 2004/04/15 17:25:32 bm 1.1.2.10: control-enabling DialogSeries is now declared in cxx 2004/04/14 12:20:06 bm 1.1.2.9: createRangeSelection: also works for embedded chart in calc 2004/04/13 09:53:11 bm 1.1.2.8: show correct string for multi-cell labels 2004/04/08 15:19:55 bm 1.1.2.7: disable categories range ('shrink') button 2004/04/08 15:16:19 bm 1.1.2.6: use values-x instead of domain-x 2004/04/08 14:56:31 bm 1.1.2.5: applying categories to model, accept changes made in editfields (no check yet) 2004/04/07 18:46:21 bm 1.1.2.4: dialog uses internal data structure, additional field for label range 2004/03/29 13:24:38 bm 1.1.2.3: XDataSource: getSourceRangeRepresentation -> getSourceIdentifier 2004/03/19 16:43:14 bm 1.1.2.2: show names of data series correctly 2004/03/19 14:26:19 bm 1.1.2.1: dialog for flexible source range selection
2007-05-22 16:33:25 +00:00
private:
Reference< chart2::XChartTypeTemplate > m_xTemplate;
};
DocumentChartTypeTemplateProvider::DocumentChartTypeTemplateProvider(
const Reference< chart2::XChartDocument > & xDoc )
{
if( xDoc.is())
{
Reference< chart2::XDiagram > xDia( xDoc->getFirstDiagram());
if( xDia.is())
{
DiagramHelper::tTemplateWithServiceName aResult(
DiagramHelper::getTemplateForDiagram(
xDia,
Reference< lang::XMultiServiceFactory >(
xDoc->getChartTypeManager(), uno::UNO_QUERY ) ));
m_xTemplate.set( aResult.first );
}
}
}
DocumentChartTypeTemplateProvider::~DocumentChartTypeTemplateProvider()
{}
Reference< chart2::XChartTypeTemplate > DocumentChartTypeTemplateProvider::getCurrentTemplate() const
{
return m_xTemplate;
}
class DataSourceTabControl : public TabControl
{
public:
DataSourceTabControl(vcl::Window* pParent);
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/02/27 16:27:59 bm 1.1.2.37: #i71233# disable dialog commit when there are invalid ranges or series with missing mandatory roles 2007/02/27 13:45:31 bm 1.1.2.36: Disable controls and tabs when invalid ranges were entered 2007/02/09 12:31:17 bm 1.1.2.35: implement adaptions for different look in wizard and stand-alone source data dialog, according to spec FlexibleSourceRangeSelection 2007/02/08 21:25:33 iha 1.1.2.34: resync m195 -> m202 2006/10/27 14:59:19 iha 1.1.2.33: name consolidation 2006/10/24 11:55:16 bm 1.1.2.32: enable range chooser in Calc 2005/11/14 17:53:12 iha 1.1.2.31: don't update model again at end of execute as this was done already - undo is done outside of the dialog 2005/10/11 09:20:09 bm 1.1.2.30: license header change 2005/09/29 12:12:25 iha 1.1.2.29: #i55138# helpId 2005/09/27 15:02:53 iha 1.1.2.28: #i55138# enable helpids for data ranges dialog (resource depth must be <3 ) 2005/08/18 15:20:41 bm 1.1.2.27: (gs)etDiagram -> (gs)etFirstDiagram to avoid name clashes with old API 2005/04/15 14:48:07 bm 1.1.2.26: data source and range choose dialog rework 2004/06/30 16:14:16 bm 1.1.2.25: some fixes 2004/06/29 12:21:52 bm 1.1.2.24: shared data for range chooser and data source tab pages 2004/06/17 13:05:10 bm 1.1.2.23: some minor preliminary fixes 2004/06/17 10:03:24 bm 1.1.2.22: data source dialog is a tab dialog now using the same tabpages as the wizard 2004/06/03 09:31:41 bm 1.1.2.21: Embedding API changes 2004/05/24 17:47:44 bm 1.1.2.20: data source dialog is deprecated -> is a tabpage now 2004/05/17 17:33:48 iha 1.1.2.19: provide object naming; resource cleanup 2004/05/07 16:24:23 iha 1.1.2.18: #i20344# moved RefButton to RangeSelectionButton 2004/05/07 16:12:03 bm 1.1.2.17: get label text from ranges bigger than one cell 2004/05/05 20:46:59 iha 1.1.2.16: resource cleanup 2004/05/05 15:58:21 iha 1.1.2.15: update label content from spreadsheet cell 2004/04/28 19:07:01 iha 1.1.2.14: #i20344# icon cleanup, prepare line subtypes 2004/04/27 15:52:27 bm 1.1.2.13: warning removed 2004/04/27 14:27:41 bm 1.1.2.12: warnings removed 2004/04/27 13:28:29 bm 1.1.2.11: use internal role-name as key for role-entries. (listbox now contains internal-role-name (invisible), UI role-name, range string) 2004/04/15 17:25:32 bm 1.1.2.10: control-enabling DialogSeries is now declared in cxx 2004/04/14 12:20:06 bm 1.1.2.9: createRangeSelection: also works for embedded chart in calc 2004/04/13 09:53:11 bm 1.1.2.8: show correct string for multi-cell labels 2004/04/08 15:19:55 bm 1.1.2.7: disable categories range ('shrink') button 2004/04/08 15:16:19 bm 1.1.2.6: use values-x instead of domain-x 2004/04/08 14:56:31 bm 1.1.2.5: applying categories to model, accept changes made in editfields (no check yet) 2004/04/07 18:46:21 bm 1.1.2.4: dialog uses internal data structure, additional field for label range 2004/03/29 13:24:38 bm 1.1.2.3: XDataSource: getSourceRangeRepresentation -> getSourceIdentifier 2004/03/19 16:43:14 bm 1.1.2.2: show names of data series correctly 2004/03/19 14:26:19 bm 1.1.2.1: dialog for flexible source range selection
2007-05-22 16:33:25 +00:00
virtual bool DeactivatePage() SAL_OVERRIDE;
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/02/27 16:27:59 bm 1.1.2.37: #i71233# disable dialog commit when there are invalid ranges or series with missing mandatory roles 2007/02/27 13:45:31 bm 1.1.2.36: Disable controls and tabs when invalid ranges were entered 2007/02/09 12:31:17 bm 1.1.2.35: implement adaptions for different look in wizard and stand-alone source data dialog, according to spec FlexibleSourceRangeSelection 2007/02/08 21:25:33 iha 1.1.2.34: resync m195 -> m202 2006/10/27 14:59:19 iha 1.1.2.33: name consolidation 2006/10/24 11:55:16 bm 1.1.2.32: enable range chooser in Calc 2005/11/14 17:53:12 iha 1.1.2.31: don't update model again at end of execute as this was done already - undo is done outside of the dialog 2005/10/11 09:20:09 bm 1.1.2.30: license header change 2005/09/29 12:12:25 iha 1.1.2.29: #i55138# helpId 2005/09/27 15:02:53 iha 1.1.2.28: #i55138# enable helpids for data ranges dialog (resource depth must be <3 ) 2005/08/18 15:20:41 bm 1.1.2.27: (gs)etDiagram -> (gs)etFirstDiagram to avoid name clashes with old API 2005/04/15 14:48:07 bm 1.1.2.26: data source and range choose dialog rework 2004/06/30 16:14:16 bm 1.1.2.25: some fixes 2004/06/29 12:21:52 bm 1.1.2.24: shared data for range chooser and data source tab pages 2004/06/17 13:05:10 bm 1.1.2.23: some minor preliminary fixes 2004/06/17 10:03:24 bm 1.1.2.22: data source dialog is a tab dialog now using the same tabpages as the wizard 2004/06/03 09:31:41 bm 1.1.2.21: Embedding API changes 2004/05/24 17:47:44 bm 1.1.2.20: data source dialog is deprecated -> is a tabpage now 2004/05/17 17:33:48 iha 1.1.2.19: provide object naming; resource cleanup 2004/05/07 16:24:23 iha 1.1.2.18: #i20344# moved RefButton to RangeSelectionButton 2004/05/07 16:12:03 bm 1.1.2.17: get label text from ranges bigger than one cell 2004/05/05 20:46:59 iha 1.1.2.16: resource cleanup 2004/05/05 15:58:21 iha 1.1.2.15: update label content from spreadsheet cell 2004/04/28 19:07:01 iha 1.1.2.14: #i20344# icon cleanup, prepare line subtypes 2004/04/27 15:52:27 bm 1.1.2.13: warning removed 2004/04/27 14:27:41 bm 1.1.2.12: warnings removed 2004/04/27 13:28:29 bm 1.1.2.11: use internal role-name as key for role-entries. (listbox now contains internal-role-name (invisible), UI role-name, range string) 2004/04/15 17:25:32 bm 1.1.2.10: control-enabling DialogSeries is now declared in cxx 2004/04/14 12:20:06 bm 1.1.2.9: createRangeSelection: also works for embedded chart in calc 2004/04/13 09:53:11 bm 1.1.2.8: show correct string for multi-cell labels 2004/04/08 15:19:55 bm 1.1.2.7: disable categories range ('shrink') button 2004/04/08 15:16:19 bm 1.1.2.6: use values-x instead of domain-x 2004/04/08 14:56:31 bm 1.1.2.5: applying categories to model, accept changes made in editfields (no check yet) 2004/04/07 18:46:21 bm 1.1.2.4: dialog uses internal data structure, additional field for label range 2004/03/29 13:24:38 bm 1.1.2.3: XDataSource: getSourceRangeRepresentation -> getSourceIdentifier 2004/03/19 16:43:14 bm 1.1.2.2: show names of data series correctly 2004/03/19 14:26:19 bm 1.1.2.1: dialog for flexible source range selection
2007-05-22 16:33:25 +00:00
void DisableTabToggling();
void EnableTabToggling();
private:
bool m_bTogglingEnabled;
};
DataSourceTabControl::DataSourceTabControl(vcl::Window* pParent)
: TabControl(pParent)
, m_bTogglingEnabled(true)
{
}
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/02/27 16:27:59 bm 1.1.2.37: #i71233# disable dialog commit when there are invalid ranges or series with missing mandatory roles 2007/02/27 13:45:31 bm 1.1.2.36: Disable controls and tabs when invalid ranges were entered 2007/02/09 12:31:17 bm 1.1.2.35: implement adaptions for different look in wizard and stand-alone source data dialog, according to spec FlexibleSourceRangeSelection 2007/02/08 21:25:33 iha 1.1.2.34: resync m195 -> m202 2006/10/27 14:59:19 iha 1.1.2.33: name consolidation 2006/10/24 11:55:16 bm 1.1.2.32: enable range chooser in Calc 2005/11/14 17:53:12 iha 1.1.2.31: don't update model again at end of execute as this was done already - undo is done outside of the dialog 2005/10/11 09:20:09 bm 1.1.2.30: license header change 2005/09/29 12:12:25 iha 1.1.2.29: #i55138# helpId 2005/09/27 15:02:53 iha 1.1.2.28: #i55138# enable helpids for data ranges dialog (resource depth must be <3 ) 2005/08/18 15:20:41 bm 1.1.2.27: (gs)etDiagram -> (gs)etFirstDiagram to avoid name clashes with old API 2005/04/15 14:48:07 bm 1.1.2.26: data source and range choose dialog rework 2004/06/30 16:14:16 bm 1.1.2.25: some fixes 2004/06/29 12:21:52 bm 1.1.2.24: shared data for range chooser and data source tab pages 2004/06/17 13:05:10 bm 1.1.2.23: some minor preliminary fixes 2004/06/17 10:03:24 bm 1.1.2.22: data source dialog is a tab dialog now using the same tabpages as the wizard 2004/06/03 09:31:41 bm 1.1.2.21: Embedding API changes 2004/05/24 17:47:44 bm 1.1.2.20: data source dialog is deprecated -> is a tabpage now 2004/05/17 17:33:48 iha 1.1.2.19: provide object naming; resource cleanup 2004/05/07 16:24:23 iha 1.1.2.18: #i20344# moved RefButton to RangeSelectionButton 2004/05/07 16:12:03 bm 1.1.2.17: get label text from ranges bigger than one cell 2004/05/05 20:46:59 iha 1.1.2.16: resource cleanup 2004/05/05 15:58:21 iha 1.1.2.15: update label content from spreadsheet cell 2004/04/28 19:07:01 iha 1.1.2.14: #i20344# icon cleanup, prepare line subtypes 2004/04/27 15:52:27 bm 1.1.2.13: warning removed 2004/04/27 14:27:41 bm 1.1.2.12: warnings removed 2004/04/27 13:28:29 bm 1.1.2.11: use internal role-name as key for role-entries. (listbox now contains internal-role-name (invisible), UI role-name, range string) 2004/04/15 17:25:32 bm 1.1.2.10: control-enabling DialogSeries is now declared in cxx 2004/04/14 12:20:06 bm 1.1.2.9: createRangeSelection: also works for embedded chart in calc 2004/04/13 09:53:11 bm 1.1.2.8: show correct string for multi-cell labels 2004/04/08 15:19:55 bm 1.1.2.7: disable categories range ('shrink') button 2004/04/08 15:16:19 bm 1.1.2.6: use values-x instead of domain-x 2004/04/08 14:56:31 bm 1.1.2.5: applying categories to model, accept changes made in editfields (no check yet) 2004/04/07 18:46:21 bm 1.1.2.4: dialog uses internal data structure, additional field for label range 2004/03/29 13:24:38 bm 1.1.2.3: XDataSource: getSourceRangeRepresentation -> getSourceIdentifier 2004/03/19 16:43:14 bm 1.1.2.2: show names of data series correctly 2004/03/19 14:26:19 bm 1.1.2.1: dialog for flexible source range selection
2007-05-22 16:33:25 +00:00
bool DataSourceTabControl::DeactivatePage()
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/02/27 16:27:59 bm 1.1.2.37: #i71233# disable dialog commit when there are invalid ranges or series with missing mandatory roles 2007/02/27 13:45:31 bm 1.1.2.36: Disable controls and tabs when invalid ranges were entered 2007/02/09 12:31:17 bm 1.1.2.35: implement adaptions for different look in wizard and stand-alone source data dialog, according to spec FlexibleSourceRangeSelection 2007/02/08 21:25:33 iha 1.1.2.34: resync m195 -> m202 2006/10/27 14:59:19 iha 1.1.2.33: name consolidation 2006/10/24 11:55:16 bm 1.1.2.32: enable range chooser in Calc 2005/11/14 17:53:12 iha 1.1.2.31: don't update model again at end of execute as this was done already - undo is done outside of the dialog 2005/10/11 09:20:09 bm 1.1.2.30: license header change 2005/09/29 12:12:25 iha 1.1.2.29: #i55138# helpId 2005/09/27 15:02:53 iha 1.1.2.28: #i55138# enable helpids for data ranges dialog (resource depth must be <3 ) 2005/08/18 15:20:41 bm 1.1.2.27: (gs)etDiagram -> (gs)etFirstDiagram to avoid name clashes with old API 2005/04/15 14:48:07 bm 1.1.2.26: data source and range choose dialog rework 2004/06/30 16:14:16 bm 1.1.2.25: some fixes 2004/06/29 12:21:52 bm 1.1.2.24: shared data for range chooser and data source tab pages 2004/06/17 13:05:10 bm 1.1.2.23: some minor preliminary fixes 2004/06/17 10:03:24 bm 1.1.2.22: data source dialog is a tab dialog now using the same tabpages as the wizard 2004/06/03 09:31:41 bm 1.1.2.21: Embedding API changes 2004/05/24 17:47:44 bm 1.1.2.20: data source dialog is deprecated -> is a tabpage now 2004/05/17 17:33:48 iha 1.1.2.19: provide object naming; resource cleanup 2004/05/07 16:24:23 iha 1.1.2.18: #i20344# moved RefButton to RangeSelectionButton 2004/05/07 16:12:03 bm 1.1.2.17: get label text from ranges bigger than one cell 2004/05/05 20:46:59 iha 1.1.2.16: resource cleanup 2004/05/05 15:58:21 iha 1.1.2.15: update label content from spreadsheet cell 2004/04/28 19:07:01 iha 1.1.2.14: #i20344# icon cleanup, prepare line subtypes 2004/04/27 15:52:27 bm 1.1.2.13: warning removed 2004/04/27 14:27:41 bm 1.1.2.12: warnings removed 2004/04/27 13:28:29 bm 1.1.2.11: use internal role-name as key for role-entries. (listbox now contains internal-role-name (invisible), UI role-name, range string) 2004/04/15 17:25:32 bm 1.1.2.10: control-enabling DialogSeries is now declared in cxx 2004/04/14 12:20:06 bm 1.1.2.9: createRangeSelection: also works for embedded chart in calc 2004/04/13 09:53:11 bm 1.1.2.8: show correct string for multi-cell labels 2004/04/08 15:19:55 bm 1.1.2.7: disable categories range ('shrink') button 2004/04/08 15:16:19 bm 1.1.2.6: use values-x instead of domain-x 2004/04/08 14:56:31 bm 1.1.2.5: applying categories to model, accept changes made in editfields (no check yet) 2004/04/07 18:46:21 bm 1.1.2.4: dialog uses internal data structure, additional field for label range 2004/03/29 13:24:38 bm 1.1.2.3: XDataSource: getSourceRangeRepresentation -> getSourceIdentifier 2004/03/19 16:43:14 bm 1.1.2.2: show names of data series correctly 2004/03/19 14:26:19 bm 1.1.2.1: dialog for flexible source range selection
2007-05-22 16:33:25 +00:00
{
return TabControl::DeactivatePage() && m_bTogglingEnabled;
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/02/27 16:27:59 bm 1.1.2.37: #i71233# disable dialog commit when there are invalid ranges or series with missing mandatory roles 2007/02/27 13:45:31 bm 1.1.2.36: Disable controls and tabs when invalid ranges were entered 2007/02/09 12:31:17 bm 1.1.2.35: implement adaptions for different look in wizard and stand-alone source data dialog, according to spec FlexibleSourceRangeSelection 2007/02/08 21:25:33 iha 1.1.2.34: resync m195 -> m202 2006/10/27 14:59:19 iha 1.1.2.33: name consolidation 2006/10/24 11:55:16 bm 1.1.2.32: enable range chooser in Calc 2005/11/14 17:53:12 iha 1.1.2.31: don't update model again at end of execute as this was done already - undo is done outside of the dialog 2005/10/11 09:20:09 bm 1.1.2.30: license header change 2005/09/29 12:12:25 iha 1.1.2.29: #i55138# helpId 2005/09/27 15:02:53 iha 1.1.2.28: #i55138# enable helpids for data ranges dialog (resource depth must be <3 ) 2005/08/18 15:20:41 bm 1.1.2.27: (gs)etDiagram -> (gs)etFirstDiagram to avoid name clashes with old API 2005/04/15 14:48:07 bm 1.1.2.26: data source and range choose dialog rework 2004/06/30 16:14:16 bm 1.1.2.25: some fixes 2004/06/29 12:21:52 bm 1.1.2.24: shared data for range chooser and data source tab pages 2004/06/17 13:05:10 bm 1.1.2.23: some minor preliminary fixes 2004/06/17 10:03:24 bm 1.1.2.22: data source dialog is a tab dialog now using the same tabpages as the wizard 2004/06/03 09:31:41 bm 1.1.2.21: Embedding API changes 2004/05/24 17:47:44 bm 1.1.2.20: data source dialog is deprecated -> is a tabpage now 2004/05/17 17:33:48 iha 1.1.2.19: provide object naming; resource cleanup 2004/05/07 16:24:23 iha 1.1.2.18: #i20344# moved RefButton to RangeSelectionButton 2004/05/07 16:12:03 bm 1.1.2.17: get label text from ranges bigger than one cell 2004/05/05 20:46:59 iha 1.1.2.16: resource cleanup 2004/05/05 15:58:21 iha 1.1.2.15: update label content from spreadsheet cell 2004/04/28 19:07:01 iha 1.1.2.14: #i20344# icon cleanup, prepare line subtypes 2004/04/27 15:52:27 bm 1.1.2.13: warning removed 2004/04/27 14:27:41 bm 1.1.2.12: warnings removed 2004/04/27 13:28:29 bm 1.1.2.11: use internal role-name as key for role-entries. (listbox now contains internal-role-name (invisible), UI role-name, range string) 2004/04/15 17:25:32 bm 1.1.2.10: control-enabling DialogSeries is now declared in cxx 2004/04/14 12:20:06 bm 1.1.2.9: createRangeSelection: also works for embedded chart in calc 2004/04/13 09:53:11 bm 1.1.2.8: show correct string for multi-cell labels 2004/04/08 15:19:55 bm 1.1.2.7: disable categories range ('shrink') button 2004/04/08 15:16:19 bm 1.1.2.6: use values-x instead of domain-x 2004/04/08 14:56:31 bm 1.1.2.5: applying categories to model, accept changes made in editfields (no check yet) 2004/04/07 18:46:21 bm 1.1.2.4: dialog uses internal data structure, additional field for label range 2004/03/29 13:24:38 bm 1.1.2.3: XDataSource: getSourceRangeRepresentation -> getSourceIdentifier 2004/03/19 16:43:14 bm 1.1.2.2: show names of data series correctly 2004/03/19 14:26:19 bm 1.1.2.1: dialog for flexible source range selection
2007-05-22 16:33:25 +00:00
}
void DataSourceTabControl::DisableTabToggling()
{
m_bTogglingEnabled = false;
}
void DataSourceTabControl::EnableTabToggling()
{
m_bTogglingEnabled = true;
}
sal_uInt16 DataSourceDialog::m_nLastPageId = 0;
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/02/27 16:27:59 bm 1.1.2.37: #i71233# disable dialog commit when there are invalid ranges or series with missing mandatory roles 2007/02/27 13:45:31 bm 1.1.2.36: Disable controls and tabs when invalid ranges were entered 2007/02/09 12:31:17 bm 1.1.2.35: implement adaptions for different look in wizard and stand-alone source data dialog, according to spec FlexibleSourceRangeSelection 2007/02/08 21:25:33 iha 1.1.2.34: resync m195 -> m202 2006/10/27 14:59:19 iha 1.1.2.33: name consolidation 2006/10/24 11:55:16 bm 1.1.2.32: enable range chooser in Calc 2005/11/14 17:53:12 iha 1.1.2.31: don't update model again at end of execute as this was done already - undo is done outside of the dialog 2005/10/11 09:20:09 bm 1.1.2.30: license header change 2005/09/29 12:12:25 iha 1.1.2.29: #i55138# helpId 2005/09/27 15:02:53 iha 1.1.2.28: #i55138# enable helpids for data ranges dialog (resource depth must be <3 ) 2005/08/18 15:20:41 bm 1.1.2.27: (gs)etDiagram -> (gs)etFirstDiagram to avoid name clashes with old API 2005/04/15 14:48:07 bm 1.1.2.26: data source and range choose dialog rework 2004/06/30 16:14:16 bm 1.1.2.25: some fixes 2004/06/29 12:21:52 bm 1.1.2.24: shared data for range chooser and data source tab pages 2004/06/17 13:05:10 bm 1.1.2.23: some minor preliminary fixes 2004/06/17 10:03:24 bm 1.1.2.22: data source dialog is a tab dialog now using the same tabpages as the wizard 2004/06/03 09:31:41 bm 1.1.2.21: Embedding API changes 2004/05/24 17:47:44 bm 1.1.2.20: data source dialog is deprecated -> is a tabpage now 2004/05/17 17:33:48 iha 1.1.2.19: provide object naming; resource cleanup 2004/05/07 16:24:23 iha 1.1.2.18: #i20344# moved RefButton to RangeSelectionButton 2004/05/07 16:12:03 bm 1.1.2.17: get label text from ranges bigger than one cell 2004/05/05 20:46:59 iha 1.1.2.16: resource cleanup 2004/05/05 15:58:21 iha 1.1.2.15: update label content from spreadsheet cell 2004/04/28 19:07:01 iha 1.1.2.14: #i20344# icon cleanup, prepare line subtypes 2004/04/27 15:52:27 bm 1.1.2.13: warning removed 2004/04/27 14:27:41 bm 1.1.2.12: warnings removed 2004/04/27 13:28:29 bm 1.1.2.11: use internal role-name as key for role-entries. (listbox now contains internal-role-name (invisible), UI role-name, range string) 2004/04/15 17:25:32 bm 1.1.2.10: control-enabling DialogSeries is now declared in cxx 2004/04/14 12:20:06 bm 1.1.2.9: createRangeSelection: also works for embedded chart in calc 2004/04/13 09:53:11 bm 1.1.2.8: show correct string for multi-cell labels 2004/04/08 15:19:55 bm 1.1.2.7: disable categories range ('shrink') button 2004/04/08 15:16:19 bm 1.1.2.6: use values-x instead of domain-x 2004/04/08 14:56:31 bm 1.1.2.5: applying categories to model, accept changes made in editfields (no check yet) 2004/04/07 18:46:21 bm 1.1.2.4: dialog uses internal data structure, additional field for label range 2004/03/29 13:24:38 bm 1.1.2.3: XDataSource: getSourceRangeRepresentation -> getSourceIdentifier 2004/03/19 16:43:14 bm 1.1.2.2: show names of data series correctly 2004/03/19 14:26:19 bm 1.1.2.1: dialog for flexible source range selection
2007-05-22 16:33:25 +00:00
enum DataSourceDialogPages
{
TP_RANGECHOOSER = 1,
TP_DATA_SOURCE = 2
};
DataSourceDialog::DataSourceDialog(vcl::Window * pParent,
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/02/27 16:27:59 bm 1.1.2.37: #i71233# disable dialog commit when there are invalid ranges or series with missing mandatory roles 2007/02/27 13:45:31 bm 1.1.2.36: Disable controls and tabs when invalid ranges were entered 2007/02/09 12:31:17 bm 1.1.2.35: implement adaptions for different look in wizard and stand-alone source data dialog, according to spec FlexibleSourceRangeSelection 2007/02/08 21:25:33 iha 1.1.2.34: resync m195 -> m202 2006/10/27 14:59:19 iha 1.1.2.33: name consolidation 2006/10/24 11:55:16 bm 1.1.2.32: enable range chooser in Calc 2005/11/14 17:53:12 iha 1.1.2.31: don't update model again at end of execute as this was done already - undo is done outside of the dialog 2005/10/11 09:20:09 bm 1.1.2.30: license header change 2005/09/29 12:12:25 iha 1.1.2.29: #i55138# helpId 2005/09/27 15:02:53 iha 1.1.2.28: #i55138# enable helpids for data ranges dialog (resource depth must be <3 ) 2005/08/18 15:20:41 bm 1.1.2.27: (gs)etDiagram -> (gs)etFirstDiagram to avoid name clashes with old API 2005/04/15 14:48:07 bm 1.1.2.26: data source and range choose dialog rework 2004/06/30 16:14:16 bm 1.1.2.25: some fixes 2004/06/29 12:21:52 bm 1.1.2.24: shared data for range chooser and data source tab pages 2004/06/17 13:05:10 bm 1.1.2.23: some minor preliminary fixes 2004/06/17 10:03:24 bm 1.1.2.22: data source dialog is a tab dialog now using the same tabpages as the wizard 2004/06/03 09:31:41 bm 1.1.2.21: Embedding API changes 2004/05/24 17:47:44 bm 1.1.2.20: data source dialog is deprecated -> is a tabpage now 2004/05/17 17:33:48 iha 1.1.2.19: provide object naming; resource cleanup 2004/05/07 16:24:23 iha 1.1.2.18: #i20344# moved RefButton to RangeSelectionButton 2004/05/07 16:12:03 bm 1.1.2.17: get label text from ranges bigger than one cell 2004/05/05 20:46:59 iha 1.1.2.16: resource cleanup 2004/05/05 15:58:21 iha 1.1.2.15: update label content from spreadsheet cell 2004/04/28 19:07:01 iha 1.1.2.14: #i20344# icon cleanup, prepare line subtypes 2004/04/27 15:52:27 bm 1.1.2.13: warning removed 2004/04/27 14:27:41 bm 1.1.2.12: warnings removed 2004/04/27 13:28:29 bm 1.1.2.11: use internal role-name as key for role-entries. (listbox now contains internal-role-name (invisible), UI role-name, range string) 2004/04/15 17:25:32 bm 1.1.2.10: control-enabling DialogSeries is now declared in cxx 2004/04/14 12:20:06 bm 1.1.2.9: createRangeSelection: also works for embedded chart in calc 2004/04/13 09:53:11 bm 1.1.2.8: show correct string for multi-cell labels 2004/04/08 15:19:55 bm 1.1.2.7: disable categories range ('shrink') button 2004/04/08 15:16:19 bm 1.1.2.6: use values-x instead of domain-x 2004/04/08 14:56:31 bm 1.1.2.5: applying categories to model, accept changes made in editfields (no check yet) 2004/04/07 18:46:21 bm 1.1.2.4: dialog uses internal data structure, additional field for label range 2004/03/29 13:24:38 bm 1.1.2.3: XDataSource: getSourceRangeRepresentation -> getSourceIdentifier 2004/03/19 16:43:14 bm 1.1.2.2: show names of data series correctly 2004/03/19 14:26:19 bm 1.1.2.1: dialog for flexible source range selection
2007-05-22 16:33:25 +00:00
const Reference< XChartDocument > & xChartDocument,
const Reference< uno::XComponentContext > & xContext)
: TabDialog(pParent, "DataRangeDialog",
"modules/schart/ui/datarangedialog.ui")
, m_xChartDocument(xChartDocument)
, m_xContext(xContext)
, m_apDocTemplateProvider(new DocumentChartTypeTemplateProvider(xChartDocument))
, m_apDialogModel(new DialogModel(xChartDocument, xContext))
, m_pTabControl(new DataSourceTabControl(get_content_area()))
, m_pRangeChooserTabePage(0)
, m_pDataSourceTabPage(0)
, m_bRangeChooserTabIsValid(true)
, m_bDataSourceTabIsValid(true)
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/02/27 16:27:59 bm 1.1.2.37: #i71233# disable dialog commit when there are invalid ranges or series with missing mandatory roles 2007/02/27 13:45:31 bm 1.1.2.36: Disable controls and tabs when invalid ranges were entered 2007/02/09 12:31:17 bm 1.1.2.35: implement adaptions for different look in wizard and stand-alone source data dialog, according to spec FlexibleSourceRangeSelection 2007/02/08 21:25:33 iha 1.1.2.34: resync m195 -> m202 2006/10/27 14:59:19 iha 1.1.2.33: name consolidation 2006/10/24 11:55:16 bm 1.1.2.32: enable range chooser in Calc 2005/11/14 17:53:12 iha 1.1.2.31: don't update model again at end of execute as this was done already - undo is done outside of the dialog 2005/10/11 09:20:09 bm 1.1.2.30: license header change 2005/09/29 12:12:25 iha 1.1.2.29: #i55138# helpId 2005/09/27 15:02:53 iha 1.1.2.28: #i55138# enable helpids for data ranges dialog (resource depth must be <3 ) 2005/08/18 15:20:41 bm 1.1.2.27: (gs)etDiagram -> (gs)etFirstDiagram to avoid name clashes with old API 2005/04/15 14:48:07 bm 1.1.2.26: data source and range choose dialog rework 2004/06/30 16:14:16 bm 1.1.2.25: some fixes 2004/06/29 12:21:52 bm 1.1.2.24: shared data for range chooser and data source tab pages 2004/06/17 13:05:10 bm 1.1.2.23: some minor preliminary fixes 2004/06/17 10:03:24 bm 1.1.2.22: data source dialog is a tab dialog now using the same tabpages as the wizard 2004/06/03 09:31:41 bm 1.1.2.21: Embedding API changes 2004/05/24 17:47:44 bm 1.1.2.20: data source dialog is deprecated -> is a tabpage now 2004/05/17 17:33:48 iha 1.1.2.19: provide object naming; resource cleanup 2004/05/07 16:24:23 iha 1.1.2.18: #i20344# moved RefButton to RangeSelectionButton 2004/05/07 16:12:03 bm 1.1.2.17: get label text from ranges bigger than one cell 2004/05/05 20:46:59 iha 1.1.2.16: resource cleanup 2004/05/05 15:58:21 iha 1.1.2.15: update label content from spreadsheet cell 2004/04/28 19:07:01 iha 1.1.2.14: #i20344# icon cleanup, prepare line subtypes 2004/04/27 15:52:27 bm 1.1.2.13: warning removed 2004/04/27 14:27:41 bm 1.1.2.12: warnings removed 2004/04/27 13:28:29 bm 1.1.2.11: use internal role-name as key for role-entries. (listbox now contains internal-role-name (invisible), UI role-name, range string) 2004/04/15 17:25:32 bm 1.1.2.10: control-enabling DialogSeries is now declared in cxx 2004/04/14 12:20:06 bm 1.1.2.9: createRangeSelection: also works for embedded chart in calc 2004/04/13 09:53:11 bm 1.1.2.8: show correct string for multi-cell labels 2004/04/08 15:19:55 bm 1.1.2.7: disable categories range ('shrink') button 2004/04/08 15:16:19 bm 1.1.2.6: use values-x instead of domain-x 2004/04/08 14:56:31 bm 1.1.2.5: applying categories to model, accept changes made in editfields (no check yet) 2004/04/07 18:46:21 bm 1.1.2.4: dialog uses internal data structure, additional field for label range 2004/03/29 13:24:38 bm 1.1.2.3: XDataSource: getSourceRangeRepresentation -> getSourceIdentifier 2004/03/19 16:43:14 bm 1.1.2.2: show names of data series correctly 2004/03/19 14:26:19 bm 1.1.2.1: dialog for flexible source range selection
2007-05-22 16:33:25 +00:00
{
get(m_pBtnOK, "ok");
m_pTabControl->Show();
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/02/27 16:27:59 bm 1.1.2.37: #i71233# disable dialog commit when there are invalid ranges or series with missing mandatory roles 2007/02/27 13:45:31 bm 1.1.2.36: Disable controls and tabs when invalid ranges were entered 2007/02/09 12:31:17 bm 1.1.2.35: implement adaptions for different look in wizard and stand-alone source data dialog, according to spec FlexibleSourceRangeSelection 2007/02/08 21:25:33 iha 1.1.2.34: resync m195 -> m202 2006/10/27 14:59:19 iha 1.1.2.33: name consolidation 2006/10/24 11:55:16 bm 1.1.2.32: enable range chooser in Calc 2005/11/14 17:53:12 iha 1.1.2.31: don't update model again at end of execute as this was done already - undo is done outside of the dialog 2005/10/11 09:20:09 bm 1.1.2.30: license header change 2005/09/29 12:12:25 iha 1.1.2.29: #i55138# helpId 2005/09/27 15:02:53 iha 1.1.2.28: #i55138# enable helpids for data ranges dialog (resource depth must be <3 ) 2005/08/18 15:20:41 bm 1.1.2.27: (gs)etDiagram -> (gs)etFirstDiagram to avoid name clashes with old API 2005/04/15 14:48:07 bm 1.1.2.26: data source and range choose dialog rework 2004/06/30 16:14:16 bm 1.1.2.25: some fixes 2004/06/29 12:21:52 bm 1.1.2.24: shared data for range chooser and data source tab pages 2004/06/17 13:05:10 bm 1.1.2.23: some minor preliminary fixes 2004/06/17 10:03:24 bm 1.1.2.22: data source dialog is a tab dialog now using the same tabpages as the wizard 2004/06/03 09:31:41 bm 1.1.2.21: Embedding API changes 2004/05/24 17:47:44 bm 1.1.2.20: data source dialog is deprecated -> is a tabpage now 2004/05/17 17:33:48 iha 1.1.2.19: provide object naming; resource cleanup 2004/05/07 16:24:23 iha 1.1.2.18: #i20344# moved RefButton to RangeSelectionButton 2004/05/07 16:12:03 bm 1.1.2.17: get label text from ranges bigger than one cell 2004/05/05 20:46:59 iha 1.1.2.16: resource cleanup 2004/05/05 15:58:21 iha 1.1.2.15: update label content from spreadsheet cell 2004/04/28 19:07:01 iha 1.1.2.14: #i20344# icon cleanup, prepare line subtypes 2004/04/27 15:52:27 bm 1.1.2.13: warning removed 2004/04/27 14:27:41 bm 1.1.2.12: warnings removed 2004/04/27 13:28:29 bm 1.1.2.11: use internal role-name as key for role-entries. (listbox now contains internal-role-name (invisible), UI role-name, range string) 2004/04/15 17:25:32 bm 1.1.2.10: control-enabling DialogSeries is now declared in cxx 2004/04/14 12:20:06 bm 1.1.2.9: createRangeSelection: also works for embedded chart in calc 2004/04/13 09:53:11 bm 1.1.2.8: show correct string for multi-cell labels 2004/04/08 15:19:55 bm 1.1.2.7: disable categories range ('shrink') button 2004/04/08 15:16:19 bm 1.1.2.6: use values-x instead of domain-x 2004/04/08 14:56:31 bm 1.1.2.5: applying categories to model, accept changes made in editfields (no check yet) 2004/04/07 18:46:21 bm 1.1.2.4: dialog uses internal data structure, additional field for label range 2004/03/29 13:24:38 bm 1.1.2.3: XDataSource: getSourceRangeRepresentation -> getSourceIdentifier 2004/03/19 16:43:14 bm 1.1.2.2: show names of data series correctly 2004/03/19 14:26:19 bm 1.1.2.1: dialog for flexible source range selection
2007-05-22 16:33:25 +00:00
m_pRangeChooserTabePage = new RangeChooserTabPage( m_pTabControl, *(m_apDialogModel.get()),
m_apDocTemplateProvider.get(), this, true /* bHideDescription */ );
m_pDataSourceTabPage = new DataSourceTabPage( m_pTabControl, *(m_apDialogModel.get()),
m_apDocTemplateProvider.get(), this, true /* bHideDescription */ );
m_pTabControl->InsertPage( TP_RANGECHOOSER, SCH_RESSTR(STR_PAGE_DATA_RANGE) );
m_pTabControl->InsertPage( TP_DATA_SOURCE, SCH_RESSTR(STR_OBJECT_DATASERIES_PLURAL) );
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/02/27 16:27:59 bm 1.1.2.37: #i71233# disable dialog commit when there are invalid ranges or series with missing mandatory roles 2007/02/27 13:45:31 bm 1.1.2.36: Disable controls and tabs when invalid ranges were entered 2007/02/09 12:31:17 bm 1.1.2.35: implement adaptions for different look in wizard and stand-alone source data dialog, according to spec FlexibleSourceRangeSelection 2007/02/08 21:25:33 iha 1.1.2.34: resync m195 -> m202 2006/10/27 14:59:19 iha 1.1.2.33: name consolidation 2006/10/24 11:55:16 bm 1.1.2.32: enable range chooser in Calc 2005/11/14 17:53:12 iha 1.1.2.31: don't update model again at end of execute as this was done already - undo is done outside of the dialog 2005/10/11 09:20:09 bm 1.1.2.30: license header change 2005/09/29 12:12:25 iha 1.1.2.29: #i55138# helpId 2005/09/27 15:02:53 iha 1.1.2.28: #i55138# enable helpids for data ranges dialog (resource depth must be <3 ) 2005/08/18 15:20:41 bm 1.1.2.27: (gs)etDiagram -> (gs)etFirstDiagram to avoid name clashes with old API 2005/04/15 14:48:07 bm 1.1.2.26: data source and range choose dialog rework 2004/06/30 16:14:16 bm 1.1.2.25: some fixes 2004/06/29 12:21:52 bm 1.1.2.24: shared data for range chooser and data source tab pages 2004/06/17 13:05:10 bm 1.1.2.23: some minor preliminary fixes 2004/06/17 10:03:24 bm 1.1.2.22: data source dialog is a tab dialog now using the same tabpages as the wizard 2004/06/03 09:31:41 bm 1.1.2.21: Embedding API changes 2004/05/24 17:47:44 bm 1.1.2.20: data source dialog is deprecated -> is a tabpage now 2004/05/17 17:33:48 iha 1.1.2.19: provide object naming; resource cleanup 2004/05/07 16:24:23 iha 1.1.2.18: #i20344# moved RefButton to RangeSelectionButton 2004/05/07 16:12:03 bm 1.1.2.17: get label text from ranges bigger than one cell 2004/05/05 20:46:59 iha 1.1.2.16: resource cleanup 2004/05/05 15:58:21 iha 1.1.2.15: update label content from spreadsheet cell 2004/04/28 19:07:01 iha 1.1.2.14: #i20344# icon cleanup, prepare line subtypes 2004/04/27 15:52:27 bm 1.1.2.13: warning removed 2004/04/27 14:27:41 bm 1.1.2.12: warnings removed 2004/04/27 13:28:29 bm 1.1.2.11: use internal role-name as key for role-entries. (listbox now contains internal-role-name (invisible), UI role-name, range string) 2004/04/15 17:25:32 bm 1.1.2.10: control-enabling DialogSeries is now declared in cxx 2004/04/14 12:20:06 bm 1.1.2.9: createRangeSelection: also works for embedded chart in calc 2004/04/13 09:53:11 bm 1.1.2.8: show correct string for multi-cell labels 2004/04/08 15:19:55 bm 1.1.2.7: disable categories range ('shrink') button 2004/04/08 15:16:19 bm 1.1.2.6: use values-x instead of domain-x 2004/04/08 14:56:31 bm 1.1.2.5: applying categories to model, accept changes made in editfields (no check yet) 2004/04/07 18:46:21 bm 1.1.2.4: dialog uses internal data structure, additional field for label range 2004/03/29 13:24:38 bm 1.1.2.3: XDataSource: getSourceRangeRepresentation -> getSourceIdentifier 2004/03/19 16:43:14 bm 1.1.2.2: show names of data series correctly 2004/03/19 14:26:19 bm 1.1.2.1: dialog for flexible source range selection
2007-05-22 16:33:25 +00:00
m_pTabControl->SetTabPage( TP_DATA_SOURCE, m_pDataSourceTabPage );
m_pTabControl->SetTabPage( TP_RANGECHOOSER, m_pRangeChooserTabePage );
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/02/27 16:27:59 bm 1.1.2.37: #i71233# disable dialog commit when there are invalid ranges or series with missing mandatory roles 2007/02/27 13:45:31 bm 1.1.2.36: Disable controls and tabs when invalid ranges were entered 2007/02/09 12:31:17 bm 1.1.2.35: implement adaptions for different look in wizard and stand-alone source data dialog, according to spec FlexibleSourceRangeSelection 2007/02/08 21:25:33 iha 1.1.2.34: resync m195 -> m202 2006/10/27 14:59:19 iha 1.1.2.33: name consolidation 2006/10/24 11:55:16 bm 1.1.2.32: enable range chooser in Calc 2005/11/14 17:53:12 iha 1.1.2.31: don't update model again at end of execute as this was done already - undo is done outside of the dialog 2005/10/11 09:20:09 bm 1.1.2.30: license header change 2005/09/29 12:12:25 iha 1.1.2.29: #i55138# helpId 2005/09/27 15:02:53 iha 1.1.2.28: #i55138# enable helpids for data ranges dialog (resource depth must be <3 ) 2005/08/18 15:20:41 bm 1.1.2.27: (gs)etDiagram -> (gs)etFirstDiagram to avoid name clashes with old API 2005/04/15 14:48:07 bm 1.1.2.26: data source and range choose dialog rework 2004/06/30 16:14:16 bm 1.1.2.25: some fixes 2004/06/29 12:21:52 bm 1.1.2.24: shared data for range chooser and data source tab pages 2004/06/17 13:05:10 bm 1.1.2.23: some minor preliminary fixes 2004/06/17 10:03:24 bm 1.1.2.22: data source dialog is a tab dialog now using the same tabpages as the wizard 2004/06/03 09:31:41 bm 1.1.2.21: Embedding API changes 2004/05/24 17:47:44 bm 1.1.2.20: data source dialog is deprecated -> is a tabpage now 2004/05/17 17:33:48 iha 1.1.2.19: provide object naming; resource cleanup 2004/05/07 16:24:23 iha 1.1.2.18: #i20344# moved RefButton to RangeSelectionButton 2004/05/07 16:12:03 bm 1.1.2.17: get label text from ranges bigger than one cell 2004/05/05 20:46:59 iha 1.1.2.16: resource cleanup 2004/05/05 15:58:21 iha 1.1.2.15: update label content from spreadsheet cell 2004/04/28 19:07:01 iha 1.1.2.14: #i20344# icon cleanup, prepare line subtypes 2004/04/27 15:52:27 bm 1.1.2.13: warning removed 2004/04/27 14:27:41 bm 1.1.2.12: warnings removed 2004/04/27 13:28:29 bm 1.1.2.11: use internal role-name as key for role-entries. (listbox now contains internal-role-name (invisible), UI role-name, range string) 2004/04/15 17:25:32 bm 1.1.2.10: control-enabling DialogSeries is now declared in cxx 2004/04/14 12:20:06 bm 1.1.2.9: createRangeSelection: also works for embedded chart in calc 2004/04/13 09:53:11 bm 1.1.2.8: show correct string for multi-cell labels 2004/04/08 15:19:55 bm 1.1.2.7: disable categories range ('shrink') button 2004/04/08 15:16:19 bm 1.1.2.6: use values-x instead of domain-x 2004/04/08 14:56:31 bm 1.1.2.5: applying categories to model, accept changes made in editfields (no check yet) 2004/04/07 18:46:21 bm 1.1.2.4: dialog uses internal data structure, additional field for label range 2004/03/29 13:24:38 bm 1.1.2.3: XDataSource: getSourceRangeRepresentation -> getSourceIdentifier 2004/03/19 16:43:14 bm 1.1.2.2: show names of data series correctly 2004/03/19 14:26:19 bm 1.1.2.1: dialog for flexible source range selection
2007-05-22 16:33:25 +00:00
m_pTabControl->SelectTabPage( m_nLastPageId );
}
DataSourceDialog::~DataSourceDialog()
{
delete m_pRangeChooserTabePage;
delete m_pDataSourceTabPage;
m_nLastPageId = m_pTabControl->GetCurPageId();
delete m_pTabControl;
}
short DataSourceDialog::Execute()
{
short nResult = TabDialog::Execute();
if( nResult == RET_OK )
{
if( m_pRangeChooserTabePage )
m_pRangeChooserTabePage->commitPage();
if( m_pDataSourceTabPage )
m_pDataSourceTabPage->commitPage();
}
return nResult;
}
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/02/27 16:27:59 bm 1.1.2.37: #i71233# disable dialog commit when there are invalid ranges or series with missing mandatory roles 2007/02/27 13:45:31 bm 1.1.2.36: Disable controls and tabs when invalid ranges were entered 2007/02/09 12:31:17 bm 1.1.2.35: implement adaptions for different look in wizard and stand-alone source data dialog, according to spec FlexibleSourceRangeSelection 2007/02/08 21:25:33 iha 1.1.2.34: resync m195 -> m202 2006/10/27 14:59:19 iha 1.1.2.33: name consolidation 2006/10/24 11:55:16 bm 1.1.2.32: enable range chooser in Calc 2005/11/14 17:53:12 iha 1.1.2.31: don't update model again at end of execute as this was done already - undo is done outside of the dialog 2005/10/11 09:20:09 bm 1.1.2.30: license header change 2005/09/29 12:12:25 iha 1.1.2.29: #i55138# helpId 2005/09/27 15:02:53 iha 1.1.2.28: #i55138# enable helpids for data ranges dialog (resource depth must be <3 ) 2005/08/18 15:20:41 bm 1.1.2.27: (gs)etDiagram -> (gs)etFirstDiagram to avoid name clashes with old API 2005/04/15 14:48:07 bm 1.1.2.26: data source and range choose dialog rework 2004/06/30 16:14:16 bm 1.1.2.25: some fixes 2004/06/29 12:21:52 bm 1.1.2.24: shared data for range chooser and data source tab pages 2004/06/17 13:05:10 bm 1.1.2.23: some minor preliminary fixes 2004/06/17 10:03:24 bm 1.1.2.22: data source dialog is a tab dialog now using the same tabpages as the wizard 2004/06/03 09:31:41 bm 1.1.2.21: Embedding API changes 2004/05/24 17:47:44 bm 1.1.2.20: data source dialog is deprecated -> is a tabpage now 2004/05/17 17:33:48 iha 1.1.2.19: provide object naming; resource cleanup 2004/05/07 16:24:23 iha 1.1.2.18: #i20344# moved RefButton to RangeSelectionButton 2004/05/07 16:12:03 bm 1.1.2.17: get label text from ranges bigger than one cell 2004/05/05 20:46:59 iha 1.1.2.16: resource cleanup 2004/05/05 15:58:21 iha 1.1.2.15: update label content from spreadsheet cell 2004/04/28 19:07:01 iha 1.1.2.14: #i20344# icon cleanup, prepare line subtypes 2004/04/27 15:52:27 bm 1.1.2.13: warning removed 2004/04/27 14:27:41 bm 1.1.2.12: warnings removed 2004/04/27 13:28:29 bm 1.1.2.11: use internal role-name as key for role-entries. (listbox now contains internal-role-name (invisible), UI role-name, range string) 2004/04/15 17:25:32 bm 1.1.2.10: control-enabling DialogSeries is now declared in cxx 2004/04/14 12:20:06 bm 1.1.2.9: createRangeSelection: also works for embedded chart in calc 2004/04/13 09:53:11 bm 1.1.2.8: show correct string for multi-cell labels 2004/04/08 15:19:55 bm 1.1.2.7: disable categories range ('shrink') button 2004/04/08 15:16:19 bm 1.1.2.6: use values-x instead of domain-x 2004/04/08 14:56:31 bm 1.1.2.5: applying categories to model, accept changes made in editfields (no check yet) 2004/04/07 18:46:21 bm 1.1.2.4: dialog uses internal data structure, additional field for label range 2004/03/29 13:24:38 bm 1.1.2.3: XDataSource: getSourceRangeRepresentation -> getSourceIdentifier 2004/03/19 16:43:14 bm 1.1.2.2: show names of data series correctly 2004/03/19 14:26:19 bm 1.1.2.1: dialog for flexible source range selection
2007-05-22 16:33:25 +00:00
void DataSourceDialog::setInvalidPage( TabPage * pTabPage )
{
if( pTabPage == m_pRangeChooserTabePage )
m_bRangeChooserTabIsValid = false;
else if( pTabPage == m_pDataSourceTabPage )
m_bDataSourceTabIsValid = false;
if( ! (m_bRangeChooserTabIsValid && m_bDataSourceTabIsValid ))
{
m_pBtnOK->Enable( false );
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/02/27 16:27:59 bm 1.1.2.37: #i71233# disable dialog commit when there are invalid ranges or series with missing mandatory roles 2007/02/27 13:45:31 bm 1.1.2.36: Disable controls and tabs when invalid ranges were entered 2007/02/09 12:31:17 bm 1.1.2.35: implement adaptions for different look in wizard and stand-alone source data dialog, according to spec FlexibleSourceRangeSelection 2007/02/08 21:25:33 iha 1.1.2.34: resync m195 -> m202 2006/10/27 14:59:19 iha 1.1.2.33: name consolidation 2006/10/24 11:55:16 bm 1.1.2.32: enable range chooser in Calc 2005/11/14 17:53:12 iha 1.1.2.31: don't update model again at end of execute as this was done already - undo is done outside of the dialog 2005/10/11 09:20:09 bm 1.1.2.30: license header change 2005/09/29 12:12:25 iha 1.1.2.29: #i55138# helpId 2005/09/27 15:02:53 iha 1.1.2.28: #i55138# enable helpids for data ranges dialog (resource depth must be <3 ) 2005/08/18 15:20:41 bm 1.1.2.27: (gs)etDiagram -> (gs)etFirstDiagram to avoid name clashes with old API 2005/04/15 14:48:07 bm 1.1.2.26: data source and range choose dialog rework 2004/06/30 16:14:16 bm 1.1.2.25: some fixes 2004/06/29 12:21:52 bm 1.1.2.24: shared data for range chooser and data source tab pages 2004/06/17 13:05:10 bm 1.1.2.23: some minor preliminary fixes 2004/06/17 10:03:24 bm 1.1.2.22: data source dialog is a tab dialog now using the same tabpages as the wizard 2004/06/03 09:31:41 bm 1.1.2.21: Embedding API changes 2004/05/24 17:47:44 bm 1.1.2.20: data source dialog is deprecated -> is a tabpage now 2004/05/17 17:33:48 iha 1.1.2.19: provide object naming; resource cleanup 2004/05/07 16:24:23 iha 1.1.2.18: #i20344# moved RefButton to RangeSelectionButton 2004/05/07 16:12:03 bm 1.1.2.17: get label text from ranges bigger than one cell 2004/05/05 20:46:59 iha 1.1.2.16: resource cleanup 2004/05/05 15:58:21 iha 1.1.2.15: update label content from spreadsheet cell 2004/04/28 19:07:01 iha 1.1.2.14: #i20344# icon cleanup, prepare line subtypes 2004/04/27 15:52:27 bm 1.1.2.13: warning removed 2004/04/27 14:27:41 bm 1.1.2.12: warnings removed 2004/04/27 13:28:29 bm 1.1.2.11: use internal role-name as key for role-entries. (listbox now contains internal-role-name (invisible), UI role-name, range string) 2004/04/15 17:25:32 bm 1.1.2.10: control-enabling DialogSeries is now declared in cxx 2004/04/14 12:20:06 bm 1.1.2.9: createRangeSelection: also works for embedded chart in calc 2004/04/13 09:53:11 bm 1.1.2.8: show correct string for multi-cell labels 2004/04/08 15:19:55 bm 1.1.2.7: disable categories range ('shrink') button 2004/04/08 15:16:19 bm 1.1.2.6: use values-x instead of domain-x 2004/04/08 14:56:31 bm 1.1.2.5: applying categories to model, accept changes made in editfields (no check yet) 2004/04/07 18:46:21 bm 1.1.2.4: dialog uses internal data structure, additional field for label range 2004/03/29 13:24:38 bm 1.1.2.3: XDataSource: getSourceRangeRepresentation -> getSourceIdentifier 2004/03/19 16:43:14 bm 1.1.2.2: show names of data series correctly 2004/03/19 14:26:19 bm 1.1.2.1: dialog for flexible source range selection
2007-05-22 16:33:25 +00:00
OSL_ASSERT( m_pTabControl );
// note: there seems to be no suitable mechanism to address pages by
// identifier, at least it is unclear what the page identifiers are.
// @todo: change the fixed numbers to identifiers
if( m_bRangeChooserTabIsValid )
m_pTabControl->SetCurPageId( m_pTabControl->GetPageId( 1 ));
else if( m_bDataSourceTabIsValid )
m_pTabControl->SetCurPageId( m_pTabControl->GetPageId( 0 ));
m_pTabControl->DisableTabToggling();
}
}
void DataSourceDialog::setValidPage( TabPage * pTabPage )
{
if( pTabPage == m_pRangeChooserTabePage )
m_bRangeChooserTabIsValid = true;
else if( pTabPage == m_pDataSourceTabPage )
m_bDataSourceTabIsValid = true;
if( m_bRangeChooserTabIsValid && m_bDataSourceTabIsValid )
{
m_pBtnOK->Enable( true );
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/02/27 16:27:59 bm 1.1.2.37: #i71233# disable dialog commit when there are invalid ranges or series with missing mandatory roles 2007/02/27 13:45:31 bm 1.1.2.36: Disable controls and tabs when invalid ranges were entered 2007/02/09 12:31:17 bm 1.1.2.35: implement adaptions for different look in wizard and stand-alone source data dialog, according to spec FlexibleSourceRangeSelection 2007/02/08 21:25:33 iha 1.1.2.34: resync m195 -> m202 2006/10/27 14:59:19 iha 1.1.2.33: name consolidation 2006/10/24 11:55:16 bm 1.1.2.32: enable range chooser in Calc 2005/11/14 17:53:12 iha 1.1.2.31: don't update model again at end of execute as this was done already - undo is done outside of the dialog 2005/10/11 09:20:09 bm 1.1.2.30: license header change 2005/09/29 12:12:25 iha 1.1.2.29: #i55138# helpId 2005/09/27 15:02:53 iha 1.1.2.28: #i55138# enable helpids for data ranges dialog (resource depth must be <3 ) 2005/08/18 15:20:41 bm 1.1.2.27: (gs)etDiagram -> (gs)etFirstDiagram to avoid name clashes with old API 2005/04/15 14:48:07 bm 1.1.2.26: data source and range choose dialog rework 2004/06/30 16:14:16 bm 1.1.2.25: some fixes 2004/06/29 12:21:52 bm 1.1.2.24: shared data for range chooser and data source tab pages 2004/06/17 13:05:10 bm 1.1.2.23: some minor preliminary fixes 2004/06/17 10:03:24 bm 1.1.2.22: data source dialog is a tab dialog now using the same tabpages as the wizard 2004/06/03 09:31:41 bm 1.1.2.21: Embedding API changes 2004/05/24 17:47:44 bm 1.1.2.20: data source dialog is deprecated -> is a tabpage now 2004/05/17 17:33:48 iha 1.1.2.19: provide object naming; resource cleanup 2004/05/07 16:24:23 iha 1.1.2.18: #i20344# moved RefButton to RangeSelectionButton 2004/05/07 16:12:03 bm 1.1.2.17: get label text from ranges bigger than one cell 2004/05/05 20:46:59 iha 1.1.2.16: resource cleanup 2004/05/05 15:58:21 iha 1.1.2.15: update label content from spreadsheet cell 2004/04/28 19:07:01 iha 1.1.2.14: #i20344# icon cleanup, prepare line subtypes 2004/04/27 15:52:27 bm 1.1.2.13: warning removed 2004/04/27 14:27:41 bm 1.1.2.12: warnings removed 2004/04/27 13:28:29 bm 1.1.2.11: use internal role-name as key for role-entries. (listbox now contains internal-role-name (invisible), UI role-name, range string) 2004/04/15 17:25:32 bm 1.1.2.10: control-enabling DialogSeries is now declared in cxx 2004/04/14 12:20:06 bm 1.1.2.9: createRangeSelection: also works for embedded chart in calc 2004/04/13 09:53:11 bm 1.1.2.8: show correct string for multi-cell labels 2004/04/08 15:19:55 bm 1.1.2.7: disable categories range ('shrink') button 2004/04/08 15:16:19 bm 1.1.2.6: use values-x instead of domain-x 2004/04/08 14:56:31 bm 1.1.2.5: applying categories to model, accept changes made in editfields (no check yet) 2004/04/07 18:46:21 bm 1.1.2.4: dialog uses internal data structure, additional field for label range 2004/03/29 13:24:38 bm 1.1.2.3: XDataSource: getSourceRangeRepresentation -> getSourceIdentifier 2004/03/19 16:43:14 bm 1.1.2.2: show names of data series correctly 2004/03/19 14:26:19 bm 1.1.2.1: dialog for flexible source range selection
2007-05-22 16:33:25 +00:00
OSL_ASSERT( m_pTabControl );
m_pTabControl->EnableTabToggling();
}
}
} // namespace chart
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */