diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-03-02 12:26:06 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-07-07 17:42:13 +0200 |
commit | 39a4675d584ddbd2ac544e63bfa838da34a03a02 (patch) | |
tree | c6055491f95fb8c18f6737a0f44910352983a741 /cui | |
parent | 3f6410328f931cde01679e7ef3c463fbf76dd4d9 (diff) |
cui: show classification path in SvxPathTabPage
It's not really able to modify it yet, as it wants to select a
directory, and we need a file instead.
Change-Id: I05b0e5a42ef64e56caeae35054fb331e3f1a712c
(cherry picked from commit 87629f39bbae1ad774d588c50d030bff0ba8d8a2)
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/inc/cuires.hrc | 1 | ||||
-rw-r--r-- | cui/source/options/optpath.cxx | 11 | ||||
-rw-r--r-- | cui/source/options/optpath.src | 4 |
3 files changed, 14 insertions, 2 deletions
diff --git a/cui/source/inc/cuires.hrc b/cui/source/inc/cuires.hrc index e99045d584ce..f9b2843c055c 100644 --- a/cui/source/inc/cuires.hrc +++ b/cui/source/inc/cuires.hrc @@ -163,6 +163,7 @@ #define RID_SVXSTR_KEY_BASIC_PATH (RID_SVX_START + 1007)//? #define RID_SVXSTR_KEY_BITMAP_PATH (RID_SVX_START + 1008)//? #define RID_SVXSTR_KEY_USERDICTIONARY_DIR (RID_SVX_START + 1025)//? +#define RID_SVXSTR_KEY_CLASSIFICATION_PATH (RID_SVX_START + 1118) // dialogs #define STR_MODIFY (RID_SVX_START + 336)//from optdict.src diff --git a/cui/source/options/optpath.cxx b/cui/source/options/optpath.cxx index 8695c0c2003b..677e90b90c25 100644 --- a/cui/source/options/optpath.cxx +++ b/cui/source/options/optpath.cxx @@ -115,6 +115,7 @@ static Handle2CfgNameMapping_Impl const Hdl2CfgMap_Impl[] = { SvtPathOptions::PATH_TEMPLATE, "Template" }, { SvtPathOptions::PATH_WORK, "Work" }, { SvtPathOptions::PATH_DICTIONARY, "Dictionary" }, + { SvtPathOptions::PATH_CLASSIFICATION, "Classification" }, #if OSL_DEBUG_LEVEL > 1 { SvtPathOptions::PATH_LINGUISTIC, "Linguistic" }, #endif @@ -284,7 +285,7 @@ void SvxPathTabPage::Reset( const SfxItemSet* ) long nWidth1 = rBar.GetTextWidth(rBar.GetItemText(1)); long nWidth2 = rBar.GetTextWidth(rBar.GetItemText(2)); - for( sal_uInt16 i = 0; i <= (sal_uInt16)SvtPathOptions::PATH_WORK; ++i ) + for( sal_uInt16 i = 0; i <= (sal_uInt16)SvtPathOptions::PATH_CLASSIFICATION; ++i ) { // only writer uses autotext if ( i == SvtPathOptions::PATH_AUTOTEXT @@ -301,12 +302,18 @@ void SvxPathTabPage::Reset( const SfxItemSet* ) case SvtPathOptions::PATH_TEMP: case SvtPathOptions::PATH_TEMPLATE: case SvtPathOptions::PATH_DICTIONARY: + case SvtPathOptions::PATH_CLASSIFICATION: #if OSL_DEBUG_LEVEL > 1 case SvtPathOptions::PATH_LINGUISTIC: #endif case SvtPathOptions::PATH_WORK: { - OUString aStr( CUI_RES( RID_SVXSTR_PATH_NAME_START + i ) ); + sal_uInt32 nId = RID_SVXSTR_PATH_NAME_START + i; + if (i == SvtPathOptions::PATH_CLASSIFICATION) + // RID_SVXSTR_KEY_USERDICTIONARY_DIR already took our slot, so name the key explicitly. + nId = RID_SVXSTR_KEY_CLASSIFICATION_PATH; + OUString aStr(CUI_RES(nId)); + nWidth1 = std::max(nWidth1, pPathBox->GetTextWidth(aStr)); aStr += "\t"; OUString sInternal, sUser, sWritable; diff --git a/cui/source/options/optpath.src b/cui/source/options/optpath.src index 95f5203e6040..8eae97173416 100644 --- a/cui/source/options/optpath.src +++ b/cui/source/options/optpath.src @@ -104,6 +104,10 @@ String RID_SVXSTR_KEY_USERDICTIONARY_DIR { Text [ en-US ] = "User-defined dictionaries"; }; +String RID_SVXSTR_KEY_CLASSIFICATION_PATH +{ + Text [ en-US ] = "Classification" ; +}; String RID_SVXSTR_KEY_AUTOCORRECT_DIR { Text [ en-US ] = "AutoCorrect"; |