summaryrefslogtreecommitdiff
path: root/unotools
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2006-06-19 13:05:04 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2006-06-19 13:05:04 +0000
commitca80323add8f218271ce571921642905335a6792 (patch)
treebda6a510522d0fe4c8ae4001268530808f060f0a /unotools
parent0fc678fc5481a94fd1ecbea051c7ce2486d7dfee (diff)
INTEGRATION: CWS warnings01 (1.41.16); FILE MERGED
2006/01/25 18:00:28 sb 1.41.16.3: RESYNC: (1.41-1.42); FILE MERGED 2005/10/27 10:51:13 pl 1.41.16.2: #i55991# removed warnings for solaris platform 2005/10/21 09:48:53 dbo 1.41.16.1: #i53898# warning free code
Diffstat (limited to 'unotools')
-rw-r--r--unotools/source/config/configmgr.cxx40
1 files changed, 24 insertions, 16 deletions
diff --git a/unotools/source/config/configmgr.cxx b/unotools/source/config/configmgr.cxx
index 418eb519721a..c191fdc2aaea 100644
--- a/unotools/source/config/configmgr.cxx
+++ b/unotools/source/config/configmgr.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: configmgr.cxx,v $
*
- * $Revision: 1.42 $
+ * $Revision: 1.43 $
*
- * last change: $Author: kz $ $Date: 2006-01-05 18:18:59 $
+ * last change: $Author: hr $ $Date: 2006-06-19 14:05:04 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -66,6 +66,9 @@
#ifndef INCLUDED_RTL_INSTANCE_HXX
#include <rtl/instance.hxx>
#endif
+#if OSL_DEBUG_LEVEL > 0
+#include <rtl/strbuf.hxx>
+#endif
#include <list>
@@ -131,8 +134,8 @@ ConfigManager::ConfigManager() :
---------------------------------------------------------------------------*/
ConfigManager::ConfigManager(Reference< XMultiServiceFactory > xConfigProv) :
- pMgrImpl(new utl::ConfigMgr_Impl),
- xConfigurationProvider(xConfigProv)
+ xConfigurationProvider(xConfigProv),
+ pMgrImpl(new utl::ConfigMgr_Impl)
{
}
/* -----------------------------28.08.00 15:35--------------------------------
@@ -204,8 +207,8 @@ namespace
utl::ConfigManager & rCfgMgr;
utl::ConfigItem* pCfgItem;
public:
- RegisterConfigItemHelper(utl::ConfigManager & rCfgMgr, utl::ConfigItem& rCfgItem)
- : rCfgMgr(rCfgMgr)
+ RegisterConfigItemHelper(utl::ConfigManager & rMgr, utl::ConfigItem& rCfgItem)
+ : rCfgMgr(rMgr)
, pCfgItem(&rCfgItem)
{
rCfgMgr.RegisterConfigItem(rCfgItem);
@@ -427,10 +430,10 @@ Any ConfigManager::GetDirectConfigProperty(ConfigProperty eProp)
"ConfigManager::GetDirectConfigProperty: "
"OFFICEINSTALLURL no longer supported." );
return Any();
+ default:
+ break;
}
- ConfigManager * pTheConfigManager = GetConfigManager();
-
Any aRet;
::rtl::OUString &rBrandName = BrandName::get();
if ( eProp == PRODUCTNAME && rBrandName.getLength() )
@@ -497,6 +500,8 @@ Any ConfigManager::GetDirectConfigProperty(ConfigProperty eProp)
case WRITERCOMPATIBILITYVERSIONOOO11:
sPath += C2U("Office.Compatibility/WriterCompatibilityVersion"); break;
+ default:
+ break;
}
Sequence< Any > aArgs(1);
aArgs[0] <<= sPath;
@@ -527,6 +532,8 @@ Any ConfigManager::GetDirectConfigProperty(ConfigProperty eProp)
case OPENSOURCECONTEXT: sProperty = C2U("ooOpenSourceContext"); break;
case DEFAULTCURRENCY: sProperty = C2U("ooSetupCurrency"); break;
case WRITERCOMPATIBILITYVERSIONOOO11: sProperty = C2U("OOo11"); break;
+ default:
+ break;
}
try
{
@@ -534,14 +541,15 @@ Any ConfigManager::GetDirectConfigProperty(ConfigProperty eProp)
}
catch(Exception&)
{
- OSL_ENSURE( sal_False,
- ( ::rtl::OString( "ConfigManager::GetDirectConfigProperty: could not retrieve the property \"" )
- += ::rtl::OString( sProperty.getStr(), sProperty.getLength(), RTL_TEXTENCODING_ASCII_US )
- += ::rtl::OString( "\" under \"" )
- += ::rtl::OString( sPath.getStr(), sPath.getLength(), RTL_TEXTENCODING_ASCII_US )
- += ::rtl::OString( "\" (caught an exception)!" )
- ).getStr()
- );
+ #if OSL_DEBUG_LEVEL > 0
+ rtl::OStringBuffer aBuf(256);
+ aBuf.append( "ConfigManager::GetDirectConfigProperty: could not retrieve the property \"" );
+ aBuf.append( rtl::OUStringToOString( sProperty, RTL_TEXTENCODING_ASCII_US ) );
+ aBuf.append( "\" under \"" );
+ aBuf.append( rtl::OUStringToOString( sPath, RTL_TEXTENCODING_ASCII_US ) );
+ aBuf.append( "\" (caught an exception)!" );
+ OSL_ENSURE( sal_False, aBuf.getStr() );
+ #endif
}
}