summaryrefslogtreecommitdiff
path: root/extensions/source/resource
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-05-23 12:03:21 +0200
committerNoel Grandin <noel@peralex.com>2014-05-23 15:06:00 +0200
commite7bc3cab019fbf040f9fb8b53ae2cf3f977d200b (patch)
treebc507bccee9fb71134e362b72d22991561e32aa0 /extensions/source/resource
parentc5d47c327a57df55fa3dac0fff6b65888d0345e4 (diff)
remove boilerplate in UNO Exception constructor calls
Now that we have default values for Exception constructor params, remove lots of boilerplate code. Change-Id: I620bd641eecfed38e6123873b3b94aaf47922e74
Diffstat (limited to 'extensions/source/resource')
-rw-r--r--extensions/source/resource/ResourceIndexAccess.cxx20
1 files changed, 5 insertions, 15 deletions
diff --git a/extensions/source/resource/ResourceIndexAccess.cxx b/extensions/source/resource/ResourceIndexAccess.cxx
index 10bb0bc5fc1b..0d1a69d81b12 100644
--- a/extensions/source/resource/ResourceIndexAccess.cxx
+++ b/extensions/source/resource/ResourceIndexAccess.cxx
@@ -93,9 +93,7 @@ Reference<XInterface> initResourceIndexAccess(ResourceIndexAccess* pResourceInde
// xResult does not help the client to analyse the problem
// and will crash on getByIndex calls, better just give back an empty Reference
// so that such ResourceStringIndexAccess instances are never release into the wild
- throw RuntimeException(
- OUString("resource manager could not get initialized"),
- /* xResult */ Reference<XInterface>());
+ throw RuntimeException("resource manager could not get initialized");
return xResult;
}
@@ -145,17 +143,13 @@ Any SAL_CALL ResourceStringIndexAccess::getByIndex(sal_Int32 nIdx)
throw IndexOutOfBoundsException();
SolarMutexGuard aGuard;
if(!m_pResMgr.get())
- throw RuntimeException(
- OUString("resource manager not available"),
- Reference<XInterface>());
+ throw RuntimeException("resource manager not available");
const ResId aId(static_cast<sal_uInt16>(nIdx), *m_pResMgr);
aId.SetRT(RSC_STRING);
if(!m_pResMgr->IsAvailable(aId))
- throw RuntimeException(
- OUString("string resource for id not available"),
- Reference<XInterface>());
+ throw RuntimeException("string resource for id not available");
return makeAny(aId.toString());
}
@@ -168,16 +162,12 @@ Any SAL_CALL ResourceStringListIndexAccess::getByIndex(sal_Int32 nIdx)
SolarMutexGuard aGuard;
if(!m_pResMgr.get())
- throw RuntimeException(
- OUString("resource manager not available"),
- Reference<XInterface>());
+ throw RuntimeException("resource manager not available");
const ResId aId(static_cast<sal_uInt16>(nIdx), *m_pResMgr);
aId.SetRT(RSC_STRINGARRAY);
if(!m_pResMgr->IsAvailable(aId))
- throw RuntimeException(
- OUString("string list resource for id not available"),
- Reference<XInterface>());
+ throw RuntimeException("string list resource for id not available");
const ResStringArray aStringList(aId);
Sequence<PropertyValue> aPropList(aStringList.Count());
for(sal_Int32 nCount = 0; nCount != aPropList.getLength(); ++nCount)