summaryrefslogtreecommitdiff
path: root/unotools
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2010-10-19 11:26:36 +0100
committerCaolán McNamara <caolanm@redhat.com>2010-10-19 11:57:10 +0100
commite3c52ca8d0816ddff87cd9113c8cfe1b0f8bb645 (patch)
tree64a53a92ee65cbe9f6014127642d9490042f7416 /unotools
parentcdb4aae582fd0bd553f2b328f1601caa990e5b58 (diff)
survive missing configuration entries for paths
Diffstat (limited to 'unotools')
-rw-r--r--unotools/source/config/pathoptions.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/unotools/source/config/pathoptions.cxx b/unotools/source/config/pathoptions.cxx
index bb19b2c032d3..5ce92c5d6fee 100644
--- a/unotools/source/config/pathoptions.cxx
+++ b/unotools/source/config/pathoptions.cxx
@@ -263,9 +263,12 @@ static VarNameAttribute aVarNameAttribute[] =
const String& SvtPathOptions_Impl::GetPath( SvtPathOptions::Pathes ePath )
{
+ if ( ePath >= SvtPathOptions::PATH_COUNT )
+ return m_aEmptyString;
+
::osl::MutexGuard aGuard( m_aMutex );
- if ( ePath < SvtPathOptions::PATH_COUNT )
+ try
{
OUString aPathValue;
String aResult;
@@ -290,6 +293,9 @@ const String& SvtPathOptions_Impl::GetPath( SvtPathOptions::Pathes ePath )
m_aPathArray[ ePath ] = aPathValue;
return m_aPathArray[ ePath ];
}
+ catch (UnknownPropertyException &)
+ {
+ }
return m_aEmptyString;
}