summaryrefslogtreecommitdiff
path: root/helpcontent2/source/text/shared/guide/data_dbase2office.xhp
diff options
context:
space:
mode:
Diffstat (limited to 'helpcontent2/source/text/shared/guide/data_dbase2office.xhp')
0 files changed, 0 insertions, 0 deletions
re/sw-delete-undo-rework LibreOffice 核心代码仓库文档基金会
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
Diffstat
-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() );
}