summaryrefslogtreecommitdiff
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
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
-rw-r--r--basctl/source/basicide/unomodel.cxx2
-rw-r--r--basic/source/classes/errobject.cxx2
-rw-r--r--basic/source/classes/sbunoobj.cxx6
-rw-r--r--basic/source/uno/namecont.cxx2
-rw-r--r--binaryurp/source/bridge.cxx24
-rw-r--r--binaryurp/source/currentcontext.cxx8
-rw-r--r--binaryurp/source/incomingrequest.cxx7
-rw-r--r--binaryurp/source/marshal.cxx3
-rw-r--r--binaryurp/source/outgoingrequests.cxx3
-rw-r--r--binaryurp/source/proxy.cxx5
-rw-r--r--binaryurp/source/reader.cxx57
-rw-r--r--binaryurp/source/unmarshal.cxx61
-rw-r--r--binaryurp/source/writer.cxx7
-rw-r--r--bridges/source/cpp_uno/gcc3_ios_arm/except.cxx14
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_arm/except.cxx58
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_hppa/except.cxx13
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_intel/except.cxx14
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_m68k/except.cxx14
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_mips/except.cxx14
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_sparc/except.cxx13
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx14
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx8
-rw-r--r--bridges/source/cpp_uno/gcc3_macosx_intel/except.cxx14
-rw-r--r--bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx14
-rw-r--r--bridges/source/cpp_uno/gcc3_macosx_x86-64/uno2cpp.cxx7
-rw-r--r--bridges/source/cpp_uno/gcc3_solaris_intel/except.cxx14
-rw-r--r--bridges/source/cpp_uno/gcc3_solaris_sparc/except.cxx14
-rw-r--r--bridges/source/cpp_uno/mingw_intel/except.cxx14
-rw-r--r--bridges/source/cpp_uno/mingw_x86-64/except.cxx14
-rw-r--r--bridges/source/cpp_uno/mingw_x86-64/uno2cpp.cxx8
-rw-r--r--bridges/source/cpp_uno/msvc_win32_intel/except.cxx9
-rw-r--r--bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx9
-rw-r--r--bridges/source/cpp_uno/msvc_win32_x86-64/uno2cpp.cxx8
-rw-r--r--canvas/source/tools/propertysethelper.cxx6
-rw-r--r--cli_ure/source/climaker/climaker_app.cxx12
-rw-r--r--cli_ure/source/climaker/climaker_emit.cxx9
-rw-r--r--comphelper/source/misc/configurationhelper.cxx9
-rw-r--r--comphelper/source/misc/sequenceashashmap.cxx12
-rw-r--r--comphelper/source/processfactory/processfactory.cxx3
-rw-r--r--configmgr/source/components.cxx66
-rw-r--r--configmgr/source/data.cxx32
-rw-r--r--configmgr/source/node.cxx3
-rw-r--r--configmgr/source/partial.cxx3
-rw-r--r--configmgr/source/type.cxx8
-rw-r--r--configmgr/source/valueparser.cxx21
-rw-r--r--configmgr/source/winreg.cxx3
-rw-r--r--configmgr/source/writemodfile.cxx17
-rw-r--r--configmgr/source/xcdparser.cxx9
-rw-r--r--configmgr/source/xcsparser.cxx49
-rw-r--r--configmgr/source/xcuparser.cxx140
-rw-r--r--configmgr/source/xmldata.cxx9
-rw-r--r--connectivity/source/drivers/postgresql/pq_connection.cxx6
-rw-r--r--connectivity/source/drivers/postgresql/pq_xcolumns.cxx5
-rw-r--r--connectivity/source/drivers/postgresql/pq_xkeycolumns.cxx5
-rw-r--r--cppu/source/threadpool/thread.cxx4
-rw-r--r--cppuhelper/source/access_control.cxx9
-rw-r--r--cppuhelper/source/component.cxx5
-rw-r--r--cppuhelper/source/defaultbootstrap.cxx6
-rw-r--r--cppuhelper/source/exc_thrower.cxx19
-rw-r--r--cppuhelper/source/implbase.cxx4
-rw-r--r--cppuhelper/source/paths.cxx9
-rw-r--r--cppuhelper/source/propertysetmixin.cxx14
-rw-r--r--cppuhelper/source/servicemanager.cxx136
-rw-r--r--cppuhelper/test/testcmp/TestComponent.cxx3
-rw-r--r--cpputools/source/unoexe/unoexe.cxx2
-rw-r--r--desktop/source/deployment/misc/dp_descriptioninfoset.cxx3
-rw-r--r--desktop/source/deployment/misc/dp_misc.cxx3
-rw-r--r--desktop/source/deployment/registry/help/dp_help.cxx4
-rw-r--r--desktop/source/deployment/registry/sfwk/dp_sfwk.cxx3
-rw-r--r--desktop/source/pkgchk/unopkg/unopkg_misc.cxx5
-rw-r--r--extensions/source/ole/oleobjw.cxx112
-rw-r--r--extensions/source/resource/ResourceIndexAccess.cxx20
-rw-r--r--extensions/source/update/check/updateprotocol.cxx3
-rw-r--r--extensions/source/update/ui/updatecheckui.cxx3
-rw-r--r--filter/source/msfilter/msvbahelper.cxx2
-rw-r--r--fpicker/source/win32/filepicker/asynceventnotifier.cxx12
-rw-r--r--framework/source/accelerators/acceleratorcache.cxx6
-rw-r--r--framework/source/accelerators/presethandler.cxx3
-rw-r--r--framework/source/fwi/threadhelp/transactionmanager.cxx4
-rw-r--r--framework/source/recording/dispatchrecorder.cxx16
-rw-r--r--include/com/sun/star/uno/Any.hxx3
-rw-r--r--include/vbahelper/vbacollectionimpl.hxx14
-rw-r--r--io/source/TextOutputStream/TextOutputStream.cxx4
-rw-r--r--io/source/acceptor/acc_pipe.cxx6
-rw-r--r--io/source/acceptor/acc_socket.cxx12
-rw-r--r--io/source/acceptor/acceptor.cxx6
-rw-r--r--io/source/connector/connector.cxx9
-rw-r--r--javaunohelper/source/bootstrap.cxx10
-rw-r--r--javaunohelper/source/vm.cxx4
-rw-r--r--jvmaccess/source/classpath.cxx6
-rw-r--r--oox/source/docprop/ooxmldocpropimport.cxx2
-rw-r--r--oox/source/helper/textinputstream.cxx2
-rw-r--r--package/source/manifest/ManifestExport.cxx8
-rw-r--r--package/source/manifest/ManifestWriter.cxx2
-rw-r--r--package/source/xstor/owriteablestream.cxx6
-rw-r--r--package/source/xstor/xstorage.cxx452
-rw-r--r--package/source/zipapi/ByteGrabber.cxx6
-rw-r--r--package/source/zipapi/XUnbufferedStream.cxx20
-rw-r--r--package/source/zipapi/ZipFile.cxx79
-rw-r--r--package/source/zipapi/ZipOutputStream.cxx13
-rw-r--r--package/source/zipapi/blowfishcontext.cxx9
-rw-r--r--package/source/zipapi/sha1context.cxx3
-rw-r--r--package/source/zippackage/ZipPackage.cxx44
-rw-r--r--package/source/zippackage/ZipPackageEntry.cxx4
-rw-r--r--package/source/zippackage/ZipPackageFolder.cxx18
-rw-r--r--package/source/zippackage/ZipPackageFolderEnumeration.cxx2
-rw-r--r--package/source/zippackage/ZipPackageStream.cxx56
-rw-r--r--package/source/zippackage/wrapstreamforshare.cxx18
-rw-r--r--package/source/zippackage/zipfileaccess.cxx48
-rw-r--r--pyuno/source/loader/pyuno_loader.cxx8
-rw-r--r--pyuno/source/module/pyuno.cxx6
-rw-r--r--pyuno/source/module/pyuno_adapter.cxx13
-rw-r--r--pyuno/source/module/pyuno_except.cxx4
-rw-r--r--pyuno/source/module/pyuno_module.cxx16
-rw-r--r--pyuno/source/module/pyuno_runtime.cxx62
-rw-r--r--pyuno/source/module/pyuno_type.cxx24
-rw-r--r--pyuno/source/module/pyuno_util.cxx2
-rw-r--r--remotebridges/source/unourl_resolver/unourl_resolver.cxx2
-rw-r--r--sc/source/filter/oox/workbookhelper.cxx2
-rw-r--r--sc/source/ui/unoobj/confuno.cxx3
-rw-r--r--sc/source/ui/unoobj/linkuno.cxx15
-rw-r--r--sc/source/ui/unoobj/servuno.cxx2
-rw-r--r--sc/source/ui/vba/excelvbahelper.cxx2
-rw-r--r--sc/source/ui/vba/vbaapplication.cxx28
-rw-r--r--sc/source/ui/vba/vbaaxes.cxx4
-rw-r--r--sc/source/ui/vba/vbaaxis.cxx2
-rw-r--r--sc/source/ui/vba/vbaborders.cxx14
-rw-r--r--sc/source/ui/vba/vbacharacters.cxx2
-rw-r--r--sc/source/ui/vba/vbachartobjects.cxx4
-rw-r--r--sc/source/ui/vba/vbacomment.cxx2
-rw-r--r--sc/source/ui/vba/vbafont.cxx15
-rw-r--r--sc/source/ui/vba/vbaformat.cxx2
-rw-r--r--sc/source/ui/vba/vbaglobals.cxx3
-rw-r--r--sc/source/ui/vba/vbahelper.cxx8
-rw-r--r--sc/source/ui/vba/vbahyperlink.cxx2
-rw-r--r--sc/source/ui/vba/vbahyperlinks.cxx2
-rw-r--r--sc/source/ui/vba/vbainterior.cxx6
-rw-r--r--sc/source/ui/vba/vbamenubars.cxx2
-rw-r--r--sc/source/ui/vba/vbanames.cxx7
-rw-r--r--sc/source/ui/vba/vbapalette.cxx2
-rw-r--r--sc/source/ui/vba/vbapane.cxx10
-rw-r--r--sc/source/ui/vba/vbarange.cxx122
-rw-r--r--sc/source/ui/vba/vbatextboxshape.cxx2
-rw-r--r--sc/source/ui/vba/vbavalidation.cxx10
-rw-r--r--sc/source/ui/vba/vbawindow.cxx10
-rw-r--r--sc/source/ui/vba/vbaworkbooks.cxx8
-rw-r--r--sc/source/ui/vba/vbaworksheet.cxx6
-rw-r--r--sc/source/ui/vba/vbaworksheets.cxx4
-rw-r--r--scripting/source/basprov/basmethnode.cxx6
-rw-r--r--scripting/source/basprov/basprov.cxx3
-rw-r--r--scripting/source/dlgprov/dlgprov.cxx10
-rw-r--r--scripting/source/protocolhandler/scripthandler.cxx6
-rw-r--r--scripting/source/provider/BrowseNodeFactoryImpl.cxx2
-rw-r--r--scripting/source/provider/MasterScriptProvider.cxx45
-rw-r--r--scripting/source/provider/ProviderCache.cxx4
-rw-r--r--scripting/source/provider/ScriptImpl.cxx6
-rw-r--r--scripting/source/provider/URIHelper.cxx12
-rw-r--r--scripting/source/stringresource/stringresource.cxx19
-rw-r--r--scripting/source/vbaevents/eventhelper.cxx6
-rw-r--r--sd/source/core/stlsheet.cxx2
-rw-r--r--sfx2/source/appl/openuriexternally.cxx6
-rw-r--r--sfx2/source/doc/sfxbasemodel.cxx12
-rw-r--r--slideshow/source/engine/shapes/viewmediashape.cxx4
-rw-r--r--slideshow/source/engine/soundplayer.cxx4
-rw-r--r--stoc/source/corereflection/crefl.cxx2
-rw-r--r--stoc/source/defaultregistry/defaultregistry.cxx9
-rw-r--r--stoc/source/implementationregistration/implreg.cxx29
-rw-r--r--stoc/source/implementationregistration/mergekeys.cxx13
-rw-r--r--stoc/source/invocation/invocation.cxx15
-rw-r--r--stoc/source/invocation_adapterfactory/iafactory.cxx15
-rw-r--r--stoc/source/javaloader/javaloader.cxx62
-rw-r--r--stoc/source/javavm/javavm.cxx2
-rw-r--r--stoc/source/security/file_policy.cxx4
-rw-r--r--stoc/source/security/permissions.cxx6
-rw-r--r--stoc/source/servicemanager/servicemanager.cxx12
-rw-r--r--svl/source/passwordcontainer/passwordcontainer.cxx4
-rw-r--r--sw/source/core/unocore/unotext.cxx2
-rw-r--r--sw/source/ui/vba/vbaaddin.cxx2
-rw-r--r--sw/source/ui/vba/vbaautotextentry.cxx2
-rw-r--r--sw/source/ui/vba/vbabookmark.cxx2
-rw-r--r--sw/source/ui/vba/vbaborders.cxx4
-rw-r--r--sw/source/ui/vba/vbacheckbox.cxx3
-rw-r--r--sw/source/ui/vba/vbacolumns.cxx4
-rw-r--r--sw/source/ui/vba/vbadocumentproperties.cxx3
-rw-r--r--sw/source/ui/vba/vbafield.cxx4
-rw-r--r--sw/source/ui/vba/vbafind.cxx6
-rw-r--r--sw/source/ui/vba/vbalistformat.cxx2
-rw-r--r--sw/source/ui/vba/vbalistgalleries.cxx2
-rw-r--r--sw/source/ui/vba/vbalistlevel.cxx8
-rw-r--r--sw/source/ui/vba/vbalistlevels.cxx2
-rw-r--r--sw/source/ui/vba/vbalisttemplates.cxx2
-rw-r--r--sw/source/ui/vba/vbaparagraphformat.cxx2
-rw-r--r--sw/source/ui/vba/vbarange.cxx4
-rw-r--r--sw/source/ui/vba/vbarows.cxx9
-rw-r--r--sw/source/ui/vba/vbasections.cxx2
-rw-r--r--sw/source/ui/vba/vbaselection.cxx24
-rw-r--r--sw/source/ui/vba/vbastyles.cxx4
-rw-r--r--sw/source/ui/vba/vbasystem.cxx6
-rw-r--r--sw/source/ui/vba/vbatemplate.cxx2
-rw-r--r--sw/source/ui/vba/vbavariable.cxx2
-rw-r--r--sw/source/ui/vba/vbawindow.cxx2
-rw-r--r--sw/source/ui/vba/wordvbahelper.cxx2
-rw-r--r--testtools/source/bridgetest/bridgetest.cxx29
-rw-r--r--testtools/source/performance/ubtest.cxx22
-rw-r--r--ucb/source/ucp/file/bc.cxx6
-rw-r--r--ucb/source/ucp/file/filcmd.cxx4
-rw-r--r--ucb/source/ucp/file/filglob.cxx2
-rw-r--r--ucb/source/ucp/file/filinpstr.cxx12
-rw-r--r--ucb/source/ucp/file/filprp.cxx2
-rw-r--r--ucb/source/ucp/file/filrset.cxx18
-rw-r--r--ucb/source/ucp/file/filstr.cxx18
-rw-r--r--ucb/source/ucp/file/filtask.cxx4
-rw-r--r--ucb/source/ucp/file/prov.cxx8
-rw-r--r--ucb/source/ucp/file/shell.cxx16
-rw-r--r--ucb/source/ucp/tdoc/tdoc_storage.cxx12
-rw-r--r--unotest/source/cpp/toabsolutefileurl.cxx23
-rw-r--r--ure/source/uretest/cppmain.cc4
-rw-r--r--ure/source/uretest/cppserver.cc4
-rw-r--r--ure/source/uretest/cpptest.cc4
-rw-r--r--uui/source/iahndl-authentication.cxx6
-rw-r--r--uui/source/iahndl-errorhandler.cxx3
-rw-r--r--uui/source/iahndl-filter.cxx4
-rw-r--r--uui/source/iahndl-locking.cxx9
-rw-r--r--uui/source/iahndl-ssl.cxx8
-rw-r--r--uui/source/iahndl.cxx16
-rw-r--r--vbahelper/source/msforms/vbacontrol.cxx6
-rw-r--r--vbahelper/source/msforms/vbalistbox.cxx10
-rw-r--r--vbahelper/source/msforms/vbalistcontrolhelper.cxx6
-rw-r--r--vbahelper/source/vbahelper/vbaapplicationbase.cxx8
-rw-r--r--vbahelper/source/vbahelper/vbacolorformat.cxx4
-rw-r--r--vbahelper/source/vbahelper/vbacommandbarcontrols.cxx4
-rw-r--r--vbahelper/source/vbahelper/vbacommandbarhelper.cxx2
-rw-r--r--vbahelper/source/vbahelper/vbacommandbars.cxx4
-rw-r--r--vbahelper/source/vbahelper/vbadialogbase.cxx4
-rw-r--r--vbahelper/source/vbahelper/vbadocumentbase.cxx4
-rw-r--r--vbahelper/source/vbahelper/vbadocumentsbase.cxx2
-rw-r--r--vbahelper/source/vbahelper/vbahelper.cxx10
-rw-r--r--vbahelper/source/vbahelper/vbalineformat.cxx22
-rw-r--r--vbahelper/source/vbahelper/vbapictureformat.cxx4
-rw-r--r--vbahelper/source/vbahelper/vbashape.cxx16
-rw-r--r--vbahelper/source/vbahelper/vbashapes.cxx2
-rw-r--r--vbahelper/source/vbahelper/vbatextframe.cxx2
-rw-r--r--vcl/source/window/syschild.cxx2
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.cxx6
-rw-r--r--xmlhelp/source/cxxhelp/provider/inputstream.cxx3
-rw-r--r--xmlhelp/source/treeview/tvread.cxx4
-rw-r--r--xmloff/source/core/xmlimp.cxx3
-rw-r--r--xmlreader/source/span.cxx3
-rw-r--r--xmlreader/source/xmlreader.cxx93
-rw-r--r--xmlscript/source/xml_helper/xml_impctx.cxx2
-rw-r--r--xmlscript/source/xmlflat_imexp/xmlbas_export.cxx4
-rw-r--r--xmlscript/test/imexp.cxx2
-rw-r--r--xmlsecurity/source/xmlsec/nss/ciphercontext.cxx2
253 files changed, 1399 insertions, 2111 deletions
diff --git a/basctl/source/basicide/unomodel.cxx b/basctl/source/basicide/unomodel.cxx
index 16d58e27d6b7..eba8182e7686 100644
--- a/basctl/source/basicide/unomodel.cxx
+++ b/basctl/source/basicide/unomodel.cxx
@@ -138,7 +138,7 @@ void SAL_CALL SIDEModel::storeToURL( const OUString&,
void SIDEModel::notImplemented() throw ( io::IOException )
{
- throw io::IOException("Can't store IDE model", uno::Reference< uno::XInterface >() );
+ throw io::IOException("Can't store IDE model" );
}
} // namespace basctl
diff --git a/basic/source/classes/errobject.cxx b/basic/source/classes/errobject.cxx
index e66560a6672a..d5843fe634c9 100644
--- a/basic/source/classes/errobject.cxx
+++ b/basic/source/classes/errobject.cxx
@@ -164,7 +164,7 @@ void ErrObject::setData( const uno::Any& Number, const uno::Any& Source, const u
throw (uno::RuntimeException)
{
if ( !Number.hasValue() )
- throw uno::RuntimeException("Missing Required Parameter", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Missing Required Parameter" );
Number >>= m_nNumber;
Description >>= m_sDescription;
Source >>= m_sSource;
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx
index 86881eeca526..7e5dcfd10ba9 100644
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -212,8 +212,7 @@ Reference< XHierarchicalNameAccess > getTypeProvider_Impl( void )
if( !xAccess.is() )
{
throw DeploymentException(
- OUString("/singletons/com.sun.star.reflection.theTypeDescriptionManager singleton not accessible"),
- Reference< XInterface >() );
+ "/singletons/com.sun.star.reflection.theTypeDescriptionManager singleton not accessible" );
}
}
return xAccess;
@@ -236,8 +235,7 @@ Reference< XTypeConverter > getTypeConverter_Impl( void )
if( !xTypeConverter.is() )
{
throw DeploymentException(
- OUString("com.sun.star.script.Converter service not accessible"),
- Reference< XInterface >() );
+ "com.sun.star.script.Converter service not accessible" );
}
}
return xTypeConverter;
diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx
index 6bbe98854f61..924c48886887 100644
--- a/basic/source/uno/namecont.cxx
+++ b/basic/source/uno/namecont.cxx
@@ -242,7 +242,7 @@ void NameContainer::removeByName( const OUString& aName )
if( aIt == mHashMap.end() )
{
OUString sMessage = "\"" + aName + "\" not found";
- throw NoSuchElementException(sMessage, uno::Reference< uno::XInterface >());
+ throw NoSuchElementException(sMessage);
}
sal_Int32 iHashResult = (*aIt).second;
diff --git a/binaryurp/source/bridge.cxx b/binaryurp/source/bridge.cxx
index ac13fa29fec1..c93df640b555 100644
--- a/binaryurp/source/bridge.cxx
+++ b/binaryurp/source/bridge.cxx
@@ -194,14 +194,10 @@ Bridge::Bridge(
{
assert(factory.is() && connection.is());
if (!binaryUno_.is()) {
- throw css::uno::RuntimeException(
- "URP: no binary UNO environment",
- css::uno::Reference< css::uno::XInterface >());
+ throw css::uno::RuntimeException("URP: no binary UNO environment");
}
if (!(cppToBinaryMapping_.is() && binaryToCppMapping_.is())) {
- throw css::uno::RuntimeException(
- "URP: no C++ UNO mapping",
- css::uno::Reference< css::uno::XInterface >());
+ throw css::uno::RuntimeException("URP: no C++ UNO mapping");
}
passive_.set();
}
@@ -464,8 +460,7 @@ OUString Bridge::registerOutgoingInterface(
assert(stub != &newStub);
if (j->second.references == SAL_MAX_UINT32) {
throw css::uno::RuntimeException(
- "URP: stub reference count overflow",
- css::uno::Reference< css::uno::XInterface >());
+ "URP: stub reference count overflow");
}
++j->second.references;
}
@@ -505,15 +500,11 @@ void Bridge::releaseStub(
osl::MutexGuard g(mutex_);
Stubs::iterator i(stubs_.find(oid));
if (i == stubs_.end()) {
- throw css::uno::RuntimeException(
- "URP: release unknown stub",
- css::uno::Reference< css::uno::XInterface >());
+ throw css::uno::RuntimeException("URP: release unknown stub");
}
Stub::iterator j(i->second.find(type));
if (j == i->second.end()) {
- throw css::uno::RuntimeException(
- "URP: release unknown stub",
- css::uno::Reference< css::uno::XInterface >());
+ throw css::uno::RuntimeException("URP: release unknown stub");
}
assert(j->second.references > 0);
--j->second.references;
@@ -880,9 +871,8 @@ css::uno::Reference< css::uno::XInterface > Bridge::getInstance(
for (sal_Int32 i = 0; i != sInstanceName.getLength(); ++i) {
if (sInstanceName[i] > 0x7F) {
throw css::uno::RuntimeException(
- ("XBridge::getInstance sInstanceName contains non-ASCII"
- " character"),
- css::uno::Reference< css::uno::XInterface >());
+ "XBridge::getInstance sInstanceName contains non-ASCII"
+ " character");
}
}
css::uno::TypeDescription ifc(
diff --git a/binaryurp/source/currentcontext.cxx b/binaryurp/source/currentcontext.cxx
index 143dd34879ac..81d46672dbd2 100644
--- a/binaryurp/source/currentcontext.cxx
+++ b/binaryurp/source/currentcontext.cxx
@@ -40,9 +40,7 @@ css::uno::UnoInterfaceReference get() {
reinterpret_cast< void ** >(&cc.m_pUnoI),
OUString(UNO_LB_UNO).pData, 0))
{
- throw css::uno::RuntimeException(
- "uno_getCurrentContext failed",
- css::uno::Reference< css::uno::XInterface >());
+ throw css::uno::RuntimeException("uno_getCurrentContext failed");
}
return cc;
}
@@ -53,9 +51,7 @@ void set(css::uno::UnoInterfaceReference const & value) {
cc.m_pUnoI,
OUString(UNO_LB_UNO).pData, 0))
{
- throw css::uno::RuntimeException(
- "uno_setCurrentContext failed",
- css::uno::Reference< css::uno::XInterface >());
+ throw css::uno::RuntimeException("uno_setCurrentContext failed");
}
}
diff --git a/binaryurp/source/incomingrequest.cxx b/binaryurp/source/incomingrequest.cxx
index ff30a8e142e9..30b876ef81c8 100644
--- a/binaryurp/source/incomingrequest.cxx
+++ b/binaryurp/source/incomingrequest.cxx
@@ -74,10 +74,9 @@ void IncomingRequest::execute() const {
isExc = !execute_throw(&ret, &outArgs);
} catch (const std::exception & e) {
throw css::uno::RuntimeException(
- ("caught C++ exception: " +
- OStringToOUString(
- OString(e.what()), RTL_TEXTENCODING_ASCII_US)),
- css::uno::Reference< css::uno::XInterface >());
+ "caught C++ exception: " +
+ OStringToOUString(
+ OString(e.what()), RTL_TEXTENCODING_ASCII_US));
// best-effort string conversion
}
} catch (const css::uno::RuntimeException &) {
diff --git a/binaryurp/source/marshal.cxx b/binaryurp/source/marshal.cxx
index 241c2be3fda8..ad5f2b882a63 100644
--- a/binaryurp/source/marshal.cxx
+++ b/binaryurp/source/marshal.cxx
@@ -81,8 +81,7 @@ void writeString(
RTL_UNICODETOTEXT_FLAGS_INVALID_ERROR)))
{
throw css::uno::RuntimeException(
- "UNO string contains invalid UTF-16 sequence",
- css::uno::Reference< css::uno::XInterface >());
+ "UNO string contains invalid UTF-16 sequence");
}
writeCompressed(buffer, static_cast< sal_uInt32 >(v.getLength()));
buffer->insert(buffer->end(), v.getStr(), v.getStr() + v.getLength());
diff --git a/binaryurp/source/outgoingrequests.cxx b/binaryurp/source/outgoingrequests.cxx
index a0fb6d272f82..06b2553629e9 100644
--- a/binaryurp/source/outgoingrequests.cxx
+++ b/binaryurp/source/outgoingrequests.cxx
@@ -45,8 +45,7 @@ OutgoingRequest OutgoingRequests::top(rtl::ByteSequence const & tid) {
Map::iterator i(map_.find(tid));
if (i == map_.end()) {
throw css::uno::RuntimeException(
- "URP: reply for unknown TID",
- css::uno::Reference< css::uno::XInterface >());
+ "URP: reply for unknown TID");
}
OSL_ASSERT(!i->second.empty());
return i->second.back();
diff --git a/binaryurp/source/proxy.cxx b/binaryurp/source/proxy.cxx
index 355ac8787d1f..a28dbc5ef560 100644
--- a/binaryurp/source/proxy.cxx
+++ b/binaryurp/source/proxy.cxx
@@ -107,10 +107,9 @@ void Proxy::do_dispatch(
do_dispatch_throw(member, returnValue, arguments, exception);
} catch (const std::exception & e) {
throw css::uno::RuntimeException(
- ("caught C++ exception: " +
+ "caught C++ exception: " +
OStringToOUString(
- OString(e.what()), RTL_TEXTENCODING_ASCII_US)),
- css::uno::Reference< css::uno::XInterface >());
+ OString(e.what()), RTL_TEXTENCODING_ASCII_US));
// best-effort string conversion
}
} catch (const css::uno::RuntimeException &) {
diff --git a/binaryurp/source/reader.cxx b/binaryurp/source/reader.cxx
index 99b27443a5dc..92da48519f33 100644
--- a/binaryurp/source/reader.cxx
+++ b/binaryurp/source/reader.cxx
@@ -63,8 +63,7 @@ css::uno::Sequence< sal_Int8 > read(
assert(connection.is());
if (size > SAL_MAX_INT32) {
throw css::uno::RuntimeException(
- "binaryurp::Reader: block size too large",
- css::uno::Reference< css::uno::XInterface >());
+ "binaryurp::Reader: block size too large");
}
css::uno::Sequence< sal_Int8 > buf;
sal_Int32 n = connection->read(buf, static_cast< sal_Int32 >(size));
@@ -73,8 +72,7 @@ css::uno::Sequence< sal_Int8 > read(
}
if (n != static_cast< sal_Int32 >(size)) {
throw css::io::IOException(
- "binaryurp::Reader: premature end of input",
- css::uno::Reference< css::uno::XInterface >());
+ "binaryurp::Reader: premature end of input");
}
assert(buf.getLength() == static_cast< sal_Int32 >(size));
return buf;
@@ -113,8 +111,7 @@ void Reader::execute() {
header.done();
if (count == 0) {
throw css::io::IOException(
- "binaryurp::Reader: block with zero message count received",
- css::uno::Reference< css::uno::XInterface >());
+ "binaryurp::Reader: block with zero message count received");
}
Unmarshal block(bridge_, state_, read(con, size, false));
for (sal_uInt32 i = 0; i != count; ++i) {
@@ -152,9 +149,8 @@ void Reader::readMessage(Unmarshal & unmarshal) {
if (((flags2 & 0x40) != 0) != forceSynchronous) {
// bit 6: SYNCHRONOUS
throw css::uno::RuntimeException(
- ("URP: request message with MUSTREPLY != SYNCHRONOUS"
- " received"),
- css::uno::Reference< css::uno::XInterface >());
+ "URP: request message with MUSTREPLY != SYNCHRONOUS"
+ " received");
}
} else {
forceSynchronous = false;
@@ -176,9 +172,8 @@ void Reader::readMessage(Unmarshal & unmarshal) {
} else {
if (!lastType_.is()) {
throw css::uno::RuntimeException(
- ("URP: request message with NEWTYPE received when last"
- " interface type has not yet been set"),
- css::uno::Reference< css::uno::XInterface >());
+ "URP: request message with NEWTYPE received when last"
+ " interface type has not yet been set");
}
type = lastType_;
}
@@ -187,16 +182,14 @@ void Reader::readMessage(Unmarshal & unmarshal) {
oid = unmarshal.readOid();
if (oid.isEmpty()) {
throw css::io::IOException(
- "binaryurp::Unmarshal: emtpy OID",
- css::uno::Reference< css::uno::XInterface >());
+ "binaryurp::Unmarshal: emtpy OID");
}
lastOid_ = oid;
} else {
if (lastOid_.isEmpty()) {
throw css::uno::RuntimeException(
- ("URP: request message with NEWOID received when last OID has"
- " not yet been set"),
- css::uno::Reference< css::uno::XInterface >());
+ "URP: request message with NEWOID received when last OID has"
+ " not yet been set");
}
oid = lastOid_;
}
@@ -205,15 +198,13 @@ void Reader::readMessage(Unmarshal & unmarshal) {
type.makeComplete();
if (type.get()->eTypeClass != typelib_TypeClass_INTERFACE) {
throw css::uno::RuntimeException(
- "URP: request message with non-interface interface type received",
- css::uno::Reference< css::uno::XInterface >());
+ "URP: request message with non-interface interface type received");
}
typelib_InterfaceTypeDescription * itd =
reinterpret_cast< typelib_InterfaceTypeDescription * >(type.get());
if (functionId >= itd->nMapFunctionIndexToMemberIndex) {
throw css::uno::RuntimeException(
- "URP: request message with unknown function ID received",
- css::uno::Reference< css::uno::XInterface >());
+ "URP: request message with unknown function ID received");
}
sal_Int32 memberId = itd->pMapFunctionIndexToMemberIndex[functionId];
css::uno::TypeDescription memberTd(itd->ppAllMembers[memberId]);
@@ -289,9 +280,8 @@ void Reader::readMessage(Unmarshal & unmarshal) {
break;
default:
throw css::uno::RuntimeException(
- ("URP: request message with UrpProtocolProperties OID and"
- " unknown function ID received"),
- css::uno::Reference< css::uno::XInterface >());
+ "URP: request message with UrpProtocolProperties OID and"
+ " unknown function ID received");
}
} else {
css::uno::UnoInterfaceReference obj;
@@ -320,24 +310,21 @@ void Reader::readMessage(Unmarshal & unmarshal) {
css::uno::XInterface > >::get())))))
{
throw css::uno::RuntimeException(
- ("URP: queryInterface request message with unknown OID"
- " received"),
- css::uno::Reference< css::uno::XInterface >());
+ "URP: queryInterface request message with unknown OID"
+ " received");
}
}
break;
case SPECIAL_FUNCTION_ID_RESERVED:
throw css::uno::RuntimeException(
- "URP: request message with unknown function ID 1 received",
- css::uno::Reference< css::uno::XInterface >());
+ "URP: request message with unknown function ID 1 received");
case SPECIAL_FUNCTION_ID_RELEASE:
break;
default:
obj = bridge_->findStub(oid, type);
if (!obj.is()) {
throw css::uno::RuntimeException(
- "URP: request message with unknown OID received",
- css::uno::Reference< css::uno::XInterface >());
+ "URP: request message with unknown OID received");
}
break;
}
@@ -413,8 +400,7 @@ void Reader::readReplyMessage(Unmarshal & unmarshal, sal_uInt8 flags1) {
}
if (!ok) {
throw css::uno::RuntimeException(
- "URP: reply message with bad exception type received",
- css::uno::Reference< css::uno::XInterface >());
+ "URP: reply message with bad exception type received");
}
}
} else {
@@ -483,9 +469,8 @@ rtl::ByteSequence Reader::getTid(Unmarshal & unmarshal, bool newTid) const {
}
if (lastTid_.getLength() == 0) {
throw css::uno::RuntimeException(
- ("URP: message with NEWTID received when last TID has not yet been"
- " set"),
- css::uno::Reference< css::uno::XInterface >());
+ "URP: message with NEWTID received when last TID has not yet been"
+ " set");
}
return lastTid_;
}
diff --git a/binaryurp/source/unmarshal.cxx b/binaryurp/source/unmarshal.cxx
index d413e5f84e78..d04c8893265d 100644
--- a/binaryurp/source/unmarshal.cxx
+++ b/binaryurp/source/unmarshal.cxx
@@ -144,8 +144,7 @@ css::uno::TypeDescription Unmarshal::readType() {
case typelib_TypeClass_ANY:
if ((flags & 0x80) != 0) {
throw css::io::IOException(
- "binaryurp::Unmarshal: cache flag of simple type is set",
- css::uno::Reference< css::uno::XInterface >());
+ "binaryurp::Unmarshal: cache flag of simple type is set");
}
return css::uno::TypeDescription(
*typelib_static_type_getByTypeClass(
@@ -160,8 +159,7 @@ css::uno::TypeDescription Unmarshal::readType() {
if ((flags & 0x80) == 0) {
if (idx == cache::ignore || !state_.typeCache[idx].is()) {
throw css::io::IOException(
- "binaryurp::Unmarshal: unknown type cache index",
- css::uno::Reference< css::uno::XInterface >());
+ "binaryurp::Unmarshal: unknown type cache index");
}
return state_.typeCache[idx];
} else {
@@ -172,8 +170,7 @@ css::uno::TypeDescription Unmarshal::readType() {
{
throw css::io::IOException(
- "binaryurp::Unmarshal: type with unknown name: " + str,
- css::uno::Reference< css::uno::XInterface >());
+ "binaryurp::Unmarshal: type with unknown name: " + str);
}
for (css::uno::TypeDescription t2(t);
t2.get()->eTypeClass == typelib_TypeClass_SEQUENCE;)
@@ -184,17 +181,15 @@ css::uno::TypeDescription Unmarshal::readType() {
t2.get())->pType);
if (!t2.is()) {
throw css::io::IOException(
- ("binaryurp::Unmarshal: sequence type with unknown"
- " component type"),
- css::uno::Reference< css::uno::XInterface >());
+ "binaryurp::Unmarshal: sequence type with unknown"
+ " component type");
}
switch (t2.get()->eTypeClass) {
case typelib_TypeClass_VOID:
case typelib_TypeClass_EXCEPTION:
throw css::io::IOException(
- ("binaryurp::Unmarshal: sequence type with bad"
- " component type"),
- css::uno::Reference< css::uno::XInterface >());
+ "binaryurp::Unmarshal: sequence type with bad"
+ " component type");
default:
break;
}
@@ -207,8 +202,7 @@ css::uno::TypeDescription Unmarshal::readType() {
}
default:
throw css::io::IOException(
- "binaryurp::Unmarshal: type of unknown type class",
- css::uno::Reference< css::uno::XInterface >());
+ "binaryurp::Unmarshal: type of unknown type class");
}
}
@@ -217,16 +211,14 @@ OUString Unmarshal::readOid() {
for (sal_Int32 i = 0; i != oid.getLength(); ++i) {
if (oid[i] > 0x7F) {
throw css::io::IOException(
- "binaryurp::Unmarshal: OID contains non-ASCII character",
- css::uno::Reference< css::uno::XInterface >());
+ "binaryurp::Unmarshal: OID contains non-ASCII character");
}
}
sal_uInt16 idx = readCacheIndex();
if (oid.isEmpty() && idx != cache::ignore) {
if (state_.oidCache[idx].isEmpty()) {
throw css::io::IOException(
- "binaryurp::Unmarshal: unknown OID cache index",
- css::uno::Reference< css::uno::XInterface >());
+ "binaryurp::Unmarshal: unknown OID cache index");
}
return state_.oidCache[idx];
}
@@ -249,8 +241,7 @@ rtl::ByteSequence Unmarshal::readTid() {
if (tid.getLength() == 0) {
if (idx == cache::ignore || state_.tidCache[idx].getLength() == 0) {
throw css::io::IOException(
- "binaryurp::Unmarshal: unknown TID cache index",
- css::uno::Reference< css::uno::XInterface >());
+ "binaryurp::Unmarshal: unknown TID cache index");
}
return state_.tidCache[idx];
}
@@ -273,8 +264,7 @@ BinaryAny Unmarshal::readValue(css::uno::TypeDescription const & type) {
sal_uInt8 v = read8();
if (v > 1) {
throw css::io::IOException(
- "binaryurp::Unmarshal: boolean of unknown value",
- css::uno::Reference< css::uno::XInterface >());
+ "binaryurp::Unmarshal: boolean of unknown value");
}
return BinaryAny(type, &v);
}
@@ -320,8 +310,7 @@ BinaryAny Unmarshal::readValue(css::uno::TypeDescription const & type) {
css::uno::TypeDescription t(readType());
if (t.get()->eTypeClass == typelib_TypeClass_ANY) {
throw css::io::IOException(
- "binaryurp::Unmarshal: any of type ANY",
- css::uno::Reference< css::uno::XInterface >());
+ "binaryurp::Unmarshal: any of type ANY");
}
return readValue(t);
}
@@ -343,8 +332,7 @@ BinaryAny Unmarshal::readValue(css::uno::TypeDescription const & type) {
}
if (!found) {
throw css::io::IOException(
- "binaryurp::Unmarshal: unknown enum value",
- css::uno::Reference< css::uno::XInterface >());
+ "binaryurp::Unmarshal: unknown enum value");
}
return BinaryAny(type, &v);
}
@@ -374,16 +362,14 @@ BinaryAny Unmarshal::readValue(css::uno::TypeDescription const & type) {
void Unmarshal::done() const {
if (data_ != end_) {
throw css::io::IOException(
- "binaryurp::Unmarshal: block contains excess data",
- css::uno::Reference< css::uno::XInterface >());
+ "binaryurp::Unmarshal: block contains excess data");
}
}
void Unmarshal::check(sal_Int32 size) const {
if (end_ - data_ < size) {
throw css::io::IOException(
- "binaryurp::Unmarshal: trying to read past end of block",
- css::uno::Reference< css::uno::XInterface >());
+ "binaryurp::Unmarshal: trying to read past end of block");
}
}
@@ -396,8 +382,7 @@ sal_uInt16 Unmarshal::readCacheIndex() {
sal_uInt16 idx = read16();
if (idx >= cache::size && idx != cache::ignore) {
throw css::io::IOException(
- "binaryurp::Unmarshal: cache index out of range",
- css::uno::Reference< css::uno::XInterface >());
+ "binaryurp::Unmarshal: cache index out of range");
}
return idx;
}
@@ -418,8 +403,7 @@ OUString Unmarshal::readString() {
sal_uInt32 n = readCompressed();
if (n > SAL_MAX_INT32) {
throw css::uno::RuntimeException(
- "binaryurp::Unmarshal: string size too large",
- css::uno::Reference< css::uno::XInterface >());
+ "binaryurp::Unmarshal: string size too large");
}
check(static_cast< sal_Int32 >(n));
OUString s;
@@ -431,8 +415,7 @@ OUString Unmarshal::readString() {
RTL_TEXTTOUNICODE_FLAGS_INVALID_ERROR)))
{
throw css::io::IOException(
- "binaryurp::Unmarshal: string does not contain UTF-8",
- css::uno::Reference< css::uno::XInterface >());
+ "binaryurp::Unmarshal: string does not contain UTF-8");
}
data_ += n;
return s;
@@ -443,8 +426,7 @@ BinaryAny Unmarshal::readSequence(css::uno::TypeDescription const & type) {
sal_uInt32 n = readCompressed();
if (n > SAL_MAX_INT32) {
throw css::uno::RuntimeException(
- "binaryurp::Unmarshal: sequence size too large",
- css::uno::Reference< css::uno::XInterface >());
+ "binaryurp::Unmarshal: sequence size too large");
}
if (n == 0) {
return BinaryAny(type, 0);
@@ -471,8 +453,7 @@ BinaryAny Unmarshal::readSequence(css::uno::TypeDescription const & type) {
// sal_uInt32 * sal_Int32 -> sal_uInt64 cannot overflow
if (size > SAL_MAX_SIZE - SAL_SEQUENCE_HEADER_SIZE) {
throw css::uno::RuntimeException(
- "binaryurp::Unmarshal: sequence size too large",
- css::uno::Reference< css::uno::XInterface >());
+ "binaryurp::Unmarshal: sequence size too large");
}
void * buf = allocate(
SAL_SEQUENCE_HEADER_SIZE + static_cast< sal_Size >(size));
diff --git a/binaryurp/source/writer.cxx b/binaryurp/source/writer.cxx
index 6b666b089057..a47abf81a822 100644
--- a/binaryurp/source/writer.cxx
+++ b/binaryurp/source/writer.cxx
@@ -238,9 +238,7 @@ void Writer::sendRequest(
}
OSL_ASSERT(functionId >= 0);
if (functionId > SAL_MAX_UINT16) {
- throw css::uno::RuntimeException(
- "function ID too large for URP",
- css::uno::Reference< css::uno::XInterface >());
+ throw css::uno::RuntimeException("function ID too large for URP");
}
std::vector< unsigned char > buf;
bool newType = !(lastType_.is() && t.equals(lastType_));
@@ -406,8 +404,7 @@ void Writer::sendMessage(std::vector< unsigned char > const & buffer) {
std::vector< unsigned char > header;
if (buffer.size() > SAL_MAX_UINT32) {
throw css::uno::RuntimeException(
- "message too large for URP",
- css::uno::Reference< css::uno::XInterface >());
+ "message too large for URP");
}
Marshal::write32(&header, static_cast< sal_uInt32 >(buffer.size()));
Marshal::write32(&header, 1);
diff --git a/bridges/source/cpp_uno/gcc3_ios_arm/except.cxx b/bridges/source/cpp_uno/gcc3_ios_arm/except.cxx
index 1ab474212989..875baa346867 100644
--- a/bridges/source/cpp_uno/gcc3_ios_arm/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_ios_arm/except.cxx
@@ -310,8 +310,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
{
throw RuntimeException(
OUString("cannot get typedescription for type ") +
- *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
- Reference< XInterface >() );
+ *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ) );
}
pCppExc = __cxa_allocate_exception( pTypeDescr->nSize );
@@ -341,8 +340,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
{
throw RuntimeException(
OUString("no rtti for type ") +
- *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
- Reference< XInterface >() );
+ *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ) );
}
}
@@ -353,9 +351,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
{
if (! header)
{
- RuntimeException aRE(
- OUString("no exception header!"),
- Reference< XInterface >() );
+ RuntimeException aRE( "no exception header!" );
Type const & rType = ::getCppuType( &aRE );
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
#if OSL_DEBUG_LEVEL > 0
@@ -373,9 +369,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
typelib_typedescription_getByName( &pExcTypeDescr, unoName.pData );
if (0 == pExcTypeDescr)
{
- RuntimeException aRE(
- OUString("exception type not found: ") + unoName,
- Reference< XInterface >() );
+ RuntimeException aRE( OUString("exception type not found: ") + unoName );
Type const & rType = ::getCppuType( &aRE );
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
#if OSL_DEBUG_LEVEL > 0
diff --git a/bridges/source/cpp_uno/gcc3_linux_arm/except.cxx b/bridges/source/cpp_uno/gcc3_linux_arm/except.cxx
index c79d8d4aacc1..a7234c2968d8 100644
--- a/bridges/source/cpp_uno/gcc3_linux_arm/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_arm/except.cxx
@@ -254,40 +254,38 @@ namespace CPPU_CURRENT_NAMESPACE
{
throw RuntimeException(
OUString("cannot get typedescription for type ") +
- *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
- Reference< XInterface >() );
+ *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ) );
}
pCppExc = __cxa_allocate_exception( pTypeDescr->nSize );
::uno_copyAndConvertData( pCppExc, pUnoExc->pData, pTypeDescr, pUno2Cpp );
- // destruct uno exception
- ::uno_any_destruct( pUnoExc, 0 );
- // avoiding locked counts
- static RTTI * s_rtti = 0;
- if (! s_rtti)
- {
- MutexGuard guard( Mutex::getGlobalMutex() );
- if (! s_rtti)
- {
+ // destruct uno exception
+ ::uno_any_destruct( pUnoExc, 0 );
+ // avoiding locked counts
+ static RTTI * s_rtti = 0;
+ if (! s_rtti)
+ {
+ MutexGuard guard( Mutex::getGlobalMutex() );
+ if (! s_rtti)
+ {
#ifdef LEAK_STATIC_DATA
- s_rtti = new RTTI();
+ s_rtti = new RTTI();
#else
- static RTTI rtti_data;
- s_rtti = &rtti_data;
+ static RTTI rtti_data;
+ s_rtti = &rtti_data;
#endif
- }
- }
- rtti = (type_info *)s_rtti->getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
- TYPELIB_DANGER_RELEASE( pTypeDescr );
- OSL_ENSURE( rtti, "### no rtti for throwing exception!" );
- if (! rtti)
- {
- throw RuntimeException(
- OUString("no rtti for type ") +
- *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
- Reference< XInterface >() );
- }
+ }
+ }
+ rtti = (type_info *)s_rtti->getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
+ TYPELIB_DANGER_RELEASE( pTypeDescr );
+ OSL_ENSURE( rtti, "### no rtti for throwing exception!" );
+ if (! rtti)
+ {
+ throw RuntimeException(
+ OUString("no rtti for type ") +
+ *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ) );
+ }
}
__cxa_throw( pCppExc, rtti, deleteException );
@@ -309,9 +307,7 @@ namespace CPPU_CURRENT_NAMESPACE
{
if (! header)
{
- RuntimeException aRE(
- OUString("no exception header!"),
- Reference< XInterface >() );
+ RuntimeException aRE( "no exception header!" );
Type const & rType = ::getCppuType( &aRE );
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
#if OSL_DEBUG_LEVEL > 0
@@ -330,9 +326,7 @@ namespace CPPU_CURRENT_NAMESPACE
typelib_typedescription_getByName( &pExcTypeDescr, unoName.pData );
if (0 == pExcTypeDescr)
{
- RuntimeException aRE(
- OUString("exception type not found: ") + unoName,
- Reference< XInterface >() );
+ RuntimeException aRE( OUString("exception type not found: ") + unoName );
Type const & rType = ::getCppuType( &aRE );
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
#if OSL_DEBUG_LEVEL > 0
diff --git a/bridges/source/cpp_uno/gcc3_linux_hppa/except.cxx b/bridges/source/cpp_uno/gcc3_linux_hppa/except.cxx
index 754117dd94d5..73d0b7132f05 100644
--- a/bridges/source/cpp_uno/gcc3_linux_hppa/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_hppa/except.cxx
@@ -230,8 +230,7 @@ namespace CPPU_CURRENT_NAMESPACE
{
throw RuntimeException(
OUString("cannot get typedescription for type ") +
- *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
- Reference< XInterface >() );
+ *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ) );
}
pCppExc = __cxa_allocate_exception( pTypeDescr->nSize );
@@ -261,8 +260,7 @@ namespace CPPU_CURRENT_NAMESPACE
{
throw RuntimeException(
OUString("no rtti for type ") +
- *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
- Reference< XInterface >() );
+ *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ) );
}
}
@@ -279,9 +277,7 @@ namespace CPPU_CURRENT_NAMESPACE
{
if (! header)
{
- RuntimeException aRE(
- OUString("no exception header!"),
- Reference< XInterface >() );
+ RuntimeException aRE( "no exception header!" );
Type const & rType = ::getCppuType( &aRE );
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
#if OSL_DEBUG_LEVEL > 0
@@ -301,8 +297,7 @@ namespace CPPU_CURRENT_NAMESPACE
if (0 == pExcTypeDescr)
{
RuntimeException aRE(
- OUString("exception type not found: ") + unoName,
- Reference< XInterface >() );
+ OUString("exception type not found: ") + unoName );
Type const & rType = ::getCppuType( &aRE );
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
#if OSL_DEBUG_LEVEL > 0
diff --git a/bridges/source/cpp_uno/gcc3_linux_intel/except.cxx b/bridges/source/cpp_uno/gcc3_linux_intel/except.cxx
index 8dadc79e1954..165704d1b441 100644
--- a/bridges/source/cpp_uno/gcc3_linux_intel/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_intel/except.cxx
@@ -236,8 +236,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
{
throw RuntimeException(
OUString("cannot get typedescription for type ") +
- *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
- Reference< XInterface >() );
+ *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ) );
}
pCppExc = __cxxabiv1::__cxa_allocate_exception( pTypeDescr->nSize );
@@ -267,8 +266,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
{
throw RuntimeException(
OUString("no rtti for type ") +
- *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
- Reference< XInterface >() );
+ *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ) );
}
}
@@ -279,9 +277,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
{
if (! header)
{
- RuntimeException aRE(
- OUString("no exception header!"),
- Reference< XInterface >() );
+ RuntimeException aRE( "no exception header!" );
Type const & rType = ::getCppuType( &aRE );
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
#if OSL_DEBUG_LEVEL > 0
@@ -300,9 +296,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
typelib_typedescription_getByName( &pExcTypeDescr, unoName.pData );
if (0 == pExcTypeDescr)
{
- RuntimeException aRE(
- OUString("exception type not found: ") + unoName,
- Reference< XInterface >() );
+ RuntimeException aRE( OUString("exception type not found: ") + unoName );
Type const & rType = ::getCppuType( &aRE );
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
#if OSL_DEBUG_LEVEL > 0
diff --git a/bridges/source/cpp_uno/gcc3_linux_m68k/except.cxx b/bridges/source/cpp_uno/gcc3_linux_m68k/except.cxx
index 754117dd94d5..289a0200bb9e 100644
--- a/bridges/source/cpp_uno/gcc3_linux_m68k/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_m68k/except.cxx
@@ -230,8 +230,7 @@ namespace CPPU_CURRENT_NAMESPACE
{
throw RuntimeException(
OUString("cannot get typedescription for type ") +
- *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
- Reference< XInterface >() );
+ *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ) );
}
pCppExc = __cxa_allocate_exception( pTypeDescr->nSize );
@@ -261,8 +260,7 @@ namespace CPPU_CURRENT_NAMESPACE
{
throw RuntimeException(
OUString("no rtti for type ") +
- *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
- Reference< XInterface >() );
+ *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ) );
}
}
@@ -279,9 +277,7 @@ namespace CPPU_CURRENT_NAMESPACE
{
if (! header)
{
- RuntimeException aRE(
- OUString("no exception header!"),
- Reference< XInterface >() );
+ RuntimeException aRE( "no exception header!" );
Type const & rType = ::getCppuType( &aRE );
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
#if OSL_DEBUG_LEVEL > 0
@@ -300,9 +296,7 @@ namespace CPPU_CURRENT_NAMESPACE
typelib_typedescription_getByName( &pExcTypeDescr, unoName.pData );
if (0 == pExcTypeDescr)
{
- RuntimeException aRE(
- OUString("exception type not found: ") + unoName,
- Reference< XInterface >() );
+ RuntimeException aRE( OUString("exception type not found: ") + unoName );
Type const & rType = ::getCppuType( &aRE );
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
#if OSL_DEBUG_LEVEL > 0
diff --git a/bridges/source/cpp_uno/gcc3_linux_mips/except.cxx b/bridges/source/cpp_uno/gcc3_linux_mips/except.cxx
index 84b12a35e8e8..0a6a211f272e 100644
--- a/bridges/source/cpp_uno/gcc3_linux_mips/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_mips/except.cxx
@@ -227,8 +227,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
{
throw RuntimeException(
OUString("cannot get typedescription for type ") +
- *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
- Reference< XInterface >() );
+ *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ) );
}
pCppExc = __cxa_allocate_exception( pTypeDescr->nSize );
@@ -258,8 +257,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
{
throw RuntimeException(
OUString("no rtti for type ") +
- *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
- Reference< XInterface >() );
+ *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ) );
}
}
@@ -270,9 +268,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
{
if (! header)
{
- RuntimeException aRE(
- OUString("no exception header!"),
- Reference< XInterface >() );
+ RuntimeException aRE( "no exception header!" );
Type const & rType = ::getCppuType( &aRE );
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
#if defined _DEBUG
@@ -291,9 +287,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
typelib_typedescription_getByName( &pExcTypeDescr, unoName.pData );
if (0 == pExcTypeDescr)
{
- RuntimeException aRE(
- OUString("exception type not found: ") + unoName,
- Reference< XInterface >() );
+ RuntimeException aRE( OUString("exception type not found: ") + unoName );
Type const & rType = ::getCppuType( &aRE );
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
#if defined _DEBUG
diff --git a/bridges/source/cpp_uno/gcc3_linux_sparc/except.cxx b/bridges/source/cpp_uno/gcc3_linux_sparc/except.cxx
index d238c94e8c86..78ff54f706b6 100644
--- a/bridges/source/cpp_uno/gcc3_linux_sparc/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_sparc/except.cxx
@@ -228,8 +228,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
{
throw RuntimeException(
OUString("cannot get typedescription for type ") +
- *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
- Reference< XInterface >() );
+ *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ) );
}
pCppExc = __cxa_allocate_exception( pTypeDescr->nSize );
@@ -260,7 +259,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
throw RuntimeException(
OUString("no rtti for type ") +
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
- Reference< XInterface >() );
+ );
}
}
@@ -271,9 +270,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
{
if (! header)
{
- RuntimeException aRE(
- OUString("no exception header!"),
- Reference< XInterface >() );
+ RuntimeException aRE( "no exception header!" );
Type const & rType = ::getCppuType( &aRE );
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
#if defined _DEBUG
@@ -292,9 +289,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
typelib_typedescription_getByName( &pExcTypeDescr, unoName.pData );
if (0 == pExcTypeDescr)
{
- RuntimeException aRE(
- OUString("exception type not found: ") + unoName,
- Reference< XInterface >() );
+ RuntimeException aRE( OUString("exception type not found: ") + unoName );
Type const & rType = ::getCppuType( &aRE );
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
#if defined _DEBUG
diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx b/bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx
index 08063a674bef..c2f1a146f3de 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx
@@ -243,8 +243,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
{
throw RuntimeException(
OUString("cannot get typedescription for type ") +
- *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
- Reference< XInterface >() );
+ *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ) );
}
pCppExc = __cxxabiv1::__cxa_allocate_exception( pTypeDescr->nSize );
@@ -261,8 +260,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
{
throw RuntimeException(
OUString("no rtti for type ") +
- *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
- Reference< XInterface >() );
+ *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ) );
}
}
@@ -273,9 +271,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
{
if (! header)
{
- RuntimeException aRE(
- OUString("no exception header!"),
- Reference< XInterface >() );
+ RuntimeException aRE( "no exception header!" );
Type const & rType = ::getCppuType( &aRE );
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
#if OSL_DEBUG_LEVEL > 0
@@ -294,9 +290,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
typelib_typedescription_getByName( &pExcTypeDescr, unoName.pData );
if (0 == pExcTypeDescr)
{
- RuntimeException aRE(
- OUString("exception type not found: ") + unoName,
- Reference< XInterface >() );
+ RuntimeException aRE( OUString("exception type not found: ") + unoName );
Type const & rType = ::getCppuType( &aRE );
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
#if OSL_DEBUG_LEVEL > 0
diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx
index d460180eb5b6..b5200544b764 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx
@@ -242,13 +242,9 @@ static void cpp_call(
appendCString(buf, typeid(e).name());
buf.append(": ");
appendCString(buf, e.what());
- throw RuntimeException(
- buf.makeStringAndClear(), Reference< XInterface >());
+ throw RuntimeException(buf.makeStringAndClear());
} catch (...) {
- throw RuntimeException(
- OUString(
- "C++ code threw unknown exception"),
- Reference< XInterface >());
+ throw RuntimeException("C++ code threw unknown exception");
}
*ppUnoExc = 0;
diff --git a/bridges/source/cpp_uno/gcc3_macosx_intel/except.cxx b/bridges/source/cpp_uno/gcc3_macosx_intel/except.cxx
index 6988dcb42e64..2368541c654e 100644
--- a/bridges/source/cpp_uno/gcc3_macosx_intel/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_macosx_intel/except.cxx
@@ -305,8 +305,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
{
throw RuntimeException(
OUString("cannot get typedescription for type ") +
- *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
- Reference< XInterface >() );
+ *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ) );
}
pCppExc = __cxa_allocate_exception( pTypeDescr->nSize );
@@ -336,8 +335,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
{
throw RuntimeException(
OUString("no rtti for type ") +
- *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
- Reference< XInterface >() );
+ *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ) );
}
}
@@ -348,9 +346,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
{
if (! header)
{
- RuntimeException aRE(
- OUString("no exception header!"),
- Reference< XInterface >() );
+ RuntimeException aRE( "no exception header!" );
Type const & rType = ::getCppuType( &aRE );
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
#if OSL_DEBUG_LEVEL > 0
@@ -369,9 +365,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
typelib_typedescription_getByName( &pExcTypeDescr, unoName.pData );
if (0 == pExcTypeDescr)
{
- RuntimeException aRE(
- OUString("exception type not found: ") + unoName,
- Reference< XInterface >() );
+ RuntimeException aRE( OUString("exception type not found: ") + unoName );
Type const & rType = ::getCppuType( &aRE );
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
#if OSL_DEBUG_LEVEL > 0
diff --git a/bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx b/bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx
index 664a5c09d8d3..8ba8688b6d0f 100644
--- a/bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx
@@ -315,8 +315,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
{
throw RuntimeException(
OUString("cannot get typedescription for type ") +
- *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
- Reference< XInterface >() );
+ *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ) );
}
pCppExc = __cxa_allocate_exception( pTypeDescr->nSize );
@@ -346,8 +345,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
{
throw RuntimeException(
OUString("no rtti for type ") +
- *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
- Reference< XInterface >() );
+ *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ) );
}
}
@@ -358,9 +356,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
{
if (! header)
{
- RuntimeException aRE(
- OUString("no exception header!"),
- Reference< XInterface >() );
+ RuntimeException aRE( "no exception header!" );
Type const & rType = ::getCppuType( &aRE );
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
#if OSL_DEBUG_LEVEL > 0
@@ -379,9 +375,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
typelib_typedescription_getByName( &pExcTypeDescr, unoName.pData );
if (0 == pExcTypeDescr)
{
- RuntimeException aRE(
- OUString("exception type not found: ") + unoName,
- Reference< XInterface >() );
+ RuntimeException aRE( OUString("exception type not found: ") + unoName );
Type const & rType = ::getCppuType( &aRE );
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
#if OSL_DEBUG_LEVEL > 0
diff --git a/bridges/source/cpp_uno/gcc3_macosx_x86-64/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_macosx_x86-64/uno2cpp.cxx
index e35493e199cc..11a8cd4242dc 100644
--- a/bridges/source/cpp_uno/gcc3_macosx_x86-64/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_macosx_x86-64/uno2cpp.cxx
@@ -243,12 +243,9 @@ static void cpp_call(
buf.append(": ");
appendCString(buf, e.what());
throw RuntimeException(
- buf.makeStringAndClear(), Reference< XInterface >());
+ buf.makeStringAndClear());
} catch (...) {
- throw RuntimeException(
- OUString(
- "C++ code threw unknown exception"),
- Reference< XInterface >());
+ throw RuntimeException("C++ code threw unknown exception");
}
*ppUnoExc = 0;
diff --git a/bridges/source/cpp_uno/gcc3_solaris_intel/except.cxx b/bridges/source/cpp_uno/gcc3_solaris_intel/except.cxx
index 25d4c2bf4c93..71502dbc3d7d 100644
--- a/bridges/source/cpp_uno/gcc3_solaris_intel/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_solaris_intel/except.cxx
@@ -230,8 +230,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
{
throw RuntimeException(
OUString("cannot get typedescription for type ") +
- *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
- Reference< XInterface >() );
+ *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ) );
}
pCppExc = __cxa_allocate_exception( pTypeDescr->nSize );
@@ -261,8 +260,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
{
throw RuntimeException(
OUString("no rtti for type ") +
- *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
- Reference< XInterface >() );
+ *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ) );
}
}
@@ -273,9 +271,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
{
if (! header)
{
- RuntimeException aRE(
- OUString("no exception header!"),
- Reference< XInterface >() );
+ RuntimeException aRE( "no exception header!" );
Type const & rType = ::getCppuType( &aRE );
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
#if OSL_DEBUG_LEVEL > 0
@@ -294,9 +290,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
typelib_typedescription_getByName( &pExcTypeDescr, unoName.pData );
if (0 == pExcTypeDescr)
{
- RuntimeException aRE(
- OUString("exception type not found: ") + unoName,
- Reference< XInterface >() );
+ RuntimeException aRE( OUString("exception type not found: ") + unoName );
Type const & rType = ::getCppuType( &aRE );
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
#if OSL_DEBUG_LEVEL > 0
diff --git a/bridges/source/cpp_uno/gcc3_solaris_sparc/except.cxx b/bridges/source/cpp_uno/gcc3_solaris_sparc/except.cxx
index f0447a16580c..16e13c9b3182 100644
--- a/bridges/source/cpp_uno/gcc3_solaris_sparc/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_solaris_sparc/except.cxx
@@ -227,8 +227,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
{
throw RuntimeException(
OUString("cannot get typedescription for type ") +
- *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
- Reference< XInterface >() );
+ *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ) );
}
pCppExc = __cxa_allocate_exception( pTypeDescr->nSize );
@@ -258,8 +257,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
{
throw RuntimeException(
OUString("no rtti for type ") +
- *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
- Reference< XInterface >() );
+ *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ) );
}
}
@@ -270,9 +268,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
{
if (! header)
{
- RuntimeException aRE(
- OUString("no exception header!"),
- Reference< XInterface >() );
+ RuntimeException aRE( "no exception header!" );
Type const & rType = ::getCppuType( &aRE );
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
#if defined _DEBUG
@@ -291,9 +287,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
typelib_typedescription_getByName( &pExcTypeDescr, unoName.pData );
if (0 == pExcTypeDescr)
{
- RuntimeException aRE(
- OUString("exception type not found: ") + unoName,
- Reference< XInterface >() );
+ RuntimeException aRE( OUString("exception type not found: ") + unoName );
Type const & rType = ::getCppuType( &aRE );
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
#if defined _DEBUG
diff --git a/bridges/source/cpp_uno/mingw_intel/except.cxx b/bridges/source/cpp_uno/mingw_intel/except.cxx
index 3091dc56758d..ea75423f5167 100644
--- a/bridges/source/cpp_uno/mingw_intel/except.cxx
+++ b/bridges/source/cpp_uno/mingw_intel/except.cxx
@@ -221,8 +221,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
{
throw RuntimeException(
OUString("cannot get typedescription for type ") +
- *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
- Reference< XInterface >() );
+ *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ) );
}
pCppExc = __cxa_allocate_exception( pTypeDescr->nSize );
@@ -252,8 +251,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
{
throw RuntimeException(
OUString("no rtti for type ") +
- *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
- Reference< XInterface >() );
+ *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ) );
}
}
@@ -264,9 +262,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
{
if (! header)
{
- RuntimeException aRE(
- OUString("no exception header!"),
- Reference< XInterface >() );
+ RuntimeException aRE( "no exception header!" );
Type const & rType = ::getCppuType( &aRE );
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
#if OSL_DEBUG_LEVEL > 0
@@ -285,9 +281,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
typelib_typedescription_getByName( &pExcTypeDescr, unoName.pData );
if (0 == pExcTypeDescr)
{
- RuntimeException aRE(
- OUString("exception type not found: ") + unoName,
- Reference< XInterface >() );
+ RuntimeException aRE( OUString("exception type not found: ") + unoName );
Type const & rType = ::getCppuType( &aRE );
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
#if OSL_DEBUG_LEVEL > 0
diff --git a/bridges/source/cpp_uno/mingw_x86-64/except.cxx b/bridges/source/cpp_uno/mingw_x86-64/except.cxx
index 3091dc56758d..ea75423f5167 100644
--- a/bridges/source/cpp_uno/mingw_x86-64/except.cxx
+++ b/bridges/source/cpp_uno/mingw_x86-64/except.cxx
@@ -221,8 +221,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
{
throw RuntimeException(
OUString("cannot get typedescription for type ") +
- *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
- Reference< XInterface >() );
+ *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ) );
}
pCppExc = __cxa_allocate_exception( pTypeDescr->nSize );
@@ -252,8 +251,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
{
throw RuntimeException(
OUString("no rtti for type ") +
- *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
- Reference< XInterface >() );
+ *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ) );
}
}
@@ -264,9 +262,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
{
if (! header)
{
- RuntimeException aRE(
- OUString("no exception header!"),
- Reference< XInterface >() );
+ RuntimeException aRE( "no exception header!" );
Type const & rType = ::getCppuType( &aRE );
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
#if OSL_DEBUG_LEVEL > 0
@@ -285,9 +281,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
typelib_typedescription_getByName( &pExcTypeDescr, unoName.pData );
if (0 == pExcTypeDescr)
{
- RuntimeException aRE(
- OUString("exception type not found: ") + unoName,
- Reference< XInterface >() );
+ RuntimeException aRE( OUString("exception type not found: ") + unoName );
Type const & rType = ::getCppuType( &aRE );
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
#if OSL_DEBUG_LEVEL > 0
diff --git a/bridges/source/cpp_uno/mingw_x86-64/uno2cpp.cxx b/bridges/source/cpp_uno/mingw_x86-64/uno2cpp.cxx
index 0ff2880e46cc..6684de9e0dbd 100644
--- a/bridges/source/cpp_uno/mingw_x86-64/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/mingw_x86-64/uno2cpp.cxx
@@ -238,13 +238,9 @@ static void cpp_call(
appendCString(buf, typeid(e).name());
buf.append(": ");
appendCString(buf, e.what());
- throw RuntimeException(
- buf.makeStringAndClear(), Reference< XInterface >());
+ throw RuntimeException(buf.makeStringAndClear());
} catch (...) {
- throw RuntimeException(
- OUString(
- "C++ code threw unknown exception"),
- Reference< XInterface >());
+ throw RuntimeException("C++ code threw unknown exception");
}
*ppUnoExc = 0;
diff --git a/bridges/source/cpp_uno/msvc_win32_intel/except.cxx b/bridges/source/cpp_uno/msvc_win32_intel/except.cxx
index 04f6d0b7ac7d..d5637e79cb37 100644
--- a/bridges/source/cpp_uno/msvc_win32_intel/except.cxx
+++ b/bridges/source/cpp_uno/msvc_win32_intel/except.cxx
@@ -539,8 +539,7 @@ int msci_filterCppException(
buf.append( "\", RTTI-name=\"" );
buf.append( aRTTIname );
buf.append( "\"!" );
- RuntimeException exc(
- buf.makeStringAndClear(), Reference< XInterface >() );
+ RuntimeException exc( buf.makeStringAndClear() );
uno_type_any_constructAndConvert(
pUnoExc, &exc,
::getCppuType( &exc ).getTypeLibType(), pCpp2Uno );
@@ -565,10 +564,8 @@ int msci_filterCppException(
}
// though this unknown exception leaks now, no user-defined exception
// is ever thrown thru the binary C-UNO dispatcher call stack.
- RuntimeException exc(
- OUString( "[msci_uno bridge error] unexpected "
- "C++ exception occurred!" ),
- Reference< XInterface >() );
+ RuntimeException exc( "[msci_uno bridge error] unexpected "
+ "C++ exception occurred!" );
uno_type_any_constructAndConvert(
pUnoExc, &exc, ::getCppuType( &exc ).getTypeLibType(), pCpp2Uno );
return EXCEPTION_EXECUTE_HANDLER;
diff --git a/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx b/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx
index 26688aa29d96..b449a28e20ee 100644
--- a/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx
+++ b/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx
@@ -783,8 +783,7 @@ int mscx_filterCppException(
buf.append( "\", RTTI-name=\"" );
buf.append( aRTTIname );
buf.append( "\"!" );
- RuntimeException exc(
- buf.makeStringAndClear(), Reference< XInterface >() );
+ RuntimeException exc( buf.makeStringAndClear() );
uno_type_any_constructAndConvert(
pUnoExc, &exc,
::getCppuType( &exc ).getTypeLibType(), pCpp2Uno );
@@ -804,10 +803,8 @@ int mscx_filterCppException(
}
// though this unknown exception leaks now, no user-defined exception
// is ever thrown thru the binary C-UNO dispatcher call stack.
- RuntimeException exc(
- OUString( "[mscx_uno bridge error] unexpected "
- "C++ exception occurred!" ),
- Reference< XInterface >() );
+ RuntimeException exc( "[mscx_uno bridge error] unexpected "
+ "C++ exception occurred!" );
uno_type_any_constructAndConvert(
pUnoExc, &exc, ::getCppuType( &exc ).getTypeLibType(), pCpp2Uno );
return EXCEPTION_EXECUTE_HANDLER;
diff --git a/bridges/source/cpp_uno/msvc_win32_x86-64/uno2cpp.cxx b/bridges/source/cpp_uno/msvc_win32_x86-64/uno2cpp.cxx
index 67f2a0df99ce..7acf4505c489 100644
--- a/bridges/source/cpp_uno/msvc_win32_x86-64/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/msvc_win32_x86-64/uno2cpp.cxx
@@ -411,9 +411,7 @@ void unoInterfaceProxyDispatch(
((typelib_InterfaceMethodTypeDescription *)pMemberTD)->pParams,
pReturn, pArgs, ppException ) )
{
- RuntimeException aExc(
- OUString("Too many parameters!"),
- Reference< XInterface >() );
+ RuntimeException aExc( "Too many parameters!" );
Type const & rExcType = ::getCppuType( &aExc );
::uno_type_any_construct( *ppException, &aExc, rExcType.getTypeLibType(), 0 );
@@ -423,9 +421,7 @@ void unoInterfaceProxyDispatch(
}
default:
{
- RuntimeException aExc(
- OUString("Illegal member type description!"),
- Reference< XInterface >() );
+ RuntimeException aExc( "Illegal member type description!" );
Type const & rExcType = ::getCppuType( &aExc );
// Binary identical null reference (whatever that comment means...)
diff --git a/canvas/source/tools/propertysethelper.cxx b/canvas/source/tools/propertysethelper.cxx
index 2cdee08d4d37..46ebc3543058 100644
--- a/canvas/source/tools/propertysethelper.cxx
+++ b/canvas/source/tools/propertysethelper.cxx
@@ -30,8 +30,7 @@ namespace canvas
{
throw beans::UnknownPropertyException(
"PropertySetHelper: property " +
- aPropertyName + " not found.",
- uno::Reference< uno::XInterface >()
+ aPropertyName + " not found."
);
}
@@ -39,8 +38,7 @@ namespace canvas
{
throw beans::PropertyVetoException(
"PropertySetHelper: property " +
- aPropertyName + " access was vetoed.",
- uno::Reference< uno::XInterface >() );
+ aPropertyName + " access was vetoed." );
}
struct EntryComparator
diff --git a/cli_ure/source/climaker/climaker_app.cxx b/cli_ure/source/climaker/climaker_app.cxx
index b47be9312774..0f14a170b028 100644
--- a/cli_ure/source/climaker/climaker_app.cxx
+++ b/cli_ure/source/climaker/climaker_app.cxx
@@ -240,15 +240,13 @@ static OUString path_make_absolute_file_url( OUString const & path )
else
{
throw RuntimeException(
- "cannot make absolute: " + file_url,
- css::uno::Reference< XInterface >() );
+ "cannot make absolute: " + file_url );
}
}
else
{
throw RuntimeException(
- "cannot get file url from system path: " + path,
- css::uno::Reference< XInterface >() );
+ "cannot get file url from system path: " + path );
}
}
@@ -381,8 +379,7 @@ SAL_IMPLEMENT_MAIN()
buf.append( cmd_arg );
buf.append( "! Use climaker --help to print all options." );
throw RuntimeException(
- buf.makeStringAndClear(),
- css::uno::Reference< XInterface >() );
+ buf.makeStringAndClear() );
}
else
{
@@ -457,8 +454,7 @@ SAL_IMPLEMENT_MAIN()
{
throw RuntimeException(
"cannot get system path from file url " +
- output.copy( 0, slash ),
- css::uno::Reference< XInterface >() );
+ output.copy( 0, slash ) );
}
OUString filename( output.copy( slash +1 ) );
sal_Int32 dot = filename.lastIndexOf( '.' );
diff --git a/cli_ure/source/climaker/climaker_emit.cxx b/cli_ure/source/climaker/climaker_emit.cxx
index 58f3c1172c76..b3139d709c76 100644
--- a/cli_ure/source/climaker/climaker_emit.cxx
+++ b/cli_ure/source/climaker/climaker_emit.cxx
@@ -90,8 +90,7 @@ static inline ::System::Object ^ to_cli_constant( Any const & value )
default:
throw RuntimeException(
"unexpected constant type " +
- value.getValueType().getTypeName(),
- Reference< XInterface >() );
+ value.getValueType().getTypeName() );
}
}
@@ -1265,8 +1264,7 @@ Assembly ^ TypeEmitter::type_resolve(
else
{
throw RuntimeException(
- "unexpected member type in " + entry->m_xType->getName(),
- Reference< XInterface >() );
+ "unexpected member type in " + entry->m_xType->getName() );
}
}
else
@@ -2153,8 +2151,7 @@ Emit::CustomAttributeBuilder^ TypeEmitter::get_exception_attribute(
return nullptr;
default:
throw RuntimeException(
- "unexpected type " + xType->getName(),
- Reference< XInterface >() );
+ "unexpected type " + xType->getName() );
}
}
diff --git a/comphelper/source/misc/configurationhelper.cxx b/comphelper/source/misc/configurationhelper.cxx
index 837fd5de3e86..b388162fa464 100644
--- a/comphelper/source/misc/configurationhelper.cxx
+++ b/comphelper/source/misc/configurationhelper.cxx
@@ -91,8 +91,7 @@ css::uno::Any ConfigurationHelper::readRelativeKey(const css::uno::Reference< cs
sMsg.appendAscii("\" does not exists." );
throw css::container::NoSuchElementException(
- sMsg.makeStringAndClear(),
- css::uno::Reference< css::uno::XInterface >());
+ sMsg.makeStringAndClear());
}
return xProps->getPropertyValue(sKey);
}
@@ -115,8 +114,7 @@ void ConfigurationHelper::writeRelativeKey(const css::uno::Reference< css::uno::
sMsg.appendAscii("\" does not exists." );
throw css::container::NoSuchElementException(
- sMsg.makeStringAndClear(),
- css::uno::Reference< css::uno::XInterface >());
+ sMsg.makeStringAndClear());
}
xProps->setPropertyValue(sKey, aValue);
}
@@ -137,8 +135,7 @@ css::uno::Reference< css::uno::XInterface > ConfigurationHelper::makeSureSetNode
sMsg.appendAscii("\" does not exists." );
throw css::container::NoSuchElementException(
- sMsg.makeStringAndClear(),
- css::uno::Reference< css::uno::XInterface >());
+ sMsg.makeStringAndClear());
}
css::uno::Reference< css::uno::XInterface > xNode;
diff --git a/comphelper/source/misc/sequenceashashmap.cxx b/comphelper/source/misc/sequenceashashmap.cxx
index 1023dbea1490..35f2d6bf118a 100644
--- a/comphelper/source/misc/sequenceashashmap.cxx
+++ b/comphelper/source/misc/sequenceashashmap.cxx
@@ -76,8 +76,7 @@ void SequenceAsHashMap::operator<<(const css::uno::Any& aSource)
}
throw css::beans::IllegalTypeException(
- OUString( "Any contains wrong type." ),
- css::uno::Reference< css::uno::XInterface >());
+ "Any contains wrong type." );
}
@@ -96,8 +95,7 @@ void SequenceAsHashMap::operator<<(const css::uno::Sequence< css::uno::Any >& lS
(!lP.Value.hasValue())
)
throw css::beans::IllegalTypeException(
- OUString( "PropertyValue struct contains no useful information." ),
- css::uno::Reference< css::uno::XInterface >());
+ "PropertyValue struct contains no useful information." );
(*this)[lP.Name] = lP.Value;
continue;
}
@@ -110,8 +108,7 @@ void SequenceAsHashMap::operator<<(const css::uno::Sequence< css::uno::Any >& lS
(!lN.Value.hasValue())
)
throw css::beans::IllegalTypeException(
- OUString( "NamedValue struct contains no useful information." ),
- css::uno::Reference< css::uno::XInterface >());
+ "NamedValue struct contains no useful information." );
(*this)[lN.Name] = lN.Value;
continue;
}
@@ -119,8 +116,7 @@ void SequenceAsHashMap::operator<<(const css::uno::Sequence< css::uno::Any >& lS
// ignore VOID Any ... but reject wrong filled ones!
if (lSource[i].hasValue())
throw css::beans::IllegalTypeException(
- OUString( "Any contains wrong type." ),
- css::uno::Reference< css::uno::XInterface >());
+ "Any contains wrong type." );
}
}
diff --git a/comphelper/source/processfactory/processfactory.cxx b/comphelper/source/processfactory/processfactory.cxx
index 65c08ebad790..04c81cb3d7d7 100644
--- a/comphelper/source/processfactory/processfactory.cxx
+++ b/comphelper/source/processfactory/processfactory.cxx
@@ -61,8 +61,7 @@ Reference< XMultiServiceFactory > getProcessServiceFactory()
xReturn = localProcessFactory( xReturn, false );
if ( !xReturn.is() )
{
- throw DeploymentException(
- "null process service factory", Reference< XInterface >() );
+ throw DeploymentException( "null process service factory" );
}
return xReturn;
}
diff --git a/configmgr/source/components.cxx b/configmgr/source/components.cxx
index 4e7259b2bbac..9c39f3d0f9de 100644
--- a/configmgr/source/components.cxx
+++ b/configmgr/source/components.cxx
@@ -314,8 +314,7 @@ void Components::insertExtensionXcsFile(
parseXcsFile(fileUri, layer, data_, 0, 0, 0);
} catch (css::container::NoSuchElementException & e) {
throw css::uno::RuntimeException(
- "insertExtensionXcsFile does not exist: " + e.Message,
- css::uno::Reference< css::uno::XInterface >());
+ "insertExtensionXcsFile does not exist: " + e.Message);
}
}
@@ -330,8 +329,7 @@ void Components::insertExtensionXcuFile(
} catch (css::container::NoSuchElementException & e) {
data_.removeExtensionXcuAdditions(fileUri);
throw css::uno::RuntimeException(
- "insertExtensionXcuFile does not exist: " + e.Message,
- css::uno::Reference< css::uno::XInterface >());
+ "insertExtensionXcuFile does not exist: " + e.Message);
}
}
@@ -413,8 +411,7 @@ css::beans::Optional< css::uno::Any > Components::getExternalValue(
sal_Int32 i = descriptor.indexOf(' ');
if (i <= 0) {
throw css::uno::RuntimeException(
- "bad external value descriptor " + descriptor,
- css::uno::Reference< css::uno::XInterface >());
+ "bad external value descriptor " + descriptor);
}
//TODO: Do not make calls with mutex locked:
OUString name(descriptor.copy(0, i));
@@ -450,17 +447,14 @@ css::beans::Optional< css::uno::Any > Components::getExternalValue(
value))
{
throw css::uno::RuntimeException(
- "cannot obtain external value through " + descriptor,
- css::uno::Reference< css::uno::XInterface >());
+ "cannot obtain external value through " + descriptor);
}
} catch (css::beans::UnknownPropertyException & e) {
throw css::uno::RuntimeException(
- "unknown external value descriptor ID: " + e.Message,
- css::uno::Reference< css::uno::XInterface >());
+ "unknown external value descriptor ID: " + e.Message);
} catch (css::lang::WrappedTargetException & e) {
throw css::uno::RuntimeException(
- "cannot obtain external value: " + e.Message,
- css::uno::Reference< css::uno::XInterface >());
+ "cannot obtain external value: " + e.Message);
}
}
return value;
@@ -483,15 +477,13 @@ Components::Components(
}
if (!modificationFileUrl_.isEmpty()) {
throw css::uno::RuntimeException(
- "CONFIGURATION_LAYERS: \"user\" followed by further layers",
- css::uno::Reference< css::uno::XInterface >());
+ "CONFIGURATION_LAYERS: \"user\" followed by further layers");
}
sal_Int32 c = i;
for (;; ++c) {
if (c == conf.getLength() || conf[c] == ' ') {
throw css::uno::RuntimeException(
- "CONFIGURATION_LAYERS: missing \":\"",
- css::uno::Reference< css::uno::XInterface >());
+ "CONFIGURATION_LAYERS: missing \":\"");
}
if (conf[c] == ':') {
break;
@@ -513,8 +505,7 @@ Components::Components(
} else if ( type == "sharedext" ) {
if (sharedExtensionLayer_ != -1) {
throw css::uno::RuntimeException(
- "CONFIGURATION_LAYERS: multiple \"sharedext\" layers",
- css::uno::Reference< css::uno::XInterface >());
+ "CONFIGURATION_LAYERS: multiple \"sharedext\" layers");
}
sharedExtensionLayer_ = layer;
parseXcsXcuIniLayer(layer, url, true);
@@ -522,8 +513,7 @@ Components::Components(
} else if ( type == "userext" ) {
if (userExtensionLayer_ != -1) {
throw css::uno::RuntimeException(
- "CONFIGURATION_LAYERS: multiple \"userext\" layers",
- css::uno::Reference< css::uno::XInterface >());
+ "CONFIGURATION_LAYERS: multiple \"userext\" layers");
}
userExtensionLayer_ = layer;
parseXcsXcuIniLayer(layer, url, true);
@@ -537,8 +527,7 @@ Components::Components(
} else if ( type == "user" ) {
if (url.isEmpty()) {
throw css::uno::RuntimeException(
- "CONFIGURATION_LAYERS: empty \"user\" URL",
- css::uno::Reference< css::uno::XInterface >());
+ "CONFIGURATION_LAYERS: empty \"user\" URL");
}
modificationFileUrl_ = url;
parseModificationLayer(url);
@@ -562,8 +551,7 @@ Components::Components(
#endif
else {
throw css::uno::RuntimeException(
- "CONFIGURATION_LAYERS: unknown layer type \"" + type + "\"",
- css::uno::Reference< css::uno::XInterface >());
+ "CONFIGURATION_LAYERS: unknown layer type \"" + type + "\"");
}
i = n;
}
@@ -611,8 +599,7 @@ void Components::parseFiles(
// fall through
default:
throw css::uno::RuntimeException(
- "cannot open directory " + url,
- css::uno::Reference< css::uno::XInterface >());
+ "cannot open directory " + url);
}
for (;;) {
osl::DirectoryItem i;
@@ -622,16 +609,14 @@ void Components::parseFiles(
}
if (rc != osl::FileBase::E_None) {
throw css::uno::RuntimeException(
- "cannot iterate directory " + url,
- css::uno::Reference< css::uno::XInterface >());
+ "cannot iterate directory " + url);
}
osl::FileStatus stat(
osl_FileStatus_Mask_Type | osl_FileStatus_Mask_FileName |
osl_FileStatus_Mask_FileURL);
if (i.getFileStatus(stat) != osl::FileBase::E_None) {
throw css::uno::RuntimeException(
- "cannot stat in directory " + url,
- css::uno::Reference< css::uno::XInterface >());
+ "cannot stat in directory " + url);
}
if (stat.getFileType() == osl::FileStatus::Directory) { //TODO: symlinks
parseFiles(layer, extension, parseFile, stat.getFileURL(), true);
@@ -643,8 +628,7 @@ void Components::parseFiles(
parseFile, stat.getFileURL(), layer, data_, 0, 0, 0);
} catch (css::container::NoSuchElementException & e) {
throw css::uno::RuntimeException(
- "stat'ed file does not exist: " + e.Message,
- css::uno::Reference< css::uno::XInterface >());
+ "stat'ed file does not exist: " + e.Message);
}
}
}
@@ -687,8 +671,7 @@ void Components::parseXcdFiles(int layer, OUString const & url) {
return;
default:
throw css::uno::RuntimeException(
- "cannot open directory " + url,
- css::uno::Reference< css::uno::XInterface >());
+ "cannot open directory " + url);
}
UnresolvedList unres;
std::set< OUString > existingDeps;
@@ -701,16 +684,14 @@ void Components::parseXcdFiles(int layer, OUString const & url) {
}
if (rc != osl::FileBase::E_None) {
throw css::uno::RuntimeException(
- "cannot iterate directory " + url,
- css::uno::Reference< css::uno::XInterface >());
+ "cannot iterate directory " + url);
}
osl::FileStatus stat(
osl_FileStatus_Mask_Type | osl_FileStatus_Mask_FileName |
osl_FileStatus_Mask_FileURL);
if (i.getFileStatus(stat) != osl::FileBase::E_None) {
throw css::uno::RuntimeException(
- "cannot stat in directory " + url,
- css::uno::Reference< css::uno::XInterface >());
+ "cannot stat in directory " + url);
}
if (stat.getFileType() != osl::FileStatus::Directory) { //TODO: symlinks
OUString file(stat.getFileName());
@@ -724,8 +705,7 @@ void Components::parseXcdFiles(int layer, OUString const & url) {
new XcdParser(layer, processedDeps, data_));
} catch (css::container::NoSuchElementException & e) {
throw css::uno::RuntimeException(
- "stat'ed file does not exist: " + e.Message,
- css::uno::Reference< css::uno::XInterface >());
+ "stat'ed file does not exist: " + e.Message);
}
if (manager->parse(0)) {
processedDeps.insert(name);
@@ -748,8 +728,7 @@ void Components::parseXcdFiles(int layer, OUString const & url) {
}
if (!resolved) {
throw css::uno::RuntimeException(
- "xcd: unresolved dependencies in " + url,
- css::uno::Reference< css::uno::XInterface >());
+ "xcd: unresolved dependencies in " + url);
}
}
}
@@ -826,8 +805,7 @@ int Components::getExtensionLayer(bool shared) {
int layer = shared ? sharedExtensionLayer_ : userExtensionLayer_;
if (layer == -1) {
throw css::uno::RuntimeException(
- "insert extension xcs/xcu file into undefined layer",
- css::uno::Reference< css::uno::XInterface >());
+ "insert extension xcs/xcu file into undefined layer");
}
return layer;
}
diff --git a/configmgr/source/data.cxx b/configmgr/source/data.cxx
index f6535dff9c00..1cd40d16e650 100644
--- a/configmgr/source/data.cxx
+++ b/configmgr/source/data.cxx
@@ -154,9 +154,8 @@ OUString Data::fullTemplateName(
{
if (component.indexOf(':') != -1 || name.indexOf(':') != -1) {
throw css::uno::RuntimeException(
- ("bad component/name pair containing colon " + component + "/" +
- name),
- css::uno::Reference< css::uno::XInterface >());
+ "bad component/name pair containing colon " + component + "/" +
+ name);
}
OUStringBuffer buf(component);
buf.append(':');
@@ -197,8 +196,7 @@ rtl::Reference< Node > Data::resolvePathRepresentation(
{
if (pathRepresentation.isEmpty() || pathRepresentation[0] != '/') {
throw css::uno::RuntimeException(
- "bad path " + pathRepresentation,
- css::uno::Reference< css::uno::XInterface >());
+ "bad path " + pathRepresentation);
}
if (path != 0) {
path->clear();
@@ -219,8 +217,7 @@ rtl::Reference< Node > Data::resolvePathRepresentation(
if (n == -1 || setElement)
{
throw css::uno::RuntimeException(
- "bad path " + pathRepresentation,
- css::uno::Reference< css::uno::XInterface >());
+ "bad path " + pathRepresentation);
}
NodeMap const & components = getComponents();
NodeMap::const_iterator i(components.find(seg));
@@ -243,8 +240,7 @@ rtl::Reference< Node > Data::resolvePathRepresentation(
pathRepresentation[n++] != '/')
{
throw css::uno::RuntimeException(
- "bad path " + pathRepresentation,
- css::uno::Reference< css::uno::XInterface >());
+ "bad path " + pathRepresentation);
}
// for backwards compatibility, ignore a final slash
if (n == pathRepresentation.getLength()) {
@@ -262,8 +258,7 @@ rtl::Reference< Node > Data::resolvePathRepresentation(
pathRepresentation, n, &seg, &setElement, &templateName);
if (n == -1) {
throw css::uno::RuntimeException(
- "bad path " + pathRepresentation,
- css::uno::Reference< css::uno::XInterface >());
+ "bad path " + pathRepresentation);
}
// For backwards compatibility, allow set members to be accessed with
// simple path segments, like group members:
@@ -273,8 +268,7 @@ rtl::Reference< Node > Data::resolvePathRepresentation(
case Node::KIND_LOCALIZED_PROPERTY:
if (!templateName.isEmpty()) {
throw css::uno::RuntimeException(
- "bad path " + pathRepresentation,
- css::uno::Reference< css::uno::XInterface >());
+ "bad path " + pathRepresentation);
}
break;
case Node::KIND_SET:
@@ -283,21 +277,18 @@ rtl::Reference< Node > Data::resolvePathRepresentation(
templateName))
{
throw css::uno::RuntimeException(
- "bad path " + pathRepresentation,
- css::uno::Reference< css::uno::XInterface >());
+ "bad path " + pathRepresentation);
}
break;
default:
throw css::uno::RuntimeException(
- "bad path " + pathRepresentation,
- css::uno::Reference< css::uno::XInterface >());
+ "bad path " + pathRepresentation);
}
if (!templateName.isEmpty() && p != 0) {
assert(!p->getTemplateName().isEmpty());
if (!equalTemplateNames(templateName, p->getTemplateName())) {
throw css::uno::RuntimeException(
- "bad path " + pathRepresentation,
- css::uno::Reference< css::uno::XInterface >());
+ "bad path " + pathRepresentation);
}
}
}
@@ -324,8 +315,7 @@ Additions * Data::addExtensionXcuAdditions(
url, rtl::Reference< ExtensionXcu >())).first);
if (i->second.is()) {
throw css::uno::RuntimeException(
- "already added extension xcu " + url,
- css::uno::Reference< css::uno::XInterface >());
+ "already added extension xcu " + url);
}
i->second = item;
item->layer = layer;
diff --git a/configmgr/source/node.cxx b/configmgr/source/node.cxx
index 661f1aaf7bd0..dafea1e70021 100644
--- a/configmgr/source/node.cxx
+++ b/configmgr/source/node.cxx
@@ -36,8 +36,7 @@ namespace configmgr {
NodeMap & Node::getMembers() {
assert(false);
- throw css::uno::RuntimeException(
- "this cannot happen", css::uno::Reference< css::uno::XInterface >());
+ throw css::uno::RuntimeException("this cannot happen");
}
OUString Node::getTemplateName() const {
diff --git a/configmgr/source/partial.cxx b/configmgr/source/partial.cxx
index 2856046fe719..5133d1f49556 100644
--- a/configmgr/source/partial.cxx
+++ b/configmgr/source/partial.cxx
@@ -54,8 +54,7 @@ bool parseSegment(
return *index == path.getLength();
}
}
- throw css::uno::RuntimeException(
- "bad path " + path, css::uno::Reference< css::uno::XInterface >());
+ throw css::uno::RuntimeException("bad path " + path);
}
}
diff --git a/configmgr/source/type.cxx b/configmgr/source/type.cxx
index b257607eef4a..93e5a85722a9 100644
--- a/configmgr/source/type.cxx
+++ b/configmgr/source/type.cxx
@@ -60,9 +60,7 @@ Type elementType(Type type) {
return TYPE_HEXBINARY;
default:
assert(false);
- throw css::uno::RuntimeException(
- "this cannot happen",
- css::uno::Reference< css::uno::XInterface >());
+ throw css::uno::RuntimeException("this cannot happen");
}
}
@@ -101,9 +99,7 @@ css::uno::Type mapType(Type type) {
css::uno::Sequence< css::uno::Sequence< sal_Int8 > > >::get();
default:
assert(false);
- throw css::uno::RuntimeException(
- "this cannot happen",
- css::uno::Reference< css::uno::XInterface >());
+ throw css::uno::RuntimeException("this cannot happen");
}
}
diff --git a/configmgr/source/valueparser.cxx b/configmgr/source/valueparser.cxx
index 1ed02141c7b1..9c682e4ea38a 100644
--- a/configmgr/source/valueparser.cxx
+++ b/configmgr/source/valueparser.cxx
@@ -170,8 +170,7 @@ template< typename T > css::uno::Any parseSingleValue(
{
T val;
if (!parseValue(text, &val)) {
- throw css::uno::RuntimeException(
- "invalid value", css::uno::Reference< css::uno::XInterface >());
+ throw css::uno::RuntimeException("invalid value");
}
return css::uno::makeAny(val);
}
@@ -194,9 +193,7 @@ template< typename T > css::uno::Any parseListValue(
if (!parseValue(
xmlreader::Span(t.begin, i == -1 ? t.length : i), &val))
{
- throw css::uno::RuntimeException(
- "invalid value",
- css::uno::Reference< css::uno::XInterface >());
+ throw css::uno::RuntimeException("invalid value");
}
seq.push_back(val);
if (i < 0) {
@@ -214,9 +211,7 @@ css::uno::Any parseValue(
{
switch (type) {
case TYPE_ANY:
- throw css::uno::RuntimeException(
- "invalid value of type any",
- css::uno::Reference< css::uno::XInterface >());
+ throw css::uno::RuntimeException("invalid value of type any");
case TYPE_BOOLEAN:
return parseSingleValue< sal_Bool >(text);
case TYPE_SHORT:
@@ -248,9 +243,7 @@ css::uno::Any parseValue(
separator, text);
default:
assert(false);
- throw css::uno::RuntimeException(
- "this cannot happen",
- css::uno::Reference< css::uno::XInterface >());
+ throw css::uno::RuntimeException("this cannot happen");
}
}
@@ -332,8 +325,7 @@ bool ValueParser::startElement(
pad_.add(RTL_CONSTASCII_STRINGPARAM("\xEF\xBF\xBF"));
} else {
throw css::uno::RuntimeException(
- "bad unicode scalar attribute in " + reader.getUrl(),
- css::uno::Reference< css::uno::XInterface >());
+ "bad unicode scalar attribute in " + reader.getUrl());
}
state_ = State(state_ + 1);
return true;
@@ -343,8 +335,7 @@ bool ValueParser::startElement(
break;
}
throw css::uno::RuntimeException(
- "bad member <" + name.convertFromUtf8() + "> in " + reader.getUrl(),
- css::uno::Reference< css::uno::XInterface >());
+ "bad member <" + name.convertFromUtf8() + "> in " + reader.getUrl());
}
bool ValueParser::endElement() {
diff --git a/configmgr/source/winreg.cxx b/configmgr/source/winreg.cxx
index a47fe25b8f16..235dda0bd0a4 100644
--- a/configmgr/source/winreg.cxx
+++ b/configmgr/source/winreg.cxx
@@ -212,8 +212,7 @@ bool dumpWindowsRegistry(OUString* pFileURL)
return false;
default:
throw css::uno::RuntimeException(
- "cannot create temporary file",
- css::uno::Reference< css::uno::XInterface >());
+ "cannot create temporary file");
}
writeData(
aFileHandle,
diff --git a/configmgr/source/writemodfile.cxx b/configmgr/source/writemodfile.cxx
index b3d7b878a536..9bcdd21c94fe 100644
--- a/configmgr/source/writemodfile.cxx
+++ b/configmgr/source/writemodfile.cxx
@@ -69,8 +69,7 @@ OString convertToUtf8(
RTL_UNICODETOTEXT_FLAGS_INVALID_ERROR)))
{
throw css::uno::RuntimeException(
- "cannot convert to UTF-8",
- css::uno::Reference< css::uno::XInterface >());
+ "cannot convert to UTF-8");
}
return s;
}
@@ -110,7 +109,7 @@ void writeData_(oslFileHandle handle, char const * begin, sal_Int32 length) {
n != static_cast< sal_uInt32 >(length))
{
throw css::uno::RuntimeException(
- "write failure", css::uno::Reference< css::uno::XInterface >());
+ "write failure");
}
}
@@ -537,8 +536,7 @@ void writeModFile(
return;
default:
throw css::uno::RuntimeException(
- "cannot create directory " + dir,
- css::uno::Reference< css::uno::XInterface >());
+ "cannot create directory " + dir);
}
TempFile tmp;
switch (osl::FileBase::createTempFile(&dir, &tmp.handle, &tmp.url)) {
@@ -552,8 +550,7 @@ void writeModFile(
return;
default:
throw css::uno::RuntimeException(
- "cannot create temporary file in " + dir,
- css::uno::Reference< css::uno::XInterface >());
+ "cannot create temporary file in " + dir);
}
writeData_(
tmp.handle,
@@ -579,13 +576,11 @@ void writeModFile(
tmp.closed = true;
if (e != osl_File_E_None) {
throw css::uno::RuntimeException(
- "cannot close " + tmp.url,
- css::uno::Reference< css::uno::XInterface >());
+ "cannot close " + tmp.url);
}
if (osl::File::move(tmp.url, url) != osl::FileBase::E_None) {
throw css::uno::RuntimeException(
- "cannot move " + tmp.url,
- css::uno::Reference< css::uno::XInterface >());
+ "cannot move " + tmp.url);
}
tmp.handle = 0;
}
diff --git a/configmgr/source/xcdparser.cxx b/configmgr/source/xcdparser.cxx
index 27a813fc862d..6b9382d3a870 100644
--- a/configmgr/source/xcdparser.cxx
+++ b/configmgr/source/xcdparser.cxx
@@ -96,14 +96,12 @@ bool XcdParser::startElement(
}
if (!attrFile.is()) {
throw css::uno::RuntimeException(
- "no dependency file attribute in " + reader.getUrl(),
- css::uno::Reference< css::uno::XInterface >());
+ "no dependency file attribute in " + reader.getUrl());
}
dependencyFile_ = attrFile.convertFromUtf8();
if (dependencyFile_.isEmpty()) {
throw css::uno::RuntimeException(
- "bad dependency file attribute in " + reader.getUrl(),
- css::uno::Reference< css::uno::XInterface >());
+ "bad dependency file attribute in " + reader.getUrl());
}
}
if ((processedDependencies_.find(dependencyFile_) ==
@@ -143,8 +141,7 @@ bool XcdParser::startElement(
break;
}
throw css::uno::RuntimeException(
- "bad member <" + name.convertFromUtf8() + "> in " + reader.getUrl(),
- css::uno::Reference< css::uno::XInterface >());
+ "bad member <" + name.convertFromUtf8() + "> in " + reader.getUrl());
}
void XcdParser::endElement(xmlreader::XmlReader const & reader) {
diff --git a/configmgr/source/xcsparser.cxx b/configmgr/source/xcsparser.cxx
index a550240ee3d3..dd51807b0c70 100644
--- a/configmgr/source/xcsparser.cxx
+++ b/configmgr/source/xcsparser.cxx
@@ -252,8 +252,7 @@ bool XcsParser::startElement(
}
}
throw css::uno::RuntimeException(
- "bad member <" + name.convertFromUtf8() + "> in " + reader.getUrl(),
- css::uno::Reference< css::uno::XInterface >());
+ "bad member <" + name.convertFromUtf8() + "> in " + reader.getUrl());
}
void XcsParser::endElement(xmlreader::XmlReader const & reader) {
@@ -295,16 +294,14 @@ void XcsParser::endElement(xmlreader::XmlReader const & reader) {
default:
assert(false);
throw css::uno::RuntimeException(
- "this cannot happen",
- css::uno::Reference< css::uno::XInterface >());
+ "this cannot happen");
}
} else {
if (!elements_.top().node->getMembers().insert(
NodeMap::value_type(top.name, top.node)).second)
{
throw css::uno::RuntimeException(
- "duplicate " + top.name + " in " + reader.getUrl(),
- css::uno::Reference< css::uno::XInterface >());
+ "duplicate " + top.name + " in " + reader.getUrl());
}
}
}
@@ -320,8 +317,7 @@ void XcsParser::endElement(xmlreader::XmlReader const & reader) {
break;
case STATE_TEMPLATES_DONE:
throw css::uno::RuntimeException(
- "no component element in " + reader.getUrl(),
- css::uno::Reference< css::uno::XInterface >());
+ "no component element in " + reader.getUrl());
case STATE_COMPONENT_DONE:
break;
default:
@@ -350,9 +346,8 @@ void XcsParser::handleComponentSchema(xmlreader::XmlReader & reader) {
{
if (hasPackage) {
throw css::uno::RuntimeException(
- ("multiple component-schema package attributes in " +
- reader.getUrl()),
- css::uno::Reference< css::uno::XInterface >());
+ "multiple component-schema package attributes in " +
+ reader.getUrl());
}
hasPackage = true;
xmlreader::Span s(reader.getAttributeValue(false));
@@ -362,9 +357,8 @@ void XcsParser::handleComponentSchema(xmlreader::XmlReader & reader) {
{
if (hasName) {
throw css::uno::RuntimeException(
- ("multiple component-schema name attributes in " +
- reader.getUrl()),
- css::uno::Reference< css::uno::XInterface >());
+ "multiple component-schema name attributes in " +
+ reader.getUrl());
}
hasName = true;
xmlreader::Span s(reader.getAttributeValue(false));
@@ -373,13 +367,11 @@ void XcsParser::handleComponentSchema(xmlreader::XmlReader & reader) {
}
if (!hasPackage) {
throw css::uno::RuntimeException(
- "no component-schema package attribute in " + reader.getUrl(),
- css::uno::Reference< css::uno::XInterface >());
+ "no component-schema package attribute in " + reader.getUrl());
}
if (!hasName) {
throw css::uno::RuntimeException(
- "no component-schema name attribute in " + reader.getUrl(),
- css::uno::Reference< css::uno::XInterface >());
+ "no component-schema name attribute in " + reader.getUrl());
}
componentName_ = xmlreader::Span(buf.getStr(), buf.getLength()).
convertFromUtf8();
@@ -413,8 +405,7 @@ void XcsParser::handleNodeRef(xmlreader::XmlReader & reader) {
}
if (!hasName) {
throw css::uno::RuntimeException(
- "no node-ref name attribute in " + reader.getUrl(),
- css::uno::Reference< css::uno::XInterface >());
+ "no node-ref name attribute in " + reader.getUrl());
}
rtl::Reference< Node > tmpl(
data_.getTemplate(
@@ -425,8 +416,7 @@ void XcsParser::handleNodeRef(xmlreader::XmlReader & reader) {
//TODO: this can erroneously happen as long as import/uses attributes
// are not correctly processed
throw css::uno::RuntimeException(
- "unknown node-ref " + name + " in " + reader.getUrl(),
- css::uno::Reference< css::uno::XInterface >());
+ "unknown node-ref " + name + " in " + reader.getUrl());
}
rtl::Reference< Node > node(tmpl->clone(false));
node->setLayer(valueParser_.getLayer());
@@ -465,13 +455,11 @@ void XcsParser::handleProp(xmlreader::XmlReader & reader) {
}
if (!hasName) {
throw css::uno::RuntimeException(
- "no prop name attribute in " + reader.getUrl(),
- css::uno::Reference< css::uno::XInterface >());
+ "no prop name attribute in " + reader.getUrl());
}
if (valueParser_.type_ == TYPE_ERROR) {
throw css::uno::RuntimeException(
- "no prop type attribute in " + reader.getUrl(),
- css::uno::Reference< css::uno::XInterface >());
+ "no prop type attribute in " + reader.getUrl());
}
elements_.push(
Element(
@@ -502,8 +490,7 @@ void XcsParser::handlePropValue(
attrSeparator = reader.getAttributeValue(false);
if (attrSeparator.length == 0) {
throw css::uno::RuntimeException(
- "bad oor:separator attribute in " + reader.getUrl(),
- css::uno::Reference< css::uno::XInterface >());
+ "bad oor:separator attribute in " + reader.getUrl());
}
}
}
@@ -533,8 +520,7 @@ void XcsParser::handleGroup(xmlreader::XmlReader & reader, bool isTemplate) {
}
if (!hasName) {
throw css::uno::RuntimeException(
- "no group name attribute in " + reader.getUrl(),
- css::uno::Reference< css::uno::XInterface >());
+ "no group name attribute in " + reader.getUrl());
}
if (isTemplate) {
name = Data::fullTemplateName(componentName_, name);
@@ -575,8 +561,7 @@ void XcsParser::handleSet(xmlreader::XmlReader & reader, bool isTemplate) {
}
if (!hasName) {
throw css::uno::RuntimeException(
- "no set name attribute in " + reader.getUrl(),
- css::uno::Reference< css::uno::XInterface >());
+ "no set name attribute in " + reader.getUrl());
}
if (isTemplate) {
name = Data::fullTemplateName(componentName_, name);
diff --git a/configmgr/source/xcuparser.cxx b/configmgr/source/xcuparser.cxx
index 9499f9764425..8e99a5b6f5fe 100644
--- a/configmgr/source/xcuparser.cxx
+++ b/configmgr/source/xcuparser.cxx
@@ -88,9 +88,8 @@ bool XcuParser::startElement(
state_.push(State::Modify(rtl::Reference< Node >()));
} else {
throw css::uno::RuntimeException(
- ("bad root element <" + name.convertFromUtf8() + "> in " +
- reader.getUrl()),
- css::uno::Reference< css::uno::XInterface >());
+ "bad root element <" + name.convertFromUtf8() + "> in " +
+ reader.getUrl());
}
} else if (state_.top().ignore) {
state_.push(State::Ignore(false));
@@ -100,9 +99,8 @@ bool XcuParser::startElement(
handleItem(reader);
} else {
throw css::uno::RuntimeException(
- ("bad items node member <" + name.convertFromUtf8() + "> in " +
- reader.getUrl()),
- css::uno::Reference< css::uno::XInterface >());
+ "bad items node member <" + name.convertFromUtf8() + "> in " +
+ reader.getUrl());
}
} else {
switch (state_.top().node->kind()) {
@@ -115,9 +113,8 @@ bool XcuParser::startElement(
static_cast< PropertyNode * >(state_.top().node.get()));
} else {
throw css::uno::RuntimeException(
- ("bad property node member <" + name.convertFromUtf8() +
- "> in " + reader.getUrl()),
- css::uno::Reference< css::uno::XInterface >());
+ "bad property node member <" + name.convertFromUtf8() +
+ "> in " + reader.getUrl());
}
break;
case Node::KIND_LOCALIZED_PROPERTY:
@@ -130,16 +127,14 @@ bool XcuParser::startElement(
state_.top().node.get()));
} else {
throw css::uno::RuntimeException(
- ("bad localized property node member <" +
- name.convertFromUtf8() + "> in " + reader.getUrl()),
- css::uno::Reference< css::uno::XInterface >());
+ "bad localized property node member <" +
+ name.convertFromUtf8() + "> in " + reader.getUrl());
}
break;
case Node::KIND_LOCALIZED_VALUE:
throw css::uno::RuntimeException(
- ("bad member <" + name.convertFromUtf8() + "> in " +
- reader.getUrl()),
- css::uno::Reference< css::uno::XInterface >());
+ "bad member <" + name.convertFromUtf8() + "> in " +
+ reader.getUrl());
case Node::KIND_GROUP:
if (nsId == xmlreader::XmlReader::NAMESPACE_NONE &&
name.equals("prop"))
@@ -153,9 +148,8 @@ bool XcuParser::startElement(
handleGroupNode(reader, state_.top().node);
} else {
throw css::uno::RuntimeException(
- ("bad group node member <" + name.convertFromUtf8() +
- "> in " + reader.getUrl()),
- css::uno::Reference< css::uno::XInterface >());
+ "bad group node member <" + name.convertFromUtf8() +
+ "> in " + reader.getUrl());
}
break;
case Node::KIND_SET:
@@ -174,9 +168,8 @@ bool XcuParser::startElement(
state_.push(State::Ignore(true));
} else {
throw css::uno::RuntimeException(
- ("bad set node member <" + name.convertFromUtf8() +
- "> in " + reader.getUrl()),
- css::uno::Reference< css::uno::XInterface >());
+ "bad set node member <" + name.convertFromUtf8() +
+ "> in " + reader.getUrl());
}
break;
case Node::KIND_ROOT:
@@ -231,8 +224,7 @@ XcuParser::Operation XcuParser::parseOperation(xmlreader::Span const & text) {
return OPERATION_REMOVE;
}
throw css::uno::RuntimeException(
- "invalid op " + text.convertFromUtf8(),
- css::uno::Reference< css::uno::XInterface >());
+ "invalid op " + text.convertFromUtf8());
}
void XcuParser::handleComponentData(xmlreader::XmlReader & reader) {
@@ -252,9 +244,8 @@ void XcuParser::handleComponentData(xmlreader::XmlReader & reader) {
{
if (hasPackage) {
throw css::uno::RuntimeException(
- ("multiple component-update package attributes in " +
- reader.getUrl()),
- css::uno::Reference< css::uno::XInterface >());
+ "multiple component-update package attributes in " +
+ reader.getUrl());
}
hasPackage = true;
xmlreader::Span s(reader.getAttributeValue(false));
@@ -264,9 +255,8 @@ void XcuParser::handleComponentData(xmlreader::XmlReader & reader) {
{
if (hasName) {
throw css::uno::RuntimeException(
- ("multiple component-update name attributes in " +
- reader.getUrl()),
- css::uno::Reference< css::uno::XInterface >());
+ "multiple component-update name attributes in " +
+ reader.getUrl());
}
hasName = true;
xmlreader::Span s(reader.getAttributeValue(false));
@@ -283,13 +273,11 @@ void XcuParser::handleComponentData(xmlreader::XmlReader & reader) {
}
if (!hasPackage) {
throw css::uno::RuntimeException(
- "no component-data package attribute in " + reader.getUrl(),
- css::uno::Reference< css::uno::XInterface >());
+ "no component-data package attribute in " + reader.getUrl());
}
if (!hasName) {
throw css::uno::RuntimeException(
- "no component-data name attribute in " + reader.getUrl(),
- css::uno::Reference< css::uno::XInterface >());
+ "no component-data name attribute in " + reader.getUrl());
}
componentName_ = xmlreader::Span(buf.getStr(), buf.getLength()).
convertFromUtf8();
@@ -319,8 +307,7 @@ void XcuParser::handleComponentData(xmlreader::XmlReader & reader) {
break;
default:
throw css::uno::RuntimeException(
- "invalid operation on root node in " + reader.getUrl(),
- css::uno::Reference< css::uno::XInterface >());
+ "invalid operation on root node in " + reader.getUrl());
}
int finalizedLayer = std::min(
finalized ? valueParser_.getLayer() : Data::NO_LAYER,
@@ -347,8 +334,7 @@ void XcuParser::handleItem(xmlreader::XmlReader & reader) {
}
if (!attrPath.is()) {
throw css::uno::RuntimeException(
- "missing path attribute in " + reader.getUrl(),
- css::uno::Reference< css::uno::XInterface >());
+ "missing path attribute in " + reader.getUrl());
}
OUString path(attrPath.convertFromUtf8());
int finalizedLayer;
@@ -417,8 +403,7 @@ void XcuParser::handlePropValue(
reader, reader.getAttributeValue(true));
if (valueParser_.type_ != TYPE_ANY && type != valueParser_.type_) {
throw css::uno::RuntimeException(
- "invalid value type in " + reader.getUrl(),
- css::uno::Reference< css::uno::XInterface >());
+ "invalid value type in " + reader.getUrl());
}
valueParser_.type_ = type;
} else if (attrNsId == ParseManager::NAMESPACE_OOR &&
@@ -427,8 +412,7 @@ void XcuParser::handlePropValue(
xmlreader::Span s(reader.getAttributeValue(false));
if (s.length == 0) {
throw css::uno::RuntimeException(
- "bad oor:separator attribute in " + reader.getUrl(),
- css::uno::Reference< css::uno::XInterface >());
+ "bad oor:separator attribute in " + reader.getUrl());
}
separator = OString(s.begin, s.length);
} else if (attrNsId == ParseManager::NAMESPACE_OOR &&
@@ -437,22 +421,19 @@ void XcuParser::handlePropValue(
external = reader.getAttributeValue(true).convertFromUtf8();
if (external.isEmpty()) {
throw css::uno::RuntimeException(
- "bad oor:external attribute value in " + reader.getUrl(),
- css::uno::Reference< css::uno::XInterface >());
+ "bad oor:external attribute value in " + reader.getUrl());
}
}
}
if (nil) {
if (!prop->isNillable()) {
throw css::uno::RuntimeException(
- "xsi:nil attribute for non-nillable prop in " + reader.getUrl(),
- css::uno::Reference< css::uno::XInterface >());
+ "xsi:nil attribute for non-nillable prop in " + reader.getUrl());
}
if (!external.isEmpty()) {
throw css::uno::RuntimeException(
- ("xsi:nil and oor:external attributes for prop in " +
- reader.getUrl()),
- css::uno::Reference< css::uno::XInterface >());
+ "xsi:nil and oor:external attributes for prop in " +
+ reader.getUrl());
}
prop->setValue(valueParser_.getLayer(), css::uno::Any());
state_.push(State::Ignore(false));
@@ -493,8 +474,7 @@ void XcuParser::handleLocpropValue(
reader, reader.getAttributeValue(true));
if (valueParser_.type_ != TYPE_ANY && type != valueParser_.type_) {
throw css::uno::RuntimeException(
- "invalid value type in " + reader.getUrl(),
- css::uno::Reference< css::uno::XInterface >());
+ "invalid value type in " + reader.getUrl());
}
valueParser_.type_ = type;
} else if (attrNsId == ParseManager::NAMESPACE_OOR &&
@@ -503,8 +483,7 @@ void XcuParser::handleLocpropValue(
xmlreader::Span s(reader.getAttributeValue(false));
if (s.length == 0) {
throw css::uno::RuntimeException(
- "bad oor:separator attribute in " + reader.getUrl(),
- css::uno::Reference< css::uno::XInterface >());
+ "bad oor:separator attribute in " + reader.getUrl());
}
separator = OString(s.begin, s.length);
} else if (attrNsId == ParseManager::NAMESPACE_OOR &&
@@ -530,8 +509,7 @@ void XcuParser::handleLocpropValue(
}
if (nil && !locprop->isNillable()) {
throw css::uno::RuntimeException(
- "xsi:nil attribute for non-nillable prop in " + reader.getUrl(),
- css::uno::Reference< css::uno::XInterface >());
+ "xsi:nil attribute for non-nillable prop in " + reader.getUrl());
}
switch (op) {
case OPERATION_FUSE:
@@ -571,8 +549,7 @@ void XcuParser::handleLocpropValue(
break;
default:
throw css::uno::RuntimeException(
- "bad op attribute for value element in " + reader.getUrl(),
- css::uno::Reference< css::uno::XInterface >());
+ "bad op attribute for value element in " + reader.getUrl());
}
}
@@ -609,8 +586,7 @@ void XcuParser::handleGroupProp(
}
if (!hasName) {
throw css::uno::RuntimeException(
- "no prop name attribute in " + reader.getUrl(),
- css::uno::Reference< css::uno::XInterface >());
+ "no prop name attribute in " + reader.getUrl());
}
if (trackPath_) {
path_.push_back(name);
@@ -640,8 +616,7 @@ void XcuParser::handleGroupProp(
break;
default:
throw css::uno::RuntimeException(
- "inappropriate prop " + name + " in " + reader.getUrl(),
- css::uno::Reference< css::uno::XInterface >());
+ "inappropriate prop " + name + " in " + reader.getUrl());
}
}
}
@@ -656,9 +631,8 @@ void XcuParser::handleUnknownGroupProp(
if (group->isExtensible()) {
if (type == TYPE_ERROR) {
throw css::uno::RuntimeException(
- ("missing type attribute for prop " + name + " in " +
- reader.getUrl()),
- css::uno::Reference< css::uno::XInterface >());
+ "missing type attribute for prop " + name + " in " +
+ reader.getUrl());
}
valueParser_.type_ = type;
rtl::Reference< Node > prop(
@@ -706,8 +680,7 @@ void XcuParser::handlePlainGroupProp(
type != property->getStaticType())
{
throw css::uno::RuntimeException(
- "invalid type for prop " + name + " in " + reader.getUrl(),
- css::uno::Reference< css::uno::XInterface >());
+ "invalid type for prop " + name + " in " + reader.getUrl());
}
valueParser_.type_ = type == TYPE_ERROR ? property->getStaticType() : type;
switch (operation) {
@@ -720,9 +693,8 @@ void XcuParser::handlePlainGroupProp(
case OPERATION_REMOVE:
if (!property->isExtension()) {
throw css::uno::RuntimeException(
- ("invalid remove of non-extension prop " + name + " in " +
- reader.getUrl()),
- css::uno::Reference< css::uno::XInterface >());
+ "invalid remove of non-extension prop " + name + " in " +
+ reader.getUrl());
}
group->getMembers().erase(propertyIndex);
state_.push(State::Ignore(true));
@@ -751,8 +723,7 @@ void XcuParser::handleLocalizedGroupProp(
type != property->getStaticType())
{
throw css::uno::RuntimeException(
- "invalid type for prop " + name + " in " + reader.getUrl(),
- css::uno::Reference< css::uno::XInterface >());
+ "invalid type for prop " + name + " in " + reader.getUrl());
}
valueParser_.type_ = type == TYPE_ERROR ? property->getStaticType() : type;
switch (operation) {
@@ -773,9 +744,8 @@ void XcuParser::handleLocalizedGroupProp(
break;
case OPERATION_REMOVE:
throw css::uno::RuntimeException(
- ("invalid remove of non-extension prop " + name + " in " +
- reader.getUrl()),
- css::uno::Reference< css::uno::XInterface >());
+ "invalid remove of non-extension prop " + name + " in " +
+ reader.getUrl());
}
}
@@ -807,8 +777,7 @@ void XcuParser::handleGroupNode(
}
if (!hasName) {
throw css::uno::RuntimeException(
- "no node name attribute in " + reader.getUrl(),
- css::uno::Reference< css::uno::XInterface >());
+ "no node name attribute in " + reader.getUrl());
}
if (trackPath_) {
path_.push_back(name);
@@ -830,14 +799,12 @@ void XcuParser::handleGroupNode(
Node::Kind kind = child->kind();
if (kind != Node::KIND_GROUP && kind != Node::KIND_SET) {
throw css::uno::RuntimeException(
- ("bad <node> \"" + name + "\" of non group/set kind in " +
- reader.getUrl()),
- css::uno::Reference< css::uno::XInterface >());
+ "bad <node> \"" + name + "\" of non group/set kind in " +
+ reader.getUrl());
}
if (op != OPERATION_MODIFY && op != OPERATION_FUSE) {
throw css::uno::RuntimeException(
- "invalid operation on group node in " + reader.getUrl(),
- css::uno::Reference< css::uno::XInterface >());
+ "invalid operation on group node in " + reader.getUrl());
}
int finalizedLayer = std::min(
finalized ? valueParser_.getLayer() : Data::NO_LAYER,
@@ -893,8 +860,7 @@ void XcuParser::handleSetNode(xmlreader::XmlReader & reader, SetNode * set) {
}
if (!hasName) {
throw css::uno::RuntimeException(
- "no node name attribute in " + reader.getUrl(),
- css::uno::Reference< css::uno::XInterface >());
+ "no node name attribute in " + reader.getUrl());
}
if (trackPath_) {
path_.push_back(name);
@@ -909,17 +875,15 @@ void XcuParser::handleSetNode(xmlreader::XmlReader & reader, SetNode * set) {
component, hasNodeType, nodeType, &set->getDefaultTemplateName()));
if (!set->isValidTemplate(templateName)) {
throw css::uno::RuntimeException(
- ("set member node " + name + " references invalid template " +
- templateName + " in " + reader.getUrl()),
- css::uno::Reference< css::uno::XInterface >());
+ "set member node " + name + " references invalid template " +
+ templateName + " in " + reader.getUrl());
}
rtl::Reference< Node > tmpl(
data_.getTemplate(valueParser_.getLayer(), templateName));
if (!tmpl.is()) {
throw css::uno::RuntimeException(
- ("set member node " + name + " references undefined template " +
- templateName + " in " + reader.getUrl()),
- css::uno::Reference< css::uno::XInterface >());
+ "set member node " + name + " references undefined template " +
+ templateName + " in " + reader.getUrl());
}
int finalizedLayer = finalized ? valueParser_.getLayer() : Data::NO_LAYER;
int mandatoryLayer = mandatory ? valueParser_.getLayer() : Data::NO_LAYER;
diff --git a/configmgr/source/xmldata.cxx b/configmgr/source/xmldata.cxx
index 029cc2312063..2697b4b94394 100644
--- a/configmgr/source/xmldata.cxx
+++ b/configmgr/source/xmldata.cxx
@@ -143,8 +143,7 @@ Type parseType(
}
}
throw css::uno::RuntimeException(
- "invalid type " + text.convertFromUtf8(),
- css::uno::Reference< css::uno::XInterface >());
+ "invalid type " + text.convertFromUtf8());
}
bool parseBoolean(xmlreader::Span const & text) {
@@ -156,8 +155,7 @@ bool parseBoolean(xmlreader::Span const & text) {
return false;
}
throw css::uno::RuntimeException(
- "invalid boolean " + text.convertFromUtf8(),
- css::uno::Reference< css::uno::XInterface >());
+ "invalid boolean " + text.convertFromUtf8());
}
OUString parseTemplateReference(
@@ -169,8 +167,7 @@ OUString parseTemplateReference(
return *defaultTemplateName;
}
throw css::uno::RuntimeException(
- "missing node-type attribute",
- css::uno::Reference< css::uno::XInterface >());
+ "missing node-type attribute");
}
return Data::fullTemplateName(component, nodeType);
}
diff --git a/connectivity/source/drivers/postgresql/pq_connection.cxx b/connectivity/source/drivers/postgresql/pq_connection.cxx
index f222aa7822f8..8396cfc04544 100644
--- a/connectivity/source/drivers/postgresql/pq_connection.cxx
+++ b/connectivity/source/drivers/postgresql/pq_connection.cxx
@@ -508,8 +508,7 @@ void Connection::initialize( const Sequence< Any >& aArguments )
if( ! tc.is() )
{
throw RuntimeException(
- OUString("pq_driver: Couldn't instantiate converter service" ),
- Reference< XInterface > () );
+ "pq_driver: Couldn't instantiate converter service" );
}
if( aArguments.getLength() != 2 )
{
@@ -583,8 +582,7 @@ void Connection::initialize( const Sequence< Any >& aArguments )
m_settings.pConnection = PQconnectdbParams( keywords.c_array(), values.c_array(), 0 );
}
if( ! m_settings.pConnection )
- throw RuntimeException("pq_driver: out of memory",
- Reference< XInterface > () );
+ throw RuntimeException("pq_driver: out of memory" );
if( PQstatus( m_settings.pConnection ) == CONNECTION_BAD )
{
OUStringBuffer buf( 128 );
diff --git a/connectivity/source/drivers/postgresql/pq_xcolumns.cxx b/connectivity/source/drivers/postgresql/pq_xcolumns.cxx
index 11762484efcd..e1dd78a18d93 100644
--- a/connectivity/source/drivers/postgresql/pq_xcolumns.cxx
+++ b/connectivity/source/drivers/postgresql/pq_xcolumns.cxx
@@ -368,7 +368,7 @@ void alterColumnByDescriptor(
// buf.append( extractStringProperty( past, st.TABLE_NAME ) );
// buf.append( " to table " );
// buf.append( extractStringProperty( past, st.TABLE_NAME ) );
-// throw SQLException( buf.makeStringAndClear(), Reference< XInterface > () );
+// throw SQLException( buf.makeStringAndClear() );
// }
// OUString tableName = extractStringProperty( past, st.TABLE_NAME );
@@ -396,8 +396,7 @@ void alterColumnByDescriptor(
if( pastTypeName != futureTypeName )
{
throw RuntimeException(
- "Can't modify column types, drop the column and create a new one",
- Reference< XInterface > () );
+ "Can't modify column types, drop the column and create a new one" );
}
if( pastColumnName != futureColumnName )
diff --git a/connectivity/source/drivers/postgresql/pq_xkeycolumns.cxx b/connectivity/source/drivers/postgresql/pq_xkeycolumns.cxx
index 0fc25059e810..ae99c811b263 100644
--- a/connectivity/source/drivers/postgresql/pq_xkeycolumns.cxx
+++ b/connectivity/source/drivers/postgresql/pq_xkeycolumns.cxx
@@ -189,7 +189,7 @@ void KeyColumns::refresh()
// // buf.append( extractStringProperty( past, st.TABLE_NAME ) );
// // buf.append( " to table " );
// // buf.append( extractStringProperty( past, st.TABLE_NAME ) );
-// // throw SQLException( buf.makeStringAndClear(), Reference< XInterface > () );
+// // throw SQLException( buf.makeStringAndClear() );
// // }
// // OUString tableName = extractStringProperty( past, st.TABLE_NAME );
@@ -217,8 +217,7 @@ void KeyColumns::refresh()
// if( pastTypeName != futureTypeName )
// {
// throw RuntimeException(
-// "Can't modify column types, drop the column and create a new one",
-// Reference< XInterface > () );
+// "Can't modify column types, drop the column and create a new one" );
// }
// if( pastColumnName != futureColumnName )
diff --git a/cppu/source/threadpool/thread.cxx b/cppu/source/threadpool/thread.cxx
index f5ce3b81149b..4924a45e3a92 100644
--- a/cppu/source/threadpool/thread.cxx
+++ b/cppu/source/threadpool/thread.cxx
@@ -55,10 +55,8 @@ namespace cppu_threadpool {
if( m_disposed )
{
throw css::lang::DisposedException(
- rtl::OUString(
"cppu_threadpool::ORequestThread created after"
- " cppu_threadpool::ThreadAdmin has been disposed"),
- css::uno::Reference< css::uno::XInterface >());
+ " cppu_threadpool::ThreadAdmin has been disposed");
}
m_lst.push_back( p );
}
diff --git a/cppuhelper/source/access_control.cxx b/cppuhelper/source/access_control.cxx
index fcac34619aae..8be3101ff3e5 100644
--- a/cppuhelper/source/access_control.cxx
+++ b/cppuhelper/source/access_control.cxx
@@ -47,8 +47,7 @@ AccessControl::AccessControl( Reference< XComponentContext > const & xContext )
{
if (! (xContext->getValueByName( str_ac_singleton() ) >>= m_xController))
{
- throw SecurityException(
- "no access controller!", Reference< XInterface >() );
+ throw SecurityException( "no access controller!" );
}
}
@@ -59,8 +58,7 @@ AccessControl::AccessControl(
{
if (! m_xController.is())
{
- throw SecurityException(
- "no access controller!", Reference< XInterface >() );
+ throw SecurityException( "no access controller!" );
}
}
@@ -70,8 +68,7 @@ AccessControl::AccessControl( AccessControl const & ac )
{
if (! m_xController.is())
{
- throw SecurityException(
- "no access controller!", Reference< XInterface >() );
+ throw SecurityException( "no access controller!" );
}
}
diff --git a/cppuhelper/source/component.cxx b/cppuhelper/source/component.cxx
index 8997eecdda5a..b120fc6b4ed4 100644
--- a/cppuhelper/source/component.cxx
+++ b/cppuhelper/source/component.cxx
@@ -197,9 +197,8 @@ void OComponentHelper::dispose()
catch (Exception & exc)
{
throw RuntimeException(
- OUString(
- "unexpected UNO exception caught: ") +
- exc.Message, Reference< XInterface >() );
+ OUString("unexpected UNO exception caught: ") +
+ exc.Message );
}
}
else
diff --git a/cppuhelper/source/defaultbootstrap.cxx b/cppuhelper/source/defaultbootstrap.cxx
index ff8338964132..98d36c478989 100644
--- a/cppuhelper/source/defaultbootstrap.cxx
+++ b/cppuhelper/source/defaultbootstrap.cxx
@@ -37,8 +37,7 @@ rtl::OUString getBootstrapVariable(
rtl::OUString v;
if (!bootstrap.getFrom(name, v)) {
throw css::uno::DeploymentException(
- "Cannot obtain " + name + " from uno ini",
- css::uno::Reference< css::uno::XInterface >());
+ "Cannot obtain " + name + " from uno ini");
}
return v;
}
@@ -52,8 +51,7 @@ cppu::defaultBootstrap_InitialComponentContext(rtl::OUString const & iniUri)
rtl::Bootstrap bs(iniUri);
if (bs.getHandle() == 0) {
throw css::uno::DeploymentException(
- "Cannot open uno ini " + iniUri,
- css::uno::Reference< css::uno::XInterface >());
+ "Cannot open uno ini " + iniUri);
}
rtl::Reference< cppuhelper::ServiceManager > smgr(
new cppuhelper::ServiceManager);
diff --git a/cppuhelper/source/exc_thrower.cxx b/cppuhelper/source/exc_thrower.cxx
index ab7cc8e48c7c..c307cf378767 100644
--- a/cppuhelper/source/exc_thrower.cxx
+++ b/cppuhelper/source/exc_thrower.cxx
@@ -120,8 +120,7 @@ static void SAL_CALL ExceptionThrower_dispatch(
default:
{
OSL_ASSERT( false );
- RuntimeException exc(
- "not implemented!", Reference< XInterface >() );
+ RuntimeException exc( "not implemented!" );
uno_type_any_construct(
*ppException, &exc, ::getCppuType( &exc ).getTypeLibType(), 0 );
break;
@@ -190,16 +189,14 @@ void SAL_CALL throwException( Any const & exc ) SAL_THROW( (Exception) )
{
throw RuntimeException(
"no UNO exception given "
- "(must be derived from com::sun::star::uno::Exception)!",
- Reference< XInterface >() );
+ "(must be derived from com::sun::star::uno::Exception)!" );
}
Mapping uno2cpp(Environment(UNO_LB_UNO), Environment::getCurrent());
if (! uno2cpp.is())
{
throw RuntimeException(
- "cannot get binary UNO to C++ mapping!",
- Reference< XInterface >() );
+ "cannot get binary UNO to C++ mapping!" );
}
Reference< XExceptionThrower > xThrower;
@@ -218,15 +215,13 @@ Any SAL_CALL getCaughtException()
if (! cpp2uno.is())
{
throw RuntimeException(
- "cannot get C++ to binary UNO mapping!",
- Reference< XInterface >() );
+ "cannot get C++ to binary UNO mapping!" );
}
Mapping uno2cpp(Environment(UNO_LB_UNO), Environment::getCurrent());
if (! uno2cpp.is())
{
throw RuntimeException(
- "cannot get binary UNO to C++ mapping!",
- Reference< XInterface >() );
+ "cannot get binary UNO to C++ mapping!" );
}
typelib_TypeDescription * pTD = 0;
@@ -254,9 +249,7 @@ Any SAL_CALL getCaughtException()
if (exc == 0)
{
- throw RuntimeException(
- "rethrowing C++ exception failed!",
- Reference< XInterface >() );
+ throw RuntimeException( "rethrowing C++ exception failed!" );
}
Any ret;
diff --git a/cppuhelper/source/implbase.cxx b/cppuhelper/source/implbase.cxx
index 322a25506f03..7d5f3ec48456 100644
--- a/cppuhelper/source/implbase.cxx
+++ b/cppuhelper/source/implbase.cxx
@@ -285,7 +285,7 @@ void WeakComponentImplHelperBase::dispose()
throw RuntimeException(
OUString(
"unexpected UNO exception caught: ") +
- exc.Message, Reference< XInterface >() );
+ exc.Message );
}
}
}
@@ -421,7 +421,7 @@ void WeakAggComponentImplHelperBase::dispose()
throw RuntimeException(
OUString(
"unexpected UNO exception caught: ") +
- exc.Message, Reference< XInterface >() );
+ exc.Message );
}
}
}
diff --git a/cppuhelper/source/paths.cxx b/cppuhelper/source/paths.cxx
index 5ff356fa2877..2f021d6ac794 100644
--- a/cppuhelper/source/paths.cxx
+++ b/cppuhelper/source/paths.cxx
@@ -46,8 +46,7 @@ rtl::OUString get_this_libpath() {
sal_Int32 i = uri.lastIndexOf('/');
if (i == -1) {
throw css::uno::DeploymentException(
- "URI " + uri + " is expected to contain a slash",
- css::uno::Reference< css::uno::XInterface >());
+ "URI " + uri + " is expected to contain a slash");
}
uri = uri.copy(0, i);
osl::MutexGuard guard(osl::Mutex::getGlobalMutex());
@@ -100,16 +99,14 @@ bool cppu::nextDirectoryItem(osl::Directory & directory, rtl::OUString * url) {
return false;
default:
throw css::uno::DeploymentException(
- "Cannot iterate directory",
- css::uno::Reference< css::uno::XInterface >());
+ "Cannot iterate directory");
}
osl::FileStatus stat(
osl_FileStatus_Mask_Type | osl_FileStatus_Mask_FileName |
osl_FileStatus_Mask_FileURL);
if (i.getFileStatus(stat) != osl::FileBase::E_None) {
throw css::uno::DeploymentException(
- "Cannot stat in directory",
- css::uno::Reference< css::uno::XInterface >());
+ "Cannot stat in directory");
}
if (stat.getFileType() != osl::FileStatus::Directory) { //TODO: symlinks
// Ignore backup files:
diff --git a/cppuhelper/source/propertysetmixin.cxx b/cppuhelper/source/propertysetmixin.cxx
index 51984dbe0244..cdeaca5bdc13 100644
--- a/cppuhelper/source/propertysetmixin.cxx
+++ b/cppuhelper/source/propertysetmixin.cxx
@@ -231,8 +231,7 @@ void Data::initProperties(
getTypeArguments());
if (args.getLength() != 1) {
throw css::uno::RuntimeException(
- "inconsistent UNO type registry",
- css::uno::Reference< css::uno::XInterface >());
+ "inconsistent UNO type registry");
}
t = args[0];
}
@@ -240,8 +239,7 @@ void Data::initProperties(
= handleNames->size();
if (handles > SAL_MAX_INT32) {
throw css::uno::RuntimeException(
- "interface type has too many attributes",
- css::uno::Reference< css::uno::XInterface >());
+ "interface type has too many attributes");
}
rtl::OUString name(members[i]->getMemberName());
if (!properties.insert(
@@ -258,8 +256,7 @@ void Data::initProperties(
second)
{
throw css::uno::RuntimeException(
- "inconsistent UNO type registry",
- css::uno::Reference< css::uno::XInterface >());
+ "inconsistent UNO type registry");
}
handleNames->push_back(name);
}
@@ -448,9 +445,8 @@ PropertySetMixinImpl::Impl::Impl(
css::uno::UNO_QUERY_THROW);
} catch (css::container::NoSuchElementException & e) {
throw css::uno::RuntimeException(
- ("unexpected com.sun.star.container.NoSuchElementException: "
- + e.Message),
- css::uno::Reference< css::uno::XInterface >());
+ "unexpected com.sun.star.container.NoSuchElementException: "
+ + e.Message);
}
std::vector< rtl::OUString > handleNames;
initProperties(ifc, m_absentOptional, &handleNames);
diff --git a/cppuhelper/source/servicemanager.cxx b/cppuhelper/source/servicemanager.cxx
index 94d2ec5fd529..4aca8d14a2b0 100644
--- a/cppuhelper/source/servicemanager.cxx
+++ b/cppuhelper/source/servicemanager.cxx
@@ -161,15 +161,13 @@ Parser::Parser(
break;
}
throw css::registry::InvalidRegistryException(
- reader_.getUrl() + ": unexpected item in outer level",
- css::uno::Reference< css::uno::XInterface >());
+ reader_.getUrl() + ": unexpected item in outer level");
case STATE_END:
if (res == xmlreader::XmlReader::RESULT_DONE) {
return;
}
throw css::registry::InvalidRegistryException(
- reader_.getUrl() + ": unexpected item in outer level",
- css::uno::Reference< css::uno::XInterface >());
+ reader_.getUrl() + ": unexpected item in outer level");
case STATE_COMPONENTS:
if (res == xmlreader::XmlReader::RESULT_END) {
state = STATE_END;
@@ -183,8 +181,7 @@ Parser::Parser(
break;
}
throw css::registry::InvalidRegistryException(
- reader_.getUrl() + ": unexpected item in <components>",
- css::uno::Reference< css::uno::XInterface >());
+ reader_.getUrl() + ": unexpected item in <components>");
case STATE_COMPONENT:
if (res == xmlreader::XmlReader::RESULT_END) {
state = STATE_COMPONENTS;
@@ -200,8 +197,7 @@ Parser::Parser(
break;
}
throw css::registry::InvalidRegistryException(
- reader_.getUrl() + ": unexpected item in <component>",
- css::uno::Reference< css::uno::XInterface >());
+ reader_.getUrl() + ": unexpected item in <component>");
case STATE_IMPLEMENTATION:
if (res == xmlreader::XmlReader::RESULT_END) {
state = STATE_COMPONENT;
@@ -222,24 +218,21 @@ Parser::Parser(
break;
}
throw css::registry::InvalidRegistryException(
- reader_.getUrl() + ": unexpected item in <implementation>",
- css::uno::Reference< css::uno::XInterface >());
+ reader_.getUrl() + ": unexpected item in <implementation>");
case STATE_SERVICE:
if (res == xmlreader::XmlReader::RESULT_END) {
state = STATE_IMPLEMENTATION;
break;
}
throw css::registry::InvalidRegistryException(
- reader_.getUrl() + ": unexpected item in <service>",
- css::uno::Reference< css::uno::XInterface >());
+ reader_.getUrl() + ": unexpected item in <service>");
case STATE_SINGLETON:
if (res == xmlreader::XmlReader::RESULT_END) {
state = STATE_IMPLEMENTATION;
break;
}
throw css::registry::InvalidRegistryException(
- reader_.getUrl() + ": unexpected item in <service>",
- css::uno::Reference< css::uno::XInterface >());
+ reader_.getUrl() + ": unexpected item in <service>");
}
}
}
@@ -257,90 +250,78 @@ void Parser::handleComponent() {
{
if (!attrLoader_.isEmpty()) {
throw css::registry::InvalidRegistryException(
- (reader_.getUrl()
- + ": <component> has multiple \"loader\" attributes"),
- css::uno::Reference< css::uno::XInterface >());
+ reader_.getUrl()
+ + ": <component> has multiple \"loader\" attributes");
}
attrLoader_ = reader_.getAttributeValue(false).convertFromUtf8();
if (attrLoader_.isEmpty()) {
throw css::registry::InvalidRegistryException(
- (reader_.getUrl()
- + ": <component> has empty \"loader\" attribute"),
- css::uno::Reference< css::uno::XInterface >());
+ reader_.getUrl()
+ + ": <component> has empty \"loader\" attribute");
}
} else if (nsId == xmlreader::XmlReader::NAMESPACE_NONE
&& name.equals(RTL_CONSTASCII_STRINGPARAM("uri")))
{
if (!attrUri_.isEmpty()) {
throw css::registry::InvalidRegistryException(
- (reader_.getUrl()
- + ": <component> has multiple \"uri\" attributes"),
- css::uno::Reference< css::uno::XInterface >());
+ reader_.getUrl()
+ + ": <component> has multiple \"uri\" attributes");
}
attrUri_ = reader_.getAttributeValue(false).convertFromUtf8();
if (attrUri_.isEmpty()) {
throw css::registry::InvalidRegistryException(
- (reader_.getUrl()
- + ": <component> has empty \"uri\" attribute"),
- css::uno::Reference< css::uno::XInterface >());
+ reader_.getUrl()
+ + ": <component> has empty \"uri\" attribute");
}
} else if (nsId == xmlreader::XmlReader::NAMESPACE_NONE
&& name.equals(RTL_CONSTASCII_STRINGPARAM("environment")))
{
if (!attrEnvironment_.isEmpty()) {
throw css::registry::InvalidRegistryException(
- (reader_.getUrl() +
- ": <component> has multiple \"environment\" attributes"),
- css::uno::Reference< css::uno::XInterface >());
+ reader_.getUrl() +
+ ": <component> has multiple \"environment\" attributes");
}
attrEnvironment_ = reader_.getAttributeValue(false)
.convertFromUtf8();
if (attrEnvironment_.isEmpty()) {
throw css::registry::InvalidRegistryException(
- (reader_.getUrl() +
- ": <component> has empty \"environment\" attribute"),
- css::uno::Reference< css::uno::XInterface >());
+ reader_.getUrl() +
+ ": <component> has empty \"environment\" attribute");
}
} else if (nsId == xmlreader::XmlReader::NAMESPACE_NONE
&& name.equals(RTL_CONSTASCII_STRINGPARAM("prefix")))
{
if (!attrPrefix_.isEmpty()) {
throw css::registry::InvalidRegistryException(
- (reader_.getUrl() +
- ": <component> has multiple \"prefix\" attributes"),
- css::uno::Reference< css::uno::XInterface >());
+ reader_.getUrl() +
+ ": <component> has multiple \"prefix\" attributes");
}
attrPrefix_ = reader_.getAttributeValue(false).convertFromUtf8();
if (attrPrefix_.isEmpty()) {
throw css::registry::InvalidRegistryException(
- (reader_.getUrl() +
- ": <component> has empty \"prefix\" attribute"),
- css::uno::Reference< css::uno::XInterface >());
+ reader_.getUrl() +
+ ": <component> has empty \"prefix\" attribute");
}
} else {
throw css::registry::InvalidRegistryException(
- (reader_.getUrl() + ": unexpected attribute \""
- + name.convertFromUtf8() + "\" in <component>"),
- css::uno::Reference< css::uno::XInterface >());
+ reader_.getUrl() + ": unexpected attribute \""
+ + name.convertFromUtf8() + "\" in <component>");
}
}
if (attrLoader_.isEmpty()) {
throw css::registry::InvalidRegistryException(
- reader_.getUrl() + ": <component> is missing \"loader\" attribute",
- css::uno::Reference< css::uno::XInterface >());
+ reader_.getUrl() + ": <component> is missing \"loader\" attribute");
}
if (attrUri_.isEmpty()) {
throw css::registry::InvalidRegistryException(
- reader_.getUrl() + ": <component> is missing \"uri\" attribute",
- css::uno::Reference< css::uno::XInterface >());
+ reader_.getUrl() + ": <component> is missing \"uri\" attribute");
}
#ifndef DISABLE_DYNLOADING
try {
attrUri_ = rtl::Uri::convertRelToAbs(reader_.getUrl(), attrUri_);
} catch (const rtl::MalformedUriException & e) {
throw css::registry::InvalidRegistryException(
- reader_.getUrl() + ": bad \"uri\" attribute: " + e.getMessage(),
- css::uno::Reference< css::uno::XInterface >());
+ reader_.getUrl() + ": bad \"uri\" attribute: " + e.getMessage());
}
#endif
}
@@ -356,54 +337,47 @@ void Parser::handleImplementation() {
{
if (!attrName.isEmpty()) {
throw css::registry::InvalidRegistryException(
- (reader_.getUrl()
- + ": <implementation> has multiple \"name\" attributes"),
- css::uno::Reference< css::uno::XInterface >());
+ reader_.getUrl()
+ + ": <implementation> has multiple \"name\" attributes");
}
attrName = reader_.getAttributeValue(false).convertFromUtf8();
if (attrName.isEmpty()) {
throw css::registry::InvalidRegistryException(
- (reader_.getUrl()
- + ": <implementation> has empty \"name\" attribute"),
- css::uno::Reference< css::uno::XInterface >());
+ reader_.getUrl()
+ + ": <implementation> has empty \"name\" attribute");
}
} else if (nsId == xmlreader::XmlReader::NAMESPACE_NONE
&& name.equals(RTL_CONSTASCII_STRINGPARAM("constructor")))
{
if (!attrConstructor.isEmpty()) {
throw css::registry::InvalidRegistryException(
- (reader_.getUrl()
- + (": <implementation> has multiple \"constructor\""
- " attributes")),
- css::uno::Reference< css::uno::XInterface >());
+ reader_.getUrl()
+ + ": <implementation> has multiple \"constructor\""
+ " attributes");
}
attrConstructor = reader_.getAttributeValue(false)
.convertFromUtf8();
if (attrConstructor.isEmpty()) {
throw css::registry::InvalidRegistryException(
- (reader_.getUrl()
- + ": element has empty \"constructor\" attribute"),
- css::uno::Reference< css::uno::XInterface >());
+ reader_.getUrl()
+ + ": element has empty \"constructor\" attribute");
}
if (attrEnvironment_.isEmpty()) {
throw css::registry::InvalidRegistryException(
- (reader_.getUrl()
- + (": <implementation> has \"constructor\" attribute but"
- " <component> has no \"environment\" attribute")),
- css::uno::Reference< css::uno::XInterface >());
+ reader_.getUrl()
+ + ": <implementation> has \"constructor\" attribute but"
+ " <component> has no \"environment\" attribute");
}
} else {
throw css::registry::InvalidRegistryException(
- (reader_.getUrl() + ": unexpected element attribute \""
- + name.convertFromUtf8() + "\" in <implementation>"),
- css::uno::Reference< css::uno::XInterface >());
+ reader_.getUrl() + ": unexpected element attribute \""
+ + name.convertFromUtf8() + "\" in <implementation>");
}
}
if (attrName.isEmpty()) {
throw css::registry::InvalidRegistryException(
- (reader_.getUrl()
- + ": <implementation> is missing \"name\" attribute"),
- css::uno::Reference< css::uno::XInterface >());
+ reader_.getUrl()
+ + ": <implementation> is missing \"name\" attribute");
}
implementation_.reset(
new cppuhelper::ServiceManager::Data::Implementation(
@@ -415,9 +389,8 @@ void Parser::handleImplementation() {
second)
{
throw css::registry::InvalidRegistryException(
- (reader_.getUrl() + ": duplicate <implementation name=\"" + attrName
- + "\">"),
- css::uno::Reference< css::uno::XInterface >());
+ reader_.getUrl() + ": duplicate <implementation name=\"" + attrName
+ + "\">");
}
}
@@ -443,26 +416,22 @@ rtl::OUString Parser::getNameAttribute() {
{
if (!attrName.isEmpty()) {
throw css::registry::InvalidRegistryException(
- (reader_.getUrl()
- + ": element has multiple \"name\" attributes"),
- css::uno::Reference< css::uno::XInterface >());
+ reader_.getUrl()
+ + ": element has multiple \"name\" attributes");
}
attrName = reader_.getAttributeValue(false).convertFromUtf8();
if (attrName.isEmpty()) {
throw css::registry::InvalidRegistryException(
- reader_.getUrl() + ": element has empty \"name\" attribute",
- css::uno::Reference< css::uno::XInterface >());
+ reader_.getUrl() + ": element has empty \"name\" attribute");
}
} else {
throw css::registry::InvalidRegistryException(
- reader_.getUrl() + ": expected element attribute \"name\"",
- css::uno::Reference< css::uno::XInterface >());
+ reader_.getUrl() + ": expected element attribute \"name\"");
}
}
if (attrName.isEmpty()) {
throw css::registry::InvalidRegistryException(
- reader_.getUrl() + ": element is missing \"name\" attribute",
- css::uno::Reference< css::uno::XInterface >());
+ reader_.getUrl() + ": element is missing \"name\" attribute");
}
return attrName;
}
@@ -1530,8 +1499,7 @@ bool cppuhelper::ServiceManager::readLegacyRdbFile(rtl::OUString const & uri) {
second)
{
throw css::registry::InvalidRegistryException(
- uri + ": duplicate <implementation name=\"" + name + "\">",
- css::uno::Reference< css::uno::XInterface >());
+ uri + ": duplicate <implementation name=\"" + name + "\">");
}
readLegacyRdbStrings(
uri, implKey, "UNO/SERVICES", &impl->info->services);
diff --git a/cppuhelper/test/testcmp/TestComponent.cxx b/cppuhelper/test/testcmp/TestComponent.cxx
index 3e5db32d0ad3..be1a1692a3e1 100644
--- a/cppuhelper/test/testcmp/TestComponent.cxx
+++ b/cppuhelper/test/testcmp/TestComponent.cxx
@@ -99,8 +99,7 @@ uno::Reference<uno::XInterface> SAL_CALL TestComponent::create(
}
catch (std::bad_alloc &)
{
- throw uno::RuntimeException(rtl::OUString("std::bad_alloc"),
- uno::Reference<uno::XInterface>());
+ throw uno::RuntimeException("std::bad_alloc");
}
}
diff --git a/cpputools/source/unoexe/unoexe.cxx b/cpputools/source/unoexe/unoexe.cxx
index 50aef46560f1..bb8462f75e7f 100644
--- a/cpputools/source/unoexe/unoexe.cxx
+++ b/cpputools/source/unoexe/unoexe.cxx
@@ -433,7 +433,7 @@ SAL_IMPLEMENT_MAIN()
}
if (!(aImplName.isEmpty() || aServiceName.isEmpty()))
- throw RuntimeException("give component exOR service name!", Reference< XInterface >() );
+ throw RuntimeException("give component exOR service name!" );
if (aImplName.isEmpty() && aServiceName.isEmpty())
{
if (! aUnoUrl.endsWithIgnoreAsciiCase( ";uno.ComponentContext" ))
diff --git a/desktop/source/deployment/misc/dp_descriptioninfoset.cxx b/desktop/source/deployment/misc/dp_descriptioninfoset.cxx
index 4410315f0d88..15643375b48b 100644
--- a/desktop/source/deployment/misc/dp_descriptioninfoset.cxx
+++ b/desktop/source/deployment/misc/dp_descriptioninfoset.cxx
@@ -97,8 +97,7 @@ OUString getNodeValue(
return node->getNodeValue();
} catch (const css::xml::dom::DOMException & e) {
throw css::uno::RuntimeException(
- "com.sun.star.xml.dom.DOMException: " + e.Message,
- css::uno::Reference< css::uno::XInterface >());
+ "com.sun.star.xml.dom.DOMException: " + e.Message);
}
}
diff --git a/desktop/source/deployment/misc/dp_misc.cxx b/desktop/source/deployment/misc/dp_misc.cxx
index 14e2c4c52ddb..9973b775c0e7 100644
--- a/desktop/source/deployment/misc/dp_misc.cxx
+++ b/desktop/source/deployment/misc/dp_misc.cxx
@@ -451,8 +451,7 @@ Reference<XInterface> resolveUnoURL(
for (int i = 0; i <= 20; ++i) // 10 seconds
{
if (abortChannel != 0 && abortChannel->isAborted()) {
- throw ucb::CommandAbortedException(
- "abort!", Reference<XInterface>() );
+ throw ucb::CommandAbortedException( "abort!" );
}
try {
return xUnoUrlResolver->resolve( connectString );
diff --git a/desktop/source/deployment/registry/help/dp_help.cxx b/desktop/source/deployment/registry/help/dp_help.cxx
index 12cb3c22c4e0..c3ecbd4508eb 100644
--- a/desktop/source/deployment/registry/help/dp_help.cxx
+++ b/desktop/source/deployment/registry/help/dp_help.cxx
@@ -611,10 +611,8 @@ Reference< ucb::XSimpleFileAccess3 > BackendImpl::getFileAccess( void )
if( !m_xSFA.is() )
{
throw RuntimeException(
- OUString(
"dp_registry::backend::help::BackendImpl::getFileAccess(), "
- "could not instatiate SimpleFileAccess." ),
- Reference< XInterface >() );
+ "could not instatiate SimpleFileAccess." );
}
}
return m_xSFA;
diff --git a/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx b/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx
index 788b5e4e408d..86c079183652 100644
--- a/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx
+++ b/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx
@@ -340,8 +340,7 @@ void BackendImpl::PackageImpl::processPackage_(
if ( !m_xNameCntrPkgHandler.is() )
{
dp_misc::TRACE("no package handler!!!!\n");
- throw RuntimeException( "No package Handler ",
- Reference< XInterface >() );
+ throw RuntimeException( "No package Handler " );
}
if (doRegisterPackage)
diff --git a/desktop/source/pkgchk/unopkg/unopkg_misc.cxx b/desktop/source/pkgchk/unopkg/unopkg_misc.cxx
index 2e1fbcb45044..6cad2723cf8e 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_misc.cxx
+++ b/desktop/source/pkgchk/unopkg/unopkg_misc.cxx
@@ -212,7 +212,7 @@ OUString makeAbsoluteFileUrl(
else if (throw_exc)
{
throw RuntimeException("cannot get file url from system path: " +
- sys_path, Reference< XInterface >() );
+ sys_path );
}
}
@@ -227,8 +227,7 @@ OUString makeAbsoluteFileUrl(
buf.appendAscii( "\" (base-url) and \"" );
buf.append( file_url );
buf.appendAscii( "\" (file-url)!" );
- throw RuntimeException(
- buf.makeStringAndClear(), Reference< XInterface >() );
+ throw RuntimeException( buf.makeStringAndClear() );
}
return OUString();
}
diff --git a/extensions/source/ole/oleobjw.cxx b/extensions/source/ole/oleobjw.cxx
index 2b0c14792b01..fe87fedce028 100644
--- a/extensions/source/ole/oleobjw.cxx
+++ b/extensions/source/ole/oleobjw.cxx
@@ -177,7 +177,7 @@ Any SAL_CALL IUnknownWrapper_Impl::invokeGetProperty( const OUString& aPropertyN
{
OUString msg("[automation bridge]Property \"" + aPropertyName +
"\" is not supported");
- throw UnknownPropertyException(msg, Reference<XInterface>());
+ throw UnknownPropertyException(msg);
}
aResult = invokeWithDispIdComTlb( aDescGet, aPropertyName, aParams, aOutParamIndex, aOutParam );
}
@@ -185,7 +185,7 @@ Any SAL_CALL IUnknownWrapper_Impl::invokeGetProperty( const OUString& aPropertyN
{
throw RuntimeException("[automation bridge] unexpected exception in "
"IUnknownWrapper_Impl::invokeGetProperty ! Message : \n" +
- e.Message, Reference<XInterface>());
+ e.Message);
}
return aResult;
}
@@ -205,7 +205,7 @@ Any SAL_CALL IUnknownWrapper_Impl::invokePutProperty( const OUString& aPropertyN
{
OUString msg("[automation bridge]Property \"" + aPropertyName +
"\" is not supported");
- throw UnknownPropertyException(msg, Reference<XInterface>());
+ throw UnknownPropertyException(msg);
}
aResult = invokeWithDispIdComTlb( aDescPut, aPropertyName, aParams, aOutParamIndex, aOutParam );
}
@@ -213,7 +213,7 @@ Any SAL_CALL IUnknownWrapper_Impl::invokePutProperty( const OUString& aPropertyN
{
throw RuntimeException("[automation bridge] unexpected exception in "
"IUnknownWrapper_Impl::invokePutProperty ! Message : \n" +
- e.Message, Reference<XInterface>());
+ e.Message);
}
return aResult;
}
@@ -228,8 +228,7 @@ Any SAL_CALL IUnknownWrapper_Impl::invoke( const OUString& aFunctionName,
if ( ! m_spDispatch )
{
throw RuntimeException(
- "[automation bridge] The object does not have an IDispatch interface",
- Reference<XInterface>());
+ "[automation bridge] The object does not have an IDispatch interface");
}
Any ret;
@@ -265,19 +264,19 @@ Any SAL_CALL IUnknownWrapper_Impl::invoke( const OUString& aFunctionName,
}
catch (const BridgeRuntimeError & e)
{
- throw RuntimeException(e.message, Reference<XInterface>());
+ throw RuntimeException(e.message);
}
catch (const Exception & e)
{
throw RuntimeException("[automation bridge] unexpected exception in "
"IUnknownWrapper_Impl::invoke ! Message : \n" +
- e.Message, Reference<XInterface>());
+ e.Message);
}
catch(...)
{
throw RuntimeException("[automation bridge] unexpected exception in "
- "IUnknownWrapper_Impl::Invoke !", Reference<XInterface>());
+ "IUnknownWrapper_Impl::Invoke !");
}
return ret;
}
@@ -290,8 +289,7 @@ void SAL_CALL IUnknownWrapper_Impl::setValue( const OUString& aPropertyName,
if ( ! m_spDispatch )
{
throw RuntimeException(
- "[automation bridge] The object does not have an IDispatch interface",
- Reference<XInterface>());
+ "[automation bridge] The object does not have an IDispatch interface");
}
try
{
@@ -307,7 +305,7 @@ void SAL_CALL IUnknownWrapper_Impl::setValue( const OUString& aPropertyName,
{
OUString msg("[automation bridge]Property \"" + aPropertyName +
"\" is not supported");
- throw UnknownPropertyException(msg, Reference<XInterface>());
+ throw UnknownPropertyException(msg);
}
if ( (! aDescPut && aDescGet) || aVarDesc
@@ -438,21 +436,20 @@ void SAL_CALL IUnknownWrapper_Impl::setValue( const OUString& aPropertyName,
}
catch (const BridgeRuntimeError& e)
{
- throw RuntimeException(
- e.message, Reference<XInterface>());
+ throw RuntimeException(e.message);
}
catch (const Exception & e)
{
throw RuntimeException("[automation bridge] unexpected exception in "
"IUnknownWrapper_Impl::setValue ! Message : \n" +
- e.Message, Reference<XInterface>());
+ e.Message);
}
catch (...)
{
throw RuntimeException(
"[automation bridge] unexpected exception in "
- "IUnknownWrapper_Impl::setValue !", Reference<XInterface>());
+ "IUnknownWrapper_Impl::setValue !");
}
}
@@ -462,8 +459,7 @@ Any SAL_CALL IUnknownWrapper_Impl::getValue( const OUString& aPropertyName )
if ( ! m_spDispatch )
{
throw RuntimeException(
- "[automation bridge] The object does not have an IDispatch interface",
- Reference<XInterface>());
+ "[automation bridge] The object does not have an IDispatch interface");
}
Any ret;
try
@@ -519,7 +515,7 @@ Any SAL_CALL IUnknownWrapper_Impl::getValue( const OUString& aPropertyName )
//property not found
OUString msg("[automation bridge]Property \"" + aPropertyName +
"\" is not supported");
- throw UnknownPropertyException(msg, Reference<XInterface>());
+ throw UnknownPropertyException(msg);
}
// write-only should not be possible
OSL_ASSERT( aDescGet || ! aDescPut);
@@ -565,52 +561,15 @@ Any SAL_CALL IUnknownWrapper_Impl::getValue( const OUString& aPropertyName )
case S_OK:
break;
case DISP_E_BADPARAMCOUNT:
- throw RuntimeException(OUString(reinterpret_cast<const sal_Unicode*>(excepinfo.bstrDescription)),
- Reference<XInterface>());
- break;
case DISP_E_BADVARTYPE:
- throw RuntimeException(OUString(reinterpret_cast<const sal_Unicode*>(excepinfo.bstrDescription)),
- Reference<XInterface>());
- break;
case DISP_E_EXCEPTION:
- throw RuntimeException(OUString(reinterpret_cast<const sal_Unicode*>(excepinfo.bstrDescription)),
- Reference<XInterface>());
+ throw RuntimeException(OUString(reinterpret_cast<const sal_Unicode*>(excepinfo.bstrDescription)));
break;
case DISP_E_MEMBERNOTFOUND:
- throw UnknownPropertyException(OUString(reinterpret_cast<const sal_Unicode*>(excepinfo.bstrDescription)),
- Reference<XInterface>());
- break;
- case DISP_E_NONAMEDARGS:
- throw RuntimeException(OUString(reinterpret_cast<const sal_Unicode*>(excepinfo.bstrDescription)),
- Reference<XInterface>());
- break;
- case DISP_E_OVERFLOW:
- throw RuntimeException(OUString(reinterpret_cast<const sal_Unicode*>(excepinfo.bstrDescription)),
- Reference<XInterface>());
- break;
- case DISP_E_PARAMNOTFOUND:
- throw RuntimeException(OUString(reinterpret_cast<const sal_Unicode*>(excepinfo.bstrDescription)),
- Reference<XInterface>());
- break;
- case DISP_E_TYPEMISMATCH:
- throw RuntimeException(OUString(reinterpret_cast<const sal_Unicode*>(excepinfo.bstrDescription)),
- Reference<XInterface>());
- break;
- case DISP_E_UNKNOWNINTERFACE:
- throw RuntimeException(OUString(reinterpret_cast<const sal_Unicode*>(excepinfo.bstrDescription)),
- Reference<XInterface>());
- break;
- case DISP_E_UNKNOWNLCID:
- throw RuntimeException(OUString(reinterpret_cast<const sal_Unicode*>(excepinfo.bstrDescription)),
- Reference<XInterface>());
- break;
- case DISP_E_PARAMNOTOPTIONAL:
- throw RuntimeException(OUString(reinterpret_cast<const sal_Unicode*>(excepinfo.bstrDescription)),
- Reference<XInterface>());
+ throw UnknownPropertyException(OUString(reinterpret_cast<const sal_Unicode*>(excepinfo.bstrDescription)));
break;
default:
- throw RuntimeException(OUString(reinterpret_cast<const sal_Unicode*>(excepinfo.bstrDescription)),
- Reference<XInterface>());
+ throw RuntimeException(OUString(reinterpret_cast<const sal_Unicode*>(excepinfo.bstrDescription)));
break;
}
}
@@ -620,20 +579,19 @@ Any SAL_CALL IUnknownWrapper_Impl::getValue( const OUString& aPropertyName )
}
catch (const BridgeRuntimeError& e)
{
- throw RuntimeException(
- e.message, Reference<XInterface>());
+ throw RuntimeException(e.message);
}
catch (const Exception & e)
{
throw RuntimeException("[automation bridge] unexpected exception in "
"IUnknownWrapper_Impl::getValue ! Message : \n" +
- e.Message, Reference<XInterface>());
+ e.Message);
}
catch (...)
{
throw RuntimeException(
"[automation bridge] unexpected exception in "
- "IUnknownWrapper_Impl::getValue !", Reference<XInterface>());
+ "IUnknownWrapper_Impl::getValue !");
}
return ret;
}
@@ -644,8 +602,7 @@ sal_Bool SAL_CALL IUnknownWrapper_Impl::hasMethod( const OUString& aName )
if ( ! m_spDispatch )
{
throw RuntimeException(
- "[automation bridge] The object does not have an IDispatch interface",
- Reference<XInterface>());
+ "[automation bridge] The object does not have an IDispatch interface");
}
sal_Bool ret = sal_False;
@@ -672,18 +629,18 @@ sal_Bool SAL_CALL IUnknownWrapper_Impl::hasMethod( const OUString& aName )
}
catch (const BridgeRuntimeError& e)
{
- throw RuntimeException(e.message, Reference<XInterface>());
+ throw RuntimeException(e.message);
}
catch (const Exception & e)
{
throw RuntimeException("[automation bridge] unexpected exception in "
"IUnknownWrapper_Impl::hasMethod ! Message : \n" +
- e.Message, Reference<XInterface>());
+ e.Message);
}
catch (...)
{
throw RuntimeException("[automation bridge] unexpected exception in "
- "IUnknownWrapper_Impl::hasMethod !", Reference<XInterface>());
+ "IUnknownWrapper_Impl::hasMethod !");
}
return ret;
}
@@ -694,7 +651,7 @@ sal_Bool SAL_CALL IUnknownWrapper_Impl::hasProperty( const OUString& aName )
if ( ! m_spDispatch )
{
throw RuntimeException("[automation bridge] The object does not have an "
- "IDispatch interface", Reference<XInterface>());
+ "IDispatch interface");
}
sal_Bool ret = sal_False;
try
@@ -722,19 +679,19 @@ sal_Bool SAL_CALL IUnknownWrapper_Impl::hasProperty( const OUString& aName )
}
catch (const BridgeRuntimeError& e)
{
- throw RuntimeException(e.message, Reference<XInterface>());
+ throw RuntimeException(e.message);
}
catch (const Exception & e)
{
throw RuntimeException("[automation bridge] unexpected exception in "
"IUnknownWrapper_Impl::hasProperty ! Message : \n" +
- e.Message, Reference<XInterface>());
+ e.Message);
}
catch (...)
{
throw RuntimeException("[automation bridge] unexpected exception in "
- "IUnknownWrapper_Impl::hasProperty !", Reference<XInterface>());
+ "IUnknownWrapper_Impl::hasProperty !");
}
return ret;
}
@@ -1298,13 +1255,12 @@ void SAL_CALL IUnknownWrapper_Impl::initialize( const Sequence< Any >& aArgument
}
catch ( const BridgeRuntimeError & e )
{
- throw RuntimeException( e.message, Reference<XInterface>() );
+ throw RuntimeException( e.message );
}
catch( const Exception& e )
{
throw RuntimeException(
- "[automation bridge] unexpected exception in IUnknownWrapper_Impl::initialiase() error message: \n" + e.Message,
- Reference<XInterface>() );
+ "[automation bridge] unexpected exception in IUnknownWrapper_Impl::initialiase() error message: \n" + e.Message );
}
}
}
@@ -1319,8 +1275,7 @@ uno::Any SAL_CALL IUnknownWrapper_Impl::directInvoke( const OUString& aName, con
if ( !m_spDispatch )
{
throw RuntimeException(
- "[automation bridge] The object does not have an IDispatch interface",
- Reference<XInterface>());
+ "[automation bridge] The object does not have an IDispatch interface");
}
o2u_attachCurrentThread();
@@ -1566,8 +1521,7 @@ sal_Bool SAL_CALL IUnknownWrapper_Impl::hasMember( const OUString& aName )
if ( ! m_spDispatch )
{
throw RuntimeException(
- "[automation bridge] The object does not have an IDispatch interface",
- Reference<XInterface>());
+ "[automation bridge] The object does not have an IDispatch interface");
}
o2u_attachCurrentThread();
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)
diff --git a/extensions/source/update/check/updateprotocol.cxx b/extensions/source/update/check/updateprotocol.cxx
index ddf58590675c..6287c9c19e3f 100644
--- a/extensions/source/update/check/updateprotocol.cxx
+++ b/extensions/source/update/check/updateprotocol.cxx
@@ -117,8 +117,7 @@ checkForUpdates(
const OUString &rInstallSetID )
{
if( !rxContext.is() )
- throw uno::RuntimeException(
- "checkForUpdates: empty component context", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "checkForUpdates: empty component context" );
OSL_ASSERT( rxContext->getServiceManager().is() );
diff --git a/extensions/source/update/ui/updatecheckui.cxx b/extensions/source/update/ui/updatecheckui.cxx
index ef8a814a3e2f..1f2b1c7f8885 100644
--- a/extensions/source/update/ui/updatecheckui.cxx
+++ b/extensions/source/update/ui/updatecheckui.cxx
@@ -283,8 +283,7 @@ Image UpdateCheckUI::GetBubbleImage( OUString &rURL )
if( !xContext.is() )
throw uno::RuntimeException(
- "UpdateCheckUI: unable to obtain service manager from component context",
- uno::Reference< uno::XInterface >() );
+ "UpdateCheckUI: unable to obtain service manager from component context" );
try
{
diff --git a/filter/source/msfilter/msvbahelper.cxx b/filter/source/msfilter/msvbahelper.cxx
index 4e29778d8dc4..310e63201e51 100644
--- a/filter/source/msfilter/msvbahelper.cxx
+++ b/filter/source/msfilter/msvbahelper.cxx
@@ -759,7 +759,7 @@ void applyShortCutKeyBinding ( const uno::Reference< frame::XModel >& rxModel, c
}
MacroResolvedInfo aMacroInfo = resolveVBAMacro( pShell, aMacroName );
if( !aMacroInfo.mbFound )
- throw uno::RuntimeException( "The procedure doesn't exist", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "The procedure doesn't exist" );
MacroName = aMacroInfo.msResolvedMacro;
}
uno::Reference< ui::XUIConfigurationManagerSupplier > xCfgSupplier(rxModel, uno::UNO_QUERY_THROW);
diff --git a/fpicker/source/win32/filepicker/asynceventnotifier.cxx b/fpicker/source/win32/filepicker/asynceventnotifier.cxx
index 6f0873461fc8..9eb1401e42d3 100644
--- a/fpicker/source/win32/filepicker/asynceventnotifier.cxx
+++ b/fpicker/source/win32/filepicker/asynceventnotifier.cxx
@@ -78,14 +78,10 @@ void SAL_CALL CAsyncEventNotifier::addListener(const uno::Type&
const uno::Reference< uno::XInterface >& xListener)
{
if ( m_rBroadcastHelper.bDisposed )
- throw lang::DisposedException(
- OUString( "FilePicker is already disposed" ),
- uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( "FilePicker is already disposed" );
if ( m_rBroadcastHelper.bInDispose )
- throw lang::DisposedException(
- OUString( "FilePicker will be disposed now." ),
- uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( "FilePicker will be disposed now." );
m_rBroadcastHelper.aLC.addInterface( aType, xListener );
}
@@ -98,9 +94,7 @@ void SAL_CALL CAsyncEventNotifier::removeListener(const uno::Type&
const uno::Reference< uno::XInterface >& xListener)
{
if ( m_rBroadcastHelper.bDisposed )
- throw lang::DisposedException(
- OUString( "FilePicker is already disposed." ),
- uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( "FilePicker is already disposed." );
m_rBroadcastHelper.aLC.removeInterface( aType, xListener );
}
diff --git a/framework/source/accelerators/acceleratorcache.cxx b/framework/source/accelerators/acceleratorcache.cxx
index 301667b51167..03cee4d7b1d7 100644
--- a/framework/source/accelerators/acceleratorcache.cxx
+++ b/framework/source/accelerators/acceleratorcache.cxx
@@ -107,8 +107,7 @@ AcceleratorCache::TKeyList AcceleratorCache::getKeysByCommand(const OUString& sC
SolarMutexGuard g;
TCommand2Keys::const_iterator pCommand = m_lCommand2Keys.find(sCommand);
if (pCommand == m_lCommand2Keys.end())
- throw css::container::NoSuchElementException(
- OUString(), css::uno::Reference< css::uno::XInterface >());
+ throw css::container::NoSuchElementException();
return pCommand->second;
}
@@ -117,8 +116,7 @@ OUString AcceleratorCache::getCommandByKey(const css::awt::KeyEvent& aKey) const
SolarMutexGuard g;
TKey2Commands::const_iterator pKey = m_lKey2Commands.find(aKey);
if (pKey == m_lKey2Commands.end())
- throw css::container::NoSuchElementException(
- OUString(), css::uno::Reference< css::uno::XInterface >());
+ throw css::container::NoSuchElementException();
return pKey->second;
}
diff --git a/framework/source/accelerators/presethandler.cxx b/framework/source/accelerators/presethandler.cxx
index f9ce7d41f4d9..d7548c40760e 100644
--- a/framework/source/accelerators/presethandler.cxx
+++ b/framework/source/accelerators/presethandler.cxx
@@ -349,8 +349,7 @@ void PresetHandler::connectToResource( PresetHandler::EConfigType
{
if (!xDocumentRoot.is())
throw css::uno::RuntimeException(
- OUString("There is valid root storage, where the UI configuration can work on."),
- css::uno::Reference< css::uno::XInterface >());
+ "There is valid root storage, where the UI configuration can work on.");
m_lDocumentStorages.setRootStorage(xDocumentRoot);
xShare = xDocumentRoot;
xUser = xDocumentRoot;
diff --git a/framework/source/fwi/threadhelp/transactionmanager.cxx b/framework/source/fwi/threadhelp/transactionmanager.cxx
index 366b38505b90..20bcdd6c020d 100644
--- a/framework/source/fwi/threadhelp/transactionmanager.cxx
+++ b/framework/source/fwi/threadhelp/transactionmanager.cxx
@@ -266,13 +266,13 @@ void TransactionManager::impl_throwExceptions( EExceptionMode eMode, ERejectReas
{
// Help programmer to find out, why this exception is thrown!
SAL_WARN( "fwk", "TransactionManager...: Owner instance stand in close method. Call was rejected!" );
- throw css::lang::DisposedException( "TransactionManager...\nOwner instance stand in close method. Call was rejected!\n", css::uno::Reference< css::uno::XInterface >() );
+ throw css::lang::DisposedException( "TransactionManager...\nOwner instance stand in close method. Call was rejected!" );
}
break;
case E_CLOSED : {
// Help programmer to find out, why this exception is thrown!
SAL_WARN( "fwk", "TransactionManager...: Owner instance already closed. Call was rejected!" );
- throw css::lang::DisposedException( "TransactionManager...\nOwner instance already closed. Call was rejected!\n", css::uno::Reference< css::uno::XInterface >() );
+ throw css::lang::DisposedException( "TransactionManager...\nOwner instance already closed. Call was rejected!" );
}
case E_NOREASON : {
// Help programmer to find out
diff --git a/framework/source/recording/dispatchrecorder.cxx b/framework/source/recording/dispatchrecorder.cxx
index c5bbaebb70cc..8794d315bdfa 100644
--- a/framework/source/recording/dispatchrecorder.cxx
+++ b/framework/source/recording/dispatchrecorder.cxx
@@ -73,8 +73,7 @@ Sequence< Any > make_seq_out_of_struct(
{
throw RuntimeException(
type.getTypeName() +
- OUString( "is no struct or exception!" ),
- Reference< XInterface >() );
+ OUString( "is no struct or exception!" ) );
}
typelib_TypeDescription * pTD = 0;
TYPELIB_DANGER_GET( &pTD, type.getTypeLibType() );
@@ -83,8 +82,7 @@ Sequence< Any > make_seq_out_of_struct(
{
throw RuntimeException(
OUString( "cannot get type descr of type " ) +
- type.getTypeName(),
- Reference< XInterface >() );
+ type.getTypeName() );
}
::std::vector< Any > vec;
@@ -398,11 +396,8 @@ sal_Int32 SAL_CALL DispatchRecorder::getCount() throw (::com::sun::star::uno::Ru
com::sun::star::uno::Any SAL_CALL DispatchRecorder::getByIndex(sal_Int32 idx) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception)
{
if (idx >= (sal_Int32)m_aStatements.size()) {
- throw com::sun::star::lang::IndexOutOfBoundsException(
- OUString( "Dispatch recorder out of bounds" ),
- Reference< XInterface >() );
-
- }
+ throw com::sun::star::lang::IndexOutOfBoundsException( "Dispatch recorder out of bounds" );
+ }
Any element(&m_aStatements[idx],
cppu::UnoType<com::sun::star::frame::DispatchStatement>::get());
@@ -421,8 +416,7 @@ void SAL_CALL DispatchRecorder::replaceByIndex(sal_Int32 idx, const com::sun::st
if (idx >= (sal_Int32)m_aStatements.size()) {
throw com::sun::star::lang::IndexOutOfBoundsException(
- OUString( "Dispatch recorder out of bounds" ),
- Reference< XInterface >() );
+ "Dispatch recorder out of bounds" );
}
diff --git a/include/com/sun/star/uno/Any.hxx b/include/com/sun/star/uno/Any.hxx
index f021894926dd..fa3693911c5b 100644
--- a/include/com/sun/star/uno/Any.hxx
+++ b/include/com/sun/star/uno/Any.hxx
@@ -599,8 +599,7 @@ T Any::get() const
cppu_Any_extraction_failure_msg(
this,
::cppu::getTypeFavourUnsigned(&value).getTypeLibType() ),
- SAL_NO_ACQUIRE ),
- Reference<XInterface>() );
+ SAL_NO_ACQUIRE ) );
}
return value;
}
diff --git a/include/vbahelper/vbacollectionimpl.hxx b/include/vbahelper/vbacollectionimpl.hxx
index 469802398341..0f610de36c47 100644
--- a/include/vbahelper/vbacollectionimpl.hxx
+++ b/include/vbahelper/vbacollectionimpl.hxx
@@ -240,7 +240,7 @@ protected:
virtual css::uno::Any getItemByStringIndex( const OUString& sIndex ) throw (css::uno::RuntimeException)
{
if ( !m_xNameAccess.is() )
- throw css::uno::RuntimeException("ScVbaCollectionBase string index access not supported by this object", css::uno::Reference< css::uno::XInterface >() );
+ throw css::uno::RuntimeException("ScVbaCollectionBase string index access not supported by this object" );
if( mbIgnoreCase )
{
@@ -260,12 +260,11 @@ protected:
virtual css::uno::Any getItemByIntIndex( const sal_Int32 nIndex ) throw (css::uno::RuntimeException)
{
if ( !m_xIndexAccess.is() )
- throw css::uno::RuntimeException("ScVbaCollectionBase numeric index access not supported by this object", css::uno::Reference< css::uno::XInterface >() );
+ throw css::uno::RuntimeException("ScVbaCollectionBase numeric index access not supported by this object" );
if ( nIndex <= 0 )
{
- throw css::lang::IndexOutOfBoundsException(
- OUString( "index is 0 or negative" ),
- css::uno::Reference< css::uno::XInterface >() );
+ throw css::lang::IndexOutOfBoundsException(
+ "index is 0 or negative" );
}
// need to adjust for vba index ( for which first element is 1 )
return createCollectionObject( m_xIndexAccess->getByIndex( nIndex - 1 ) );
@@ -294,10 +293,7 @@ public:
if ( !( Index1 >>= nIndex ) )
{
- OUString message;
- message = OUString( "Couldn't convert index to Int32");
- throw css::lang::IndexOutOfBoundsException( message,
- css::uno::Reference< css::uno::XInterface >() );
+ throw css::lang::IndexOutOfBoundsException( "Couldn't convert index to Int32" );
}
return getItemByIntIndex( nIndex );
}
diff --git a/io/source/TextOutputStream/TextOutputStream.cxx b/io/source/TextOutputStream/TextOutputStream.cxx
index 555cbeba7a96..282bedc1067e 100644
--- a/io/source/TextOutputStream/TextOutputStream.cxx
+++ b/io/source/TextOutputStream/TextOutputStream.cxx
@@ -222,9 +222,7 @@ void OTextOutputStream::checkOutputStream()
throw(IOException)
{
if (! mxStream.is() )
- throw IOException(
- OUString("output stream is not initialized, you have to use setOutputStream first"),
- Reference<XInterface>());
+ throw IOException("output stream is not initialized, you have to use setOutputStream first");
}
diff --git a/io/source/acceptor/acc_pipe.cxx b/io/source/acceptor/acc_pipe.cxx
index 6ba5606f86b0..7d4cd93319bf 100644
--- a/io/source/acceptor/acc_pipe.cxx
+++ b/io/source/acceptor/acc_pipe.cxx
@@ -160,7 +160,7 @@ namespace io_acceptor
if( ! m_pipe.is() )
{
OUString error = "io.acceptor: Couldn't setup pipe " + m_sPipeName;
- throw ConnectionSetupException( error, Reference< XInterface > () );
+ throw ConnectionSetupException( error );
}
}
@@ -174,7 +174,7 @@ namespace io_acceptor
if( ! pipe.is() )
{
OUString error = "io.acceptor: pipe already closed" + m_sPipeName;
- throw ConnectionSetupException( error, Reference< XInterface > () );
+ throw ConnectionSetupException( error );
}
PipeConnection *pConn = new PipeConnection( m_sConnectionDescription );
@@ -193,7 +193,7 @@ namespace io_acceptor
else
{
OUString error = "io.acceptor: Couldn't setup pipe " + m_sPipeName;
- throw ConnectionSetupException( error, Reference< XInterface > ());
+ throw ConnectionSetupException( error );
}
}
diff --git a/io/source/acceptor/acc_socket.cxx b/io/source/acceptor/acc_socket.cxx
index 9146757a4ef8..936116f93c74 100644
--- a/io/source/acceptor/acc_socket.cxx
+++ b/io/source/acceptor/acc_socket.cxx
@@ -335,16 +335,14 @@ namespace io_acceptor {
OUStringBuffer message( 128 );
message.appendAscii( "acc_socket.cxx:SocketAcceptor::init - error - invalid tcp/ip port " );
message.append( (sal_Int32) m_nPort );
- throw ConnectionSetupException(
- message.makeStringAndClear() , Reference< XInterface> () );
+ throw ConnectionSetupException( message.makeStringAndClear() );
}
if( ! m_addr.setHostname( m_sSocketName.pData ) )
{
OUStringBuffer message( 128 );
message.appendAscii( "acc_socket.cxx:SocketAcceptor::init - error - invalid host " );
message.append( m_sSocketName );
- throw ConnectionSetupException(
- message.makeStringAndClear(), Reference< XInterface > () );
+ throw ConnectionSetupException( message.makeStringAndClear() );
}
m_socket.setOption( osl_Socket_OptionReuseAddr, 1);
@@ -353,9 +351,7 @@ namespace io_acceptor {
OUStringBuffer message( 128 );
message.appendAscii( "acc_socket.cxx:SocketAcceptor::init - error - couldn't bind on " );
message.append( m_sSocketName ).appendAscii( ":" ).append((sal_Int32)m_nPort);
- throw ConnectionSetupException(
- message.makeStringAndClear(),
- Reference<XInterface>());
+ throw ConnectionSetupException( message.makeStringAndClear() );
}
if(! m_socket.listen() )
@@ -363,7 +359,7 @@ namespace io_acceptor {
OUStringBuffer message( 128 );
message.appendAscii( "acc_socket.cxx:SocketAcceptor::init - error - can't listen on " );
message.append( m_sSocketName ).appendAscii( ":" ).append( (sal_Int32) m_nPort);
- throw ConnectionSetupException( message.makeStringAndClear(),Reference<XInterface>() );
+ throw ConnectionSetupException( message.makeStringAndClear() );
}
}
diff --git a/io/source/acceptor/acceptor.cxx b/io/source/acceptor/acceptor.cxx
index 49d3feef50aa..761515a502dd 100644
--- a/io/source/acceptor/acceptor.cxx
+++ b/io/source/acceptor/acceptor.cxx
@@ -108,7 +108,7 @@ namespace io_acceptor
{
OUString sMessage( "AlreadyAcceptingException :" );
sMessage += sConnectionDescription;
- throw AlreadyAcceptingException( sMessage , Reference< XInterface > () );
+ throw AlreadyAcceptingException( sMessage );
}
*m_pFlag = true;
}
@@ -138,7 +138,7 @@ namespace io_acceptor
{
// instantiate another acceptor for different ports
OUString sMessage = "acceptor::accept called multiple times with different conncetion strings\n";
- throw ConnectionSetupException( sMessage, Reference< XInterface > () );
+ throw ConnectionSetupException( sMessage );
}
if( m_sLastDescription.isEmpty() )
@@ -219,7 +219,7 @@ namespace io_acceptor
OUString message("Acceptor: unknown delegatee ");
message += delegatee;
- throw ConnectionSetupException(message, Reference<XInterface>());
+ throw ConnectionSetupException(message);
}
}
}
diff --git a/io/source/connector/connector.cxx b/io/source/connector/connector.cxx
index 9f5309824700..2723370e6c46 100644
--- a/io/source/connector/connector.cxx
+++ b/io/source/connector/connector.cxx
@@ -105,7 +105,7 @@ namespace stoc_connector
sMessage += OUString::number( pConn->m_pipe.getError() );
sMessage += ")";
delete pConn;
- throw NoConnectException( sMessage ,Reference< XInterface > () );
+ throw NoConnectException( sMessage );
}
}
else if ( aDesc.getName() == "socket" )
@@ -131,7 +131,7 @@ namespace stoc_connector
sMessage += sError;
sMessage += ")";
delete pConn;
- throw NoConnectException( sMessage, Reference < XInterface > () );
+ throw NoConnectException( sMessage );
}
if( bTcpNoDelay )
{
@@ -159,7 +159,7 @@ namespace stoc_connector
OUString message("Connector: unknown delegatee ");
message += delegatee;
- throw ConnectionSetupException(message, Reference<XInterface>());
+ throw ConnectionSetupException(message);
}
sal_Int32 index = sConnectionDescription.indexOf((sal_Unicode) ',');
@@ -170,8 +170,7 @@ namespace stoc_connector
}
catch (const rtl::MalformedUriException & rEx)
{
- throw ConnectionSetupException(rEx.getMessage(),
- Reference< XInterface > ());
+ throw ConnectionSetupException(rEx.getMessage());
}
}
diff --git a/javaunohelper/source/bootstrap.cxx b/javaunohelper/source/bootstrap.cxx
index 1628cb606ff4..fe26502b4fde 100644
--- a/javaunohelper/source/bootstrap.cxx
+++ b/javaunohelper/source/bootstrap.cxx
@@ -80,8 +80,7 @@ jobject Java_com_sun_star_comp_helper_Bootstrap_cppuhelper_1bootstrap(
if (JNI_FALSE != jni_env->ExceptionCheck())
{
jni_env->ExceptionClear();
- throw RuntimeException(
- "index out of bounds?!", Reference< XInterface >() );
+ throw RuntimeException( "index out of bounds?!" );
}
if (0 != jstr)
{
@@ -91,8 +90,7 @@ jobject Java_com_sun_star_comp_helper_Bootstrap_cppuhelper_1bootstrap(
if (JNI_FALSE != jni_env->ExceptionCheck())
{
jni_env->ExceptionClear();
- throw RuntimeException(
- "index out of bounds?!", Reference< XInterface >() );
+ throw RuntimeException( "index out of bounds?!" );
}
if (0 != jstr)
{
@@ -138,9 +136,7 @@ jobject Java_com_sun_star_comp_helper_Bootstrap_cppuhelper_1bootstrap(
Reference< lang::XComponent > xComp( xContext, UNO_QUERY );
if (xComp.is())
xComp->dispose();
- throw RuntimeException(
- "cannot get mapping C++ <-> Java!",
- Reference< XInterface >() );
+ throw RuntimeException("cannot get mapping C++ <-> Java!" );
}
jobject jret = (jobject)mapping.mapInterface( xContext.get(), ::getCppuType( &xContext ) );
diff --git a/javaunohelper/source/vm.cxx b/javaunohelper/source/vm.cxx
index 56fcfef1e642..23cb0e5ec61a 100644
--- a/javaunohelper/source/vm.cxx
+++ b/javaunohelper/source/vm.cxx
@@ -105,9 +105,7 @@ namespace javaunohelper {
vm, JNI_VERSION_1_2, false, jni_env ),
loader );
} catch ( ::jvmaccess::UnoVirtualMachine::CreationException & ) {
- throw css::uno::RuntimeException(
- OUString("jmvaccess::UnoVirtualMachine::CreationException occurred" ),
- css::uno::Reference< css::uno::XInterface >() );
+ throw css::uno::RuntimeException( "jvmaccess::UnoVirtualMachine::CreationException occurred" );
}
}
diff --git a/jvmaccess/source/classpath.cxx b/jvmaccess/source/classpath.cxx
index d693f2a10a99..bcbfce1dabb2 100644
--- a/jvmaccess/source/classpath.cxx
+++ b/jvmaccess/source/classpath.cxx
@@ -68,10 +68,8 @@ void * ::jvmaccess::ClassPath::doTranslateToUrls(
url = expUrl->expand( expander );
} catch (const css::lang::IllegalArgumentException & e) {
throw css::uno::RuntimeException(
- (OUString(
- "com.sun.star.lang.IllegalArgumentException: ")
- + e.Message),
- css::uno::Reference< css::uno::XInterface >());
+ OUString("com.sun.star.lang.IllegalArgumentException: ")
+ + e.Message);
}
}
jvalue arg;
diff --git a/oox/source/docprop/ooxmldocpropimport.cxx b/oox/source/docprop/ooxmldocpropimport.cxx
index 4253498f51d6..ef8f8a65b72f 100644
--- a/oox/source/docprop/ooxmldocpropimport.cxx
+++ b/oox/source/docprop/ooxmldocpropimport.cxx
@@ -151,7 +151,7 @@ void SAL_CALL DocumentPropertiesImport::importProperties(
if( aCoreStreams.hasElements() || aExtStreams.hasElements() || aCustomStreams.hasElements() )
{
if( aCoreStreams.getLength() > 1 )
- throw IOException( "Unexpected core properties stream!", Reference< XInterface >() );
+ throw IOException( "Unexpected core properties stream!" );
::oox::core::FastParser aParser( mxContext );
aParser.registerNamespace( NMSP_packageMetaCorePr );
diff --git a/oox/source/helper/textinputstream.cxx b/oox/source/helper/textinputstream.cxx
index c368a205cd66..3d86c403fd82 100644
--- a/oox/source/helper/textinputstream.cxx
+++ b/oox/source/helper/textinputstream.cxx
@@ -108,7 +108,7 @@ void SAL_CALL UnoBinaryInputStream::closeInput() throw (NotConnectedException, I
void UnoBinaryInputStream::ensureConnected() const throw (NotConnectedException)
{
if( !mpInStrm )
- throw NotConnectedException( "Stream closed", Reference< XInterface >() );
+ throw NotConnectedException( "Stream closed" );
}
} // namespace
diff --git a/package/source/manifest/ManifestExport.cxx b/package/source/manifest/ManifestExport.cxx
index ddfe008381b5..82ce37fd322e 100644
--- a/package/source/manifest/ManifestExport.cxx
+++ b/package/source/manifest/ManifestExport.cxx
@@ -263,7 +263,7 @@ ManifestExport::ManifestExport( uno::Reference< xml::sax::XDocumentHandler > xHa
else if ( nDigestAlgID == xml::crypto::DigestID::SHA1_1K )
sChecksumType = sSHA1_1k_Name;
else
- throw uno::RuntimeException( THROW_WHERE "Unexpected digest algorithm is provided!", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE "Unexpected digest algorithm is provided!" );
pNewAttrList->AddAttribute ( sChecksumTypeAttribute, sCdataAttribute, sChecksumType );
*pDigest >>= aSequence;
@@ -286,7 +286,7 @@ ManifestExport::ManifestExport( uno::Reference< xml::sax::XDocumentHandler > xHa
{
OSL_ENSURE( nDerivedKeySize, "Unexpected key size is provided!" );
if ( nDerivedKeySize != 32 )
- throw uno::RuntimeException( THROW_WHERE "Unexpected key size is provided!", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE "Unexpected key size is provided!" );
sEncAlgName = sAES256_URL;
}
@@ -295,7 +295,7 @@ ManifestExport::ManifestExport( uno::Reference< xml::sax::XDocumentHandler > xHa
sEncAlgName = sBlowfish_Name;
}
else
- throw uno::RuntimeException( THROW_WHERE "Unexpected encryption algorithm is provided!", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE "Unexpected encryption algorithm is provided!" );
pNewAttrList->AddAttribute ( sAlgorithmNameAttribute, sCdataAttribute, sEncAlgName );
@@ -359,7 +359,7 @@ ManifestExport::ManifestExport( uno::Reference< xml::sax::XDocumentHandler > xHa
sStartKeySize = aBuffer.makeStringAndClear();
}
else
- throw uno::RuntimeException( THROW_WHERE "Unexpected start key algorithm is provided!", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE "Unexpected start key algorithm is provided!" );
pNewAttrList->AddAttribute ( sStartKeyGenerationNameAttribute, sCdataAttribute, sStartKeyAlg );
pNewAttrList->AddAttribute ( sKeySizeAttribute, sCdataAttribute, sStartKeySize );
diff --git a/package/source/manifest/ManifestWriter.cxx b/package/source/manifest/ManifestWriter.cxx
index 458b1f16591c..a6cb28f0838c 100644
--- a/package/source/manifest/ManifestWriter.cxx
+++ b/package/source/manifest/ManifestWriter.cxx
@@ -66,7 +66,7 @@ void SAL_CALL ManifestWriter::writeManifestSequence( const Reference< XOutputStr
}
catch( SAXException& )
{
- throw RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw RuntimeException( THROW_WHERE );
}
}
diff --git a/package/source/xstor/owriteablestream.cxx b/package/source/xstor/owriteablestream.cxx
index e7eb58005f58..4ec30e962931 100644
--- a/package/source/xstor/owriteablestream.cxx
+++ b/package/source/xstor/owriteablestream.cxx
@@ -980,8 +980,7 @@ uno::Sequence< beans::PropertyValue > OWriteStream_Impl::InsertOwnProps(
else if ( m_nRelInfoStatus == RELINFO_CHANGED_STREAM_READ || m_nRelInfoStatus == RELINFO_CHANGED )
aValue <<= m_aNewRelInfo;
else // m_nRelInfoStatus == RELINFO_CHANGED_BROKEN || m_nRelInfoStatus == RELINFO_BROKEN
- throw io::IOException( "Wrong relinfo stream!",
- uno::Reference< uno::XInterface >() );
+ throw io::IOException( "Wrong relinfo stream!" );
for ( sal_Int32 nInd = 0; nInd < nLen; nInd++ )
if ( aResult[nInd].Name == "RelationsInfo" )
@@ -1152,8 +1151,7 @@ uno::Sequence< uno::Sequence< beans::StringPair > > OWriteStream_Impl::GetAllRel
else if ( m_nRelInfoStatus == RELINFO_CHANGED_STREAM_READ || m_nRelInfoStatus == RELINFO_CHANGED )
return m_aNewRelInfo;
else // m_nRelInfoStatus == RELINFO_CHANGED_BROKEN || m_nRelInfoStatus == RELINFO_BROKEN
- throw io::IOException( "Wrong relinfo stream!",
- uno::Reference< uno::XInterface >() );
+ throw io::IOException( "Wrong relinfo stream!" );
}
void OWriteStream_Impl::CopyInternallyTo_Impl( const uno::Reference< io::XStream >& xDestStream )
diff --git a/package/source/xstor/xstorage.cxx b/package/source/xstor/xstorage.cxx
index 1858d76c3dcf..0a6adcd0e08b 100644
--- a/package/source/xstor/xstorage.cxx
+++ b/package/source/xstor/xstorage.cxx
@@ -102,15 +102,15 @@ void OStorage_Impl::completeStorageStreamCopy_Impl(
uno::Reference< beans::XPropertySet > xSourceProps( xSource, uno::UNO_QUERY );
uno::Reference< beans::XPropertySet > xDestProps( xDest, uno::UNO_QUERY );
if ( !xSourceProps.is() || !xDestProps.is() )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
uno::Reference< io::XOutputStream > xDestOutStream = xDest->getOutputStream();
if ( !xDestOutStream.is() )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException( THROW_WHERE );
uno::Reference< io::XInputStream > xSourceInStream = xSource->getInputStream();
if ( !xSourceInStream.is() )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException( THROW_WHERE );
// TODO: headers of encripted streams should be copied also
::comphelper::OStorageHelper::CopyInputToOutput( xSourceInStream, xDestOutStream );
@@ -147,7 +147,7 @@ uno::Reference< io::XInputStream > GetSeekableTempCopy( uno::Reference< io::XInp
uno::Reference < io::XInputStream > xTempIn = xTempFile->getInputStream();
if ( !xTempOut.is() || !xTempIn.is() )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException( THROW_WHERE );
::comphelper::OStorageHelper::CopyInputToOutput( xInStream, xTempOut );
xTempOut->closeOutput();
@@ -523,7 +523,7 @@ void OStorage_Impl::OpenOwnPackage()
SAL_WARN_IF( !m_xPackageFolder.is(), "package.xstor", "The package root folder can not be opened!" );
if ( !m_xPackageFolder.is() )
- throw embed::InvalidStorageException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw embed::InvalidStorageException( THROW_WHERE );
}
uno::Reference< uno::XComponentContext > OStorage_Impl::GetComponentContext()
@@ -622,11 +622,11 @@ void OStorage_Impl::ReadContents()
uno::Reference< container::XEnumerationAccess > xEnumAccess( m_xPackageFolder, uno::UNO_QUERY );
if ( !xEnumAccess.is() )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
uno::Reference< container::XEnumeration > xEnum = xEnumAccess->createEnumeration();
if ( !xEnum.is() )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
m_bListCreated = true;
@@ -639,7 +639,7 @@ void OStorage_Impl::ReadContents()
if ( !xNamed.is() )
{
SAL_WARN( "package.xstor", "XNamed is not supported!" );
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
}
OUString aName = xNamed->getName();
@@ -651,7 +651,7 @@ void OStorage_Impl::ReadContents()
if ( m_nStorageType == embed::StorageFormats::OFOPXML && aName == "_rels" )
{
if ( !pNewElement->m_bIsStorage )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: Unexpected format
+ throw io::IOException( THROW_WHERE ); // TODO: Unexpected format
m_pRelStorElement = pNewElement;
CreateRelStorage();
@@ -700,12 +700,12 @@ void OStorage_Impl::CopyToStorage( const uno::Reference< embed::XStorage >& xDes
xPropSet->getPropertyValue( "OpenMode" ) >>= nDestMode;
if ( !( nDestMode & embed::ElementModes::WRITE ) )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: access_denied
+ throw io::IOException( THROW_WHERE ); // TODO: access_denied
ReadContents();
if ( !m_xPackageFolder.is() )
- throw embed::InvalidStorageException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw embed::InvalidStorageException( THROW_WHERE );
for ( SotElementList_Impl::iterator pElementIter = m_aChildrenList.begin();
pElementIter != m_aChildrenList.end(); ++pElementIter )
@@ -790,7 +790,7 @@ void OStorage_Impl::CopyStorageElement( SotElement_Impl* pElement,
uno::Reference< container::XNameAccess > xDestAccess( xDest, uno::UNO_QUERY );
if ( !xDestAccess.is() )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
if ( xDestAccess->hasByName( aName )
&& !( pElement->m_bIsStorage && xDest->isStorageElement( aName ) ) )
@@ -808,7 +808,7 @@ void OStorage_Impl::CopyStorageElement( SotElement_Impl* pElement,
{
OpenSubStorage( pElement, embed::ElementModes::READ );
if ( !pElement->m_pStorage )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException( THROW_WHERE );
}
pElement->m_pStorage->CopyToStorage( xSubDest, bDirect );
@@ -819,7 +819,7 @@ void OStorage_Impl::CopyStorageElement( SotElement_Impl* pElement,
{
OpenSubStream( pElement );
if ( !pElement->m_pStream )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException( THROW_WHERE );
}
if ( !pElement->m_pStream->IsEncrypted() )
@@ -883,7 +883,7 @@ void OStorage_Impl::CopyStorageElement( SotElement_Impl* pElement,
}
if ( !xInputToInsert.is() )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException( THROW_WHERE );
xOptDest->insertStreamElementDirect( aName, xInputToInsert, aStrProps );
}
@@ -900,7 +900,7 @@ void OStorage_Impl::CopyStorageElement( SotElement_Impl* pElement,
else if ( m_nStorageType != embed::StorageFormats::PACKAGE )
{
SAL_WARN( "package.xstor", "Encryption is only supported in package storage!" );
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException( THROW_WHERE );
}
else if ( pElement->m_pStream->HasCachedEncryptionData()
&& ( pElement->m_pStream->IsModified() || pElement->m_pStream->HasWriteOwner_Impl() ) )
@@ -995,8 +995,7 @@ uno::Sequence< uno::Sequence< beans::StringPair > > OStorage_Impl::GetAllRelatio
|| m_nRelInfoStatus == RELINFO_CHANGED_STREAM_READ || m_nRelInfoStatus == RELINFO_CHANGED )
return m_aRelInfo;
else // m_nRelInfoStatus == RELINFO_CHANGED_BROKEN || m_nRelInfoStatus == RELINFO_BROKEN
- throw io::IOException( THROW_WHERE "Wrong relinfo stream!",
- uno::Reference< uno::XInterface >() );
+ throw io::IOException( THROW_WHERE "Wrong relinfo stream!" );
}
void OStorage_Impl::CopyLastCommitTo( const uno::Reference< embed::XStorage >& xNewStor )
@@ -1005,7 +1004,7 @@ void OStorage_Impl::CopyLastCommitTo( const uno::Reference< embed::XStorage >& x
SAL_WARN_IF( !m_xPackageFolder.is(), "package.xstor", "A commited storage is incomplete!" );
if ( !m_xPackageFolder.is() )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
OStorage_Impl aTempRepresent( NULL,
embed::ElementModes::READ,
@@ -1026,7 +1025,7 @@ void OStorage_Impl::InsertIntoPackageFolder( const OUString& aName,
SAL_WARN_IF( !m_xPackageFolder.is(), "package.xstor", "An inserted storage is incomplete!" );
uno::Reference< lang::XUnoTunnel > xTunnel( m_xPackageFolder, uno::UNO_QUERY );
if ( !xTunnel.is() )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
xParentPackageFolder->insertByName( aName, uno::makeAny( xTunnel ) );
@@ -1048,7 +1047,7 @@ void OStorage_Impl::Commit()
// if storage is commited it should have a valid Package representation
SAL_WARN_IF( !m_xPackageFolder.is(), "package.xstor", "The package representation should exist!" );
if ( !m_xPackageFolder.is() )
- throw embed::InvalidStorageException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw embed::InvalidStorageException( THROW_WHERE );
OSL_ENSURE( m_nStorageMode & embed::ElementModes::WRITE,
"Commit of readonly storage, should be detected before!\n" );
@@ -1179,7 +1178,7 @@ void OStorage_Impl::Commit()
{
OpenSubStream( *pElementIter );
if ( !(*pElementIter)->m_pStream )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
}
CommitStreamRelInfo( *pElementIter );
@@ -1204,7 +1203,7 @@ void OStorage_Impl::Commit()
{
OSL_ENSURE( (*pElementIter)->m_pStorage, "An inserted storage is incomplete!\n" );
if ( !(*pElementIter)->m_pStorage )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
(*pElementIter)->m_pStorage->InsertIntoPackageFolder( (*pElementIter)->m_aName, xNewPackageFolder );
@@ -1215,7 +1214,7 @@ void OStorage_Impl::Commit()
{
OSL_ENSURE( (*pElementIter)->m_pStream, "An inserted stream is incomplete!\n" );
if ( !(*pElementIter)->m_pStream )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
if ( !(*pElementIter)->m_pStream->IsTransacted() )
(*pElementIter)->m_pStream->Commit();
@@ -1238,7 +1237,7 @@ void OStorage_Impl::Commit()
// move properties to the destination package folder
uno::Reference< beans::XPropertySet > xProps( xNewPackageFolder, uno::UNO_QUERY );
if ( !xProps.is() )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
xProps->setPropertyValue( "MediaType", uno::makeAny( m_aMediaType ) );
xProps->setPropertyValue( "Version", uno::makeAny( m_aVersion ) );
@@ -1253,7 +1252,7 @@ void OStorage_Impl::Commit()
SAL_WARN_IF( !xChangesBatch.is(), "package.xstor", "Impossible to commit package!" );
if ( !xChangesBatch.is() )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
try
{
@@ -1352,19 +1351,19 @@ void OStorage_Impl::Revert()
::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() ) ;
if ( m_nStorageType != embed::StorageFormats::PACKAGE )
- throw packages::NoEncryptionException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw packages::NoEncryptionException( THROW_WHERE );
if ( m_bIsRoot )
{
if ( !m_bHasCommonEncryptionData )
- throw packages::NoEncryptionException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw packages::NoEncryptionException( THROW_WHERE );
return m_aCommonEncryptionData;
}
else
{
if ( !m_pParent )
- throw packages::NoEncryptionException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw packages::NoEncryptionException( THROW_WHERE );
return m_pParent->GetCommonRootEncryptionData();
}
@@ -1392,7 +1391,7 @@ SotElement_Impl* OStorage_Impl::InsertStream( const OUString& aName, bool bEncr
{
SAL_WARN_IF( !m_xPackage.is(), "package.xstor", "Not possible to refer to package as to factory!" );
if ( !m_xPackage.is() )
- throw embed::InvalidStorageException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw embed::InvalidStorageException( THROW_WHERE);
uno::Sequence< uno::Any > aSeq( 1 );
aSeq[0] <<= sal_False;
@@ -1401,15 +1400,15 @@ SotElement_Impl* OStorage_Impl::InsertStream( const OUString& aName, bool bEncr
SAL_WARN_IF( !xNewElement.is(), "package.xstor", "Not possible to create a new stream!" );
if ( !xNewElement.is() )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException( THROW_WHERE );
uno::Reference< packages::XDataSinkEncrSupport > xPackageSubStream( xNewElement, uno::UNO_QUERY );
if ( !xPackageSubStream.is() )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
OSL_ENSURE( m_nStorageType == embed::StorageFormats::PACKAGE || !bEncr, "Only package storage supports encryption!\n" );
if ( m_nStorageType != embed::StorageFormats::PACKAGE && bEncr )
- throw packages::NoEncryptionException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw packages::NoEncryptionException( THROW_WHERE );
// the mode is not needed for storage stream internal implementation
SotElement_Impl* pNewElement = InsertElement( aName, false );
@@ -1427,10 +1426,10 @@ SotElement_Impl* OStorage_Impl::InsertRawStream( const OUString& aName, const un
// insert of raw stream means insert and commit
SAL_WARN_IF( !m_xPackage.is(), "package.xstor", "Not possible to refer to package as to factory!" );
if ( !m_xPackage.is() )
- throw embed::InvalidStorageException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw embed::InvalidStorageException( THROW_WHERE );
if ( m_nStorageType != embed::StorageFormats::PACKAGE )
- throw packages::NoEncryptionException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw packages::NoEncryptionException( THROW_WHERE );
uno::Reference< io::XSeekable > xSeek( xInStream, uno::UNO_QUERY );
uno::Reference< io::XInputStream > xInStrToInsert = xSeek.is() ? xInStream :
@@ -1443,11 +1442,11 @@ SotElement_Impl* OStorage_Impl::InsertRawStream( const OUString& aName, const un
SAL_WARN_IF( !xNewElement.is(), "package.xstor", "Not possible to create a new stream!" );
if ( !xNewElement.is() )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException( THROW_WHERE );
uno::Reference< packages::XDataSinkEncrSupport > xPackageSubStream( xNewElement, uno::UNO_QUERY );
if ( !xPackageSubStream.is() )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
xPackageSubStream->setRawStream( xInStrToInsert );
@@ -1468,7 +1467,7 @@ OStorage_Impl* OStorage_Impl::CreateNewStorageImpl( sal_Int32 nStorageMode )
{
SAL_WARN_IF( !m_xPackage.is(), "package.xstor", "Not possible to refer to package as to factory!" );
if ( !m_xPackage.is() )
- throw embed::InvalidStorageException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw embed::InvalidStorageException( THROW_WHERE );
uno::Sequence< uno::Any > aSeq( 1 );
aSeq[0] <<= sal_True;
@@ -1477,11 +1476,11 @@ OStorage_Impl* OStorage_Impl::CreateNewStorageImpl( sal_Int32 nStorageMode )
SAL_WARN_IF( !xNewElement.is(), "package.xstor", "Not possible to create a new storage!" );
if ( !xNewElement.is() )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException( THROW_WHERE );
uno::Reference< container::XNameContainer > xPackageSubFolder( xNewElement, uno::UNO_QUERY );
if ( !xPackageSubFolder.is() )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
OStorage_Impl* pResult =
new OStorage_Impl( this, nStorageMode, xPackageSubFolder, m_xPackage, m_xContext, m_nStorageType );
@@ -1553,14 +1552,14 @@ void OStorage_Impl::OpenSubStorage( SotElement_Impl* pElement, sal_Int32 nStorag
uno::Reference< lang::XUnoTunnel > xTunnel;
m_xPackageFolder->getByName( pElement->m_aOriginalName ) >>= xTunnel;
if ( !xTunnel.is() )
- throw container::NoSuchElementException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw container::NoSuchElementException( THROW_WHERE );
uno::Reference< container::XNameContainer > xPackageSubFolder( xTunnel, uno::UNO_QUERY );
SAL_WARN_IF( !xPackageSubFolder.is(), "package.xstor", "Can not get XNameContainer interface from folder!" );
if ( !xPackageSubFolder.is() )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
pElement->m_pStorage = new OStorage_Impl( this, nStorageMode, xPackageSubFolder, m_xPackage, m_xContext, m_nStorageType );
}
@@ -1580,11 +1579,11 @@ void OStorage_Impl::OpenSubStream( SotElement_Impl* pElement )
uno::Reference< lang::XUnoTunnel > xTunnel;
m_xPackageFolder->getByName( pElement->m_aOriginalName ) >>= xTunnel;
if ( !xTunnel.is() )
- throw container::NoSuchElementException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw container::NoSuchElementException( THROW_WHERE );
uno::Reference< packages::XDataSinkEncrSupport > xPackageSubStream( xTunnel, uno::UNO_QUERY );
if ( !xPackageSubStream.is() )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
// the stream can never be inserted here, because inserted stream element holds the stream till commit or destruction
pElement->m_pStream = new OWriteStream_Impl( this, xPackageSubStream, m_xPackage, m_xContext, false, m_nStorageType, false, GetRelInfoStreamForName( pElement->m_aOriginalName ) );
@@ -1621,7 +1620,7 @@ void OStorage_Impl::RemoveElement( SotElement_Impl* pElement )
if ( (pElement->m_pStorage && ( pElement->m_pStorage->m_pAntiImpl || !pElement->m_pStorage->m_aReadOnlyWrapList.empty() ))
|| (pElement->m_pStream && ( pElement->m_pStream->m_pAntiImpl || !pElement->m_pStream->m_aInputStreamsList.empty() )) )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: Access denied
+ throw io::IOException( THROW_WHERE ); // TODO: Access denied
if ( pElement->m_bIsInserted )
{
@@ -1667,10 +1666,10 @@ void OStorage_Impl::CloneStreamElement( const OUString& aStreamName,
if ( !pElement )
{
// element does not exist, throw exception
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: access_denied
+ throw io::IOException( THROW_WHERE ); // TODO: access_denied
}
else if ( pElement->m_bIsStorage )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException( THROW_WHERE );
if ( !pElement->m_pStream )
OpenSubStream( pElement );
@@ -1692,7 +1691,7 @@ void OStorage_Impl::CloneStreamElement( const OUString& aStreamName,
pElement->m_pStream->GetCopyOfLastCommit( xTargetStream );
}
else
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: general_error
+ throw io::IOException( THROW_WHERE ); // TODO: general_error
}
void OStorage_Impl::RemoveStreamRelInfo( const OUString& aOriginalName )
@@ -1729,7 +1728,7 @@ void OStorage_Impl::CreateRelStorage()
OpenSubStorage( m_pRelStorElement, embed::ElementModes::WRITE );
if ( !m_pRelStorElement->m_pStorage )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
OStorage* pResultStorage = new OStorage( m_pRelStorElement->m_pStorage, false );
m_xRelStorage = uno::Reference< embed::XStorage >( (embed::XStorage*) pResultStorage );
@@ -1742,7 +1741,7 @@ void OStorage_Impl::CommitStreamRelInfo( SotElement_Impl* pStreamElement )
// the stream element must be provided
if ( !pStreamElement )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
if ( m_nStorageType == embed::StorageFormats::OFOPXML && pStreamElement->m_pStream )
{
@@ -1785,12 +1784,12 @@ void OStorage_Impl::CommitRelInfo( const uno::Reference< container::XNameContain
OUString aRelsStorName("_rels");
if ( !xNewPackageFolder.is() )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
if ( m_nStorageType == embed::StorageFormats::OFOPXML )
{
if ( m_nRelInfoStatus == RELINFO_BROKEN || m_nRelInfoStatus == RELINFO_CHANGED_BROKEN )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException( THROW_WHERE );
if ( m_nRelInfoStatus == RELINFO_CHANGED
|| m_nRelInfoStatus == RELINFO_CHANGED_STREAM_READ
@@ -1808,7 +1807,7 @@ void OStorage_Impl::CommitRelInfo( const uno::Reference< container::XNameContain
uno::Reference< io::XOutputStream > xOutStream = xRelsStream->getOutputStream();
if ( !xOutStream.is() )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
::comphelper::OFOPXMLHelper::WriteRelationsInfoSequence( xOutStream, m_aRelInfo, m_xContext );
@@ -1834,7 +1833,7 @@ void OStorage_Impl::CommitRelInfo( const uno::Reference< container::XNameContain
uno::Reference< io::XOutputStream > xOutputStream = xRelsStream->getOutputStream();
if ( !xOutputStream.is() )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
uno::Reference< io::XSeekable > xSeek( m_xNewRelInfoStream, uno::UNO_QUERY_THROW );
xSeek->seek( 0 );
@@ -1963,7 +1962,7 @@ void SAL_CALL OStorage::InternalDispose( bool bNotifyImpl )
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
// the source object is also a kind of locker for the current object
@@ -2061,7 +2060,7 @@ void OStorage::BroadcastModifiedIfNecessary()
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( !m_pImpl->m_bBroadcastModified )
@@ -2098,7 +2097,7 @@ void OStorage::BroadcastTransaction( sal_Int8 nMessage )
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
SAL_WARN_IF( m_pData->m_bReadOnlyWrap, "package.xstor", "The storage can not be modified at all!" );
@@ -2150,8 +2149,7 @@ SotElement_Impl* OStorage::OpenStreamElement_Impl( const OUString& aStreamName,
|| ( nOpenMode & embed::ElementModes::NOCREATE ) == embed::ElementModes::NOCREATE )
{
throw io::IOException("Element does not exist and cannot be "
- "created: \"" + aStreamName + "\"",
- uno::Reference< uno::XInterface >()); // TODO: access_denied
+ "created: \"" + aStreamName + "\""); // TODO: access_denied
}
// create a new StreamElement and insert it into the list
@@ -2159,7 +2157,7 @@ SotElement_Impl* OStorage::OpenStreamElement_Impl( const OUString& aStreamName,
}
else if ( pElement->m_bIsStorage )
{
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException( THROW_WHERE );
}
SAL_WARN_IF( !pElement, "package.xstor", "In case element can not be created an exception must be thrown!" );
@@ -2168,7 +2166,7 @@ SotElement_Impl* OStorage::OpenStreamElement_Impl( const OUString& aStreamName,
m_pImpl->OpenSubStream( pElement );
if ( !pElement->m_pStream )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException( THROW_WHERE );
return pElement;
}
@@ -2176,7 +2174,7 @@ SotElement_Impl* OStorage::OpenStreamElement_Impl( const OUString& aStreamName,
void OStorage::MakeLinkToSubComponent_Impl( const uno::Reference< lang::XComponent >& xComponent )
{
if ( !xComponent.is() )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
if ( !m_pData->m_pSubElDispListener )
{
@@ -2352,7 +2350,7 @@ void SAL_CALL OStorage::copyToStorage( const uno::Reference< embed::XStorage >&
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( !xDest.is() || xDest == uno::Reference< uno::XInterface >( static_cast< OWeakObject*> ( this ), uno::UNO_QUERY ) )
@@ -2417,7 +2415,7 @@ uno::Reference< io::XStream > SAL_CALL OStorage::openStreamElement(
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( aStreamName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aStreamName, false ) )
@@ -2427,7 +2425,7 @@ uno::Reference< io::XStream > SAL_CALL OStorage::openStreamElement(
throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 1 ); // unacceptable element name
if ( ( nOpenMode & embed::ElementModes::WRITE ) && m_pData->m_bReadOnlyWrap )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: access denied
+ throw io::IOException( THROW_WHERE ); // TODO: access denied
uno::Reference< io::XStream > xResult;
try
@@ -2443,7 +2441,7 @@ uno::Reference< io::XStream > SAL_CALL OStorage::openStreamElement(
// before the storage disposes the stream it must deregister itself as listener
uno::Reference< lang::XComponent > xStreamComponent( xResult, uno::UNO_QUERY );
if ( !xStreamComponent.is() )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
MakeLinkToSubComponent_Impl( xStreamComponent );
}
@@ -2528,7 +2526,7 @@ uno::Reference< embed::XStorage > SAL_CALL OStorage::openStorageElement(
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( aStorName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aStorName, false ) )
@@ -2538,11 +2536,11 @@ uno::Reference< embed::XStorage > SAL_CALL OStorage::openStorageElement(
throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 1 ); // unacceptable storage name
if ( ( nStorageMode & embed::ElementModes::WRITE ) && m_pData->m_bReadOnlyWrap )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: access denied
+ throw io::IOException( THROW_WHERE ); // TODO: access denied
if ( ( nStorageMode & embed::ElementModes::TRUNCATE )
&& !( nStorageMode & embed::ElementModes::WRITE ) )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: access denied
+ throw io::IOException( THROW_WHERE ); // TODO: access denied
// it's always possible to read written storage in this implementation
nStorageMode |= embed::ElementModes::READ;
@@ -2557,26 +2555,26 @@ uno::Reference< embed::XStorage > SAL_CALL OStorage::openStorageElement(
if ( !( m_pImpl->m_nStorageMode & embed::ElementModes::WRITE )
|| (( nStorageMode & embed::ElementModes::WRITE ) != embed::ElementModes::WRITE )
|| ( nStorageMode & embed::ElementModes::NOCREATE ) == embed::ElementModes::NOCREATE )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: access_denied
+ throw io::IOException( THROW_WHERE ); // TODO: access_denied
// create a new StorageElement and insert it into the list
pElement = m_pImpl->InsertStorage( aStorName, nStorageMode );
}
else if ( !pElement->m_bIsStorage )
{
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException( THROW_WHERE );
}
else if ( pElement->m_pStorage )
{
// storage has already been opened; it may be opened another time, if it the mode allows to do so
if ( pElement->m_pStorage->m_pAntiImpl )
{
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: access_denied
+ throw io::IOException( THROW_WHERE ); // TODO: access_denied
}
else if ( !pElement->m_pStorage->m_aReadOnlyWrapList.empty()
&& ( nStorageMode & embed::ElementModes::WRITE ) )
{
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: access_denied
+ throw io::IOException( THROW_WHERE ); // TODO: access_denied
}
else
{
@@ -2603,7 +2601,7 @@ uno::Reference< embed::XStorage > SAL_CALL OStorage::openStorageElement(
m_pImpl->OpenSubStorage( pElement, nStorageMode );
if ( !pElement->m_pStorage )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: general_error
+ throw io::IOException( THROW_WHERE ); // TODO: general_error
bool bReadOnlyWrap = ( ( nStorageMode & embed::ElementModes::WRITE ) != embed::ElementModes::WRITE );
OStorage* pResultStorage = new OStorage( pElement->m_pStorage, bReadOnlyWrap );
@@ -2617,7 +2615,7 @@ uno::Reference< embed::XStorage > SAL_CALL OStorage::openStorageElement(
// before the storage disposes the stream it must deregister itself as listener
uno::Reference< lang::XComponent > xStorageComponent( xResult, uno::UNO_QUERY );
if ( !xStorageComponent.is() )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
MakeLinkToSubComponent_Impl( xStorageComponent );
}
@@ -2679,7 +2677,7 @@ uno::Reference< io::XStream > SAL_CALL OStorage::cloneStreamElement( const OUStr
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( aStreamName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aStreamName, false ) )
@@ -2693,7 +2691,7 @@ uno::Reference< io::XStream > SAL_CALL OStorage::cloneStreamElement( const OUStr
uno::Reference< io::XStream > xResult;
m_pImpl->CloneStreamElement( aStreamName, false, ::comphelper::SequenceAsHashMap(), xResult );
if ( !xResult.is() )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
return xResult;
}
catch( const embed::InvalidStorageException& rInvalidStorageException )
@@ -2771,7 +2769,7 @@ void SAL_CALL OStorage::copyLastCommitTo(
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
try
@@ -2835,7 +2833,7 @@ void SAL_CALL OStorage::copyStorageElementLastCommitTo(
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( aStorName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aStorName, false ) )
@@ -2853,11 +2851,11 @@ void SAL_CALL OStorage::copyStorageElementLastCommitTo(
if ( !pElement )
{
// element does not exist, throw exception
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: access_denied
+ throw io::IOException( THROW_WHERE ); // TODO: access_denied
}
else if ( !pElement->m_bIsStorage )
{
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException( THROW_WHERE );
}
if ( !pElement->m_pStorage )
@@ -2872,7 +2870,7 @@ void SAL_CALL OStorage::copyStorageElementLastCommitTo(
pElement->m_pStorage->CopyLastCommitTo( xTargetStorage );
}
else
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: general_error
+ throw io::IOException( THROW_WHERE ); // TODO: general_error
}
catch( const embed::InvalidStorageException& rInvalidStorageException )
{
@@ -2927,7 +2925,7 @@ sal_Bool SAL_CALL OStorage::isStreamElement( const OUString& aElementName )
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( aElementName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aElementName, false ) )
@@ -2978,7 +2976,7 @@ sal_Bool SAL_CALL OStorage::isStreamElement( const OUString& aElementName )
}
if ( !pElement )
- throw container::NoSuchElementException( THROW_WHERE, uno::Reference< uno::XInterface >() ); //???
+ throw container::NoSuchElementException( THROW_WHERE ); //???
return !pElement->m_bIsStorage;
}
@@ -2994,7 +2992,7 @@ sal_Bool SAL_CALL OStorage::isStorageElement( const OUString& aElementName )
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( aElementName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aElementName, false ) )
@@ -3045,7 +3043,7 @@ sal_Bool SAL_CALL OStorage::isStorageElement( const OUString& aElementName )
}
if ( !pElement )
- throw container::NoSuchElementException( THROW_WHERE, uno::Reference< uno::XInterface >() ); //???
+ throw container::NoSuchElementException( THROW_WHERE ); //???
return pElement->m_bIsStorage;
}
@@ -3063,7 +3061,7 @@ void SAL_CALL OStorage::removeElement( const OUString& aElementName )
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( aElementName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aElementName, false ) )
@@ -3073,14 +3071,14 @@ void SAL_CALL OStorage::removeElement( const OUString& aElementName )
throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 1 ); // TODO: unacceptable name
if ( !( m_pImpl->m_nStorageMode & embed::ElementModes::WRITE ) )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: access denied
+ throw io::IOException( THROW_WHERE ); // TODO: access denied
try
{
SotElement_Impl* pElement = m_pImpl->FindElement( aElementName );
if ( !pElement )
- throw container::NoSuchElementException( THROW_WHERE, uno::Reference< uno::XInterface >() ); //???
+ throw container::NoSuchElementException( THROW_WHERE ); //???
m_pImpl->RemoveElement( pElement );
@@ -3153,7 +3151,7 @@ void SAL_CALL OStorage::renameElement( const OUString& aElementName, const OUStr
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( aElementName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aElementName, false )
@@ -3164,17 +3162,17 @@ void SAL_CALL OStorage::renameElement( const OUString& aElementName, const OUStr
throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 0 ); // TODO: unacceptable element name
if ( !( m_pImpl->m_nStorageMode & embed::ElementModes::WRITE ) )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: access denied
+ throw io::IOException( THROW_WHERE ); // TODO: access denied
try
{
SotElement_Impl* pRefElement = m_pImpl->FindElement( aNewName );
if ( pRefElement )
- throw container::ElementExistException( THROW_WHERE, uno::Reference< uno::XInterface >() ); //???
+ throw container::ElementExistException( THROW_WHERE ); //???
SotElement_Impl* pElement = m_pImpl->FindElement( aElementName );
if ( !pElement )
- throw container::NoSuchElementException( THROW_WHERE, uno::Reference< uno::XInterface >() ); //???
+ throw container::NoSuchElementException( THROW_WHERE ); //???
pElement->m_aName = aNewName;
@@ -3255,7 +3253,7 @@ void SAL_CALL OStorage::copyElementTo( const OUString& aElementName,
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( aElementName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aElementName, false )
@@ -3273,14 +3271,14 @@ void SAL_CALL OStorage::copyElementTo( const OUString& aElementName,
{
SotElement_Impl* pElement = m_pImpl->FindElement( aElementName );
if ( !pElement )
- throw container::NoSuchElementException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw container::NoSuchElementException( THROW_WHERE );
uno::Reference< XNameAccess > xNameAccess( xDest, uno::UNO_QUERY );
if ( !xNameAccess.is() )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
if ( xNameAccess->hasByName( aNewName ) )
- throw container::ElementExistException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw container::ElementExistException( THROW_WHERE );
m_pImpl->CopyStorageElement( pElement, xDest, aNewName, false );
}
@@ -3354,7 +3352,7 @@ void SAL_CALL OStorage::moveElementTo( const OUString& aElementName,
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( aElementName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aElementName, false )
@@ -3368,20 +3366,20 @@ void SAL_CALL OStorage::moveElementTo( const OUString& aElementName,
throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 0 ); // unacceptable element name
if ( !( m_pImpl->m_nStorageMode & embed::ElementModes::WRITE ) )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: access denied
+ throw io::IOException( THROW_WHERE ); // TODO: access denied
try
{
SotElement_Impl* pElement = m_pImpl->FindElement( aElementName );
if ( !pElement )
- throw container::NoSuchElementException( THROW_WHERE, uno::Reference< uno::XInterface >() ); //???
+ throw container::NoSuchElementException( THROW_WHERE ); //???
uno::Reference< XNameAccess > xNameAccess( xDest, uno::UNO_QUERY );
if ( !xNameAccess.is() )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
if ( xNameAccess->hasByName( aNewName ) )
- throw container::ElementExistException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw container::ElementExistException( THROW_WHERE );
m_pImpl->CopyStorageElement( pElement, xDest, aNewName, false );
@@ -3464,14 +3462,14 @@ uno::Reference< io::XStream > SAL_CALL OStorage::openEncryptedStream(
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( m_pData->m_nStorageType != embed::StorageFormats::PACKAGE )
packages::NoEncryptionException();
if ( ( nOpenMode & embed::ElementModes::WRITE ) && m_pData->m_bReadOnlyWrap )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: access denied
+ throw io::IOException( THROW_WHERE ); // TODO: access denied
if ( !aEncryptionData.getLength() )
throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 3 );
@@ -3490,7 +3488,7 @@ uno::Reference< io::XStream > SAL_CALL OStorage::openEncryptedStream(
// before the storage disposes the stream it must deregister itself as listener
uno::Reference< lang::XComponent > xStreamComponent( xResult, uno::UNO_QUERY );
if ( !xStreamComponent.is() )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
MakeLinkToSubComponent_Impl( xStreamComponent );
}
@@ -3571,7 +3569,7 @@ uno::Reference< io::XStream > SAL_CALL OStorage::cloneEncryptedStream(
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( m_pData->m_nStorageType != embed::StorageFormats::PACKAGE )
@@ -3585,7 +3583,7 @@ uno::Reference< io::XStream > SAL_CALL OStorage::cloneEncryptedStream(
uno::Reference< io::XStream > xResult;
m_pImpl->CloneStreamElement( aStreamName, true, aEncryptionData, xResult );
if ( !xResult.is() )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
return xResult;
}
catch( const embed::InvalidStorageException& rInvalidStorageException )
@@ -3657,11 +3655,11 @@ uno::Reference< io::XInputStream > SAL_CALL OStorage::getPlainRawStreamElement(
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // the interface is not supported and must not be accessible
+ throw uno::RuntimeException( THROW_WHERE ); // the interface is not supported and must not be accessible
if ( sStreamName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( sStreamName, false ) )
throw lang::IllegalArgumentException( THROW_WHERE "Unexpected entry name syntax.", uno::Reference< uno::XInterface >(), 1 );
@@ -3671,18 +3669,18 @@ uno::Reference< io::XInputStream > SAL_CALL OStorage::getPlainRawStreamElement(
{
SotElement_Impl* pElement = m_pImpl->FindElement( sStreamName );
if ( !pElement )
- throw container::NoSuchElementException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw container::NoSuchElementException( THROW_WHERE );
if ( !pElement->m_pStream )
{
m_pImpl->OpenSubStream( pElement );
if ( !pElement->m_pStream )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException( THROW_WHERE );
}
uno::Reference< io::XInputStream > xRawInStream = pElement->m_pStream->GetPlainRawInStream();
if ( !xRawInStream.is() )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException( THROW_WHERE );
uno::Reference < io::XTempFile > xTempFile = io::TempFile::create( m_pImpl->GetComponentContext() );
uno::Reference < io::XOutputStream > xTempOut = xTempFile->getOutputStream();
@@ -3690,7 +3688,7 @@ uno::Reference< io::XInputStream > SAL_CALL OStorage::getPlainRawStreamElement(
uno::Reference < io::XSeekable > xSeek( xTempOut, uno::UNO_QUERY );
if ( !xTempOut.is() || !xTempIn.is() || !xSeek.is() )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException( THROW_WHERE );
// Copy temporary file to a new one
::comphelper::OStorageHelper::CopyInputToOutput( xRawInStream, xTempOut );
@@ -3762,11 +3760,11 @@ uno::Reference< io::XInputStream > SAL_CALL OStorage::getRawEncrStreamElement(
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( m_pData->m_nStorageType != embed::StorageFormats::PACKAGE )
- throw packages::NoEncryptionException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw packages::NoEncryptionException( THROW_WHERE );
if ( sStreamName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( sStreamName, false ) )
throw lang::IllegalArgumentException( THROW_WHERE "Unexpected entry name syntax.", uno::Reference< uno::XInterface >(), 1 );
@@ -3776,21 +3774,21 @@ uno::Reference< io::XInputStream > SAL_CALL OStorage::getRawEncrStreamElement(
{
SotElement_Impl* pElement = m_pImpl->FindElement( sStreamName );
if ( !pElement )
- throw container::NoSuchElementException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw container::NoSuchElementException( THROW_WHERE );
if ( !pElement->m_pStream )
{
m_pImpl->OpenSubStream( pElement );
if ( !pElement->m_pStream )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException( THROW_WHERE );
}
if ( !pElement->m_pStream->IsEncrypted() )
- throw packages::NoEncryptionException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw packages::NoEncryptionException( THROW_WHERE );
uno::Reference< io::XInputStream > xRawInStream = pElement->m_pStream->GetRawInStream();
if ( !xRawInStream.is() )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException( THROW_WHERE );
uno::Reference < io::XTempFile > xTempFile = io::TempFile::create(m_pImpl->GetComponentContext());
uno::Reference < io::XOutputStream > xTempOut = xTempFile->getOutputStream();
@@ -3798,7 +3796,7 @@ uno::Reference< io::XInputStream > SAL_CALL OStorage::getRawEncrStreamElement(
uno::Reference < io::XSeekable > xSeek( xTempOut, uno::UNO_QUERY );
if ( !xTempOut.is() || !xTempIn.is() || !xSeek.is() )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException( THROW_WHERE );
// Copy temporary file to a new one
::comphelper::OStorageHelper::CopyInputToOutput( xRawInStream, xTempOut );
@@ -3877,11 +3875,11 @@ void SAL_CALL OStorage::insertRawEncrStreamElement( const OUString& aStreamName,
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( m_pData->m_nStorageType != embed::StorageFormats::PACKAGE )
- throw packages::NoEncryptionException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw packages::NoEncryptionException( THROW_WHERE );
if ( aStreamName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aStreamName, false ) )
throw lang::IllegalArgumentException( THROW_WHERE "Unexpected entry name syntax.", uno::Reference< uno::XInterface >(), 1 );
@@ -3890,13 +3888,13 @@ void SAL_CALL OStorage::insertRawEncrStreamElement( const OUString& aStreamName,
throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 2 );
if ( !( m_pImpl->m_nStorageMode & embed::ElementModes::WRITE ) )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: access denied
+ throw io::IOException( THROW_WHERE ); // TODO: access denied
try
{
SotElement_Impl* pElement = m_pImpl->FindElement( aStreamName );
if ( pElement )
- throw container::ElementExistException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw container::ElementExistException( THROW_WHERE );
m_pImpl->InsertRawStream( aStreamName, xInStream );
}
@@ -3970,11 +3968,11 @@ void SAL_CALL OStorage::commit()
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( m_pData->m_bReadOnlyWrap )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: access_denied
+ throw io::IOException( THROW_WHERE ); // TODO: access_denied
m_pImpl->Commit(); // the root storage initiates the storing to source
@@ -4032,7 +4030,7 @@ void SAL_CALL OStorage::revert()
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
for ( SotElementList_Impl::iterator pElementIter = m_pImpl->m_aChildrenList.begin();
@@ -4042,7 +4040,7 @@ void SAL_CALL OStorage::revert()
&& ( (*pElementIter)->m_pStorage->m_pAntiImpl || !(*pElementIter)->m_pStorage->m_aReadOnlyWrapList.empty() ))
|| ((*pElementIter)->m_pStream
&& ( (*pElementIter)->m_pStream->m_pAntiImpl || !(*pElementIter)->m_pStream->m_aInputStreamsList.empty()) ) )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: access denied
+ throw io::IOException( THROW_WHERE ); // TODO: access denied
}
if ( m_pData->m_bReadOnlyWrap || !m_pImpl->m_bListCreated )
@@ -4097,7 +4095,7 @@ void SAL_CALL OStorage::addTransactionListener( const uno::Reference< embed::XTr
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
m_pData->m_aListenersContainer.addInterface( ::getCppuType((const uno::Reference< embed::XTransactionListener >*)0),
@@ -4112,7 +4110,7 @@ void SAL_CALL OStorage::removeTransactionListener( const uno::Reference< embed::
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
m_pData->m_aListenersContainer.removeInterface( ::getCppuType((const uno::Reference< embed::XTransactionListener >*)0),
@@ -4132,7 +4130,7 @@ sal_Bool SAL_CALL OStorage::isModified()
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
return m_pImpl->m_bIsModified;
@@ -4147,11 +4145,11 @@ void SAL_CALL OStorage::setModified( sal_Bool bModified )
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( m_pData->m_bReadOnlyWrap )
- throw beans::PropertyVetoException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: access denied
+ throw beans::PropertyVetoException( THROW_WHERE ); // TODO: access denied
if ( (m_pImpl->m_bIsModified ? 1 : 0) != bModified )
m_pImpl->m_bIsModified = bModified;
@@ -4173,7 +4171,7 @@ void SAL_CALL OStorage::addModifyListener(
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
osl_atomic_increment( &m_pImpl->m_nModifiedListenerCount );
@@ -4190,7 +4188,7 @@ void SAL_CALL OStorage::removeModifyListener(
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
osl_atomic_decrement( &m_pImpl->m_nModifiedListenerCount );
@@ -4210,7 +4208,7 @@ uno::Any SAL_CALL OStorage::getByName( const OUString& aName )
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( aName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aName, false ) )
@@ -4224,7 +4222,7 @@ uno::Any SAL_CALL OStorage::getByName( const OUString& aName )
{
SotElement_Impl* pElement = m_pImpl->FindElement( aName );
if ( !pElement )
- throw container::NoSuchElementException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw container::NoSuchElementException( THROW_WHERE );
if ( pElement->m_bIsStorage )
aResult <<= openStorageElement( aName, embed::ElementModes::READ );
@@ -4272,7 +4270,7 @@ uno::Sequence< OUString > SAL_CALL OStorage::getElementNames()
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
try
@@ -4306,7 +4304,7 @@ sal_Bool SAL_CALL OStorage::hasByName( const OUString& aName )
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( aName.isEmpty() )
@@ -4349,7 +4347,7 @@ uno::Type SAL_CALL OStorage::getElementType()
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
// it is a multitype container
@@ -4364,7 +4362,7 @@ sal_Bool SAL_CALL OStorage::hasElements()
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
try
@@ -4399,7 +4397,7 @@ void SAL_CALL OStorage::dispose()
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
try
@@ -4434,7 +4432,7 @@ void SAL_CALL OStorage::addEventListener(
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
m_pData->m_aListenersContainer.addInterface(
@@ -4450,7 +4448,7 @@ void SAL_CALL OStorage::removeEventListener(
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
m_pData->m_aListenersContainer.removeInterface(
@@ -4475,11 +4473,11 @@ void SAL_CALL OStorage::removeEncryption()
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( m_pData->m_nStorageType != embed::StorageFormats::PACKAGE )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // the interface must be visible only for package storage
+ throw uno::RuntimeException( THROW_WHERE ); // the interface must be visible only for package storage
SAL_WARN_IF( !m_pData->m_bIsRoot, "package.xstor", "removeEncryption() method is not available for nonroot storages!" );
if ( m_pData->m_bIsRoot )
@@ -4531,7 +4529,7 @@ void SAL_CALL OStorage::removeEncryption()
m_pImpl->AddLog( THROW_WHERE "Rethrow" );
SAL_WARN( "package.xstor", "The call must not fail, it is pretty simple!" );
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException( THROW_WHERE );
}
}
}
@@ -4547,14 +4545,14 @@ void SAL_CALL OStorage::setEncryptionData( const uno::Sequence< beans::NamedValu
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( m_pData->m_nStorageType != embed::StorageFormats::PACKAGE )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // the interface must be visible only for package storage
+ throw uno::RuntimeException( THROW_WHERE ); // the interface must be visible only for package storage
if ( !aEncryptionData.getLength() )
- throw uno::RuntimeException( THROW_WHERE "Unexpected empty encryption data!", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE "Unexpected empty encryption data!" );
SAL_WARN_IF( !m_pData->m_bIsRoot, "package.xstor", "setEncryptionData() method is not available for nonroot storages!" );
if ( m_pData->m_bIsRoot )
@@ -4594,7 +4592,7 @@ void SAL_CALL OStorage::setEncryptionData( const uno::Sequence< beans::NamedValu
m_pImpl->AddLog( rException.Message );
m_pImpl->AddLog( THROW_WHERE "Rethrow" );
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException( THROW_WHERE );
}
}
}
@@ -4617,14 +4615,14 @@ void SAL_CALL OStorage::setEncryptionAlgorithms( const uno::Sequence< beans::Nam
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( m_pData->m_nStorageType != embed::StorageFormats::PACKAGE )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // the interface must be visible only for package storage
+ throw uno::RuntimeException( THROW_WHERE ); // the interface must be visible only for package storage
if ( !aAlgorithms.getLength() )
- throw uno::RuntimeException( THROW_WHERE "Unexpected empty encryption algorithms list!", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE "Unexpected empty encryption algorithms list!" );
SAL_WARN_IF( !m_pData->m_bIsRoot, "package.xstor", "setEncryptionAlgorithms() method is not available for nonroot storages!" );
if ( m_pData->m_bIsRoot )
@@ -4667,7 +4665,7 @@ void SAL_CALL OStorage::setEncryptionAlgorithms( const uno::Sequence< beans::Nam
m_pImpl->AddLog( aException.Message );
m_pImpl->AddLog( THROW_WHERE "Rethrow" );
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException( THROW_WHERE );
}
}
}
@@ -4680,11 +4678,11 @@ uno::Sequence< beans::NamedValue > SAL_CALL OStorage::getEncryptionAlgorithms()
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( m_pData->m_nStorageType != embed::StorageFormats::PACKAGE )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // the interface must be visible only for package storage
+ throw uno::RuntimeException( THROW_WHERE ); // the interface must be visible only for package storage
uno::Sequence< beans::NamedValue > aResult;
SAL_WARN_IF( !m_pData->m_bIsRoot, "package.xstor", "getEncryptionAlgorithms() method is not available for nonroot storages!" );
@@ -4727,7 +4725,7 @@ uno::Sequence< beans::NamedValue > SAL_CALL OStorage::getEncryptionAlgorithms()
m_pImpl->AddLog( aException.Message );
m_pImpl->AddLog( THROW_WHERE "Rethrow" );
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException( THROW_WHERE );
}
}
@@ -4744,7 +4742,7 @@ uno::Reference< beans::XPropertySetInfo > SAL_CALL OStorage::getPropertySetInfo(
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
//TODO:
@@ -4763,7 +4761,7 @@ void SAL_CALL OStorage::setPropertyValue( const OUString& aPropertyName, const u
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
//TODO: think about interaction handler
@@ -4772,10 +4770,10 @@ void SAL_CALL OStorage::setPropertyValue( const OUString& aPropertyName, const u
// The old document might have no version in the manifest.xml, so we have to allow to set the version
// even for readonly storages, so that the version from content.xml can be used.
if ( m_pData->m_bReadOnlyWrap && aPropertyName != "Version" )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: Access denied
+ throw io::IOException( THROW_WHERE ); // TODO: Access denied
if ( m_pData->m_nStorageType == embed::StorageFormats::ZIP )
- throw beans::UnknownPropertyException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw beans::UnknownPropertyException( THROW_WHERE );
else if ( m_pData->m_nStorageType == embed::StorageFormats::PACKAGE )
{
if ( aPropertyName == "MediaType" )
@@ -4805,9 +4803,9 @@ void SAL_CALL OStorage::setPropertyValue( const OUString& aPropertyName, const u
|| aPropertyName == "RepairPackage" ) )
|| aPropertyName == "IsRoot"
|| aPropertyName == MEDIATYPE_FALLBACK_USED_PROPERTY )
- throw beans::PropertyVetoException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw beans::PropertyVetoException( THROW_WHERE );
else
- throw beans::UnknownPropertyException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw beans::UnknownPropertyException( THROW_WHERE );
}
else if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML )
{
@@ -4848,12 +4846,12 @@ void SAL_CALL OStorage::setPropertyValue( const OUString& aPropertyName, const u
}
else if ( ( m_pData->m_bIsRoot && ( aPropertyName == "URL" || aPropertyName == "RepairPackage") )
|| aPropertyName == "IsRoot" )
- throw beans::PropertyVetoException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw beans::PropertyVetoException( THROW_WHERE );
else
- throw beans::UnknownPropertyException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw beans::UnknownPropertyException( THROW_WHERE );
}
else
- throw beans::UnknownPropertyException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw beans::UnknownPropertyException( THROW_WHERE );
BroadcastModifiedIfNecessary();
}
@@ -4868,7 +4866,7 @@ uno::Any SAL_CALL OStorage::getPropertyValue( const OUString& aPropertyName )
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( m_pData->m_nStorageType == embed::StorageFormats::PACKAGE
@@ -4936,7 +4934,7 @@ uno::Any SAL_CALL OStorage::getPropertyValue( const OUString& aPropertyName )
m_pImpl->ReadContents();
uno::Reference< beans::XPropertySet > xPackPropSet( m_pImpl->m_xPackage, uno::UNO_QUERY );
if ( !xPackPropSet.is() )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
return xPackPropSet->getPropertyValue( aPropertyName );
}
@@ -4960,7 +4958,7 @@ uno::Any SAL_CALL OStorage::getPropertyValue( const OUString& aPropertyName )
}
}
- throw beans::UnknownPropertyException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw beans::UnknownPropertyException( THROW_WHERE );
}
void SAL_CALL OStorage::addPropertyChangeListener(
@@ -4975,7 +4973,7 @@ void SAL_CALL OStorage::addPropertyChangeListener(
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
//TODO:
@@ -4993,7 +4991,7 @@ void SAL_CALL OStorage::removePropertyChangeListener(
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
//TODO:
@@ -5011,7 +5009,7 @@ void SAL_CALL OStorage::addVetoableChangeListener(
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
//TODO:
@@ -5029,7 +5027,7 @@ void SAL_CALL OStorage::removeVetoableChangeListener(
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
//TODO:
@@ -5048,11 +5046,11 @@ sal_Bool SAL_CALL OStorage::hasByID( const OUString& sID )
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( m_pData->m_nStorageType != embed::StorageFormats::OFOPXML )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
try
{
@@ -5078,11 +5076,11 @@ OUString SAL_CALL OStorage::getTargetByID( const OUString& sID )
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( m_pData->m_nStorageType != embed::StorageFormats::OFOPXML )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
uno::Sequence< beans::StringPair > aSeq = getRelationshipByID( sID );
for ( sal_Int32 nInd = 0; nInd < aSeq.getLength(); nInd++ )
@@ -5102,11 +5100,11 @@ OUString SAL_CALL OStorage::getTypeByID( const OUString& sID )
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( m_pData->m_nStorageType != embed::StorageFormats::OFOPXML )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
uno::Sequence< beans::StringPair > aSeq = getRelationshipByID( sID );
for ( sal_Int32 nInd = 0; nInd < aSeq.getLength(); nInd++ )
@@ -5126,11 +5124,11 @@ uno::Sequence< beans::StringPair > SAL_CALL OStorage::getRelationshipByID( cons
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( m_pData->m_nStorageType != embed::StorageFormats::OFOPXML )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
// TODO/LATER: in future the unification of the ID could be checked
uno::Sequence< uno::Sequence< beans::StringPair > > aSeq = getAllRelationships();
@@ -5143,7 +5141,7 @@ uno::Sequence< beans::StringPair > SAL_CALL OStorage::getRelationshipByID( cons
break;
}
- throw container::NoSuchElementException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw container::NoSuchElementException( THROW_WHERE );
}
uno::Sequence< uno::Sequence< beans::StringPair > > SAL_CALL OStorage::getRelationshipsByType( const OUString& sType )
@@ -5155,11 +5153,11 @@ uno::Sequence< uno::Sequence< beans::StringPair > > SAL_CALL OStorage::getRelati
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( m_pData->m_nStorageType != embed::StorageFormats::OFOPXML )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
uno::Sequence< uno::Sequence< beans::StringPair > > aResult;
sal_Int32 nEntriesNum = 0;
@@ -5190,11 +5188,11 @@ uno::Sequence< uno::Sequence< beans::StringPair > > SAL_CALL OStorage::getAllRel
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( m_pData->m_nStorageType != embed::StorageFormats::OFOPXML )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
return m_pImpl->GetAllRelationshipsIfAny();
}
@@ -5209,11 +5207,11 @@ void SAL_CALL OStorage::insertRelationshipByID( const OUString& sID, const uno:
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( m_pData->m_nStorageType != embed::StorageFormats::OFOPXML )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
OUString aIDTag( "Id" );
@@ -5255,7 +5253,7 @@ void SAL_CALL OStorage::insertRelationshipByID( const OUString& sID, const uno:
aSeq[nIDInd].realloc( nIndTarget );
}
else
- throw container::ElementExistException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw container::ElementExistException( THROW_WHERE );
m_pImpl->m_aRelInfo = aSeq;
m_pImpl->m_xNewRelInfoStream = uno::Reference< io::XInputStream >();
@@ -5272,11 +5270,11 @@ void SAL_CALL OStorage::removeRelationshipByID( const OUString& sID )
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( m_pData->m_nStorageType != embed::StorageFormats::OFOPXML )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
uno::Sequence< uno::Sequence< beans::StringPair > > aSeq = getAllRelationships();
for ( sal_Int32 nInd1 = 0; nInd1 < aSeq.getLength(); nInd1++ )
@@ -5300,7 +5298,7 @@ void SAL_CALL OStorage::removeRelationshipByID( const OUString& sID )
break;
}
- throw container::NoSuchElementException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw container::NoSuchElementException( THROW_WHERE );
}
void SAL_CALL OStorage::insertRelationships( const uno::Sequence< uno::Sequence< beans::StringPair > >& aEntries, sal_Bool bReplace )
@@ -5313,11 +5311,11 @@ void SAL_CALL OStorage::insertRelationships( const uno::Sequence< uno::Sequence
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( m_pData->m_nStorageType != embed::StorageFormats::OFOPXML )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
OUString aIDTag( "Id" );
uno::Sequence< uno::Sequence< beans::StringPair > > aSeq = getAllRelationships();
@@ -5338,7 +5336,7 @@ void SAL_CALL OStorage::insertRelationships( const uno::Sequence< uno::Sequence
if ( aEntries[nIndSource1][nIndSource2].Second.equals( aSeq[nIndTarget1][nIndTarget2].Second ) )
{
if ( !bReplace )
- throw container::ElementExistException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw container::ElementExistException( THROW_WHERE );
nIndSourceSame = nIndSource1;
}
@@ -5371,10 +5369,10 @@ void SAL_CALL OStorage::insertRelationships( const uno::Sequence< uno::Sequence
else if ( nResInd2 < aResultSeq[nResultInd].getLength() )
aResultSeq[nResultInd][nResInd2++] = aEntries[nIndSource1][nIndSource2];
else
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: illegal relation ( no ID )
+ throw io::IOException( THROW_WHERE ); // TODO: illegal relation ( no ID )
if ( !bHasID )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: illegal relations
+ throw io::IOException( THROW_WHERE ); // TODO: illegal relations
nResultInd++;
}
@@ -5394,11 +5392,11 @@ void SAL_CALL OStorage::clearRelationships()
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( m_pData->m_nStorageType != embed::StorageFormats::OFOPXML )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
m_pImpl->m_aRelInfo.realloc( 0 );
m_pImpl->m_xNewRelInfoStream = uno::Reference< io::XInputStream >();
@@ -5419,7 +5417,7 @@ void SAL_CALL OStorage::insertRawNonEncrStreamElementDirect(
{
// not implemented currently because there is still no demand
// might need to be implemented if direct copying of compressed streams is used
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException( THROW_WHERE );
}
void SAL_CALL OStorage::insertStreamElementDirect(
@@ -5438,7 +5436,7 @@ void SAL_CALL OStorage::insertStreamElementDirect(
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( aStreamName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aStreamName, false ) )
@@ -5448,14 +5446,14 @@ void SAL_CALL OStorage::insertStreamElementDirect(
throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 1 ); // unacceptable storage name
if ( m_pData->m_bReadOnlyWrap )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: access denied
+ throw io::IOException( THROW_WHERE ); // TODO: access denied
try
{
SotElement_Impl* pElement = m_pImpl->FindElement( aStreamName );
if ( pElement )
- throw container::ElementExistException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw container::ElementExistException( THROW_WHERE );
pElement = OpenStreamElement_Impl( aStreamName, embed::ElementModes::READWRITE, false );
OSL_ENSURE( pElement && pElement->m_pStream, "In case element can not be created an exception must be thrown!" );
@@ -5527,7 +5525,7 @@ void SAL_CALL OStorage::copyElementDirectlyTo(
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( aElementName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aElementName, false )
@@ -5544,14 +5542,14 @@ void SAL_CALL OStorage::copyElementDirectlyTo(
{
SotElement_Impl* pElement = m_pImpl->FindElement( aElementName );
if ( !pElement )
- throw container::NoSuchElementException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw container::NoSuchElementException( THROW_WHERE );
uno::Reference< XNameAccess > xNameAccess( xDest, uno::UNO_QUERY );
if ( !xNameAccess.is() )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
if ( xNameAccess->hasByName( aNewName ) )
- throw container::ElementExistException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw container::ElementExistException( THROW_WHERE );
// let the element be copied directly
uno::Reference< embed::XStorage > xStorDest( xDest, uno::UNO_QUERY_THROW );
@@ -5623,14 +5621,14 @@ void SAL_CALL OStorage::writeAndAttachToStream( const uno::Reference< io::XStrea
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( !m_pData->m_bIsRoot )
throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 0 );
if ( !m_pImpl->m_pSwitchStream )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
try
{
@@ -5692,14 +5690,14 @@ void SAL_CALL OStorage::attachToURL( const OUString& sURL,
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( !m_pData->m_bIsRoot )
throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 0 );
if ( !m_pImpl->m_pSwitchStream )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
uno::Reference < ucb::XSimpleFileAccess3 > xAccess(
ucb::SimpleFileAccess::create( m_pImpl->m_xContext ) );
@@ -5774,7 +5772,7 @@ uno::Any SAL_CALL OStorage::getElementPropertyValue( const OUString& aElementNam
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( aElementName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aElementName, false ) )
@@ -5787,17 +5785,17 @@ uno::Any SAL_CALL OStorage::getElementPropertyValue( const OUString& aElementNam
{
SotElement_Impl *pElement = m_pImpl->FindElement( aElementName );
if ( !pElement )
- throw container::NoSuchElementException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw container::NoSuchElementException( THROW_WHERE );
// TODO/LATER: Currently it is only implemented for MediaType property of substorages, might be changed in future
if ( !pElement->m_bIsStorage || m_pData->m_nStorageType != embed::StorageFormats::PACKAGE || aPropertyName != "MediaType" )
- throw beans::PropertyVetoException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw beans::PropertyVetoException( THROW_WHERE );
if ( !pElement->m_pStorage )
m_pImpl->OpenSubStorage( pElement, embed::ElementModes::READ );
if ( !pElement->m_pStorage )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: general_error
+ throw io::IOException( THROW_WHERE ); // TODO: general_error
pElement->m_pStorage->ReadContents();
return uno::makeAny( pElement->m_pStorage->m_aMediaType );
@@ -5875,7 +5873,7 @@ void SAL_CALL OStorage::copyStreamElementData( const OUString& aStreamName, cons
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( aStreamName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aStreamName, false ) )
@@ -5894,7 +5892,7 @@ void SAL_CALL OStorage::copyStreamElementData( const OUString& aStreamName, cons
SAL_WARN_IF( xNonconstRef != xTargetStream, "package.xstor", "The provided stream reference seems not be filled in correctly!" );
if ( xNonconstRef != xTargetStream )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // if the stream reference is set it must not be changed!
+ throw uno::RuntimeException( THROW_WHERE ); // if the stream reference is set it must not be changed!
}
catch( const embed::InvalidStorageException& rInvalidStorageException )
{
@@ -5959,7 +5957,7 @@ uno::Reference< embed::XExtendedStorageStream > SAL_CALL OStorage::openStreamEle
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( aStreamPath.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aStreamPath, true ) )
@@ -5967,7 +5965,7 @@ uno::Reference< embed::XExtendedStorageStream > SAL_CALL OStorage::openStreamEle
if ( !( m_pImpl->m_nStorageMode & embed::ElementModes::WRITE )
&& ( nOpenMode & embed::ElementModes::WRITE ) )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // Access denied
+ throw io::IOException( THROW_WHERE ); // Access denied
OStringList_Impl aListPath = OHierarchyHolder_Impl::GetListPathFromString( aStreamPath );
OSL_ENSURE( aListPath.size(), "The result list must not be empty!" );
@@ -5999,7 +5997,7 @@ uno::Reference< embed::XExtendedStorageStream > SAL_CALL OStorage::openStreamEle
}
if ( !xResult.is() )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
return xResult;
}
@@ -6029,14 +6027,14 @@ void SAL_CALL OStorage::removeStreamElementByHierarchicalName( const OUString& a
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( aStreamPath.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aStreamPath, true ) )
throw lang::IllegalArgumentException( THROW_WHERE "Unexpected entry name syntax.", uno::Reference< uno::XInterface >(), 1 );
if ( !( m_pImpl->m_nStorageMode & embed::ElementModes::WRITE ) )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // Access denied
+ throw io::IOException( THROW_WHERE ); // Access denied
OStringList_Impl aListPath = OHierarchyHolder_Impl::GetListPathFromString( aStreamPath );
OSL_ENSURE( aListPath.size(), "The result list must not be empty!" );
@@ -6063,11 +6061,11 @@ uno::Reference< embed::XExtendedStorageStream > SAL_CALL OStorage::openEncrypted
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( m_pData->m_nStorageType != embed::StorageFormats::PACKAGE )
- throw packages::NoEncryptionException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw packages::NoEncryptionException( THROW_WHERE );
if ( aStreamPath.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aStreamPath, true ) )
throw lang::IllegalArgumentException( THROW_WHERE "Unexpected entry name syntax.", uno::Reference< uno::XInterface >(), 1 );
@@ -6077,7 +6075,7 @@ uno::Reference< embed::XExtendedStorageStream > SAL_CALL OStorage::openEncrypted
if ( !( m_pImpl->m_nStorageMode & embed::ElementModes::WRITE )
&& ( nOpenMode & embed::ElementModes::WRITE ) )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // Access denied
+ throw io::IOException( THROW_WHERE ); // Access denied
OStringList_Impl aListPath = OHierarchyHolder_Impl::GetListPathFromString( aStreamPath );
OSL_ENSURE( aListPath.size(), "The result list must not be empty!" );
@@ -6110,7 +6108,7 @@ uno::Reference< embed::XExtendedStorageStream > SAL_CALL OStorage::openEncrypted
}
if ( !xResult.is() )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
return xResult;
}
diff --git a/package/source/zipapi/ByteGrabber.cxx b/package/source/zipapi/ByteGrabber.cxx
index 2b0b049a4c04..8b670ff80726 100644
--- a/package/source/zipapi/ByteGrabber.cxx
+++ b/package/source/zipapi/ByteGrabber.cxx
@@ -77,7 +77,7 @@ sal_Int64 SAL_CALL ByteGrabber::seek( sal_Int64 location )
return location;
}
else
- throw io::IOException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException(THROW_WHERE );
}
sal_Int64 SAL_CALL ByteGrabber::getPosition( )
@@ -87,7 +87,7 @@ sal_Int64 SAL_CALL ByteGrabber::getPosition( )
if (xSeek.is() )
return xSeek->getPosition();
else
- throw io::IOException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException(THROW_WHERE );
}
sal_Int64 SAL_CALL ByteGrabber::getLength( )
@@ -97,7 +97,7 @@ sal_Int64 SAL_CALL ByteGrabber::getLength( )
if (xSeek.is() )
return xSeek->getLength();
else
- throw io::IOException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException(THROW_WHERE );
}
ByteGrabber& ByteGrabber::operator >> (sal_Int8& rInt8)
diff --git a/package/source/zipapi/XUnbufferedStream.cxx b/package/source/zipapi/XUnbufferedStream.cxx
index 1488c3b9d7af..ff1e15135dfd 100644
--- a/package/source/zipapi/XUnbufferedStream.cxx
+++ b/package/source/zipapi/XUnbufferedStream.cxx
@@ -78,7 +78,7 @@ XUnbufferedStream::XUnbufferedStream(
}
if (mnZipSize < 0)
- throw ZipIOException("The stream seems to be broken!", uno::Reference< XInterface >());
+ throw ZipIOException("The stream seems to be broken!");
bool bHaveEncryptData = ( rData.is() && rData->m_aSalt.getLength() && rData->m_aInitVector.getLength() && rData->m_nIterationCount != 0 ) ? sal_True : sal_False;
bool bMustDecrypt = ( nStreamMode == UNBUFF_STREAM_DATA && bHaveEncryptData && bIsEncrypted ) ? sal_True : sal_False;
@@ -229,16 +229,13 @@ sal_Int32 SAL_CALL XUnbufferedStream::readBytes( Sequence< sal_Int8 >& aData, sa
if ( nRead > nRequestedBytes )
throw RuntimeException(
- "Should not be possible to read more then requested!",
- Reference< XInterface >() );
+ "Should not be possible to read more then requested!" );
if ( maInflater.finished() || maInflater.getLastInflateError() )
- throw ZipIOException("The stream seems to be broken!",
- Reference< XInterface >() );
+ throw ZipIOException("The stream seems to be broken!" );
if ( maInflater.needsDictionary() )
- throw ZipIOException("Dictionaries are not supported!",
- Reference< XInterface >() );
+ throw ZipIOException("Dictionaries are not supported!" );
sal_Int32 nDiff = static_cast< sal_Int32 >( mnZipEnd - mnZipCurrent );
if ( nDiff > 0 )
@@ -252,8 +249,7 @@ sal_Int32 SAL_CALL XUnbufferedStream::readBytes( Sequence< sal_Int8 >& aData, sa
sal_Int32 nZipRead = mxZipStream->readBytes( maCompBuffer, nToRead );
if ( nZipRead < nToRead )
- throw ZipIOException("No expected data!",
- Reference< XInterface >() );
+ throw ZipIOException("No expected data!" );
mnZipCurrent += nZipRead;
// maCompBuffer now has the data, check if we need to decrypt
@@ -279,8 +275,7 @@ sal_Int32 SAL_CALL XUnbufferedStream::readBytes( Sequence< sal_Int8 >& aData, sa
}
else
{
- throw ZipIOException("The stream seems to be broken!",
- Reference< XInterface >() );
+ throw ZipIOException("The stream seems to be broken!" );
}
}
}
@@ -296,8 +291,7 @@ sal_Int32 SAL_CALL XUnbufferedStream::readBytes( Sequence< sal_Int8 >& aData, sa
maCRC.update( aData );
if ( mnZipSize + maHeader.getLength() == mnMyCurrent && maCRC.getValue() != maEntry.nCrc )
- throw ZipIOException("The stream seems to be broken!",
- Reference< XInterface >() );
+ throw ZipIOException("The stream seems to be broken!" );
}
}
diff --git a/package/source/zipapi/ZipFile.cxx b/package/source/zipapi/ZipFile.cxx
index 2c8d7e856454..493a6cb49622 100644
--- a/package/source/zipapi/ZipFile.cxx
+++ b/package/source/zipapi/ZipFile.cxx
@@ -79,7 +79,7 @@ ZipFile::ZipFile( uno::Reference < XInputStream > &xInput, const uno::Reference
if ( readCEN() == -1 )
{
aEntries.clear();
- throw ZipException( "stream data looks to be broken", uno::Reference < XInterface > () );
+ throw ZipException( "stream data looks to be broken" );
}
}
}
@@ -103,7 +103,7 @@ ZipFile::ZipFile( uno::Reference < XInputStream > &xInput, const uno::Reference
else if ( readCEN() == -1 )
{
aEntries.clear();
- throw ZipException("stream data looks to be broken", uno::Reference < XInterface > () );
+ throw ZipException("stream data looks to be broken" );
}
}
}
@@ -149,8 +149,7 @@ uno::Reference< xml::crypto::XCipherContext > ZipFile::StaticGetCipher( const un
{
if (xEncryptionData->m_nDerivedKeySize < 0)
{
- throw ZipIOException("Invalid derived key length!",
- uno::Reference< XInterface >() );
+ throw ZipIOException("Invalid derived key length!" );
}
uno::Sequence< sal_Int8 > aDerivedKey( xEncryptionData->m_nDerivedKeySize );
@@ -162,8 +161,7 @@ uno::Reference< xml::crypto::XCipherContext > ZipFile::StaticGetCipher( const un
xEncryptionData->m_aSalt.getLength(),
xEncryptionData->m_nIterationCount ) )
{
- throw ZipIOException("Can not create derived key!",
- uno::Reference< XInterface >() );
+ throw ZipIOException("Can not create derived key!" );
}
if ( xEncryptionData->m_nEncAlg == xml::crypto::CipherID::AES_CBC_W3C_PADDING )
@@ -182,8 +180,7 @@ uno::Reference< xml::crypto::XCipherContext > ZipFile::StaticGetCipher( const un
}
else
{
- throw ZipIOException("Unknown cipher algorithm is requested!",
- uno::Reference< XInterface >() );
+ throw ZipIOException("Unknown cipher algorithm is requested!" );
}
}
catch( ... )
@@ -384,16 +381,14 @@ uno::Reference< XInputStream > ZipFile::StaticGetDataFromRawStream( const uno::R
throw ( packages::WrongPasswordException, ZipIOException, RuntimeException )
{
if ( !rData.is() )
- throw ZipIOException("Encrypted stream without encryption data!\n",
- uno::Reference< XInterface >() );
+ throw ZipIOException("Encrypted stream without encryption data!\n" );
if ( !rData->m_aKey.getLength() )
- throw packages::WrongPasswordException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw packages::WrongPasswordException(THROW_WHERE );
uno::Reference< XSeekable > xSeek( xStream, UNO_QUERY );
if ( !xSeek.is() )
- throw ZipIOException("The stream must be seekable!\n",
- uno::Reference< XInterface >() );
+ throw ZipIOException("The stream must be seekable!\n" );
// if we have a digest, then this file is an encrypted one and we should
// check if we can decrypt it or not
@@ -414,7 +409,7 @@ uno::Reference< XInputStream > ZipFile::StaticGetDataFromRawStream( const uno::R
xStream->readBytes( aReadBuffer, nSize );
if ( !StaticHasValidPassword( rxContext, aReadBuffer, rData ) )
- throw packages::WrongPasswordException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw packages::WrongPasswordException(THROW_WHERE );
}
return new XUnbufferedStream( rxContext, xStream, rData );
@@ -580,14 +575,13 @@ uno::Reference< XInputStream > SAL_CALL ZipFile::getDataStream( ZipEntry& rEntry
// in case no digest is provided there is no way
// to detect password correctness
if ( !rData.is() )
- throw ZipException("Encrypted stream without encryption data!\n",
- uno::Reference< XInterface >() );
+ throw ZipException("Encrypted stream without encryption data!" );
// if we have a digest, then this file is an encrypted one and we should
// check if we can decrypt it or not
OSL_ENSURE( rData->m_aDigest.getLength(), "Can't detect password correctness without digest!\n" );
if ( rData->m_aDigest.getLength() && !hasValidPassword ( rEntry, rData ) )
- throw packages::WrongPasswordException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw packages::WrongPasswordException(THROW_WHERE );
}
else
bNeedRawStream = ( rEntry.nMethod == STORED );
@@ -626,7 +620,7 @@ uno::Reference< XInputStream > SAL_CALL ZipFile::getWrappedRawStream(
::osl::MutexGuard aGuard( m_aMutex );
if ( !rData.is() )
- throw packages::NoEncryptionException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw packages::NoEncryptionException(THROW_WHERE );
if ( rEntry.nOffset <= 0 )
readLOC( rEntry );
@@ -647,7 +641,7 @@ bool ZipFile::readLOC( ZipEntry &rEntry )
aGrabber >> nTestSig;
if (nTestSig != LOCSIG)
- throw ZipIOException("Invalid LOC header (bad signature)", uno::Reference < XInterface > () );
+ throw ZipIOException("Invalid LOC header (bad signature)" );
aGrabber >> nVersion;
aGrabber >> nFlag;
aGrabber >> nHow;
@@ -701,8 +695,7 @@ bool ZipFile::readLOC( ZipEntry &rEntry )
}
if ( bBroken && !bRecoveryMode )
- throw ZipIOException("The stream seems to be broken!",
- uno::Reference< XInterface >() );
+ throw ZipIOException("The stream seems to be broken!" );
return true;
}
@@ -736,17 +729,17 @@ sal_Int32 ZipFile::findEND( )
}
catch ( IllegalArgumentException& )
{
- throw ZipException("Zip END signature not found!", uno::Reference < XInterface > () );
+ throw ZipException("Zip END signature not found!" );
}
catch ( NotConnectedException& )
{
- throw ZipException("Zip END signature not found!", uno::Reference < XInterface > () );
+ throw ZipException("Zip END signature not found!" );
}
catch ( BufferSizeExceededException& )
{
- throw ZipException("Zip END signature not found!", uno::Reference < XInterface > () );
+ throw ZipException("Zip END signature not found!" );
}
- throw ZipException("Zip END signature not found!", uno::Reference < XInterface > () );
+ throw ZipException("Zip END signature not found!" );
}
sal_Int32 ZipFile::readCEN()
@@ -767,25 +760,25 @@ sal_Int32 ZipFile::readCEN()
aGrabber >> nCenOff;
if ( nTotal * CENHDR > nCenLen )
- throw ZipException("invalid END header (bad entry count)", uno::Reference < XInterface > () );
+ throw ZipException("invalid END header (bad entry count)" );
if ( nTotal > ZIP_MAXENTRIES )
- throw ZipException("too many entries in ZIP File", uno::Reference < XInterface > () );
+ throw ZipException("too many entries in ZIP File" );
if ( nCenLen < 0 || nCenLen > nEndPos )
- throw ZipException("Invalid END header (bad central directory size)", uno::Reference < XInterface > () );
+ throw ZipException("Invalid END header (bad central directory size)" );
nCenPos = nEndPos - nCenLen;
if ( nCenOff < 0 || nCenOff > nCenPos )
- throw ZipException("Invalid END header (bad central directory size)", uno::Reference < XInterface > () );
+ throw ZipException("Invalid END header (bad central directory size)" );
nLocPos = nCenPos - nCenOff;
aGrabber.seek( nCenPos );
Sequence < sal_Int8 > aCENBuffer ( nCenLen );
sal_Int64 nRead = aGrabber.readBytes ( aCENBuffer, nCenLen );
if ( static_cast < sal_Int64 > ( nCenLen ) != nRead )
- throw ZipException ("Error reading CEN into memory buffer!", uno::Reference < XInterface > () );
+ throw ZipException ("Error reading CEN into memory buffer!" );
MemoryByteGrabber aMemGrabber ( aCENBuffer );
@@ -797,19 +790,19 @@ sal_Int32 ZipFile::readCEN()
{
aMemGrabber >> nTestSig;
if ( nTestSig != CENSIG )
- throw ZipException("Invalid CEN header (bad signature)", uno::Reference < XInterface > () );
+ throw ZipException("Invalid CEN header (bad signature)" );
aMemGrabber.skipBytes ( 2 );
aMemGrabber >> aEntry.nVersion;
if ( ( aEntry.nVersion & 1 ) == 1 )
- throw ZipException("Invalid CEN header (encrypted entry)", uno::Reference < XInterface > () );
+ throw ZipException("Invalid CEN header (encrypted entry)" );
aMemGrabber >> aEntry.nFlag;
aMemGrabber >> aEntry.nMethod;
if ( aEntry.nMethod != STORED && aEntry.nMethod != DEFLATED)
- throw ZipException("Invalid CEN header (bad compression method)", uno::Reference < XInterface > () );
+ throw ZipException("Invalid CEN header (bad compression method)" );
aMemGrabber >> aEntry.nTime;
aMemGrabber >> aEntry.nCrc;
@@ -828,7 +821,7 @@ sal_Int32 ZipFile::readCEN()
if ( nSize == 0xffffffff ||
nOffset == 0xffffffff ||
nCompressedSize == 0xffffffff ) {
- throw ZipException("PK64 zip file entry", uno::Reference < XInterface > () );
+ throw ZipException("PK64 zip file entry" );
} else {
aEntry.nCompressedSize = nCompressedSize;
aEntry.nSize = nSize;
@@ -839,13 +832,13 @@ sal_Int32 ZipFile::readCEN()
aEntry.nOffset *= -1;
if ( aEntry.nPathLen < 0 )
- throw ZipException("unexpected name length", uno::Reference < XInterface > () );
+ throw ZipException("unexpected name length" );
if ( nCommentLen < 0 )
- throw ZipException("unexpected comment length", uno::Reference < XInterface > () );
+ throw ZipException("unexpected comment length" );
if ( aEntry.nExtraLen < 0 )
- throw ZipException("unexpected extra header info length", uno::Reference < XInterface > () );
+ throw ZipException("unexpected extra header info length" );
// read always in UTF8, some tools seem not to set UTF8 bit
aEntry.sPath = OUString::intern ( (sal_Char *) aMemGrabber.getCurrentPos(),
@@ -853,14 +846,14 @@ sal_Int32 ZipFile::readCEN()
RTL_TEXTENCODING_UTF8 );
if ( !::comphelper::OStorageHelper::IsValidZipEntryFileName( aEntry.sPath, true ) )
- throw ZipException("Zip entry has an invalid name.", uno::Reference < XInterface > () );
+ throw ZipException("Zip entry has an invalid name." );
aMemGrabber.skipBytes( aEntry.nPathLen + aEntry.nExtraLen + nCommentLen );
aEntries[aEntry.sPath] = aEntry;
}
if (nCount != nTotal)
- throw ZipException("Count != Total", uno::Reference < XInterface > () );
+ throw ZipException("Count != Total" );
}
catch ( IllegalArgumentException & )
{
@@ -924,7 +917,7 @@ sal_Int32 ZipFile::recover()
// FIXME64: need to read the 64bit header instead
if ( nSize == 0xffffffff ||
nCompressedSize == 0xffffffff ) {
- throw ZipException("PK64 zip file entry", uno::Reference < XInterface > () );
+ throw ZipException("PK64 zip file entry" );
} else {
aEntry.nCompressedSize = nCompressedSize;
aEntry.nSize = nSize;
@@ -1040,15 +1033,15 @@ sal_Int32 ZipFile::recover()
}
catch ( IllegalArgumentException& )
{
- throw ZipException("Zip END signature not found!", uno::Reference < XInterface > () );
+ throw ZipException("Zip END signature not found!" );
}
catch ( NotConnectedException& )
{
- throw ZipException("Zip END signature not found!", uno::Reference < XInterface > () );
+ throw ZipException("Zip END signature not found!" );
}
catch ( BufferSizeExceededException& )
{
- throw ZipException("Zip END signature not found!", uno::Reference < XInterface > () );
+ throw ZipException("Zip END signature not found!" );
}
}
diff --git a/package/source/zipapi/ZipOutputStream.cxx b/package/source/zipapi/ZipOutputStream.cxx
index b6bc5cfaf494..cd4f9e797f64 100644
--- a/package/source/zipapi/ZipOutputStream.cxx
+++ b/package/source/zipapi/ZipOutputStream.cxx
@@ -319,7 +319,7 @@ void ZipOutputStream::writeCEN( const ZipEntry &rEntry )
throw(IOException, RuntimeException)
{
if ( !::comphelper::OStorageHelper::IsValidZipEntryFileName( rEntry.sPath, true ) )
- throw IOException("Unexpected character is used in file name.", uno::Reference< XInterface >() );
+ throw IOException("Unexpected character is used in file name." );
OString sUTF8Name = OUStringToOString( rEntry.sPath, RTL_TEXTENCODING_UTF8 );
sal_Int16 nNameLength = static_cast < sal_Int16 > ( sUTF8Name.getLength() );
@@ -359,8 +359,7 @@ void ZipOutputStream::writeCEN( const ZipEntry &rEntry )
// FIXME64: need to append a ZIP64 header instead of throwing
// We're about to silently lose people's data - which they are
// unlikely to appreciate so fail instead:
- throw IOException( "File contains streams that are too large.",
- uno::Reference< XInterface >() );
+ throw IOException( "File contains streams that are too large." );
}
Sequence < sal_Int8 > aSequence( (sal_Int8*)sUTF8Name.getStr(), sUTF8Name.getLength() );
@@ -381,8 +380,7 @@ void ZipOutputStream::writeEXT( const ZipEntry &rEntry )
// FIXME64: need to append a ZIP64 header instead of throwing
// We're about to silently lose people's data - which they are
// unlikely to appreciate so fail instead:
- throw IOException( "File contains streams that are too large.",
- uno::Reference< XInterface >() );
+ throw IOException( "File contains streams that are too large." );
}
}
@@ -390,7 +388,7 @@ sal_Int32 ZipOutputStream::writeLOC( const ZipEntry &rEntry )
throw(IOException, RuntimeException)
{
if ( !::comphelper::OStorageHelper::IsValidZipEntryFileName( rEntry.sPath, true ) )
- throw IOException("Unexpected character is used in file name.", uno::Reference< XInterface >() );
+ throw IOException("Unexpected character is used in file name." );
OString sUTF8Name = OUStringToOString( rEntry.sPath, RTL_TEXTENCODING_UTF8 );
sal_Int16 nNameLength = static_cast < sal_Int16 > ( sUTF8Name.getLength() );
@@ -435,8 +433,7 @@ sal_Int32 ZipOutputStream::writeLOC( const ZipEntry &rEntry )
// FIXME64: need to append a ZIP64 header instead of throwing
// We're about to silently lose people's data - which they are
// unlikely to appreciate so fail instead:
- throw IOException( "File contains streams that are too large.",
- uno::Reference< XInterface >() );
+ throw IOException( "File contains streams that are too large." );
}
Sequence < sal_Int8 > aSequence( (sal_Int8*)sUTF8Name.getStr(), sUTF8Name.getLength() );
diff --git a/package/source/zipapi/blowfishcontext.cxx b/package/source/zipapi/blowfishcontext.cxx
index fac26fba52d6..f60f299d7bca 100644
--- a/package/source/zipapi/blowfishcontext.cxx
+++ b/package/source/zipapi/blowfishcontext.cxx
@@ -30,8 +30,7 @@ uno::Reference< xml::crypto::XCipherContext > BlowfishCFB8CipherContext::Create(
::rtl::Reference< BlowfishCFB8CipherContext > xResult = new BlowfishCFB8CipherContext();
xResult->m_pCipher = rtl_cipher_create( rtl_Cipher_AlgorithmBF, rtl_Cipher_ModeStream );
if ( !xResult->m_pCipher )
- throw uno::RuntimeException("Can not create cipher!",
- uno::Reference< XInterface >() );
+ throw uno::RuntimeException("Can not create cipher!" );
if ( rtl_Cipher_E_None != rtl_cipher_init(
xResult->m_pCipher,
@@ -41,8 +40,7 @@ uno::Reference< xml::crypto::XCipherContext > BlowfishCFB8CipherContext::Create(
reinterpret_cast< const sal_uInt8* >( aInitVector.getConstArray() ),
aInitVector.getLength() ) )
{
- throw uno::RuntimeException("Can not initialize cipher!",
- uno::Reference< XInterface >() );
+ throw uno::RuntimeException("Can not initialize cipher!" );
}
xResult->m_bEncrypt = bEncrypt;
@@ -88,8 +86,7 @@ uno::Sequence< sal_Int8 > SAL_CALL BlowfishCFB8CipherContext::convertWithCipherC
if ( rtl_Cipher_E_None != nError )
{
- throw uno::RuntimeException("Can not decrypt/encrypt with cipher!",
- uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Can not decrypt/encrypt with cipher!" );
}
return aResult;
diff --git a/package/source/zipapi/sha1context.cxx b/package/source/zipapi/sha1context.cxx
index ba8e782eaaac..b300aba71d8d 100644
--- a/package/source/zipapi/sha1context.cxx
+++ b/package/source/zipapi/sha1context.cxx
@@ -30,8 +30,7 @@ uno::Reference< xml::crypto::XDigestContext > SHA1DigestContext::Create()
::rtl::Reference< SHA1DigestContext > xResult = new SHA1DigestContext();
xResult->m_pDigest = rtl_digest_createSHA1();
if ( !xResult->m_pDigest )
- throw uno::RuntimeException("Can not create cipher!",
- uno::Reference< XInterface >() );
+ throw uno::RuntimeException("Can not create cipher!" );
return uno::Reference< xml::crypto::XDigestContext >( xResult.get() );
}
diff --git a/package/source/zippackage/ZipPackage.cxx b/package/source/zippackage/ZipPackage.cxx
index 4524769e490f..6dd1e82064d7 100644
--- a/package/source/zippackage/ZipPackage.cxx
+++ b/package/source/zippackage/ZipPackage.cxx
@@ -352,8 +352,7 @@ void ZipPackage::parseManifest()
if ( !bManifestParsed && !m_bForceRecovery )
throw ZipIOException(
- THROW_WHERE "Could not parse manifest.xml\n",
- uno::Reference< uno::XInterface >() );
+ THROW_WHERE "Could not parse manifest.xml\n" );
const OUString sMimetype ("mimetype");
if ( m_xRootFolder->hasByName( sMimetype ) )
@@ -394,11 +393,10 @@ void ZipPackage::parseManifest()
// the mimetype stream should contain the information from manifest.xml
if ( !m_pRootFolder->GetMediaType().equals( aPackageMediatype ) )
throw ZipIOException(
- (THROW_WHERE
- "mimetype conflicts with manifest.xml, \""
- + m_pRootFolder->GetMediaType() + "\" vs. \""
- + aPackageMediatype + "\""),
- uno::Reference< uno::XInterface >() );
+ THROW_WHERE
+ "mimetype conflicts with manifest.xml, \""
+ + m_pRootFolder->GetMediaType() + "\" vs. \""
+ + aPackageMediatype + "\"" );
}
m_xRootFolder->removeByName( sMimetype );
@@ -415,15 +413,14 @@ void ZipPackage::parseManifest()
// in case of ODF1.2 documents without version in manifest.xml the property IsInconsistent
// should be checked later
throw ZipIOException(
- THROW_WHERE "there are streams not referred in manifest.xml\n",
- uno::Reference< uno::XInterface >() );
+ THROW_WHERE "there are streams not referred in manifest.xml" );
}
else if ( bDifferentStartKeyAlgorithm )
{
// all the streams should be encrypted with the same StartKey in ODF1.2
// TODO/LATER: in future the exception should be thrown
OSL_ENSURE( false, "ODF1.2 contains different StartKey Algorithms" );
- // throw ZipIOException( THROW_WHERE "More than one Start Key Generation algorithm is specified!", uno::Reference< uno::XInterface >() );
+ // throw ZipIOException( THROW_WHERE "More than one Start Key Generation algorithm is specified!" );
}
}
@@ -442,8 +439,7 @@ void ZipPackage::parseContentType()
try {
// the content type must exist in OFOPXML format!
if ( !m_xRootFolder->hasByName( aContentTypes ) )
- throw io::IOException(THROW_WHERE "Wrong format!",
- uno::Reference< uno::XInterface >() );
+ throw io::IOException(THROW_WHERE "Wrong format!" );
uno::Reference< lang::XUnoTunnel > xTunnel;
uno::Any aAny = m_xRootFolder->getByName( aContentTypes );
@@ -460,7 +456,7 @@ void ZipPackage::parseContentType()
::comphelper::OFOPXMLHelper::ReadContentTypeSequence( xInStream, m_xContext );
if ( aContentTypeInfo.getLength() != 2 )
- throw io::IOException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException(THROW_WHERE );
// set the implicit types fist
for ( nInd = 0; nInd < aContentTypeInfo[0].getLength(); nInd++ )
@@ -839,7 +835,7 @@ Any SAL_CALL ZipPackage::getByHierarchicalName( const OUString& aName )
pCurrent = pCurrent->doGetByName( sTemp ).pFolder;
}
else
- throw NoSuchElementException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw NoSuchElementException(THROW_WHERE );
nOldIndex = nIndex+1;
}
if ( bFolder )
@@ -858,7 +854,7 @@ Any SAL_CALL ZipPackage::getByHierarchicalName( const OUString& aName )
return pCurrent->getByName( sTemp );
}
else
- throw NoSuchElementException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw NoSuchElementException(THROW_WHERE );
}
}
}
@@ -1382,7 +1378,7 @@ void SAL_CALL ZipPackage::commitChanges()
xOutputStream = m_xStream->getOutputStream();
uno::Reference < XTruncate > xTruncate ( xOutputStream, UNO_QUERY );
if ( !xTruncate.is() )
- throw uno::RuntimeException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException(THROW_WHERE );
// after successful truncation the original file contents are already lost
xTruncate->truncate();
@@ -1464,7 +1460,7 @@ void SAL_CALL ZipPackage::commitChanges()
uno::Reference < XPropertySet > xPropSet ( xTempInStream, UNO_QUERY );
OSL_ENSURE( xPropSet.is(), "This is a temporary file that must implement XPropertySet!\n" );
if ( !xPropSet.is() )
- throw uno::RuntimeException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException(THROW_WHERE );
OUString sTargetFolder = m_aURL.copy ( 0, m_aURL.lastIndexOf ( static_cast < sal_Unicode > ( '/' ) ) );
Content aContent(
@@ -1545,7 +1541,7 @@ const uno::Sequence< sal_Int8 > ZipPackage::GetEncryptionKey()
else if ( m_nStartKeyGenerationID == xml::crypto::DigestID::SHA1 )
aNameToFind = PACKAGE_ENCRYPTIONDATA_SHA1UTF8;
else
- throw uno::RuntimeException(THROW_WHERE "No expected key is provided!", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException(THROW_WHERE "No expected key is provided!" );
for ( sal_Int32 nInd = 0; nInd < m_aStorageEncryptionKeys.getLength(); nInd++ )
if ( m_aStorageEncryptionKeys[nInd].Name.equals( aNameToFind ) )
@@ -1554,7 +1550,7 @@ const uno::Sequence< sal_Int8 > ZipPackage::GetEncryptionKey()
// empty keys are not allowed here
// so it is not important whether there is no key, or the key is empty, it is an error
if ( !aResult.getLength() )
- throw uno::RuntimeException(THROW_WHERE "No expected key is provided!", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException(THROW_WHERE "No expected key is provided!" );
}
else
aResult = m_aEncryptionKey;
@@ -1648,13 +1644,13 @@ void SAL_CALL ZipPackage::setPropertyValue( const OUString& aPropertyName, const
throw( UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException, std::exception )
{
if ( m_nFormat != embed::StorageFormats::PACKAGE )
- throw UnknownPropertyException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw UnknownPropertyException(THROW_WHERE );
if (aPropertyName == HAS_ENCRYPTED_ENTRIES_PROPERTY
||aPropertyName == HAS_NONENCRYPTED_ENTRIES_PROPERTY
||aPropertyName == IS_INCONSISTENT_PROPERTY
||aPropertyName == MEDIATYPE_FALLBACK_USED_PROPERTY)
- throw PropertyVetoException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw PropertyVetoException(THROW_WHERE );
else if ( aPropertyName == ENCRYPTION_KEY_PROPERTY )
{
if ( !( aValue >>= m_aEncryptionKey ) )
@@ -1737,7 +1733,7 @@ void SAL_CALL ZipPackage::setPropertyValue( const OUString& aPropertyName, const
}
}
else
- throw UnknownPropertyException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw UnknownPropertyException(THROW_WHERE );
}
Any SAL_CALL ZipPackage::getPropertyValue( const OUString& PropertyName )
@@ -1745,7 +1741,7 @@ Any SAL_CALL ZipPackage::getPropertyValue( const OUString& PropertyName )
{
// TODO/LATER: Activate the check when zip-ucp is ready
// if ( m_nFormat != embed::StorageFormats::PACKAGE )
- // throw UnknownPropertyException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ // throw UnknownPropertyException(THROW_WHERE );
Any aAny;
if ( PropertyName == ENCRYPTION_KEY_PROPERTY )
@@ -1787,7 +1783,7 @@ Any SAL_CALL ZipPackage::getPropertyValue( const OUString& PropertyName )
aAny <<= m_bMediaTypeFallbackUsed;
return aAny;
}
- throw UnknownPropertyException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw UnknownPropertyException(THROW_WHERE );
}
void SAL_CALL ZipPackage::addPropertyChangeListener( const OUString& /*aPropertyName*/, const uno::Reference< XPropertyChangeListener >& /*xListener*/ )
throw( UnknownPropertyException, WrappedTargetException, RuntimeException, std::exception )
diff --git a/package/source/zippackage/ZipPackageEntry.cxx b/package/source/zippackage/ZipPackageEntry.cxx
index ecdcdf5eaa0c..91b2e9466d07 100644
--- a/package/source/zippackage/ZipPackageEntry.cxx
+++ b/package/source/zippackage/ZipPackageEntry.cxx
@@ -68,7 +68,7 @@ void SAL_CALL ZipPackageEntry::setName( const OUString& aName )
// unfortunately no other exception than RuntimeException can be thrown here
// usually the package is used through storage implementation, the problem should be detected there
if ( !::comphelper::OStorageHelper::IsValidZipEntryFileName( aName, true ) )
- throw RuntimeException(THROW_WHERE "Unexpected character is used in file name.", uno::Reference< XInterface >() );
+ throw RuntimeException(THROW_WHERE "Unexpected character is used in file name." );
msName = aName;
@@ -96,7 +96,7 @@ void SAL_CALL ZipPackageEntry::setParent( const uno::Reference< XInterface >& xN
sal_Int64 nTest(0);
uno::Reference < XUnoTunnel > xTunnel ( xNewParent, UNO_QUERY );
if ( !xNewParent.is() || ( nTest = xTunnel->getSomething ( ZipPackageFolder::static_getImplementationId () ) ) == 0 )
- throw NoSupportException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw NoSupportException(THROW_WHERE );
ZipPackageFolder *pNewParent = reinterpret_cast < ZipPackageFolder * > ( nTest );
diff --git a/package/source/zippackage/ZipPackageFolder.cxx b/package/source/zippackage/ZipPackageFolder.cxx
index 8c2a53b7f285..e232f1afeec9 100644
--- a/package/source/zippackage/ZipPackageFolder.cxx
+++ b/package/source/zippackage/ZipPackageFolder.cxx
@@ -186,7 +186,7 @@ void SAL_CALL ZipPackageFolder::insertByName( const OUString& aName, const uno::
throw(IllegalArgumentException, ElementExistException, WrappedTargetException, uno::RuntimeException, std::exception)
{
if (hasByName(aName))
- throw ElementExistException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw ElementExistException(THROW_WHERE );
else
{
uno::Reference < XUnoTunnel > xRef;
@@ -221,7 +221,7 @@ void SAL_CALL ZipPackageFolder::removeByName( const OUString& Name )
{
ContentHash::iterator aIter = maContents.find ( Name );
if ( aIter == maContents.end() )
- throw NoSuchElementException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw NoSuchElementException(THROW_WHERE );
maContents.erase( aIter );
}
// XEnumerationAccess
@@ -247,7 +247,7 @@ ContentInfo& ZipPackageFolder::doGetByName( const OUString& aName )
{
ContentHash::iterator aIter = maContents.find ( aName );
if ( aIter == maContents.end())
- throw NoSuchElementException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw NoSuchElementException(THROW_WHERE );
return *(*aIter).second;
}
uno::Any SAL_CALL ZipPackageFolder::getByName( const OUString& aName )
@@ -278,7 +278,7 @@ void SAL_CALL ZipPackageFolder::replaceByName( const OUString& aName, const uno:
if ( hasByName( aName ) )
removeByName( aName );
else
- throw NoSuchElementException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw NoSuchElementException(THROW_WHERE );
insertByName(aName, aElement);
}
@@ -729,7 +729,7 @@ void ZipPackageFolder::saveContents( OUString &rPath, std::vector < uno::Sequenc
}
if( bWritingFailed )
- throw uno::RuntimeException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException(THROW_WHERE );
}
void ZipPackageFolder::releaseUpwardRef( void )
@@ -777,7 +777,7 @@ void SAL_CALL ZipPackageFolder::setPropertyValue( const OUString& aPropertyName,
{
// TODO/LATER: activate when zip ucp is ready
// if ( m_nFormat != embed::StorageFormats::PACKAGE )
- // throw UnknownPropertyException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ // throw UnknownPropertyException(THROW_WHERE );
aValue >>= sMediaType;
}
@@ -786,7 +786,7 @@ void SAL_CALL ZipPackageFolder::setPropertyValue( const OUString& aPropertyName,
else if ( aPropertyName == "Size" )
aValue >>= aEntry.nSize;
else
- throw UnknownPropertyException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw UnknownPropertyException(THROW_WHERE );
}
uno::Any SAL_CALL ZipPackageFolder::getPropertyValue( const OUString& PropertyName )
throw(UnknownPropertyException, WrappedTargetException, uno::RuntimeException, std::exception)
@@ -795,7 +795,7 @@ uno::Any SAL_CALL ZipPackageFolder::getPropertyValue( const OUString& PropertyNa
{
// TODO/LATER: activate when zip ucp is ready
// if ( m_nFormat != embed::StorageFormats::PACKAGE )
- // throw UnknownPropertyException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ // throw UnknownPropertyException(THROW_WHERE );
return uno::makeAny ( sMediaType );
}
@@ -804,7 +804,7 @@ uno::Any SAL_CALL ZipPackageFolder::getPropertyValue( const OUString& PropertyNa
else if ( PropertyName == "Size" )
return uno::makeAny ( aEntry.nSize );
else
- throw UnknownPropertyException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw UnknownPropertyException(THROW_WHERE );
}
void ZipPackageFolder::doInsertByName ( ZipPackageEntry *pEntry, bool bSetParent )
diff --git a/package/source/zippackage/ZipPackageFolderEnumeration.cxx b/package/source/zippackage/ZipPackageFolderEnumeration.cxx
index f8ac3b03ef68..7644cbb5576c 100644
--- a/package/source/zippackage/ZipPackageFolderEnumeration.cxx
+++ b/package/source/zippackage/ZipPackageFolderEnumeration.cxx
@@ -49,7 +49,7 @@ uno::Any SAL_CALL ZipPackageFolderEnumeration::nextElement( )
{
uno::Any aAny;
if (aIterator == rContents.end() )
- throw container::NoSuchElementException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw container::NoSuchElementException(THROW_WHERE );
aAny <<= (*aIterator).second->xTunnel;
aIterator++;
return aAny;
diff --git a/package/source/zippackage/ZipPackageStream.cxx b/package/source/zippackage/ZipPackageStream.cxx
index 90ab0a98a6c5..d05676cc09c6 100644
--- a/package/source/zippackage/ZipPackageStream.cxx
+++ b/package/source/zippackage/ZipPackageStream.cxx
@@ -148,8 +148,7 @@ uno::Reference< io::XInputStream > ZipPackageStream::GetOwnSeekStream()
xStream = ::comphelper::OSeekableInputWrapper::CheckSeekableCanWrap( xStream, m_xContext );
uno::Reference< io::XSeekable > xSeek( xStream, UNO_QUERY );
if ( !xSeek.is() )
- throw RuntimeException( THROW_WHERE "The stream must support XSeekable!",
- uno::Reference< XInterface >() );
+ throw RuntimeException( THROW_WHERE "The stream must support XSeekable!" );
m_bHasSeekable = true;
}
@@ -160,16 +159,14 @@ uno::Reference< io::XInputStream > ZipPackageStream::GetOwnSeekStream()
uno::Reference< io::XInputStream > ZipPackageStream::GetRawEncrStreamNoHeaderCopy()
{
if ( m_nStreamMode != PACKAGE_STREAM_RAW || !GetOwnSeekStream().is() )
- throw io::IOException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException(THROW_WHERE );
if ( m_xBaseEncryptionData.is() )
- throw ZipIOException(THROW_WHERE "Encrypted stream without encryption data!\n",
- uno::Reference< XInterface >() );
+ throw ZipIOException(THROW_WHERE "Encrypted stream without encryption data!" );
uno::Reference< io::XSeekable > xSeek( GetOwnSeekStream(), UNO_QUERY );
if ( !xSeek.is() )
- throw ZipIOException(THROW_WHERE "The stream must be seekable!\n",
- uno::Reference< XInterface >() );
+ throw ZipIOException(THROW_WHERE "The stream must be seekable!" );
// skip header
xSeek->seek( n_ConstHeaderSize + getInitialisationVector().getLength() +
@@ -230,7 +227,7 @@ uno::Sequence< sal_Int8 > ZipPackageStream::GetEncryptionKey( bool bUseWinEncodi
aNameToFind = bUseWinEncoding ? PACKAGE_ENCRYPTIONDATA_SHA1MS1252 : PACKAGE_ENCRYPTIONDATA_SHA1UTF8;
}
else
- throw uno::RuntimeException(THROW_WHERE "No expected key is provided!", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException(THROW_WHERE "No expected key is provided!" );
for ( sal_Int32 nInd = 0; nInd < m_aStorageEncryptionKeys.getLength(); nInd++ )
if ( m_aStorageEncryptionKeys[nInd].Name.equals( aNameToFind ) )
@@ -239,7 +236,7 @@ uno::Sequence< sal_Int8 > ZipPackageStream::GetEncryptionKey( bool bUseWinEncodi
// empty keys are not allowed here
// so it is not important whether there is no key, or the key is empty, it is an error
if ( !aResult.getLength() )
- throw uno::RuntimeException(THROW_WHERE "No expected key is provided!", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException(THROW_WHERE "No expected key is provided!" );
}
else
aResult = m_aEncryptionKey;
@@ -260,7 +257,7 @@ sal_Int32 ZipPackageStream::GetStartKeyGenID()
uno::Reference< io::XInputStream > ZipPackageStream::TryToGetRawFromDataStream( bool bAddHeaderForEncr )
{
if ( m_nStreamMode != PACKAGE_STREAM_DATA || !GetOwnSeekStream().is() || ( bAddHeaderForEncr && !bToBeEncrypted ) )
- throw packages::NoEncryptionException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw packages::NoEncryptionException(THROW_WHERE );
Sequence< sal_Int8 > aKey;
@@ -268,7 +265,7 @@ uno::Reference< io::XInputStream > ZipPackageStream::TryToGetRawFromDataStream(
{
aKey = GetEncryptionKey();
if ( !aKey.getLength() )
- throw packages::NoEncryptionException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw packages::NoEncryptionException(THROW_WHERE );
}
try
@@ -282,7 +279,7 @@ uno::Reference< io::XInputStream > ZipPackageStream::TryToGetRawFromDataStream(
ZipPackage* pPackage = new ZipPackage( m_xContext );
uno::Reference< XSingleServiceFactory > xPackageAsFactory( static_cast< XSingleServiceFactory* >( pPackage ) );
if ( !xPackageAsFactory.is() )
- throw RuntimeException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw RuntimeException(THROW_WHERE );
Sequence< Any > aArgs( 1 );
aArgs[0] <<= xTempStream;
@@ -291,14 +288,14 @@ uno::Reference< io::XInputStream > ZipPackageStream::TryToGetRawFromDataStream(
// create a new package stream
uno::Reference< XDataSinkEncrSupport > xNewPackStream( xPackageAsFactory->createInstance(), UNO_QUERY );
if ( !xNewPackStream.is() )
- throw RuntimeException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw RuntimeException(THROW_WHERE );
xNewPackStream->setDataStream( static_cast< io::XInputStream* >(
new WrapStreamForShare( GetOwnSeekStream(), rZipPackage.GetSharedMutexRef() ) ) );
uno::Reference< XPropertySet > xNewPSProps( xNewPackStream, UNO_QUERY );
if ( !xNewPSProps.is() )
- throw RuntimeException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw RuntimeException(THROW_WHERE );
// copy all the properties of this stream to the new stream
xNewPSProps->setPropertyValue("MediaType", makeAny( sMediaType ) );
@@ -315,7 +312,7 @@ uno::Reference< io::XInputStream > ZipPackageStream::TryToGetRawFromDataStream(
aRoot >>= xTunnel;
uno::Reference< container::XNameContainer > xRootNameContainer( xTunnel, UNO_QUERY );
if ( !xRootNameContainer.is() )
- throw RuntimeException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw RuntimeException(THROW_WHERE );
uno::Reference< XUnoTunnel > xNPSTunnel( xNewPackStream, UNO_QUERY );
xRootNameContainer->insertByName("dummy", makeAny( xNPSTunnel ) );
@@ -361,7 +358,7 @@ uno::Reference< io::XInputStream > ZipPackageStream::TryToGetRawFromDataStream(
{
}
- throw io::IOException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException(THROW_WHERE );
}
bool ZipPackageStream::ParsePackageRawStream()
@@ -529,7 +526,7 @@ uno::Reference< io::XInputStream > SAL_CALL ZipPackageStream::getDataStream()
// this method can not be used together with old approach
if ( m_nStreamMode == PACKAGE_STREAM_DETECT )
- throw packages::zip::ZipIOException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw packages::zip::ZipIOException(THROW_WHERE );
if ( IsPackageMember() )
{
@@ -596,12 +593,12 @@ uno::Reference< io::XInputStream > SAL_CALL ZipPackageStream::getRawStream()
// this method can not be used together with old approach
if ( m_nStreamMode == PACKAGE_STREAM_DETECT )
- throw packages::zip::ZipIOException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw packages::zip::ZipIOException(THROW_WHERE );
if ( IsPackageMember() )
{
if ( !bIsEncrypted || !GetEncryptionData().is() )
- throw packages::NoEncryptionException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw packages::NoEncryptionException(THROW_WHERE );
return rZipPackage.getZipFile().getWrappedRawStream( aEntry, GetEncryptionData(), sMediaType, rZipPackage.GetSharedMutexRef() );
}
@@ -615,7 +612,7 @@ uno::Reference< io::XInputStream > SAL_CALL ZipPackageStream::getRawStream()
return TryToGetRawFromDataStream( true );
}
- throw packages::NoEncryptionException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw packages::NoEncryptionException(THROW_WHERE );
}
void SAL_CALL ZipPackageStream::setDataStream( const uno::Reference< io::XInputStream >& aStream )
@@ -636,8 +633,7 @@ void SAL_CALL ZipPackageStream::setRawStream( const uno::Reference< io::XInputSt
uno::Reference< io::XInputStream > xNewStream = ::comphelper::OSeekableInputWrapper::CheckSeekableCanWrap( aStream, m_xContext );
uno::Reference< io::XSeekable > xSeek( xNewStream, UNO_QUERY );
if ( !xSeek.is() )
- throw RuntimeException(THROW_WHERE "The stream must support XSeekable!",
- uno::Reference< XInterface >() );
+ throw RuntimeException(THROW_WHERE "The stream must support XSeekable!" );
xSeek->seek( 0 );
uno::Reference< io::XInputStream > xOldStream = xStream;
@@ -645,7 +641,7 @@ void SAL_CALL ZipPackageStream::setRawStream( const uno::Reference< io::XInputSt
if ( !ParsePackageRawStream() )
{
xStream = xOldStream;
- throw packages::NoRawFormatException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw packages::NoRawFormatException(THROW_WHERE );
}
// the raw stream MUST have seekable access
@@ -666,7 +662,7 @@ uno::Reference< io::XInputStream > SAL_CALL ZipPackageStream::getPlainRawStream(
// this method can not be used together with old approach
if ( m_nStreamMode == PACKAGE_STREAM_DETECT )
- throw packages::zip::ZipIOException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw packages::zip::ZipIOException(THROW_WHERE );
if ( IsPackageMember() )
{
@@ -705,7 +701,7 @@ void SAL_CALL ZipPackageStream::setPropertyValue( const OUString& aPropertyName,
if ( aPropertyName == "MediaType" )
{
if ( rZipPackage.getFormat() != embed::StorageFormats::PACKAGE && rZipPackage.getFormat() != embed::StorageFormats::OFOPXML )
- throw beans::PropertyVetoException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw beans::PropertyVetoException(THROW_WHERE );
if ( aValue >>= sMediaType )
{
@@ -734,7 +730,7 @@ void SAL_CALL ZipPackageStream::setPropertyValue( const OUString& aPropertyName,
else if ( aPropertyName == "Encrypted" )
{
if ( rZipPackage.getFormat() != embed::StorageFormats::PACKAGE )
- throw beans::PropertyVetoException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw beans::PropertyVetoException(THROW_WHERE );
bool bEnc = false;
if ( aValue >>= bEnc )
@@ -758,7 +754,7 @@ void SAL_CALL ZipPackageStream::setPropertyValue( const OUString& aPropertyName,
else if ( aPropertyName == ENCRYPTION_KEY_PROPERTY )
{
if ( rZipPackage.getFormat() != embed::StorageFormats::PACKAGE )
- throw beans::PropertyVetoException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw beans::PropertyVetoException(THROW_WHERE );
uno::Sequence< sal_Int8 > aNewKey;
@@ -803,7 +799,7 @@ void SAL_CALL ZipPackageStream::setPropertyValue( const OUString& aPropertyName,
else if ( aPropertyName == STORAGE_ENCRYPTION_KEYS_PROPERTY )
{
if ( rZipPackage.getFormat() != embed::StorageFormats::PACKAGE )
- throw beans::PropertyVetoException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw beans::PropertyVetoException(THROW_WHERE );
uno::Sequence< beans::NamedValue > aKeys;
if ( !( aValue >>= aKeys ) )
@@ -854,7 +850,7 @@ void SAL_CALL ZipPackageStream::setPropertyValue( const OUString& aPropertyName,
2 );
}
else
- throw beans::UnknownPropertyException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw beans::UnknownPropertyException(THROW_WHERE );
}
Any SAL_CALL ZipPackageStream::getPropertyValue( const OUString& PropertyName )
@@ -897,7 +893,7 @@ Any SAL_CALL ZipPackageStream::getPropertyValue( const OUString& PropertyName )
return aAny;
}
else
- throw beans::UnknownPropertyException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw beans::UnknownPropertyException(THROW_WHERE );
}
void ZipPackageStream::setSize ( const sal_Int64 nNewSize )
diff --git a/package/source/zippackage/wrapstreamforshare.cxx b/package/source/zippackage/wrapstreamforshare.cxx
index 5bd868427169..4f737bfa2964 100644
--- a/package/source/zippackage/wrapstreamforshare.cxx
+++ b/package/source/zippackage/wrapstreamforshare.cxx
@@ -39,7 +39,7 @@ WrapStreamForShare::WrapStreamForShare( const uno::Reference< io::XInputStream >
if ( !m_rMutexRef.Is() || !m_xInStream.is() || !m_xSeekable.is() )
{
OSL_FAIL( "Wrong initialization of wrapping stream!\n" );
- throw uno::RuntimeException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException(THROW_WHERE );
}
}
@@ -57,7 +57,7 @@ sal_Int32 SAL_CALL WrapStreamForShare::readBytes( uno::Sequence< sal_Int8 >& aDa
::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() );
if ( !m_xInStream.is() )
- throw io::IOException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException(THROW_WHERE );
m_xSeekable->seek( m_nCurPos );
@@ -76,7 +76,7 @@ sal_Int32 SAL_CALL WrapStreamForShare::readSomeBytes( uno::Sequence< sal_Int8 >&
::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() );
if ( !m_xInStream.is() )
- throw io::IOException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException(THROW_WHERE );
m_xSeekable->seek( m_nCurPos );
@@ -95,7 +95,7 @@ void SAL_CALL WrapStreamForShare::skipBytes( sal_Int32 nBytesToSkip )
::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() );
if ( !m_xInStream.is() )
- throw io::IOException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException(THROW_WHERE );
m_xSeekable->seek( m_nCurPos );
@@ -111,7 +111,7 @@ sal_Int32 SAL_CALL WrapStreamForShare::available()
::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() );
if ( !m_xInStream.is() )
- throw io::IOException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException(THROW_WHERE );
return m_xInStream->available();
}
@@ -124,7 +124,7 @@ void SAL_CALL WrapStreamForShare::closeInput()
::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() );
if ( !m_xInStream.is() )
- throw io::IOException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException(THROW_WHERE );
// the package is the owner so it will close the stream
// m_xInStream->closeInput();
@@ -141,7 +141,7 @@ void SAL_CALL WrapStreamForShare::seek( sal_Int64 location )
::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() );
if ( !m_xInStream.is() )
- throw io::IOException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException(THROW_WHERE );
// let stream implementation do all the checking
m_xSeekable->seek( location );
@@ -156,7 +156,7 @@ sal_Int64 SAL_CALL WrapStreamForShare::getPosition()
::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() );
if ( !m_xInStream.is() )
- throw io::IOException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException(THROW_WHERE );
return m_nCurPos;
}
@@ -168,7 +168,7 @@ sal_Int64 SAL_CALL WrapStreamForShare::getLength()
::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() );
if ( !m_xInStream.is() )
- throw io::IOException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException(THROW_WHERE );
return m_xSeekable->getLength();
}
diff --git a/package/source/zippackage/zipfileaccess.cxx b/package/source/zippackage/zipfileaccess.cxx
index 7659535a3b3a..4cf2afbd7566 100644
--- a/package/source/zippackage/zipfileaccess.cxx
+++ b/package/source/zippackage/zipfileaccess.cxx
@@ -50,7 +50,7 @@ OZipFileAccess::OZipFileAccess( const uno::Reference< uno::XComponentContext >&
, m_bOwnContent( false )
{
if ( !rxContext.is() )
- throw uno::RuntimeException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException(THROW_WHERE );
}
OZipFileAccess::~OZipFileAccess()
@@ -169,10 +169,10 @@ void SAL_CALL OZipFileAccess::initialize( const uno::Sequence< uno::Any >& aArgu
::osl::MutexGuard aGuard( m_aMutexHolder->GetMutex() );
if ( m_bDisposed )
- throw lang::DisposedException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException(THROW_WHERE );
if ( m_pZipFile )
- throw uno::RuntimeException(THROW_WHERE, uno::Reference< uno::XInterface >() ); // initialization is allowed only one time
+ throw uno::RuntimeException(THROW_WHERE ); // initialization is allowed only one time
if ( !aArguments.getLength() )
throw lang::IllegalArgumentException(THROW_WHERE, uno::Reference< uno::XInterface >(), 1 );
@@ -211,12 +211,12 @@ void SAL_CALL OZipFileAccess::initialize( const uno::Sequence< uno::Any >& aArgu
throw lang::IllegalArgumentException(THROW_WHERE, uno::Reference< uno::XInterface >(), 1 );
if ( !m_xContentStream.is() )
- throw io::IOException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException(THROW_WHERE );
if ( !xSeekable.is() )
{
// TODO: after fwkbugfix02 is integrated a helper class can be used to make the stream seekable
- throw io::IOException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException(THROW_WHERE );
}
// TODO: in case xSeekable is implemented on separated XStream implementation a wrapper is required
@@ -235,14 +235,14 @@ uno::Any SAL_CALL OZipFileAccess::getByName( const OUString& aName )
::osl::MutexGuard aGuard( m_aMutexHolder->GetMutex() );
if ( m_bDisposed )
- throw lang::DisposedException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException(THROW_WHERE );
if ( !m_pZipFile )
- throw io::NotConnectedException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::NotConnectedException(THROW_WHERE );
EntryHash::iterator aIter = m_pZipFile->GetEntryHash().find( aName );
if ( aIter == m_pZipFile->GetEntryHash().end() )
- throw container::NoSuchElementException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw container::NoSuchElementException(THROW_WHERE );
uno::Reference< io::XInputStream > xEntryStream( m_pZipFile->getDataStream( (*aIter).second,
::rtl::Reference< EncryptionData >(),
@@ -250,7 +250,7 @@ uno::Any SAL_CALL OZipFileAccess::getByName( const OUString& aName )
m_aMutexHolder ) );
if ( !xEntryStream.is() )
- throw uno::RuntimeException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException(THROW_WHERE );
return uno::makeAny ( xEntryStream );
}
@@ -261,10 +261,10 @@ uno::Sequence< OUString > SAL_CALL OZipFileAccess::getElementNames()
::osl::MutexGuard aGuard( m_aMutexHolder->GetMutex() );
if ( m_bDisposed )
- throw lang::DisposedException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException(THROW_WHERE );
if ( !m_pZipFile )
- throw io::NotConnectedException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::NotConnectedException(THROW_WHERE );
uno::Sequence< OUString > aNames( m_pZipFile->GetEntryHash().size() );
sal_Int32 nLen = 0;
@@ -295,10 +295,10 @@ sal_Bool SAL_CALL OZipFileAccess::hasByName( const OUString& aName )
::osl::MutexGuard aGuard( m_aMutexHolder->GetMutex() );
if ( m_bDisposed )
- throw lang::DisposedException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException(THROW_WHERE );
if ( !m_pZipFile )
- throw io::NotConnectedException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::NotConnectedException(THROW_WHERE );
EntryHash::iterator aIter = m_pZipFile->GetEntryHash().find( aName );
@@ -311,10 +311,10 @@ uno::Type SAL_CALL OZipFileAccess::getElementType()
::osl::MutexGuard aGuard( m_aMutexHolder->GetMutex() );
if ( m_bDisposed )
- throw lang::DisposedException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException(THROW_WHERE );
if ( !m_pZipFile )
- throw io::NotConnectedException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::NotConnectedException(THROW_WHERE );
return getCppuType( ( const uno::Reference< io::XInputStream >* )NULL );
}
@@ -325,10 +325,10 @@ sal_Bool SAL_CALL OZipFileAccess::hasElements()
::osl::MutexGuard aGuard( m_aMutexHolder->GetMutex() );
if ( m_bDisposed )
- throw lang::DisposedException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException(THROW_WHERE );
if ( !m_pZipFile )
- throw io::NotConnectedException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::NotConnectedException(THROW_WHERE );
return ( m_pZipFile->GetEntryHash().size() != 0 );
}
@@ -342,10 +342,10 @@ uno::Reference< io::XInputStream > SAL_CALL OZipFileAccess::getStreamByPattern(
::osl::MutexGuard aGuard( m_aMutexHolder->GetMutex() );
if ( m_bDisposed )
- throw lang::DisposedException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException(THROW_WHERE );
if ( !m_pZipFile )
- throw io::NotConnectedException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::NotConnectedException(THROW_WHERE );
// Code to compare strings by patterns
uno::Sequence< OUString > aPattern = GetPatternsFromString_Impl( aPatternString );
@@ -360,12 +360,12 @@ uno::Reference< io::XInputStream > SAL_CALL OZipFileAccess::getStreamByPattern(
m_aMutexHolder ) );
if ( !xEntryStream.is() )
- throw uno::RuntimeException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException(THROW_WHERE );
return xEntryStream;
}
}
- throw container::NoSuchElementException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw container::NoSuchElementException(THROW_WHERE );
}
// XComponent
@@ -375,7 +375,7 @@ void SAL_CALL OZipFileAccess::dispose()
::osl::MutexGuard aGuard( m_aMutexHolder->GetMutex() );
if ( m_bDisposed )
- throw lang::DisposedException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException(THROW_WHERE );
if ( m_pListenersContainer )
{
@@ -406,7 +406,7 @@ void SAL_CALL OZipFileAccess::addEventListener( const uno::Reference< lang::XEve
::osl::MutexGuard aGuard( m_aMutexHolder->GetMutex() );
if ( m_bDisposed )
- throw lang::DisposedException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException(THROW_WHERE );
if ( !m_pListenersContainer )
m_pListenersContainer = new ::cppu::OInterfaceContainerHelper( m_aMutexHolder->GetMutex() );
@@ -419,7 +419,7 @@ void SAL_CALL OZipFileAccess::removeEventListener( const uno::Reference< lang::X
::osl::MutexGuard aGuard( m_aMutexHolder->GetMutex() );
if ( m_bDisposed )
- throw lang::DisposedException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException(THROW_WHERE );
if ( m_pListenersContainer )
m_pListenersContainer->removeInterface( xListener );
diff --git a/pyuno/source/loader/pyuno_loader.cxx b/pyuno/source/loader/pyuno_loader.cxx
index 11b2c78379d7..ead7dbdd2c38 100644
--- a/pyuno/source/loader/pyuno_loader.cxx
+++ b/pyuno/source/loader/pyuno_loader.cxx
@@ -72,7 +72,7 @@ static void raiseRuntimeExceptionWhenNeeded() throw ( RuntimeException )
buf.appendAscii( "python-loader:" );
if( a.hasValue() )
buf.append( ((com::sun::star::uno::Exception *)a.getValue())->Message );
- throw RuntimeException( buf.makeStringAndClear(), Reference< XInterface> () );
+ throw RuntimeException( buf.makeStringAndClear() );
}
}
@@ -84,9 +84,7 @@ static PyRef getLoaderModule() throw( RuntimeException )
raiseRuntimeExceptionWhenNeeded();
if( !module.is() )
{
- throw RuntimeException(
- OUString( "pythonloader: Couldn't load pythonloader module" ),
- Reference< XInterface > () );
+ throw RuntimeException( "pythonloader: Couldn't load pythonloader module" );
}
return PyRef( PyModule_GetDict( module.get() ));
}
@@ -100,7 +98,7 @@ static PyRef getObjectFromLoaderModule( const char * func )
OUStringBuffer buf;
buf.appendAscii( "pythonloader: couldn't find core element pythonloader." );
buf.appendAscii( func );
- throw RuntimeException(buf.makeStringAndClear(),Reference< XInterface >());
+ throw RuntimeException(buf.makeStringAndClear());
}
return object;
}
diff --git a/pyuno/source/module/pyuno.cxx b/pyuno/source/module/pyuno.cxx
index 701454349ef1..9a8d6f0d5068 100644
--- a/pyuno/source/module/pyuno.cxx
+++ b/pyuno/source/module/pyuno.cxx
@@ -332,7 +332,7 @@ PyObject *PyUNO_invoke( PyObject *object, const char *name , PyObject *args )
buf.append( "Attribute " );
buf.append( attrName );
buf.append( " unknown" );
- throw RuntimeException( buf.makeStringAndClear(), Reference< XInterface > () );
+ throw RuntimeException( buf.makeStringAndClear() );
}
callable = PyUNO_callable_new (
me->members->xInvocation,
@@ -748,9 +748,7 @@ PyObject* PyUNO_new_UNCHECKED (
tmp_interface = ssf->createInstanceWithArguments(arguments);
tmp_invocation.set(tmp_interface, UNO_QUERY);
if (!tmp_invocation.is() && tmp_interface.is()) {
- throw RuntimeException(
- "XInvocation2 not implemented, cannot interact with object",
- Reference<XInterface>());
+ throw RuntimeException("XInvocation2 not implemented, cannot interact with object");
}
}
if (!tmp_interface.is())
diff --git a/pyuno/source/module/pyuno_adapter.cxx b/pyuno/source/module/pyuno_adapter.cxx
index 934f3130d3a9..30b89ffb533a 100644
--- a/pyuno/source/module/pyuno_adapter.cxx
+++ b/pyuno/source/module/pyuno_adapter.cxx
@@ -123,8 +123,7 @@ Sequence< sal_Int16 > Adapter::getOutIndexes( const OUString & functionName )
if( !introspection.is() )
{
throw RuntimeException(
- OUString( "pyuno bridge: Couldn't inspect uno adapter ( the python class must implement com.sun.star.lang.XTypeProvider !)" ),
- Reference< XInterface > () );
+ "pyuno bridge: Couldn't inspect uno adapter ( the python class must implement com.sun.star.lang.XTypeProvider !)" );
}
Reference< XIdlMethod > method = introspection->getMethod(
@@ -132,8 +131,7 @@ Sequence< sal_Int16 > Adapter::getOutIndexes( const OUString & functionName )
if( ! method.is( ) )
{
throw RuntimeException(
- "pyuno bridge: Couldn't get reflection for method " + functionName,
- Reference< XInterface > () );
+ "pyuno bridge: Couldn't get reflection for method " + functionName );
}
Sequence< ParamInfo > seqInfo = method->getParameterInfos();
@@ -263,8 +261,7 @@ Any Adapter::invoke( const OUString &aFunctionName,
if( ! ( ret >>= seq ) )
{
throw RuntimeException(
- "pyuno bridge: Couldn't extract out parameters for method " + aFunctionName,
- Reference< XInterface > () );
+ "pyuno bridge: Couldn't extract out parameters for method " + aFunctionName );
}
if( aOutParamIndex.getLength() +1 != seq.getLength() )
@@ -352,7 +349,7 @@ void Adapter::setValue( const OUString & aPropertyName, const Any & value )
OUStringBuffer buf;
buf.appendAscii( "pyuno::Adapater: Property " ).append( aPropertyName );
buf.appendAscii( " is unknown." );
- throw UnknownPropertyException( buf.makeStringAndClear(), Reference< XInterface > () );
+ throw UnknownPropertyException( buf.makeStringAndClear() );
}
PyThreadAttach guard( mInterpreter );
@@ -389,7 +386,7 @@ Any Adapter::getValue( const OUString & aPropertyName )
OUStringBuffer buf;
buf.appendAscii( "pyuno::Adapater: Property " ).append( aPropertyName );
buf.appendAscii( " is unknown." );
- throw UnknownPropertyException( buf.makeStringAndClear(), Reference< XInterface > () );
+ throw UnknownPropertyException( buf.makeStringAndClear() );
}
ret = runtime.pyObject2Any( pyRef );
}
diff --git a/pyuno/source/module/pyuno_except.cxx b/pyuno/source/module/pyuno_except.cxx
index 63b1e68e9b54..08a0728c739d 100644
--- a/pyuno/source/module/pyuno_except.cxx
+++ b/pyuno/source/module/pyuno_except.cxx
@@ -89,7 +89,7 @@ static PyRef createClass( const OUString & name, const Runtime &runtime )
OUStringBuffer buf;
buf.appendAscii( "pyuno.getClass: uno exception " );
buf.append(name).appendAscii( " is unknown" );
- throw RuntimeException( buf.makeStringAndClear(), Reference< XInterface > () );
+ throw RuntimeException( buf.makeStringAndClear() );
}
bool isStruct = desc.get()->eTypeClass == typelib_TypeClass_STRUCT;
@@ -102,7 +102,7 @@ static PyRef createClass( const OUString & name, const Runtime &runtime )
buf.appendAscii(
typeClassToString( (com::sun::star::uno::TypeClass) desc.get()->eTypeClass));
buf.appendAscii( ", expected EXCEPTION, STRUCT or INTERFACE" );
- throw RuntimeException( buf.makeStringAndClear(), Reference< XInterface>() );
+ throw RuntimeException( buf.makeStringAndClear() );
}
// retrieve base class
diff --git a/pyuno/source/module/pyuno_module.cxx b/pyuno/source/module/pyuno_module.cxx
index 27986e54b1ac..6c55a5053ca0 100644
--- a/pyuno/source/module/pyuno_module.cxx
+++ b/pyuno/source/module/pyuno_module.cxx
@@ -96,7 +96,7 @@ public:
, nPosConsumed (0)
{
if ( ! used )
- throw RuntimeException("pyuno._createUnoStructHelper failed to create new dictionary", Reference< XInterface > ());
+ throw RuntimeException("pyuno._createUnoStructHelper failed to create new dictionary");
}
~fillStructState()
{
@@ -120,7 +120,7 @@ public:
buf.append(pos);
}
buf.appendAscii( " initialised multiple times.");
- throw RuntimeException(buf.makeStringAndClear(), Reference< XInterface > ());
+ throw RuntimeException(buf.makeStringAndClear());
}
initialised[key] = true;
if ( pos >= 0 )
@@ -191,7 +191,7 @@ static void fillStruct(
buf.appendAscii( "' of struct type '");
buf.append(pCompType->aBase.pTypeName);
buf.appendAscii( "' not given a value.");
- throw RuntimeException(buf.makeStringAndClear(), Reference< XInterface > ());
+ throw RuntimeException(buf.makeStringAndClear());
}
}
}
@@ -425,7 +425,7 @@ static PyObject *createUnoStructHelper(
buf.append( state.getCntConsumed() );
buf.appendAscii( ", got " );
buf.append( (sal_Int32) PyTuple_Size(initializer) );
- throw RuntimeException( buf.makeStringAndClear(), Reference< XInterface > ());
+ throw RuntimeException( buf.makeStringAndClear());
}
ret = PyRef( PyTuple_Pack(2, returnCandidate.get(), state.getUsed()), SAL_NO_ACQUIRE);
}
@@ -524,7 +524,7 @@ static PyObject *getConstantByName(
OUStringBuffer buf;
buf.appendAscii( "pyuno.getConstantByName: " ).append( typeName );
buf.appendAscii( "is not a constant" );
- throw RuntimeException(buf.makeStringAndClear(), Reference< XInterface > () );
+ throw RuntimeException(buf.makeStringAndClear() );
}
PyRef constant = runtime.any2PyObject( td->getConstantValue() );
ret = constant.getAcquired();
@@ -534,7 +534,7 @@ static PyObject *getConstantByName(
{
// to the python programmer, this is a runtime exception,
// do not support tweakings with the type system
- RuntimeException runExc( e.Message, Reference< XInterface > () );
+ RuntimeException runExc( e.Message );
raisePyExceptionWithAny( makeAny( runExc ) );
}
catch(const com::sun::star::script::CannotConvertException & e)
@@ -674,7 +674,7 @@ static PyObject *systemPathToFileUrl(
buf.append( (sal_Int32) e );
buf.appendAscii( ")" );
raisePyExceptionWithAny(
- makeAny( RuntimeException( buf.makeStringAndClear(), Reference< XInterface > () )));
+ makeAny( RuntimeException( buf.makeStringAndClear() )));
return NULL;
}
return ustring2PyUnicode( url ).getAcquired();
@@ -700,7 +700,7 @@ static PyObject * fileUrlToSystemPath(
buf.append( (sal_Int32) e );
buf.appendAscii( ")" );
raisePyExceptionWithAny(
- makeAny( RuntimeException( buf.makeStringAndClear(), Reference< XInterface > () )));
+ makeAny( RuntimeException( buf.makeStringAndClear() )));
return NULL;
}
return ustring2PyUnicode( sysPath ).getAcquired();
diff --git a/pyuno/source/module/pyuno_runtime.cxx b/pyuno/source/module/pyuno_runtime.cxx
index 93c60205c54b..49a932329823 100644
--- a/pyuno/source/module/pyuno_runtime.cxx
+++ b/pyuno/source/module/pyuno_runtime.cxx
@@ -134,22 +134,21 @@ static void getRuntimeImpl( PyRef & globalDict, PyRef &runtimeImpl )
PyThreadState * state = PyThreadState_Get();
if( ! state )
{
- throw RuntimeException( OUString( "python global interpreter must be held (thread must be attached)" ),
- Reference< XInterface > () );
+ throw RuntimeException( "python global interpreter must be held (thread must be attached)" );
}
PyObject* pModule = PyImport_AddModule("__main__");
if (!pModule)
{
- throw RuntimeException("can't import __main__ module", Reference< XInterface > ());
+ throw RuntimeException("can't import __main__ module");
}
globalDict = PyRef( PyModule_GetDict(pModule));
if( ! globalDict.is() ) // FATAL !
{
- throw RuntimeException("can't find __main__ module", Reference< XInterface > ());
+ throw RuntimeException("can't find __main__ module");
}
runtimeImpl = PyDict_GetItemString( globalDict.get() , "pyuno_runtime" );
}
@@ -173,7 +172,7 @@ static PyRef importUnoModule( ) throw ( RuntimeException )
buf.appendAscii( PyStr_AsString( valueRep.get())).appendAscii( ", traceback follows\n" );
buf.appendAscii( PyStr_AsString( str.get() ) );
buf.appendAscii( ")" );
- throw RuntimeException( buf.makeStringAndClear(), Reference< XInterface > () );
+ throw RuntimeException( buf.makeStringAndClear() );
}
PyRef dict( PyModule_GetDict( module.get() ) );
return dict;
@@ -254,9 +253,7 @@ PyRef stRuntimeImpl::create( const Reference< XComponentContext > &ctx )
{
RuntimeImpl *me = PyObject_New (RuntimeImpl, &RuntimeImpl_Type);
if( ! me )
- throw RuntimeException(
- OUString( "cannot instantiate pyuno::RuntimeImpl" ),
- Reference< XInterface > () );
+ throw RuntimeException( "cannot instantiate pyuno::RuntimeImpl" );
me->cargo = 0;
// must use a different struct here, as the PyObject_New
// makes C++ unusable
@@ -272,15 +269,11 @@ PyRef stRuntimeImpl::create( const Reference< XComponentContext > &ctx )
ctx ),
UNO_QUERY );
if( ! c->xInvocation.is() )
- throw RuntimeException(
- OUString( "pyuno: couldn't instantiate invocation service" ),
- Reference< XInterface > () );
+ throw RuntimeException( "pyuno: couldn't instantiate invocation service" );
c->xTypeConverter = Converter::create(ctx);
if( ! c->xTypeConverter.is() )
- throw RuntimeException(
- OUString( "pyuno: couldn't instantiate typeconverter service" ),
- Reference< XInterface > () );
+ throw RuntimeException( "pyuno: couldn't instantiate typeconverter service" );
c->xCoreReflection = theCoreReflection::get(ctx);
@@ -291,9 +284,7 @@ PyRef stRuntimeImpl::create( const Reference< XComponentContext > &ctx )
Any a = ctx->getValueByName("/singletons/com.sun.star.reflection.theTypeDescriptionManager");
a >>= c->xTdMgr;
if( ! c->xTdMgr.is() )
- throw RuntimeException(
- OUString( "pyuno: couldn't retrieve typedescriptionmanager" ),
- Reference< XInterface > () );
+ throw RuntimeException( "pyuno: couldn't retrieve typedescriptionmanager" );
me->cargo =c;
return PyRef( reinterpret_cast< PyObject * > ( me ), SAL_NO_ACQUIRE );
@@ -318,8 +309,7 @@ void Runtime::initialize( const Reference< XComponentContext > & ctx )
if( runtime.is() && impl->cargo->valid )
{
- throw RuntimeException("pyuno runtime has already been initialized before",
- Reference< XInterface > () );
+ throw RuntimeException("pyuno runtime has already been initialized before" );
}
PyRef keep( RuntimeImpl::create( ctx ) );
PyDict_SetItemString( globalDict.get(), "pyuno_runtime" , keep.get() );
@@ -343,9 +333,8 @@ Runtime::Runtime() throw( RuntimeException )
if( ! runtime.is() )
{
throw RuntimeException(
- OUString( "pyuno runtime is not initialized, "
- "(the pyuno.bootstrap needs to be called before using any uno classes)"),
- Reference< XInterface > () );
+ "pyuno runtime is not initialized, "
+ "(the pyuno.bootstrap needs to be called before using any uno classes)" );
}
impl = reinterpret_cast< RuntimeImpl * > (runtime.get());
Py_XINCREF( runtime.get() );
@@ -378,8 +367,7 @@ PyRef Runtime::any2PyObject (const Any &a ) const
{
if( ! impl->cargo->valid )
{
- throw RuntimeException("pyuno runtime must be initialized before calling any2PyObject",
- Reference< XInterface > () );
+ throw RuntimeException("pyuno runtime must be initialized before calling any2PyObject" );
}
switch (a.getValueTypeClass ())
@@ -486,7 +474,7 @@ PyRef Runtime::any2PyObject (const Any &a ) const
buf.appendAscii( "Any carries enum " );
buf.append( a.getValueType().getTypeName());
buf.appendAscii( " with invalid value " ).append( l );
- throw RuntimeException( buf.makeStringAndClear() , Reference< XInterface > () );
+ throw RuntimeException( buf.makeStringAndClear() );
}
case typelib_TypeClass_EXCEPTION:
case typelib_TypeClass_STRUCT:
@@ -501,7 +489,7 @@ PyRef Runtime::any2PyObject (const Any &a ) const
OUStringBuffer buf;
buf.appendAscii( "Couldn't instantiate python representation of structered UNO type " );
buf.append( a.getValueType().getTypeName() );
- throw RuntimeException( buf.makeStringAndClear(), Reference< XInterface > () );
+ throw RuntimeException( buf.makeStringAndClear() );
}
if( com::sun::star::uno::TypeClass_EXCEPTION == a.getValueTypeClass() )
@@ -578,7 +566,7 @@ PyRef Runtime::any2PyObject (const Any &a ) const
OUStringBuffer buf;
buf.appendAscii( "Unknown UNO type class " );
buf.append( (sal_Int32 ) a.getValueTypeClass() );
- throw RuntimeException(buf.makeStringAndClear( ), Reference< XInterface > () );
+ throw RuntimeException(buf.makeStringAndClear( ) );
}
}
}
@@ -631,8 +619,7 @@ Any Runtime::pyObject2Any ( const PyRef & source, enum ConversionMode mode ) con
{
if( ! impl->cargo->valid )
{
- throw RuntimeException("pyuno runtime must be initialized before calling any2PyObject",
- Reference< XInterface > () );
+ throw RuntimeException("pyuno runtime must be initialized before calling any2PyObject" );
}
Any a;
@@ -770,8 +757,7 @@ Any Runtime::pyObject2Any ( const PyRef & source, enum ConversionMode mode ) con
else
{
throw RuntimeException(
- "struct or exception wrapper does not support XMaterialHolder",
- Reference< XInterface > () );
+ "struct or exception wrapper does not support XMaterialHolder" );
}
}
else if( PyObject_IsInstance( o, getPyUnoClass().get() ) )
@@ -788,8 +774,7 @@ Any Runtime::pyObject2Any ( const PyRef & source, enum ConversionMode mode ) con
if (!my_mh.is ())
{
throw RuntimeException(
- "struct wrapper does not support XMaterialHolder",
- Reference< XInterface > () );
+ "struct wrapper does not support XMaterialHolder" );
}
else
a = my_mh->getMaterial ();
@@ -825,9 +810,8 @@ Any Runtime::pyObject2Any ( const PyRef & source, enum ConversionMode mode ) con
else
{
throw RuntimeException(
- OUString( "uno.Any instance not accepted during method call, "
- "use uno.invoke instead" ),
- Reference< XInterface > () );
+ "uno.Any instance not accepted during method call, "
+ "use uno.invoke instead" );
}
}
else
@@ -883,7 +867,7 @@ Any Runtime::pyObject2Any ( const PyRef & source, enum ConversionMode mode ) con
else
{
OUString const msg(lcl_ExceptionMessage(o, 0));
- throw RuntimeException(msg, Reference<XInterface>());
+ throw RuntimeException(msg);
}
}
}
@@ -1017,9 +1001,7 @@ PyThreadAttach::PyThreadAttach( PyInterpreterState *interp)
{
tstate = PyThreadState_New( interp );
if( !tstate )
- throw RuntimeException(
- OUString( "Couldn't create a pythreadstate" ),
- Reference< XInterface > () );
+ throw RuntimeException( "Couldn't create a pythreadstate" );
PyEval_AcquireThread( tstate);
// set LC_NUMERIC to "C"
const char * oldLocale =
diff --git a/pyuno/source/module/pyuno_type.cxx b/pyuno/source/module/pyuno_type.cxx
index 80d1fdb28f57..0d8e63050fd1 100644
--- a/pyuno/source/module/pyuno_type.cxx
+++ b/pyuno/source/module/pyuno_type.cxx
@@ -132,15 +132,13 @@ sal_Unicode PyChar2Unicode( PyObject *obj ) throw ( RuntimeException )
if( ! PyUnicode_Check( value.get() ) )
{
throw RuntimeException(
- "attribute value of uno.Char is not a unicode string",
- Reference< XInterface > () );
+ "attribute value of uno.Char is not a unicode string" );
}
if( PyUnicode_GetSize( value.get() ) < 1 )
{
throw RuntimeException(
- "uno.Char contains an empty unicode string",
- Reference< XInterface > () );
+ "uno.Char contains an empty unicode string");
}
sal_Unicode c = (sal_Unicode)PyUnicode_AsUnicode( value.get() )[0];
@@ -155,8 +153,7 @@ Any PyEnum2Enum( PyObject *obj ) throw ( RuntimeException )
if( !PyStr_Check( typeName.get() ) || ! PyStr_Check( value.get() ) )
{
throw RuntimeException(
- "attributes typeName and/or value of uno.Enum are not strings",
- Reference< XInterface > () );
+ "attributes typeName and/or value of uno.Enum are not strings" );
}
OUString strTypeName( OUString::createFromAscii( PyStr_AsString( typeName.get() ) ) );
@@ -172,7 +169,7 @@ Any PyEnum2Enum( PyObject *obj ) throw ( RuntimeException )
buf.appendAscii(
typeClassToString( (com::sun::star::uno::TypeClass) desc.get()->eTypeClass));
buf.appendAscii( ", expected ENUM" );
- throw RuntimeException( buf.makeStringAndClear(), Reference< XInterface> () );
+ throw RuntimeException( buf.makeStringAndClear() );
}
desc.makeComplete();
@@ -191,7 +188,7 @@ Any PyEnum2Enum( PyObject *obj ) throw ( RuntimeException )
OUStringBuffer buf;
buf.appendAscii( "value " ).appendAscii( stringValue ).appendAscii( "is unknown in enum " );
buf.appendAscii( PyStr_AsString( typeName.get() ) );
- throw RuntimeException( buf.makeStringAndClear(), Reference<XInterface> () );
+ throw RuntimeException( buf.makeStringAndClear() );
}
ret = Any( &pEnumDesc->pEnumValues[i], desc.get()->pWeakRef );
}
@@ -199,7 +196,7 @@ Any PyEnum2Enum( PyObject *obj ) throw ( RuntimeException )
{
OUStringBuffer buf;
buf.appendAscii( "enum " ).appendAscii( PyStr_AsString(typeName.get()) ).appendAscii( " is unknown" );
- throw RuntimeException( buf.makeStringAndClear(), Reference< XInterface> () );
+ throw RuntimeException( buf.makeStringAndClear() );
}
return ret;
}
@@ -211,8 +208,7 @@ Type PyType2Type( PyObject * o ) throw(RuntimeException )
if( !PyStr_Check( pyName.get() ) )
{
throw RuntimeException(
- "type object does not have typeName property",
- Reference< XInterface > () );
+ "type object does not have typeName property" );
}
PyRef pyTC( PyObject_GetAttrString( o, "typeClass" ), SAL_NO_ACQUIRE );
@@ -224,8 +220,7 @@ Type PyType2Type( PyObject * o ) throw(RuntimeException )
{
OUStringBuffer buf;
buf.appendAscii( "type " ).append(name).appendAscii( " is unknown" );
- throw RuntimeException(
- buf.makeStringAndClear(), Reference< XInterface > () );
+ throw RuntimeException( buf.makeStringAndClear() );
}
if( desc.get()->eTypeClass != (typelib_TypeClass) *(sal_Int32*)enumValue.getValue() )
{
@@ -234,8 +229,7 @@ Type PyType2Type( PyObject * o ) throw(RuntimeException )
buf.appendAscii( typeClassToString( (TypeClass) desc.get()->eTypeClass) );
buf.appendAscii( ", but type got construct with typeclass " );
buf.appendAscii( typeClassToString( (TypeClass) *(sal_Int32*)enumValue.getValue() ) );
- throw RuntimeException(
- buf.makeStringAndClear(), Reference< XInterface > () );
+ throw RuntimeException( buf.makeStringAndClear() );
}
return desc.get()->pWeakRef;
}
diff --git a/pyuno/source/module/pyuno_util.cxx b/pyuno/source/module/pyuno_util.cxx
index 6d88afe695f6..ddfbb0aca534 100644
--- a/pyuno/source/module/pyuno_util.cxx
+++ b/pyuno/source/module/pyuno_util.cxx
@@ -108,7 +108,7 @@ PyRef getObjectFromUnoModule( const Runtime &runtime, const char * func )
OUStringBuffer buf;
buf.appendAscii( "couldn't find core function " );
buf.appendAscii( func );
- throw RuntimeException(buf.makeStringAndClear(),Reference< XInterface >());
+ throw RuntimeException(buf.makeStringAndClear());
}
return object;
}
diff --git a/remotebridges/source/unourl_resolver/unourl_resolver.cxx b/remotebridges/source/unourl_resolver/unourl_resolver.cxx
index b7070908e35e..e4fefad7467b 100644
--- a/remotebridges/source/unourl_resolver/unourl_resolver.cxx
+++ b/remotebridges/source/unourl_resolver/unourl_resolver.cxx
@@ -132,7 +132,7 @@ Reference< XInterface > ResolverImpl::resolve( const OUString & rUnoUrl )
UNO_QUERY );
if (! xConnector.is())
- throw RuntimeException("no connector!", Reference< XInterface >() );
+ throw RuntimeException("no connector!" );
Reference< XConnection > xConnection( xConnector->connect( aConnectDescr ) );
diff --git a/sc/source/filter/oox/workbookhelper.cxx b/sc/source/filter/oox/workbookhelper.cxx
index 910d7583f1d4..4648c25d59e7 100644
--- a/sc/source/filter/oox/workbookhelper.cxx
+++ b/sc/source/filter/oox/workbookhelper.cxx
@@ -548,7 +548,7 @@ void WorkbookGlobals::initialize( bool bWorkbookFile )
}
if (!mpDoc)
- throw RuntimeException("Workbookhelper::getScDocument(): Failed to access ScDocument from model", Reference<XInterface>());
+ throw RuntimeException("Workbookhelper::getScDocument(): Failed to access ScDocument from model");
mxDocImport.reset(new ScDocumentImport(*mpDoc));
diff --git a/sc/source/ui/unoobj/confuno.cxx b/sc/source/ui/unoobj/confuno.cxx
index 58f8b891c614..1f2637257801 100644
--- a/sc/source/ui/unoobj/confuno.cxx
+++ b/sc/source/ui/unoobj/confuno.cxx
@@ -275,8 +275,7 @@ void SAL_CALL ScDocumentConfiguration::setPropertyValue(
if ( !pDocShell->SetModifyPasswordInfo( aInfo ) )
throw beans::PropertyVetoException(
- OUString( "The hash is not allowed to be changed now!" ),
- uno::Reference< uno::XInterface >() );
+ "The hash is not allowed to be changed now!" );
}
else if ( aPropertyName.equalsAscii( SC_UNO_EMBED_FONTS ) )
{
diff --git a/sc/source/ui/unoobj/linkuno.cxx b/sc/source/ui/unoobj/linkuno.cxx
index 86e7fc84581d..24769484d77d 100644
--- a/sc/source/ui/unoobj/linkuno.cxx
+++ b/sc/source/ui/unoobj/linkuno.cxx
@@ -1197,9 +1197,8 @@ uno::Sequence< uno::Sequence< uno::Any > > ScDDELinkObj::getResults( )
if ( !bSuccess )
{
- throw uno::RuntimeException( OUString(
- "ScDDELinkObj::getResults: failed to get results!" ),
- uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException(
+ "ScDDELinkObj::getResults: failed to get results!" );
}
return aReturn;
@@ -1229,9 +1228,8 @@ void ScDDELinkObj::setResults( const uno::Sequence< uno::Sequence< uno::Any > >&
if ( !bSuccess )
{
- throw uno::RuntimeException( OUString(
- "ScDDELinkObj::setResults: failed to set results!" ),
- uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException(
+ "ScDDELinkObj::setResults: failed to set results!" );
}
}
@@ -1446,9 +1444,8 @@ uno::Reference< sheet::XDDELink > ScDDELinksObj::addDDELink(
if ( !xLink.is() )
{
- throw uno::RuntimeException( OUString(
- "ScDDELinksObj::addDDELink: cannot add DDE link!" ),
- uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException(
+ "ScDDELinksObj::addDDELink: cannot add DDE link!" );
}
return xLink;
diff --git a/sc/source/ui/unoobj/servuno.cxx b/sc/source/ui/unoobj/servuno.cxx
index f5eeccee27e5..7227f056fc95 100644
--- a/sc/source/ui/unoobj/servuno.cxx
+++ b/sc/source/ui/unoobj/servuno.cxx
@@ -85,7 +85,7 @@ public:
{
ScDocument* pDoc = mpDocShell->GetDocument();
if ( !pDoc )
- throw uno::RuntimeException("", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException();
uno::Sequence< uno::Any > aArgs(2);
// access the application object ( parent for workbook )
diff --git a/sc/source/ui/vba/excelvbahelper.cxx b/sc/source/ui/vba/excelvbahelper.cxx
index d57988c5f92c..ef7ebc1ad8d8 100644
--- a/sc/source/ui/vba/excelvbahelper.cxx
+++ b/sc/source/ui/vba/excelvbahelper.cxx
@@ -81,7 +81,7 @@ ScDocShell* GetDocShellFromRange( const uno::Reference< uno::XInterface >& xRang
ScCellRangesBase* pScCellRangesBase = ScCellRangesBase::getImplementation( xRange );
if ( !pScCellRangesBase )
{
- throw uno::RuntimeException("Failed to access underlying doc shell uno range object", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Failed to access underlying doc shell uno range object" );
}
return pScCellRangesBase->GetDocShell();
}
diff --git a/sc/source/ui/vba/vbaapplication.cxx b/sc/source/ui/vba/vbaapplication.cxx
index aed59b724ec1..0a4e66bec4ab 100644
--- a/sc/source/ui/vba/vbaapplication.cxx
+++ b/sc/source/ui/vba/vbaapplication.cxx
@@ -251,9 +251,7 @@ ScVbaApplication::getSelection() throw (uno::RuntimeException, std::exception)
if (!aSelection.is())
{
- throw uno::RuntimeException(
- OUString("failed to obtain current selection"),
- uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "failed to obtain current selection" );
}
uno::Reference< lang::XServiceInfo > xServiceInfo( aSelection, uno::UNO_QUERY_THROW );
@@ -292,8 +290,7 @@ ScVbaApplication::getSelection() throw (uno::RuntimeException, std::exception)
}
else
{
- throw uno::RuntimeException( sImplementationName + OUString(
- " not supported"), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( sImplementationName + OUString(" not supported" ) );
}
}
@@ -304,10 +301,10 @@ ScVbaApplication::getActiveCell() throw (uno::RuntimeException, std::exception )
uno::Reference< table::XCellRange > xRange( xView->getActiveSheet(), ::uno::UNO_QUERY_THROW);
ScTabViewShell* pViewShell = excel::getCurrentBestViewShell(mxContext);
if ( !pViewShell )
- throw uno::RuntimeException("No ViewShell available", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("No ViewShell available" );
ScViewData* pTabView = pViewShell->GetViewData();
if ( !pTabView )
- throw uno::RuntimeException("No ViewData available", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("No ViewData available" );
sal_Int32 nCursorX = pTabView->GetCurX();
sal_Int32 nCursorY = pTabView->GetCurY();
@@ -426,8 +423,7 @@ ScVbaApplication::setStatusBar( const uno::Any& _statusbar ) throw (uno::Runtime
}
}
else
- throw uno::RuntimeException("Invalid prarameter. It should be a string or False",
- uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Invalid prarameter. It should be a string or False" );
}
::sal_Int32 SAL_CALL
@@ -527,8 +523,7 @@ ScVbaApplication::getActiveSheet() throw (uno::RuntimeException, std::exception)
if ( !result.is() )
{
// Fixme - check if this is reasonable/desired behavior
- throw uno::RuntimeException("No activeSheet available",
- uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("No activeSheet available" );
}
return result;
@@ -559,8 +554,7 @@ ScVbaApplication::GoTo( const uno::Any& Reference, const uno::Any& Scroll ) thro
bScroll = aScroll;
}
else
- throw uno::RuntimeException("second parameter should be boolean",
- uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("second parameter should be boolean" );
}
OUString sRangeName;
@@ -605,8 +599,7 @@ ScVbaApplication::GoTo( const uno::Any& Reference, const uno::Any& Scroll ) thro
//and the createView( browse::BrowseNodeFactoryViewTypes::MACROSELECTOR ) to get a root browse::XBrowseNode.
//for query XInvocation interface.
//but how to directly get the XInvocation?
- throw uno::RuntimeException("invalid reference for range name, it should be procedure name",
- uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("invalid reference for range name, it should be procedure name" );
}
return;
}
@@ -640,8 +633,7 @@ ScVbaApplication::GoTo( const uno::Any& Reference, const uno::Any& Scroll ) thro
}
return;
}
- throw uno::RuntimeException("invalid reference or name",
- uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("invalid reference or name" );
}
sal_Int32 SAL_CALL
@@ -693,7 +685,7 @@ ScVbaApplication::setCursor( sal_Int32 _cursor ) throw (uno::RuntimeException, s
break;
}
default:
- throw uno::RuntimeException("Unknown value for Cursor pointer", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Unknown value for Cursor pointer" );
// TODO: isn't this a flaw in the API? It should be allowed to throw an
// IllegalArgumentException, or so
}
diff --git a/sc/source/ui/vba/vbaaxes.cxx b/sc/source/ui/vba/vbaaxes.cxx
index e99db4336a75..98052249cf6a 100644
--- a/sc/source/ui/vba/vbaaxes.cxx
+++ b/sc/source/ui/vba/vbaaxes.cxx
@@ -64,7 +64,7 @@ ScVbaAxes::createAxis( const uno::Reference< excel::XChart >& xChart, const uno:
{
ScVbaChart* pChart = static_cast< ScVbaChart* >( xChart.get() );
if ( !pChart )
- throw uno::RuntimeException("Object failure, can't access chart implementation", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Object failure, can't access chart implementation" );
uno::Reference< beans::XPropertySet > xAxisPropertySet;
if (((nType == xlCategory) || (nType == xlSeriesAxis) || (nType == xlValue)))
@@ -160,7 +160,7 @@ ScVbaAxes::Item( const css::uno::Any& _nType, const css::uno::Any& _oAxisGroup)
sal_Int32 nAxisGroup = xlPrimary;
sal_Int32 nType = -1;
if ( !_nType.hasValue() || ( ( _nType >>= nType ) == false ) )
- throw uno::RuntimeException("Axes::Item Failed to extract type", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Axes::Item Failed to extract type" );
if ( _oAxisGroup.hasValue() )
_oAxisGroup >>= nAxisGroup ;
diff --git a/sc/source/ui/vba/vbaaxis.cxx b/sc/source/ui/vba/vbaaxis.cxx
index 1dc45d1c09d7..939bc1493ac9 100644
--- a/sc/source/ui/vba/vbaaxis.cxx
+++ b/sc/source/ui/vba/vbaaxis.cxx
@@ -38,7 +38,7 @@ ScVbaAxis::getChartPtr() throw( uno::RuntimeException )
{
ScVbaChart* pChart = static_cast< ScVbaChart* >( moChartParent.get() );
if ( !pChart )
- throw uno::RuntimeException("Can't access parent chart impl", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Can't access parent chart impl" );
return pChart;
}
diff --git a/sc/source/ui/vba/vbaborders.cxx b/sc/source/ui/vba/vbaborders.cxx
index 270885332301..dd363406b387 100644
--- a/sc/source/ui/vba/vbaborders.cxx
+++ b/sc/source/ui/vba/vbaborders.cxx
@@ -167,7 +167,7 @@ public:
table::BorderLine aBorderLine;
if ( getBorderLine( aBorderLine ) )
return uno::makeAny( OORGBToXLRGB( aBorderLine.Color ) );
- throw uno::RuntimeException("No Implementation available", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("No Implementation available" );
}
void SAL_CALL setColor( const uno::Any& _color ) throw (uno::RuntimeException, std::exception) SAL_OVERRIDE
{
@@ -180,7 +180,7 @@ public:
setBorderLine( aBorderLine );
}
else
- throw uno::RuntimeException("No Implementation available", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("No Implementation available" );
}
uno::Any SAL_CALL getColorIndex() throw (uno::RuntimeException, std::exception) SAL_OVERRIDE
@@ -231,7 +231,7 @@ public:
break;
}
}
- throw uno::RuntimeException("Method failed", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Method failed" );
}
void SAL_CALL setWeight( const uno::Any& _weight ) throw (uno::RuntimeException, std::exception) SAL_OVERRIDE
{
@@ -255,12 +255,12 @@ public:
aBorderLine.OuterLineWidth = OOLineHairline;
break;
default:
- throw uno::RuntimeException("Bad param", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Bad param" );
}
setBorderLine( aBorderLine );
}
else
- throw uno::RuntimeException("Method failed", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Method failed" );
}
uno::Any SAL_CALL getLineStyle() throw (uno::RuntimeException, std::exception) SAL_OVERRIDE
@@ -289,12 +289,12 @@ public:
case XlLineStyle::xlSlantDashDot:
break;
default:
- throw uno::RuntimeException("Bad param", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Bad param" );
}
setBorderLine( aBorderLine );
}
else
- throw uno::RuntimeException("Method failed", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Method failed" );
}
};
diff --git a/sc/source/ui/vba/vbacharacters.cxx b/sc/source/ui/vba/vbacharacters.cxx
index 64bf5946b7af..5eb7b9f1caef 100644
--- a/sc/source/ui/vba/vbacharacters.cxx
+++ b/sc/source/ui/vba/vbacharacters.cxx
@@ -87,7 +87,7 @@ void SAL_CALL
ScVbaCharacters::setFont( const uno::Reference< excel::XFont >& /*_font*/ ) throw (css::uno::RuntimeException, std::exception)
{
// #TODO #FIXME needs implementation, or can't be done?
- throw uno::RuntimeException("Not Implemented", uno::Reference< XInterface >() );
+ throw uno::RuntimeException("Not Implemented" );
}
diff --git a/sc/source/ui/vba/vbachartobjects.cxx b/sc/source/ui/vba/vbachartobjects.cxx
index 9b6fae7c9a45..935ddbaf2e9e 100644
--- a/sc/source/ui/vba/vbachartobjects.cxx
+++ b/sc/source/ui/vba/vbachartobjects.cxx
@@ -74,10 +74,10 @@ ScVbaChartObjects::getChartObjectNames() throw( css::script::BasicErrorException
ScCellRangesBase* pUno= dynamic_cast< ScCellRangesBase* >( xIf.get() );
ScDocShell* pDocShell = NULL;
if ( !pUno )
- throw uno::RuntimeException("Failed to obtain the impl class from the drawpage", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Failed to obtain the impl class from the drawpage" );
pDocShell = pUno->GetDocShell();
if ( !pDocShell )
- throw uno::RuntimeException("Failed to obtain the docshell implclass", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Failed to obtain the docshell implclass" );
uno::Reference< sheet::XSpreadsheetDocument > xSpreadsheetDocument( pDocShell->GetModel(), uno::UNO_QUERY_THROW );
uno::Reference< sheet::XSpreadsheets > xSpreadsheets = xSpreadsheetDocument->getSheets();
diff --git a/sc/source/ui/vba/vbacomment.cxx b/sc/source/ui/vba/vbacomment.cxx
index b44fa29d3c07..f62e838fa6f6 100644
--- a/sc/source/ui/vba/vbacomment.cxx
+++ b/sc/source/ui/vba/vbacomment.cxx
@@ -200,7 +200,7 @@ ScVbaComment::Text( const uno::Any& aText, const uno::Any& aStart, const uno::An
xAnnoText->insertString( xRange, sText, bOverwrite );
return xAnnoText->getString();
}
- throw uno::RuntimeException("ScVbaComment::Text - bad Start value ", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("ScVbaComment::Text - bad Start value " );
}
else if ( aText.hasValue() )
{
diff --git a/sc/source/ui/vba/vbafont.cxx b/sc/source/ui/vba/vbafont.cxx
index 3b97f85cf9ad..72dabbe69a15 100644
--- a/sc/source/ui/vba/vbafont.cxx
+++ b/sc/source/ui/vba/vbafont.cxx
@@ -260,7 +260,7 @@ ScVbaFont::setStandardFontSize( const uno::Any& /*aValue*/ ) throw( uno::Runtime
//XXX #TODO# #FIXME#
//mxFont->setPropertyValue("CharSize", ( uno::Any )fValue );
throw uno::RuntimeException(
- OUString("setStandardFontSize not supported"), uno::Reference< uno::XInterface >() );
+ "setStandardFontSize not supported" );
}
@@ -268,8 +268,7 @@ uno::Any SAL_CALL
ScVbaFont::getStandardFontSize() throw ( uno::RuntimeException, std::exception )
{
//XXX #TODO# #FIXME#
- throw uno::RuntimeException(
- OUString("getStandardFontSize not supported"), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "getStandardFontSize not supported" );
// return uno::Any();
}
@@ -278,8 +277,7 @@ void SAL_CALL
ScVbaFont::setStandardFont( const uno::Any& /*aValue*/ ) throw( uno::RuntimeException, std::exception )
{
//XXX #TODO# #FIXME#
- throw uno::RuntimeException(
- OUString("setStandardFont not supported"), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("setStandardFont not supported" );
}
@@ -287,8 +285,7 @@ uno::Any SAL_CALL
ScVbaFont::getStandardFont() throw ( uno::RuntimeException, std::exception )
{
//XXX #TODO# #FIXME#
- throw uno::RuntimeException(
- OUString("getStandardFont not supported"), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("getStandardFont not supported");
// return uno::Any();
}
@@ -379,7 +376,7 @@ ScVbaFont::setUnderline( const uno::Any& aValue ) throw ( uno::RuntimeException,
nValue = awt::FontUnderline::DOUBLE;
break;
default:
- throw uno::RuntimeException("Unknown value for Underline", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Unknown value for Underline" );
}
mxFont->setPropertyValue("CharUnderline", ( uno::Any )nValue );
@@ -407,7 +404,7 @@ ScVbaFont::getUnderline() throw ( uno::RuntimeException, std::exception )
nValue = excel::XlUnderlineStyle::xlUnderlineStyleNone;
break;
default:
- throw uno::RuntimeException("Unknown value retrieved for Underline", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Unknown value retrieved for Underline" );
}
return uno::makeAny( nValue );
diff --git a/sc/source/ui/vba/vbaformat.cxx b/sc/source/ui/vba/vbaformat.cxx
index 3f56aac5d665..bf1da4afcc06 100644
--- a/sc/source/ui/vba/vbaformat.cxx
+++ b/sc/source/ui/vba/vbaformat.cxx
@@ -803,7 +803,7 @@ ScVbaFormat<Ifc1>::getCurrentDataSet( ) throw ( uno::RuntimeException )
{
SfxItemSet* pDataSet = excel::ScVbaCellRangeAccess::GetDataSet( getCellRangesBase() );
if ( !pDataSet )
- throw uno::RuntimeException("Can't access Itemset for XPropertySet", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Can't access Itemset for XPropertySet" );
return pDataSet;
}
diff --git a/sc/source/ui/vba/vbaglobals.cxx b/sc/source/ui/vba/vbaglobals.cxx
index 30983e5579fb..70055e15543d 100644
--- a/sc/source/ui/vba/vbaglobals.cxx
+++ b/sc/source/ui/vba/vbaglobals.cxx
@@ -87,8 +87,7 @@ ScVbaGlobals::getActiveWorkbook() throw (uno::RuntimeException, std::exception)
return xWorkbook;
}
// FIXME check if this is correct/desired behavior
- throw uno::RuntimeException( OUString(
- "No activeWorkbook available" ), Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "No activeWorkbook available" );
}
diff --git a/sc/source/ui/vba/vbahelper.cxx b/sc/source/ui/vba/vbahelper.cxx
index cd03ac58f0ce..039d767358cf 100644
--- a/sc/source/ui/vba/vbahelper.cxx
+++ b/sc/source/ui/vba/vbahelper.cxx
@@ -272,7 +272,7 @@ getCurrentDocument() throw (uno::RuntimeException)
if ( !xModel.is() )
{
throw uno::RuntimeException(
- "Can't extract model from basic ( its obviously not set yet therefore don't know the currently selected document)", uno::Reference< uno::XInterface >() );
+ "Can't extract model from basic ( its obviously not set yet therefore don't know the currently selected document)" );
}
return xModel;
}
@@ -286,9 +286,7 @@ getCurrentDocument() throw (uno::RuntimeException)
else
{
OSL_TRACE("Failed to get ThisComponent");
- throw uno::RuntimeException(
- OUString( "Can't determine the currently selected document" ),
- uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "Can't determine the currently selected document" );
}
return xModel;
}
@@ -517,7 +515,7 @@ OUString getAnyAsString( const uno::Any& pvargItem ) throw ( uno::RuntimeExcepti
break;
}
default:
- throw uno::RuntimeException("Invalid type, can't convert", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Invalid type, can't convert" );
}
return sString;
}
diff --git a/sc/source/ui/vba/vbahyperlink.cxx b/sc/source/ui/vba/vbahyperlink.cxx
index af6fbec8a7bd..71c75faefbb1 100644
--- a/sc/source/ui/vba/vbahyperlink.cxx
+++ b/sc/source/ui/vba/vbahyperlink.cxx
@@ -51,7 +51,7 @@ ScVbaHyperlink::ScVbaHyperlink( const uno::Reference< XHelperInterface >& rxAnch
UrlComponents aUrlComp;
OUString aTextToDisplay;
if( !(rAddress >>= aUrlComp.first) || aUrlComp.first.isEmpty() )
- throw uno::RuntimeException("Cannot get address", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Cannot get address" );
rSubAddress >>= aUrlComp.second;
rScreenTip >>= maScreenTip;
rTextToDisplay >>= aTextToDisplay;
diff --git a/sc/source/ui/vba/vbahyperlinks.cxx b/sc/source/ui/vba/vbahyperlinks.cxx
index bad71e7c81ae..6cf6ec14a9cb 100644
--- a/sc/source/ui/vba/vbahyperlinks.cxx
+++ b/sc/source/ui/vba/vbahyperlinks.cxx
@@ -35,7 +35,7 @@ bool lclContains( const ScRangeList& rScOuter, const uno::Reference< excel::XRan
{
const ScRangeList& rScInner = ScVbaRange::getScRangeList( rxInner );
if( rScInner.empty() || rScOuter.empty() )
- throw uno::RuntimeException("Empty range objects", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Empty range objects" );
for( size_t nIndex = 0, nCount = rScInner.size(); nIndex < nCount; ++nIndex )
if( !rScOuter.In( *rScInner[ nIndex ] ) )
diff --git a/sc/source/ui/vba/vbainterior.cxx b/sc/source/ui/vba/vbainterior.cxx
index cf9896857702..d75d3fce5945 100644
--- a/sc/source/ui/vba/vbainterior.cxx
+++ b/sc/source/ui/vba/vbainterior.cxx
@@ -310,7 +310,7 @@ ScVbaInterior::setPattern( const uno::Any& _pattern ) throw (uno::RuntimeExcepti
SetMixedColor();
}
else
- throw uno::RuntimeException("Invalid Pattern index", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Invalid Pattern index" );
}
Color
ScVbaInterior::GetBackColor()
@@ -358,7 +358,7 @@ ScVbaInterior::setPatternColor( const uno::Any& _patterncolor ) throw (uno::Runt
SetMixedColor();
}
else
- throw uno::RuntimeException("Invalid Pattern Color", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Invalid Pattern Color" );
}
uno::Any SAL_CALL
ScVbaInterior::getPatternColorIndex() throw (uno::RuntimeException, std::exception)
@@ -381,7 +381,7 @@ ScVbaInterior::setPatternColorIndex( const uno::Any& _patterncolorindex ) throw
setPatternColor( uno::makeAny( OORGBToXLRGB( nPattColor ) ) );
}
else
- throw uno::RuntimeException("Invalid Pattern Color", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Invalid Pattern Color" );
}
OUString
diff --git a/sc/source/ui/vba/vbamenubars.cxx b/sc/source/ui/vba/vbamenubars.cxx
index 8bb6a2fe9dc0..5387427533e1 100644
--- a/sc/source/ui/vba/vbamenubars.cxx
+++ b/sc/source/ui/vba/vbamenubars.cxx
@@ -93,7 +93,7 @@ ScVbaMenuBars::Item( const uno::Any& aIndex, const uno::Any& /*aIndex2*/ ) throw
return uno::makeAny( xMenuBar );
}
- throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Not implemented" );
}
// XHelperInterface
diff --git a/sc/source/ui/vba/vbanames.cxx b/sc/source/ui/vba/vbanames.cxx
index 94460328b676..c93fdbac564b 100644
--- a/sc/source/ui/vba/vbanames.cxx
+++ b/sc/source/ui/vba/vbanames.cxx
@@ -77,10 +77,10 @@ ScVbaNames::getScDocument()
uno::Reference< frame::XModel > xModel( getModel() , uno::UNO_QUERY_THROW );
ScTabViewShell * pTabViewShell = excel::getBestViewShell( xModel );
if ( !pTabViewShell )
- throw uno::RuntimeException( "No ViewShell available", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "No ViewShell available" );
ScViewData* pViewData = pTabViewShell->GetViewData();
if ( !pViewData )
- throw uno::RuntimeException( "No ViewData available", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "No ViewData available" );
return pViewData->GetDocument();
}
@@ -119,8 +119,7 @@ ScVbaNames::Add( const css::uno::Any& Name ,
sResult = sName.copy( nIndex );
sName = sResult ;
if ( !ScRangeData::IsNameValid( sName , getScDocument() ) )
- throw uno::RuntimeException( "This Name is not valid .",
- uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "This Name is not valid ." );
}
}
uno::Reference< table::XCellRange > xUnoRange;
diff --git a/sc/source/ui/vba/vbapalette.cxx b/sc/source/ui/vba/vbapalette.cxx
index 070feafc80df..2d52843d511a 100644
--- a/sc/source/ui/vba/vbapalette.cxx
+++ b/sc/source/ui/vba/vbapalette.cxx
@@ -97,7 +97,7 @@ ScVbaPalette::getPalette() const
if ( m_pShell )
xProps.set( m_pShell->GetModel(), uno::UNO_QUERY_THROW );
else
- throw uno::RuntimeException("Can't extract palette, no doc shell", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Can't extract palette, no doc shell" );
xIndex.set( xProps->getPropertyValue("ColorPalette"), uno::UNO_QUERY );
if ( !xIndex.is() )
return new DefaultPalette();
diff --git a/sc/source/ui/vba/vbapane.cxx b/sc/source/ui/vba/vbapane.cxx
index 334a0e61cd46..d69c0c0600b6 100644
--- a/sc/source/ui/vba/vbapane.cxx
+++ b/sc/source/ui/vba/vbapane.cxx
@@ -48,8 +48,7 @@ ScVbaPane::setScrollColumn( sal_Int32 _scrollcolumn ) throw (uno::RuntimeExcepti
{
if( _scrollcolumn < 1 )
{
- throw uno::RuntimeException("Column number should not less than 1",
- uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Column number should not less than 1" );
}
m_xViewPane->setFirstVisibleColumn( _scrollcolumn - 1 );
}
@@ -65,8 +64,7 @@ ScVbaPane::setScrollRow( sal_Int32 _scrollrow ) throw (uno::RuntimeException, st
{
if( _scrollrow < 1 )
{
- throw uno::RuntimeException("Row number should not less than 1",
- uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Row number should not less than 1" );
}
m_xViewPane->setFirstVisibleRow( _scrollrow - 1 );
}
@@ -126,7 +124,7 @@ ScVbaPane::SmallScroll( const uno::Any& Down, const uno::Any& Up, const uno::Any
messageBuffer += OUString( "Error getting parameter: ToLeft\n" );
}
if( !messageBuffer.isEmpty() )
- throw(uno::RuntimeException( messageBuffer, uno::Reference< uno::XInterface >() ) );
+ throw uno::RuntimeException( messageBuffer );
sal_Int32 newStartRow = visibleRange.StartRow + downRows;
if( newStartRow < 0 )
@@ -181,7 +179,7 @@ ScVbaPane::LargeScroll( const uno::Any& Down, const uno::Any& Up, const uno::Any
messageBuffer += OUString( "Error getting parameter: ToLeft\n" );
}
if( !messageBuffer.isEmpty() )
- throw(uno::RuntimeException( messageBuffer, uno::Reference< uno::XInterface >() ) );
+ throw uno::RuntimeException( messageBuffer );
sal_Int32 newStartRow = visibleRange.StartRow + (downPages * vertPageSize );
if( newStartRow < 0 )
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index 9095c60dc2c8..e52ca43e2747 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -254,7 +254,7 @@ ScCellRangesBase* ScVbaRange::getCellRangesBase() throw ( uno::RuntimeException
return ScCellRangesBase::getImplementation( mxRanges );
if( mxRange.is() )
return ScCellRangesBase::getImplementation( mxRange );
- throw uno::RuntimeException("General Error creating range - Unknown", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("General Error creating range - Unknown" );
}
ScCellRangeObj* ScVbaRange::getCellRangeObj() throw ( uno::RuntimeException )
@@ -266,7 +266,7 @@ SfxItemSet* ScVbaRange::getCurrentDataSet( ) throw ( uno::RuntimeException )
{
SfxItemSet* pDataSet = excel::ScVbaCellRangeAccess::GetDataSet( getCellRangesBase() );
if ( !pDataSet )
- throw uno::RuntimeException("Can't access Itemset for range", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Can't access Itemset for range" );
return pDataSet;
}
@@ -393,7 +393,7 @@ getDocShellFromIf( const uno::Reference< uno::XInterface >& xIf ) throw ( uno::R
{
ScCellRangesBase* pUno = ScCellRangesBase::getImplementation( xIf );
if ( !pUno )
- throw uno::RuntimeException("Failed to access underlying uno range object", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Failed to access underlying uno range object" );
return pUno->GetDocShell();
}
@@ -431,7 +431,7 @@ getDocumentFromRange( const uno::Reference< table::XCellRange >& xRange )
{
ScDocShell* pDocShell = getDocShellFromRange( xRange );
if ( !pDocShell )
- throw uno::RuntimeException("Failed to access underlying docshell from uno range object", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Failed to access underlying docshell from uno range object" );
ScDocument* pDoc = pDocShell->GetDocument();
return pDoc;
}
@@ -484,14 +484,14 @@ const ScRangeList& ScVbaRange::getScRangeList() throw (uno::RuntimeException)
{
if( ScCellRangesBase* pScRangesBase = getCellRangesBase() )
return pScRangesBase->GetRangeList();
- throw uno::RuntimeException("Cannot obtain UNO range implementation object", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Cannot obtain UNO range implementation object" );
}
const ScRangeList& ScVbaRange::getScRangeList( const uno::Reference< excel::XRange >& rxRange ) throw (uno::RuntimeException)
{
if( ScVbaRange* pScVbaRange = getImplementation( rxRange ) )
return pScVbaRange->getScRangeList();
- throw uno::RuntimeException("Cannot obtain VBA range implementation object", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Cannot obtain VBA range implementation object" );
}
@@ -1307,10 +1307,10 @@ uno::Reference< sheet::XSheetCellRange > lclExpandToMerged( const uno::Reference
uno::Reference< sheet::XSheetCellRangeContainer > lclExpandToMerged( const uno::Reference< sheet::XSheetCellRangeContainer >& rxCellRanges, bool bRecursive ) throw (uno::RuntimeException)
{
if( !rxCellRanges.is() )
- throw uno::RuntimeException("Missing cell ranges object", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Missing cell ranges object" );
sal_Int32 nCount = rxCellRanges->getCount();
if( nCount < 1 )
- throw uno::RuntimeException("Missing cell ranges object", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Missing cell ranges object" );
ScRangeList aScRanges;
for( sal_Int32 nIndex = 0; nIndex < nCount; ++nIndex )
@@ -1415,7 +1415,7 @@ table::CellRangeAddress getCellRangeAddressForVBARange( const uno::Any& aParam,
break;
default:
- throw uno::RuntimeException("Can't extact CellRangeAddress from type", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Can't extact CellRangeAddress from type" );
}
return lclGetRangeAddress( xRangeParam );
}
@@ -1426,7 +1426,7 @@ lcl_setupBorders( const uno::Reference< excel::XRange >& xParentRange, const uno
uno::Reference< XHelperInterface > xParent( xParentRange, uno::UNO_QUERY_THROW );
ScDocument* pDoc = getDocumentFromRange(xRange);
if ( !pDoc )
- throw uno::RuntimeException("Failed to access document from shell", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Failed to access document from shell" );
ScVbaPalette aPalette( pDoc->GetDocumentShell() );
uno::Reference< XCollection > borders( new ScVbaBorders( xParent, xContext, xRange, aPalette ) );
return borders;
@@ -2138,7 +2138,7 @@ ScVbaRange::Font() throw ( script::BasicErrorException, uno::RuntimeException)
else if ( mxRanges.is() )
xProps.set(mxRanges, ::uno::UNO_QUERY );
if ( !pDoc )
- throw uno::RuntimeException("Failed to access document from shell", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Failed to access document from shell" );
ScVbaPalette aPalette( pDoc->GetDocumentShell() );
ScCellRangeObj* pRangeObj = NULL;
@@ -2260,7 +2260,7 @@ ScVbaRange::Select() throw (uno::RuntimeException, std::exception)
{
ScCellRangesBase* pUnoRangesBase = getCellRangesBase();
if ( !pUnoRangesBase )
- throw uno::RuntimeException("Failed to access underlying uno range object", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Failed to access underlying uno range object" );
ScDocShell* pShell = pUnoRangesBase->GetDocShell();
if ( pShell )
{
@@ -2394,10 +2394,10 @@ ScVbaRange::Rows(const uno::Any& aIndex ) throw (uno::RuntimeException, std::exc
aRange.aEnd.SetRow( aRange.aStart.Row() + ( nEndRow - nStartRow ));
}
else
- throw uno::RuntimeException("Illegal param", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Illegal param" );
if ( aRange.aStart.Row() < 0 || aRange.aEnd.Row() < 0 )
- throw uno::RuntimeException("Internal failure, illegal param", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Internal failure, illegal param" );
// return a normal range ( even for multi-selection
uno::Reference< table::XCellRange > xRange( new ScCellRangeObj( pUnoRangesBase->GetDocShell(), aRange ) );
return new ScVbaRange( mxParent, mxContext, xRange, true );
@@ -2438,10 +2438,10 @@ ScVbaRange::Columns(const uno::Any& aIndex ) throw (uno::RuntimeException, std::
aRange.aEnd.SetCol( aRange.aStart.Col() + ( nEndCol - nStartCol ));
}
else
- throw uno::RuntimeException("Illegal param", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Illegal param" );
if ( aRange.aStart.Col() < 0 || aRange.aEnd.Col() < 0 )
- throw uno::RuntimeException("Internal failure, illegal param", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Internal failure, illegal param" );
}
// Columns() - no params
uno::Reference< table::XCellRange > xRange( new ScCellRangeObj( pUnoRangesBase->GetDocShell(), aRange ) );
@@ -2515,7 +2515,7 @@ void
ScVbaRange::Copy(const ::uno::Any& Destination) throw (uno::RuntimeException, std::exception)
{
if ( m_Areas->getCount() > 1 )
- throw uno::RuntimeException("That command cannot be used on multiple selections", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("That command cannot be used on multiple selections" );
if ( Destination.hasValue() )
{
uno::Reference< excel::XRange > xRange( Destination, uno::UNO_QUERY_THROW );
@@ -2545,7 +2545,7 @@ void
ScVbaRange::Cut(const ::uno::Any& Destination) throw (uno::RuntimeException, std::exception)
{
if ( m_Areas->getCount() > 1 )
- throw uno::RuntimeException("That command cannot be used on multiple selections", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("That command cannot be used on multiple selections" );
if (Destination.hasValue())
{
uno::Reference< excel::XRange > xRange( Destination, uno::UNO_QUERY_THROW );
@@ -2723,9 +2723,7 @@ ScVbaRange::Range( const uno::Any &Cell1, const uno::Any &Cell2, bool bForceUseI
xAddressable.set( xReferrer, uno::UNO_QUERY_THROW );
if( !Cell1.hasValue() )
- throw uno::RuntimeException(
- OUString( " Invalid Argument " ),
- uno::Reference< XInterface >() );
+ throw uno::RuntimeException( "Invalid Argument" );
table::CellRangeAddress resultAddress;
table::CellRangeAddress parentRangeAddress = xAddressable->getRangeAddress();
@@ -2871,11 +2869,11 @@ void SAL_CALL
ScVbaRange::PasteSpecial( const uno::Any& Paste, const uno::Any& Operation, const uno::Any& SkipBlanks, const uno::Any& Transpose ) throw (::com::sun::star::uno::RuntimeException, std::exception)
{
if ( m_Areas->getCount() > 1 )
- throw uno::RuntimeException("That command cannot be used on multiple selections", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("That command cannot be used on multiple selections" );
ScDocShell* pShell = getScDocShell();
if (!pShell)
- throw uno::RuntimeException("That command cannot be used with no ScDocShell", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("That command cannot be used with no ScDocShell" );
uno::Reference< frame::XModel > xModel(pShell->GetModel(), uno::UNO_QUERY_THROW);
uno::Reference< view::XSelectionSupplier > xSelection( xModel->getCurrentController(), uno::UNO_QUERY_THROW );
@@ -3007,11 +3005,11 @@ ScVbaRange::getHidden() throw (uno::RuntimeException, std::exception)
{
uno::Reference< beans::XPropertySet > xProps = getRowOrColumnProps( mxRange, mbIsRows );
if ( !( xProps->getPropertyValue( ISVISIBLE ) >>= bIsVisible ) )
- throw uno::RuntimeException("Failed to get IsVisible property", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Failed to get IsVisible property" );
}
catch( const uno::Exception& e )
{
- throw uno::RuntimeException( e.Message, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( e.Message );
}
return uno::makeAny( !bIsVisible );
}
@@ -3038,7 +3036,7 @@ ScVbaRange::setHidden( const uno::Any& _hidden ) throw (uno::RuntimeException, s
}
catch( const uno::Exception& e )
{
- throw uno::RuntimeException( e.Message, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( e.Message );
}
}
@@ -3057,7 +3055,7 @@ ScVbaRange::Replace( const OUString& What, const OUString& Replacement, const un
// sanity check required params
if ( What.isEmpty() )
- throw uno::RuntimeException("Range::Replace, missing params", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Range::Replace, missing params" );
OUString sWhat = VBAToRegexp( What);
// #TODO #FIXME SearchFormat & ReplacesFormat are not processed
// What do we do about MatchByte.. we don't seem to support that
@@ -3087,7 +3085,7 @@ ScVbaRange::Replace( const OUString& What, const OUString& Replacement, const un
else if ( nLook == excel::XlLookAt::xlWhole )
bSearchWords = true;
else
- throw uno::RuntimeException("Range::Replace, illegal value for LookAt", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Range::Replace, illegal value for LookAt" );
// set global search props ( affects the find dialog
// and of course the defaults for this method
newOptions.SetWordOnly( bSearchWords );
@@ -3103,7 +3101,7 @@ ScVbaRange::Replace( const OUString& What, const OUString& Replacement, const un
else if ( nSearchOrder == excel::XlSearchOrder::xlByRows )
bSearchByRow = true;
else
- throw uno::RuntimeException("Range::Replace, illegal value for SearchOrder", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Range::Replace, illegal value for SearchOrder" );
newOptions.SetRowDirection( bSearchByRow );
xDescriptor->setPropertyValue( SC_UNO_SRCHBYROW, uno::makeAny( bSearchByRow ) );
@@ -3158,7 +3156,7 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L
if( What >>= sWhat )
{
if( sWhat.isEmpty() )
- throw uno::RuntimeException("Range::Find, missing params", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Range::Find, missing params" );
}
else if( What >>= nWhat )
{
@@ -3169,7 +3167,7 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L
sWhat = OUString::number( fWhat );
}
else
- throw uno::RuntimeException("Range::Find, missing params", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Range::Find, missing params" );
OUString sSearch = VBAToRegexp( sWhat );
@@ -3192,10 +3190,10 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L
{
// After must be a single cell in the range
if( xAfterRange->getCount() > 1 )
- throw uno::RuntimeException("After must be a single cell.", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("After must be a single cell." );
uno::Reference< excel::XRange > xCell( Cells( uno::makeAny( xAfterRange->getRow() ), uno::makeAny( xAfterRange->getColumn() ) ), uno::UNO_QUERY );
if( !xCell.is() )
- throw uno::RuntimeException("After must be in range.", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("After must be in range." );
xStartCell.set( xAfterRange->getCellRange(), uno::UNO_QUERY_THROW );
}
@@ -3218,7 +3216,7 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L
nSearchType = SVX_SEARCHIN_VALUE;
break;
default:
- throw uno::RuntimeException("Range::Replace, illegal value for LookIn.", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Range::Replace, illegal value for LookIn." );
}
newOptions.SetCellType( nSearchType );
xDescriptor->setPropertyValue( "SearchType", uno::makeAny( nSearchType ) );
@@ -3235,7 +3233,7 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L
else if ( nLookAt == excel::XlLookAt::xlWhole )
bSearchWords = true;
else
- throw uno::RuntimeException("Range::Replace, illegal value for LookAt", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Range::Replace, illegal value for LookAt" );
newOptions.SetWordOnly( bSearchWords );
xDescriptor->setPropertyValue( SC_UNO_SRCHWORDS, uno::makeAny( bSearchWords ) );
}
@@ -3250,7 +3248,7 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L
else if ( nSearchOrder == excel::XlSearchOrder::xlByRows )
bSearchByRow = true;
else
- throw uno::RuntimeException("Range::Replace, illegal value for SearchOrder", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Range::Replace, illegal value for SearchOrder" );
newOptions.SetRowDirection( bSearchByRow );
xDescriptor->setPropertyValue( SC_UNO_SRCHBYROW, uno::makeAny( bSearchByRow ) );
@@ -3268,7 +3266,7 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L
else if( nSearchDirection == excel::XlSearchDirection::xlPrevious )
bSearchBackwards = true;
else
- throw uno::RuntimeException("Range::Replace, illegal value for SearchDirection", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Range::Replace, illegal value for SearchDirection" );
newOptions.SetBackward( bSearchBackwards );
xDescriptor->setPropertyValue( "SearchBackwards", uno::makeAny( bSearchBackwards ) );
}
@@ -3280,7 +3278,7 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L
{
// SearchCaseSensitive
if( !( MatchCase >>= bMatchCase ) )
- throw uno::RuntimeException("Range::Replace, illegal value for MatchCase", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Range::Replace, illegal value for MatchCase" );
}
xDescriptor->setPropertyValue( SC_UNO_SRCHCASE, uno::makeAny( bMatchCase ) );
@@ -3327,11 +3325,11 @@ uno::Reference< table::XCellRange > processKey( const uno::Any& Key, uno::Refere
OUString sRangeName = ::comphelper::getString( Key );
table::CellRangeAddress aRefAddr;
if ( !pDocSh )
- throw uno::RuntimeException("Range::Sort no docshell to calculate key param", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Range::Sort no docshell to calculate key param" );
xKeyRange = getRangeForName( xContext, sRangeName, pDocSh, aRefAddr );
}
else
- throw uno::RuntimeException("Range::Sort illegal type value for key param", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Range::Sort illegal type value for key param" );
uno::Reference< table::XCellRange > xKey;
xKey.set( xKeyRange->getCellRange(), uno::UNO_QUERY_THROW );
return xKey;
@@ -3349,7 +3347,7 @@ const OUString& sPropName ) throw( uno::RuntimeException )
if ( pProp->Name.equals( sPropName ) )
return count;
if ( count == nItems )
- throw uno::RuntimeException("Range::Sort unknown sort property", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Range::Sort unknown sort property" );
return -1; //should never reach here ( satisfy compiler )
}
@@ -3385,7 +3383,7 @@ void updateTableSortField( const uno::Reference< table::XCellRange >& xParentRan
aTableField.IsAscending = false;
}
else
- throw uno::RuntimeException("Illegal Key param", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Illegal Key param" );
}
@@ -3395,7 +3393,7 @@ ScVbaRange::Sort( const uno::Any& Key1, const uno::Any& Order1, const uno::Any&
{
// #TODO# #FIXME# can we do something with Type
if ( m_Areas->getCount() > 1 )
- throw uno::RuntimeException("That command cannot be used on multiple selections", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("That command cannot be used on multiple selections" );
sal_Int16 nDataOption1 = excel::XlSortDataOption::xlSortNormal;
sal_Int16 nDataOption2 = excel::XlSortDataOption::xlSortNormal;
@@ -3403,7 +3401,7 @@ ScVbaRange::Sort( const uno::Any& Key1, const uno::Any& Order1, const uno::Any&
ScDocument* pDoc = getScDocument();
if ( !pDoc )
- throw uno::RuntimeException("Failed to access document from shell", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Failed to access document from shell" );
RangeHelper thisRange( mxRange );
table::CellRangeAddress thisRangeAddress = thisRange.getCellRangeAddressable()->getRangeAddress();
@@ -3527,7 +3525,7 @@ ScVbaRange::Sort( const uno::Any& Key1, const uno::Any& Order1, const uno::Any&
ScDocShell* pDocShell = getScDocShell();
xKey1 = processKey( Key1, mxContext, pDocShell );
if ( !xKey1.is() )
- throw uno::RuntimeException("Range::Sort needs a key1 param", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Range::Sort needs a key1 param" );
if ( Key2.hasValue() )
xKey2 = processKey( Key2, mxContext, pDocShell );
@@ -3622,7 +3620,7 @@ ScVbaRange::End( ::sal_Int32 Direction ) throw (uno::RuntimeException, std::exc
nSID = SID_CURSORBLKRIGHT;
break;
default:
- throw uno::RuntimeException(": Invalid ColumnIndex", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException(": Invalid ColumnIndex" );
}
if ( pDispatcher )
{
@@ -3662,11 +3660,11 @@ uno::Reference< excel::XCharacters > SAL_CALL
ScVbaRange::characters( const uno::Any& Start, const uno::Any& Length ) throw (uno::RuntimeException, std::exception)
{
if ( !isSingleCellRange() )
- throw uno::RuntimeException("Can't create Characters property for multicell range ", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Can't create Characters property for multicell range " );
uno::Reference< text::XSimpleText > xSimple(mxRange->getCellByPosition(0,0) , uno::UNO_QUERY_THROW );
ScDocument* pDoc = getDocumentFromRange(mxRange);
if ( !pDoc )
- throw uno::RuntimeException("Failed to access document from shell", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Failed to access document from shell" );
ScVbaPalette aPalette( pDoc->GetDocumentShell() );
return new ScVbaCharacters( this, mxContext, aPalette, xSimple, Start, Length );
@@ -3701,7 +3699,7 @@ ScVbaRange::Delete( const uno::Any& Shift ) throw (uno::RuntimeException, std::e
mode = sheet::CellDeleteMode_LEFT;
break;
default:
- throw uno::RuntimeException("Illegal parameter ", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Illegal parameter " );
}
}
else
@@ -3895,7 +3893,7 @@ uno::Reference< excel::XRange >
ScVbaRange::getArea( sal_Int32 nIndex ) throw( css::uno::RuntimeException )
{
if ( !m_Areas.is() )
- throw uno::RuntimeException("No areas available", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("No areas available" );
uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::makeAny( ++nIndex ), uno::Any() ), uno::UNO_QUERY_THROW );
return xRange;
}
@@ -4418,7 +4416,7 @@ ScVbaRange::AutoFilter( const uno::Any& aField, const uno::Any& Criteria1, const
if ( !bHasAuto )
{
if ( m_Areas->getCount() > 1 )
- throw uno::RuntimeException( STR_ERRORMESSAGE_APPLIESTOSINGLERANGEONLY, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( STR_ERRORMESSAGE_APPLIESTOSINGLERANGEONLY );
table::CellRangeAddress autoFiltAddress;
//CurrentRegion()
@@ -4431,7 +4429,7 @@ ScVbaRange::AutoFilter( const uno::Any& aField, const uno::Any& Criteria1, const
if ( pRange )
{
if ( pRange->isSingleCellRange() )
- throw uno::RuntimeException("Can't create AutoFilter", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Can't create AutoFilter" );
RangeHelper currentRegion( pRange->mxRange );
autoFiltAddress = currentRegion.getCellRangeAddressable()->getRangeAddress();
}
@@ -4466,7 +4464,7 @@ ScVbaRange::AutoFilter( const uno::Any& aField, const uno::Any& Criteria1, const
xDataBaseRange.set( xDBRanges->getByTable(nSheet ), uno::UNO_QUERY_THROW );
}
if ( !xDataBaseRange.is() )
- throw uno::RuntimeException("Failed to find the autofilter placeholder range", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Failed to find the autofilter placeholder range" );
uno::Reference< beans::XPropertySet > xDBRangeProps( xDataBaseRange, uno::UNO_QUERY_THROW );
// set autofilt
@@ -4580,7 +4578,7 @@ ScVbaRange::AutoFilter( const uno::Any& aField, const uno::Any& Criteria1, const
nConn = sheet::FilterConnection_AND;
break;
default:
- throw uno::RuntimeException("UnknownOption", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("UnknownOption" );
}
@@ -4675,7 +4673,7 @@ ScVbaRange::Insert( const uno::Any& Shift, const uno::Any& /*CopyOrigin*/ ) thro
mode = sheet::CellInsertMode_DOWN;
break;
default:
- throw uno::RuntimeException("Illegal parameter ", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Illegal parameter " );
}
}
else
@@ -4752,7 +4750,7 @@ ScVbaRange::Hyperlinks( const uno::Any& aIndex ) throw (uno::RuntimeException, s
uno::Reference< excel::XHyperlinks > xSheetHlinks( xWorksheet->Hyperlinks( uno::Any() ), uno::UNO_QUERY_THROW );
ScVbaHyperlinksRef xScSheetHlinks( dynamic_cast< ScVbaHyperlinks* >( xSheetHlinks.get() ) );
if( !xScSheetHlinks.is() )
- throw uno::RuntimeException("Cannot obtain hyperlinks implementation object", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Cannot obtain hyperlinks implementation object" );
// create a new local hyperlinks object based on the sheet hyperlinks
ScVbaHyperlinksRef xHlinks( new ScVbaHyperlinks( getParent(), mxContext, xScSheetHlinks, getScRangeList() ) );
@@ -4857,7 +4855,7 @@ uno::Any SAL_CALL ScVbaRange::getPrefixCharacter() throw (uno::RuntimeException,
return lclGetPrefixVariant( lclGetPrefixChar( mxRange ) );
if( mxRanges.is() )
return lclGetPrefixVariant( lclGetPrefixChar( mxRanges ) );
- throw uno::RuntimeException("Unexpected empty Range object", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Unexpected empty Range object" );
}
uno::Any ScVbaRange::getShowDetail() throw ( css::uno::RuntimeException, std::exception)
@@ -4866,7 +4864,7 @@ uno::Any ScVbaRange::getShowDetail() throw ( css::uno::RuntimeException, std::ex
// In MSO VBA, the specified range must be a single summary column or row in an outline. otherwise throw exception
if( m_Areas->getCount() > 1 )
- throw uno::RuntimeException("Can not get Range.ShowDetail attribute ", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Can not get Range.ShowDetail attribute " );
bool bShowDetail = false;
@@ -4898,7 +4896,7 @@ uno::Any ScVbaRange::getShowDetail() throw ( css::uno::RuntimeException, std::ex
}
else
{
- throw uno::RuntimeException("Can not set Range.ShowDetail attribute ", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Can not set Range.ShowDetail attribute" );
}
return aNULL();
}
@@ -4909,7 +4907,7 @@ void ScVbaRange::setShowDetail(const uno::Any& aShowDetail) throw ( css::uno::Ru
// In MSO VBA, the specified range must be a single summary column or row in an outline. otherwise throw exception
if( m_Areas->getCount() > 1 )
- throw uno::RuntimeException("Can not set Range.ShowDetail attribute ", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Can not set Range.ShowDetail attribute" );
bool bShowDetail = extractBoolFromAny( aShowDetail );
@@ -4934,7 +4932,7 @@ void ScVbaRange::setShowDetail(const uno::Any& aShowDetail) throw ( css::uno::Ru
}
else
{
- throw uno::RuntimeException("Can not set Range.ShowDetail attribute ", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Can not set Range.ShowDetail attribute" );
}
}
@@ -5099,7 +5097,7 @@ ScVbaRange::AutoFill( const uno::Reference< excel::XRange >& Destination, const
eCmd = FILL_GROWTH;
break;
case excel::XlAutoFillType::xlFillFormats:
- throw uno::RuntimeException("xlFillFormat not supported for AutoFill", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("xlFillFormat not supported for AutoFill" );
case excel::XlAutoFillType::xlFillValues:
case excel::XlAutoFillType::xlFillSeries:
case excel::XlAutoFillType::xlLinearTrend:
diff --git a/sc/source/ui/vba/vbatextboxshape.cxx b/sc/source/ui/vba/vbatextboxshape.cxx
index 9c652643ce2d..3cbb47743ea1 100644
--- a/sc/source/ui/vba/vbatextboxshape.cxx
+++ b/sc/source/ui/vba/vbatextboxshape.cxx
@@ -50,7 +50,7 @@ ScVbaTextBoxShape::characters( const uno::Any& Start, const uno::Any& Length ) t
ScDocument* pDoc = pDocShell ? pDocShell->GetDocument() : NULL;
if ( !pDoc )
- throw uno::RuntimeException("Failed to access document from shell", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Failed to access document from shell" );
uno::Reference< text::XSimpleText > xSimple( m_xTextRange, uno::UNO_QUERY_THROW );
ScVbaPalette aPalette( pDoc->GetDocumentShell() );
diff --git a/sc/source/ui/vba/vbavalidation.cxx b/sc/source/ui/vba/vbavalidation.cxx
index 6bb090f7c31d..edb3b9d72eac 100644
--- a/sc/source/ui/vba/vbavalidation.cxx
+++ b/sc/source/ui/vba/vbavalidation.cxx
@@ -233,10 +233,10 @@ ScVbaValidation::Add( const uno::Any& Type, const uno::Any& AlertStyle, const un
sheet::ValidationType nValType = sheet::ValidationType_ANY;
xProps->getPropertyValue( STYPE ) >>= nValType;
if ( nValType != sheet::ValidationType_ANY )
- throw uno::RuntimeException("validation object already exists", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("validation object already exists" );
sal_Int32 nType = -1;
if ( !Type.hasValue() || !( Type >>= nType ) )
- throw uno::RuntimeException("missing required param", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("missing required param" );
Delete(); // set up defaults
OUString sFormula1;
@@ -250,7 +250,7 @@ ScVbaValidation::Add( const uno::Any& Type, const uno::Any& AlertStyle, const un
// for validate list
// at least formula1 is required
if ( !Formula1.hasValue() )
- throw uno::RuntimeException("missing param", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("missing param" );
nValType = sheet::ValidationType_LIST;
xProps->setPropertyValue( STYPE, uno::makeAny(nValType ));
// #TODO validate required params
@@ -262,7 +262,7 @@ ScVbaValidation::Add( const uno::Any& Type, const uno::Any& AlertStyle, const un
xProps->setPropertyValue( STYPE, uno::makeAny(nValType ));
break;
default:
- throw uno::RuntimeException("unsupported operation...", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("unsupported operation..." );
}
sheet::ValidationAlertStyle eStyle = sheet::ValidationAlertStyle_STOP;
@@ -283,7 +283,7 @@ ScVbaValidation::Add( const uno::Any& Type, const uno::Any& AlertStyle, const un
eStyle = sheet::ValidationAlertStyle_INFO;
break;
default:
- throw uno::RuntimeException("bad param...", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("bad param..." );
}
}
diff --git a/sc/source/ui/vba/vbawindow.cxx b/sc/source/ui/vba/vbawindow.cxx
index c7e196af3e66..ac89af3c0ab4 100644
--- a/sc/source/ui/vba/vbawindow.cxx
+++ b/sc/source/ui/vba/vbawindow.cxx
@@ -103,13 +103,13 @@ public:
{
ScModelObj* pModel = static_cast< ScModelObj* >( m_xModel.get() );
if ( !pModel )
- throw uno::RuntimeException("Cannot obtain current document", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Cannot obtain current document" );
ScDocShell* pDocShell = (ScDocShell*)pModel->GetEmbeddedObject();
if ( !pDocShell )
- throw uno::RuntimeException("Cannot obtain docshell", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Cannot obtain docshell" );
ScTabViewShell* pViewShell = excel::getBestViewShell( m_xModel );
if ( !pViewShell )
- throw uno::RuntimeException("Cannot obtain view shell", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Cannot obtain view shell" );
SCTAB nTabCount = pDocShell->GetDocument()->GetTableCount();
SCTAB nIndex = 0;
@@ -289,7 +289,7 @@ ScVbaWindow::ScrollWorkbookTabs( const uno::Any& /*Sheets*/, const uno::Any& /*P
/*
sal_Int32 nSheets = 0;
sal_Int32 nPosition = 0;
- throw uno::RuntimeException("No Implemented", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("No Implemented" );
sal_Bool bSheets = ( Sheets >>= nSheets );
sal_Bool bPosition = ( Position >>= nPosition );
if ( bSheets || bPosition ) // at least one param specified
@@ -443,7 +443,7 @@ ScVbaWindow::setWindowState( const uno::Any& _windowstate ) throw (uno::RuntimeE
else if (nwindowState == xlNormal)
pWork -> Restore();
else
- throw uno::RuntimeException("Invalid Parameter", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Invalid Parameter" );
}
}
diff --git a/sc/source/ui/vba/vbaworkbooks.cxx b/sc/source/ui/vba/vbaworkbooks.cxx
index 9a57a837e238..9c01a17d5cb1 100644
--- a/sc/source/ui/vba/vbaworkbooks.cxx
+++ b/sc/source/ui/vba/vbaworkbooks.cxx
@@ -248,7 +248,7 @@ ScVbaWorkbooks::Open( const OUString& rFileName, const uno::Any& /*UpdateLinks*/
Format >>= nFormat; // val of nFormat overwritten if extracted
// validate param
if ( nFormat < 1 || nFormat > 6 )
- throw uno::RuntimeException("Illegal value for Format", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Illegal value for Format" );
}
sal_Int16 nDelim = getCurrentDelim();
@@ -261,13 +261,13 @@ ScVbaWorkbooks::Open( const OUString& rFileName, const uno::Any& /*UpdateLinks*/
{
// Need to check Delimiter param
if ( !Delimiter.hasValue() )
- throw uno::RuntimeException("Expected value for Delimiter", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Expected value for Delimiter" );
OUString sStr;
Delimiter >>= sStr;
if ( !sStr.isEmpty() )
nDelim = sStr[0];
else
- throw uno::RuntimeException("Incorrect value for Delimiter", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Incorrect value for Delimiter" );
}
getCurrentDelim() = nDelim; //set new current
@@ -282,7 +282,7 @@ ScVbaWorkbooks::Open( const OUString& rFileName, const uno::Any& /*UpdateLinks*/
sProps[ nIndex ].Value <<= OUString("com.sun.star.sheet.SpreadsheetDocument");
}
else if ( !isSpreadSheetFile( sType ) )
- throw uno::RuntimeException("Bad Format", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Bad Format" );
uno::Reference <sheet::XSpreadsheetDocument> xSpreadDoc( openDocument( rFileName, ReadOnly, sProps ), uno::UNO_QUERY_THROW );
uno::Any aRet = getWorkbook( mxContext, xSpreadDoc, mxParent );
diff --git a/sc/source/ui/vba/vbaworksheet.cxx b/sc/source/ui/vba/vbaworksheet.cxx
index 72b553d314dc..71bacc8efe81 100644
--- a/sc/source/ui/vba/vbaworksheet.cxx
+++ b/sc/source/ui/vba/vbaworksheet.cxx
@@ -360,8 +360,7 @@ ScVbaWorksheet::getEnableSelection() throw (uno::RuntimeException, std::exceptio
return excel::XlEnableSelection::xlNoSelection;
}
else
- throw uno::RuntimeException("Sheet Name does not exist. ",
- uno::Reference< XInterface >() );
+ throw uno::RuntimeException("Sheet Name does not exist." );
}
@@ -401,8 +400,7 @@ ScVbaWorksheet::setEnableSelection( sal_Int32 nSelection ) throw (uno::RuntimeEx
}
}
else
- throw uno::RuntimeException("Sheet Name does not exist. ",
- uno::Reference< XInterface >() );
+ throw uno::RuntimeException("Sheet Name does not exist." );
}
diff --git a/sc/source/ui/vba/vbaworksheets.cxx b/sc/source/ui/vba/vbaworksheets.cxx
index 71598bbee9cc..b55016aecf0d 100644
--- a/sc/source/ui/vba/vbaworksheets.cxx
+++ b/sc/source/ui/vba/vbaworksheets.cxx
@@ -360,7 +360,7 @@ ScVbaWorksheets::setVisible( const uno::Any& _visible ) throw (uno::RuntimeExcep
}
}
else
- throw uno::RuntimeException("Visible property doesn't support non boolean #FIXME", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Visible property doesn't support non boolean #FIXME" );
}
void SAL_CALL
@@ -368,7 +368,7 @@ ScVbaWorksheets::Select( const uno::Any& Replace ) throw (uno::RuntimeException,
{
ScTabViewShell* pViewShell = excel::getBestViewShell( mxModel );
if ( !pViewShell )
- throw uno::RuntimeException("Cannot obtain view shell", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Cannot obtain view shell" );
ScMarkData& rMarkData = pViewShell->GetViewData()->GetMarkData();
bool bReplace = true;
diff --git a/scripting/source/basprov/basmethnode.cxx b/scripting/source/basprov/basmethnode.cxx
index 8a1f823c4c35..70ddb1f249e3 100644
--- a/scripting/source/basprov/basmethnode.cxx
+++ b/scripting/source/basprov/basmethnode.cxx
@@ -293,8 +293,7 @@ namespace basprov
(void)aValue;
throw UnknownPropertyException(
- OUString( "BasicMethodNodeImpl::setValue: property name is unknown!" ),
- Reference< XInterface >() );
+ "BasicMethodNodeImpl::setValue: property name is unknown!" );
}
@@ -304,8 +303,7 @@ namespace basprov
(void)aPropertyName;
throw UnknownPropertyException(
- OUString( "BasicMethodNodeImpl::getValue: property name is unknown!" ),
- Reference< XInterface >() );
+ "BasicMethodNodeImpl::getValue: property name is unknown!" );
}
diff --git a/scripting/source/basprov/basprov.cxx b/scripting/source/basprov/basprov.cxx
index 96ff21564a21..915c2d5b4f5e 100644
--- a/scripting/source/basprov/basprov.cxx
+++ b/scripting/source/basprov/basprov.cxx
@@ -274,8 +274,7 @@ namespace basprov
{
/*
throw RuntimeException(
- OUString( "BasicProviderImpl::initialize: no scripting context!" ),
- Reference< XInterface >() );
+ "BasicProviderImpl::initialize: no scripting context!" );
*/
}
}
diff --git a/scripting/source/dlgprov/dlgprov.cxx b/scripting/source/dlgprov/dlgprov.cxx
index 70a82c30480e..63178ad88e70 100644
--- a/scripting/source/dlgprov/dlgprov.cxx
+++ b/scripting/source/dlgprov/dlgprov.cxx
@@ -269,7 +269,7 @@ static OUString aResourceResolverPropName("ResourceResolver");
{
if ( !m_BasicInfo.get() )
// shouln't get here
- throw RuntimeException("No information to create dialog", Reference< XInterface >() );
+ throw RuntimeException("No information to create dialog" );
Reference< resource::XStringResourceManager > xStringResourceManager = getStringResourceFromDialogLibrary( m_BasicInfo->mxDlgLib );
OUString aURL("" );
@@ -617,9 +617,7 @@ static OUString aResourceResolverPropName("ResourceResolver");
if ( !m_xModel.is() )
{
- throw RuntimeException(
- OUString( "DialogProviderImpl::initialize: invalid argument format!" ),
- Reference< XInterface >() );
+ throw RuntimeException( "DialogProviderImpl::initialize: invalid argument format!" );
}
}
else if ( aArguments.getLength() == 4 )
@@ -639,9 +637,7 @@ static OUString aResourceResolverPropName("ResourceResolver");
}
else if ( aArguments.getLength() > 4 )
{
- throw RuntimeException(
- OUString( "DialogProviderImpl::initialize: invalid number of arguments!" ),
- Reference< XInterface >() );
+ throw RuntimeException( "DialogProviderImpl::initialize: invalid number of arguments!" );
}
}
diff --git a/scripting/source/protocolhandler/scripthandler.cxx b/scripting/source/protocolhandler/scripthandler.cxx
index d2c6f75a16f2..79c6ffb99b6e 100644
--- a/scripting/source/protocolhandler/scripthandler.cxx
+++ b/scripting/source/protocolhandler/scripthandler.cxx
@@ -84,7 +84,7 @@ void SAL_CALL ScriptProtocolHandler::initialize(
if ( aArguments.getLength() && !( aArguments[ 0 ] >>= m_xFrame ) )
{
OUString temp = "ScriptProtocolHandler::initialize: could not extract reference to the frame";
- throw RuntimeException( temp, Reference< XInterface >() );
+ throw RuntimeException( temp );
}
ENSURE_OR_THROW( m_xContext.is(), "ScriptProtocolHandler::initialize: No Service Manager available" );
@@ -430,12 +430,12 @@ void ScriptProtocolHandler::createScriptProvider()
catch ( const RuntimeException & e )
{
OUString temp = "ScriptProtocolHandler::createScriptProvider(), ";
- throw RuntimeException( temp.concat( e.Message ), Reference< XInterface >() );
+ throw RuntimeException( temp.concat( e.Message ) );
}
catch ( const Exception & e )
{
OUString temp = "ScriptProtocolHandler::createScriptProvider: ";
- throw RuntimeException( temp.concat( e.Message ), Reference< XInterface >() );
+ throw RuntimeException( temp.concat( e.Message ) );
}
}
diff --git a/scripting/source/provider/BrowseNodeFactoryImpl.cxx b/scripting/source/provider/BrowseNodeFactoryImpl.cxx
index 9941f6b6f1da..61581f55459a 100644
--- a/scripting/source/provider/BrowseNodeFactoryImpl.cxx
+++ b/scripting/source/provider/BrowseNodeFactoryImpl.cxx
@@ -680,7 +680,7 @@ BrowseNodeFactoryImpl::createView( sal_Int16 viewType )
case browse::BrowseNodeFactoryViewTypes::MACROORGANIZER:
return getOrganizerHierarchy();
default:
- throw RuntimeException( "Unknown view type", Reference< XInterface >() );
+ throw RuntimeException( "Unknown view type" );
}
}
diff --git a/scripting/source/provider/MasterScriptProvider.cxx b/scripting/source/provider/MasterScriptProvider.cxx
index 0ae25ec6a3a0..3b02a10a8cf1 100644
--- a/scripting/source/provider/MasterScriptProvider.cxx
+++ b/scripting/source/provider/MasterScriptProvider.cxx
@@ -106,8 +106,7 @@ throw ( Exception, RuntimeException, std::exception )
if ( len > 1 )
{
throw RuntimeException(
- "MasterScriptProvider::initialize: invalid number of arguments",
- Reference< XInterface >() );
+ "MasterScriptProvider::initialize: invalid number of arguments" );
}
Sequence< Any > invokeArgs( len );
@@ -498,15 +497,13 @@ MasterScriptProvider::insertByName( const OUString& aName, const Any& aElement )
if ( !xCont.is() )
{
throw RuntimeException(
- "PackageMasterScriptProvider doesn't implement XNameContainer",
- Reference< XInterface >() );
+ "PackageMasterScriptProvider doesn't implement XNameContainer" );
}
xCont->insertByName( aName, aElement );
}
else
{
- throw RuntimeException( "PackageMasterScriptProvider is unitialised",
- Reference< XInterface >() );
+ throw RuntimeException( "PackageMasterScriptProvider is unitialised" );
}
}
@@ -530,8 +527,7 @@ MasterScriptProvider::insertByName( const OUString& aName, const Any& aElement )
{
throw RuntimeException(
"insertByName cannot instantiate "
- "child script providers.",
- Reference< XInterface >() );
+ "child script providers." );
}
Sequence < Reference< provider::XScriptProvider > > xSProviders =
providerCache()->getAllProviders();
@@ -578,15 +574,13 @@ MasterScriptProvider::removeByName( const OUString& Name ) throw ( container::No
if ( !xCont.is() )
{
throw RuntimeException(
- "PackageMasterScriptProvider doesn't implement XNameContainer",
- Reference< XInterface >() );
+ "PackageMasterScriptProvider doesn't implement XNameContainer" );
}
xCont->removeByName( Name );
}
else
{
- throw RuntimeException( "PackageMasterScriptProvider is unitialised",
- Reference< XInterface >() );
+ throw RuntimeException( "PackageMasterScriptProvider is unitialised" );
}
}
@@ -605,8 +599,7 @@ MasterScriptProvider::removeByName( const OUString& Name ) throw ( container::No
{
throw RuntimeException(
"removeByName() cannot instantiate "
- "child script providers.",
- Reference< XInterface >() );
+ "child script providers." );
}
Sequence < Reference< provider::XScriptProvider > > xSProviders =
providerCache()->getAllProviders();
@@ -650,8 +643,7 @@ MasterScriptProvider::replaceByName( const OUString& aName, const Any& aElement
// TODO needs implementing
if ( true )
{
- throw RuntimeException( "replaceByName not implemented!!!!" ,
- Reference< XInterface >() );
+ throw RuntimeException( "replaceByName not implemented!!!!" );
}
}
@@ -664,8 +656,7 @@ MasterScriptProvider::getByName( const OUString& aName ) throw ( container::NoSu
Any result;
if ( true )
{
- throw RuntimeException( "getByName not implemented!!!!" ,
- Reference< XInterface >() );
+ throw RuntimeException( "getByName not implemented!!!!" );
}
return result;
}
@@ -682,8 +673,7 @@ MasterScriptProvider::hasByName( const OUString& aName ) throw (RuntimeException
if ( !xCont.is() )
{
throw RuntimeException(
- "PackageMasterScriptProvider doesn't implement XNameContainer",
- Reference< XInterface >() );
+ "PackageMasterScriptProvider doesn't implement XNameContainer" );
}
result = xCont->hasByName( aName );
@@ -692,8 +682,7 @@ MasterScriptProvider::hasByName( const OUString& aName ) throw (RuntimeException
// have a PackageProvider
else if (!m_xModel.is())
{
- throw RuntimeException( "PackageMasterScriptProvider is unitialised",
- Reference< XInterface >() );
+ throw RuntimeException( "PackageMasterScriptProvider is unitialised" );
}
}
@@ -713,8 +702,7 @@ MasterScriptProvider::hasByName( const OUString& aName ) throw (RuntimeException
{
throw RuntimeException(
"removeByName() cannot instantiate "
- "child script providers.",
- Reference< XInterface >() );
+ "child script providers." );
}
Sequence < Reference< provider::XScriptProvider > > xSProviders =
providerCache()->getAllProviders();
@@ -750,8 +738,7 @@ MasterScriptProvider::getElementNames( ) throw ( RuntimeException, std::excepti
Sequence< OUString > names;
if ( true )
{
- throw RuntimeException( "getElementNames not implemented!!!!" ,
- Reference< XInterface >() );
+ throw RuntimeException( "getElementNames not implemented!!!!" );
}
return names;
}
@@ -769,8 +756,7 @@ sal_Bool SAL_CALL MasterScriptProvider::hasElements( ) throw ( RuntimeException
// TODO needs implementing
if ( true )
{
- throw RuntimeException( "hasElements not implemented!!!!" ,
- Reference< XInterface >() );
+ throw RuntimeException( "hasElements not implemented!!!!" );
}
return false;
}
@@ -787,8 +773,7 @@ MasterScriptProvider::getAllProviders() throw ( css::uno::RuntimeException )
{
OUString errorMsg(
"MasterScriptProvider::getAllProviders, cache not initialised");
- throw RuntimeException( errorMsg.concat( errorMsg ),
- Reference< XInterface >() );
+ throw RuntimeException( errorMsg.concat( errorMsg ) );
}
}
diff --git a/scripting/source/provider/ProviderCache.cxx b/scripting/source/provider/ProviderCache.cxx
index 71bba4c84e29..b094e2e224de 100644
--- a/scripting/source/provider/ProviderCache.cxx
+++ b/scripting/source/provider/ProviderCache.cxx
@@ -176,7 +176,7 @@ ProviderCache::populateCache() throw ( RuntimeException )
OUString temp =
"ProviderCache::populateCache: couldn't obtain XSingleComponentFactory for "
+ serviceName;
- throw RuntimeException( temp.concat( e.Message ), Reference< XInterface >() );
+ throw RuntimeException( temp.concat( e.Message ) );
}
}
@@ -191,7 +191,7 @@ ProviderCache::createProvider( ProviderDetails& details ) throw ( RuntimeExcepti
catch ( const Exception& e )
{
OUString temp("ProviderCache::createProvider() Error creating provider from factory!!!\n");
- throw RuntimeException( temp.concat( e.Message ), Reference< XInterface >() );
+ throw RuntimeException( temp.concat( e.Message ) );
}
return details.provider;
diff --git a/scripting/source/provider/ScriptImpl.cxx b/scripting/source/provider/ScriptImpl.cxx
index f06075164287..f17bb9a2f006 100644
--- a/scripting/source/provider/ScriptImpl.cxx
+++ b/scripting/source/provider/ScriptImpl.cxx
@@ -92,15 +92,13 @@ throw ( lang::IllegalArgumentException, script::CannotConvertException,
catch ( const RuntimeException & re )
{
OUString temp = "ScriptImpl::invoke RuntimeException : ";
- throw RuntimeException( temp.concat( re.Message ),
- Reference< XInterface > () );
+ throw RuntimeException( temp.concat( re.Message ) );
}
#ifdef _DEBUG
catch ( ... )
{
throw RuntimeException(
- "ScriptImpl::invoke Unknown Exception caught - RuntimeException rethrown",
- Reference< XInterface > () );
+ "ScriptImpl::invoke Unknown Exception caught - RuntimeException rethrown" );
}
#endif
return result;
diff --git a/scripting/source/provider/URIHelper.cxx b/scripting/source/provider/URIHelper.cxx
index a8498b33f9a7..1464e6ad3557 100644
--- a/scripting/source/provider/URIHelper.cxx
+++ b/scripting/source/provider/URIHelper.cxx
@@ -89,16 +89,12 @@ throw ( uno::Exception, uno::RuntimeException, std::exception )
args[0].getValueType() != ::cppu::UnoType<OUString>::get() ||
args[1].getValueType() != ::cppu::UnoType<OUString>::get() )
{
- throw uno::RuntimeException( OUString(
- "ScriptingFrameworkURIHelper got invalid argument list" ),
- uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "ScriptingFrameworkURIHelper got invalid argument list" );
}
if ( !(args[0] >>= m_sLanguage) || !(args[1] >>= m_sLocation) )
{
- throw uno::RuntimeException( OUString(
- "ScriptingFrameworkURIHelper error parsing args" ),
- uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "ScriptingFrameworkURIHelper error parsing args" );
}
SCRIPTS_PART = "/Scripts/";
@@ -106,9 +102,7 @@ throw ( uno::Exception, uno::RuntimeException, std::exception )
if ( !initBaseURI() )
{
- throw uno::RuntimeException( OUString(
- "ScriptingFrameworkURIHelper cannot find script directory"),
- uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "ScriptingFrameworkURIHelper cannot find script directory" );
}
}
diff --git a/scripting/source/stringresource/stringresource.cxx b/scripting/source/stringresource/stringresource.cxx
index 983bd2ca5811..1ecfd8e96487 100644
--- a/scripting/source/stringresource/stringresource.cxx
+++ b/scripting/source/stringresource/stringresource.cxx
@@ -195,7 +195,7 @@ OUString StringResourceImpl::implResolveString
{
OUString errorMsg("StringResourceImpl: No entry for ResourceID: ");
errorMsg = errorMsg.concat( ResourceID );
- throw ::com::sun::star::resource::MissingResourceException( errorMsg, Reference< XInterface >() );
+ throw ::com::sun::star::resource::MissingResourceException( errorMsg );
}
return aRetStr;
}
@@ -330,7 +330,7 @@ void StringResourceImpl::implCheckReadOnly( const sal_Char* pExceptionMsg )
if( m_bReadOnly )
{
OUString errorMsg = OUString::createFromAscii( pExceptionMsg );
- throw NoSupportException( errorMsg, Reference< XInterface >() );
+ throw NoSupportException( errorMsg );
}
}
@@ -443,7 +443,7 @@ void StringResourceImpl::implRemoveId( const OUString& ResourceID, LocaleItem* p
{
OUString errorMsg("StringResourceImpl: No entries for ResourceID: ");
errorMsg = errorMsg.concat( ResourceID );
- throw ::com::sun::star::resource::MissingResourceException( errorMsg, Reference< XInterface >() );
+ throw ::com::sun::star::resource::MissingResourceException( errorMsg );
}
rHashMap.erase( it );
pLocaleItem->m_bModified = true;
@@ -477,7 +477,7 @@ void StringResourceImpl::newLocale( const Locale& locale )
if( getItemForLocale( locale, false ) != NULL )
{
OUString errorMsg("StringResourceImpl: locale already exists");
- throw ElementExistException( errorMsg, Reference< XInterface >() );
+ throw ElementExistException( errorMsg );
}
// TODO?: Check if locale is valid? How?
@@ -632,7 +632,7 @@ sal_Int32 StringResourceImpl::getUniqueNumericId( )
if( m_nNextUniqueNumericId < UNIQUE_NUMBER_NEEDS_INITIALISATION )
{
OUString errorMsg("getUniqueNumericId: Extended sal_Int32 range");
- throw NoSupportException( errorMsg, Reference< XInterface >() );
+ throw NoSupportException( errorMsg );
}
return m_nNextUniqueNumericId;
}
@@ -746,8 +746,7 @@ Reference< XMultiComponentFactory > StringResourceImpl::getMultiComponentFactory
if( !xSMgr.is() )
{
throw RuntimeException(
- OUString( "StringResourceImpl::getMultiComponentFactory: Couldn't instantiate MultiComponentFactory" ),
- Reference< XInterface >() );
+ "StringResourceImpl::getMultiComponentFactory: Couldn't instantiate MultiComponentFactory" );
}
m_xMCF = xSMgr;
}
@@ -2329,8 +2328,7 @@ void StringResourceWithStorageImpl::initialize( const Sequence< Any >& aArgument
if ( aArguments.getLength() != 5 )
{
throw RuntimeException(
- OUString( "StringResourceWithStorageImpl::initialize: invalid number of arguments!" ),
- Reference< XInterface >() );
+ "StringResourceWithStorageImpl::initialize: invalid number of arguments!" );
}
bool bOk = (aArguments[0] >>= m_xStorage);
@@ -2656,8 +2654,7 @@ void StringResourceWithLocationImpl::initialize( const Sequence< Any >& aArgumen
if ( aArguments.getLength() != 6 )
{
throw RuntimeException(
- OUString( "XInitialization::initialize: invalid number of arguments!" ),
- Reference< XInterface >() );
+ "XInitialization::initialize: invalid number of arguments!" );
}
bool bOk = (aArguments[0] >>= m_aLocation);
diff --git a/scripting/source/vbaevents/eventhelper.cxx b/scripting/source/vbaevents/eventhelper.cxx
index 6a3a1df73987..2ac54c9a6f69 100644
--- a/scripting/source/vbaevents/eventhelper.cxx
+++ b/scripting/source/vbaevents/eventhelper.cxx
@@ -471,18 +471,18 @@ public:
virtual void SAL_CALL insertByName( const OUString&, const Any& ) throw (lang::IllegalArgumentException, container::ElementExistException, lang::WrappedTargetException, RuntimeException, std::exception) SAL_OVERRIDE
{
- throw RuntimeException("ReadOnly container", Reference< XInterface >() );
+ throw RuntimeException("ReadOnly container" );
}
virtual void SAL_CALL removeByName( const OUString& ) throw (::com::sun::star::container::NoSuchElementException, lang::WrappedTargetException, RuntimeException, std::exception) SAL_OVERRIDE
{
- throw RuntimeException("ReadOnly container", Reference< XInterface >() );
+ throw RuntimeException("ReadOnly container" );
}
// XNameReplace
virtual void SAL_CALL replaceByName( const OUString&, const Any& ) throw (lang::IllegalArgumentException, container::NoSuchElementException, lang::WrappedTargetException, RuntimeException, std::exception) SAL_OVERRIDE
{
- throw RuntimeException("ReadOnly container", Reference< XInterface >() );
+ throw RuntimeException("ReadOnly container" );
}
diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx
index 215c7ec92604..f01d3aea25d8 100644
--- a/sd/source/core/stlsheet.cxx
+++ b/sd/source/core/stlsheet.cxx
@@ -796,7 +796,7 @@ void SAL_CALL SdStyleSheet::dispose( ) throw (RuntimeException, std::exception)
}
catch (const Exception & exc)
{
- throw RuntimeException( "unexpected UNO exception caught: " + exc.Message, Reference< XInterface >() );
+ throw RuntimeException( "unexpected UNO exception caught: " + exc.Message );
}
}
}
diff --git a/sfx2/source/appl/openuriexternally.cxx b/sfx2/source/appl/openuriexternally.cxx
index e153bda13623..04da015a3c7d 100644
--- a/sfx2/source/appl/openuriexternally.cxx
+++ b/sfx2/source/appl/openuriexternally.cxx
@@ -41,10 +41,8 @@ bool sfx2::openUriExternally(
} catch (css::lang::IllegalArgumentException & e) {
if (e.ArgumentPosition != 0) {
throw css::uno::RuntimeException(
- (OUString(
- "unexpected IllegalArgumentException: ")
- + e.Message),
- css::uno::Reference< css::uno::XInterface >());
+ OUString("unexpected IllegalArgumentException: ")
+ + e.Message);
}
SolarMutexGuard g;
ErrorBox eb(
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index 40ab2128492f..d079799284c1 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -465,17 +465,14 @@ SfxSaveGuard::SfxSaveGuard(const Reference< frame::XModel >& xModel
, m_pFramesLock(0 )
{
if ( m_pData->m_bClosed )
- throw lang::DisposedException(
- OUString("Object already disposed."),
- Reference< XInterface >());
+ throw lang::DisposedException("Object already disposed.");
if (
bRejectConcurrentSaveRequest &&
m_pData->m_bSaving
)
throw io::IOException(
- OUString("Concurrent save requests on the same document are not possible."),
- Reference< XInterface >());
+ "Concurrent save requests on the same document are not possible.");
m_pData->m_bSaving = true;
m_pFramesLock = new SfxOwnFramesLocker(m_pData->m_pObjectShell);
@@ -2427,7 +2424,7 @@ void SAL_CALL SfxBaseModel::removeDocumentEventListener( const Reference< docume
void SAL_CALL SfxBaseModel::notifyDocumentEvent( const OUString&, const Reference< frame::XController2 >&, const Any& )
throw ( lang::IllegalArgumentException, lang::NoSupportException, RuntimeException, std::exception )
{
- throw lang::NoSupportException("SfxBaseModel controls all the sent notifications itself!", Reference< XInterface >() );
+ throw lang::NoSupportException("SfxBaseModel controls all the sent notifications itself!" );
}
Sequence< document::CmisProperty > SAL_CALL SfxBaseModel::getCmisProperties()
@@ -3013,8 +3010,7 @@ void SfxBaseModel::impl_store( const OUString& sURL
m_pData->m_pObjectShell->StoreLog();
throw frame::IllegalArgumentIOException(
- OUString( "CopyStreamIfPossible parameter is not acceptable for storeAsURL() call!"),
- Reference< XInterface >() );
+ "CopyStreamIfPossible parameter is not acceptable for storeAsURL() call!" );
}
sal_uInt32 nModifyPasswordHash = 0;
diff --git a/slideshow/source/engine/shapes/viewmediashape.cxx b/slideshow/source/engine/shapes/viewmediashape.cxx
index f91be0be3c55..db6eea1f0b00 100644
--- a/slideshow/source/engine/shapes/viewmediashape.cxx
+++ b/slideshow/source/engine/shapes/viewmediashape.cxx
@@ -430,9 +430,7 @@ namespace slideshow
}
catch( const uno::Exception& )
{
- throw lang::NoSupportException(
- OUString( "No video support for " ) + rMediaURL,
- uno::Reference<uno::XInterface>() );
+ throw lang::NoSupportException( OUString( "No video support for " ) + rMediaURL );
}
}
#endif
diff --git a/slideshow/source/engine/soundplayer.cxx b/slideshow/source/engine/soundplayer.cxx
index e91bf4bc490f..1d546a8aa250 100644
--- a/slideshow/source/engine/soundplayer.cxx
+++ b/slideshow/source/engine/soundplayer.cxx
@@ -112,9 +112,7 @@ namespace slideshow
if( !mxPlayer.is() )
throw lang::NoSupportException(
- OUString(
- "No sound support for ") + rSoundURL,
- uno::Reference<uno::XInterface>() );
+ OUString("No sound support for ") + rSoundURL );
}
SoundPlayer::~SoundPlayer()
diff --git a/stoc/source/corereflection/crefl.cxx b/stoc/source/corereflection/crefl.cxx
index b1a35d5985d5..dcf74a4a3f8b 100644
--- a/stoc/source/corereflection/crefl.cxx
+++ b/stoc/source/corereflection/crefl.cxx
@@ -300,7 +300,7 @@ Any IdlReflectionServiceImpl::getByHierarchicalName( const OUString & rName )
_aElements.setValue( rName, aRet );
else
{
- throw container::NoSuchElementException( rName, Reference< XInterface >() );
+ throw container::NoSuchElementException( rName );
}
}
return aRet;
diff --git a/stoc/source/defaultregistry/defaultregistry.cxx b/stoc/source/defaultregistry/defaultregistry.cxx
index c67cc621971f..37ff4a47b8b4 100644
--- a/stoc/source/defaultregistry/defaultregistry.cxx
+++ b/stoc/source/defaultregistry/defaultregistry.cxx
@@ -1158,8 +1158,7 @@ Any RegistryEnumueration::nextElement( )
}
else
{
- throw NoSuchElementException( OUString(
- "NestedRegistry: no nextElement() !" ),Reference< XInterface > () );
+ throw NoSuchElementException( "NestedRegistry: no nextElement() !" );
}
return a;
}
@@ -1242,8 +1241,7 @@ void SAL_CALL NestedRegistryImpl::open( const OUString&, sal_Bool, sal_Bool )
throw(InvalidRegistryException, RuntimeException, std::exception)
{
throw InvalidRegistryException(
- OUString("the 'open' method is not specified for a nested registry"),
- Reference< XInterface >() );
+ "the 'open' method is not specified for a nested registry" );
}
@@ -1283,8 +1281,7 @@ void SAL_CALL NestedRegistryImpl::destroy( )
throw(InvalidRegistryException, RuntimeException, std::exception)
{
throw InvalidRegistryException(
- OUString("the 'destroy' method is not specified for a nested registry"),
- Reference< XInterface >() );
+ "the 'destroy' method is not specified for a nested registry" );
}
diff --git a/stoc/source/implementationregistration/implreg.cxx b/stoc/source/implementationregistration/implreg.cxx
index 1aa67f63a172..d0627d2cda3a 100644
--- a/stoc/source/implementationregistration/implreg.cxx
+++ b/stoc/source/implementationregistration/implreg.cxx
@@ -949,9 +949,7 @@ static void insert_singletons(
xContext->getValueByName( the_tdmgr ) >>= xTDMgr;
if (! xTDMgr.is())
{
- throw RuntimeException(
- "cannot get singleton " + the_tdmgr,
- Reference< XInterface >() );
+ throw RuntimeException( "cannot get singleton " + the_tdmgr );
}
try
{
@@ -959,9 +957,7 @@ static void insert_singletons(
xTDMgr->getByHierarchicalName( existing_name ) >>= xExistingService_td;
if (! xExistingService_td.is())
{
- throw RuntimeException(
- "cannot get service type description: " + existing_name,
- Reference< XInterface >() );
+ throw RuntimeException( "cannot get service type description: " + existing_name );
}
// everything's fine if existing service entry supports the one
@@ -976,14 +972,13 @@ static void insert_singletons(
buf.append( ") does not support given one: " );
buf.append( service_name );
throw registry::CannotRegisterImplementationException(
- buf.makeStringAndClear(), Reference< XInterface >() );
+ buf.makeStringAndClear() );
}
}
catch (const container::NoSuchElementException & exc)
{
throw RuntimeException(
- "cannot get service type description: " + exc.Message,
- Reference< XInterface >() );
+ "cannot get service type description: " + exc.Message );
}
}
}
@@ -1052,8 +1047,7 @@ static void prepareRegistry(
if (!subKeys.getLength())
{
throw InvalidRegistryException(
- OUString( "prepareRegistry(): source registry is empty" ),
- Reference< XInterface > () );
+ "prepareRegistry(): source registry is empty" );
}
const StringPool & pool = spool();
@@ -1497,7 +1491,7 @@ void ImplementationRegistration::prepareRegister(
buf.append( activatorName );
buf.appendAscii( " cannot be instantiated\n" );
throw CannotRegisterImplementationException(
- buf.makeStringAndClear(), Reference< XInterface > () );
+ buf.makeStringAndClear() );
}
}
catch( CannotRegisterImplementationException & )
@@ -1512,7 +1506,7 @@ void ImplementationRegistration::prepareRegister(
buf.append( e.Message );
buf.append( ")" );
throw CannotRegisterImplementationException(
- buf.makeStringAndClear(), Reference< XInterface > () );
+ buf.makeStringAndClear() );
}
catch( const MergeConflictException & e )
{
@@ -1522,16 +1516,14 @@ void ImplementationRegistration::prepareRegister(
buf.append( e.Message );
buf.append( ")" );
throw CannotRegisterImplementationException(
- buf.makeStringAndClear(), Reference< XInterface > () );
+ buf.makeStringAndClear() );
}
}
else
{
throw CannotRegisterImplementationException(
- OUString(
"ImplementationRegistration::registerImplementation() "
- "no componentcontext available to instantiate loader"),
- Reference< XInterface > () );
+ "no componentcontext available to instantiate loader" );
}
}
@@ -1780,8 +1772,7 @@ void ImplementationRegistration::doRegister(
else
{
throw CannotRegisterImplementationException(
- OUString( "ImplementationRegistration::doRegistration() component registration signaled failure" ),
- Reference< XInterface > () );
+ "ImplementationRegistration::doRegistration() component registration signaled failure" );
}
// Cleanup Source registry.
diff --git a/stoc/source/implementationregistration/mergekeys.cxx b/stoc/source/implementationregistration/mergekeys.cxx
index b2101b36e527..c44a44d9e8df 100644
--- a/stoc/source/implementationregistration/mergekeys.cxx
+++ b/stoc/source/implementationregistration/mergekeys.cxx
@@ -54,13 +54,11 @@ static void mergeKeys(
{
if (!xSource.is() || !xSource->isValid()) {
throw registry::InvalidRegistryException(
- "source key is null or invalid!",
- Reference<XInterface>() );
+ "source key is null or invalid!" );
}
if (!xDest.is() || !xDest->isValid()) {
throw registry::InvalidRegistryException(
- "destination key is null or invalid!",
- Reference<XInterface>() );
+ "destination key is null or invalid!" );
}
// write value
@@ -149,15 +147,12 @@ void mergeKeys(
{
if (!xDest.is() || !xDest->isValid()) {
throw registry::InvalidRegistryException(
- "destination key is null or invalid!",
- Reference<XInterface>() );
+ "destination key is null or invalid!" );
}
if (xDest->isReadOnly())
{
throw registry::InvalidRegistryException(
- OUString(
- "destination registry is read-only! cannot merge!"),
- Reference< XInterface >() );
+ "destination registry is read-only! cannot merge!" );
}
t_links links;
diff --git a/stoc/source/invocation/invocation.cxx b/stoc/source/invocation/invocation.cxx
index b4765d2dc711..7d65f7df7269 100644
--- a/stoc/source/invocation/invocation.cxx
+++ b/stoc/source/invocation/invocation.cxx
@@ -524,8 +524,7 @@ Any Invocation_Impl::getValue( const OUString& PropertyName )
}
throw UnknownPropertyException(
- OUString("cannot get value ") + PropertyName,
- Reference< XInterface >() );
+ OUString("cannot get value ") + PropertyName );
}
@@ -552,9 +551,7 @@ void Invocation_Impl::setValue( const OUString& PropertyName, const Any& Value )
_xPropertySet->setPropertyValue(
PropertyName, xTypeConverter->convertTo( Value, aProp.Type ) );
else
- throw RuntimeException(
- OUString("no type converter service!"),
- Reference< XInterface >() );
+ throw RuntimeException( "no type converter service!" );
}
// NameContainer
else if( _xNameContainer.is() )
@@ -567,9 +564,7 @@ void Invocation_Impl::setValue( const OUString& PropertyName, const Any& Value )
else if( xTypeConverter.is() )
aConv = xTypeConverter->convertTo( Value, _xNameContainer->getElementType() );
else
- throw RuntimeException(
- OUString("no type converter service!"),
- Reference< XInterface >() );
+ throw RuntimeException( "no type converter service!" );
// bei Vorhandensein ersetzen, ansonsten einfuegen
if (_xNameContainer->hasByName( PropertyName ))
@@ -578,9 +573,7 @@ void Invocation_Impl::setValue( const OUString& PropertyName, const Any& Value )
_xNameContainer->insertByName( PropertyName, aConv );
}
else
- throw UnknownPropertyException(
- OUString("no introspection nor name container!"),
- Reference< XInterface >() );
+ throw UnknownPropertyException( "no introspection nor name container!" );
}
catch (UnknownPropertyException &)
{
diff --git a/stoc/source/invocation_adapterfactory/iafactory.cxx b/stoc/source/invocation_adapterfactory/iafactory.cxx
index f6378f005a81..216ee96b8562 100644
--- a/stoc/source/invocation_adapterfactory/iafactory.cxx
+++ b/stoc/source/invocation_adapterfactory/iafactory.cxx
@@ -224,7 +224,7 @@ inline void AdapterImpl::release()
static inline void constructRuntimeException(
uno_Any * pExc, const OUString & rMsg )
{
- RuntimeException exc( rMsg, Reference< XInterface >() );
+ RuntimeException exc( rMsg );
// no conversion needed due to binary compatibility + no convertible type
::uno_type_any_construct(
pExc, &exc, ::getCppuType( &exc ).getTypeLibType(), 0 );
@@ -677,8 +677,7 @@ AdapterImpl::AdapterImpl(
}
delete [] m_pInterfaces;
throw RuntimeException(
- "cannot retrieve all interface type infos!",
- Reference< XInterface >() );
+ "cannot retrieve all interface type infos!" );
}
}
@@ -688,8 +687,7 @@ AdapterImpl::AdapterImpl(
OSL_ASSERT( 0 != m_pReceiver );
if (! m_pReceiver)
{
- throw RuntimeException(
- "cannot map receiver!", Reference< XInterface >() );
+ throw RuntimeException( "cannot map receiver!" );
}
m_pFactory->acquire();
@@ -759,8 +757,7 @@ FactoryImpl::FactoryImpl( Reference< XComponentContext > const & xContext )
!m_pConvertToTD ||
!m_pAnySeqTD || !m_pShortSeqTD)
{
- throw RuntimeException(
- "missing type descriptions!", Reference< XInterface >() );
+ throw RuntimeException( "missing type descriptions!" );
}
}
@@ -881,9 +878,7 @@ Reference< XInterface > FactoryImpl::createAdapter(
OSL_ASSERT( xRet.is() );
if (! xRet.is())
{
- throw RuntimeException(
- "mapping UNO to C++ failed!",
- Reference< XInterface >() );
+ throw RuntimeException( "mapping UNO to C++ failed!" );
}
}
return xRet;
diff --git a/stoc/source/javaloader/javaloader.cxx b/stoc/source/javaloader/javaloader.cxx
index 826bdb502be5..c985dbbe7948 100644
--- a/stoc/source/javaloader/javaloader.cxx
+++ b/stoc/source/javaloader/javaloader.cxx
@@ -184,61 +184,55 @@ const css::uno::Reference<XImplementationLoader> & JavaComponentLoader::getJavaL
// instantiate the java JavaLoader
jclass jcClassLoader = pJNIEnv->FindClass("java/lang/ClassLoader");
if(pJNIEnv->ExceptionOccurred())
- throw RuntimeException(OUString(
- "javaloader error - could not find class java/lang/ClassLoader"),
- css::uno::Reference<XInterface>());
+ throw RuntimeException(
+ "javaloader error - could not find class java/lang/ClassLoader");
jmethodID jmLoadClass = pJNIEnv->GetMethodID(
jcClassLoader, "loadClass",
"(Ljava/lang/String;)Ljava/lang/Class;");
if(pJNIEnv->ExceptionOccurred())
- throw RuntimeException(OUString(
- "javaloader error - could not find method java/lang/ClassLoader.loadClass"),
- css::uno::Reference<XInterface>());
+ throw RuntimeException(
+ "javaloader error - could not find method java/lang/ClassLoader.loadClass");
jvalue arg;
arg.l = pJNIEnv->NewStringUTF(
"com.sun.star.comp.loader.JavaLoader");
if(pJNIEnv->ExceptionOccurred())
- throw RuntimeException(OUString(
- "javaloader error - could not create string"),
- css::uno::Reference<XInterface>());
+ throw RuntimeException(
+ "javaloader error - could not create string");
jclass jcJavaLoader = static_cast< jclass >(
pJNIEnv->CallObjectMethodA(
static_cast< jobject >(xVirtualMachine->getClassLoader()),
jmLoadClass, &arg));
if(pJNIEnv->ExceptionOccurred())
- throw RuntimeException(OUString(
- "javaloader error - could not find class com/sun/star/comp/loader/JavaLoader"),
- css::uno::Reference<XInterface>());
+ throw RuntimeException(
+ "javaloader error - could not find class com/sun/star/comp/loader/JavaLoader");
jmethodID jmJavaLoader_init = pJNIEnv->GetMethodID(jcJavaLoader, "<init>", "()V");
if(pJNIEnv->ExceptionOccurred())
- throw RuntimeException(OUString(
- "javaloader error - instantiation of com.sun.star.comp.loader.JavaLoader failed"),
- css::uno::Reference<XInterface>());
+ throw RuntimeException(
+ "javaloader error - instantiation of com.sun.star.comp.loader.JavaLoader failed");
jobject joJavaLoader = pJNIEnv->NewObject(jcJavaLoader, jmJavaLoader_init);
if(pJNIEnv->ExceptionOccurred())
- throw RuntimeException(OUString(
- "javaloader error - instantiation of com.sun.star.comp.loader.JavaLoader failed"),
- css::uno::Reference<XInterface>());
+ throw RuntimeException(
+ "javaloader error - instantiation of com.sun.star.comp.loader.JavaLoader failed");
// map the java JavaLoader to this environment
OUString sJava("java");
uno_getEnvironment(&pJava_environment, sJava.pData,
xVirtualMachine.get());
if(!pJava_environment)
- throw RuntimeException(OUString(
- "javaloader error - no Java environment available"), css::uno::Reference<XInterface>());
+ throw RuntimeException(
+ "javaloader error - no Java environment available");
// why is there no convinient contructor?
OUString sCppu_current_lb_name(CPPU_CURRENT_LANGUAGE_BINDING_NAME);
uno_getEnvironment(&pUno_environment, sCppu_current_lb_name.pData, NULL);
if(!pUno_environment)
- throw RuntimeException(OUString(
- "javaloader error - no C++ environment available"), css::uno::Reference<XInterface>());
+ throw RuntimeException(
+ "javaloader error - no C++ environment available");
Mapping java_curr(pJava_environment, pUno_environment);
if(!java_curr.is())
- throw RuntimeException(OUString(
- "javaloader error - no mapping from java to C++ "), css::uno::Reference<XInterface>());
+ throw RuntimeException(
+ "javaloader error - no mapping from java to C++ ");
// release java environment
pJava_environment->release(pJava_environment);
@@ -251,35 +245,29 @@ const css::uno::Reference<XImplementationLoader> & JavaComponentLoader::getJavaL
getCppuType((css::uno::Reference<XImplementationLoader> *) 0).
getDescription((typelib_TypeDescription **) & pType_XImplementationLoader);
if(!pType_XImplementationLoader)
- throw RuntimeException(OUString(
- "javaloader error - no type information for XImplementationLoader"),
- css::uno::Reference<XInterface>());
+ throw RuntimeException(
+ "javaloader error - no type information for XImplementationLoader");
m_javaLoader = css::uno::Reference<XImplementationLoader>(reinterpret_cast<XImplementationLoader *>(
java_curr.mapInterface(joJavaLoader, pType_XImplementationLoader)));
pJNIEnv->DeleteLocalRef( joJavaLoader );
if(!m_javaLoader.is())
- throw RuntimeException(OUString(
- "javaloader error - mapping of java XImplementationLoader to c++ failed"),
- css::uno::Reference<XInterface>());
+ throw RuntimeException(
+ "javaloader error - mapping of java XImplementationLoader to c++ failed");
typelib_typedescription_release(reinterpret_cast<typelib_TypeDescription *>(pType_XImplementationLoader));
pType_XImplementationLoader = NULL;
}
catch (jvmaccess::VirtualMachine::AttachGuard::CreationException &)
{
- throw RuntimeException(
- OUString(
- "jvmaccess::VirtualMachine::AttachGuard"
- "::CreationException"),0);
+ throw RuntimeException("jvmaccess::VirtualMachine::AttachGuard::CreationException");
}
// set the service manager at the javaloader
css::uno::Reference<XInitialization> javaLoader_XInitialization(m_javaLoader, UNO_QUERY);
if(!javaLoader_XInitialization.is())
- throw RuntimeException(OUString(
- "javaloader error - initialization of java javaloader failed, no XInitialization"),
- css::uno::Reference<XInterface>());
+ throw RuntimeException(
+ "javaloader error - initialization of java javaloader failed, no XInitialization");
Any any;
any <<= css::uno::Reference<XMultiComponentFactory>(
diff --git a/stoc/source/javavm/javavm.cxx b/stoc/source/javavm/javavm.cxx
index cbad43fcf151..8107315e55af 100644
--- a/stoc/source/javavm/javavm.cxx
+++ b/stoc/source/javavm/javavm.cxx
@@ -1238,7 +1238,7 @@ void SAL_CALL JavaVirtualMachine::elementReplaced(
// this code was executed. Maybe it is a security feature. However, all attempts to debug the
// SandboxSecurity class (maybe the VM invokes checkPackageAccess) failed.
// jclass jcSandboxSec= pJNIEnv->FindClass("com.sun.star.lib.sandbox.SandboxSecurity");
-// if(pJNIEnv->ExceptionOccurred()) throw RuntimeException("JNI:FindClass com.sun.star.lib.sandbox.SandboxSecurity", Reference<XInterface>());
+// if(pJNIEnv->ExceptionOccurred()) throw RuntimeException("JNI:FindClass com.sun.star.lib.sandbox.SandboxSecurity");
// jboolean bIsSand= pJNIEnv->IsInstanceOf( joSecur, jcSandboxSec);
// The SecurityManagers class Name must be com.sun.star.lib.sandbox.SandboxSecurity
jclass jcSec= pJNIEnv->GetObjectClass( joSecur);
diff --git a/stoc/source/security/file_policy.cxx b/stoc/source/security/file_policy.cxx
index 18713f1a6b32..bf1fdacdca9d 100644
--- a/stoc/source/security/file_policy.cxx
+++ b/stoc/source/security/file_policy.cxx
@@ -371,7 +371,7 @@ void PolicyReader::error( OUString const & msg )
buf.append( m_pos );
buf.append( "] " );
buf.append( msg );
- throw RuntimeException( buf.makeStringAndClear(), Reference< XInterface >() );
+ throw RuntimeException( buf.makeStringAndClear() );
}
PolicyReader::PolicyReader( OUString const & fileName, AccessControl & ac )
@@ -388,7 +388,7 @@ PolicyReader::PolicyReader( OUString const & fileName, AccessControl & ac )
buf.append( "cannot open file \"" );
buf.append( m_fileName );
buf.append( "\"!" );
- throw RuntimeException( buf.makeStringAndClear(), Reference< XInterface >() );
+ throw RuntimeException( buf.makeStringAndClear() );
}
}
diff --git a/stoc/source/security/permissions.cxx b/stoc/source/security/permissions.cxx
index d429c5f163cd..d39bb2283b3c 100644
--- a/stoc/source/security/permissions.cxx
+++ b/stoc/source/security/permissions.cxx
@@ -519,8 +519,7 @@ PermissionCollection::PermissionCollection(
OUStringBuffer buf( 48 );
buf.append( "checking for unsupported permission type: " );
buf.append( perm_type.getTypeName() );
- throw RuntimeException(
- buf.makeStringAndClear(), Reference< XInterface >() );
+ throw RuntimeException( buf.makeStringAndClear() );
}
}
}
@@ -641,8 +640,7 @@ void PermissionCollection::checkPermission( Any const & perm ) const
OUStringBuffer buf( 48 );
buf.append( "checking for unsupported permission type: " );
buf.append( demanded_type.getTypeName() );
- throw RuntimeException(
- buf.makeStringAndClear(), Reference< XInterface >() );
+ throw RuntimeException( buf.makeStringAndClear() );
}
}
diff --git a/stoc/source/servicemanager/servicemanager.cxx b/stoc/source/servicemanager/servicemanager.cxx
index edc2b57b3239..80746280e0b2 100644
--- a/stoc/source/servicemanager/servicemanager.cxx
+++ b/stoc/source/servicemanager/servicemanager.cxx
@@ -223,7 +223,7 @@ beans::Property PropertySetInfo_Impl::getPropertyByName( OUString const & name )
return p[ nPos ];
}
throw beans::UnknownPropertyException(
- "unknown property: " + name, Reference< XInterface >() );
+ "unknown property: " + name );
}
sal_Bool PropertySetInfo_Impl::hasPropertyByName( OUString const & name )
@@ -519,8 +519,7 @@ class OServiceManagerWrapper : public OServiceManagerMutex, public t_OServiceMan
if (! m_root.is())
{
throw lang::DisposedException(
- "service manager instance has already been disposed!",
- Reference< XInterface >() );
+ "service manager instance has already been disposed!" );
}
return m_root;
}
@@ -674,8 +673,7 @@ OServiceManagerWrapper::OServiceManagerWrapper(
if (! m_root.is())
{
throw RuntimeException(
- OUString("no service manager to wrap"),
- Reference< XInterface >() );
+ "no service manager to wrap" );
}
}
@@ -1199,9 +1197,7 @@ void OServiceManager::insert( const Any & Element )
HashSet_Ref::iterator aIt = m_ImplementationMap.find( xEle );
if( aIt != m_ImplementationMap.end() )
{
- throw ElementExistException(
- OUString("element already exists!"),
- Reference< XInterface >() );
+ throw ElementExistException( "element already exists!" );
}
// put into the implementation hashmap
diff --git a/svl/source/passwordcontainer/passwordcontainer.cxx b/svl/source/passwordcontainer/passwordcontainer.cxx
index 111208462984..b5ad28a9d2b1 100644
--- a/svl/source/passwordcontainer/passwordcontainer.cxx
+++ b/svl/source/passwordcontainer/passwordcontainer.cxx
@@ -487,7 +487,7 @@ vector< OUString > PasswordContainer::DecodePasswords( const OUString& aLine, co
// problems with decoding
OSL_FAIL( "Problem with decoding\n" );
- throw RuntimeException("Can't decode!", Reference< XInterface >() );
+ throw RuntimeException("Can't decode!" );
}
@@ -566,7 +566,7 @@ OUString PasswordContainer::EncodePasswords( vector< OUString > lines, const OUS
// problems with encoding
OSL_FAIL( "Problem with encoding\n" );
- throw RuntimeException("Can't encode!", Reference< XInterface >() );
+ throw RuntimeException("Can't encode!" );
}
diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx
index 93952c81a846..709adc2691d5 100644
--- a/sw/source/core/unocore/unotext.cxx
+++ b/sw/source/core/unocore/unotext.cxx
@@ -2493,7 +2493,7 @@ throw (uno::RuntimeException, std::exception)
if (::sw::XTextRangeToSwPaM(aPam, xTextPosition))
{
if ( !aPam.GetNode()->GetTxtNode() )
- throw uno::RuntimeException("Invalid text range", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Invalid text range" );
SwNode& rNode = GetDoc()->GetNodes().GetEndOfContent();
diff --git a/sw/source/ui/vba/vbaaddin.cxx b/sw/source/ui/vba/vbaaddin.cxx
index 2153b5800ca3..4547af5bfd0b 100644
--- a/sw/source/ui/vba/vbaaddin.cxx
+++ b/sw/source/ui/vba/vbaaddin.cxx
@@ -45,7 +45,7 @@ OUString SAL_CALL SwVbaAddin::getName() throw (uno::RuntimeException, std::excep
void SAL_CALL
SwVbaAddin::setName( const OUString& ) throw ( css::uno::RuntimeException, std::exception )
{
- throw uno::RuntimeException(" Fail to set name", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException(" Fail to set name" );
}
OUString SAL_CALL SwVbaAddin::getPath() throw (uno::RuntimeException, std::exception)
diff --git a/sw/source/ui/vba/vbaautotextentry.cxx b/sw/source/ui/vba/vbaautotextentry.cxx
index 44c0ca61681d..5d57e3008a6c 100644
--- a/sw/source/ui/vba/vbaautotextentry.cxx
+++ b/sw/source/ui/vba/vbaautotextentry.cxx
@@ -106,7 +106,7 @@ SwVbaAutoTextEntries::getElementType() throw (uno::RuntimeException)
uno::Reference< container::XEnumeration >
SwVbaAutoTextEntries::createEnumeration() throw (uno::RuntimeException)
{
- throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Not implemented" );
}
uno::Any
diff --git a/sw/source/ui/vba/vbabookmark.cxx b/sw/source/ui/vba/vbabookmark.cxx
index 1a44ac378a27..1cf332c123a2 100644
--- a/sw/source/ui/vba/vbabookmark.cxx
+++ b/sw/source/ui/vba/vbabookmark.cxx
@@ -46,7 +46,7 @@ SwVbaBookmark::~SwVbaBookmark()
void SwVbaBookmark::checkVality() throw ( uno::RuntimeException )
{
if( !mbValid )
- throw uno::RuntimeException("The bookmark is not valid", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("The bookmark is not valid" );
}
void SAL_CALL SwVbaBookmark::Delete() throw ( uno::RuntimeException, std::exception )
diff --git a/sw/source/ui/vba/vbaborders.cxx b/sw/source/ui/vba/vbaborders.cxx
index d52141baeb83..907d578097e4 100644
--- a/sw/source/ui/vba/vbaborders.cxx
+++ b/sw/source/ui/vba/vbaborders.cxx
@@ -220,12 +220,12 @@ public:
break;
}
default:
- throw uno::RuntimeException("Bad param", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Bad param" );
}
setBorderLine( aBorderLine );
}
else
- throw uno::RuntimeException("Method failed", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Method failed" );
}
};
diff --git a/sw/source/ui/vba/vbacheckbox.cxx b/sw/source/ui/vba/vbacheckbox.cxx
index 235dd1029e1b..f15f3be9a254 100644
--- a/sw/source/ui/vba/vbacheckbox.cxx
+++ b/sw/source/ui/vba/vbacheckbox.cxx
@@ -33,8 +33,7 @@ SwVbaCheckBox::SwVbaCheckBox( const uno::Reference< ooo::vba::XHelperInterface >
OUString sType = mxFormField->getFieldType();
if( !sType.equalsIgnoreAsciiCaseAscii( ECMA_FORMCHECKBOX ) )
{
- throw uno::RuntimeException( OUString(
- "It is not a CheckBox"), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "It is not a CheckBox" );
}
}
diff --git a/sw/source/ui/vba/vbacolumns.cxx b/sw/source/ui/vba/vbacolumns.cxx
index c81b3fc6a493..ac78b08e5531 100644
--- a/sw/source/ui/vba/vbacolumns.cxx
+++ b/sw/source/ui/vba/vbacolumns.cxx
@@ -104,11 +104,11 @@ uno::Any SAL_CALL SwVbaColumns::Item( const uno::Any& Index1, const uno::Any& /*
{
if( nIndex <= 0 || nIndex > getCount() )
{
- throw lang::IndexOutOfBoundsException("Index out of bounds", uno::Reference< uno::XInterface >() );
+ throw lang::IndexOutOfBoundsException("Index out of bounds" );
}
return uno::makeAny( uno::Reference< word::XColumn >( new SwVbaColumn( this, mxContext, mxTextTable, nIndex - 1 ) ) );
}
- throw uno::RuntimeException("Index out of bounds", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Index out of bounds" );
}
// XEnumerationAccess
diff --git a/sw/source/ui/vba/vbadocumentproperties.cxx b/sw/source/ui/vba/vbadocumentproperties.cxx
index 4c931e5e24c7..eec6963b1d8f 100644
--- a/sw/source/ui/vba/vbadocumentproperties.cxx
+++ b/sw/source/ui/vba/vbadocumentproperties.cxx
@@ -742,8 +742,7 @@ SwVbaBuiltinDocumentProperties::SwVbaBuiltinDocumentProperties( const uno::Refer
uno::Reference< XDocumentProperty > SAL_CALL
SwVbaBuiltinDocumentProperties::Add( const OUString& /*Name*/, sal_Bool /*LinkToContent*/, ::sal_Int8 /*Type*/, const uno::Any& /*value*/, const uno::Any& /*LinkSource*/ ) throw (script::BasicErrorException, uno::RuntimeException, std::exception)
{
- throw uno::RuntimeException(
- OUString("not supported for Builtin properties"), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "not supported for Builtin properties" );
}
// XEnumerationAccess
diff --git a/sw/source/ui/vba/vbafield.cxx b/sw/source/ui/vba/vbafield.cxx
index c4c4288f345d..83b3ad164187 100644
--- a/sw/source/ui/vba/vbafield.cxx
+++ b/sw/source/ui/vba/vbafield.cxx
@@ -336,7 +336,7 @@ SwVbaFields::Add( const css::uno::Reference< ::ooo::vba::word::XRange >& Range,
}
else
{
- throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Not implemented" );
}
SwVbaRange* pVbaRange = dynamic_cast< SwVbaRange* >( Range.get() );
@@ -462,7 +462,7 @@ uno::Reference< text::XTextField > SwVbaFields::Create_Field_DocProperty( const
}
else if( sFieldService.isEmpty() )
{
- throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Not implemented" );
}
uno::Reference< text::XTextField > xTextField( mxMSF->createInstance( sFieldService ), uno::UNO_QUERY_THROW );
diff --git a/sw/source/ui/vba/vbafind.cxx b/sw/source/ui/vba/vbafind.cxx
index aa3e5df97c99..a8460386a50b 100644
--- a/sw/source/ui/vba/vbafind.cxx
+++ b/sw/source/ui/vba/vbafind.cxx
@@ -192,7 +192,7 @@ uno::Any SAL_CALL SwVbaFind::getReplacement() throw (uno::RuntimeException, std:
void SAL_CALL SwVbaFind::setReplacement( const uno::Any& /*_replacement */ ) throw (uno::RuntimeException, std::exception)
{
- throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Not implemented" );
}
sal_Bool SAL_CALL SwVbaFind::getForward() throw (uno::RuntimeException, std::exception)
@@ -297,12 +297,12 @@ void SAL_CALL SwVbaFind::setMatchAllWordForms( sal_Bool _matchallwordforms ) thr
uno::Any SAL_CALL SwVbaFind::getStyle() throw (uno::RuntimeException, std::exception)
{
- throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Not implemented" );
}
void SAL_CALL SwVbaFind::setStyle( const uno::Any& /*_style */ ) throw (uno::RuntimeException, std::exception)
{
- throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Not implemented" );
}
sal_Bool SAL_CALL
diff --git a/sw/source/ui/vba/vbalistformat.cxx b/sw/source/ui/vba/vbalistformat.cxx
index e749b78f29e3..9740758e3a92 100644
--- a/sw/source/ui/vba/vbalistformat.cxx
+++ b/sw/source/ui/vba/vbalistformat.cxx
@@ -86,7 +86,7 @@ void SAL_CALL SwVbaListFormat::ApplyListTemplate( const css::uno::Reference< wor
void SAL_CALL SwVbaListFormat::ConvertNumbersToText( ) throw (css::uno::RuntimeException, std::exception)
{
- throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Not implemented" );
}
OUString
diff --git a/sw/source/ui/vba/vbalistgalleries.cxx b/sw/source/ui/vba/vbalistgalleries.cxx
index d33f6a3a0c76..ee66621a8a82 100644
--- a/sw/source/ui/vba/vbalistgalleries.cxx
+++ b/sw/source/ui/vba/vbalistgalleries.cxx
@@ -62,7 +62,7 @@ uno::Any SAL_CALL SwVbaListGalleries::Item( const uno::Any& Index1, const uno::A
|| nIndex == word::WdListGalleryType::wdOutlineNumberGallery )
return uno::makeAny( uno::Reference< word::XListGallery >( new SwVbaListGallery( this, mxContext, mxTextDocument, nIndex ) ) );
}
- throw uno::RuntimeException("Index out of bounds", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Index out of bounds" );
}
// XEnumerationAccess
diff --git a/sw/source/ui/vba/vbalistlevel.cxx b/sw/source/ui/vba/vbalistlevel.cxx
index 21148ea5e9b2..1fe4f8fae34e 100644
--- a/sw/source/ui/vba/vbalistlevel.cxx
+++ b/sw/source/ui/vba/vbalistlevel.cxx
@@ -95,12 +95,12 @@ void SAL_CALL SwVbaListLevel::setAlignment( ::sal_Int32 _alignment ) throw (uno:
uno::Reference< ::ooo::vba::word::XFont > SAL_CALL SwVbaListLevel::getFont() throw (uno::RuntimeException, std::exception)
{
- throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Not implemented" );
}
void SAL_CALL SwVbaListLevel::setFont( const uno::Reference< ::ooo::vba::word::XFont >& /*_font*/ ) throw (uno::RuntimeException, std::exception)
{
- throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Not implemented" );
}
::sal_Int32 SAL_CALL SwVbaListLevel::getIndex() throw (uno::RuntimeException, std::exception)
@@ -212,7 +212,7 @@ void SAL_CALL SwVbaListLevel::setNumberPosition( float _numberposition ) throw (
}
default:
{
- throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Not implemented" );
}
}
return nNumberingType;
@@ -285,7 +285,7 @@ void SAL_CALL SwVbaListLevel::setNumberStyle( ::sal_Int32 _numberstyle ) throw (
}
default:
{
- throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Not implemented" );
}
}
diff --git a/sw/source/ui/vba/vbalistlevels.cxx b/sw/source/ui/vba/vbalistlevels.cxx
index 5d75bb35ee0f..df174ae5784f 100644
--- a/sw/source/ui/vba/vbalistlevels.cxx
+++ b/sw/source/ui/vba/vbalistlevels.cxx
@@ -63,7 +63,7 @@ uno::Any SAL_CALL SwVbaListLevels::Item( const uno::Any& Index1, const uno::Any&
if( !( Index1 >>= nIndex ) )
throw uno::RuntimeException();
if( nIndex <=0 || nIndex > getCount() )
- throw uno::RuntimeException("Index out of bounds", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Index out of bounds" );
return uno::makeAny( uno::Reference< word::XListLevel >( new SwVbaListLevel( this, mxContext, pListHelper, nIndex - 1 ) ) );
}
diff --git a/sw/source/ui/vba/vbalisttemplates.cxx b/sw/source/ui/vba/vbalisttemplates.cxx
index 27a9e4623981..3fa127a36acd 100644
--- a/sw/source/ui/vba/vbalisttemplates.cxx
+++ b/sw/source/ui/vba/vbalisttemplates.cxx
@@ -57,7 +57,7 @@ uno::Any SAL_CALL SwVbaListTemplates::Item( const uno::Any& Index1, const uno::A
if( !( Index1 >>= nIndex ) )
throw uno::RuntimeException();
if( nIndex <=0 || nIndex > getCount() )
- throw uno::RuntimeException("Index out of bounds", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Index out of bounds" );
return uno::makeAny( uno::Reference< word::XListTemplate >( new SwVbaListTemplate( this, mxContext, mxTextDocument, mnGalleryType, nIndex ) ) );
}
diff --git a/sw/source/ui/vba/vbaparagraphformat.cxx b/sw/source/ui/vba/vbaparagraphformat.cxx
index 60ac894f6399..dc19f1e25b27 100644
--- a/sw/source/ui/vba/vbaparagraphformat.cxx
+++ b/sw/source/ui/vba/vbaparagraphformat.cxx
@@ -296,7 +296,7 @@ uno::Any SAL_CALL SwVbaParagraphFormat::getTabStops() throw (uno::RuntimeExcepti
void SAL_CALL SwVbaParagraphFormat::setTabStops( const uno::Any& /*_tabstops*/ ) throw (uno::RuntimeException, std::exception)
{
- throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Not implemented" );
}
uno::Any SAL_CALL SwVbaParagraphFormat::getWidowControl() throw (uno::RuntimeException, std::exception)
diff --git a/sw/source/ui/vba/vbarange.cxx b/sw/source/ui/vba/vbarange.cxx
index 3bd95e21ad08..73cd909f2073 100644
--- a/sw/source/ui/vba/vbarange.cxx
+++ b/sw/source/ui/vba/vbarange.cxx
@@ -72,7 +72,7 @@ void SwVbaRange::initialize( const uno::Reference< text::XTextRange >& rStart, c
mxTextCursor = SwVbaRangeHelper::initCursor( rStart, mxText );
if( !mxTextCursor.is() )
- throw uno::RuntimeException("Fails to create text cursor", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Fails to create text cursor" );
mxTextCursor->collapseToStart();
if( rEnd.is() )
@@ -252,7 +252,7 @@ SwVbaRange::getParagraphFormat() throw ( uno::RuntimeException, std::exception )
void SAL_CALL
SwVbaRange::setParagraphFormat( const uno::Reference< word::XParagraphFormat >& /*rParagraphFormat*/ ) throw ( uno::RuntimeException, std::exception )
{
- throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Not implemented" );
}
void SwVbaRange::GetStyleInfo(OUString& aStyleName, OUString& aStyleType ) throw ( uno::RuntimeException )
diff --git a/sw/source/ui/vba/vbarows.cxx b/sw/source/ui/vba/vbarows.cxx
index b21b64b90c08..5f7cb92cd7a6 100644
--- a/sw/source/ui/vba/vbarows.cxx
+++ b/sw/source/ui/vba/vbarows.cxx
@@ -260,9 +260,8 @@ void SwVbaRows::setIndentWithAdjustNone( sal_Int32 indent ) throw (uno::RuntimeE
if ((nNewWidth <= 0) || (nWidth <= 0))
{
throw uno::RuntimeException(
- OUString("Pb with width, in SwVbaRows::setIndentWithAdjustProportional "
- "(nNewWidth <= 0) || (nWidth <= 0)"),
- uno::Reference< uno::XInterface >()
+ "Pb with width, in SwVbaRows::setIndentWithAdjustProportional "
+ "(nNewWidth <= 0) || (nWidth <= 0)"
);
}
double propFactor = (double)nNewWidth/(double)nWidth;
@@ -323,11 +322,11 @@ uno::Any SAL_CALL SwVbaRows::Item( const uno::Any& Index1, const uno::Any& /*not
{
if( nIndex <= 0 || nIndex > getCount() )
{
- throw lang::IndexOutOfBoundsException("Index out of bounds", uno::Reference< uno::XInterface >() );
+ throw lang::IndexOutOfBoundsException("Index out of bounds" );
}
return uno::makeAny( uno::Reference< word::XRow >( new SwVbaRow( this, mxContext, mxTextTable, nIndex - 1 ) ) );
}
- throw uno::RuntimeException("Index out of bounds", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Index out of bounds" );
}
// XEnumerationAccess
diff --git a/sw/source/ui/vba/vbasections.cxx b/sw/source/ui/vba/vbasections.cxx
index 992a94ab2391..d929357d60a9 100644
--- a/sw/source/ui/vba/vbasections.cxx
+++ b/sw/source/ui/vba/vbasections.cxx
@@ -148,7 +148,7 @@ SwVbaSections::PageSetup( ) throw (uno::RuntimeException, std::exception)
uno::Reference< word::XSection > xSection( m_xIndexAccess->getByIndex( 0 ), uno::UNO_QUERY_THROW );
return xSection->PageSetup();
}
- throw uno::RuntimeException("There is no section", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("There is no section" );
}
// XEnumerationAccess
diff --git a/sw/source/ui/vba/vbaselection.cxx b/sw/source/ui/vba/vbaselection.cxx
index ef5ad0622cbd..ccbb4def25fb 100644
--- a/sw/source/ui/vba/vbaselection.cxx
+++ b/sw/source/ui/vba/vbaselection.cxx
@@ -92,7 +92,7 @@ uno::Reference< text::XTextRange > SwVbaSelection::GetSelectedRange() throw ( un
}
else
{
- throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Not implemented" );
}
return xTextRange;
}
@@ -154,7 +154,7 @@ SwVbaSelection::HomeKey( const uno::Any& _unit, const uno::Any& _extend ) throw
}
default:
{
- throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Not implemented" );
}
}
}
@@ -189,7 +189,7 @@ SwVbaSelection::EndKey( const uno::Any& _unit, const uno::Any& _extend ) throw (
}
default:
{
- throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Not implemented" );
}
}
}
@@ -215,7 +215,7 @@ SwVbaSelection::Delete( const uno::Any& _unit, const uno::Any& _count ) throw (
}
default:
{
- throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Not implemented" );
}
}
}
@@ -258,7 +258,7 @@ SwVbaSelection::Move( const uno::Any& _unit, const uno::Any& _count, const uno::
{
if( eDirection == word::MOVE_LEFT || eDirection == word::MOVE_RIGHT )
{
- throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Not implemented" );
}
uno::Reference< view::XViewCursor > xViewCursor( mxTextViewCursor, uno::UNO_QUERY_THROW );
if( eDirection == word::MOVE_UP )
@@ -271,7 +271,7 @@ SwVbaSelection::Move( const uno::Any& _unit, const uno::Any& _count, const uno::
{
if( eDirection == word::MOVE_UP || eDirection == word::MOVE_DOWN )
{
- throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Not implemented" );
}
if( word::gotoSelectedObjectAnchor( mxModel ) )
{
@@ -311,7 +311,7 @@ SwVbaSelection::Move( const uno::Any& _unit, const uno::Any& _count, const uno::
{
if( eDirection == word::MOVE_LEFT || eDirection == word::MOVE_RIGHT )
{
- throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Not implemented" );
}
uno::Reference< text::XParagraphCursor > xParagraphCursor( xTextCursor, uno::UNO_QUERY_THROW );
for( sal_Int32 i=0; i<nCount; i++ )
@@ -326,7 +326,7 @@ SwVbaSelection::Move( const uno::Any& _unit, const uno::Any& _count, const uno::
{
if( eDirection == word::MOVE_UP || eDirection == word::MOVE_DOWN )
{
- throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Not implemented" );
}
uno::Reference< text::XWordCursor > xWordCursor( xTextCursor, uno::UNO_QUERY_THROW );
for( sal_Int32 i=0; i<nCount; i++ )
@@ -343,7 +343,7 @@ SwVbaSelection::Move( const uno::Any& _unit, const uno::Any& _count, const uno::
}
default:
{
- throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Not implemented" );
}
}
}
@@ -649,11 +649,11 @@ uno::Reference< word::XRange > SAL_CALL SwVbaSelection::GoTo( const uno::Any& _w
if( nPage != 0 )
xPageCursor->jumpToPage( ( sal_Int16 )( nPage ) );
else
- throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Not implemented" );
break;
}
default:
- throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Not implemented" );
}
return getRange();
}
@@ -765,7 +765,7 @@ uno::Any SAL_CALL SwVbaSelection::Information( sal_Int32 _type ) throw (uno::Run
break;
}
default:
- throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Not implemented" );
}
return result;
}
diff --git a/sw/source/ui/vba/vbastyles.cxx b/sw/source/ui/vba/vbastyles.cxx
index f8ca1d4e0357..530677f4a5ad 100644
--- a/sw/source/ui/vba/vbastyles.cxx
+++ b/sw/source/ui/vba/vbastyles.cxx
@@ -243,7 +243,7 @@ public:
// XEnumerationAccess
virtual uno::Reference< container::XEnumeration > SAL_CALL createEnumeration( ) throw (uno::RuntimeException, std::exception) SAL_OVERRIDE
{
- throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Not implemented" );
}
};
@@ -343,7 +343,7 @@ SwVbaStyles::Item( const uno::Any& Index1, const uno::Any& Index2 )
else
{
OSL_TRACE("SwVbaStyles::Item: the builtin style type is not implemented");
- throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Not implemented" );
}
}
}
diff --git a/sw/source/ui/vba/vbasystem.cxx b/sw/source/ui/vba/vbasystem.cxx
index 4f54c540ed4c..dc95d82f2d2e 100644
--- a/sw/source/ui/vba/vbasystem.cxx
+++ b/sw/source/ui/vba/vbasystem.cxx
@@ -118,7 +118,7 @@ uno::Any PrivateProfileStringListener::getValueEvent()
return uno::makeAny( sValue );
#else
- throw uno::RuntimeException("Only support on Windows", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Only support on Windows" );
#endif
}
@@ -161,7 +161,7 @@ void PrivateProfileStringListener::setValueEvent( const css::uno::Any& value )
}
return;
#else
- throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Not implemented" );
#endif
}
@@ -229,7 +229,7 @@ SwVbaSystem::setCursor( sal_Int32 _cursor ) throw (uno::RuntimeException, std::e
break;
}
default:
- throw uno::RuntimeException("Unknown value for Cursor pointer", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Unknown value for Cursor pointer" );
// TODO: isn't this a flaw in the API? It should be allowed to throw an
// IllegalArgumentException, or so
}
diff --git a/sw/source/ui/vba/vbatemplate.cxx b/sw/source/ui/vba/vbatemplate.cxx
index 02880f48c95f..77fcfa15e3d2 100644
--- a/sw/source/ui/vba/vbatemplate.cxx
+++ b/sw/source/ui/vba/vbatemplate.cxx
@@ -103,7 +103,7 @@ SwVbaTemplate::AutoTextEntries( const uno::Any& index ) throw (uno::RuntimeExcep
}
else
{
- throw uno::RuntimeException("Auto Text Entry doesn't exist", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Auto Text Entry doesn't exist" );
}
uno::Reference< XCollection > xCol( new SwVbaAutoTextEntries( this, mxContext, xGroup ) );
diff --git a/sw/source/ui/vba/vbavariable.cxx b/sw/source/ui/vba/vbavariable.cxx
index 1c76b306ff9f..9047bf0e2380 100644
--- a/sw/source/ui/vba/vbavariable.cxx
+++ b/sw/source/ui/vba/vbavariable.cxx
@@ -44,7 +44,7 @@ SwVbaVariable::getName() throw ( css::uno::RuntimeException, std::exception )
void SAL_CALL
SwVbaVariable::setName( const OUString& ) throw ( css::uno::RuntimeException, std::exception )
{
- throw uno::RuntimeException(" Fail to set name", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException(" Fail to set name" );
}
uno::Any SAL_CALL
diff --git a/sw/source/ui/vba/vbawindow.cxx b/sw/source/ui/vba/vbawindow.cxx
index 193a2c16cc1e..232a00f270ec 100644
--- a/sw/source/ui/vba/vbawindow.cxx
+++ b/sw/source/ui/vba/vbawindow.cxx
@@ -108,7 +108,7 @@ SwVbaWindow::setWindowState( const uno::Any& _windowstate ) throw (uno::RuntimeE
else if (nwindowState == word::WdWindowState::wdWindowStateNormal)
pWork -> Restore();
else
- throw uno::RuntimeException("Invalid Parameter", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Invalid Parameter" );
}
}
diff --git a/sw/source/ui/vba/wordvbahelper.cxx b/sw/source/ui/vba/wordvbahelper.cxx
index 7bf49e6e2836..4c84a57a9d47 100644
--- a/sw/source/ui/vba/wordvbahelper.cxx
+++ b/sw/source/ui/vba/wordvbahelper.cxx
@@ -156,7 +156,7 @@ uno::Reference< text::XText > getCurrentXText( const uno::Reference< frame::XMod
}
if( !xText.is() )
- throw uno::RuntimeException("no text selection", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("no text selection" );
return xText;
}
diff --git a/testtools/source/bridgetest/bridgetest.cxx b/testtools/source/bridgetest/bridgetest.cxx
index c0be052df2e0..25f4aac65442 100644
--- a/testtools/source/bridgetest/bridgetest.cxx
+++ b/testtools/source/bridgetest/bridgetest.cxx
@@ -1112,9 +1112,7 @@ inline bool makeSurrogate(
Mapping uno2cpp( aUnoEnv_ano.get(), aCppEnv_ano.get() );
if (!cpp2uno.is() || !uno2cpp.is())
{
- throw RuntimeException(
- "cannot get C++-UNO mappings!",
- Reference< XInterface >() );
+ throw RuntimeException("cannot get C++-UNO mappings!" );
}
cpp2uno.mapInterface(
reinterpret_cast< void ** >( &unoI.m_pUnoI ),
@@ -1122,8 +1120,7 @@ inline bool makeSurrogate(
if (! unoI.is())
{
throw RuntimeException(
- "mapping C++ to binary UNO failed!",
- Reference< XInterface >() );
+ "mapping C++ to binary UNO failed!" );
}
uno2cpp.mapInterface(
reinterpret_cast< void ** >( &rOut ),
@@ -1131,8 +1128,7 @@ inline bool makeSurrogate(
if (! rOut.is())
{
throw RuntimeException(
- "mapping binary UNO to C++ failed!",
- Reference< XInterface >() );
+ "mapping binary UNO to C++ failed!" );
}
return rOut.is();
@@ -1147,10 +1143,8 @@ sal_Int32 TestBridgeImpl::run( const Sequence< OUString > & rArgs )
{
if (! rArgs.getLength())
{
- throw RuntimeException( OUString(
- "no test object specified!\n"
- "usage : ServiceName of test object | -u unourl of test object\n" ),
- Reference< XInterface >() );
+ throw RuntimeException( "no test object specified!\n"
+ "usage : ServiceName of test object | -u unourl of test object" );
}
Reference< XInterface > xOriginal;
@@ -1195,17 +1189,12 @@ sal_Int32 TestBridgeImpl::run( const Sequence< OUString > & rArgs )
if (! xOriginal.is())
{
- throw RuntimeException(
- OUString(
- "cannot get test object!"),
- Reference< XInterface >() );
+ throw RuntimeException( "cannot get test object!" );
}
Reference< XBridgeTest > xTest( xOriginal, UNO_QUERY );
if (! xTest.is())
{
- throw RuntimeException(
- OUString("test object does not implement XBridgeTest!"),
- Reference< XInterface >() );
+ throw RuntimeException( "test object does not implement XBridgeTest!" );
}
Reference<XBridgeTest > xLBT;
@@ -1218,9 +1207,7 @@ sal_Int32 TestBridgeImpl::run( const Sequence< OUString > & rArgs )
"oneway exception test" ) && bRet;
if (! bRet)
{
- throw RuntimeException(
- OUString("error: test failed!"),
- Reference< XInterface >() );
+ throw RuntimeException( "error: test failed!" );
}
}
catch (const Exception & exc)
diff --git a/testtools/source/performance/ubtest.cxx b/testtools/source/performance/ubtest.cxx
index a1a641b89e6b..688a84102210 100644
--- a/testtools/source/performance/ubtest.cxx
+++ b/testtools/source/performance/ubtest.cxx
@@ -375,7 +375,7 @@ static void createInstance( Reference< T > & rxOut,
buf.append( "cannot get service instance \"" );
buf.append( rServiceName );
buf.append( "\"!" );
- throw RuntimeException( buf.makeStringAndClear(), Reference< XInterface >() );
+ throw RuntimeException( buf.makeStringAndClear() );
}
rxOut = Reference< T >::query( x );
@@ -388,7 +388,7 @@ static void createInstance( Reference< T > & rxOut,
const Type & rType = ::getCppuType( (const Reference< T > *)0 );
buf.append( rType.getTypeName() );
buf.append( "\"!" );
- throw RuntimeException( buf.makeStringAndClear(), Reference< XInterface >() );
+ throw RuntimeException( buf.makeStringAndClear() );
}
}
@@ -473,7 +473,7 @@ Reference< XInterface > TestImpl::getDirect()
OUString("com.sun.star.comp.performance.PerformanceTestObject"),
_xSMgr, Reference< XRegistryKey >() ) );
if (! xFac.is())
- throw RuntimeException("no test object available!", Reference< XInterface >() );
+ throw RuntimeException("no test object available!" );
_xDirect = xFac->createInstance();
}
}
@@ -496,7 +496,7 @@ Reference< XInterface > TestImpl::resolveObject( const OUString & rUnoUrl )
buf.append( "cannot resolve object \"" );
buf.append( rUnoUrl );
buf.append( "\"!" );
- throw RuntimeException( buf.makeStringAndClear(), Reference< XInterface >() );
+ throw RuntimeException( buf.makeStringAndClear() );
}
return xResolvedObject;
@@ -560,7 +560,7 @@ static void benchmark(
{
Reference< XPerformanceTest > xBench( xInstance, UNO_QUERY );
if (! xBench.is())
- throw RuntimeException("illegal test object!", Reference< XInterface >() );
+ throw RuntimeException("illegal test object!" );
sal_Int64 i;
sal_uInt32 tStart, tEnd;
@@ -997,7 +997,7 @@ sal_Int32 TestImpl::run( const Sequence< OUString > & rArgs )
buf.append( "cannot open file for writing: \"" );
buf.append( aLogStr );
buf.append( "\"!" );
- throw RuntimeException( buf.makeStringAndClear(), Reference< XInterface >() );
+ throw RuntimeException( buf.makeStringAndClear() );
}
}
}
@@ -1054,14 +1054,14 @@ sal_Int32 TestImpl::run( const Sequence< OUString > & rArgs )
// pseudo mapping uno<->uno: does nothing!
Mapping aMapping( aCppEnv.get(), aAnoCppEnv.get(), OUString("pseudo") );
if (! aMapping.is())
- throw RuntimeException("no pseudo mapping available!", Reference< XInterface >() );
+ throw RuntimeException("no pseudo mapping available!" );
Reference< XInterface > xMapped;
Reference< XInterface > xDirect( getDirect() );
aMapping.mapInterface( reinterpret_cast< void ** >( &xMapped ), xDirect.get(),
::getCppuType( &xDirect ) );
if (! xMapped.is())
- throw RuntimeException("mapping object failed!", Reference< XInterface >() );
+ throw RuntimeException("mapping object failed!" );
sal_uInt32 nStart = getSystemTicks();
benchmark( aSheets[ "mapped in process" ], xMapped, nLoop / 100 );
@@ -1076,7 +1076,7 @@ sal_Int32 TestImpl::run( const Sequence< OUString > & rArgs )
// start server process
oslSecurity hSecurity = osl_getCurrentSecurity();
if (! hSecurity)
- throw RuntimeException("cannot get current security handle!", Reference< XInterface >() );
+ throw RuntimeException("cannot get current security handle!" );
OUString aArgs[] = {
OUString("-c"),
@@ -1123,7 +1123,7 @@ sal_Int32 TestImpl::run( const Sequence< OUString > & rArgs )
osl_freeSecurityHandle( hSecurity );
if (! hProcess)
- throw RuntimeException("cannot start server process!", Reference< XInterface >() );
+ throw RuntimeException("cannot start server process!" );
osl_freeProcessHandle( hProcess );
// wait three seconds
@@ -1144,7 +1144,7 @@ sal_Int32 TestImpl::run( const Sequence< OUString > & rArgs )
// remote
OUString aUnoUrl( extractParam( rArgs, OUString("url") ) );
if (! aUnoUrl.getLength())
- throw RuntimeException( OUString( "performance test r(emote) needs additional uno url!" ), Reference< XInterface >() );
+ throw RuntimeException( "performance test r(emote) needs additional uno url!" );
// connect and resolve outer process object
Reference< XInterface > xResolvedObject( resolveObject( aUnoUrl ) );
diff --git a/ucb/source/ucp/file/bc.cxx b/ucb/source/ucp/file/bc.cxx
index baa5cf920583..6faafb969f0d 100644
--- a/ucb/source/ucp/file/bc.cxx
+++ b/ucb/source/ucp/file/bc.cxx
@@ -598,7 +598,7 @@ BaseContent::removeProperty(
{
if( m_nState & Deleted )
- throw beans::UnknownPropertyException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw beans::UnknownPropertyException( THROW_WHERE );
m_pMyShell->deassociate( m_aUncPath, Name );
}
@@ -744,7 +744,7 @@ BaseContent::setParent(
throw( lang::NoSupportException,
RuntimeException, std::exception)
{
- throw lang::NoSupportException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::NoSupportException( THROW_WHERE );
}
@@ -925,7 +925,7 @@ BaseContent::setPropertyValues(
OUString NewTitle;
if( !( Values[i].Value >>= NewTitle ) )
{
- ret[i] <<= beans::IllegalTypeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ ret[i] <<= beans::IllegalTypeException( THROW_WHERE );
break;
}
else if( NewTitle.isEmpty() )
diff --git a/ucb/source/ucp/file/filcmd.cxx b/ucb/source/ucp/file/filcmd.cxx
index 0c7756b7f268..95be18aa33dd 100644
--- a/ucb/source/ucp/file/filcmd.cxx
+++ b/ucb/source/ucp/file/filcmd.cxx
@@ -91,7 +91,7 @@ XCommandInfo_impl::getCommandInfoByName(
if( m_pMyShell->m_sCommandInfo[i].Name == aName )
return m_pMyShell->m_sCommandInfo[i];
- throw UnsupportedCommandException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw UnsupportedCommandException( THROW_WHERE );
}
@@ -105,7 +105,7 @@ XCommandInfo_impl::getCommandInfoByHandle(
if( m_pMyShell->m_sCommandInfo[i].Handle == Handle )
return m_pMyShell->m_sCommandInfo[i];
- throw UnsupportedCommandException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw UnsupportedCommandException( THROW_WHERE );
}
diff --git a/ucb/source/ucp/file/filglob.cxx b/ucb/source/ucp/file/filglob.cxx
index c0bd6f915feb..ea12bf72d97f 100644
--- a/ucb/source/ucp/file/filglob.cxx
+++ b/ucb/source/ucp/file/filglob.cxx
@@ -252,7 +252,7 @@ namespace fileaccess {
if( errorCode == TASKHANDLER_UNSUPPORTED_COMMAND )
{
- aAny <<= UnsupportedCommandException( OUString( OSL_LOG_PREFIX ), uno::Reference< uno::XInterface >() );
+ aAny <<= UnsupportedCommandException( OSL_LOG_PREFIX );
cancelCommandExecution( aAny,xEnv );
}
else if( errorCode == TASKHANDLING_WRONG_SETPROPERTYVALUES_ARGUMENT ||
diff --git a/ucb/source/ucp/file/filinpstr.cxx b/ucb/source/ucp/file/filinpstr.cxx
index 7f71b3719c00..bb5bf134cdc1 100644
--- a/ucb/source/ucp/file/filinpstr.cxx
+++ b/ucb/source/ucp/file/filinpstr.cxx
@@ -139,7 +139,7 @@ XInputStream_impl::readBytes(
io::IOException,
uno::RuntimeException, std::exception)
{
- if( ! m_nIsOpen ) throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ if( ! m_nIsOpen ) throw io::IOException( THROW_WHERE );
aData.realloc(nBytesToRead);
//TODO! translate memory exhaustion (if it were detectable...) into
@@ -148,7 +148,7 @@ XInputStream_impl::readBytes(
sal_uInt64 nrc(0);
if(m_aFile.read( aData.getArray(),sal_uInt64(nBytesToRead),nrc )
!= osl::FileBase::E_None)
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException( THROW_WHERE );
// Shrink aData in case we read less than nBytesToRead (XInputStream
// documentation does not tell whether this is required, and I do not know
@@ -205,7 +205,7 @@ XInputStream_impl::closeInput(
{
osl::FileBase::RC err = m_aFile.close();
if( err != osl::FileBase::E_None )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException( THROW_WHERE );
m_nIsOpen = false;
}
}
@@ -221,7 +221,7 @@ XInputStream_impl::seek(
if( location < 0 )
throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 0 );
if( osl::FileBase::E_None != m_aFile.setPos( osl_Pos_Absolut, sal_uInt64( location ) ) )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException( THROW_WHERE );
}
@@ -233,7 +233,7 @@ XInputStream_impl::getPosition(
{
sal_uInt64 uPos;
if( osl::FileBase::E_None != m_aFile.getPos( uPos ) )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException( THROW_WHERE );
return sal_Int64( uPos );
}
@@ -245,7 +245,7 @@ XInputStream_impl::getLength(
{
sal_uInt64 uEndPos;
if ( m_aFile.getSize(uEndPos) != osl::FileBase::E_None )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException( THROW_WHERE );
else
return sal_Int64( uEndPos );
}
diff --git a/ucb/source/ucp/file/filprp.cxx b/ucb/source/ucp/file/filprp.cxx
index 605768fdc429..9bf21571f587 100644
--- a/ucb/source/ucp/file/filprp.cxx
+++ b/ucb/source/ucp/file/filprp.cxx
@@ -84,7 +84,7 @@ XPropertySetInfo_impl::getPropertyByName(
for( sal_Int32 i = 0; i < m_seq.getLength(); ++i )
if( m_seq[i].Name == aName ) return m_seq[i];
- throw beans::UnknownPropertyException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw beans::UnknownPropertyException( THROW_WHERE );
}
diff --git a/ucb/source/ucp/file/filrset.cxx b/ucb/source/ucp/file/filrset.cxx
index c2bb51cabdce..a7a60606a01e 100644
--- a/ucb/source/ucp/file/filrset.cxx
+++ b/ucb/source/ucp/file/filrset.cxx
@@ -603,7 +603,7 @@ XResultSet_impl::getStaticResultSet()
osl::MutexGuard aGuard( m_aMutex );
if ( m_xListener.is() )
- throw ucb::ListenerAlreadySetException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw ucb::ListenerAlreadySetException( THROW_WHERE );
return uno::Reference< sdbc::XResultSet >( this );
}
@@ -619,7 +619,7 @@ XResultSet_impl::setListener(
osl::ClearableMutexGuard aGuard( m_aMutex );
if ( m_xListener.is() )
- throw ucb::ListenerAlreadySetException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw ucb::ListenerAlreadySetException( THROW_WHERE );
m_xListener = Listener;
@@ -659,9 +659,9 @@ XResultSet_impl::connectToCache(
uno::RuntimeException, std::exception )
{
if( m_xListener.is() )
- throw ucb::ListenerAlreadySetException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw ucb::ListenerAlreadySetException( THROW_WHERE );
if( m_bStatic )
- throw ucb::ListenerAlreadySetException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw ucb::ListenerAlreadySetException( THROW_WHERE );
uno::Reference< ucb::XSourceInitialization > xTarget(
xCache, uno::UNO_QUERY );
@@ -685,7 +685,7 @@ XResultSet_impl::connectToCache(
return;
}
}
- throw ucb::ServiceNotFoundException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw ucb::ServiceNotFoundException( THROW_WHERE );
}
@@ -769,7 +769,7 @@ void SAL_CALL XResultSet_impl::setPropertyValue(
if( aPropertyName == "IsRowCountFinal" ||
aPropertyName == "RowCount" )
return;
- throw beans::UnknownPropertyException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw beans::UnknownPropertyException( THROW_WHERE );
}
@@ -793,7 +793,7 @@ uno::Any SAL_CALL XResultSet_impl::getPropertyValue(
return aAny;
}
else
- throw beans::UnknownPropertyException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw beans::UnknownPropertyException( THROW_WHERE );
}
@@ -822,7 +822,7 @@ void SAL_CALL XResultSet_impl::addPropertyChangeListener(
m_pRowCountListeners->addInterface( xListener );
}
else
- throw beans::UnknownPropertyException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw beans::UnknownPropertyException( THROW_WHERE );
}
@@ -847,7 +847,7 @@ void SAL_CALL XResultSet_impl::removePropertyChangeListener(
m_pRowCountListeners->removeInterface( aListener );
}
else
- throw beans::UnknownPropertyException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw beans::UnknownPropertyException( THROW_WHERE );
}
void SAL_CALL XResultSet_impl::addVetoableChangeListener(
diff --git a/ucb/source/ucp/file/filstr.cxx b/ucb/source/ucp/file/filstr.cxx
index fd48c384b54b..7ee9408919d7 100644
--- a/ucb/source/ucp/file/filstr.cxx
+++ b/ucb/source/ucp/file/filstr.cxx
@@ -126,10 +126,10 @@ void SAL_CALL XStream_impl::truncate(void)
throw( io::IOException, uno::RuntimeException, std::exception )
{
if (osl::FileBase::E_None != m_aFile.setSize(0))
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException( THROW_WHERE );
if (osl::FileBase::E_None != m_aFile.setPos(osl_Pos_Absolut,sal_uInt64(0)))
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException( THROW_WHERE );
}
@@ -148,7 +148,7 @@ XStream_impl::readBytes(
uno::RuntimeException, std::exception)
{
if( ! m_nIsOpen )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException( THROW_WHERE );
sal_Int8 * buffer;
try
@@ -158,7 +158,7 @@ XStream_impl::readBytes(
catch (const std::bad_alloc&)
{
if( m_nIsOpen ) m_aFile.close();
- throw io::BufferSizeExceededException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::BufferSizeExceededException( THROW_WHERE );
}
sal_uInt64 nrc(0);
@@ -166,7 +166,7 @@ XStream_impl::readBytes(
!= osl::FileBase::E_None)
{
delete[] buffer;
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException( THROW_WHERE );
}
aData = uno::Sequence< sal_Int8 > ( buffer, (sal_uInt32)nrc );
delete[] buffer;
@@ -224,7 +224,7 @@ XStream_impl::writeBytes( const uno::Sequence< sal_Int8 >& aData )
const sal_Int8* p = aData.getConstArray();
if(osl::FileBase::E_None != m_aFile.write(((void*)(p)),sal_uInt64(length),nWrittenBytes) ||
nWrittenBytes != length )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException( THROW_WHERE );
}
}
@@ -290,7 +290,7 @@ XStream_impl::seek(
if( location < 0 )
throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 0 );
if( osl::FileBase::E_None != m_aFile.setPos( osl_Pos_Absolut, sal_uInt64( location ) ) )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException( THROW_WHERE );
}
@@ -302,7 +302,7 @@ XStream_impl::getPosition(
{
sal_uInt64 uPos;
if( osl::FileBase::E_None != m_aFile.getPos( uPos ) )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException( THROW_WHERE );
return sal_Int64( uPos );
}
@@ -314,7 +314,7 @@ XStream_impl::getLength(
{
sal_uInt64 uEndPos;
if ( m_aFile.getSize(uEndPos) != osl::FileBase::E_None )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException( THROW_WHERE );
else
return sal_Int64( uEndPos );
}
diff --git a/ucb/source/ucp/file/filtask.cxx b/ucb/source/ucp/file/filtask.cxx
index 97a690484b7e..37f96a9baaaa 100644
--- a/ucb/source/ucp/file/filtask.cxx
+++ b/ucb/source/ucp/file/filtask.cxx
@@ -57,9 +57,7 @@ TaskManager::startTask(
TaskMap::iterator it = m_aTaskMap.find( CommandId );
if( it != m_aTaskMap.end() )
{
- throw DuplicateCommandIdentifierException(
- OUString( OSL_LOG_PREFIX ),
- uno::Reference< uno::XInterface >() );
+ throw DuplicateCommandIdentifierException( OSL_LOG_PREFIX );
}
m_aTaskMap[ CommandId ] = TaskHandling( xCommandEnv );
}
diff --git a/ucb/source/ucp/file/prov.cxx b/ucb/source/ucp/file/prov.cxx
index be3fc1155872..95400bdc577a 100644
--- a/ucb/source/ucp/file/prov.cxx
+++ b/ucb/source/ucp/file/prov.cxx
@@ -205,7 +205,7 @@ FileProvider::queryContent(
aUnc );
if( err )
- throw IllegalIdentifierException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw IllegalIdentifierException( THROW_WHERE );
return Reference< XContent >( new BaseContent( m_pMyShell,xIdentifier,aUnc ) );
}
@@ -396,7 +396,7 @@ XPropertySetInfoImpl2::getPropertyByName(
if( m_seq[i].Name == aName )
return m_seq[i];
- throw UnknownPropertyException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw UnknownPropertyException( THROW_WHERE );
}
@@ -478,7 +478,7 @@ FileProvider::setPropertyValue( const OUString& aPropertyName,
aPropertyName.equalsAscii( "HostName" ) )
return;
else
- throw UnknownPropertyException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw UnknownPropertyException( THROW_WHERE );
}
@@ -510,7 +510,7 @@ FileProvider::getPropertyValue(
return aAny;
}
else
- throw UnknownPropertyException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw UnknownPropertyException( THROW_WHERE );
}
diff --git a/ucb/source/ucp/file/shell.cxx b/ucb/source/ucp/file/shell.cxx
index 054b47c5e062..c07e97d49be8 100644
--- a/ucb/source/ucp/file/shell.cxx
+++ b/ucb/source/ucp/file/shell.cxx
@@ -482,7 +482,7 @@ shell::associate( const OUString& aUnqPath,
shell::PropertySet::iterator it1 = m_aDefaultProperties.find( newProperty );
if( it1 != m_aDefaultProperties.end() )
- throw beans::PropertyExistException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw beans::PropertyExistException( THROW_WHERE );
{
osl::MutexGuard aGuard( m_aMutex );
@@ -495,7 +495,7 @@ shell::associate( const OUString& aUnqPath,
PropertySet& properties = *(it->second.properties);
it1 = properties.find( newProperty );
if( it1 != properties.end() )
- throw beans::PropertyExistException(THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw beans::PropertyExistException(THROW_WHERE );
// Property does not exist
properties.insert( newProperty );
@@ -518,7 +518,7 @@ shell::deassociate( const OUString& aUnqPath,
shell::PropertySet::iterator it1 = m_aDefaultProperties.find( oldProperty );
if( it1 != m_aDefaultProperties.end() )
- throw beans::NotRemoveableException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw beans::NotRemoveableException( THROW_WHERE );
osl::MutexGuard aGuard( m_aMutex );
@@ -530,7 +530,7 @@ shell::deassociate( const OUString& aUnqPath,
it1 = properties.find( oldProperty );
if( it1 == properties.end() )
- throw beans::UnknownPropertyException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw beans::UnknownPropertyException( THROW_WHERE );
properties.erase( it1 );
@@ -826,7 +826,7 @@ shell::setv( const OUString& aUnqPath,
it1 = properties.find( toset );
if( it1 == properties.end() )
{
- ret[i] <<= beans::UnknownPropertyException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ ret[i] <<= beans::UnknownPropertyException( THROW_WHERE );
continue;
}
@@ -836,7 +836,7 @@ shell::setv( const OUString& aUnqPath,
if( it1->getAttributes() & beans::PropertyAttribute::READONLY )
{
- ret[i] <<= lang::IllegalAccessException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ ret[i] <<= lang::IllegalAccessException( THROW_WHERE );
continue;
}
@@ -907,7 +907,7 @@ shell::setv( const OUString& aUnqPath,
}
}
else
- ret[i] <<= beans::IllegalTypeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ ret[i] <<= beans::IllegalTypeException( THROW_WHERE );
}
else if(values[i].Name == IsReadOnly ||
values[i].Name == IsHidden)
@@ -1015,7 +1015,7 @@ shell::setv( const OUString& aUnqPath,
}
}
else
- ret[i] <<= beans::IllegalTypeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ ret[i] <<= beans::IllegalTypeException( THROW_WHERE );
}
}
} // end for
diff --git a/ucb/source/ucp/tdoc/tdoc_storage.cxx b/ucb/source/ucp/tdoc/tdoc_storage.cxx
index ff7907eafce1..a0356bf1a6a0 100644
--- a/ucb/source/ucp/tdoc/tdoc_storage.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_storage.cxx
@@ -446,9 +446,7 @@ uno::Reference< embed::XStorage > StorageElementFactory::queryStorage(
{
// document opened, but not readable.
throw embed::InvalidStorageException(
- OUString(
- "Storage is open, but not readable!" ),
- uno::Reference< uno::XInterface >() );
+ "Storage is open, but not readable!" );
}
// storage okay
break;
@@ -459,9 +457,7 @@ uno::Reference< embed::XStorage > StorageElementFactory::queryStorage(
{
// document opened, but not writable.
throw embed::InvalidStorageException(
- OUString(
- "Storage is open, but not writable!" ),
- uno::Reference< uno::XInterface >() );
+ "Storage is open, but not writable!" );
}
// storage okay
break;
@@ -473,9 +469,7 @@ uno::Reference< embed::XStorage > StorageElementFactory::queryStorage(
"Bug! Value of property OpenMode has wrong type!" );
throw uno::RuntimeException(
- OUString(
- "Bug! Value of property OpenMode has wrong type!" ),
- uno::Reference< uno::XInterface >() );
+ "Bug! Value of property OpenMode has wrong type!" );
}
}
catch ( beans::UnknownPropertyException const & e )
diff --git a/unotest/source/cpp/toabsolutefileurl.cxx b/unotest/source/cpp/toabsolutefileurl.cxx
index 1935c4b26459..5cf86b14f319 100644
--- a/unotest/source/cpp/toabsolutefileurl.cxx
+++ b/unotest/source/cpp/toabsolutefileurl.cxx
@@ -34,30 +34,27 @@ OUString toAbsoluteFileUrl(OUString const & relativePathname) {
oslProcessError e1 = osl_getProcessWorkingDir(&cwd.pData);
if (e1 != osl_Process_E_None) {
throw css::uno::RuntimeException(
- (OUString("osl_getProcessWorkingDir failed with ") +
- OUString::number(e1)),
- css::uno::Reference< css::uno::XInterface >());
+ OUString("osl_getProcessWorkingDir failed with ") +
+ OUString::number(e1));
}
OUString url;
osl::FileBase::RC e2 = osl::FileBase::getFileURLFromSystemPath(
relativePathname, url);
if (e2 != osl::FileBase::E_None) {
throw css::uno::RuntimeException(
- (OUString("osl::FileBase::getFileURLFromSystemPath(") +
- relativePathname +
- ") failed with " +
- OUString::number(e2)),
- css::uno::Reference< css::uno::XInterface >());
+ OUString("osl::FileBase::getFileURLFromSystemPath(") +
+ relativePathname +
+ ") failed with " +
+ OUString::number(e2));
}
OUString absUrl;
e2 = osl::FileBase::getAbsoluteFileURL(cwd, url, absUrl);
if (e2 != osl::FileBase::E_None) {
throw css::uno::RuntimeException(
- (OUString("osl::FileBase::getAbsoluteFileURL(") +
- cwd + ", " + url +
- ") failed with " +
- OUString::number(e2)),
- css::uno::Reference< css::uno::XInterface >());
+ OUString("osl::FileBase::getAbsoluteFileURL(") +
+ cwd + ", " + url +
+ ") failed with " +
+ OUString::number(e2));
}
return absUrl;
}
diff --git a/ure/source/uretest/cppmain.cc b/ure/source/uretest/cppmain.cc
index 4babec02f3e2..0ccf4abbd1b5 100644
--- a/ure/source/uretest/cppmain.cc
+++ b/ure/source/uretest/cppmain.cc
@@ -212,9 +212,7 @@ css::uno::Reference< css::uno::XInterface > create(
try {
return static_cast< ::cppu::OWeakObject * >(new Service(context));
} catch (::std::bad_alloc &) {
- throw css::uno::RuntimeException(
- ::rtl::OUString("std::bad_alloc"),
- css::uno::Reference< css::uno::XInterface >());
+ throw css::uno::RuntimeException("std::bad_alloc");
}
}
diff --git a/ure/source/uretest/cppserver.cc b/ure/source/uretest/cppserver.cc
index 450c04d12bb2..13a64fc97ef2 100644
--- a/ure/source/uretest/cppserver.cc
+++ b/ure/source/uretest/cppserver.cc
@@ -66,9 +66,7 @@ css::uno::Reference< css::uno::XInterface > create(
try {
return static_cast< ::cppu::OWeakObject * >(new Service);
} catch (::std::bad_alloc &) {
- throw css::uno::RuntimeException(
- rtl::OUString("std::bad_alloc"),
- css::uno::Reference< css::uno::XInterface >());
+ throw css::uno::RuntimeException("std::bad_alloc");
}
}
diff --git a/ure/source/uretest/cpptest.cc b/ure/source/uretest/cpptest.cc
index 04dba6ffbb95..4e1bd350934b 100644
--- a/ure/source/uretest/cpptest.cc
+++ b/ure/source/uretest/cpptest.cc
@@ -66,9 +66,7 @@ css::uno::Reference< css::uno::XInterface > create(
try {
return static_cast< cppu::OWeakObject * >(new Service);
} catch (std::bad_alloc &) {
- throw css::uno::RuntimeException(
- rtl::OUString("std::bad_alloc"),
- css::uno::Reference< css::uno::XInterface >());
+ throw css::uno::RuntimeException("std::bad_alloc");
}
}
diff --git a/uui/source/iahndl-authentication.cxx b/uui/source/iahndl-authentication.cxx
index 006cdf066924..b39eee4798f0 100644
--- a/uui/source/iahndl-authentication.cxx
+++ b/uui/source/iahndl-authentication.cxx
@@ -125,8 +125,7 @@ executeLoginDialog(
}
catch (std::bad_alloc const &)
{
- throw uno::RuntimeException("out of memory",
- uno::Reference< uno::XInterface >());
+ throw uno::RuntimeException("out of memory");
}
}
@@ -438,8 +437,7 @@ executeMasterPasswordDialog(
}
catch (std::bad_alloc const &)
{
- throw uno::RuntimeException("out of memory",
- uno::Reference< uno::XInterface >());
+ throw uno::RuntimeException("out of memory");
}
sal_uInt8 aKey[RTL_DIGEST_LENGTH_MD5];
diff --git a/uui/source/iahndl-errorhandler.cxx b/uui/source/iahndl-errorhandler.cxx
index 97d608a53284..85f552b4b239 100644
--- a/uui/source/iahndl-errorhandler.cxx
+++ b/uui/source/iahndl-errorhandler.cxx
@@ -98,8 +98,7 @@ executeErrorDialog(
}
catch (std::bad_alloc const &)
{
- throw uno::RuntimeException("out of memory",
- uno::Reference< uno::XInterface >());
+ throw uno::RuntimeException("out of memory");
}
sal_uInt16 aResult = xBox->Execute();
diff --git a/uui/source/iahndl-filter.cxx b/uui/source/iahndl-filter.cxx
index 7c9854d90754..cfa692135538 100644
--- a/uui/source/iahndl-filter.cxx
+++ b/uui/source/iahndl-filter.cxx
@@ -73,9 +73,7 @@ executeFilterDialog(
}
catch (std::bad_alloc const &)
{
- throw uno::RuntimeException(
- OUString("out of memory"),
- uno::Reference< uno::XInterface >());
+ throw uno::RuntimeException("out of memory");
}
}
diff --git a/uui/source/iahndl-locking.cxx b/uui/source/iahndl-locking.cxx
index 46e9c0b5ccba..9a877f95fa5f 100644
--- a/uui/source/iahndl-locking.cxx
+++ b/uui/source/iahndl-locking.cxx
@@ -140,8 +140,7 @@ handleLockedDocumentRequest_(
}
catch (std::bad_alloc const &)
{
- throw uno::RuntimeException("out of memory",
- uno::Reference< uno::XInterface >());
+ throw uno::RuntimeException("out of memory");
}
}
@@ -177,8 +176,7 @@ handleChangedByOthersRequest_(
}
catch (std::bad_alloc const &)
{
- throw uno::RuntimeException("out of memory",
- uno::Reference< uno::XInterface >());
+ throw uno::RuntimeException("out of memory");
}
}
@@ -214,8 +212,7 @@ handleLockFileIgnoreRequest_(
}
catch (std::bad_alloc const &)
{
- throw uno::RuntimeException("out of memory",
- uno::Reference< uno::XInterface >());
+ throw uno::RuntimeException("out of memory");
}
}
diff --git a/uui/source/iahndl-ssl.cxx b/uui/source/iahndl-ssl.cxx
index 774ae967bfa5..e8403813b554 100644
--- a/uui/source/iahndl-ssl.cxx
+++ b/uui/source/iahndl-ssl.cxx
@@ -172,9 +172,7 @@ executeUnknownAuthDialog(
}
catch (std::bad_alloc const &)
{
- throw uno::RuntimeException(
- OUString("out of memory"),
- uno::Reference< uno::XInterface >());
+ throw uno::RuntimeException("out of memory");
}
}
@@ -244,9 +242,7 @@ executeSSLWarnDialog(
}
catch (std::bad_alloc const &)
{
- throw uno::RuntimeException(
- OUString("out of memory"),
- uno::Reference< uno::XInterface >());
+ throw uno::RuntimeException("out of memory");
}
}
diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx
index 09970d9aaf56..24225fad37e9 100644
--- a/uui/source/iahndl.cxx
+++ b/uui/source/iahndl.cxx
@@ -918,8 +918,7 @@ UUIInteractionHelper::handleRequest_impl(
}
catch (std::bad_alloc const &)
{
- throw uno::RuntimeException("out of memory",
- uno::Reference< uno::XInterface >());
+ throw uno::RuntimeException("out of memory");
}
catch( const uno::RuntimeException& )
{
@@ -957,15 +956,13 @@ UUIInteractionHelper::getInteractionHandlerList(
"com.sun.star.configuration.ConfigurationAccess" , aArguments ) );
if ( !xInterface.is() )
- throw uno::RuntimeException("unable to instanciate config access",
- uno::Reference< uno::XInterface >());
+ throw uno::RuntimeException("unable to instanciate config access");
uno::Reference< container::XNameAccess > xNameAccess(
xInterface, uno::UNO_QUERY );
if ( !xNameAccess.is() )
- throw uno::RuntimeException(OUString(
- "config access does not implement XNameAccess"),
- uno::Reference< uno::XInterface >());
+ throw uno::RuntimeException(
+ "config access does not implement XNameAccess");
uno::Sequence< OUString > aElems = xNameAccess->getElementNames();
const OUString* pElems = aElems.getConstArray();
@@ -977,9 +974,8 @@ UUIInteractionHelper::getInteractionHandlerList(
xHierNameAccess( xInterface, uno::UNO_QUERY );
if ( !xHierNameAccess.is() )
- throw uno::RuntimeException(OUString(
- "config access does not implement XHierarchicalNameAccess"),
- uno::Reference< uno::XInterface >());
+ throw uno::RuntimeException(
+ "config access does not implement XHierarchicalNameAccess");
// Iterate over children.
for ( sal_Int32 n = 0; n < nCount; ++n )
diff --git a/vbahelper/source/msforms/vbacontrol.cxx b/vbahelper/source/msforms/vbacontrol.cxx
index 938b93b4c322..c3ad1300e9b8 100644
--- a/vbahelper/source/msforms/vbacontrol.cxx
+++ b/vbahelper/source/msforms/vbacontrol.cxx
@@ -88,7 +88,7 @@ ScVbaControl::getWindowPeer() throw (uno::RuntimeException)
}
catch(const uno::Exception&)
{
- throw uno::RuntimeException( "The Control does not exsit" , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "The Control does not exist" );
}
return xWinPeer;
}
@@ -642,7 +642,7 @@ void SAL_CALL ScVbaControl::setTabIndex( sal_Int32 /*nTabIndex*/ ) throw (uno::R
case form::FormComponentType::SCROLLBAR:
return new ScVbaScrollBar( xVbaParent, xContext, xControlShape, xModel, xGeoHelper.release() );
}
- throw uno::RuntimeException( "Unsupported control." , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "Unsupported control." );
}
/*static*/ uno::Reference< msforms::XControl > ScVbaControlFactory::createUserformControl(
@@ -700,7 +700,7 @@ void SAL_CALL ScVbaControl::setTabIndex( sal_Int32 /*nTabIndex*/ ) throw (uno::R
xVBAControl.set( new ScVbaFrame( xVbaParent, xContext, xControl, xModel, xGeoHelper.release(), xDialog ) );
if( xVBAControl.is() )
return xVBAControl;
- throw uno::RuntimeException( "Unsupported control." , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "Unsupported control." );
}
OUString
diff --git a/vbahelper/source/msforms/vbalistbox.cxx b/vbahelper/source/msforms/vbalistbox.cxx
index 2b4ea399c073..491601833e68 100644
--- a/vbahelper/source/msforms/vbalistbox.cxx
+++ b/vbahelper/source/msforms/vbalistbox.cxx
@@ -62,7 +62,7 @@ ScVbaListBox::getValue() throw (uno::RuntimeException, std::exception)
m_xProps->getPropertyValue( "SelectedItems" ) >>= sSelection;
m_xProps->getPropertyValue( "StringItemList" ) >>= sItems;
if( getMultiSelect() )
- throw uno::RuntimeException( "Attribute use invalid." , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "Attribute use invalid." );
uno::Any aRet;
if ( sSelection.getLength() )
aRet = uno::makeAny( sItems[ sSelection[ 0 ] ] );
@@ -74,7 +74,7 @@ ScVbaListBox::setValue( const uno::Any& _value ) throw (uno::RuntimeException, s
{
if( getMultiSelect() )
{
- throw uno::RuntimeException( "Attribute use invalid." , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "Attribute use invalid." );
}
OUString sValue = getAnyAsString( _value );
uno::Sequence< OUString > sList;
@@ -91,7 +91,7 @@ ScVbaListBox::setValue( const uno::Any& _value ) throw (uno::RuntimeException, s
}
}
if( nValue == -1 )
- throw uno::RuntimeException( "Attribute use invalid." , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "Attribute use invalid." );
uno::Sequence< sal_Int16 > nSelectedIndices(1);
uno::Sequence< sal_Int16 > nOldSelectedIndices;
@@ -156,7 +156,7 @@ ScVbaListBox::Selected( sal_Int32 index ) throw (css::uno::RuntimeException, std
// the indices are but sal_Int16
sal_Int16 nIndex = static_cast< sal_Int16 >( index );
if( nIndex < 0 || nIndex >= nLength )
- throw uno::RuntimeException( "Error Number." , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "Error Number." );
m_nIndex = nIndex;
return uno::makeAny( uno::Reference< XPropValue > ( new ScVbaPropValue( this ) ) );
}
@@ -189,7 +189,7 @@ ScVbaListBox::setValueEvent( const uno::Any& value )
{
bool bValue = false;
if( !(value >>= bValue) )
- throw uno::RuntimeException( "Invalid type\n. need boolean." , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "Invalid type. need boolean." );
uno::Sequence< sal_Int16 > nList;
m_xProps->getPropertyValue( "SelectedItems" ) >>= nList;
sal_Int16 nLength = static_cast<sal_Int16>( nList.getLength() );
diff --git a/vbahelper/source/msforms/vbalistcontrolhelper.cxx b/vbahelper/source/msforms/vbalistcontrolhelper.cxx
index c00cd6b6e11c..a93427f1fb9d 100644
--- a/vbahelper/source/msforms/vbalistcontrolhelper.cxx
+++ b/vbahelper/source/msforms/vbalistcontrolhelper.cxx
@@ -45,7 +45,7 @@ ListPropListener::ListPropListener( const uno::Reference< beans::XPropertySet >&
void ListPropListener::setValueEvent( const uno::Any& value )
{
if( m_pvargIndex.hasValue() || m_pvarColumn.hasValue() )
- throw uno::RuntimeException( "Bad argument" , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "Bad argument" );
m_xProps->setPropertyValue( "StringItemList", value );
}
@@ -61,11 +61,11 @@ uno::Any ListPropListener::getValueEvent()
sal_Int16 nIndex = -1;
m_pvargIndex >>= nIndex;
if( nIndex < 0 || nIndex >= nLength )
- throw uno::RuntimeException( "Bad row Index" , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "Bad row Index" );
aRet <<= sList[ nIndex ];
}
else if ( m_pvarColumn.hasValue() ) // pvarColumn on its own would be bad
- throw uno::RuntimeException( "Bad column Index" , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "Bad column Index" );
else // List() ( e.g. no args )
{
uno::Sequence< uno::Sequence< OUString > > sReturnArray( nLength );
diff --git a/vbahelper/source/vbahelper/vbaapplicationbase.cxx b/vbahelper/source/vbahelper/vbaapplicationbase.cxx
index 0c8e90a47db3..7110e7cf89cc 100644
--- a/vbahelper/source/vbahelper/vbaapplicationbase.cxx
+++ b/vbahelper/source/vbahelper/vbaapplicationbase.cxx
@@ -97,7 +97,7 @@ public:
void Start( const ::rtl::Reference< VbaApplicationBase > xBase, const OUString& aFunction, double nFrom, double nTo )
{
if ( !xBase.is() || aFunction.isEmpty() )
- throw uno::RuntimeException( "Unexpected arguments!" , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "Unexpected arguments!" );
m_xBase = xBase;
m_aTimerInfo = VbaTimerInfo( aFunction, ::std::pair< double, double >( nFrom, nTo ) );
@@ -348,7 +348,7 @@ uno::Any SAL_CALL VbaApplicationBase::Run( const OUString& MacroName, const uno:
}
else
{
- throw uno::RuntimeException( "The macro doesn't exist" , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "The macro doesn't exist" );
}
}
@@ -356,13 +356,13 @@ void SAL_CALL VbaApplicationBase::OnTime( const uno::Any& aEarliestTime, const O
throw ( uno::RuntimeException, std::exception )
{
if ( aFunction.isEmpty() )
- throw uno::RuntimeException( "Unexpected function name!" , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "Unexpected function name!" );
double nEarliestTime = 0;
double nLatestTime = 0;
if ( !( aEarliestTime >>= nEarliestTime )
|| ( aLatestTime.hasValue() && !( aLatestTime >>= nLatestTime ) ) )
- throw uno::RuntimeException( "Only double is supported as time for now!" , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "Only double is supported as time for now!" );
bool bSetTimer = true;
aSchedule >>= bSetTimer;
diff --git a/vbahelper/source/vbahelper/vbacolorformat.cxx b/vbahelper/source/vbahelper/vbacolorformat.cxx
index e50a3b4a09ac..f3b49468ced0 100644
--- a/vbahelper/source/vbahelper/vbacolorformat.cxx
+++ b/vbahelper/source/vbahelper/vbacolorformat.cxx
@@ -75,7 +75,7 @@ ScVbaColorFormat::getRGB() throw (uno::RuntimeException, std::exception)
nRGB = m_nFillFormatBackColor;
break;
default:
- throw uno::RuntimeException( "Second parameter of ColorFormat is wrong." , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "Second parameter of ColorFormat is wrong." );
}
nRGB = OORGBToXLRGB( nRGB );
return nRGB;
@@ -108,7 +108,7 @@ ScVbaColorFormat::setRGB( sal_Int32 _rgb ) throw (uno::RuntimeException, std::ex
}
break;
default:
- throw uno::RuntimeException( "Second parameter of ColorFormat is wrong." , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "Second parameter of ColorFormat is wrong." );
}
}
diff --git a/vbahelper/source/vbahelper/vbacommandbarcontrols.cxx b/vbahelper/source/vbahelper/vbacommandbarcontrols.cxx
index 8696075b241f..7f3ab371e7e1 100644
--- a/vbahelper/source/vbahelper/vbacommandbarcontrols.cxx
+++ b/vbahelper/source/vbahelper/vbacommandbarcontrols.cxx
@@ -181,11 +181,11 @@ ScVbaCommandBarControls::Add( const uno::Any& Type, const uno::Any& Id, const un
if( nType != office::MsoControlType::msoControlButton &&
nType != office::MsoControlType::msoControlPopup )
- throw uno::RuntimeException( "Not implemented" , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "Not implemented" );
if( Id.hasValue() || Parameter.hasValue( ) )
{
- throw uno::RuntimeException( "Not implemented" , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "Not implemented" );
}
if( Before.hasValue() )
diff --git a/vbahelper/source/vbahelper/vbacommandbarhelper.cxx b/vbahelper/source/vbahelper/vbacommandbarhelper.cxx
index 403d592b6b37..0c35ebc5018f 100644
--- a/vbahelper/source/vbahelper/vbacommandbarhelper.cxx
+++ b/vbahelper/source/vbahelper/vbacommandbarhelper.cxx
@@ -107,7 +107,7 @@ void VbaCommandBarHelper::Init( ) throw (css::uno::RuntimeException)
if( maModuleId.isEmpty() )
{
- throw uno::RuntimeException( "Not implemented" , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "Not implemented" );
}
css::uno::Reference< css::ui::XModuleUIConfigurationManagerSupplier > xUICfgMgrSupp(
diff --git a/vbahelper/source/vbahelper/vbacommandbars.cxx b/vbahelper/source/vbahelper/vbacommandbars.cxx
index d55b79792ff8..9993979d888e 100644
--- a/vbahelper/source/vbahelper/vbacommandbars.cxx
+++ b/vbahelper/source/vbahelper/vbacommandbars.cxx
@@ -151,7 +151,7 @@ ScVbaCommandBars::createCollectionObject( const uno::Any& aSource )
}
if( !aRet.hasValue() )
- throw uno::RuntimeException( "Toolbar do not exist" , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "Toolbar do not exist" );
return aRet;
}
@@ -172,7 +172,7 @@ ScVbaCommandBars::Add( const css::uno::Any& Name, const css::uno::Any& /*Positio
{
sResourceUrl = m_pCBarHelper->findToolbarByName( m_xNameAccess, sName );
if( !sResourceUrl.isEmpty() )
- throw uno::RuntimeException( "Toolbar exists" , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "Toolbar exists" );
}
else
{
diff --git a/vbahelper/source/vbahelper/vbadialogbase.cxx b/vbahelper/source/vbahelper/vbadialogbase.cxx
index 654adf3422c9..b988c6708abf 100644
--- a/vbahelper/source/vbahelper/vbadialogbase.cxx
+++ b/vbahelper/source/vbahelper/vbadialogbase.cxx
@@ -29,9 +29,7 @@ void SAL_CALL VbaDialogBase::Show() throw ( uno::RuntimeException, std::exceptio
{
aURL = mapIndexToName( mnIndex );
if( aURL.isEmpty() )
- throw uno::RuntimeException(
- " Unable to open the specified dialog ",
- uno::Reference< XInterface > () );
+ throw uno::RuntimeException( "Unable to open the specified dialog" );
uno::Sequence< beans::PropertyValue > dispatchProps(0);
dispatchRequests( m_xModel, aURL, dispatchProps );
diff --git a/vbahelper/source/vbahelper/vbadocumentbase.cxx b/vbahelper/source/vbahelper/vbadocumentbase.cxx
index fb73b7b0fa93..21b5b05d1cba 100644
--- a/vbahelper/source/vbahelper/vbadocumentbase.cxx
+++ b/vbahelper/source/vbahelper/vbadocumentbase.cxx
@@ -114,7 +114,7 @@ VbaDocumentBase::Close( const uno::Any &rSaveArg, const uno::Any &rFileArg,
{
if( xStorable->isReadonly() )
{
- throw uno::RuntimeException("Unable to save to a read only file ", uno::Reference< XInterface >() );
+ throw uno::RuntimeException("Unable to save to a read only file " );
}
if( bFileName )
xStorable->storeAsURL( aFileName, uno::Sequence< beans::PropertyValue >(0) );
@@ -206,7 +206,7 @@ VbaDocumentBase::Unprotect( const uno::Any &aPassword ) throw (uno::RuntimeExcep
OUString rPassword;
uno::Reference< util::XProtectable > xProt( getModel(), uno::UNO_QUERY_THROW );
if( !xProt->isProtected() )
- throw uno::RuntimeException("File is already unprotected", uno::Reference< XInterface >() );
+ throw uno::RuntimeException("File is already unprotected" );
else
{
if( aPassword >>= rPassword )
diff --git a/vbahelper/source/vbahelper/vbadocumentsbase.cxx b/vbahelper/source/vbahelper/vbadocumentsbase.cxx
index 591144d61301..6f8a6a83b918 100644
--- a/vbahelper/source/vbahelper/vbadocumentsbase.cxx
+++ b/vbahelper/source/vbahelper/vbadocumentsbase.cxx
@@ -248,7 +248,7 @@ uno::Any VbaDocumentsBase::createDocument() throw (uno::RuntimeException)
else if( meDocType == EXCEL_DOCUMENT )
sURL = "private:factory/scalc";
else
- throw uno::RuntimeException( "Not implemented" , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "Not implemented" );
// prepare the media descriptor
utl::MediaDescriptor aMediaDesc;
diff --git a/vbahelper/source/vbahelper/vbahelper.cxx b/vbahelper/source/vbahelper/vbahelper.cxx
index aaf5defdbac4..517334d113e6 100644
--- a/vbahelper/source/vbahelper/vbahelper.cxx
+++ b/vbahelper/source/vbahelper/vbahelper.cxx
@@ -218,7 +218,7 @@ getCurrentDoc( const OUString& sKey ) throw (uno::RuntimeException)
if ( !( aModel >>= xModel ) || !xModel.is() )
{
throw uno::RuntimeException(
- "Can't extract model from basic ( it's obviously not set yet therefore don't know the current document context)" , uno::Reference< uno::XInterface >() );
+ "Can't extract model from basic ( it's obviously not set yet therefore don't know the current document context)" );
}
else
{
@@ -228,9 +228,7 @@ getCurrentDoc( const OUString& sKey ) throw (uno::RuntimeException)
else
{
SAL_INFO("vbahelper", "Failed to get " << sKey);
- throw uno::RuntimeException(
- "Can't determine the currently selected document" ,
- uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "Can't determine the currently selected document" );
}
return xModel;
}
@@ -810,7 +808,7 @@ UserFormGeometryHelper::UserFormGeometryHelper(
mbDialog( uno::Reference< awt::XDialog >( xControl, uno::UNO_QUERY ).is() )
{
if ( !xControl.is() )
- throw uno::RuntimeException( "No control is provided!", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "No control is provided!" );
mxWindow.set( xControl->getPeer(), uno::UNO_QUERY_THROW );
mxModelProps.set( xControl->getModel(), uno::UNO_QUERY_THROW );
@@ -1009,7 +1007,7 @@ ShapeHelper::ShapeHelper( const css::uno::Reference< css::drawing::XShape >& _xS
: xShape( _xShape )
{
if( !xShape.is() )
- throw css::uno::RuntimeException( "No valid shape for helper" , css::uno::Reference< css::uno::XInterface >() );
+ throw css::uno::RuntimeException( "No valid shape for helper" );
}
double ShapeHelper::getHeight() const
diff --git a/vbahelper/source/vbahelper/vbalineformat.cxx b/vbahelper/source/vbahelper/vbalineformat.cxx
index 0a5c2e1f45c9..9412467fe6f9 100644
--- a/vbahelper/source/vbahelper/vbalineformat.cxx
+++ b/vbahelper/source/vbahelper/vbalineformat.cxx
@@ -91,7 +91,7 @@ ScVbaLineFormat::convertArrowheadStyleToLineStartEndName( sal_Int32 nArrowheadSt
case office::MsoArrowheadStyle::msoArrowheadTriangle:
return OUString("Arrow");
default:
- throw uno::RuntimeException( "Invalid Arrow Style!" , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "Invalid Arrow Style!" );
}
}
@@ -128,7 +128,7 @@ ScVbaLineFormat::getBeginArrowheadLength() throw (uno::RuntimeException, std::ex
{
// #STUB
// force error
- throw uno::RuntimeException( "Property 'EndArrowheadWidth' is not supported." , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "Property 'EndArrowheadWidth' is not supported." );
}
void SAL_CALL
@@ -136,7 +136,7 @@ ScVbaLineFormat::setBeginArrowheadLength( sal_Int32 /*_beginarrowheadlength*/ )
{
// #STUB
// force error
- throw uno::RuntimeException( "Property 'EndArrowheadWidth' is not supported." , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "Property 'EndArrowheadWidth' is not supported." );
}
sal_Int32 SAL_CALL
@@ -144,7 +144,7 @@ ScVbaLineFormat::getBeginArrowheadWidth() throw (uno::RuntimeException, std::exc
{
// #STUB
// force error
- throw uno::RuntimeException( "Property 'EndArrowheadWidth' is not supported." , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "Property 'EndArrowheadWidth' is not supported." );
}
void SAL_CALL
@@ -152,7 +152,7 @@ ScVbaLineFormat::setBeginArrowheadWidth( sal_Int32 /*_beginarrowheadwidth*/ ) th
{
// #STUB
// force error
- throw uno::RuntimeException( "Property 'EndArrowheadWidth' is not supported." , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "Property 'EndArrowheadWidth' is not supported." );
}
sal_Int32 SAL_CALL
@@ -173,28 +173,28 @@ ScVbaLineFormat::getEndArrowheadLength() throw (uno::RuntimeException, std::exce
{
// #STUB
// force error
- throw uno::RuntimeException( "Property 'EndArrowheadWidth' is not supported." , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "Property 'EndArrowheadWidth' is not supported." );
}
void SAL_CALL
ScVbaLineFormat::setEndArrowheadLength( sal_Int32 /*_endarrowheadlength*/ ) throw (uno::RuntimeException, std::exception)
{
// #STUB
- throw uno::RuntimeException( "Property 'EndArrowheadWidth' is not supported." , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "Property 'EndArrowheadWidth' is not supported." );
}
sal_Int32 SAL_CALL
ScVbaLineFormat::getEndArrowheadWidth() throw (uno::RuntimeException, std::exception)
{
// #STUB
- throw uno::RuntimeException( "Property 'EndArrowheadWidth' is not supported." , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "Property 'EndArrowheadWidth' is not supported." );
}
void SAL_CALL
ScVbaLineFormat::setEndArrowheadWidth( sal_Int32 /*_endarrowheadwidth*/ ) throw (uno::RuntimeException, std::exception)
{
// #STUB
- throw uno::RuntimeException( "Property 'EndArrowheadWidth' is not supported." , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "Property 'EndArrowheadWidth' is not supported." );
}
double SAL_CALL
@@ -210,7 +210,7 @@ void SAL_CALL
ScVbaLineFormat::setWeight( double _weight ) throw (uno::RuntimeException, std::exception)
{
if( _weight < 0 )
- throw uno::RuntimeException( "Parameter: Must be positive." , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "Parameter: Must be positive." );
if( _weight == 0 )
_weight = 0.5;
m_nLineWeight = _weight;
@@ -405,7 +405,7 @@ ScVbaLineFormat::setDashStyle( sal_Int32 _dashstyle ) throw (uno::RuntimeExcepti
pLineDash.Distance = nPixel;
break;
default:
- throw uno::RuntimeException( "this MsoLineDashStyle is not supported." , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "this MsoLineDashStyle is not supported." );
}
m_xPropertySet->setPropertyValue( "LineDash" , uno::makeAny( pLineDash ) );
}
diff --git a/vbahelper/source/vbahelper/vbapictureformat.cxx b/vbahelper/source/vbahelper/vbapictureformat.cxx
index 9ec4ba1dddfd..d3834caf0219 100644
--- a/vbahelper/source/vbahelper/vbapictureformat.cxx
+++ b/vbahelper/source/vbahelper/vbapictureformat.cxx
@@ -35,11 +35,11 @@ ScVbaPictureFormat::checkParameterRangeInDouble( double nRange, double nMin, dou
{
if( nRange < nMin )
{
- throw uno::RuntimeException( "Parameter out of range, value is too small." , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "Parameter out of range, value is too small." );
}
if( nRange > nMax )
{
- throw uno::RuntimeException( "Parameter out of range, value is too high." , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "Parameter out of range, value is too high." );
}
}
diff --git a/vbahelper/source/vbahelper/vbashape.cxx b/vbahelper/source/vbahelper/vbashape.cxx
index 09e4cccc51fd..c48a2cab353f 100644
--- a/vbahelper/source/vbahelper/vbashape.cxx
+++ b/vbahelper/source/vbahelper/vbashape.cxx
@@ -149,7 +149,7 @@ ScVbaShape::getType( const css::uno::Reference< drawing::XShape > xShape ) throw
else if( sShapeType == "com.sun.star.drawing.TextShape" )
return office::MsoShapeType::msoTextBox;
else
- throw uno::RuntimeException("the shape type do not be supported: " + sShapeType, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("the shape type do not be supported: " + sShapeType );
}
// Attributes
@@ -395,9 +395,9 @@ ScVbaShape::ZOrder( sal_Int32 ZOrderCmd ) throw (uno::RuntimeException, std::exc
// below two commands use with Writer for text and image object.
case office::MsoZOrderCmd::msoBringInFrontOfText:
case office::MsoZOrderCmd::msoSendBehindText:
- throw uno::RuntimeException( "This ZOrderCmd is not implemented, it is use with writer." , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "This ZOrderCmd is not implemented, it is use with writer." );
default:
- throw uno::RuntimeException( "Invalid Parameter." , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "Invalid Parameter." );
}
}
@@ -450,7 +450,7 @@ ScVbaShape::ScaleHeight( double Factor, sal_Bool /*RelativeToOriginalSize*/, sal
}
else
{
- throw uno::RuntimeException( "ScaleHeight.Scale wrong value is given." , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "ScaleHeight.Scale wrong value is given." );
}
}
@@ -479,7 +479,7 @@ ScVbaShape::ScaleWidth( double Factor, sal_Bool /*RelativeToOriginalSize*/, sal_
}
else
{
- throw uno::RuntimeException( "ScaleHeight.Scale wrong value is given." , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "ScaleHeight.Scale wrong value is given." );
}
}
@@ -569,7 +569,7 @@ ScVbaShape::getRelativeHorizontalPosition() throw (uno::RuntimeException, std::e
}
default:
{
- throw uno::RuntimeException( "Shape::RelativeHorizontalPosition: not implemented" , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "Shape::RelativeHorizontalPosition: not implemented" );
}
}
return nRelativeHorizontalPosition;
@@ -641,7 +641,7 @@ ScVbaShape::getRelativeVerticalPosition() throw (uno::RuntimeException, std::exc
}
default:
{
- throw uno::RuntimeException( "Shape::RelativeVerticalPosition: not implemented" , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "Shape::RelativeVerticalPosition: not implemented" );
}
}
return nRelativeVerticalPosition;
@@ -695,7 +695,7 @@ ScVbaShape::WrapFormat() throw (uno::RuntimeException, std::exception)
uno::Reference< uno::XInterface > xWrapFormat = xContext->getServiceManager()->createInstanceWithArgumentsAndContext( "ooo.vba.word.WrapFormat" , aArgs, xContext );
return uno::makeAny( xWrapFormat );
}
- throw uno::RuntimeException( "Not implemented" , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "Not implemented" );
}
OUString
diff --git a/vbahelper/source/vbahelper/vbashapes.cxx b/vbahelper/source/vbahelper/vbashapes.cxx
index b630eca180f0..200fdebea5ff 100644
--- a/vbahelper/source/vbahelper/vbashapes.cxx
+++ b/vbahelper/source/vbahelper/vbashapes.cxx
@@ -358,7 +358,7 @@ ScVbaShapes::AddTextbox( sal_Int32 _nOrientation, sal_Int32 _nLeft, sal_Int32 _n
{
return AddTextboxInWriter( _nOrientation, _nLeft, _nTop, _nWidth, _nHeight );
}
- throw uno::RuntimeException( "Not implemented" , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "Not implemented" );
}
uno::Any
diff --git a/vbahelper/source/vbahelper/vbatextframe.cxx b/vbahelper/source/vbahelper/vbatextframe.cxx
index 56c5874983b7..21b4abca77a3 100644
--- a/vbahelper/source/vbahelper/vbatextframe.cxx
+++ b/vbahelper/source/vbahelper/vbatextframe.cxx
@@ -134,7 +134,7 @@ VbaTextFrame::setMarginRight( float _marginright ) throw (uno::RuntimeException,
uno::Any SAL_CALL
VbaTextFrame::Characters() throw (uno::RuntimeException, std::exception)
{
- throw uno::RuntimeException( "Not implemented" , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "Not implemented" );
}
OUString
diff --git a/vcl/source/window/syschild.cxx b/vcl/source/window/syschild.cxx
index eb141a120616..6fd6f04ea96f 100644
--- a/vcl/source/window/syschild.cxx
+++ b/vcl/source/window/syschild.cxx
@@ -183,7 +183,7 @@ void SystemChildWindow::ImplTestJavaException( void* pEnv )
pJavaEnv->ReleaseStringChars(jsMessage, jcMessage);
}
- throw uno::RuntimeException(ouMessage, uno::Reference<uno::XInterface>());
+ throw uno::RuntimeException(ouMessage);
}
#else
(void)pEnv;
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 6b31a1cdf331..42636bc79ee7 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -685,15 +685,15 @@ void RTFDocumentImpl::resolve(Stream& rMapper)
break;
case ERROR_GROUP_OVER:
SAL_INFO("writerfilter", OSL_THIS_FUNC << ": unmatched '{'");
- throw io::WrongFormatException(m_pTokenizer->getPosition(), uno::Reference< uno::XInterface >());
+ throw io::WrongFormatException(m_pTokenizer->getPosition());
break;
case ERROR_EOF:
SAL_INFO("writerfilter", OSL_THIS_FUNC << ": unexpected end of file");
- throw io::WrongFormatException(m_pTokenizer->getPosition(), uno::Reference< uno::XInterface >());
+ throw io::WrongFormatException(m_pTokenizer->getPosition());
break;
case ERROR_HEX_INVALID:
SAL_INFO("writerfilter", OSL_THIS_FUNC << ": invalid hex char");
- throw io::WrongFormatException(m_pTokenizer->getPosition(), uno::Reference< uno::XInterface >());
+ throw io::WrongFormatException(m_pTokenizer->getPosition());
break;
case ERROR_CHAR_OVER:
SAL_INFO("writerfilter", OSL_THIS_FUNC << ": characters after last '}'");
diff --git a/xmlhelp/source/cxxhelp/provider/inputstream.cxx b/xmlhelp/source/cxxhelp/provider/inputstream.cxx
index 10f23d156196..79121a2ce213 100644
--- a/xmlhelp/source/cxxhelp/provider/inputstream.cxx
+++ b/xmlhelp/source/cxxhelp/provider/inputstream.cxx
@@ -128,8 +128,7 @@ XInputStream_impl::skipBytes(
{
if (m_aFile.setPos(osl_Pos_Current, sal_uInt64(nBytesToSkip)) != osl::FileBase::E_None)
{
- throw io::IOException(OUString(
- "XInputStream_impl::skipBytes failed seek"), uno::Reference< uno::XInterface >());
+ throw io::IOException("XInputStream_impl::skipBytes failed seek");
}
}
diff --git a/xmlhelp/source/treeview/tvread.cxx b/xmlhelp/source/treeview/tvread.cxx
index e8045b80d365..23c1d1b23a6d 100644
--- a/xmlhelp/source/treeview/tvread.cxx
+++ b/xmlhelp/source/treeview/tvread.cxx
@@ -885,9 +885,7 @@ void ExtensionIteratorBase::init()
m_xContext = ::comphelper::getProcessComponentContext();
if( !m_xContext.is() )
{
- throw RuntimeException(
- OUString( "ExtensionIteratorBase::init(), no XComponentContext" ),
- Reference< XInterface >() );
+ throw RuntimeException( "ExtensionIteratorBase::init(), no XComponentContext" );
}
m_xSFA = ucb::SimpleFileAccess::create(m_xContext);
diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx
index a13f50bd0620..d414c3849bcb 100644
--- a/xmloff/source/core/xmlimp.cxx
+++ b/xmloff/source/core/xmlimp.cxx
@@ -649,8 +649,7 @@ void SAL_CALL SvXMLImport::startElement( const OUString& rName,
throw xml::sax::SAXException("Inconsistent ODF versions in content.xml and manifest.xml!",
uno::Reference< uno::XInterface >(),
uno::makeAny(
- packages::zip::ZipIOException("Inconsistent ODF versions in content.xml and manifest.xml!",
- Reference< XInterface >() ) ) );
+ packages::zip::ZipIOException("Inconsistent ODF versions in content.xml and manifest.xml!" ) ) );
}
}
else if( ( rAttrName.getLength() >= 5 ) &&
diff --git a/xmlreader/source/span.cxx b/xmlreader/source/span.cxx
index b9d9a3f78f1f..2d85df9f0918 100644
--- a/xmlreader/source/span.cxx
+++ b/xmlreader/source/span.cxx
@@ -42,8 +42,7 @@ OUString Span::convertFromUtf8() const {
RTL_TEXTTOUNICODE_FLAGS_INVALID_ERROR)))
{
throw css::uno::RuntimeException(
- "cannot convert from UTF-8",
- css::uno::Reference< css::uno::XInterface >());
+ "cannot convert from UTF-8");
}
return OUString(s, SAL_NO_ACQUIRE);
}
diff --git a/xmlreader/source/xmlreader.cxx b/xmlreader/source/xmlreader.cxx
index 0d49c426f383..05b5ebbb7f0b 100644
--- a/xmlreader/source/xmlreader.cxx
+++ b/xmlreader/source/xmlreader.cxx
@@ -81,12 +81,10 @@ XmlReader::XmlReader(OUString const & fileUrl)
case osl_File_E_None:
break;
case osl_File_E_NOENT:
- throw css::container::NoSuchElementException(
- fileUrl_, css::uno::Reference< css::uno::XInterface >());
+ throw css::container::NoSuchElementException( fileUrl_ );
default:
throw css::uno::RuntimeException(
- "cannot open " + fileUrl_ + ": " + OUString::number(e),
- css::uno::Reference< css::uno::XInterface >());
+ "cannot open " + fileUrl_ + ": " + OUString::number(e));
}
e = osl_getFileSize(fileHandle_, &fileSize_);
if (e == osl_File_E_None) {
@@ -102,8 +100,7 @@ XmlReader::XmlReader(OUString const & fileUrl)
"osl_closeFile of \"" << fileUrl_ << "\" failed with " << +e2);
}
throw css::uno::RuntimeException(
- "cannot mmap " + fileUrl_ + " (" + OUString::number(e) + ")",
- css::uno::Reference< css::uno::XInterface >());
+ "cannot mmap " + fileUrl_ + " (" + OUString::number(e) + ")" );
}
namespaceIris_.push_back(Span("http://www.w3.org/XML/1998/namespace"));
namespaces_.push_back(NamespaceData(Span("xml"), NAMESPACE_XML));
@@ -254,14 +251,12 @@ bool XmlReader::skipComment() {
pos_, end_ - pos_, RTL_CONSTASCII_STRINGPARAM("--"));
if (i < 0) {
throw css::uno::RuntimeException(
- "premature end (within comment) of " + fileUrl_,
- css::uno::Reference< css::uno::XInterface >());
+ "premature end (within comment) of " + fileUrl_ );
}
pos_ += i + RTL_CONSTASCII_LENGTH("--");
if (read() != '>') {
throw css::uno::RuntimeException(
- "illegal \"--\" within comment in " + fileUrl_,
- css::uno::Reference< css::uno::XInterface >());
+ "illegal \"--\" within comment in " + fileUrl_ );
}
return true;
}
@@ -271,8 +266,7 @@ void XmlReader::skipProcessingInstruction() {
pos_, end_ - pos_, RTL_CONSTASCII_STRINGPARAM("?>"));
if (i < 0) {
throw css::uno::RuntimeException(
- "bad '<?' in " + fileUrl_,
- css::uno::Reference< css::uno::XInterface >());
+ "bad '<?' in " + fileUrl_ );
}
pos_ += i + RTL_CONSTASCII_LENGTH("?>");
}
@@ -285,8 +279,7 @@ void XmlReader::skipDocumentTypeDeclaration() {
switch (c) {
case '\0': // i.e., EOF
throw css::uno::RuntimeException(
- "premature end (within DTD) of " + fileUrl_,
- css::uno::Reference< css::uno::XInterface >());
+ "premature end (within DTD) of " + fileUrl_ );
case '"':
case '\'':
{
@@ -294,8 +287,7 @@ void XmlReader::skipDocumentTypeDeclaration() {
pos_, end_ - pos_, c);
if (i < 0) {
throw css::uno::RuntimeException(
- "premature end (within DTD) of " + fileUrl_,
- css::uno::Reference< css::uno::XInterface >());
+ "premature end (within DTD) of " + fileUrl_ );
}
pos_ += i + 1;
}
@@ -308,8 +300,7 @@ void XmlReader::skipDocumentTypeDeclaration() {
switch (c) {
case '\0': // i.e., EOF
throw css::uno::RuntimeException(
- "premature end (within DTD) of " + fileUrl_,
- css::uno::Reference< css::uno::XInterface >());
+ "premature end (within DTD) of " + fileUrl_ );
case '"':
case '\'':
{
@@ -317,8 +308,7 @@ void XmlReader::skipDocumentTypeDeclaration() {
pos_, end_ - pos_, c);
if (i < 0) {
throw css::uno::RuntimeException(
- "premature end (within DTD) of " + fileUrl_,
- css::uno::Reference< css::uno::XInterface >());
+ "premature end (within DTD) of " + fileUrl_ );
}
pos_ += i + 1;
}
@@ -327,8 +317,7 @@ void XmlReader::skipDocumentTypeDeclaration() {
switch (read()) {
case '\0': // i.e., EOF
throw css::uno::RuntimeException(
- "premature end (within DTD) of " + fileUrl_,
- css::uno::Reference< css::uno::XInterface >());
+ "premature end (within DTD) of " + fileUrl_ );
case '!':
skipComment();
break;
@@ -343,8 +332,7 @@ void XmlReader::skipDocumentTypeDeclaration() {
skipSpace();
if (read() != '>') {
throw css::uno::RuntimeException(
- "missing \">\" of DTD in " + fileUrl_,
- css::uno::Reference< css::uno::XInterface >());
+ "missing \">\" of DTD in " + fileUrl_ );
}
return;
default:
@@ -371,8 +359,7 @@ Span XmlReader::scanCdataSection() {
pos_, end_ - pos_, RTL_CONSTASCII_STRINGPARAM("]]>"));
if (i < 0) {
throw css::uno::RuntimeException(
- "premature end (within CDATA section) of " + fileUrl_,
- css::uno::Reference< css::uno::XInterface >());
+ "premature end (within CDATA section) of " + fileUrl_ );
}
pos_ += i + RTL_CONSTASCII_LENGTH("]]>");
return Span(begin, i);
@@ -435,8 +422,7 @@ char const * XmlReader::handleReference(char const * position, char const * end)
}
if (val > 0x10FFFF) { // avoid overflow
throw css::uno::RuntimeException(
- "'&#x...' too large in " + fileUrl_,
- css::uno::Reference< css::uno::XInterface >());
+ "'&#x...' too large in " + fileUrl_ );
}
}
} else {
@@ -450,23 +436,20 @@ char const * XmlReader::handleReference(char const * position, char const * end)
}
if (val > 0x10FFFF) { // avoid overflow
throw css::uno::RuntimeException(
- "'&#...' too large in " + fileUrl_,
- css::uno::Reference< css::uno::XInterface >());
+ "'&#...' too large in " + fileUrl_ );
}
}
}
if (position == p || *position++ != ';') {
throw css::uno::RuntimeException(
- "'&#...' missing ';' in " + fileUrl_,
- css::uno::Reference< css::uno::XInterface >());
+ "'&#...' missing ';' in " + fileUrl_ );
}
assert(val >= 0 && val <= 0x10FFFF);
if ((val < 0x20 && val != 0x9 && val != 0xA && val != 0xD) ||
(val >= 0xD800 && val <= 0xDFFF) || val == 0xFFFE || val == 0xFFFF)
{
throw css::uno::RuntimeException(
- "character reference denoting invalid character in " + fileUrl_,
- css::uno::Reference< css::uno::XInterface >());
+ "character reference denoting invalid character in " + fileUrl_ );
}
char buf[4];
sal_Int32 len;
@@ -521,8 +504,7 @@ char const * XmlReader::handleReference(char const * position, char const * end)
}
}
throw css::uno::RuntimeException(
- "unknown entity reference in " + fileUrl_,
- css::uno::Reference< css::uno::XInterface >());
+ "unknown entity reference in " + fileUrl_ );
}
}
@@ -631,8 +613,7 @@ XmlReader::Result XmlReader::handleStartTag(int * nsId, Span * localName) {
char const * nameColon = 0;
if (!scanName(&nameColon)) {
throw css::uno::RuntimeException(
- "bad tag name in " + fileUrl_,
- css::uno::Reference< css::uno::XInterface >());
+ "bad tag name in " + fileUrl_ );
}
char const * nameEnd = pos_;
NamespaceList::size_type inheritedNamespaces = namespaces_.size();
@@ -647,36 +628,31 @@ XmlReader::Result XmlReader::handleStartTag(int * nsId, Span * localName) {
}
if (pos_ == p) {
throw css::uno::RuntimeException(
- "missing whitespace before attribute in " + fileUrl_,
- css::uno::Reference< css::uno::XInterface >());
+ "missing whitespace before attribute in " + fileUrl_ );
}
char const * attrNameBegin = pos_;
char const * attrNameColon = 0;
if (!scanName(&attrNameColon)) {
throw css::uno::RuntimeException(
- "bad attribute name in " + fileUrl_,
- css::uno::Reference< css::uno::XInterface >());
+ "bad attribute name in " + fileUrl_ );
}
char const * attrNameEnd = pos_;
skipSpace();
if (read() != '=') {
throw css::uno::RuntimeException(
- "missing '=' in " + fileUrl_,
- css::uno::Reference< css::uno::XInterface >());
+ "missing '=' in " + fileUrl_ );
}
skipSpace();
char del = read();
if (del != '\'' && del != '"') {
throw css::uno::RuntimeException(
- "bad attribute value in " + fileUrl_,
- css::uno::Reference< css::uno::XInterface >());
+ "bad attribute value in " + fileUrl_ );
}
char const * valueBegin = pos_;
sal_Int32 i = rtl_str_indexOfChar_WithLength(pos_, end_ - pos_, del);
if (i < 0) {
throw css::uno::RuntimeException(
- "unterminated attribute value in " + fileUrl_,
- css::uno::Reference< css::uno::XInterface >());
+ "unterminated attribute value in " + fileUrl_ );
}
char const * valueEnd = pos_ + i;
pos_ += i + 1;
@@ -712,8 +688,7 @@ XmlReader::Result XmlReader::handleStartTag(int * nsId, Span * localName) {
}
if (peek() != '>') {
throw css::uno::RuntimeException(
- "missing '>' in " + fileUrl_,
- css::uno::Reference< css::uno::XInterface >());
+ "missing '>' in " + fileUrl_ );
}
++pos_;
elements_.push(
@@ -733,8 +708,7 @@ XmlReader::Result XmlReader::handleStartTag(int * nsId, Span * localName) {
XmlReader::Result XmlReader::handleEndTag() {
if (elements_.empty()) {
throw css::uno::RuntimeException(
- "spurious end tag in " + fileUrl_,
- css::uno::Reference< css::uno::XInterface >());
+ "spurious end tag in " + fileUrl_ );
}
char const * nameBegin = pos_;
char const * nameColon = 0;
@@ -742,15 +716,13 @@ XmlReader::Result XmlReader::handleEndTag() {
!elements_.top().name.equals(nameBegin, pos_ - nameBegin))
{
throw css::uno::RuntimeException(
- "tag mismatch in " + fileUrl_,
- css::uno::Reference< css::uno::XInterface >());
+ "tag mismatch in " + fileUrl_ );
}
handleElementEnd();
skipSpace();
if (peek() != '>') {
throw css::uno::RuntimeException(
- "missing '>' in " + fileUrl_,
- css::uno::Reference< css::uno::XInterface >());
+ "missing '>' in " + fileUrl_ );
}
++pos_;
return RESULT_END;
@@ -768,8 +740,7 @@ XmlReader::Result XmlReader::handleSkippedText(Span * data, int * nsId) {
sal_Int32 i = rtl_str_indexOfChar_WithLength(pos_, end_ - pos_, '<');
if (i < 0) {
throw css::uno::RuntimeException(
- "premature end of " + fileUrl_,
- css::uno::Reference< css::uno::XInterface >());
+ "premature end of " + fileUrl_ );
}
pos_ += i + 1;
switch (peek()) {
@@ -798,8 +769,7 @@ XmlReader::Result XmlReader::handleRawText(Span * text) {
switch (peek()) {
case '\0': // i.e., EOF
throw css::uno::RuntimeException(
- "premature end of " + fileUrl_,
- css::uno::Reference< css::uno::XInterface >());
+ "premature end of " + fileUrl_ );
case '\x0D':
pad_.add(begin, pos_ - begin);
++pos_;
@@ -864,8 +834,7 @@ XmlReader::Result XmlReader::handleNormalizedText(Span * text) {
switch (peek()) {
case '\0': // i.e., EOF
throw css::uno::RuntimeException(
- "premature end of " + fileUrl_,
- css::uno::Reference< css::uno::XInterface >());
+ "premature end of " + fileUrl_ );
case '\x09':
case '\x0A':
case '\x0D':
diff --git a/xmlscript/source/xml_helper/xml_impctx.cxx b/xmlscript/source/xml_helper/xml_impctx.cxx
index 617b89f1e4de..36857765e99c 100644
--- a/xmlscript/source/xml_helper/xml_impctx.cxx
+++ b/xmlscript/source/xml_helper/xml_impctx.cxx
@@ -445,7 +445,7 @@ void DocumentHandlerImpl::initialize(
}
else
{
- throw RuntimeException( "missing root instance!", Reference< XInterface >() );
+ throw RuntimeException( "missing root instance!" );
}
}
diff --git a/xmlscript/source/xmlflat_imexp/xmlbas_export.cxx b/xmlscript/source/xmlflat_imexp/xmlbas_export.cxx
index 65eef7ad8815..89b0e7c0b9db 100644
--- a/xmlscript/source/xmlflat_imexp/xmlbas_export.cxx
+++ b/xmlscript/source/xmlflat_imexp/xmlbas_export.cxx
@@ -132,12 +132,12 @@ namespace xmlscript
if ( !m_xHandler.is() )
{
- throw RuntimeException( "XMLBasicExporterBase::initialize: invalid argument format!", Reference< XInterface >() );
+ throw RuntimeException( "XMLBasicExporterBase::initialize: invalid argument format!" );
}
}
else
{
- throw RuntimeException( "XMLBasicExporterBase::initialize: invalid number of arguments!", Reference< XInterface >() );
+ throw RuntimeException( "XMLBasicExporterBase::initialize: invalid number of arguments!" );
}
}
diff --git a/xmlscript/test/imexp.cxx b/xmlscript/test/imexp.cxx
index 1edf5f6ed5f8..4a597a491522 100644
--- a/xmlscript/test/imexp.cxx
+++ b/xmlscript/test/imexp.cxx
@@ -105,7 +105,7 @@ Reference< container::XNameContainer > importFile(
}
else
{
- throw Exception( "### Cannot read file!", Reference< XInterface >() );
+ throw Exception( "### Cannot read file!" );
}
}
diff --git a/xmlsecurity/source/xmlsec/nss/ciphercontext.cxx b/xmlsecurity/source/xmlsec/nss/ciphercontext.cxx
index ea461c7a8bb1..4885ce9c6776 100644
--- a/xmlsecurity/source/xmlsec/nss/ciphercontext.cxx
+++ b/xmlsecurity/source/xmlsec/nss/ciphercontext.cxx
@@ -187,7 +187,7 @@ uno::Sequence< ::sal_Int8 > SAL_CALL OCipherContext::finalizeCipherContextAndDis
// if it is decryption, the amount of data should be rounded to the block size even in case of padding
if ( ( !m_bPadding || !m_bEncryption ) && nSizeForPadding )
- throw uno::RuntimeException("The data should contain complete blocks only.", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("The data should contain complete blocks only." );
if ( m_bW3CPadding && m_bEncryption )
{