[Libreoffice-commits] core.git: accessibility/source basegfx/source bridges/source canvas/source chart2/source comphelper/qa comphelper/source compilerplugins/clang cppuhelper/source dbaccess/source extensions/source filter/source forms/source framework/source oox/source package/source reportdesign/source scripting/source sc/source sdext/source sd/source sfx2/source shell/source stoc/source svtools/source svx/source sw/source toolkit/source ucbhelper/source ucb/source unoxml/source vcl/source vcl/unx xmloff/source xmlscript/source xmlsecurity/source
Noel Grandin
noel.grandin at collabora.co.uk
Sat Jan 28 09:23:27 UTC 2017
accessibility/source/extended/AccessibleBrowseBoxTableBase.cxx | 9
accessibility/source/extended/AccessibleGridControlTableBase.cxx | 9
basegfx/source/tools/canvastools.cxx | 5
bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx | 2
canvas/source/vcl/canvas.cxx | 4
chart2/source/controller/sidebar/Chart2PanelFactory.cxx | 2
comphelper/qa/unit/variadictemplates.cxx | 2
comphelper/source/misc/instancelocker.cxx | 8
comphelper/source/misc/numberedcollection.cxx | 4
compilerplugins/clang/stringconstant.cxx | 32 +++
cppuhelper/source/factory.cxx | 2
dbaccess/source/ext/macromigration/macromigrationwizard.cxx | 6
dbaccess/source/sdbtools/connection/objectnames.cxx | 4
dbaccess/source/sdbtools/connection/tablename.cxx | 4
dbaccess/source/ui/app/AppController.cxx | 2
dbaccess/source/ui/app/AppControllerGen.cxx | 2
dbaccess/source/ui/querydesign/querycontroller.cxx | 6
dbaccess/source/ui/uno/copytablewizard.cxx | 16 -
extensions/source/config/ldap/ldapuserprofilebe.cxx | 4
filter/source/xsltfilter/XSLTFilter.cxx | 2
forms/source/xforms/binding.cxx | 2
framework/source/accelerators/acceleratorconfiguration.cxx | 50 ++--
framework/source/accelerators/moduleacceleratorconfiguration.cxx | 2
framework/source/fwe/helper/undomanagerhelper.cxx | 2
framework/source/fwi/uielement/itemcontainer.cxx | 4
framework/source/helper/vclstatusindicator.cxx | 2
framework/source/services/autorecovery.cxx | 4
framework/source/services/modulemanager.cxx | 10
framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx | 2
oox/source/docprop/docprophandler.cxx | 2
package/source/zippackage/ZipPackage.cxx | 4
reportdesign/source/core/api/ReportDefinition.cxx | 4
reportdesign/source/ui/inspection/GeometryHandler.cxx | 4
sc/source/ui/sidebar/ScPanelFactory.cxx | 2
sc/source/ui/unoobj/confuno.cxx | 2
scripting/source/basprov/basscript.cxx | 5
scripting/source/provider/MasterScriptProvider.cxx | 3
scripting/source/provider/URIHelper.cxx | 4
sd/source/ui/unoidl/UnoDocumentSettings.cxx | 2
sdext/source/presenter/PresenterButton.cxx | 2
sdext/source/presenter/PresenterController.cxx | 2
sdext/source/presenter/PresenterHelpView.cxx | 2
sdext/source/presenter/PresenterPaneBorderPainter.cxx | 3
sdext/source/presenter/PresenterPaneFactory.cxx | 2
sdext/source/presenter/PresenterProtocolHandler.cxx | 6
sdext/source/presenter/PresenterScreen.cxx | 3
sdext/source/presenter/PresenterSlideShowView.cxx | 2
sdext/source/presenter/PresenterSlideSorter.cxx | 3
sdext/source/presenter/PresenterToolBar.cxx | 2
sdext/source/presenter/PresenterViewFactory.cxx | 3
sfx2/source/appl/imestatuswindow.cxx | 7
sfx2/source/control/thumbnailviewacc.cxx | 2
sfx2/source/dialog/backingcomp.cxx | 14 -
sfx2/source/doc/DocumentMetadataAccess.cxx | 5
sfx2/source/doc/Metadatable.cxx | 33 +--
sfx2/source/doc/SfxDocumentMetaData.cxx | 90 ++++----
sfx2/source/notify/globalevents.cxx | 4
shell/source/backends/desktopbe/desktopbackend.cxx | 2
shell/source/backends/localebe/localebackend.cxx | 3
stoc/source/invocation/invocation.cxx | 2
stoc/source/javavm/javavm.cxx | 72 +++---
stoc/source/simpleregistry/simpleregistry.cxx | 104 +++++-----
svtools/source/control/valueacc.cxx | 2
svtools/source/hatchwindow/documentcloser.cxx | 4
svx/source/accessibility/AccessibleShape.cxx | 4
sw/source/core/access/acccontext.cxx | 2
sw/source/core/access/acccontext.hxx | 4
sw/source/core/access/accselectionhelper.cxx | 2
sw/source/core/access/acctable.cxx | 2
sw/source/core/unocore/unoftn.cxx | 3
sw/source/uibase/uno/SwXDocumentSettings.cxx | 4
toolkit/source/controls/unocontrolcontainer.cxx | 8
ucb/source/core/ucb.cxx | 4
ucb/source/core/ucbcmds.cxx | 39 +--
ucb/source/ucp/cmis/cmis_content.cxx | 12 -
ucb/source/ucp/cmis/cmis_repo_content.cxx | 2
ucb/source/ucp/file/filglob.cxx | 11 -
ucb/source/ucp/file/filstr.cxx | 2
ucb/source/ucp/ftp/ftpcontent.cxx | 14 -
ucb/source/ucp/gio/gio_content.cxx | 8
ucb/source/ucp/hierarchy/hierarchycontent.cxx | 50 ++--
ucb/source/ucp/package/pkgcontent.cxx | 73 ++-----
ucb/source/ucp/tdoc/tdoc_content.cxx | 89 ++++----
ucb/source/ucp/tdoc/tdoc_documentcontentfactory.cxx | 3
ucb/source/ucp/tdoc/tdoc_provider.cxx | 11 -
ucb/source/ucp/tdoc/tdoc_storage.cxx | 33 +--
ucb/source/ucp/webdav-neon/webdavcontent.cxx | 68 +++---
ucbhelper/source/client/content.cxx | 11 -
unoxml/source/rdf/CBlankNode.cxx | 9
unoxml/source/rdf/CLiteral.cxx | 18 -
unoxml/source/rdf/CURI.cxx | 24 --
vcl/source/gdi/virdev.cxx | 2
vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx | 6
xmloff/source/meta/MetaImportComponent.cxx | 8
xmloff/source/meta/xmlmetai.cxx | 5
xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx | 4
xmlscript/source/xmldlg_imexp/xmldlg_import.cxx | 3
xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx | 4
98 files changed, 542 insertions(+), 609 deletions(-)
New commits:
commit f1d83ac45f08270f7f2dd7128056effd0251dc5e
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Fri Jan 27 16:09:54 2017 +0200
loplugin:stringconstant check for unnecessary OUString constructor..
..calls when creating exceptions
Change-Id: I3bc58a5aa4dc6f0508ecb88b3a843b96b8c7ebfe
Reviewed-on: https://gerrit.libreoffice.org/33617
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/accessibility/source/extended/AccessibleBrowseBoxTableBase.cxx b/accessibility/source/extended/AccessibleBrowseBoxTableBase.cxx
index f862854..32be324 100644
--- a/accessibility/source/extended/AccessibleBrowseBoxTableBase.cxx
+++ b/accessibility/source/extended/AccessibleBrowseBoxTableBase.cxx
@@ -267,15 +267,13 @@ void AccessibleBrowseBoxTableBase::implGetSelectedColumns( Sequence< sal_Int32 >
void AccessibleBrowseBoxTableBase::ensureIsValidRow( sal_Int32 nRow )
{
if( nRow >= implGetRowCount() )
- throw lang::IndexOutOfBoundsException(
- OUString( "row index is invalid" ), *this );
+ throw lang::IndexOutOfBoundsException( "row index is invalid", *this );
}
void AccessibleBrowseBoxTableBase::ensureIsValidColumn( sal_Int32 nColumn )
{
if( nColumn >= implGetColumnCount() )
- throw lang::IndexOutOfBoundsException(
- OUString( "column index is invalid" ), *this );
+ throw lang::IndexOutOfBoundsException( "column index is invalid", *this );
}
void AccessibleBrowseBoxTableBase::ensureIsValidAddress(
@@ -288,8 +286,7 @@ void AccessibleBrowseBoxTableBase::ensureIsValidAddress(
void AccessibleBrowseBoxTableBase::ensureIsValidIndex( sal_Int32 nChildIndex )
{
if( nChildIndex >= implGetChildCount() )
- throw lang::IndexOutOfBoundsException(
- OUString( "child index is invalid" ), *this );
+ throw lang::IndexOutOfBoundsException( "child index is invalid", *this );
}
diff --git a/accessibility/source/extended/AccessibleGridControlTableBase.cxx b/accessibility/source/extended/AccessibleGridControlTableBase.cxx
index acf58c0..a1d8aba 100644
--- a/accessibility/source/extended/AccessibleGridControlTableBase.cxx
+++ b/accessibility/source/extended/AccessibleGridControlTableBase.cxx
@@ -214,15 +214,13 @@ void AccessibleGridControlTableBase::implGetSelectedRows( Sequence< sal_Int32 >&
void AccessibleGridControlTableBase::ensureIsValidRow( sal_Int32 nRow )
{
if( nRow >= m_aTable.GetRowCount() )
- throw lang::IndexOutOfBoundsException(
- OUString( "row index is invalid" ), *this );
+ throw lang::IndexOutOfBoundsException( "row index is invalid", *this );
}
void AccessibleGridControlTableBase::ensureIsValidColumn( sal_Int32 nColumn )
{
if( nColumn >= m_aTable.GetColumnCount() )
- throw lang::IndexOutOfBoundsException(
- OUString( "column index is invalid" ), *this );
+ throw lang::IndexOutOfBoundsException( "column index is invalid", *this );
}
void AccessibleGridControlTableBase::ensureIsValidAddress(
@@ -235,8 +233,7 @@ void AccessibleGridControlTableBase::ensureIsValidAddress(
void AccessibleGridControlTableBase::ensureIsValidIndex( sal_Int32 nChildIndex )
{
if( nChildIndex >= m_aTable.GetRowCount()*m_aTable.GetColumnCount() )
- throw lang::IndexOutOfBoundsException(
- OUString( "child index is invalid" ), *this );
+ throw lang::IndexOutOfBoundsException( "child index is invalid", *this );
}
diff --git a/basegfx/source/tools/canvastools.cxx b/basegfx/source/tools/canvastools.cxx
index a4a47ca..ff5c495 100644
--- a/basegfx/source/tools/canvastools.cxx
+++ b/basegfx/source/tools/canvastools.cxx
@@ -302,9 +302,8 @@ namespace basegfx
if( !xLinePoly.is() )
{
throw lang::IllegalArgumentException(
- OUString(
- "basegfx::unotools::b2DPolyPolygonFromXPolyPolygon2D(): Invalid input"
- "poly-polygon, cannot retrieve vertex data"),
+ "basegfx::unotools::b2DPolyPolygonFromXPolyPolygon2D(): Invalid input"
+ "poly-polygon, cannot retrieve vertex data",
uno::Reference< uno::XInterface >(),
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 fb7bf08..9a050fb 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx
@@ -429,7 +429,7 @@ void unoInterfaceProxyDispatch(
default:
{
::com::sun::star::uno::RuntimeException aExc(
- OUString("illegal member type description!"),
+ "illegal member type description!",
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >() );
Type const & rExcType = cppu::UnoType<decltype(aExc)>::get();
diff --git a/canvas/source/vcl/canvas.cxx b/canvas/source/vcl/canvas.cxx
index cb65127..0a413a5 100644
--- a/canvas/source/vcl/canvas.cxx
+++ b/canvas/source/vcl/canvas.cxx
@@ -98,9 +98,7 @@ namespace vclcanvas
OutputDevice* pOutDev = reinterpret_cast<OutputDevice*>(nPtr);
if( !pOutDev )
- throw lang::NoSupportException(
- OUString( "Passed OutDev invalid!" ),
- nullptr);
+ throw lang::NoSupportException("Passed OutDev invalid!", nullptr);
OutDevProviderSharedPtr pOutdevProvider( new OutDevHolder(*pOutDev) );
diff --git a/chart2/source/controller/sidebar/Chart2PanelFactory.cxx b/chart2/source/controller/sidebar/Chart2PanelFactory.cxx
index 18f3275..d778ac4 100644
--- a/chart2/source/controller/sidebar/Chart2PanelFactory.cxx
+++ b/chart2/source/controller/sidebar/Chart2PanelFactory.cxx
@@ -113,7 +113,7 @@ Reference<css::ui::XUIElement> SAL_CALL ChartPanelFactory::createUIElement (
catch (const css::uno::Exception& e)
{
throw css::lang::WrappedTargetRuntimeException(
- OUString("ChartPanelFactory::createUIElement exception"),
+ "ChartPanelFactory::createUIElement exception",
nullptr, css::uno::makeAny(e));
}
diff --git a/comphelper/qa/unit/variadictemplates.cxx b/comphelper/qa/unit/variadictemplates.cxx
index 67e76bb..77114df 100644
--- a/comphelper/qa/unit/variadictemplates.cxx
+++ b/comphelper/qa/unit/variadictemplates.cxx
@@ -40,7 +40,7 @@ inline void extract(
{
if (nArg >= seq.getLength()) {
throw ::com::sun::star::lang::IllegalArgumentException(
- OUString( "No such argument available!"),
+ "No such argument available!",
xErrorContext, static_cast<sal_Int16>(nArg) );
}
if (! fromAny(seq[nArg], &v)) {
diff --git a/comphelper/source/misc/instancelocker.cxx b/comphelper/source/misc/instancelocker.cxx
index 97671ac..a67ae55 100644
--- a/comphelper/source/misc/instancelocker.cxx
+++ b/comphelper/source/misc/instancelocker.cxx
@@ -130,13 +130,13 @@ void SAL_CALL OInstanceLocker::initialize( const uno::Sequence< uno::Any >& aArg
sal_Int32 nLen = aArguments.getLength();
if ( nLen < 2 || nLen > 3 )
throw lang::IllegalArgumentException(
- OUString( "Wrong count of parameters!" ),
+ "Wrong count of parameters!",
uno::Reference< uno::XInterface >(),
0 );
if ( !( aArguments[0] >>= xInstance ) || !xInstance.is() )
throw lang::IllegalArgumentException(
- OUString( "Nonempty reference is expected as the first argument!" ),
+ "Nonempty reference is expected as the first argument!",
uno::Reference< uno::XInterface >(),
0 );
@@ -149,14 +149,14 @@ void SAL_CALL OInstanceLocker::initialize( const uno::Sequence< uno::Any >& aArg
)
{
throw lang::IllegalArgumentException(
- OUString("The correct modes set is expected as the second argument!"),
+ "The correct modes set is expected as the second argument!",
uno::Reference< uno::XInterface >(),
0 );
}
if ( nLen == 3 && !( aArguments[2] >>= xApproval ) )
throw lang::IllegalArgumentException(
- OUString( "If the third argument is provided, it must be XActionsApproval implementation!" ),
+ "If the third argument is provided, it must be XActionsApproval implementation!",
uno::Reference< uno::XInterface >(),
0 );
diff --git a/comphelper/source/misc/numberedcollection.cxx b/comphelper/source/misc/numberedcollection.cxx
index 1faf639..45afaa3 100644
--- a/comphelper/source/misc/numberedcollection.cxx
+++ b/comphelper/source/misc/numberedcollection.cxx
@@ -68,7 +68,7 @@ void NumberedCollection::setUntitledPrefix(const OUString& sPrefix)
::osl::ResettableMutexGuard aLock(m_aMutex);
if ( ! xComponent.is ())
- throw css::lang::IllegalArgumentException (OUString(ERRMSG_INVALID_COMPONENT_PARAM), m_xOwner.get(), 1);
+ throw css::lang::IllegalArgumentException(ERRMSG_INVALID_COMPONENT_PARAM, m_xOwner.get(), 1);
sal_IntPtr pComponent = reinterpret_cast<sal_IntPtr>( xComponent.get() );
TNumberedItemHash::const_iterator pIt = m_lComponents.find (pComponent);
@@ -140,7 +140,7 @@ void SAL_CALL NumberedCollection::releaseNumberForComponent(const css::uno::Refe
::osl::ResettableMutexGuard aLock(m_aMutex);
if ( ! xComponent.is ())
- throw css::lang::IllegalArgumentException (OUString(ERRMSG_INVALID_COMPONENT_PARAM), m_xOwner.get(), 1);
+ throw css::lang::IllegalArgumentException(ERRMSG_INVALID_COMPONENT_PARAM, m_xOwner.get(), 1);
sal_IntPtr pComponent = reinterpret_cast<sal_IntPtr>( xComponent.get() );
TNumberedItemHash::iterator pIt = m_lComponents.find (pComponent);
diff --git a/compilerplugins/clang/stringconstant.cxx b/compilerplugins/clang/stringconstant.cxx
index 50b2a60..8b00e84 100644
--- a/compilerplugins/clang/stringconstant.cxx
+++ b/compilerplugins/clang/stringconstant.cxx
@@ -1053,6 +1053,38 @@ bool StringConstant::VisitCXXConstructExpr(CXXConstructExpr const * expr) {
}
return true;
}
+
+
+ // Now check for calls to one of our exception classes where an unnecessary OUString
+ // constructor is used for the first parameter.
+ if (isInUnoIncludeFile(expr->getConstructor()->getCanonicalDecl())) {
+ return true;
+ }
+ if (!expr->getConstructor()->getParent()->getName().endswith("Exception")) {
+ return true;
+ }
+ if (expr->getNumArgs() == 0) {
+ return true;
+ }
+ MaterializeTemporaryExpr const * subExpr1 = dyn_cast<MaterializeTemporaryExpr>(expr->getArg(0));
+ if (!subExpr1) {
+ return true;
+ }
+ if (!loplugin::TypeCheck(subExpr1->getType()).Class("OUString").Namespace("rtl").GlobalNamespace()) {
+ return true;
+ }
+ ImplicitCastExpr const * subExpr2 = dyn_cast<ImplicitCastExpr>(subExpr1->GetTemporaryExpr());
+ if (!subExpr2) {
+ return true;
+ }
+ CXXFunctionalCastExpr const * subExpr3 = dyn_cast<CXXFunctionalCastExpr>(subExpr2->getSubExpr());
+ if (!subExpr3) {
+ return true;
+ }
+ report(DiagnosticsEngine::Warning,
+ "no need to use an explicit OUString constructor here",
+ subExpr3->getLocStart())
+ << subExpr3->getSourceRange();
return true;
}
diff --git a/cppuhelper/source/factory.cxx b/cppuhelper/source/factory.cxx
index 65f8553..4bf015d 100644
--- a/cppuhelper/source/factory.cxx
+++ b/cppuhelper/source/factory.cxx
@@ -202,7 +202,7 @@ Reference< XInterface > OSingleFactoryHelper::createInstanceWithArgumentsAndCont
xComp->dispose();
throw lang::IllegalArgumentException(
- OUString("cannot pass arguments to component => no XInitialization implemented!"),
+ "cannot pass arguments to component => no XInitialization implemented!",
Reference< XInterface >(), 0 );
}
}
diff --git a/dbaccess/source/ext/macromigration/macromigrationwizard.cxx b/dbaccess/source/ext/macromigration/macromigrationwizard.cxx
index d20e624..96201b2 100644
--- a/dbaccess/source/ext/macromigration/macromigrationwizard.cxx
+++ b/dbaccess/source/ext/macromigration/macromigrationwizard.cxx
@@ -157,7 +157,7 @@ namespace dbmm
if ( _rArguments.getLength() != 1 )
throw IllegalArgumentException(
- OUString(MacroMigrationResId(STR_INVALID_NUMBER_ARGS)),
+ MacroMigrationResId(STR_INVALID_NUMBER_ARGS),
*this,
1
);
@@ -165,7 +165,7 @@ namespace dbmm
m_xDocument.set( _rArguments[0], UNO_QUERY );
if ( !m_xDocument.is() )
throw IllegalArgumentException(
- OUString(MacroMigrationResId(STR_NO_DATABASE)),
+ MacroMigrationResId(STR_NO_DATABASE),
*this,
1
);
@@ -173,7 +173,7 @@ namespace dbmm
Reference< XStorable > xDocStor( m_xDocument, UNO_QUERY_THROW );
if ( xDocStor->isReadonly() )
throw IllegalArgumentException(
- OUString(MacroMigrationResId(STR_NOT_READONLY)),
+ MacroMigrationResId(STR_NOT_READONLY),
*this,
1
);
diff --git a/dbaccess/source/sdbtools/connection/objectnames.cxx b/dbaccess/source/sdbtools/connection/objectnames.cxx
index 921c8a1..d423cfc 100644
--- a/dbaccess/source/sdbtools/connection/objectnames.cxx
+++ b/dbaccess/source/sdbtools/connection/objectnames.cxx
@@ -288,7 +288,7 @@ namespace sdbtools
&& ( _nCommandType != CommandType::QUERY )
)
throw IllegalArgumentException(
- OUString( SdbtRes( STR_INVALID_COMMAND_TYPE ) ),
+ SdbtRes( STR_INVALID_COMMAND_TYPE ),
nullptr,
0
);
@@ -311,7 +311,7 @@ namespace sdbtools
catch( const Exception& )
{
throw IllegalArgumentException(
- OUString( SdbtRes( STR_CONN_WITHOUT_QUERIES_OR_TABLES ) ),
+ SdbtRes( STR_CONN_WITHOUT_QUERIES_OR_TABLES ),
nullptr,
0
);
diff --git a/dbaccess/source/sdbtools/connection/tablename.cxx b/dbaccess/source/sdbtools/connection/tablename.cxx
index 08ea5ad..e51e997 100644
--- a/dbaccess/source/sdbtools/connection/tablename.cxx
+++ b/dbaccess/source/sdbtools/connection/tablename.cxx
@@ -152,7 +152,7 @@ namespace sdbtools
|| !xPSI->hasPropertyByName( PROPERTY_NAME )
)
throw IllegalArgumentException(
- OUString( SdbtRes( STR_NO_TABLE_OBJECT ) ),
+ SdbtRes( STR_NO_TABLE_OBJECT ),
*this,
0
);
@@ -199,7 +199,7 @@ namespace sdbtools
found = true;
if ( !found )
throw IllegalArgumentException(
- OUString( SdbtRes( STR_INVALID_COMPOSITION_TYPE ) ),
+ SdbtRes( STR_INVALID_COMPOSITION_TYPE ),
nullptr,
0
);
diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx
index e3533dd..8496e7d 100644
--- a/dbaccess/source/ui/app/AppController.cxx
+++ b/dbaccess/source/ui/app/AppController.cxx
@@ -2782,7 +2782,7 @@ sal_Bool SAL_CALL OApplicationController::select( const Any& _aSelection )
case DatabaseObjectContainer::REPORTS:
if ( eSelectedCategory != E_NONE )
throw IllegalArgumentException(
- OUString(ModuleRes(RID_STR_NO_DIFF_CAT)),
+ ModuleRes(RID_STR_NO_DIFF_CAT),
*this, sal_Int16( pObject - aSelectedObjects.getConstArray() ) );
eSelectedCategory =
( pObject->Type == DatabaseObjectContainer::TABLES ) ? E_TABLE
diff --git a/dbaccess/source/ui/app/AppControllerGen.cxx b/dbaccess/source/ui/app/AppControllerGen.cxx
index c4f7fc4..027b7eb 100644
--- a/dbaccess/source/ui/app/AppControllerGen.cxx
+++ b/dbaccess/source/ui/app/AppControllerGen.cxx
@@ -119,7 +119,7 @@ void OApplicationController::convertToView(const OUString& _sName)
::dbtools::composeTableName( xMeta, sCatalog, sSchema, sName, false, ::dbtools::EComposeRule::InTableDefinitions ) );
Reference<XPropertySet> xView = ::dbaui::createView(sNewName,xConnection,xSourceObject);
if ( !xView.is() )
- throw SQLException(OUString(ModuleRes(STR_NO_TABLE_FORMAT_INSIDE)),*this,OUString( "S1000" ) ,0,Any());
+ throw SQLException(ModuleRes(STR_NO_TABLE_FORMAT_INSIDE),*this,OUString( "S1000" ) ,0,Any());
getContainer()->elementAdded(E_TABLE,sNewName,makeAny(xView));
}
}
diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx
index c328f1c..432778a 100644
--- a/dbaccess/source/ui/querydesign/querycontroller.cxx
+++ b/dbaccess/source/ui/querydesign/querycontroller.cxx
@@ -618,7 +618,7 @@ void OQueryController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >&
if ( m_pSqlIterator->getStatementType() != OSQLStatementType::Select || rTabs.begin() == rTabs.end() )
{
aError = SQLException(
- OUString( ModuleRes( STR_QRY_NOSELECT ) ),
+ ModuleRes( STR_QRY_NOSELECT ),
nullptr,
"S1000",
1000,
@@ -641,7 +641,7 @@ void OQueryController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >&
else
{
aError = SQLException(
- OUString( ModuleRes( STR_QRY_SYNTAX ) ),
+ ModuleRes( STR_QRY_SYNTAX ),
nullptr,
"S1000",
1000,
@@ -981,7 +981,7 @@ void OQueryController::impl_initialize()
if ( !( aView >>= m_xAlterView ) )
{
throw IllegalArgumentException(
- OUString( ModuleRes( STR_NO_ALTER_VIEW_SUPPORT ) ),
+ ModuleRes( STR_NO_ALTER_VIEW_SUPPORT ),
*this,
1
);
diff --git a/dbaccess/source/ui/uno/copytablewizard.cxx b/dbaccess/source/ui/uno/copytablewizard.cxx
index d61bda1..b68b0a6 100644
--- a/dbaccess/source/ui/uno/copytablewizard.cxx
+++ b/dbaccess/source/ui/uno/copytablewizard.cxx
@@ -459,7 +459,7 @@ void SAL_CALL CopyTableWizard::setOperation( ::sal_Int16 _operation )
&& !OCopyTableWizard::supportsViews( m_xDestConnection )
)
throw IllegalArgumentException(
- OUString( ModuleRes( STR_CTW_NO_VIEWS_SUPPORT ) ),
+ ModuleRes( STR_CTW_NO_VIEWS_SUPPORT ),
*this,
1
);
@@ -491,7 +491,7 @@ void SAL_CALL CopyTableWizard::setCreatePrimaryKey( const Optional< OUString >&
if ( _newPrimaryKey.IsPresent && !OCopyTableWizard::supportsPrimaryKey( m_xDestConnection ) )
throw IllegalArgumentException(
- OUString( ModuleRes( STR_CTW_NO_PRIMARY_KEY_SUPPORT ) ),
+ ModuleRes( STR_CTW_NO_PRIMARY_KEY_SUPPORT ),
*this,
1
);
@@ -656,7 +656,7 @@ Reference< XPropertySet > CopyTableWizard::impl_ensureDataAccessDescriptor_throw
if ( !bIsValid )
{
throw IllegalArgumentException(
- OUString( ModuleRes( STR_CTW_INVALID_DATA_ACCESS_DESCRIPTOR ) ),
+ ModuleRes( STR_CTW_INVALID_DATA_ACCESS_DESCRIPTOR ),
*const_cast< CopyTableWizard* >( this ),
_nArgPos + 1
);
@@ -748,7 +748,7 @@ void CopyTableWizard::impl_checkForUnsupportedSettings_throw( const Reference< X
break;
default:
throw IllegalArgumentException(
- OUString( ModuleRes( STR_CTW_ONLY_TABLES_AND_QUERIES_SUPPORT ) ),
+ ModuleRes( STR_CTW_ONLY_TABLES_AND_QUERIES_SUPPORT ),
*const_cast< CopyTableWizard* >( this ),
1
);
@@ -767,7 +767,7 @@ void CopyTableWizard::impl_checkForUnsupportedSettings_throw( const Reference< X
if ( _out_rCommandType == CommandType::QUERY )
// we cannot copy a query if the connection cannot provide it ...
throw IllegalArgumentException(
- OUString(ModuleRes( STR_CTW_ERROR_NO_QUERY )),
+ ModuleRes( STR_CTW_ERROR_NO_QUERY ),
*const_cast< CopyTableWizard* >( this ),
1
);
@@ -1457,7 +1457,7 @@ void SAL_CALL CopyTableWizard::initialize( const Sequence< Any >& _rArguments )
sal_Int32 nArgCount( _rArguments.getLength() );
if ( ( nArgCount != 2 ) && ( nArgCount != 3 ) )
throw IllegalArgumentException(
- OUString( ModuleRes( STR_CTW_ILLEGAL_PARAMETER_COUNT ) ),
+ ModuleRes( STR_CTW_ILLEGAL_PARAMETER_COUNT ),
*this,
1
);
@@ -1468,7 +1468,7 @@ void SAL_CALL CopyTableWizard::initialize( const Sequence< Any >& _rArguments )
{ // ->createWithInteractionHandler
if ( !( _rArguments[2] >>= m_xInteractionHandler ) )
throw IllegalArgumentException(
- OUString(ModuleRes( STR_CTW_ERROR_INVALID_INTERACTIONHANDLER )),
+ ModuleRes( STR_CTW_ERROR_INVALID_INTERACTIONHANDLER ),
*this,
3
);
@@ -1493,7 +1493,7 @@ void SAL_CALL CopyTableWizard::initialize( const Sequence< Any >& _rArguments )
catch( const Exception& )
{
throw WrappedTargetException(
- OUString( ModuleRes( STR_CTW_ERROR_DURING_INITIALIZATION ) ),
+ ModuleRes( STR_CTW_ERROR_DURING_INITIALIZATION ),
*this,
::cppu::getCaughtException()
);
diff --git a/extensions/source/config/ldap/ldapuserprofilebe.cxx b/extensions/source/config/ldap/ldapuserprofilebe.cxx
index f936358..8b738b8 100644
--- a/extensions/source/config/ldap/ldapuserprofilebe.cxx
+++ b/extensions/source/config/ldap/ldapuserprofilebe.cxx
@@ -62,7 +62,7 @@ LdapUserProfileBe::LdapUserProfileBe( const uno::Reference<uno::XComponentContex
xContext, &aDefinition, &loggedOnUser))
{
throw css::uno::RuntimeException(
- OUString("LdapUserProfileBe- LDAP not configured"),
+ "LdapUserProfileBe- LDAP not configured",
nullptr);
}
@@ -170,7 +170,7 @@ void LdapUserProfileBe::setPropertyValue(
OUString const &, css::uno::Any const &)
{
throw css::lang::IllegalArgumentException(
- OUString("setPropertyValue not supported"),
+ "setPropertyValue not supported",
static_cast< cppu::OWeakObject * >(this), -1);
}
diff --git a/filter/source/xsltfilter/XSLTFilter.cxx b/filter/source/xsltfilter/XSLTFilter.cxx
index 1adab3e..fcc6831 100644
--- a/filter/source/xsltfilter/XSLTFilter.cxx
+++ b/filter/source/xsltfilter/XSLTFilter.cxx
@@ -369,7 +369,7 @@ namespace XSLT
if (xInterActionHandler.is()) {
Sequence<Any> excArgs(0);
css::ucb::InteractiveAugmentedIOException exc(
- OUString("Timeout!"),
+ "Timeout!",
static_cast< OWeakObject * >( this ),
InteractionClassification_ERROR,
css::ucb::IOErrorCode_GENERAL,
diff --git a/forms/source/xforms/binding.cxx b/forms/source/xforms/binding.cxx
index b2ffdeb..4044fcb 100644
--- a/forms/source/xforms/binding.cxx
+++ b/forms/source/xforms/binding.cxx
@@ -93,7 +93,7 @@ using com::sun::star::xml::dom::events::XEventTarget;
using com::sun::star::xsd::XDataType;
-#define EXCEPT(msg) OUString(msg),static_cast<XValueBinding*>(this)
+#define EXCEPT(msg) msg,static_cast<XValueBinding*>(this)
#define HANDLE_BindingID 0
#define HANDLE_BindingExpression 1
diff --git a/framework/source/accelerators/acceleratorconfiguration.cxx b/framework/source/accelerators/acceleratorconfiguration.cxx
index a42c55f..1b44cc9 100644
--- a/framework/source/accelerators/acceleratorconfiguration.cxx
+++ b/framework/source/accelerators/acceleratorconfiguration.cxx
@@ -115,15 +115,15 @@ void SAL_CALL XMLBasedAcceleratorConfiguration::setKeyEvent(const css::awt::KeyE
(aKeyEvent.Modifiers == 0)
)
throw css::lang::IllegalArgumentException(
- OUString("Such key event seems not to be supported by any operating system."),
- static_cast< ::cppu::OWeakObject* >(this),
- 0);
+ "Such key event seems not to be supported by any operating system.",
+ static_cast< ::cppu::OWeakObject* >(this),
+ 0);
if (sCommand.isEmpty())
throw css::lang::IllegalArgumentException(
- OUString("Empty command strings are not allowed here."),
- static_cast< ::cppu::OWeakObject* >(this),
- 1);
+ "Empty command strings are not allowed here.",
+ static_cast< ::cppu::OWeakObject* >(this),
+ 1);
SolarMutexGuard g;
AcceleratorCache& rCache = impl_getCFG(true); // sal_True => force getting of a writeable cache!
@@ -145,7 +145,7 @@ css::uno::Sequence< css::awt::KeyEvent > SAL_CALL XMLBasedAcceleratorConfigurati
{
if (sCommand.isEmpty())
throw css::lang::IllegalArgumentException(
- OUString("Empty command strings are not allowed here."),
+ "Empty command strings are not allowed here.",
static_cast< ::cppu::OWeakObject* >(this),
1);
@@ -174,7 +174,7 @@ css::uno::Sequence< css::uno::Any > SAL_CALL XMLBasedAcceleratorConfiguration::g
const OUString& rCommand = lCommandList[i];
if (rCommand.isEmpty())
throw css::lang::IllegalArgumentException(
- OUString("Empty command strings are not allowed here."),
+ "Empty command strings are not allowed here.",
static_cast< ::cppu::OWeakObject* >(this),
(sal_Int16)i);
@@ -196,7 +196,7 @@ void SAL_CALL XMLBasedAcceleratorConfiguration::removeCommandFromAllKeyEvents(co
{
if (sCommand.isEmpty())
throw css::lang::IllegalArgumentException(
- OUString("Empty command strings are not allowed here."),
+ "Empty command strings are not allowed here.",
static_cast< ::cppu::OWeakObject* >(this),
0);
@@ -204,7 +204,7 @@ void SAL_CALL XMLBasedAcceleratorConfiguration::removeCommandFromAllKeyEvents(co
AcceleratorCache& rCache = impl_getCFG(true); // sal_True => force getting of a writeable cache!
if (!rCache.hasCommand(sCommand))
throw css::container::NoSuchElementException(
- OUString("Command does not exists inside this container."),
+ "Command does not exists inside this container.",
static_cast< ::cppu::OWeakObject* >(this));
rCache.removeCommand(sCommand);
}
@@ -229,8 +229,8 @@ void SAL_CALL XMLBasedAcceleratorConfiguration::reload()
xIn = xStream->getInputStream();
if (!xIn.is())
throw css::io::IOException(
- OUString("Could not open accelerator configuration for reading."),
- static_cast< ::cppu::OWeakObject* >(this));
+ "Could not open accelerator configuration for reading.",
+ static_cast< ::cppu::OWeakObject* >(this));
// impl_ts_load() does not clear the cache
{
@@ -265,8 +265,8 @@ void SAL_CALL XMLBasedAcceleratorConfiguration::store()
if (!xOut.is())
throw css::io::IOException(
- OUString("Could not open accelerator configuration for saving."),
- static_cast< ::cppu::OWeakObject* >(this));
+ "Could not open accelerator configuration for saving.",
+ static_cast< ::cppu::OWeakObject* >(this));
impl_ts_save(xOut);
@@ -289,7 +289,7 @@ void SAL_CALL XMLBasedAcceleratorConfiguration::storeToStorage(const css::uno::R
if (!xOut.is())
throw css::io::IOException(
- OUString("Could not open accelerator configuration for saving."),
+ "Could not open accelerator configuration for saving.",
static_cast< ::cppu::OWeakObject* >(this));
impl_ts_save(xOut);
@@ -549,15 +549,15 @@ void SAL_CALL XCUBasedAcceleratorConfiguration::setKeyEvent(const css::awt::KeyE
(aKeyEvent.Modifiers == 0)
)
throw css::lang::IllegalArgumentException(
- OUString("Such key event seems not to be supported by any operating system."),
+ "Such key event seems not to be supported by any operating system.",
static_cast< ::cppu::OWeakObject* >(this),
0);
if (sCommand.isEmpty())
throw css::lang::IllegalArgumentException(
- OUString("Empty command strings are not allowed here."),
- static_cast< ::cppu::OWeakObject* >(this),
- 1);
+ "Empty command strings are not allowed here.",
+ static_cast< ::cppu::OWeakObject* >(this),
+ 1);
SolarMutexGuard g;
@@ -658,7 +658,7 @@ css::uno::Sequence< css::awt::KeyEvent > SAL_CALL XCUBasedAcceleratorConfigurati
{
if (sCommand.isEmpty())
throw css::lang::IllegalArgumentException(
- OUString("Empty command strings are not allowed here."),
+ "Empty command strings are not allowed here.",
static_cast< ::cppu::OWeakObject* >(this),
1);
@@ -714,7 +714,7 @@ css::uno::Sequence< css::uno::Any > SAL_CALL XCUBasedAcceleratorConfiguration::g
const OUString& rCommand = lCommandList[i];
if (rCommand.isEmpty())
throw css::lang::IllegalArgumentException(
- OUString("Empty command strings are not allowed here."),
+ "Empty command strings are not allowed here.",
static_cast< ::cppu::OWeakObject* >(this),
(sal_Int16)i);
@@ -740,7 +740,7 @@ void SAL_CALL XCUBasedAcceleratorConfiguration::removeCommandFromAllKeyEvents(co
{
if (sCommand.isEmpty())
throw css::lang::IllegalArgumentException(
- OUString("Empty command strings are not allowed here."),
+ "Empty command strings are not allowed here.",
static_cast< ::cppu::OWeakObject* >(this),
0);
@@ -751,7 +751,7 @@ void SAL_CALL XCUBasedAcceleratorConfiguration::removeCommandFromAllKeyEvents(co
if (!rPrimaryCache.hasCommand(sCommand) && !rSecondaryCache.hasCommand(sCommand))
throw css::container::NoSuchElementException(
- OUString("Command does not exists inside this container."),
+ "Command does not exists inside this container.",
static_cast< ::cppu::OWeakObject* >(this));
if (rPrimaryCache.hasCommand(sCommand))
@@ -833,8 +833,8 @@ void SAL_CALL XCUBasedAcceleratorConfiguration::storeToStorage(const css::uno::R
xOut = xStream->getOutputStream();
if (!xOut.is())
throw css::io::IOException(
- OUString("Could not open accelerator configuration for saving."),
- static_cast< ::cppu::OWeakObject* >(this));
+ "Could not open accelerator configuration for saving.",
+ static_cast< ::cppu::OWeakObject* >(this));
// the original m_aCache has been split into primary cache and secondary cache...
// we should merge them before storing to storage
diff --git a/framework/source/accelerators/moduleacceleratorconfiguration.cxx b/framework/source/accelerators/moduleacceleratorconfiguration.cxx
index 86d9c53..f6cfa4d 100644
--- a/framework/source/accelerators/moduleacceleratorconfiguration.cxx
+++ b/framework/source/accelerators/moduleacceleratorconfiguration.cxx
@@ -114,7 +114,7 @@ ModuleAcceleratorConfiguration::ModuleAcceleratorConfiguration(
if (m_sModule.isEmpty())
throw css::uno::RuntimeException(
- OUString("The module dependent accelerator configuration service was initialized with an empty module identifier!"),
+ "The module dependent accelerator configuration service was initialized with an empty module identifier!",
static_cast< ::cppu::OWeakObject* >(this));
}
diff --git a/framework/source/fwe/helper/undomanagerhelper.cxx b/framework/source/fwe/helper/undomanagerhelper.cxx
index 5fb5f66..106c8df 100644
--- a/framework/source/fwe/helper/undomanagerhelper.cxx
+++ b/framework/source/fwe/helper/undomanagerhelper.cxx
@@ -163,7 +163,7 @@ namespace framework
void cancel( const Reference< XInterface >& i_context )
{
m_caughtException <<= RuntimeException(
- OUString( "Concurrency error: an earlier operation on the stack failed." ),
+ "Concurrency error: an earlier operation on the stack failed.",
i_context
);
m_finishCondition.set();
diff --git a/framework/source/fwi/uielement/itemcontainer.cxx b/framework/source/fwi/uielement/itemcontainer.cxx
index 8929470..531febd 100644
--- a/framework/source/fwi/uielement/itemcontainer.cxx
+++ b/framework/source/fwi/uielement/itemcontainer.cxx
@@ -188,7 +188,7 @@ void SAL_CALL ItemContainer::insertByIndex( sal_Int32 Index, const Any& aItem )
throw IndexOutOfBoundsException( OUString(), static_cast<OWeakObject *>(this) );
}
else
- throw IllegalArgumentException( OUString( WRONG_TYPE_EXCEPTION ),
+ throw IllegalArgumentException( WRONG_TYPE_EXCEPTION,
static_cast<OWeakObject *>(this), 2 );
}
@@ -215,7 +215,7 @@ void SAL_CALL ItemContainer::replaceByIndex( sal_Int32 Index, const Any& aItem )
throw IndexOutOfBoundsException( OUString(), static_cast<OWeakObject *>(this) );
}
else
- throw IllegalArgumentException( OUString( WRONG_TYPE_EXCEPTION ),
+ throw IllegalArgumentException( WRONG_TYPE_EXCEPTION,
static_cast<OWeakObject *>(this), 2 );
}
diff --git a/framework/source/helper/vclstatusindicator.cxx b/framework/source/helper/vclstatusindicator.cxx
index 5a83fe6..29401a3 100644
--- a/framework/source/helper/vclstatusindicator.cxx
+++ b/framework/source/helper/vclstatusindicator.cxx
@@ -32,7 +32,7 @@ VCLStatusIndicator::VCLStatusIndicator(const css::uno::Reference< css::awt::XWin
{
if (!m_xParentWindow.is())
throw css::uno::RuntimeException(
- OUString("Can't work without a parent window!"),
+ "Can't work without a parent window!",
static_cast< css::task::XStatusIndicator* >(this));
}
diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx
index a29ef9a..4739bdc 100644
--- a/framework/source/services/autorecovery.cxx
+++ b/framework/source/services/autorecovery.cxx
@@ -1160,7 +1160,7 @@ void CacheLockGuard::lock(bool bLockForAddRemoveVectorItems)
{
OSL_FAIL("Re-entrance problem detected. Using of an stl structure in combination with iteration, adding, removing of elements etcpp.");
throw css::uno::RuntimeException(
- OUString("Re-entrance problem detected. Using of an stl structure in combination with iteration, adding, removing of elements etcpp."),
+ "Re-entrance problem detected. Using of an stl structure in combination with iteration, adding, removing of elements etcpp.",
m_xOwner);
}
@@ -1184,7 +1184,7 @@ void CacheLockGuard::unlock()
{
OSL_FAIL("Wrong using of member m_nDocCacheLock detected. A ref counted value shouldn't reach values <0 .-)");
throw css::uno::RuntimeException(
- OUString("Wrong using of member m_nDocCacheLock detected. A ref counted value shouldn't reach values <0 .-)"),
+ "Wrong using of member m_nDocCacheLock detected. A ref counted value shouldn't reach values <0 .-)",
m_xOwner);
}
} /* SAFE */
diff --git a/framework/source/services/modulemanager.cxx b/framework/source/services/modulemanager.cxx
index b4a602f..6819ee8 100644
--- a/framework/source/services/modulemanager.cxx
+++ b/framework/source/services/modulemanager.cxx
@@ -162,7 +162,7 @@ OUString SAL_CALL ModuleManager::identify(const css::uno::Reference< css::uno::X
)
{
throw css::lang::IllegalArgumentException(
- OUString("Given module is not a frame nor a window, controller or model."),
+ "Given module is not a frame nor a window, controller or model.",
static_cast< ::cppu::OWeakObject* >(this),
1);
}
@@ -190,7 +190,7 @@ OUString SAL_CALL ModuleManager::identify(const css::uno::Reference< css::uno::X
if (sModule.isEmpty())
throw css::frame::UnknownModuleException(
- OUString("Can not find suitable module for the given component."),
+ "Can not find suitable module for the given component.",
static_cast< ::cppu::OWeakObject* >(this));
return sModule;
@@ -203,7 +203,7 @@ void SAL_CALL ModuleManager::replaceByName(const OUString& sName ,
if (lProps.empty() )
{
throw css::lang::IllegalArgumentException(
- OUString("No properties given to replace part of module."),
+ "No properties given to replace part of module.",
static_cast< cppu::OWeakObject * >(this),
2);
}
@@ -224,7 +224,7 @@ void SAL_CALL ModuleManager::replaceByName(const OUString& sName ,
if (!xModule.is())
{
throw css::uno::RuntimeException(
- OUString("Was not able to get write access to the requested module entry inside configuration."),
+ "Was not able to get write access to the requested module entry inside configuration.",
static_cast< cppu::OWeakObject * >(this));
}
@@ -252,7 +252,7 @@ css::uno::Any SAL_CALL ModuleManager::getByName(const OUString& sName)
if (!xModule.is())
{
throw css::uno::RuntimeException(
- OUString("Was not able to get write access to the requested module entry inside configuration."),
+ "Was not able to get write access to the requested module entry inside configuration.",
static_cast< cppu::OWeakObject * >(this));
}
diff --git a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
index dd6cf09..1c04c8a 100644
--- a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
+++ b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
@@ -1054,7 +1054,7 @@ void SAL_CALL ModuleUIConfigurationManager::reset()
{
css::uno::Any a(e);
throw css::lang::WrappedTargetRuntimeException(
- OUString("ModuleUIConfigurationManager::reset exception"),
+ "ModuleUIConfigurationManager::reset exception",
css::uno::Reference<css::uno::XInterface>(*this), a);
}
}
diff --git a/oox/source/docprop/docprophandler.cxx b/oox/source/docprop/docprophandler.cxx
index 2c28d8d..24e45ce 100644
--- a/oox/source/docprop/docprophandler.cxx
+++ b/oox/source/docprop/docprophandler.cxx
@@ -665,7 +665,7 @@ void SAL_CALL OOXMLDocPropHandler::characters( const OUString& aChars )
catch( uno::Exception& e )
{
throw xml::sax::SAXException(
- OUString("Error while setting document property!"),
+ "Error while setting document property!",
uno::Reference< uno::XInterface >(),
uno::makeAny( e ) );
}
diff --git a/package/source/zippackage/ZipPackage.cxx b/package/source/zippackage/ZipPackage.cxx
index a285078..9a43267 100644
--- a/package/source/zippackage/ZipPackage.cxx
+++ b/package/source/zippackage/ZipPackage.cxx
@@ -941,9 +941,7 @@ sal_Bool SAL_CALL ZipPackage::hasByHierarchicalName( const OUString& aName )
catch (const uno::Exception&)
{
uno::Any e(::cppu::getCaughtException());
- throw lang::WrappedTargetRuntimeException(
- OUString("ZipPackage::hasByHierarchicalName"),
- nullptr, e);
+ throw lang::WrappedTargetRuntimeException("ZipPackage::hasByHierarchicalName", nullptr, e);
}
return false;
}
diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx
index 84fcc9f..614f7e3 100644
--- a/reportdesign/source/core/api/ReportDefinition.cxx
+++ b/reportdesign/source/core/api/ReportDefinition.cxx
@@ -1616,7 +1616,7 @@ void SAL_CALL OReportDefinition::load( const uno::Sequence< beans::PropertyValue
aStorageSource <<= sURL;
else
throw lang::IllegalArgumentException(
- OUString( "No input source (URL or InputStream) found." ),
+ "No input source (URL or InputStream) found.",
// TODO: resource
*this,
1
@@ -1652,7 +1652,7 @@ void SAL_CALL OReportDefinition::load( const uno::Sequence< beans::PropertyValue
{
if ( i == nLastOpenMode )
throw lang::WrappedTargetException(
- OUString( "An error occurred while creating the document storage." ),
+ "An error occurred while creating the document storage.",
// TODO: resource
*this,
::cppu::getCaughtException()
diff --git a/reportdesign/source/ui/inspection/GeometryHandler.cxx b/reportdesign/source/ui/inspection/GeometryHandler.cxx
index 816d77c..64688e5 100644
--- a/reportdesign/source/ui/inspection/GeometryHandler.cxx
+++ b/reportdesign/source/ui/inspection/GeometryHandler.cxx
@@ -1645,7 +1645,7 @@ void GeometryHandler::checkPosAndSize( const awt::Point& _aNewPos,
::Point aPos(VCLPoint(_aNewPos));
if ( aPos.X() < 0 || aPos.Y() < 0 ) // TODO: have to check size with pos aka || (aPos.X() + aAwtSize.Width) > m_xSection->getReportDefinition()->
- throw beans::PropertyVetoException(OUString(ModuleRes(RID_STR_ILLEGAL_POSITION)),xSourceReportComponent);
+ throw beans::PropertyVetoException(ModuleRes(RID_STR_ILLEGAL_POSITION),xSourceReportComponent);
::Rectangle aSourceRect(aPos,VCLSize(_aSize));
@@ -1658,7 +1658,7 @@ void GeometryHandler::checkPosAndSize( const awt::Point& _aNewPos,
const ::Rectangle aBoundRect(VCLPoint(xReportComponent->getPosition()),VCLSize(xReportComponent->getSize()));
const ::Rectangle aRect = aSourceRect.GetIntersection(aBoundRect);
if ( !aRect.IsEmpty() && (aRect.Left() != aRect.Right() && aRect.Top() != aRect.Bottom() ) )
- throw beans::PropertyVetoException(OUString(ModuleRes( RID_STR_OVERLAP_OTHER_CONTROL)),xSourceReportComponent);
+ throw beans::PropertyVetoException(ModuleRes( RID_STR_OVERLAP_OTHER_CONTROL),xSourceReportComponent);
}
}
}
diff --git a/sc/source/ui/sidebar/ScPanelFactory.cxx b/sc/source/ui/sidebar/ScPanelFactory.cxx
index 4052d5e..f16ca5f 100644
--- a/sc/source/ui/sidebar/ScPanelFactory.cxx
+++ b/sc/source/ui/sidebar/ScPanelFactory.cxx
@@ -112,7 +112,7 @@ Reference<ui::XUIElement> SAL_CALL ScPanelFactory::createUIElement (
catch (const uno::Exception& e)
{
throw lang::WrappedTargetRuntimeException(
- OUString("ScPanelFactory::createUIElement exception"),
+ "ScPanelFactory::createUIElement exception",
nullptr, uno::makeAny(e));
}
diff --git a/sc/source/ui/unoobj/confuno.cxx b/sc/source/ui/unoobj/confuno.cxx
index 73ae1dc..796494e 100644
--- a/sc/source/ui/unoobj/confuno.cxx
+++ b/sc/source/ui/unoobj/confuno.cxx
@@ -297,7 +297,7 @@ void SAL_CALL ScDocumentConfiguration::setPropertyValue(
uno::Sequence< beans::PropertyValue > aInfo;
if ( !( aValue >>= aInfo ) )
throw lang::IllegalArgumentException(
- OUString( "Value of type Sequence<PropertyValue> expected!" ),
+ "Value of type Sequence<PropertyValue> expected!",
uno::Reference< uno::XInterface >(),
2 );
diff --git a/scripting/source/basprov/basscript.cxx b/scripting/source/basprov/basscript.cxx
index dd098d4..8cdbbb5 100644
--- a/scripting/source/basprov/basscript.cxx
+++ b/scripting/source/basprov/basscript.cxx
@@ -187,12 +187,11 @@ namespace basprov
if ( nParamsCount < nSbxCount - nSbxOptional )
{
throw provider::ScriptFrameworkErrorException(
- OUString(
- "wrong number of parameters!" ),
+ "wrong number of parameters!",
Reference< XInterface >(),
m_funcName,
OUString( "Basic" ),
- provider::ScriptFrameworkErrorType::NO_SUCH_SCRIPT );
+ provider::ScriptFrameworkErrorType::NO_SUCH_SCRIPT );
}
}
diff --git a/scripting/source/provider/MasterScriptProvider.cxx b/scripting/source/provider/MasterScriptProvider.cxx
index 9eaca17..941cd07 100644
--- a/scripting/source/provider/MasterScriptProvider.cxx
+++ b/scripting/source/provider/MasterScriptProvider.cxx
@@ -141,8 +141,7 @@ void SAL_CALL MasterScriptProvider::initialize( const Sequence < Any >& args )
if ( !xScripts.is() )
{
throw lang::IllegalArgumentException(
- OUString( "The given document does not support embedding scripts into it, and cannot be associated with such a document."
- ),
+ "The given document does not support embedding scripts into it, and cannot be associated with such a document.",
*this,
1
);
diff --git a/scripting/source/provider/URIHelper.cxx b/scripting/source/provider/URIHelper.cxx
index 233f002..5fcab93 100644
--- a/scripting/source/provider/URIHelper.cxx
+++ b/scripting/source/provider/URIHelper.cxx
@@ -218,8 +218,8 @@ ScriptingFrameworkURIHelper::getStorageURI(const OUString& rScriptURI)
catch ( uno::Exception& )
{
throw lang::IllegalArgumentException(
- OUString("Script URI not valid"),
- uno::Reference< uno::XInterface >(), 1 );
+ "Script URI not valid",
+ uno::Reference< uno::XInterface >(), 1 );
}
OUStringBuffer buf(120);
diff --git a/sd/source/ui/unoidl/UnoDocumentSettings.cxx b/sd/source/ui/unoidl/UnoDocumentSettings.cxx
index 8fea77d..3326132 100644
--- a/sd/source/ui/unoidl/UnoDocumentSettings.cxx
+++ b/sd/source/ui/unoidl/UnoDocumentSettings.cxx
@@ -902,7 +902,7 @@ DocumentSettings::_setPropertyValues(const PropertyMapEntry** ppEntries,
uno::Sequence< beans::PropertyValue > aInfo;
if ( !( *pValues >>= aInfo ) )
throw lang::IllegalArgumentException(
- OUString( "Value of type Sequence<PropertyValue> expected!" ),
+ "Value of type Sequence<PropertyValue> expected!",
uno::Reference< uno::XInterface >(),
2 );
diff --git a/sdext/source/presenter/PresenterButton.cxx b/sdext/source/presenter/PresenterButton.cxx
index baf81e5..4487e70 100644
--- a/sdext/source/presenter/PresenterButton.cxx
+++ b/sdext/source/presenter/PresenterButton.cxx
@@ -495,7 +495,7 @@ void PresenterButton::ThrowIfDisposed() const
if (rBHelper.bDisposed || rBHelper.bInDispose)
{
throw lang::DisposedException (
- OUString( "PresenterButton object has already been disposed"),
+ "PresenterButton object has already been disposed",
const_cast<uno::XWeak*>(static_cast<const uno::XWeak*>(this)));
}
}
diff --git a/sdext/source/presenter/PresenterController.cxx b/sdext/source/presenter/PresenterController.cxx
index 1bb33c4..477ad68 100644
--- a/sdext/source/presenter/PresenterController.cxx
+++ b/sdext/source/presenter/PresenterController.cxx
@@ -724,7 +724,7 @@ void SAL_CALL PresenterController::notifyConfigurationChange (
if (rBHelper.bDisposed || rBHelper.bInDispose)
{
throw lang::DisposedException (
- OUString( "PresenterController object has already been disposed"),
+ "PresenterController object has already been disposed",
const_cast<uno::XWeak*>(static_cast<const uno::XWeak*>(this)));
}
diff --git a/sdext/source/presenter/PresenterHelpView.cxx b/sdext/source/presenter/PresenterHelpView.cxx
index 92d7819..e414ad0 100644
--- a/sdext/source/presenter/PresenterHelpView.cxx
+++ b/sdext/source/presenter/PresenterHelpView.cxx
@@ -498,7 +498,7 @@ void PresenterHelpView::ThrowIfDisposed()
if (rBHelper.bDisposed || rBHelper.bInDispose)
{
throw lang::DisposedException (
- OUString( "PresenterHelpView has been already disposed"),
+ "PresenterHelpView has been already disposed",
const_cast<uno::XWeak*>(static_cast<const uno::XWeak*>(this)));
}
}
diff --git a/sdext/source/presenter/PresenterPaneBorderPainter.cxx b/sdext/source/presenter/PresenterPaneBorderPainter.cxx
index 47f86d1..f35662e 100644
--- a/sdext/source/presenter/PresenterPaneBorderPainter.cxx
+++ b/sdext/source/presenter/PresenterPaneBorderPainter.cxx
@@ -369,8 +369,7 @@ void PresenterPaneBorderPainter::ThrowIfDisposed() const
if (rBHelper.bDisposed || rBHelper.bInDispose)
{
throw lang::DisposedException (
- OUString(
- "PresenterPaneBorderPainter object has already been disposed"),
+ "PresenterPaneBorderPainter object has already been disposed",
const_cast<uno::XWeak*>(static_cast<const uno::XWeak*>(this)));
}
}
diff --git a/sdext/source/presenter/PresenterPaneFactory.cxx b/sdext/source/presenter/PresenterPaneFactory.cxx
index 3477895..aff909e 100644
--- a/sdext/source/presenter/PresenterPaneFactory.cxx
+++ b/sdext/source/presenter/PresenterPaneFactory.cxx
@@ -318,7 +318,7 @@ void PresenterPaneFactory::ThrowIfDisposed() const
if (rBHelper.bDisposed || rBHelper.bInDispose)
{
throw lang::DisposedException (
- OUString( "PresenterPaneFactory object has already been disposed"),
+ "PresenterPaneFactory object has already been disposed",
const_cast<uno::XWeak*>(static_cast<const uno::XWeak*>(this)));
}
}
diff --git a/sdext/source/presenter/PresenterProtocolHandler.cxx b/sdext/source/presenter/PresenterProtocolHandler.cxx
index 07470b3..8869303 100644
--- a/sdext/source/presenter/PresenterProtocolHandler.cxx
+++ b/sdext/source/presenter/PresenterProtocolHandler.cxx
@@ -335,8 +335,7 @@ void PresenterProtocolHandler::ThrowIfDisposed() const
if (rBHelper.bDisposed || rBHelper.bInDispose)
{
throw lang::DisposedException (
- OUString(
- "PresenterProtocolHandler object has already been disposed"),
+ "PresenterProtocolHandler object has already been disposed",
const_cast<uno::XWeak*>(static_cast<const uno::XWeak*>(this)));
}
}
@@ -434,8 +433,7 @@ void SAL_CALL PresenterProtocolHandler::Dispatch::dispatch(
if (rBHelper.bDisposed || rBHelper.bInDispose)
{
throw lang::DisposedException (
- OUString(
- "PresenterProtocolHandler::Dispatch object has already been disposed"),
+ "PresenterProtocolHandler::Dispatch object has already been disposed",
const_cast<uno::XWeak*>(static_cast<const uno::XWeak*>(this)));
}
diff --git a/sdext/source/presenter/PresenterScreen.cxx b/sdext/source/presenter/PresenterScreen.cxx
index e5d61a7..53d5bcb 100644
--- a/sdext/source/presenter/PresenterScreen.cxx
+++ b/sdext/source/presenter/PresenterScreen.cxx
@@ -210,8 +210,7 @@ void SAL_CALL PresenterScreenListener::notifyEvent( const css::document::EventOb
if (rBHelper.bDisposed || rBHelper.bInDispose)
{
throw lang::DisposedException (
- OUString(
- "PresenterScreenListener object has already been disposed"),
+ "PresenterScreenListener object has already been disposed",
const_cast<uno::XWeak*>(static_cast<const uno::XWeak*>(this)));
}
diff --git a/sdext/source/presenter/PresenterSlideShowView.cxx b/sdext/source/presenter/PresenterSlideShowView.cxx
index 25a357e..71d743f 100644
--- a/sdext/source/presenter/PresenterSlideShowView.cxx
+++ b/sdext/source/presenter/PresenterSlideShowView.cxx
@@ -959,7 +959,7 @@ void PresenterSlideShowView::ThrowIfDisposed()
if (rBHelper.bDisposed || rBHelper.bInDispose)
{
throw lang::DisposedException (
- OUString("PresenterSlideShowView object has already been disposed"),
+ "PresenterSlideShowView object has already been disposed",
static_cast<uno::XWeak*>(this));
}
}
diff --git a/sdext/source/presenter/PresenterSlideSorter.cxx b/sdext/source/presenter/PresenterSlideSorter.cxx
index fdb3dde..c245a19 100644
--- a/sdext/source/presenter/PresenterSlideSorter.cxx
+++ b/sdext/source/presenter/PresenterSlideSorter.cxx
@@ -1094,8 +1094,7 @@ void PresenterSlideSorter::ThrowIfDisposed()
if (rBHelper.bDisposed || rBHelper.bInDispose)
{
throw lang::DisposedException (
- OUString(
- "PresenterSlideSorter has been already disposed"),
+ "PresenterSlideSorter has been already disposed",
const_cast<uno::XWeak*>(static_cast<const uno::XWeak*>(this)));
}
}
diff --git a/sdext/source/presenter/PresenterToolBar.cxx b/sdext/source/presenter/PresenterToolBar.cxx
index 42823bb..97df29c 100644
--- a/sdext/source/presenter/PresenterToolBar.cxx
+++ b/sdext/source/presenter/PresenterToolBar.cxx
@@ -1037,7 +1037,7 @@ void PresenterToolBar::ThrowIfDisposed() const
if (rBHelper.bDisposed || rBHelper.bInDispose)
{
throw lang::DisposedException (
- OUString( "PresenterToolBar has already been disposed"),
+ "PresenterToolBar has already been disposed",
const_cast<uno::XWeak*>(static_cast<const uno::XWeak*>(this)));
}
}
diff --git a/sdext/source/presenter/PresenterViewFactory.cxx b/sdext/source/presenter/PresenterViewFactory.cxx
index 912bc1b..e70cf27 100644
--- a/sdext/source/presenter/PresenterViewFactory.cxx
+++ b/sdext/source/presenter/PresenterViewFactory.cxx
@@ -515,8 +515,7 @@ void PresenterViewFactory::ThrowIfDisposed() const
if (rBHelper.bDisposed || rBHelper.bInDispose)
{
throw lang::DisposedException (
- OUString(
- "PresenterViewFactory object has already been disposed"),
+ "PresenterViewFactory object has already been disposed",
const_cast<uno::XWeak*>(static_cast<const uno::XWeak*>(this)));
}
}
diff --git a/sfx2/source/appl/imestatuswindow.cxx b/sfx2/source/appl/imestatuswindow.cxx
index 58c0f15..0fa5823 100644
--- a/sfx2/source/appl/imestatuswindow.cxx
+++ b/sfx2/source/appl/imestatuswindow.cxx
@@ -189,7 +189,7 @@ css::uno::Reference< css::beans::XPropertySet > ImeStatusWindow::getConfig()
throw css::lang::DisposedException();
if (!m_xContext.is())
throw css::uno::RuntimeException(
- OUString("null comphelper::getProcessServiceFactory"),
+ "null comphelper::getProcessServiceFactory",
nullptr);
css::uno::Reference< css::lang::XMultiServiceFactory > xProvider =
css::configuration::theDefaultProvider::get( m_xContext );
@@ -208,9 +208,8 @@ css::uno::Reference< css::beans::XPropertySet > ImeStatusWindow::getConfig()
css::uno::UNO_QUERY);
if (!m_xConfig.is())
throw css::uno::RuntimeException(
- OUString(
- "null com.sun.star.configuration."
- "ConfigurationUpdateAccess"),
+ "null com.sun.star.configuration."
+ "ConfigurationUpdateAccess",
nullptr);
bAdd = true;
}
diff --git a/sfx2/source/control/thumbnailviewacc.cxx b/sfx2/source/control/thumbnailviewacc.cxx
index 3255112..45648ed 100644
--- a/sfx2/source/control/thumbnailviewacc.cxx
+++ b/sfx2/source/control/thumbnailviewacc.cxx
@@ -556,7 +556,7 @@ void ThumbnailViewAcc::ThrowIfDisposed()
{
SAL_WARN("sfx", "Calling disposed object. Throwing exception:");
throw lang::DisposedException (
- OUString("object has been already disposed"),
+ "object has been already disposed",
static_cast<uno::XWeak*>(this));
}
else
diff --git a/sfx2/source/dialog/backingcomp.cxx b/sfx2/source/dialog/backingcomp.cxx
index db2d583..f242c87 100644
--- a/sfx2/source/dialog/backingcomp.cxx
+++ b/sfx2/source/dialog/backingcomp.cxx
@@ -365,12 +365,12 @@ void SAL_CALL BackingComp::attachFrame( /*IN*/ const css::uno::Reference< css::f
// check some required states
if (m_xFrame.is())
throw css::uno::RuntimeException(
- OUString("already attached"),
+ "already attached",
static_cast< ::cppu::OWeakObject* >(this));
if (!xFrame.is())
throw css::uno::RuntimeException(
- OUString("invalid frame reference"),
+ "invalid frame reference",
static_cast< ::cppu::OWeakObject* >(this));
if (!m_xWindow.is())
@@ -550,7 +550,7 @@ void SAL_CALL BackingComp::disposing( /*IN*/ const css::lang::EventObject& aEven
if (!aEvent.Source.is() || aEvent.Source!=m_xWindow || !m_xWindow.is())
throw css::uno::RuntimeException(
- OUString("unexpected source or called twice"),
+ "unexpected source or called twice",
static_cast< ::cppu::OWeakObject* >(this));
m_xWindow.clear();
@@ -616,7 +616,7 @@ void SAL_CALL BackingComp::dispose()
void SAL_CALL BackingComp::addEventListener( /*IN*/ const css::uno::Reference< css::lang::XEventListener >& )
{
throw css::uno::RuntimeException(
- OUString("not supported"),
+ "not supported",
static_cast< ::cppu::OWeakObject* >(this));
}
@@ -659,7 +659,7 @@ void SAL_CALL BackingComp::initialize( /*IN*/ const css::uno::Sequence< css::uno
if (m_xWindow.is())
throw css::uno::Exception(
- OUString("already initialized"),
+ "already initialized",
static_cast< ::cppu::OWeakObject* >(this));
css::uno::Reference< css::awt::XWindow > xParentWindow;
@@ -670,7 +670,7 @@ void SAL_CALL BackingComp::initialize( /*IN*/ const css::uno::Sequence< css::uno
)
{
throw css::uno::Exception(
- OUString("wrong or corrupt argument list"),
+ "wrong or corrupt argument list",
static_cast< ::cppu::OWeakObject* >(this));
}
@@ -681,7 +681,7 @@ void SAL_CALL BackingComp::initialize( /*IN*/ const css::uno::Sequence< css::uno
if (!m_xWindow.is())
throw css::uno::RuntimeException(
- OUString("couldn't create component window"),
+ "couldn't create component window",
static_cast< ::cppu::OWeakObject* >(this));
// start listening for window disposing
diff --git a/sfx2/source/doc/DocumentMetadataAccess.cxx b/sfx2/source/doc/DocumentMetadataAccess.cxx
index 9b805ab..fb4376e 100644
--- a/sfx2/source/doc/DocumentMetadataAccess.cxx
+++ b/sfx2/source/doc/DocumentMetadataAccess.cxx
@@ -723,9 +723,8 @@ retry:
if (rterr.hasValue()) {
throw lang::WrappedTargetRuntimeException(
- OUString(
- "DocumentMetadataAccess::loadMetadataFromStorage: "
- "exception"), nullptr, rterr);
+ "DocumentMetadataAccess::loadMetadataFromStorage: "
+ "exception", nullptr, rterr);
}
if (err) {
diff --git a/sfx2/source/doc/Metadatable.cxx b/sfx2/source/doc/Metadatable.cxx
index 86d2f7e..fecd4a0 100644
--- a/sfx2/source/doc/Metadatable.cxx
+++ b/sfx2/source/doc/Metadatable.cxx
@@ -509,8 +509,7 @@ XmlIdRegistryDocument::XmlIdRegistry_Impl::LookupElement(
{
if (!isValidXmlId(i_rStreamName, i_rIdref))
{
- throw lang::IllegalArgumentException(OUString(
- "illegal XmlId"), nullptr, 0);
+ throw lang::IllegalArgumentException("illegal XmlId", nullptr, 0);
}
const XmlIdList_t * pList( LookupElementList(i_rStreamName, i_rIdref) );
@@ -663,15 +662,13 @@ XmlIdRegistryDocument::TryRegisterMetadatable(Metadatable & i_rObject,
if (!isValidXmlId(i_rStreamName, i_rIdref))
{
- throw lang::IllegalArgumentException(OUString(
- "illegal XmlId"), nullptr, 0);
+ throw lang::IllegalArgumentException("illegal XmlId", nullptr, 0);
}
if (i_rObject.IsInContent()
? !isContentFile(i_rStreamName)
: !isStylesFile(i_rStreamName))
{
- throw lang::IllegalArgumentException(OUString(
- "illegal XmlId: wrong stream"), nullptr, 0);
+ throw lang::IllegalArgumentException("illegal XmlId: wrong stream", nullptr, 0);
}
OUString old_path;
@@ -953,8 +950,7 @@ XmlIdRegistryClipboard::XmlIdRegistry_Impl::LookupEntry(
{
if (!isValidXmlId(i_rStreamName, i_rIdref))
{
- throw lang::IllegalArgumentException(OUString(
- "illegal XmlId"), nullptr, 0);
+ throw lang::IllegalArgumentException("illegal XmlId", nullptr, 0);
}
const ClipboardXmlIdMap_t::const_iterator iter( m_XmlIdMap.find(i_rIdref) );
@@ -1076,15 +1072,13 @@ XmlIdRegistryClipboard::TryRegisterMetadatable(Metadatable & i_rObject,
if (!isValidXmlId(i_rStreamName, i_rIdref))
{
- throw lang::IllegalArgumentException(OUString(
- "illegal XmlId"), nullptr, 0);
+ throw lang::IllegalArgumentException("illegal XmlId", nullptr, 0);
}
if (i_rObject.IsInContent()
? !isContentFile(i_rStreamName)
: !isStylesFile(i_rStreamName))
{
- throw lang::IllegalArgumentException(OUString(
- "illegal XmlId: wrong stream"), nullptr, 0);
+ throw lang::IllegalArgumentException("illegal XmlId: wrong stream", nullptr, 0);
}
OUString old_path;
@@ -1207,8 +1201,7 @@ XmlIdRegistryClipboard::RegisterCopyClipboard(Metadatable & i_rCopy,
if (!isValidXmlId(i_rReference.First, i_rReference.Second))
{
- throw lang::IllegalArgumentException(OUString(
- "illegal XmlId"), nullptr, 0);
+ throw lang::IllegalArgumentException("illegal XmlId", nullptr, 0);
}
if (!i_isLatent)
@@ -1297,8 +1290,7 @@ void Metadatable::SetMetadataReference( const css::beans::StringPair & i_rRefere
else
{
throw lang::IllegalArgumentException(
- OUString("Metadatable::"
- "SetMetadataReference: argument is invalid"), /*this*/nullptr, 0);
+ "Metadatable::SetMetadataReference: argument is invalid", /*this*/nullptr, 0);
}
}
}
@@ -1559,8 +1551,7 @@ MetadatableMixin::getMetadataReference()
if (!pObject)
{
throw uno::RuntimeException(
- OUString(
- "MetadatableMixin: cannot get core object; not inserted?"),
+ "MetadatableMixin: cannot get core object; not inserted?",
*this);
}
return pObject->GetMetadataReference();
@@ -1576,8 +1567,7 @@ MetadatableMixin::setMetadataReference(
if (!pObject)
{
throw uno::RuntimeException(
- OUString(
- "MetadatableMixin: cannot get core object; not inserted?"),
+ "MetadatableMixin: cannot get core object; not inserted?",
*this);
}
return pObject->SetMetadataReference(i_rReference);
@@ -1591,8 +1581,7 @@ void SAL_CALL MetadatableMixin::ensureMetadataReference()
if (!pObject)
{
throw uno::RuntimeException(
- OUString(
- "MetadatableMixin: cannot get core object; not inserted?"),
+ "MetadatableMixin: cannot get core object; not inserted?",
*this);
}
return pObject->EnsureMetadataReference();
diff --git a/sfx2/source/doc/SfxDocumentMetaData.cxx b/sfx2/source/doc/SfxDocumentMetaData.cxx
index 6870e7f..f519833 100644
--- a/sfx2/source/doc/SfxDocumentMetaData.cxx
+++ b/sfx2/source/doc/SfxDocumentMetaData.cxx
@@ -596,8 +596,8 @@ SfxDocumentMetaData::getURLProperties(
OUString SAL_CALL
getNodeText(const css::uno::Reference<css::xml::dom::XNode>& i_xNode)
{
- if (!i_xNode.is()) throw css::uno::RuntimeException(
- OUString("SfxDocumentMetaData::getNodeText: argument is null"), i_xNode);
+ if (!i_xNode.is())
+ throw css::uno::RuntimeException("SfxDocumentMetaData::getNodeText: argument is null", i_xNode);
for (css::uno::Reference<css::xml::dom::XNode> c = i_xNode->getFirstChild();
c.is();
c = c->getNextSibling()) {
@@ -674,7 +674,7 @@ SfxDocumentMetaData::setMetaText(const char* i_name,
} catch (const css::xml::dom::DOMException & e) {
css::uno::Any a(e);
throw css::lang::WrappedTargetRuntimeException(
- OUString("SfxDocumentMetaData::setMetaText: DOM exception"),
+ "SfxDocumentMetaData::setMetaText: DOM exception",
css::uno::Reference<css::uno::XInterface>(*this), a);
}
}
@@ -806,7 +806,7 @@ SfxDocumentMetaData::setMetaList(const char* i_name,
} catch (const css::xml::dom::DOMException & e) {
css::uno::Any a(e);
throw css::lang::WrappedTargetRuntimeException(
- OUString("SfxDocumentMetaData::setMetaList: DOM exception"),
+ "SfxDocumentMetaData::setMetaList: DOM exception",
css::uno::Reference<css::uno::XInterface>(*this), a);
}
}
@@ -956,7 +956,7 @@ SfxDocumentMetaData::updateElement(const char *i_name,
} catch (const css::xml::dom::DOMException & e) {
css::uno::Any a(e);
throw css::lang::WrappedTargetRuntimeException(
- OUString("SfxDocumentMetaData::updateElement: DOM exception"),
+ "SfxDocumentMetaData::updateElement: DOM exception",
css::uno::Reference<css::uno::XInterface>(*this), a);
}
}
@@ -1032,9 +1032,9 @@ SfxDocumentMetaData::createDOM() const // throw (css::uno::RuntimeException)
css::uno::Reference<css::lang::XMultiComponentFactory> xMsf ( m_xContext->getServiceManager());
css::uno::Reference<css::xml::dom::XDocumentBuilder> xBuilder( css::xml::dom::DocumentBuilder::create(m_xContext) );
css::uno::Reference<css::xml::dom::XDocument> xDoc = xBuilder->newDocument();
- if (!xDoc.is()) throw css::uno::RuntimeException(
- OUString("SfxDocumentMetaData::createDOM: "
- "cannot create new document"),
+ if (!xDoc.is())
+ throw css::uno::RuntimeException(
+ "SfxDocumentMetaData::createDOM: cannot create new document",
*const_cast<SfxDocumentMetaData*>(this));
return xDoc;
}
@@ -1043,8 +1043,8 @@ void SAL_CALL
SfxDocumentMetaData::checkInit() const // throw (css::uno::RuntimeException)
{
if (!m_isInitialized) {
- throw css::uno::RuntimeException(OUString(
- "SfxDocumentMetaData::checkInit: not initialized"),
+ throw css::uno::RuntimeException(
+ "SfxDocumentMetaData::checkInit: not initialized",
*const_cast<SfxDocumentMetaData*>(this));
}
assert(m_xDoc.is() && m_xParent.is());
@@ -1054,8 +1054,8 @@ SfxDocumentMetaData::checkInit() const // throw (css::uno::RuntimeException)
void SAL_CALL SfxDocumentMetaData::init(
const css::uno::Reference<css::xml::dom::XDocument>& i_xDoc)
{
- if (!i_xDoc.is()) throw css::uno::RuntimeException(
- OUString("SfxDocumentMetaData::init: no DOM tree given"), *this);
+ if (!i_xDoc.is())
+ throw css::uno::RuntimeException("SfxDocumentMetaData::init: no DOM tree given", *this);
css::uno::Reference<css::xml::xpath::XXPathAPI> xPath = css::xml::xpath::XPathAPI::create(m_xContext);
@@ -1123,7 +1123,7 @@ void SAL_CALL SfxDocumentMetaData::init(
} catch (const css::xml::dom::DOMException & e) {
css::uno::Any a(e);
throw css::lang::WrappedTargetRuntimeException(
- OUString("SfxDocumentMetaData::init: DOM exception"),
+ "SfxDocumentMetaData::init: DOM exception",
css::uno::Reference<css::uno::XInterface>(*this), a);
}
}
@@ -1564,9 +1564,10 @@ SfxDocumentMetaData::getAutoloadSecs()
void SAL_CALL
SfxDocumentMetaData::setAutoloadSecs(::sal_Int32 the_value)
{
- if (the_value < 0) throw css::lang::IllegalArgumentException(
- OUString("SfxDocumentMetaData::setAutoloadSecs: argument is negative"),
- *this, 0);
+ if (the_value < 0)
+ throw css::lang::IllegalArgumentException(
+ "SfxDocumentMetaData::setAutoloadSecs: argument is negative",
+ *this, 0);
::osl::ClearableMutexGuard g(m_aMutex);
checkInit();
if (m_AutoloadSecs != the_value) {
@@ -1670,9 +1671,10 @@ SfxDocumentMetaData::getEditingCycles()
void SAL_CALL
SfxDocumentMetaData::setEditingCycles(::sal_Int16 the_value)
{
- if (the_value < 0) throw css::lang::IllegalArgumentException(
- OUString("SfxDocumentMetaData::setEditingCycles: argument is negative"),
- *this, 0);
+ if (the_value < 0)
+ throw css::lang::IllegalArgumentException(
+ "SfxDocumentMetaData::setEditingCycles: argument is negative",
+ *this, 0);
OUStringBuffer buf;
::sax::Converter::convertNumber(buf, the_value);
setMetaTextAndNotify("meta:editing-cycles", buf.makeStringAndClear());
@@ -1688,9 +1690,10 @@ SfxDocumentMetaData::getEditingDuration()
void SAL_CALL
SfxDocumentMetaData::setEditingDuration(::sal_Int32 the_value)
{
- if (the_value < 0) throw css::lang::IllegalArgumentException(
- OUString("SfxDocumentMetaData::setEditingDuration: argument is negative"),
- *this, 0);
+ if (the_value < 0)
+ throw css::lang::IllegalArgumentException(
+ "SfxDocumentMetaData::setEditingDuration: argument is negative",
+ *this, 0);
setMetaTextAndNotify("meta:editing-duration", durationToText(the_value));
}
@@ -1735,8 +1738,8 @@ SfxDocumentMetaData::loadFromStorage(
const css::uno::Reference< css::embed::XStorage > & xStorage,
const css::uno::Sequence< css::beans::PropertyValue > & Medium)
{
- if (!xStorage.is()) throw css::lang::IllegalArgumentException(
- OUString("SfxDocumentMetaData::loadFromStorage: argument is null"), *this, 0);
+ if (!xStorage.is())
+ throw css::lang::IllegalArgumentException("SfxDocumentMetaData::loadFromStorage: argument is null", *this, 0);
::osl::MutexGuard g(m_aMutex);
// open meta data file
@@ -1780,9 +1783,10 @@ SfxDocumentMetaData::loadFromStorage(
xMsf->createInstanceWithArgumentsAndContext(
OUString::createFromAscii(pServiceName), args, m_xContext),
css::uno::UNO_QUERY_THROW);
- if (!xDocHandler.is()) throw css::uno::RuntimeException(
- OUString("SfxDocumentMetaData::loadFromStorage:"
- " cannot create XMLOasisMetaImporter service"), *this);
+ if (!xDocHandler.is())
+ throw css::uno::RuntimeException(
+ "SfxDocumentMetaData::loadFromStorage:"
+ " cannot create XMLOasisMetaImporter service", *this);
css::uno::Reference<css::document::XImporter> xImp (xDocHandler,
css::uno::UNO_QUERY_THROW);
xImp->setTargetDocument(css::uno::Reference<css::lang::XComponent>(this));
@@ -1790,9 +1794,9 @@ SfxDocumentMetaData::loadFromStorage(
try {
xParser->parseStream(input);
} catch (const css::xml::sax::SAXException &) {
- throw css::io::WrongFormatException(OUString(
+ throw css::io::WrongFormatException(
"SfxDocumentMetaData::loadFromStorage:"
- " XML parsing exception"), *this);
+ " XML parsing exception", *this);
}
// NB: the implementation of XMLOasisMetaImporter calls initialize
checkInit();
@@ -1803,9 +1807,9 @@ SfxDocumentMetaData::storeToStorage(
const css::uno::Reference< css::embed::XStorage > & xStorage,
const css::uno::Sequence< css::beans::PropertyValue > & Medium)
{
- if (!xStorage.is()) throw css::lang::IllegalArgumentException(
- OUString("SfxDocumentMetaData::storeToStorage:"
- " argument is null"), *this, 0);
+ if (!xStorage.is())
+ throw css::lang::IllegalArgumentException(
+ "SfxDocumentMetaData::storeToStorage: argument is null", *this, 0);
::osl::MutexGuard g(m_aMutex);
checkInit();
@@ -1866,8 +1870,8 @@ SfxDocumentMetaData::storeToStorage(
xTransaction->commit();
}
} else {
- throw css::io::IOException(OUString(
- "SfxDocumentMetaData::storeToStorage: cannot filter"), *this);
+ throw css::io::IOException(
+ "SfxDocumentMetaData::storeToStorage: cannot filter", *this);
}
}
@@ -1900,13 +1904,13 @@ SfxDocumentMetaData::loadFromMedium(const OUString & URL,
throw;
} catch (const css::uno::Exception & e) {
throw css::lang::WrappedTargetException(
- OUString("SfxDocumentMetaData::loadFromMedium: exception"),
+ "SfxDocumentMetaData::loadFromMedium: exception",
css::uno::Reference<css::uno::XInterface>(*this),
css::uno::makeAny(e));
}
if (!xStorage.is()) {
- throw css::uno::RuntimeException(OUString(
- "SfxDocumentMetaData::loadFromMedium: cannot get Storage"),
+ throw css::uno::RuntimeException(
+ "SfxDocumentMetaData::loadFromMedium: cannot get Storage",
*this);
}
loadFromStorage(xStorage, md.getAsConstPropertyValueList());
@@ -1926,8 +1930,8 @@ SfxDocumentMetaData::storeToMedium(const OUString & URL,
if (!xStorage.is()) {
- throw css::uno::RuntimeException(OUString(
- "SfxDocumentMetaData::storeToMedium: cannot get Storage"),
+ throw css::uno::RuntimeException(
+ "SfxDocumentMetaData::storeToMedium: cannot get Storage",
*this);
}
// set MIME type of the storage
@@ -1975,14 +1979,12 @@ void SAL_CALL SfxDocumentMetaData::initialize( const css::uno::Sequence< css::un
if (any >>= xDoc) {
if (!xDoc.is()) {
throw css::lang::IllegalArgumentException(
- OUString("SfxDocumentMetaData::"
- "initialize: argument is null"),
+ "SfxDocumentMetaData::initialize: argument is null",
*this, static_cast<sal_Int16>(i));
}
} else {
throw css::lang::IllegalArgumentException(
- OUString("SfxDocumentMetaData::"
- "initialize: argument must be XDocument"),
+ "SfxDocumentMetaData::initialize: argument must be XDocument",
*this, static_cast<sal_Int16>(i));
}
}
@@ -2020,7 +2022,7 @@ SfxDocumentMetaData::createClone()
} catch (const css::uno::Exception & e) {
css::uno::Any a(e);
throw css::lang::WrappedTargetRuntimeException(
- OUString("SfxDocumentMetaData::createClone: exception"),
+ "SfxDocumentMetaData::createClone: exception",
css::uno::Reference<css::uno::XInterface>(*this), a);
}
return css::uno::Reference<css::util::XCloneable> (pNew);
diff --git a/sfx2/source/notify/globalevents.cxx b/sfx2/source/notify/globalevents.cxx
index b4db95e..1402d07 100644
--- a/sfx2/source/notify/globalevents.cxx
+++ b/sfx2/source/notify/globalevents.cxx
@@ -250,7 +250,7 @@ void SAL_CALL SfxGlobalEvents_Impl::insert( const uno::Any& aElement )
aElement >>= xDoc;
if (!xDoc.is())
throw lang::IllegalArgumentException(
- OUString("Can not locate at least the model parameter."),
+ "Can not locate at least the model parameter.",
static_cast< container::XSet* >(this),
0);
@@ -284,7 +284,7 @@ void SAL_CALL SfxGlobalEvents_Impl::remove( const uno::Any& aElement )
aElement >>= xDoc;
if (!xDoc.is())
throw lang::IllegalArgumentException(
- OUString("Can not locate at least the model parameter."),
+ "Can not locate at least the model parameter.",
static_cast< container::XSet* >(this),
0);
diff --git a/shell/source/backends/desktopbe/desktopbackend.cxx b/shell/source/backends/desktopbe/desktopbackend.cxx
index e162a03..42bc6a8 100644
--- a/shell/source/backends/desktopbe/desktopbackend.cxx
+++ b/shell/source/backends/desktopbe/desktopbackend.cxx
@@ -121,7 +121,7 @@ private:
void Default::setPropertyValue(OUString const &, css::uno::Any const &)
{
throw css::lang::IllegalArgumentException(
- OUString("setPropertyValue not supported"),
+ "setPropertyValue not supported",
static_cast< cppu::OWeakObject * >(this), -1);
}
diff --git a/shell/source/backends/localebe/localebackend.cxx b/shell/source/backends/localebe/localebackend.cxx
index 1eb92c9..36d1bf4 100644
--- a/shell/source/backends/localebe/localebackend.cxx
+++ b/shell/source/backends/localebe/localebackend.cxx
@@ -259,8 +259,7 @@ void LocaleBackend::setPropertyValue(
OUString const &, css::uno::Any const &)
{
throw css::lang::IllegalArgumentException(
- OUString(
- "setPropertyValue not supported"),
+ "setPropertyValue not supported",
static_cast< cppu::OWeakObject * >(this), -1);
}
diff --git a/stoc/source/invocation/invocation.cxx b/stoc/source/invocation/invocation.cxx
index 6622441..fea9e93 100644
--- a/stoc/source/invocation/invocation.cxx
+++ b/stoc/source/invocation/invocation.cxx
@@ -887,7 +887,7 @@ InvocationInfo SAL_CALL Invocation_Impl::getInfoForName( const OUString& aName,
if( !bFound )
{
throw IllegalArgumentException(
- OUString( "Unknown name, getExactName() failed!" ),
+ "Unknown name, getExactName() failed!",
static_cast<XWeak *>(static_cast<OWeakObject *>(this)), 0 );
}
return aRetInfo;
diff --git a/stoc/source/javavm/javavm.cxx b/stoc/source/javavm/javavm.cxx
index 8627f85..d7b0c88 100644
--- a/stoc/source/javavm/javavm.cxx
+++ b/stoc/source/javavm/javavm.cxx
@@ -355,13 +355,13 @@ void getDefaultLocaleFromConfig(
xSMgr->createInstanceWithContext( "com.sun.star.configuration.ConfigurationRegistry", xCtx );
if(!xConfRegistry.is())
throw css::uno::RuntimeException(
- OUString("javavm.cxx: couldn't get ConfigurationRegistry"), nullptr);
+ "javavm.cxx: couldn't get ConfigurationRegistry", nullptr);
css::uno::Reference<css::registry::XSimpleRegistry> xConfRegistry_simple(
xConfRegistry, css::uno::UNO_QUERY);
if(!xConfRegistry_simple.is())
throw css::uno::RuntimeException(
- OUString("javavm.cxx: couldn't get ConfigurationRegistry"), nullptr);
+ "javavm.cxx: couldn't get ConfigurationRegistry", nullptr);
xConfRegistry_simple->open("org.openoffice.Setup", true, false);
css::uno::Reference<css::registry::XRegistryKey> xRegistryRootKey = xConfRegistry_simple->getRootKey();
@@ -461,13 +461,13 @@ void getJavaPropsFromSafetySettings(
xCtx);
if(!xConfRegistry.is())
throw css::uno::RuntimeException(
- OUString("javavm.cxx: couldn't get ConfigurationRegistry"), nullptr);
+ "javavm.cxx: couldn't get ConfigurationRegistry", nullptr);
css::uno::Reference<css::registry::XSimpleRegistry> xConfRegistry_simple(
xConfRegistry, css::uno::UNO_QUERY);
if(!xConfRegistry_simple.is())
throw css::uno::RuntimeException(
- OUString("javavm.cxx: couldn't get ConfigurationRegistry"), nullptr);
+ "javavm.cxx: couldn't get ConfigurationRegistry", nullptr);
xConfRegistry_simple->open(
"org.openoffice.Office.Java",
@@ -624,7 +624,7 @@ JavaVirtualMachine::initialize(css::uno::Sequence< css::uno::Any > const &
OUString(), static_cast< cppu::OWeakObject * >(this));
if (m_xUnoVirtualMachine.is())
throw css::uno::RuntimeException(
- OUString("bad call to initialize"),
+ "bad call to initialize",
static_cast< cppu::OWeakObject * >(this));
css::beans::NamedValue val;
if (rArguments.getLength() == 1 && (rArguments[0] >>= val) && val.Name == "UnoVirtualMachine" )
@@ -652,19 +652,19 @@ JavaVirtualMachine::initialize(css::uno::Sequence< css::uno::Any > const &
m_xUnoVirtualMachine = new jvmaccess::UnoVirtualMachine(vm, nullptr);
} catch (jvmaccess::UnoVirtualMachine::CreationException &) {
throw css::uno::RuntimeException(
- OUString("jvmaccess::UnoVirtualMachine::CreationException"),
+ "jvmaccess::UnoVirtualMachine::CreationException",
static_cast< cppu::OWeakObject * >(this));
}
}
}
if (!m_xUnoVirtualMachine.is()) {
throw css::lang::IllegalArgumentException(
- OUString("sequence of exactly one any containing either (a) a"
- " com.sun.star.beans.NamedValue with Name"
- " \"UnoVirtualMachine\" and Value a hyper representing a"
- " non-null pointer to a jvmaccess:UnoVirtualMachine, or (b)"
- " a hyper representing a non-null pointer to a"
- " jvmaccess::VirtualMachine required"),
+ "sequence of exactly one any containing either (a) a"
+ " com.sun.star.beans.NamedValue with Name"
+ " \"UnoVirtualMachine\" and Value a hyper representing a"
+ " non-null pointer to a jvmaccess:UnoVirtualMachine, or (b)"
+ " a hyper representing a non-null pointer to a"
+ " jvmaccess::VirtualMachine required",
static_cast< cppu::OWeakObject * >(this), 0);
}
m_xVirtualMachine = m_xUnoVirtualMachine->getVirtualMachine();
@@ -776,8 +776,8 @@ JavaVirtualMachine::getJavaVM(css::uno::Sequence< sal_Int8 > const & rProcessId)
//%PRODUCTNAME requires a Java runtime environment (JRE) to perform this task.
//Please install a JRE and restart %PRODUCTNAME.
css::java::JavaNotFoundException exc(
- OUString("JavaVirtualMachine::getJavaVM failed because"
- " No suitable JRE found!"),
+ "JavaVirtualMachine::getJavaVM failed because"
+ " No suitable JRE found!",
static_cast< cppu::OWeakObject * >(this));
askForRetry(css::uno::makeAny(exc));
return css::uno::Any();
@@ -786,8 +786,8 @@ JavaVirtualMachine::getJavaVM(css::uno::Sequence< sal_Int8 > const & rProcessId)
{
//An unexpected error occurred
throw css::uno::RuntimeException(
- OUString("[JavaVirtualMachine]:An unexpected error occurred"
- " while searching for a Java!"), nullptr);
+ "[JavaVirtualMachine]:An unexpected error occurred"
+ " while searching for a Java!", nullptr);
}
}
case JFW_E_INVALID_SETTINGS:
@@ -797,8 +797,8 @@ JavaVirtualMachine::getJavaVM(css::uno::Sequence< sal_Int8 > const & rProcessId)
// - Options - %PRODUCTNAME - Java, select the Java runtime environment
// you want to have used by %PRODUCTNAME.
css::java::InvalidJavaSettingsException exc(
- OUString("JavaVirtualMachine::getJavaVM failed because"
- " Java settings have changed!"),
+ "JavaVirtualMachine::getJavaVM failed because"
+ " Java settings have changed!",
static_cast< cppu::OWeakObject * >(this));
askForRetry(css::uno::makeAny(exc));
return css::uno::Any();
@@ -810,7 +810,7 @@ JavaVirtualMachine::getJavaVM(css::uno::Sequence< sal_Int8 > const & rProcessId)
//this task. However, use of a JRE has been disabled. Do you want to
//enable the use of a JRE now?
css::java::JavaDisabledException exc(
- OUString("JavaVirtualMachine::getJavaVM failed because Java is disabled!"),
+ "JavaVirtualMachine::getJavaVM failed because Java is disabled!",
static_cast< cppu::OWeakObject * >(this));
if( ! askForRetry(css::uno::makeAny(exc)))
return css::uno::Any();
@@ -847,7 +847,7 @@ JavaVirtualMachine::getJavaVM(css::uno::Sequence< sal_Int8 > const & rProcessId)
//is defective. Please select another version or install a new JRE
//and select it under Tools - Options - %PRODUCTNAME - Java.
css::java::JavaVMCreationFailureException exc(
- OUString("JavaVirtualMachine::getJavaVM failed because Java is defective!"),
+ "JavaVirtualMachine::getJavaVM failed because Java is defective!",
static_cast< cppu::OWeakObject * >(this), 0);
askForRetry(css::uno::makeAny(exc));
return css::uno::Any();
@@ -864,8 +864,8 @@ JavaVirtualMachine::getJavaVM(css::uno::Sequence< sal_Int8 > const & rProcessId)
//For the selected Java runtime environment to work properly,
//%PRODUCTNAME must be restarted. Please restart %PRODUCTNAME now.
css::java::RestartRequiredException exc(
- OUString("JavaVirtualMachine::getJavaVM failed because "
- "Office must be restarted before Java can be used!"),
+ "JavaVirtualMachine::getJavaVM failed because "
+ "Office must be restarted before Java can be used!",
static_cast< cppu::OWeakObject * >(this));
askForRetry(css::uno::makeAny(exc));
return css::uno::Any();
@@ -874,8 +874,8 @@ JavaVirtualMachine::getJavaVM(css::uno::Sequence< sal_Int8 > const & rProcessId)
//RuntimeException: error is somewhere in the java framework.
//An unexpected error occurred
throw css::uno::RuntimeException(
- OUString("[JavaVirtualMachine]:An unexpected error occurred"
- " while starting Java!"), nullptr);
+ "[JavaVirtualMachine]:An unexpected error occurred"
+ " while starting Java!", nullptr);
}
if (bStarted)
@@ -902,7 +902,7 @@ JavaVirtualMachine::getJavaVM(css::uno::Sequence< sal_Int8 > const & rProcessId)
setUpUnoVirtualMachine(guard.getEnvironment());
} catch (jvmaccess::VirtualMachine::AttachGuard::CreationException &) {
throw css::uno::RuntimeException(
- OUString("jvmaccess::VirtualMachine::AttachGuard::CreationException occurred"),
+ "jvmaccess::VirtualMachine::AttachGuard::CreationException occurred",
static_cast< cppu::OWeakObject * >(this));
}
}
@@ -910,8 +910,8 @@ JavaVirtualMachine::getJavaVM(css::uno::Sequence< sal_Int8 > const & rProcessId)
default: // RETURN_JAVAVM
if (m_pJavaVm == nullptr) {
throw css::uno::RuntimeException(
- OUString("JavaVirtualMachine service was initialized in a way"
- " that the requested JavaVM pointer is not available"),
+ "JavaVirtualMachine service was initialized in a way"
+ " that the requested JavaVM pointer is not available",
static_cast< cppu::OWeakObject * >(this));
}
return css::uno::makeAny(reinterpret_cast< sal_IntPtr >(m_pJavaVm));
@@ -975,7 +975,7 @@ void SAL_CALL JavaVirtualMachine::registerThread()
OUString(), static_cast< cppu::OWeakObject * >(this));
if (!m_xUnoVirtualMachine.is())
throw css::uno::RuntimeException(
- OUString("JavaVirtualMachine::registerThread: null VirtualMachine"),
+ "JavaVirtualMachine::registerThread: null VirtualMachine",
static_cast< cppu::OWeakObject * >(this));
GuardStack * pStack
= static_cast< GuardStack * >(m_aAttachGuards.getData());
@@ -993,8 +993,8 @@ void SAL_CALL JavaVirtualMachine::registerThread()
catch (jvmaccess::VirtualMachine::AttachGuard::CreationException &)
{
throw css::uno::RuntimeException(
- OUString("JavaVirtualMachine::registerThread: jvmaccess::"
- "VirtualMachine::AttachGuard::CreationException"),
+ "JavaVirtualMachine::registerThread: jvmaccess::"
+ "VirtualMachine::AttachGuard::CreationException",
static_cast< cppu::OWeakObject * >(this));
}
}
@@ -1007,13 +1007,13 @@ void SAL_CALL JavaVirtualMachine::revokeThread()
OUString(), static_cast< cppu::OWeakObject * >(this));
if (!m_xUnoVirtualMachine.is())
throw css::uno::RuntimeException(
- OUString("JavaVirtualMachine::revokeThread: null VirtualMachine"),
+ "JavaVirtualMachine::revokeThread: null VirtualMachine",
static_cast< cppu::OWeakObject * >(this));
GuardStack * pStack
= static_cast< GuardStack * >(m_aAttachGuards.getData());
if (pStack == nullptr || pStack->empty())
throw css::uno::RuntimeException(
- OUString("JavaVirtualMachine::revokeThread: no matching registerThread"),
+ "JavaVirtualMachine::revokeThread: no matching registerThread",
static_cast< cppu::OWeakObject * >(this));
delete pStack->top();
pStack->pop();
@@ -1266,7 +1266,7 @@ void SAL_CALL JavaVirtualMachine::elementReplaced(
catch (jvmaccess::VirtualMachine::AttachGuard::CreationException &)
{
throw css::uno::RuntimeException(
- OUString("jvmaccess::VirtualMachine::AttachGuard::CreationException"),
+ "jvmaccess::VirtualMachine::AttachGuard::CreationException",
nullptr);
}
}
@@ -1524,7 +1524,7 @@ void JavaVirtualMachine::setUpUnoVirtualMachine(JNIEnv * environment) {
baseUrl = exp->expandMacros("$URE_INTERNAL_JAVA_DIR/");
} catch (css::lang::IllegalArgumentException &) {
throw css::uno::RuntimeException(
- OUString("css::lang::IllegalArgumentException"),
+ "css::lang::IllegalArgumentException",
static_cast< cppu::OWeakObject * >(this));
}
OUString classPath;
@@ -1624,7 +1624,7 @@ void JavaVirtualMachine::setUpUnoVirtualMachine(JNIEnv * environment) {
m_xVirtualMachine, cl2);
} catch (jvmaccess::UnoVirtualMachine::CreationException &) {
throw css::uno::RuntimeException(
- OUString("jvmaccess::UnoVirtualMachine::CreationException"),
+ "jvmaccess::UnoVirtualMachine::CreationException",
static_cast< cppu::OWeakObject * >(this));
}
}
@@ -1632,7 +1632,7 @@ void JavaVirtualMachine::setUpUnoVirtualMachine(JNIEnv * environment) {
void JavaVirtualMachine::handleJniException(JNIEnv * environment) {
environment->ExceptionClear();
throw css::uno::RuntimeException(
- OUString("JNI exception occurred"),
+ "JNI exception occurred",
static_cast< cppu::OWeakObject * >(this));
}
diff --git a/stoc/source/simpleregistry/simpleregistry.cxx b/stoc/source/simpleregistry/simpleregistry.cxx
index d50c243..3035bda 100644
--- a/stoc/source/simpleregistry/simpleregistry.cxx
+++ b/stoc/source/simpleregistry/simpleregistry.cxx
@@ -249,8 +249,8 @@ sal_Int32 Key::getLongValue()
break;
case RegError::INVALID_VALUE:
throw css::registry::InvalidValueException(
- OUString("com.sun.star.registry.SimpleRegistry key getLongValue:"
- " underlying RegistryKey::getValue() = RegError::INVALID_VALUE"),
+ "com.sun.star.registry.SimpleRegistry key getLongValue:"
+ " underlying RegistryKey::getValue() = RegError::INVALID_VALUE",
static_cast< OWeakObject * >(this));
default:
throw css::registry::InvalidRegistryException(
@@ -288,9 +288,9 @@ css::uno::Sequence< sal_Int32 > Key::getLongListValue()
return css::uno::Sequence< sal_Int32 >();
case RegError::INVALID_VALUE:
throw css::registry::InvalidValueException(
- OUString("com.sun.star.registry.SimpleRegistry key getLongListValue:"
- " underlying RegistryKey::getLongListValue() ="
- " RegError::INVALID_VALUE"),
+ "com.sun.star.registry.SimpleRegistry key getLongListValue:"
+ " underlying RegistryKey::getLongListValue() ="
+ " RegError::INVALID_VALUE",
static_cast< OWeakObject * >(this));
default:
throw css::registry::InvalidRegistryException(
@@ -302,8 +302,8 @@ css::uno::Sequence< sal_Int32 > Key::getLongListValue()
sal_uInt32 n = list.getLength();
if (n > SAL_MAX_INT32) {
throw css::registry::InvalidValueException(
- OUString("com.sun.star.registry.SimpleRegistry key getLongListValue:"
- " underlying RegistryKey::getLongListValue() too large"),
+ "com.sun.star.registry.SimpleRegistry key getLongListValue:"
+ " underlying RegistryKey::getLongListValue() too large",
static_cast< OWeakObject * >(this));
}
css::uno::Sequence< sal_Int32 > value(static_cast< sal_Int32 >(n));
@@ -354,15 +354,15 @@ OUString Key::getAsciiValue()
// size contains terminating null (error in underlying registry.cxx):
if (size == 0) {
throw css::registry::InvalidValueException(
- OUString("com.sun.star.registry.SimpleRegistry key getAsciiValue:"
- " underlying RegistryKey size 0 cannot happen due to"
- " design error"),
+ "com.sun.star.registry.SimpleRegistry key getAsciiValue:"
+ " underlying RegistryKey size 0 cannot happen due to"
+ " design error",
static_cast< OWeakObject * >(this));
}
if (size > SAL_MAX_INT32) {
throw css::registry::InvalidValueException(
- OUString("com.sun.star.registry.SimpleRegistry key getAsciiValue:"
- " underlying RegistryKey size too large"),
+ "com.sun.star.registry.SimpleRegistry key getAsciiValue:"
+ " underlying RegistryKey size too large",
static_cast< OWeakObject * >(this));
}
std::vector< char > list(size);
@@ -376,9 +376,9 @@ OUString Key::getAsciiValue()
}
if (list[size - 1] != '\0') {
throw css::registry::InvalidValueException(
- OUString("com.sun.star.registry.SimpleRegistry key getAsciiValue:"
- " underlying RegistryKey value must be null-terminated due"
- " to design error"),
+ "com.sun.star.registry.SimpleRegistry key getAsciiValue:"
+ " underlying RegistryKey value must be null-terminated due"
+ " to design error",
static_cast< OWeakObject * >(this));
}
OUString value;
@@ -390,8 +390,8 @@ OUString Key::getAsciiValue()
RTL_TEXTTOUNICODE_FLAGS_INVALID_ERROR)))
{
throw css::registry::InvalidValueException(
- OUString("com.sun.star.registry.SimpleRegistry key getAsciiValue:"
- " underlying RegistryKey not UTF-8"),
+ "com.sun.star.registry.SimpleRegistry key getAsciiValue:"
+ " underlying RegistryKey not UTF-8" ,
static_cast< OWeakObject * >(this));
}
return value;
@@ -407,8 +407,8 @@ void Key::setAsciiValue(OUString const & value)
RTL_UNICODETOTEXT_FLAGS_INVALID_ERROR)))
{
throw css::uno::RuntimeException(
- OUString("com.sun.star.registry.SimpleRegistry key setAsciiValue:"
- " value not UTF-16"),
+ "com.sun.star.registry.SimpleRegistry key setAsciiValue:"
+ " value not UTF-16",
static_cast< OWeakObject * >(this));
}
RegError err = key_.setValue(
@@ -436,9 +436,9 @@ css::uno::Sequence< OUString > Key::getAsciiListValue()
return css::uno::Sequence< OUString >();
case RegError::INVALID_VALUE:
throw css::registry::InvalidValueException(
- OUString("com.sun.star.registry.SimpleRegistry key"
- " getAsciiListValue: underlying"
- " RegistryKey::getStringListValue() = RegError::INVALID_VALUE"),
+ "com.sun.star.registry.SimpleRegistry key"
+ " getAsciiListValue: underlying"
+ " RegistryKey::getStringListValue() = RegError::INVALID_VALUE",
static_cast< OWeakObject * >(this));
default:
throw css::registry::InvalidRegistryException(
@@ -451,9 +451,9 @@ css::uno::Sequence< OUString > Key::getAsciiListValue()
sal_uInt32 n = list.getLength();
if (n > SAL_MAX_INT32) {
throw css::registry::InvalidValueException(
- OUString("com.sun.star.registry.SimpleRegistry key"
- " getAsciiListValue: underlying"
- " RegistryKey::getStringListValue() too large"),
+ "com.sun.star.registry.SimpleRegistry key"
+ " getAsciiListValue: underlying"
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list