summaryrefslogtreecommitdiff
path: root/chart2/source/controller/dialogs
diff options
context:
space:
mode:
authorMathias Bauer <mba@openoffice.org>2010-07-13 14:38:37 +0200
committerMathias Bauer <mba@openoffice.org>2010-07-13 14:38:37 +0200
commit0266406fef116fbed7b8e69e309bcda0df4896dd (patch)
tree7d08d330d7ee76707ab4eb757a60fe2559178957 /chart2/source/controller/dialogs
parent4a02c63d1431b2e8686a035e119c4a2f5c972592 (diff)
parent686b7955271806e65222a3a4bfe97365cab33a06 (diff)
CWS changehid: resync to m84
Diffstat (limited to 'chart2/source/controller/dialogs')
-rw-r--r--chart2/source/controller/dialogs/TabPages.hrc1
-rw-r--r--chart2/source/controller/dialogs/dlg_InsertLegend.src4
-rw-r--r--chart2/source/controller/dialogs/res_ErrorBar.cxx19
-rw-r--r--chart2/source/controller/dialogs/res_LegendPosition_tmpl.hrc2
-rw-r--r--chart2/source/controller/dialogs/tp_ChartType.cxx28
-rw-r--r--chart2/source/controller/dialogs/tp_ChartType.hxx2
-rw-r--r--chart2/source/controller/dialogs/tp_DataSource.cxx4
-rw-r--r--chart2/source/controller/dialogs/tp_DataSource.hxx2
-rw-r--r--chart2/source/controller/dialogs/tp_RangeChooser.cxx4
-rw-r--r--chart2/source/controller/dialogs/tp_RangeChooser.hxx2
-rw-r--r--chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx2
-rw-r--r--chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.hxx2
12 files changed, 54 insertions, 18 deletions
diff --git a/chart2/source/controller/dialogs/TabPages.hrc b/chart2/source/controller/dialogs/TabPages.hrc
index ba9a330b250e..1f445083738f 100644
--- a/chart2/source/controller/dialogs/TabPages.hrc
+++ b/chart2/source/controller/dialogs/TabPages.hrc
@@ -46,7 +46,6 @@
////#define RBT_DOWNUP 3
////#define RBT_AUTOORDER 4
-//#define TP_STAT 905
#define FL_TEXTBREAK 3
#define CBX_TEXTBREAK 2
#define CBX_TEXTOVERLAP 4
diff --git a/chart2/source/controller/dialogs/dlg_InsertLegend.src b/chart2/source/controller/dialogs/dlg_InsertLegend.src
index cfe8ab3493e0..1f768f7c065b 100644
--- a/chart2/source/controller/dialogs/dlg_InsertLegend.src
+++ b/chart2/source/controller/dialogs/dlg_InsertLegend.src
@@ -39,9 +39,9 @@ ModalDialog DLG_LEGEND
HelpID = HID_INSERT_CHART_LEGEND ;
OutputSize = TRUE ;
SVLook = TRUE ;
- Size = MAP_APPFONT ( 135 , 80 ) ;
+ Size = MAP_APPFONT ( 156 , 80 ) ;
Moveable = TRUE ;
- BUTTONS_OK_CANCEL_HELP_STACKED( 79 )
+ BUTTONS_OK_CANCEL_HELP_STACKED( 101 )
RESOURCE_LEGENDDISPLAY( 6, 6 )
RESOURCE_LEGENDPOSITION( 15, 6 + RSC_CD_FIXEDTEXT_HEIGHT +6 )
};
diff --git a/chart2/source/controller/dialogs/res_ErrorBar.cxx b/chart2/source/controller/dialogs/res_ErrorBar.cxx
index 75457a5e7cad..8b649072538e 100644
--- a/chart2/source/controller/dialogs/res_ErrorBar.cxx
+++ b/chart2/source/controller/dialogs/res_ErrorBar.cxx
@@ -37,6 +37,7 @@
#include "RangeSelectionHelper.hxx"
// for RANGE_SELECTION_INVALID_RANGE_BACKGROUND_COLOR
#include "TabPageNotifiable.hxx"
+#include "macros.hxx"
#include <rtl/math.hxx>
#include <vcl/dialog.hxx>
@@ -147,7 +148,8 @@ ErrorBarResources::ErrorBarResources( Window* pParent, Dialog * pParentDialog,
m_pParentWindow( pParent ),
m_pParentDialog( pParentDialog ),
m_pCurrentRangeChoosingField( 0 ),
- m_bHasInternalDataProvider( true )
+ m_bHasInternalDataProvider( true ),
+ m_bDisableDataTableDialog( false )
{
if( m_bNoneAvailable )
m_aRbNone.SetClickHdl( LINK( this, ErrorBarResources, CategoryChosen ));
@@ -197,7 +199,21 @@ void ErrorBarResources::SetChartDocumentForRangeChoosing(
const uno::Reference< chart2::XChartDocument > & xChartDocument )
{
if( xChartDocument.is())
+ {
m_bHasInternalDataProvider = xChartDocument->hasInternalDataProvider();
+ uno::Reference< beans::XPropertySet > xProps( xChartDocument, uno::UNO_QUERY );
+ if ( xProps.is() )
+ {
+ try
+ {
+ xProps->getPropertyValue( C2U( "DisableDataTableDialog" ) ) >>= m_bDisableDataTableDialog;
+ }
+ catch( uno::Exception& e )
+ {
+ ASSERT_EXCEPTION( e );
+ }
+ }
+ }
m_apRangeSelectionHelper.reset( new RangeSelectionHelper( xChartDocument ));
// has internal data provider => rename "cell range" to "from data"
@@ -240,6 +256,7 @@ void ErrorBarResources::UpdateControlStates()
m_aLbFunction.Enable( bIsFunction );
// range buttons
+ m_aRbRange.Enable( !m_bHasInternalDataProvider || !m_bDisableDataTableDialog );
bool bShowRange = ( m_aRbRange.IsChecked());
bool bCanChooseRange =
( bShowRange &&
diff --git a/chart2/source/controller/dialogs/res_LegendPosition_tmpl.hrc b/chart2/source/controller/dialogs/res_LegendPosition_tmpl.hrc
index 4218b322a948..17f6518eabe4 100644
--- a/chart2/source/controller/dialogs/res_LegendPosition_tmpl.hrc
+++ b/chart2/source/controller/dialogs/res_LegendPosition_tmpl.hrc
@@ -35,7 +35,7 @@ CheckBox CBX_SHOWLEGEND \
{ \
HelpID = HID_SCH_LEGEND_SHOW ; \
Pos = MAP_APPFONT ( xpos , ypos ) ; \
- Size = MAP_APPFONT ( 67 , 12 ) ; \
+ Size = MAP_APPFONT ( 95 , 12 ) ; \
Text [ en-US ] = "~Display legend" ; \
TabStop = TRUE ; \
};
diff --git a/chart2/source/controller/dialogs/tp_ChartType.cxx b/chart2/source/controller/dialogs/tp_ChartType.cxx
index 244d23ed8eff..ec6c1d2a1c10 100644
--- a/chart2/source/controller/dialogs/tp_ChartType.cxx
+++ b/chart2/source/controller/dialogs/tp_ChartType.cxx
@@ -853,15 +853,35 @@ ChartTypeTabPage::ChartTypeTabPage( Window* pParent
bool bIsHighContrast = ( true && GetSettings().GetStyleSettings().GetHighContrastMode() );
+ bool bDisableComplexChartTypes = false;
+ uno::Reference< beans::XPropertySet > xProps( m_xChartModel, uno::UNO_QUERY );
+ if ( xProps.is() )
+ {
+ try
+ {
+ xProps->getPropertyValue( C2U( "DisableComplexChartTypes" ) ) >>= bDisableComplexChartTypes;
+ }
+ catch( uno::Exception& e )
+ {
+ ASSERT_EXCEPTION( e );
+ }
+ }
+
m_aChartTypeDialogControllerList.push_back(new ColumnChartDialogController() );
m_aChartTypeDialogControllerList.push_back(new BarChartDialogController() );
m_aChartTypeDialogControllerList.push_back(new PieChartDialogController() );
m_aChartTypeDialogControllerList.push_back(new AreaChartDialogController() );
m_aChartTypeDialogControllerList.push_back(new LineChartDialogController() );
- m_aChartTypeDialogControllerList.push_back(new XYChartDialogController() );
- m_aChartTypeDialogControllerList.push_back(new BubbleChartDialogController() );
+ if ( !bDisableComplexChartTypes )
+ {
+ m_aChartTypeDialogControllerList.push_back(new XYChartDialogController() );
+ m_aChartTypeDialogControllerList.push_back(new BubbleChartDialogController() );
+ }
m_aChartTypeDialogControllerList.push_back(new NetChartDialogController() );
- m_aChartTypeDialogControllerList.push_back(new StockChartDialogController() );
+ if ( !bDisableComplexChartTypes )
+ {
+ m_aChartTypeDialogControllerList.push_back(new StockChartDialogController() );
+ }
m_aChartTypeDialogControllerList.push_back(new CombiColumnLineChartDialogController() );
::std::vector< ChartTypeDialogController* >::const_iterator aIter = m_aChartTypeDialogControllerList.begin();
@@ -1133,7 +1153,7 @@ void ChartTypeTabPage::initializePage()
}
}
-sal_Bool ChartTypeTabPage::commitPage( CommitPageReason /*eReason*/ )
+sal_Bool ChartTypeTabPage::commitPage( ::svt::WizardTypes::CommitPageReason /*eReason*/ )
{
//commit changes to model
if( !m_bDoLiveUpdate && m_pCurrentMainType )
diff --git a/chart2/source/controller/dialogs/tp_ChartType.hxx b/chart2/source/controller/dialogs/tp_ChartType.hxx
index 233d9ee910c6..b40cbb1956db 100644
--- a/chart2/source/controller/dialogs/tp_ChartType.hxx
+++ b/chart2/source/controller/dialogs/tp_ChartType.hxx
@@ -73,7 +73,7 @@ public:
virtual ~ChartTypeTabPage();
virtual void initializePage();
- virtual sal_Bool commitPage( CommitPageReason eReason );
+ virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason eReason );
virtual ::com::sun::star::uno::Reference<
::com::sun::star::chart2::XChartTypeTemplate > getCurrentTemplate() const;
diff --git a/chart2/source/controller/dialogs/tp_DataSource.cxx b/chart2/source/controller/dialogs/tp_DataSource.cxx
index 10f0421d4013..7c5f0fb3967b 100644
--- a/chart2/source/controller/dialogs/tp_DataSource.cxx
+++ b/chart2/source/controller/dialogs/tp_DataSource.cxx
@@ -382,10 +382,10 @@ void DataSourceTabPage::DeactivatePage()
void DataSourceTabPage::commitPage()
{
- commitPage(eFinish);
+ commitPage(::svt::WizardTypes::eFinish);
}
-sal_Bool DataSourceTabPage::commitPage( CommitPageReason /*eReason*/ )
+sal_Bool DataSourceTabPage::commitPage( ::svt::WizardTypes::CommitPageReason /*eReason*/ )
{
//ranges may have been edited in the meanwhile (dirty is true in that case here)
if( isValid() )
diff --git a/chart2/source/controller/dialogs/tp_DataSource.hxx b/chart2/source/controller/dialogs/tp_DataSource.hxx
index 44ffa2b3cdf2..e65b503bfcc2 100644
--- a/chart2/source/controller/dialogs/tp_DataSource.hxx
+++ b/chart2/source/controller/dialogs/tp_DataSource.hxx
@@ -89,7 +89,7 @@ public:
protected:
// OWizardPage
virtual void ActivatePage();
- virtual sal_Bool commitPage( CommitPageReason eReason );
+ virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason eReason );
//TabPage
virtual void DeactivatePage();
diff --git a/chart2/source/controller/dialogs/tp_RangeChooser.cxx b/chart2/source/controller/dialogs/tp_RangeChooser.cxx
index f1e4a1e5ff64..3ba6ca0f74b2 100644
--- a/chart2/source/controller/dialogs/tp_RangeChooser.cxx
+++ b/chart2/source/controller/dialogs/tp_RangeChooser.cxx
@@ -221,10 +221,10 @@ void RangeChooserTabPage::DeactivatePage()
void RangeChooserTabPage::commitPage()
{
- commitPage(eFinish);
+ commitPage(::svt::WizardTypes::eFinish);
}
-sal_Bool RangeChooserTabPage::commitPage( CommitPageReason /*eReason*/ )
+sal_Bool RangeChooserTabPage::commitPage( ::svt::WizardTypes::CommitPageReason /*eReason*/ )
{
//ranges may have been edited in the meanwhile (dirty is true in that case here)
if( isValid() )
diff --git a/chart2/source/controller/dialogs/tp_RangeChooser.hxx b/chart2/source/controller/dialogs/tp_RangeChooser.hxx
index 9a2b05628fa2..4d985669195c 100644
--- a/chart2/source/controller/dialogs/tp_RangeChooser.hxx
+++ b/chart2/source/controller/dialogs/tp_RangeChooser.hxx
@@ -73,7 +73,7 @@ protected: //methods
//OWizardPage
virtual void ActivatePage();
- virtual sal_Bool commitPage( CommitPageReason eReason );
+ virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason eReason );
//TabPage
virtual void DeactivatePage();
diff --git a/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx b/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx
index 8c97de81dd5d..03988116854e 100644
--- a/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx
+++ b/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx
@@ -125,7 +125,7 @@ void TitlesAndObjectsTabPage::initializePage()
m_bCommitToModel = true;
}
-sal_Bool TitlesAndObjectsTabPage::commitPage( CommitPageReason /*eReason*/ )
+sal_Bool TitlesAndObjectsTabPage::commitPage( ::svt::WizardTypes::CommitPageReason /*eReason*/ )
{
if( m_apTitleResources->IsModified() ) //titles may have changed in the meanwhile
commitToModel();
diff --git a/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.hxx b/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.hxx
index d6bb869c2f6d..1cd9c6162a46 100644
--- a/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.hxx
+++ b/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.hxx
@@ -59,7 +59,7 @@ public:
virtual ~TitlesAndObjectsTabPage();
virtual void initializePage();
- virtual sal_Bool commitPage( CommitPageReason eReason );
+ virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason eReason );
virtual bool canAdvance() const;
protected: