summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-12-13 11:24:35 +0200
committerNoel Grandin <noel@peralex.com>2013-12-17 11:49:05 +0200
commit2ac31b06ae4895fe5d9be51403774a96b89919af (patch)
treeb9500b59350dcb650d4e05283e4e9a835b879b91
parent8548abbac5139569818516ca198c8086f4d1fd1f (diff)
Unnecessary use of OUString constructor inside OUStringBuffer constructor
Convert code like: OUStringBuffer sVal(OUString("0x")); to: OUStringBuffer sVal("0x"); Change-Id: Idc5a3f6a8bf1dc33f93c2b488f866c8ea58d582a
-rw-r--r--connectivity/source/commontools/FValue.cxx2
-rw-r--r--connectivity/source/commontools/TIndexes.cxx2
-rw-r--r--connectivity/source/commontools/dbtools2.cxx2
-rw-r--r--dbaccess/source/core/api/KeySet.cxx2
-rw-r--r--dbaccess/source/ui/querydesign/QueryDesignView.cxx2
-rw-r--r--sc/source/filter/excel/xipivot.cxx2
-rw-r--r--sc/source/ui/view/prevwsh.cxx2
-rw-r--r--sc/source/ui/view/viewdata.cxx2
-rw-r--r--sdext/source/minimizer/pppoptimizerdialog.cxx2
-rw-r--r--sw/qa/core/macros-test.cxx2
-rw-r--r--tools/source/fsys/urlobj.cxx2
11 files changed, 11 insertions, 11 deletions
diff --git a/connectivity/source/commontools/FValue.cxx b/connectivity/source/commontools/FValue.cxx
index f39299b1b06a..4d176be585f1 100644
--- a/connectivity/source/commontools/FValue.cxx
+++ b/connectivity/source/commontools/FValue.cxx
@@ -1011,7 +1011,7 @@ OUString ORowSetValue::getString( ) const
case DataType::VARBINARY:
case DataType::LONGVARBINARY:
{
- OUStringBuffer sVal(OUString("0x"));
+ OUStringBuffer sVal("0x");
Sequence<sal_Int8> aSeq(getSequence());
const sal_Int8* pBegin = aSeq.getConstArray();
const sal_Int8* pEnd = pBegin + aSeq.getLength();
diff --git a/connectivity/source/commontools/TIndexes.cxx b/connectivity/source/commontools/TIndexes.cxx
index f9aa564b07a7..41e8652cbd9a 100644
--- a/connectivity/source/commontools/TIndexes.cxx
+++ b/connectivity/source/commontools/TIndexes.cxx
@@ -136,7 +136,7 @@ sdbcx::ObjectType OIndexesHelper::appendObject( const OUString& _rForName, const
else
{
::dbtools::OPropertyMap& rPropMap = OMetaConnection::getPropMap();
- OUStringBuffer aSql( OUString("CREATE "));
+ OUStringBuffer aSql( "CREATE " );
OUString aQuote = m_pTable->getMetaData()->getIdentifierQuoteString( );
OUString aDot( "." );
diff --git a/connectivity/source/commontools/dbtools2.cxx b/connectivity/source/commontools/dbtools2.cxx
index 59f73496107f..56fd92d1a980 100644
--- a/connectivity/source/commontools/dbtools2.cxx
+++ b/connectivity/source/commontools/dbtools2.cxx
@@ -206,7 +206,7 @@ OUString createStandardColumnPart(const Reference< XPropertySet >& xColProp,cons
OUString createStandardCreateStatement(const Reference< XPropertySet >& descriptor,const Reference< XConnection>& _xConnection,ISQLStatementHelper* _pHelper,const OUString& _sCreatePattern)
{
- OUStringBuffer aSql(OUString("CREATE TABLE "));
+ OUStringBuffer aSql("CREATE TABLE ");
OUString sCatalog,sSchema,sTable,sComposedName;
Reference<XDatabaseMetaData> xMetaData = _xConnection->getMetaData();
diff --git a/dbaccess/source/core/api/KeySet.cxx b/dbaccess/source/core/api/KeySet.cxx
index bce833151850..2e02ef555533 100644
--- a/dbaccess/source/core/api/KeySet.cxx
+++ b/dbaccess/source/core/api/KeySet.cxx
@@ -750,7 +750,7 @@ void SAL_CALL OKeySet::insertRow( const ORowSetRow& _rInsertRow,const connectivi
OUStringBuffer aSql( "INSERT INTO " + m_aComposedTableName + " ( ");
// set values and column names
- OUStringBuffer aValues(OUString(" VALUES ( "));
+ OUStringBuffer aValues(" VALUES ( ");
static OUString aPara("?,");
OUString aQuote = getIdentifierQuoteString();
static OUString aComma(",");
diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
index b0c984ee86ae..4d8bc1737ce1 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
@@ -2880,7 +2880,7 @@ OUString OQueryDesignView::getStatement()
aCriteriaListStr = aTmp;
}
// ----------------- construct statement ----------------------
- OUStringBuffer aSqlCmd(OUString("SELECT "));
+ OUStringBuffer aSqlCmd("SELECT ");
if(rController.isDistinct())
aSqlCmd.append(" DISTINCT ");
aSqlCmd.append(aFieldListStr);
diff --git a/sc/source/filter/excel/xipivot.cxx b/sc/source/filter/excel/xipivot.cxx
index 3309449ef9e4..01b2ca665489 100644
--- a/sc/source/filter/excel/xipivot.cxx
+++ b/sc/source/filter/excel/xipivot.cxx
@@ -705,7 +705,7 @@ void XclImpPivotCache::ReadPivotCacheStream( XclImpStream& rStrm )
nScTab = rDoc.GetTableCount();
rDoc.MakeTable( nScTab );
- OUStringBuffer aDummyName(OUString("DPCache"));
+ OUStringBuffer aDummyName("DPCache");
if( maTabName.getLength() > 0 )
aDummyName.append( '_' ).append( maTabName );
OUString aName = aDummyName.makeStringAndClear();
diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx
index f2c8fea68d88..4e7fb50951bd 100644
--- a/sc/source/ui/view/prevwsh.cxx
+++ b/sc/source/ui/view/prevwsh.cxx
@@ -951,7 +951,7 @@ void ScPreviewShell::WriteUserDataSequence(uno::Sequence < beans::PropertyValue
{
sal_uInt16 nViewID(GetViewFrame()->GetCurViewId());
pSeq[0].Name = OUString(SC_VIEWID);
- OUStringBuffer sBuffer(OUString(SC_VIEW));
+ OUStringBuffer sBuffer(SC_VIEW);
::sax::Converter::convertNumber(sBuffer,
static_cast<sal_Int32>(nViewID));
pSeq[0].Value <<= sBuffer.makeStringAndClear();
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index 9f74c84745c6..7c91dfb42c5f 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -2612,7 +2612,7 @@ void ScViewData::WriteUserDataSequence(uno::Sequence <beans::PropertyValue>& rSe
{
sal_uInt16 nViewID(pViewShell->GetViewFrame()->GetCurViewId());
pSettings[SC_VIEW_ID].Name = OUString(SC_VIEWID);
- OUStringBuffer sBuffer(OUString(SC_VIEW));
+ OUStringBuffer sBuffer(SC_VIEW);
::sax::Converter::convertNumber(sBuffer,
static_cast<sal_Int32>(nViewID));
pSettings[SC_VIEW_ID].Value <<= sBuffer.makeStringAndClear();
diff --git a/sdext/source/minimizer/pppoptimizerdialog.cxx b/sdext/source/minimizer/pppoptimizerdialog.cxx
index 64aac3e0211e..aa9787813e18 100644
--- a/sdext/source/minimizer/pppoptimizerdialog.cxx
+++ b/sdext/source/minimizer/pppoptimizerdialog.cxx
@@ -142,7 +142,7 @@ void SAL_CALL PPPOptimizerDialog::dispatch( const URL& rURL,
if ( nFileSizeSource && nFileSizeDest )
{
- OUStringBuffer sBuf( OUString("Your Presentation has been minimized from:") );
+ OUStringBuffer sBuf( "Your Presentation has been minimized from:" );
sBuf.append( OUString::number( nFileSizeSource >> 10 ) );
sBuf.append( "KB to " );
sBuf.append( OUString::number( nFileSizeDest >> 10 ) );
diff --git a/sw/qa/core/macros-test.cxx b/sw/qa/core/macros-test.cxx
index f99885be6713..c5582a1f18cc 100644
--- a/sw/qa/core/macros-test.cxx
+++ b/sw/qa/core/macros-test.cxx
@@ -131,7 +131,7 @@ void SwMacrosTest::testVba()
OUString aFileName;
createFileURL(testInfo[i].sFileBaseName, aFileExtension, aFileName);
uno::Reference< com::sun::star::lang::XComponent > xComponent = loadFromDesktop(aFileName, "com.sun.star.text.TextDocument");
- OUStringBuffer sMsg( OUString("Failed to load ") );
+ OUStringBuffer sMsg( "Failed to load " );
sMsg.append ( aFileName );
CPPUNIT_ASSERT_MESSAGE( OUStringToOString( sMsg.makeStringAndClear(), RTL_TEXTENCODING_UTF8 ).getStr(), xComponent.is() );
diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx
index 99f0eeba5295..441770d5dd46 100644
--- a/tools/source/fsys/urlobj.cxx
+++ b/tools/source/fsys/urlobj.cxx
@@ -4661,7 +4661,7 @@ bool INetURLObject::setFSysPath(OUString const & rFSysPath,
break;
}
- OUStringBuffer aSynAbsURIRef(OUString("file://"));
+ OUStringBuffer aSynAbsURIRef("file://");
switch (eStyle)
{