summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2014-03-09 21:28:53 +0100
committerMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2014-03-17 08:13:48 +0100
commit0e894caf47a7969b1ec65665340e1b5522ef7b93 (patch)
treec73fe2e2f5d4810c5e9ef188ebe9250cf1912d94
parentc66229bfa4284758b787bf80ddd1b2e3795881df (diff)
we also need to translate from ui to internal roles
Change-Id: Id66f2f015d1eabe469a944f2bbafe2afbb360464
-rw-r--r--chart2/source/controller/dialogs/DialogModel.cxx5
-rw-r--r--chart2/source/controller/dialogs/DialogModel.hxx1
-rw-r--r--chart2/source/controller/dialogs/tp_DataSource.cxx2
3 files changed, 7 insertions, 1 deletions
diff --git a/chart2/source/controller/dialogs/DialogModel.cxx b/chart2/source/controller/dialogs/DialogModel.cxx
index 45f57c96544e..bc4e110bf44f 100644
--- a/chart2/source/controller/dialogs/DialogModel.cxx
+++ b/chart2/source/controller/dialogs/DialogModel.cxx
@@ -742,6 +742,11 @@ OUString DialogModel::ConvertRoleFromInternalToUI( const OUString & rRoleString
return lcl_ConvertRole( rRoleString, true );
}
+OUString DialogModel::ConvertRoleFromUIToInternal( const OUString & rRoleString )
+{
+ return lcl_ConvertRole( rRoleString, false );
+}
+
OUString DialogModel::GetRoleDataLabel()
{
return ::chart::SchResId(STR_OBJECT_DATALABELS).toString();
diff --git a/chart2/source/controller/dialogs/DialogModel.hxx b/chart2/source/controller/dialogs/DialogModel.hxx
index 99a92b8d63cd..7e5e8304206a 100644
--- a/chart2/source/controller/dialogs/DialogModel.hxx
+++ b/chart2/source/controller/dialogs/DialogModel.hxx
@@ -158,6 +158,7 @@ public:
void startControllerLockTimer();
static OUString ConvertRoleFromInternalToUI( const OUString & rRoleString );
+ static OUString ConvertRoleFromUIToInternal( const OUString& rRoleString );
static OUString GetRoleDataLabel();
// pass a role string (not translated) and get an index that serves for
diff --git a/chart2/source/controller/dialogs/tp_DataSource.cxx b/chart2/source/controller/dialogs/tp_DataSource.cxx
index 11b0b7c416bf..9e2a4532558e 100644
--- a/chart2/source/controller/dialogs/tp_DataSource.cxx
+++ b/chart2/source/controller/dialogs/tp_DataSource.cxx
@@ -775,7 +775,7 @@ IMPL_LINK_NOARG( DataSourceTabPage, AddMappingHdl )
short aRet = aDlg.Execute();
if(aRet == RET_OK)
{
- OUString aNewMappingName = aDlg.getSelectedEntry();
+ OUString aNewMappingName = DialogModel::ConvertRoleFromUIToInternal(aDlg.getSelectedEntry());
if(!aNewMappingName.isEmpty())
m_pLB_ROLE->InsertEntry( lcl_GetRoleLBEntry( aNewMappingName, OUString()));
}