summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-05-26 14:29:07 +0200
committerNoel Grandin <noel@peralex.com>2014-05-27 08:20:11 +0200
commit9b791f9c31165b82ec0fa3760a8af18c5af21294 (patch)
tree3668f3b746bc584280a01162f86a0b2fe6b46510 /sc
parent3b24dcc8a8138c1e1495c3dba5ffe5748cb183c2 (diff)
remove unnecessary use of OUString constructor when throwing
Change-Id: I4a3f3f911dcfbf88696053215a2fb7a94678244c
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/unoobj/styleuno.cxx2
-rw-r--r--sc/source/ui/vba/vbaworksheet.cxx4
-rw-r--r--sc/source/ui/vba/vbaworksheets.cxx2
3 files changed, 4 insertions, 4 deletions
diff --git a/sc/source/ui/unoobj/styleuno.cxx b/sc/source/ui/unoobj/styleuno.cxx
index fbf4fb6cc44c..8d0050fd8146 100644
--- a/sc/source/ui/unoobj/styleuno.cxx
+++ b/sc/source/ui/unoobj/styleuno.cxx
@@ -897,7 +897,7 @@ uno::Any SAL_CALL ScStyleFamilyObj::getPropertyValue( const OUString& sPropertyN
}
else
{
- throw beans::UnknownPropertyException( OUString( "unknown property: " ) + sPropertyName, static_cast<OWeakObject *>(this) );
+ throw beans::UnknownPropertyException( "unknown property: " + sPropertyName, static_cast<OWeakObject *>(this) );
}
return aRet;
diff --git a/sc/source/ui/vba/vbaworksheet.cxx b/sc/source/ui/vba/vbaworksheet.cxx
index 71bacc8efe81..7cad8485a2b2 100644
--- a/sc/source/ui/vba/vbaworksheet.cxx
+++ b/sc/source/ui/vba/vbaworksheet.cxx
@@ -109,7 +109,7 @@ using namespace ooo::vba;
static void getNewSpreadsheetName (OUString &aNewName, const OUString& aOldName, uno::Reference <sheet::XSpreadsheetDocument>& xSpreadDoc )
{
if (!xSpreadDoc.is())
- throw lang::IllegalArgumentException( OUString( "getNewSpreadsheetName() xSpreadDoc is null" ), uno::Reference< uno::XInterface >(), 1 );
+ throw lang::IllegalArgumentException( "getNewSpreadsheetName() xSpreadDoc is null", uno::Reference< uno::XInterface >(), 1 );
static OUString aUnderScore( "_" );
int currentNum =2;
aNewName = aOldName + aUnderScore + OUString::number(currentNum) ;
@@ -123,7 +123,7 @@ static void getNewSpreadsheetName (OUString &aNewName, const OUString& aOldName,
static void removeAllSheets( uno::Reference <sheet::XSpreadsheetDocument>& xSpreadDoc, const OUString& aSheetName)
{
if (!xSpreadDoc.is())
- throw lang::IllegalArgumentException( OUString( "removeAllSheets() xSpreadDoc is null" ), uno::Reference< uno::XInterface >(), 1 );
+ throw lang::IllegalArgumentException( "removeAllSheets() xSpreadDoc is null", uno::Reference< uno::XInterface >(), 1 );
uno::Reference<sheet::XSpreadsheets> xSheets = xSpreadDoc->getSheets();
uno::Reference <container::XIndexAccess> xIndex( xSheets, uno::UNO_QUERY );
diff --git a/sc/source/ui/vba/vbaworksheets.cxx b/sc/source/ui/vba/vbaworksheets.cxx
index b55016aecf0d..6f8f9a931690 100644
--- a/sc/source/ui/vba/vbaworksheets.cxx
+++ b/sc/source/ui/vba/vbaworksheets.cxx
@@ -490,7 +490,7 @@ ScVbaWorksheets::getServiceNames()
bool ScVbaWorksheets::nameExists( uno::Reference <sheet::XSpreadsheetDocument>& xSpreadDoc, const OUString & name, SCTAB& nTab ) throw ( lang::IllegalArgumentException )
{
if (!xSpreadDoc.is())
- throw lang::IllegalArgumentException( OUString( "nameExists() xSpreadDoc is null" ), uno::Reference< uno::XInterface >(), 1 );
+ throw lang::IllegalArgumentException( "nameExists() xSpreadDoc is null", uno::Reference< uno::XInterface >(), 1 );
uno::Reference <container::XIndexAccess> xIndex( xSpreadDoc->getSheets(), uno::UNO_QUERY );
if ( xIndex.is() )
{