summaryrefslogtreecommitdiff
path: root/unotools/source/config/configmgr.cxx
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2006-01-05 17:18:59 +0000
committerKurt Zenker <kz@openoffice.org>2006-01-05 17:18:59 +0000
commit33e35e028bb8eefe6d94ea8c545d001eee2eff0c (patch)
tree14c76ec06fb4958738675f1cf1f0418b46f6a184 /unotools/source/config/configmgr.cxx
parentb1e4d8ab556bb67c9c1983aa901322873b0b9818 (diff)
INTEGRATION: CWS iconswitching1 (1.41.24); FILE MERGED
2005/12/16 14:32:22 ka 1.41.24.1: #i36518#: added OPENSOURCECONTEXT property
Diffstat (limited to 'unotools/source/config/configmgr.cxx')
-rw-r--r--unotools/source/config/configmgr.cxx23
1 files changed, 20 insertions, 3 deletions
diff --git a/unotools/source/config/configmgr.cxx b/unotools/source/config/configmgr.cxx
index be202d2dd3f7..418eb519721a 100644
--- a/unotools/source/config/configmgr.cxx
+++ b/unotools/source/config/configmgr.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: configmgr.cxx,v $
*
- * $Revision: 1.41 $
+ * $Revision: 1.42 $
*
- * last change: $Author: rt $ $Date: 2005-09-09 09:41:54 $
+ * last change: $Author: kz $ $Date: 2006-01-05 18:18:59 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -98,6 +98,11 @@ namespace
: public rtl::Static< ::rtl::OUString, XMLFileFormatVersion > {};
struct WriterCompatibilityVersionOOo11
: public rtl::Static< ::rtl::OUString, WriterCompatibilityVersionOOo11 > {};
+ struct OpenSourceContext : public rtl::StaticWithInit< sal_Int32, OpenSourceContext >
+ {
+ sal_Int32 operator() () { return sal_Int32( -1 ); }
+ };
+
}
//-----------------------------------------------------------------------------
@@ -462,6 +467,13 @@ Any ConfigManager::GetDirectConfigProperty(ConfigProperty eProp)
return aRet;
}
+ sal_Int32 &rOpenSourceContext = OpenSourceContext::get();
+ if ( eProp == OPENSOURCECONTEXT && ( rOpenSourceContext >= 0 ) )
+ {
+ aRet <<= rOpenSourceContext;
+ return aRet;
+ }
+
rtl::OUString &rWriterCompatibilityVersionOOo11 = WriterCompatibilityVersionOOo11::get();
if ( eProp == WRITERCOMPATIBILITYVERSIONOOO11 && rWriterCompatibilityVersionOOo11.getLength() )
{
@@ -478,7 +490,8 @@ Any ConfigManager::GetDirectConfigProperty(ConfigProperty eProp)
case PRODUCTVERSION:
case PRODUCTEXTENSION:
case PRODUCTXMLFILEFORMATNAME :
- case PRODUCTXMLFILEFORMATVERSION: sPath += C2U("Setup/Product"); break;
+ case PRODUCTXMLFILEFORMATVERSION:
+ case OPENSOURCECONTEXT: sPath += C2U("Setup/Product"); break;
case DEFAULTCURRENCY: sPath += C2U("Setup/L10N"); break;
@@ -511,6 +524,7 @@ Any ConfigManager::GetDirectConfigProperty(ConfigProperty eProp)
case PRODUCTEXTENSION: sProperty = C2U("ooSetupExtension"); break;
case PRODUCTXMLFILEFORMATNAME: sProperty = C2U("ooXMLFileFormatName"); break;
case PRODUCTXMLFILEFORMATVERSION: sProperty = C2U("ooXMLFileFormatVersion"); break;
+ case OPENSOURCECONTEXT: sProperty = C2U("ooOpenSourceContext"); break;
case DEFAULTCURRENCY: sProperty = C2U("ooSetupCurrency"); break;
case WRITERCOMPATIBILITYVERSIONOOO11: sProperty = C2U("OOo11"); break;
}
@@ -549,6 +563,9 @@ Any ConfigManager::GetDirectConfigProperty(ConfigProperty eProp)
if ( eProp == WRITERCOMPATIBILITYVERSIONOOO11 )
aRet >>= rWriterCompatibilityVersionOOo11;
+ if ( eProp == OPENSOURCECONTEXT )
+ aRet >>= rOpenSourceContext;
+
return aRet;
}
/* -----------------------------12.12.00 17:22--------------------------------