From 77cec206e3c49490e6e380c52cb6d45277a03f65 Mon Sep 17 00:00:00 2001 From: Markus Mohrhard Date: Sun, 22 Jun 2014 04:12:04 +0200 Subject: show the property mapping sequences by default Change-Id: I32417ed53e491a66f700e77ae0fff2154fa5441c --- chart2/source/controller/dialogs/DialogModel.cxx | 4 +++ chart2/source/controller/dialogs/tp_DataSource.cxx | 29 ---------------------- chart2/source/controller/dialogs/tp_DataSource.hxx | 2 -- chart2/uiconfig/ui/tp_DataSource.ui | 24 ++---------------- 4 files changed, 6 insertions(+), 53 deletions(-) (limited to 'chart2') diff --git a/chart2/source/controller/dialogs/DialogModel.cxx b/chart2/source/controller/dialogs/DialogModel.cxx index 4cab7d99eb48..e18c7d333216 100644 --- a/chart2/source/controller/dialogs/DialogModel.cxx +++ b/chart2/source/controller/dialogs/DialogModel.cxx @@ -502,6 +502,10 @@ DialogModel::tRolesWithRanges DialogModel::getRolesWithRanges( // add missing optional roles aRoles = xChartType->getSupportedOptionalRoles(); addMissingRoles(aResult, aRoles); + + // add missing property roles + aRoles = xChartType->getSupportedPropertyRoles(); + addMissingRoles(aResult, aRoles); } } catch( const uno::Exception & ex ) diff --git a/chart2/source/controller/dialogs/tp_DataSource.cxx b/chart2/source/controller/dialogs/tp_DataSource.cxx index a13a461bbbf6..f8c93b4b998d 100644 --- a/chart2/source/controller/dialogs/tp_DataSource.cxx +++ b/chart2/source/controller/dialogs/tp_DataSource.cxx @@ -28,7 +28,6 @@ #include "tp_DataSourceControls.hxx" #include "ControllerLockGuard.hxx" #include "DataSourceHelper.hxx" -#include "dlg_PropertyMapping.hxx" #include #include #include @@ -217,7 +216,6 @@ DataSourceTabPage::DataSourceTabPage( get(m_pFT_DATALABELS ,"FT_DATALABELS"); get(m_pEDT_CATEGORIES ,"EDT_CATEGORIES"); get(m_pIMB_RANGE_CAT ,"IMB_RANGE_CAT"); - get(m_pBtn_AddMapping ,"BTN_ADD_MAPPING"); m_pFT_CAPTION->Show(!bHideDescription); @@ -247,9 +245,6 @@ DataSourceTabPage::DataSourceTabPage( m_pEDT_RANGE->SetStyle( m_pEDT_RANGE->GetStyle() | WB_FORCECTRLBACKGROUND ); m_pEDT_CATEGORIES->SetStyle( m_pEDT_CATEGORIES->GetStyle() | WB_FORCECTRLBACKGROUND ); - // mapped properties - m_pBtn_AddMapping->SetClickHdl( LINK( this, DataSourceTabPage, AddMappingHdl )); - // set symbol font for arrows // note: StarSymbol is substituted to OpenSymbol for OOo Font aSymbolFont( m_pBTN_UP->GetFont()); @@ -469,12 +464,6 @@ void DataSourceTabPage::fillRoleListBox() } m_pLB_ROLE->SetUpdateMode( true ); - - if(pSeriesEntry->m_xChartType - ->getSupportedPropertyRoles().getLength() == 0) - m_pBtn_AddMapping->Disable(); - else - m_pBtn_AddMapping->Enable(); } } @@ -773,24 +762,6 @@ IMPL_LINK( DataSourceTabPage, RangeUpdateDataHdl, Edit*, pEdit ) return 0; } -IMPL_LINK_NOARG( DataSourceTabPage, AddMappingHdl ) -{ - SeriesEntry * pSeriesEntry = dynamic_cast< SeriesEntry * >( m_pLB_SERIES->FirstSelected()); - if(!pSeriesEntry) - return 0; - - PropertyMappingDlg aDlg(this, pSeriesEntry->m_xChartType); - short aRet = aDlg.Execute(); - if(aRet == RET_OK) - { - OUString aNewMappingName = DialogModel::ConvertRoleFromUIToInternal(aDlg.getSelectedEntry()); - if(!aNewMappingName.isEmpty()) - m_pLB_ROLE->InsertEntry( lcl_GetRoleLBEntry( aNewMappingName, OUString())); - } - - return 0; -} - void DataSourceTabPage::listeningFinished( const OUString & rNewRange ) { diff --git a/chart2/source/controller/dialogs/tp_DataSource.hxx b/chart2/source/controller/dialogs/tp_DataSource.hxx index b89d4d4499f3..496333e31cdc 100644 --- a/chart2/source/controller/dialogs/tp_DataSource.hxx +++ b/chart2/source/controller/dialogs/tp_DataSource.hxx @@ -82,7 +82,6 @@ protected: DECL_LINK( RangeUpdateDataHdl, Edit* ); DECL_LINK( UpButtonClickedHdl, void* ); DECL_LINK( DownButtonClickedHdl, void* ); - DECL_LINK( AddMappingHdl, void* ); // ____ RangeSelectionListenerParent ____ virtual void listeningFinished( const OUString & rNewRange ) SAL_OVERRIDE; @@ -137,7 +136,6 @@ private: FixedText* m_pFT_DATALABELS;//used for xy charts Edit* m_pEDT_CATEGORIES; PushButton* m_pIMB_RANGE_CAT; - PushButton* m_pBtn_AddMapping; OUString m_aFixedTextRange; diff --git a/chart2/uiconfig/ui/tp_DataSource.ui b/chart2/uiconfig/ui/tp_DataSource.ui index a067a6f46295..f7bed1dfdbba 100644 --- a/chart2/uiconfig/ui/tp_DataSource.ui +++ b/chart2/uiconfig/ui/tp_DataSource.ui @@ -1,6 +1,7 @@ + - + True @@ -96,7 +97,6 @@ True False True - False True @@ -112,7 +112,6 @@ True False True - False True @@ -130,7 +129,6 @@ False True True - False True @@ -146,7 +144,6 @@ True False True - False 1 @@ -248,7 +245,6 @@ True False True - False imageIMB_RANGE_MAIN @@ -330,7 +326,6 @@ True False True - False imageIMB_RANGE_CAT @@ -346,21 +341,6 @@ 5 - - - Add property mapping - False - True - True - True - False - - - False - False - 6 - - False -- cgit