diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-03-02 15:09:28 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-03-02 17:26:39 +0100 |
commit | 5582f0596876c82df343dd0e5d354cd4403e9594 (patch) | |
tree | 9ab68c8d63b42b8e013b1721933dc2b60b505ca5 | |
parent | b4d43cc2152e5cdd274ad76c90532694cc1fb6e2 (diff) |
unotools: handle classification path in SvtDefaultOptions
With this, it's possible to reset a custom classification path back to
its default value.
Change-Id: If0230fa6bb6ab014634dcdface8c470321163097
-rw-r--r-- | officecfg/registry/schema/org/openoffice/Office/Common.xcs | 6 | ||||
-rw-r--r-- | unotools/source/config/defaultoptions.cxx | 13 |
2 files changed, 15 insertions, 4 deletions
diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs index e06114ec195f..99fc0ef83e82 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs @@ -1782,6 +1782,12 @@ </info> <value>$(insturl)/@LIBO_SHARE_FOLDER@/config</value> </prop> + <prop oor:name="Classification" oor:type="xs:string" oor:nillable="false"> + <info> + <desc>Contains the URL of the default TSCP BAF policy file.</desc> + </info> + <value>$(insturl)/@LIBO_SHARE_FOLDER@/classification/example.xml</value> + </prop> <prop oor:name="Dictionary" oor:type="xs:string" oor:nillable="false"> <info> <desc>Specifies the default directory where the provided diff --git a/unotools/source/config/defaultoptions.cxx b/unotools/source/config/defaultoptions.cxx index ee3731b99e6b..caccc9358437 100644 --- a/unotools/source/config/defaultoptions.cxx +++ b/unotools/source/config/defaultoptions.cxx @@ -60,7 +60,8 @@ using namespace com::sun::star::uno; #define DEFAULTPATH__TEMPLATE 18 #define DEFAULTPATH__USERCONFIG 19 #define DEFAULTPATH__WORK 20 -#define DEFAULTPATH__USERDICTIONARY 21 +#define DEFAULTPATH__CLASSIFICATION 21 +#define DEFAULTPATH__USERDICTIONARY 22 // class SvtDefaultOptions_Impl ------------------------------------------ @@ -88,6 +89,7 @@ public: OUString m_aTemplatePath; OUString m_aUserConfigPath; OUString m_aWorkPath; + OUString m_aClassificationPath; OUString m_aUserDictionaryPath; SvtDefaultOptions_Impl(); @@ -134,7 +136,8 @@ static PathToDefaultMapping_Impl const PathMap_Impl[] = { SvtPathOptions::PATH_TEMP, &SvtDefaultOptions_Impl::m_aTempPath }, { SvtPathOptions::PATH_TEMPLATE, &SvtDefaultOptions_Impl::m_aTemplatePath }, { SvtPathOptions::PATH_USERCONFIG, &SvtDefaultOptions_Impl::m_aUserConfigPath }, - { SvtPathOptions::PATH_WORK, &SvtDefaultOptions_Impl::m_aWorkPath } + { SvtPathOptions::PATH_WORK, &SvtDefaultOptions_Impl::m_aWorkPath }, + { SvtPathOptions::PATH_CLASSIFICATION, &SvtDefaultOptions_Impl::m_aClassificationPath } }; // functions ------------------------------------------------------------- @@ -163,7 +166,8 @@ Sequence< OUString > GetDefaultPropertyNames() "Temp", // PATH_TEMP "Template", // PATH_TEMPLATE "UserConfig", // PATH_USERCONFIG - "Work" // PATH_WORK + "Work", // PATH_WORK + "Classification" // PATH_CLASSIFICATION }; const int nCount = sizeof( aPropNames ) / sizeof( const char* ); @@ -192,7 +196,7 @@ OUString SvtDefaultOptions_Impl::GetDefaultPath( sal_uInt16 nId ) const OUString aRet; sal_uInt16 nIdx = 0; - while ( PathMap_Impl[nIdx]._ePath <= SvtPathOptions::PATH_WORK ) + while ( PathMap_Impl[nIdx]._ePath <= SvtPathOptions::PATH_CLASSIFICATION ) { if ( nId == PathMap_Impl[nIdx]._ePath && PathMap_Impl[nIdx]._pDefaultPath ) { @@ -298,6 +302,7 @@ SvtDefaultOptions_Impl::SvtDefaultOptions_Impl() : ConfigItem( "Office.Common/Pa case DEFAULTPATH__TEMPLATE: m_aTemplatePath = aFullPath; break; case DEFAULTPATH__USERCONFIG: m_aUserConfigPath = aFullPath; break; case DEFAULTPATH__WORK: m_aWorkPath = aFullPath; break; + case DEFAULTPATH__CLASSIFICATION: m_aClassificationPath = aFullPath;break; case DEFAULTPATH__USERDICTIONARY: m_aUserDictionaryPath = aFullPath;break; default: |