summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2014-06-22 04:12:04 +0200
committerMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2014-06-22 05:05:00 +0200
commit77cec206e3c49490e6e380c52cb6d45277a03f65 (patch)
tree276548b93d84870d7a0d20a6b9b0da1ed9bd86a0 /chart2
parent086d93f130c9e53d77ed25098cfefaabe5c108e2 (diff)
show the property mapping sequences by default
Change-Id: I32417ed53e491a66f700e77ae0fff2154fa5441c
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/controller/dialogs/DialogModel.cxx4
-rw-r--r--chart2/source/controller/dialogs/tp_DataSource.cxx29
-rw-r--r--chart2/source/controller/dialogs/tp_DataSource.hxx2
-rw-r--r--chart2/uiconfig/ui/tp_DataSource.ui24
4 files changed, 6 insertions, 53 deletions
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 <com/sun/star/sheet/XRangeSelection.hpp>
#include <com/sun/star/table/XCellRange.hpp>
#include <com/sun/star/chart2/XChartType.hpp>
@@ -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 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.16.1 -->
<interface>
- <!-- interface-requires gtk+ 3.0 -->
+ <requires lib="gtk+" version="3.0"/>
<!-- interface-requires LibreOffice 1.0 -->
<object class="GtkImage" id="imageIMB_RANGE_CAT">
<property name="visible">True</property>
@@ -96,7 +97,6 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
</object>
<packing>
@@ -112,7 +112,6 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
<property name="always_show_image">True</property>
</object>
<packing>
@@ -130,7 +129,6 @@
<property name="can_focus">False</property>
<property name="receives_default">True</property>
<property name="hexpand">True</property>
- <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
</object>
<packing>
@@ -146,7 +144,6 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
</object>
<packing>
<property name="left_attach">1</property>
@@ -248,7 +245,6 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
<property name="image">imageIMB_RANGE_MAIN</property>
</object>
<packing>
@@ -330,7 +326,6 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
<property name="image">imageIMB_RANGE_CAT</property>
</object>
<packing>
@@ -346,21 +341,6 @@
<property name="position">5</property>
</packing>
</child>
- <child>
- <object class="GtkButton" id="BTN_ADD_MAPPING">
- <property name="label" translatable="yes">Add property mapping</property>
- <property name="use_action_appearance">False</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">6</property>
- </packing>
- </child>
</object>
<packing>
<property name="expand">False</property>