[Libreoffice-commits] core.git: 35 commits - compilerplugins/clang connectivity/source cppu/source cui/source dbaccess/source desktop/source editeng/source extensions/source filter/source framework/source helpcompiler/inc idl/source include/rtl javaunohelper/source linguistic/source package/source pyuno/source sal/qa sal/rtl sal/util sc/qa sc/source sd/source sfx2/source shell/source svgio/source svtools/source svx/source sw/qa sw/source ucbhelper/source unotools/source vcl/generic vcl/source vcl/unx writerfilter/source xmloff/source xmlsecurity/source
Stephan Bergmann
sbergman at redhat.com
Fri Jun 26 04:56:27 PDT 2015
compilerplugins/clang/stringconstant.cxx | 12 ++-
connectivity/source/drivers/mork/mork_helper.cxx | 2
cppu/source/uno/lbenv.cxx | 5 -
cui/source/dialogs/hldocntp.cxx | 2
cui/source/options/optgenrl.cxx | 2
cui/source/options/optjava.cxx | 2
cui/source/options/optpath.cxx | 44 +++++-------
cui/source/options/webconninfo.cxx | 13 +--
dbaccess/source/ui/querydesign/QTableWindow.cxx | 3
dbaccess/source/ui/querydesign/QueryDesignView.cxx | 8 +-
dbaccess/source/ui/querydesign/QueryTableView.cxx | 2
desktop/source/migration/services/basicmigration.cxx | 4 -
editeng/source/editeng/editeng.cxx | 2
editeng/source/editeng/impedit3.cxx | 2
extensions/source/abpilot/fieldmappingimpl.cxx | 5 -
filter/source/svg/svgexport.cxx | 7 -
framework/source/accelerators/storageholder.cxx | 26 ++-----
framework/source/fwe/xml/statusbardocumenthandler.cxx | 3
framework/source/fwe/xml/toolboxdocumenthandler.cxx | 3
helpcompiler/inc/HelpCompiler.hxx | 3
idl/source/prj/command.cxx | 4 -
include/rtl/stringconcat.hxx | 5 -
include/rtl/ustring.h | 24 ++++++
include/rtl/ustring.hxx | 18 +++++
javaunohelper/source/javaunohelper.cxx | 2
linguistic/source/lngsvcmgr.cxx | 54 +++------------
package/source/zippackage/zipfileaccess.cxx | 6 -
pyuno/source/module/pyuno_runtime.cxx | 4 -
sal/qa/osl/file/osl_File.cxx | 16 ++--
sal/qa/osl/process/osl_process.cxx | 6 -
sal/qa/rtl/process/rtl_Process.cxx | 10 --
sal/qa/rtl/strings/test_oustring_concat.cxx | 8 ++
sal/rtl/bootstrap.cxx | 2
sal/rtl/ustring.cxx | 24 ++++++
sal/util/sal.map | 1
sc/qa/extras/macros-test.cxx | 2
sc/source/core/data/global2.cxx | 5 -
sc/source/core/tool/addincol.cxx | 30 +++-----
sc/source/core/tool/rangeutl.cxx | 6 -
sc/source/core/tool/unitconv.cxx | 9 --
sc/source/filter/excel/xicontent.cxx | 4 -
sc/source/filter/excel/xihelper.cxx | 2
sc/source/ui/docshell/impex.cxx | 3
sc/source/ui/optdlg/tpusrlst.cxx | 4 -
sc/source/ui/vba/vbapane.cxx | 16 ++--
sc/source/ui/vba/vbarange.cxx | 2
sc/source/ui/view/prevwsh.cxx | 6 -
sd/source/core/drawdoc3.cxx | 3
sd/source/ui/animations/CustomAnimationPane.cxx | 3
sd/source/ui/annotations/annotationtag.cxx | 6 -
sd/source/ui/dlg/tpaction.cxx | 3
sd/source/ui/func/fuprobjs.cxx | 5 -
sfx2/source/dialog/dialoghelper.cxx | 6 -
sfx2/source/notify/eventsupplier.cxx | 7 -
shell/source/backends/macbe/macbackend.mm | 2
svgio/source/svgreader/svgcharacternode.cxx | 2
svtools/source/misc/transfer.cxx | 41 +++--------
svtools/source/urlobj/inetimg.cxx | 16 ++--
svx/source/customshapes/EnhancedCustomShape2d.cxx | 18 ++---
svx/source/svdraw/svdotxat.cxx | 3
svx/source/xml/xmlxtexp.cxx | 2
sw/qa/core/uwriter.cxx | 2
sw/source/core/edit/autofmt.cxx | 8 +-
sw/source/core/fields/cellfml.cxx | 4 -
sw/source/core/fields/macrofld.cxx | 2
sw/source/core/unocore/unoidx.cxx | 2
sw/source/filter/ww8/ww8par5.cxx | 2
sw/source/ui/index/cnttab.cxx | 2
sw/source/uibase/dbui/dbmgr.cxx | 4 -
sw/source/uibase/envelp/envimg.cxx | 2
sw/source/uibase/shells/textsh.cxx | 5 -
sw/source/uibase/utlui/content.cxx | 6 -
sw/source/uibase/utlui/gloslst.cxx | 8 +-
ucbhelper/source/provider/providerhelper.cxx | 6 -
unotools/source/config/cmdoptions.cxx | 19 +----
unotools/source/config/dynamicmenuoptions.cxx | 26 +------
unotools/source/ucbhelper/tempfile.cxx | 3
vcl/generic/print/genpspgraphics.cxx | 2
vcl/source/gdi/configsettings.cxx | 10 --
vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx | 2
writerfilter/source/dmapper/DomainMapperTableHandler.cxx | 6 -
writerfilter/source/dmapper/DomainMapper_Impl.cxx | 6 -
xmloff/source/draw/shapeexport.cxx | 6 -
xmloff/source/draw/ximpbody.cxx | 5 -
xmloff/source/forms/elementimport.cxx | 2
xmlsecurity/source/framework/buffernode.cxx | 19 +----
xmlsecurity/source/framework/saxeventkeeperimpl.cxx | 37 +++-------
87 files changed, 332 insertions(+), 404 deletions(-)
New commits:
commit 5ed2014684adaeaeb6d92efb4a3d6075f5cc43c3
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Jun 26 13:54:58 2015 +0200
loplugin:stringconstant: handle OUString+=OUString(literal)
Change-Id: I85a88eaca89bb2c89a3ad374be09547f9b2ed78f
diff --git a/compilerplugins/clang/stringconstant.cxx b/compilerplugins/clang/stringconstant.cxx
index 7522641..7cc6d9a 100644
--- a/compilerplugins/clang/stringconstant.cxx
+++ b/compilerplugins/clang/stringconstant.cxx
@@ -357,6 +357,12 @@ bool StringConstant::VisitCallExpr(CallExpr const * expr) {
handleOUStringCtor(expr, 1, qname);
return true;
}
+ if (qname == "rtl::OUString::operator+=" && fdecl->getNumParams() == 1) {
+ handleOUStringCtor(
+ expr, dyn_cast<CXXOperatorCallExpr>(expr) == nullptr ? 0 : 1,
+ qname);
+ return true;
+ }
if (qname == "rtl::OUString::equals" && fdecl->getNumParams() == 1) {
unsigned n;
bool non;
commit 46a1538d1445aa2f8b56eaf1e6ad185295753d74
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Jun 26 13:54:47 2015 +0200
loplugin:stringconstant: handle OUString+=OUString(literal)
Change-Id: I8e819192d4464c3d03feb908b9acae5f91161fe9
diff --git a/xmlsecurity/source/framework/buffernode.cxx b/xmlsecurity/source/framework/buffernode.cxx
index 13bec53..6d35284 100644
--- a/xmlsecurity/source/framework/buffernode.cxx
+++ b/xmlsecurity/source/framework/buffernode.cxx
@@ -244,34 +244,29 @@ OUString BufferNode::printChildren() const
for( ; ii != m_vElementCollectors.end() ; ++ii )
{
- rc += OUString( "BufID=" );
- rc += OUString::number((*ii)->getBufferId());
+ rc += "BufID=" + OUString::number((*ii)->getBufferId());
if ((*ii)->getModify())
{
- rc += OUString( "[M]" );
+ rc += "[M]";
}
- rc += OUString( ",Pri=" );
+ rc += ",Pri=";
switch ((*ii)->getPriority())
{
case cssxc::sax::ElementMarkPriority_BEFOREMODIFY:
- rc += OUString( "BEFOREMODIFY" );
+ rc += "BEFOREMODIFY";
break;
case cssxc::sax::ElementMarkPriority_AFTERMODIFY:
- rc += OUString( "AFTERMODIFY" );
+ rc += "AFTERMODIFY";
break;
default:
- rc += OUString( "UNKNOWN" );
+ rc += "UNKNOWN";
break;
}
- rc += OUString( "(" );
- rc += OUString( "SecID=" );
- rc += OUString::number((*ii)->getSecurityId());
- rc += OUString( ")" );
- rc += OUString( " " );
+ rc += "(SecID=" + OUString::number((*ii)->getSecurityId()) + ") ";
}
return rc;
diff --git a/xmlsecurity/source/framework/saxeventkeeperimpl.cxx b/xmlsecurity/source/framework/saxeventkeeperimpl.cxx
index e6fa9ee..6bbd167 100644
--- a/xmlsecurity/source/framework/saxeventkeeperimpl.cxx
+++ b/xmlsecurity/source/framework/saxeventkeeperimpl.cxx
@@ -349,44 +349,36 @@ OUString SAXEventKeeperImpl::printBufferNode(
for ( int i=0; i<nIndent; ++i )
{
- rc += OUString( " " );
+ rc += " ";
}
if (pBufferNode == m_pCurrentBufferNode)
{
- rc += OUString( "[%]" );
+ rc += "[%]";
}
if (pBufferNode == m_pCurrentBlockingBufferNode)
{
- rc += OUString( "[B]" );
+ rc += "[B]";
}
- rc += OUString( " " );
- rc += m_xXMLDocument->getNodeName(pBufferNode->getXMLElement());
+ rc += " " + m_xXMLDocument->getNodeName(pBufferNode->getXMLElement());
BufferNode* pParent = const_cast<BufferNode*>(pBufferNode->getParent());
if (pParent != NULL)
{
- rc += OUString( "[" );
- rc += m_xXMLDocument->getNodeName(pParent->getXMLElement());
- rc += OUString( "]" );
+ rc += "[" + m_xXMLDocument->getNodeName(pParent->getXMLElement()) + "]";
}
- rc += OUString( ":EC=" );
- rc += pBufferNode->printChildren();
- rc += OUString( " BR=" );
+ rc += ":EC=" + pBufferNode->printChildren() + " BR=";
ElementMark * pBlocker = pBufferNode->getBlocker();
if (pBlocker != NULL)
{
- rc += OUString::number( pBlocker->getBufferId() );
- rc += OUString( "(SecId=" );
- rc += OUString::number( pBlocker->getSecurityId() );
- rc += OUString( ")" );
- rc += OUString( " " );
+ rc += OUString::number( pBlocker->getBufferId() ) + "(SecId="
+ + OUString::number( pBlocker->getSecurityId() ) + ") ";
}
- rc += OUString( "\n" );
+ rc += "\n";
std::vector< const BufferNode* >* vChildren = pBufferNode->getChildren();
std::vector< const BufferNode* >::const_iterator jj = vChildren->begin();
@@ -1050,12 +1042,11 @@ OUString SAL_CALL SAXEventKeeperImpl::printBufferNodeTree()
{
OUString rc;
- rc += OUString( "ElementMarkBuffers: size = " );
- rc += OUString::number(m_vElementMarkBuffers.size());
- rc += OUString( "\nCurrentBufferNode: " );
- rc += m_xXMLDocument->getNodeName(m_pCurrentBufferNode->getXMLElement());
- rc += OUString( "\n" );
- rc += printBufferNode(m_pRootBufferNode, 0);
+ rc += "ElementMarkBuffers: size = "
+ + OUString::number(m_vElementMarkBuffers.size())
+ + "\nCurrentBufferNode: "
+ + m_xXMLDocument->getNodeName(m_pCurrentBufferNode->getXMLElement())
+ + "\n" + printBufferNode(m_pRootBufferNode, 0);
return rc;
}
commit 5897e103b64db369fe62f64f32267018fdb70f52
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Jun 26 13:54:42 2015 +0200
loplugin:stringconstant: handle OUString+=OUString(literal)
Change-Id: I44c30ef19661d3274a4131dd05a5c786263fae59
diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx
index d4aee6c..be6b76d 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -3866,10 +3866,8 @@ void ImpExportEquations( SvXMLExport& rExport, const uno::Sequence< OUString >&
nIndex = aStr.indexOf( '?', nIndex );
if ( nIndex != -1 )
{
- OUString aNew( aStr.copy( 0, nIndex + 1 ) );
- aNew += OUString('f');
- aNew += aStr.copy( nIndex + 1, ( aStr.getLength() - nIndex ) - 1 );
- aStr = aNew;
+ aStr = aStr.copy(0, nIndex + 1) + "f"
+ + aStr.copy(nIndex + 1, aStr.getLength() - nIndex - 1);
nIndex++;
}
} while( nIndex != -1 );
diff --git a/xmloff/source/draw/ximpbody.cxx b/xmloff/source/draw/ximpbody.cxx
index c1f8f08..266135b 100644
--- a/xmloff/source/draw/ximpbody.cxx
+++ b/xmloff/source/draw/ximpbody.cxx
@@ -193,9 +193,8 @@ SdXMLDrawPageContext::SdXMLDrawPageContext( SdXMLImport& rImport,
OUString aFileName( maHREF.copy( 0, nIndex ) );
OUString aBookmarkName( maHREF.copy( nIndex+1 ) );
- maHREF = GetImport().GetAbsoluteReference( aFileName );
- maHREF += OUString(static_cast<sal_Unicode>('#'));
- maHREF += aBookmarkName;
+ maHREF = GetImport().GetAbsoluteReference( aFileName ) + "#"
+ + aBookmarkName;
}
xProps->setPropertyValue("BookmarkURL", uno::makeAny( maHREF ) );
diff --git a/xmloff/source/forms/elementimport.cxx b/xmloff/source/forms/elementimport.cxx
index 737f7e0..8aed521 100644
--- a/xmloff/source/forms/elementimport.cxx
+++ b/xmloff/source/forms/elementimport.cxx
@@ -1639,7 +1639,7 @@ namespace xmloff
// (somewhere else) to determine that a non-standard binding should be created.
// This hack is acceptable for OOo 1.1.1, since the file format for value
// bindings of form controls is to be changed afterwards, anyway.
- sBoundCellAddress += OUString( ":index" );
+ sBoundCellAddress += ":index";
}
OControlImport::doRegisterCellValueBinding( sBoundCellAddress );
commit ba257d74588335f5989a2fa553a7441b7c89e600
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Jun 26 13:54:37 2015 +0200
loplugin:stringconstant: handle OUString+=OUString(literal)
Change-Id: If9324bfb77d5f98ce6f968e0aa095f285ef7583f
diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
index 41daf91..cab6d92 100644
--- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
@@ -844,11 +844,9 @@ CellPropertyValuesSeq_t DomainMapperTableHandler::endTableGetCellProperties(Tabl
sal_Int32 nDebugCellProperties = aDebugCellProperties.getLength();
for( sal_Int32 nDebugProperty = 0; nDebugProperty < nDebugCellProperties; ++nDebugProperty)
{
- const OUString sName = aDebugCellProperties[nDebugProperty].Name;
- sNames += sName;
- sNames += OUString('-');
+ sNames += aDebugCellProperties[nDebugProperty].Name + "-";
}
- sNames += OUString('\n');
+ sNames += "\n";
}
(void)sNames;
}
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 42b5715..ff6ce1d 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -2672,8 +2672,7 @@ void FieldContext::AppendCommand(const OUString& rPart)
if (bInString)
{
- sPart += OUString(' ');
- sPart += sToken;
+ sPart += " " + sToken;
if (!bInStringNext)
{
aResult.push_back(sPart);
@@ -3720,8 +3719,7 @@ void DomainMapper_Impl::CloseFieldCommand()
if (aPartIt == aItEnd)
break;
- sURL += OUString('#');
- sURL += *aPartIt;
+ sURL += "#" + *aPartIt;
}
else if ( *aPartIt == "\\m" || *aPartIt == "\\n" )
{
commit 786447f12ddedce95217fffeedb5d6296ec388d4
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Jun 26 13:54:33 2015 +0200
loplugin:stringconstant: handle OUString+=OUString(literal)
Change-Id: I6c82e5071038990489e85ac27758867205ba476a
diff --git a/vcl/generic/print/genpspgraphics.cxx b/vcl/generic/print/genpspgraphics.cxx
index dfaca3d..5b5971f 100644
--- a/vcl/generic/print/genpspgraphics.cxx
+++ b/vcl/generic/print/genpspgraphics.cxx
@@ -1138,7 +1138,7 @@ ImplDevFontAttributes GenPspGraphics::Info2DevFontAttributes( const psp::FastPri
for(; it != rInfo.m_aAliases.end(); ++it )
{
if( bHasMapNames )
- aDFA.maMapNames += OUString(';');
+ aDFA.maMapNames += ";";
aDFA.maMapNames += *it;
bHasMapNames = true;
}
diff --git a/vcl/source/gdi/configsettings.cxx b/vcl/source/gdi/configsettings.cxx
index 6ec9e3b..f8d72e9 100644
--- a/vcl/source/gdi/configsettings.cxx
+++ b/vcl/source/gdi/configsettings.cxx
@@ -70,10 +70,7 @@ void SettingsConfigItem::ImplCommit()
SmallOUStrMap::const_iterator it;
for( it = group->second.begin(); it != group->second.end(); ++it )
{
- OUString aName( aKeyName );
- aName += OUString('/');
- aName += it->first;
- pValues[nIndex].Name = aName;
+ pValues[nIndex].Name = aKeyName + "/" + it->first;
pValues[nIndex].Handle = 0;
pValues[nIndex].Value <<= it->second;
pValues[nIndex].State = PropertyState_DIRECT_VALUE;
@@ -108,10 +105,7 @@ void SettingsConfigItem::getValues()
OUString* pTo = aSettingsKeys.getArray();
for( int m = 0; m < aKeys.getLength(); m++ )
{
- OUString aName( aKeyName );
- aName += OUString('/');
- aName += pFrom[m];
- pTo[m] = aName;
+ pTo[m] = aKeyName + "/" + pFrom[m];
}
Sequence< Any > aValues( GetProperties( aSettingsKeys ) );
const Any* pValue = aValues.getConstArray();
diff --git a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
index 6872c66..6512434 100644
--- a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
+++ b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
@@ -1906,7 +1906,7 @@ void SalGtkFilePicker::SetFilters()
for (std::set<OUString>::const_iterator aIter = aAllFormats.begin(); aIter != aEnd; ++aIter)
{
if (!sAllFilter.isEmpty())
- sAllFilter += OUString(';');
+ sAllFilter += ";";
sAllFilter += *aIter;
}
sPseudoFilter = getResString(FILE_PICKER_ALLFORMATS);
commit 7f8500191f24571d70fe6a8b8273102d65fd86e1
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Jun 26 13:54:29 2015 +0200
loplugin:stringconstant: handle OUString+=OUString(literal)
Change-Id: Ia9386f30413950b42fdbc9849e41e958f9282693
diff --git a/unotools/source/config/cmdoptions.cxx b/unotools/source/config/cmdoptions.cxx
index 17aca7f..7683fe9 100644
--- a/unotools/source/config/cmdoptions.cxx
+++ b/unotools/source/config/cmdoptions.cxx
@@ -43,11 +43,11 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans;
#define ROOTNODE_CMDOPTIONS OUString("Office.Commands/Execute")
-#define PATHDELIMITER OUString("/")
+#define PATHDELIMITER "/"
-#define SETNODE_DISABLED OUString("Disabled")
+#define SETNODE_DISABLED "Disabled"
-#define PROPERTYNAME_CMD OUString("Command")
+#define PROPERTYNAME_CMD "Command"
/*-****************************************************************************************************************
@descr support simple command option structures and operations on it
@@ -276,20 +276,11 @@ Sequence< OUString > SvtCommandOptions_Impl::impl_GetPropertyNames()
// First get ALL names of current existing list items in configuration!
Sequence< OUString > lDisabledItems = GetNodeNames( SETNODE_DISABLED, utl::CONFIG_NAME_LOCAL_PATH );
- OUString aSetNode( SETNODE_DISABLED );
- aSetNode += PATHDELIMITER;
-
- OUString aCommandKey( PATHDELIMITER );
- aCommandKey += PROPERTYNAME_CMD;
-
// Expand all keys
for (sal_Int32 i=0; i<lDisabledItems.getLength(); ++i )
{
- OUStringBuffer aBuffer( 32 );
- aBuffer.append( aSetNode );
- aBuffer.append( lDisabledItems[i] );
- aBuffer.append( aCommandKey );
- lDisabledItems[i] = aBuffer.makeStringAndClear();
+ lDisabledItems[i] = SETNODE_DISABLED PATHDELIMITER + lDisabledItems[i]
+ + PATHDELIMITER PROPERTYNAME_CMD;
}
// Return result.
diff --git a/unotools/source/config/dynamicmenuoptions.cxx b/unotools/source/config/dynamicmenuoptions.cxx
index 6a8659e..c8ba910 100644
--- a/unotools/source/config/dynamicmenuoptions.cxx
+++ b/unotools/source/config/dynamicmenuoptions.cxx
@@ -41,7 +41,7 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans;
#define ROOTNODE_MENUS OUString("Office.Common/Menus/")
-#define PATHDELIMITER OUString("/")
+#define PATHDELIMITER "/"
#define SETNODE_NEWMENU OUString("New")
#define SETNODE_WIZARDMENU OUString("Wizard")
@@ -538,7 +538,6 @@ void SvtDynamicMenuOptions_Impl::impl_SortAndExpandPropertyNames( const Sequence
Sequence< OUString >& lDestination ,
const OUString& sSetNode )
{
- OUString sFixPath;
vector< OUString > lTemp;
sal_Int32 nSourceCount = lSource.getLength();
sal_Int32 nDestinationStep = lDestination.getLength(); // start on end of current list ...!
@@ -560,23 +559,12 @@ void SvtDynamicMenuOptions_Impl::impl_SortAndExpandPropertyNames( const Sequence
pItem!=lTemp.end();
++pItem )
{
- sFixPath = sSetNode;
- sFixPath += PATHDELIMITER;
- sFixPath += *pItem;
- sFixPath += PATHDELIMITER;
-
- lDestination[nDestinationStep] = sFixPath;
- lDestination[nDestinationStep] += PROPERTYNAME_URL;
- ++nDestinationStep;
- lDestination[nDestinationStep] = sFixPath;
- lDestination[nDestinationStep] += PROPERTYNAME_TITLE;
- ++nDestinationStep;
- lDestination[nDestinationStep] = sFixPath;
- lDestination[nDestinationStep] += PROPERTYNAME_IMAGEIDENTIFIER;
- ++nDestinationStep;
- lDestination[nDestinationStep] = sFixPath;
- lDestination[nDestinationStep] += PROPERTYNAME_TARGETNAME;
- ++nDestinationStep;
+ OUString sFixPath(sSetNode + PATHDELIMITER + *pItem + PATHDELIMITER);
+ lDestination[nDestinationStep++] = sFixPath + PROPERTYNAME_URL;
+ lDestination[nDestinationStep++] = sFixPath + PROPERTYNAME_TITLE;
+ lDestination[nDestinationStep++] = sFixPath
+ + PROPERTYNAME_IMAGEIDENTIFIER;
+ lDestination[nDestinationStep++] = sFixPath + PROPERTYNAME_TARGETNAME;
}
}
diff --git a/unotools/source/ucbhelper/tempfile.cxx b/unotools/source/ucbhelper/tempfile.cxx
index 0dbd0d6..acd15e5 100644
--- a/unotools/source/ucbhelper/tempfile.cxx
+++ b/unotools/source/ucbhelper/tempfile.cxx
@@ -427,8 +427,7 @@ OUString TempFile::SetTempNameBaseDirectory( const OUString &rBaseName )
// append own internal directory
bRet = true;
OUString &rTempNameBase_Impl = TempNameBase_Impl::get();
- rTempNameBase_Impl = rBaseName;
- rTempNameBase_Impl += OUString('/');
+ rTempNameBase_Impl = rBaseName + "/";
TempFile aBase( NULL, true );
if ( aBase.IsValid() )
commit 647d7b0cd52603769c8d9ee15f0556291adb63c4
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Jun 26 13:54:25 2015 +0200
loplugin:stringconstant: handle OUString+=OUString(literal)
Change-Id: I6e534537883ef76db88926203bf21b6d0be0aab1
diff --git a/ucbhelper/source/provider/providerhelper.cxx b/ucbhelper/source/provider/providerhelper.cxx
index 67357d6..7385d9b 100644
--- a/ucbhelper/source/provider/providerhelper.cxx
+++ b/ucbhelper/source/provider/providerhelper.cxx
@@ -306,7 +306,7 @@ bool ContentProviderImplHelper::renameAdditionalPropertySet(
OUString aOldKeyWithoutSlash;
if ( !aOldKeyWithSlash.endsWith("/") )
{
- aOldKeyWithSlash += OUString( '/' );
+ aOldKeyWithSlash += "/";
aOldKeyWithoutSlash = rOldKey;
}
else if ( !rOldKey.isEmpty() )
@@ -390,7 +390,7 @@ bool ContentProviderImplHelper::copyAdditionalPropertySet(
OUString aSrcKeyWithoutSlash;
if ( !aSrcKeyWithSlash.endsWith("/") )
{
- aSrcKeyWithSlash += OUString( '/' );
+ aSrcKeyWithSlash += "/";
aSrcKeyWithoutSlash = rSourceKey;
}
else if ( !rSourceKey.isEmpty() )
@@ -526,7 +526,7 @@ bool ContentProviderImplHelper::removeAdditionalPropertySet(
OUString aKeyWithoutSlash;
if ( !aKeyWithSlash.endsWith("/") )
{
- aKeyWithSlash += OUString( '/' );
+ aKeyWithSlash += "/";
aKeyWithoutSlash = rKey;
}
else if ( !rKey.isEmpty() )
commit 523ce254a816be02acb7b5fe7ed99f60fef2e7c2
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Jun 26 13:54:21 2015 +0200
loplugin:stringconstant: handle OUString+=OUString(literal)
Change-Id: Idb9f1439a786d90679ed6eb95153844332e44b02
diff --git a/sw/qa/core/uwriter.cxx b/sw/qa/core/uwriter.cxx
index 849ce1b..e312d5c 100644
--- a/sw/qa/core/uwriter.cxx
+++ b/sw/qa/core/uwriter.cxx
@@ -1018,7 +1018,7 @@ getRandString()
int j = getRand(aText.getLength() - s);
OUString aRet(aText.copy(s, j));
if (!getRand(5))
- aRet += OUString('\n');
+ aRet += "\n";
// fprintf (stderr, "rand string '%s'\n", OUStringToOString(aRet, RTL_TEXTENCODING_UTF8).getStr());
return aRet;
}
diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx
index 7c118ca..c9d7b30 100644
--- a/sw/source/core/edit/autofmt.cxx
+++ b/sw/source/core/edit/autofmt.cxx
@@ -749,16 +749,16 @@ sal_uInt16 SwAutoFormat::GetDigitLevel( const SwTextNode& rNd, sal_Int32& rPos,
{
++nDigitLvl;
if( pPostfix )
- *pPostfix += OUString((sal_Unicode)1);
+ *pPostfix += "\x01";
}
if( pNumTypes )
- *pNumTypes += OUString((sal_Unicode)('0' + SVX_NUM_ARABIC));
+ *pNumTypes += OUStringLiteral1<'0' + SVX_NUM_ARABIC>();
eScan = eScan | CHG;
}
else if( pNumTypes && !(eScan & DIGIT) )
- *pNumTypes += OUString((sal_Unicode)('0' + SVX_NUM_ARABIC));
+ *pNumTypes += OUStringLiteral1<'0' + SVX_NUM_ARABIC>();
eScan &= ~DELIM; // remvoe Delim
if( 0 != (eScan & ~CHG) && DIGIT != (eScan & ~CHG))
@@ -825,7 +825,7 @@ sal_uInt16 SwAutoFormat::GetDigitLevel( const SwTextNode& rNd, sal_Int32& rPos,
{
++nDigitLvl;
if( pPostfix )
- *pPostfix += OUString((sal_Unicode)1);
+ *pPostfix += "\x01";
}
if( pNumTypes )
diff --git a/sw/source/core/fields/cellfml.cxx b/sw/source/core/fields/cellfml.cxx
index a44b3db..9ea3c45 100644
--- a/sw/source/core/fields/cellfml.cxx
+++ b/sw/source/core/fields/cellfml.cxx
@@ -226,7 +226,7 @@ double SwTableBox::GetValue( SwTableCalcPara& rCalcPara ) const
sal_uInt32 nTmpFormat = 0;
if( pNumFormatr->IsNumberFormat( sText, nTmpFormat, aNum ) &&
css::util::NumberFormat::NUMBER == pNumFormatr->GetType( nTmpFormat ))
- sText += OUString('%');
+ sText += "%";
}
if( pNumFormatr->IsNumberFormat( sText, nFormatIndex, aNum ))
@@ -352,7 +352,7 @@ void SwTableFormula::_MakeFormula( const SwTable& rTable, OUString& rNewStr,
if ( pTableBox->getRowSpan() >= 1 )
{
if( bDelim )
- rNewStr += OUString(cListDelim);
+ rNewStr += OUStringLiteral1<cListDelim>();
bDelim = true;
rNewStr += pCalcPara->rCalc.GetStrResult(
pTableBox->GetValue( *pCalcPara ), false );
diff --git a/sw/source/core/fields/macrofld.cxx b/sw/source/core/fields/macrofld.cxx
index 371ca8c..3d1ec70 100644
--- a/sw/source/core/fields/macrofld.cxx
+++ b/sw/source/core/fields/macrofld.cxx
@@ -202,7 +202,7 @@ void SwMacroField::CreateMacroString(
// concatenate library and name; use dot only if both strings have content
rMacro = rLibraryName;
if ( !rLibraryName.isEmpty() && !rMacroName.isEmpty() )
- rMacro += OUString('.');
+ rMacro += ".";
rMacro += rMacroName;
}
diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx
index 2523077..2c96470 100644
--- a/sw/source/core/unocore/unoidx.cxx
+++ b/sw/source/core/unocore/unoidx.cxx
@@ -2690,7 +2690,7 @@ throw (lang::IllegalArgumentException, lang::IndexOutOfBoundsException,
{
if(i)
{
- sSetStyles += OUString(TOX_STYLE_DELIMITER);
+ sSetStyles += OUStringLiteral1<TOX_STYLE_DELIMITER>();
}
SwStyleNameMapper::FillUIName(pStyles[i], aString,
nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, true);
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index 03e5181..33b39e7 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -2768,7 +2768,7 @@ static void lcl_toxMatchTSwitch(SwWW8ImplReader& rReader, SwTOXBase& rBase,
OUString sStyles( rBase.GetStyleNames( nLevel ) );
if( !sStyles.isEmpty() )
- sStyles += OUString(TOX_STYLE_DELIMITER);
+ sStyles += OUStringLiteral1<TOX_STYLE_DELIMITER>();
sStyles += sTemplate;
rBase.SetStyleNames( sStyles, nLevel );
}
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index d20dffb..4faab6b 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -743,7 +743,7 @@ IMPL_LINK_NOARG(SwAddStylesDlg_Impl, OkHdl)
if(nLevel != USHRT_MAX)
{
if(!pStyleArr[nLevel].isEmpty())
- pStyleArr[nLevel] += OUString(TOX_STYLE_DELIMITER);
+ pStyleArr[nLevel] += OUStringLiteral1<TOX_STYLE_DELIMITER>();
pStyleArr[nLevel] += SvTabListBox::GetEntryText(pEntry, 0);
}
pEntry = m_pHeaderTree->Next(pEntry);
diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index bc86274..f31aaae 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -630,9 +630,9 @@ void SwDBManager::ImportDBEntry(SwWrtShell* pSh)
SwDBFormatData aDBFormat;
OUString sInsert = GetDBField( xColumnProp, aDBFormat);
if( DB_SEP_SPACE == nSeparator )
- sInsert += OUString(cSpace);
+ sInsert += OUStringLiteral1<cSpace>();
else if( DB_SEP_TAB == nSeparator)
- sInsert += OUString(cTab);
+ sInsert += OUStringLiteral1<cTab>();
pSh->Insert(sInsert);
if( DB_SEP_RETURN == nSeparator)
pSh->SplitNode();
diff --git a/sw/source/uibase/envelp/envimg.cxx b/sw/source/uibase/envelp/envimg.cxx
index f7dfd09..135db95 100644
--- a/sw/source/uibase/envelp/envimg.cxx
+++ b/sw/source/uibase/envelp/envimg.cxx
@@ -66,7 +66,7 @@ OUString MakeSender()
else if (sToken == "CR")
{
if(bLastLength)
- sRet += OUString(NEXTLINE);
+ sRet += OUStringLiteral1<NEXTLINE>();
bLastLength = true;
}
else if (sToken == "FIRSTNAME")
diff --git a/sw/source/uibase/shells/textsh.cxx b/sw/source/uibase/shells/textsh.cxx
index d2f69e1..9bab3ad 100644
--- a/sw/source/uibase/shells/textsh.cxx
+++ b/sw/source/uibase/shells/textsh.cxx
@@ -435,9 +435,8 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
if (!GetShell().IsTableComplexForChart())
{
SwFrameFormat* pTableFormat = GetShell().GetTableFormat();
- aRangeString = pTableFormat->GetName();
- aRangeString += OUString( '.' );
- aRangeString += GetShell().GetBoxNms();
+ aRangeString = pTableFormat->GetName() + "."
+ + GetShell().GetBoxNms();
// get table data provider
xDataProvider.set( GetView().GetDocShell()->getIDocumentChartDataProviderAccess()->GetChartDataProvider() );
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx
index ad307b8..b81bc63 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -1857,12 +1857,10 @@ bool SwContentTree::FillTransferData( TransferDataContainer& rTransfer,
}
const OUString& rToken = pCnt->GetParent()->GetTypeToken();
- sUrl += "#";
- sUrl += sEntry;
+ sUrl += "#" + sEntry;
if(!rToken.isEmpty())
{
- sUrl += OUString(cMarkSeparator);
- sUrl += rToken;
+ sUrl += OUStringLiteral1<cMarkSeparator>() + rToken;
}
}
else
diff --git a/sw/source/uibase/utlui/gloslst.cxx b/sw/source/uibase/utlui/gloslst.cxx
index 4d3f12c..f718365 100644
--- a/sw/source/uibase/utlui/gloslst.cxx
+++ b/sw/source/uibase/utlui/gloslst.cxx
@@ -382,10 +382,10 @@ void SwGlossaryList::FillGroup(AutoTextGroup* pGroup, SwGlossaries* pGlossaries)
for(sal_uInt16 j = 0; j < pGroup->nCount; j++)
{
- pGroup->sLongNames += pBlock->GetLongName(j);
- pGroup->sLongNames += OUString(STRING_DELIM);
- pGroup->sShortNames += pBlock->GetShortName(j);
- pGroup->sShortNames += OUString(STRING_DELIM);
+ pGroup->sLongNames += pBlock->GetLongName(j)
+ + OUStringLiteral1<STRING_DELIM>();
+ pGroup->sShortNames += pBlock->GetShortName(j)
+ + OUStringLiteral1<STRING_DELIM>();
}
delete pBlock;
}
commit 255c96178890f3dabb2b644a044b3f60e173cb09
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Jun 26 13:54:18 2015 +0200
loplugin:stringconstant: handle OUString+=OUString(literal)
Change-Id: If1ad4df75f592c5f9bfedb490243526007fff35f
diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx
index 1104690..f034267 100644
--- a/svx/source/customshapes/EnhancedCustomShape2d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx
@@ -114,14 +114,14 @@ OUString EnhancedCustomShape2d::GetEquation( const sal_uInt16 nFlags, sal_Int32
default :
{
EnhancedCustomShape2d::AppendEnhancedCustomShapeEquationParameter( aEquation, nP1, b1Special );
- aEquation += OUString( (sal_Unicode)'+' );
+ aEquation += "+";
EnhancedCustomShape2d::AppendEnhancedCustomShapeEquationParameter( aEquation, nP2, b2Special );
}
break;
}
if ( b3Special || nP3 )
{
- aEquation += OUString( (sal_Unicode)'-' );
+ aEquation += "-";
EnhancedCustomShape2d::AppendEnhancedCustomShapeEquationParameter( aEquation, nP3, b3Special );
}
}
@@ -131,12 +131,12 @@ OUString EnhancedCustomShape2d::GetEquation( const sal_uInt16 nFlags, sal_Int32
EnhancedCustomShape2d::AppendEnhancedCustomShapeEquationParameter( aEquation, nP1, b1Special );
if ( b2Special || ( nP2 != 1 ) )
{
- aEquation += OUString( (sal_Unicode)'*' );
+ aEquation += "*";
EnhancedCustomShape2d::AppendEnhancedCustomShapeEquationParameter( aEquation, nP2, b2Special );
}
if ( b3Special || ( ( nP3 != 1 ) && ( nP3 != 0 ) ) )
{
- aEquation += OUString( (sal_Unicode)'/' );
+ aEquation += "/";
EnhancedCustomShape2d::AppendEnhancedCustomShapeEquationParameter( aEquation, nP3, b3Special );
}
}
@@ -179,11 +179,11 @@ OUString EnhancedCustomShape2d::GetEquation( const sal_uInt16 nFlags, sal_Int32
{
aEquation += "if(";
EnhancedCustomShape2d::AppendEnhancedCustomShapeEquationParameter( aEquation, nP1, b1Special );
- aEquation += OUString( (sal_Unicode)',' );
+ aEquation += ",";
EnhancedCustomShape2d::AppendEnhancedCustomShapeEquationParameter( aEquation, nP2, b2Special );
- aEquation += OUString( (sal_Unicode)',' );
+ aEquation += ",";
EnhancedCustomShape2d::AppendEnhancedCustomShapeEquationParameter( aEquation, nP3, b3Special );
- aEquation += OUString( (sal_Unicode)')' );
+ aEquation += ")";
}
break;
case 7 :
@@ -200,7 +200,7 @@ OUString EnhancedCustomShape2d::GetEquation( const sal_uInt16 nFlags, sal_Int32
EnhancedCustomShape2d::AppendEnhancedCustomShapeEquationParameter( aEquation, nP3, b3Special );
aEquation += "*";
EnhancedCustomShape2d::AppendEnhancedCustomShapeEquationParameter( aEquation, nP3, b3Special );
- aEquation += OUString( (sal_Unicode)')' );
+ aEquation += ")";
}
break;
case 8 :
@@ -288,7 +288,7 @@ OUString EnhancedCustomShape2d::GetEquation( const sal_uInt16 nFlags, sal_Int32
EnhancedCustomShape2d::AppendEnhancedCustomShapeEquationParameter( aEquation, nP1, b1Special );
aEquation += "*";
EnhancedCustomShape2d::AppendEnhancedCustomShapeEquationParameter( aEquation, nP1, b1Special );
- aEquation += OUString( (sal_Unicode)')' );
+ aEquation += ")";
}
break;
case 0x81 :
diff --git a/svx/source/svdraw/svdotxat.cxx b/svx/source/svdraw/svdotxat.cxx
index 52e7150..c1f9ce8 100644
--- a/svx/source/svdraw/svdotxat.cxx
+++ b/svx/source/svdraw/svdotxat.cxx
@@ -443,8 +443,7 @@ void SdrTextObj::AppendFamilyToStyleName(OUString& styleName, SfxStyleFamily fam
aFam.append(static_cast<sal_Int32>(family));
comphelper::string::padToLength(aFam, PADDING_LENGTH_FOR_STYLE_FAMILY , PADDING_CHARACTER_FOR_STYLE_FAMILY);
- styleName += OUString('|');
- styleName += aFam.makeStringAndClear();
+ styleName += "|" + aFam.makeStringAndClear();
}
SfxStyleFamily SdrTextObj::ReadFamilyFromStyleName(const OUString& styleName)
diff --git a/svx/source/xml/xmlxtexp.cxx b/svx/source/xml/xmlxtexp.cxx
index aa9107a..9b71b37 100644
--- a/svx/source/xml/xmlxtexp.cxx
+++ b/svx/source/xml/xmlxtexp.cxx
@@ -271,7 +271,7 @@ bool SvxXMLXTableExportComponent::save(
}
else
{
- aPath += OUString( ".xml" );
+ aPath += ".xml";
try {
xStream = xStorage->openStreamElement( aPath, eCreate );
if( !xStream.is() )
commit cec3fd6de65a0f526c2b990e8dc54935d0a7864a
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Jun 26 13:54:14 2015 +0200
loplugin:stringconstant: handle OUString+=OUString(literal)
Change-Id: I655751536bd084d01bce436c043eca754c58849f
diff --git a/svtools/source/misc/transfer.cxx b/svtools/source/misc/transfer.cxx
index 0de880d..cc04d4d 100644
--- a/svtools/source/misc/transfer.cxx
+++ b/svtools/source/misc/transfer.cxx
@@ -111,22 +111,17 @@ SvStream& WriteTransferableObjectDescriptor( SvStream& rOStm, const Transferable
static OUString ImplGetParameterString( const TransferableObjectDescriptor& rObjDesc )
{
- const OUString aChar( "\"" );
const OUString aClassName( rObjDesc.maClassName.GetHexName() );
OUString aParams;
if( !aClassName.isEmpty() )
{
- aParams += OUString( ";classname=\"" );
- aParams += aClassName;
- aParams += aChar;
+ aParams += ";classname=\"" + aClassName + "\"";
}
if( !rObjDesc.maTypeName.isEmpty() )
{
- aParams += OUString( ";typename=\"" );
- aParams += rObjDesc.maTypeName;
- aParams += aChar;
+ aParams += ";typename=\"" + rObjDesc.maTypeName + "\"";
}
if( !rObjDesc.maDisplayName.isEmpty() )
@@ -147,30 +142,18 @@ static OUString ImplGetParameterString( const TransferableObjectDescriptor& rObj
pToAccept[nChar] = sal_True;
}
- aParams += OUString( ";displayname=\"" );
- aParams += ::rtl::Uri::encode( rObjDesc.maDisplayName, pToAccept, rtl_UriEncodeIgnoreEscapes, RTL_TEXTENCODING_UTF8 );
- aParams += aChar;
+ aParams += ";displayname=\""
+ + rtl::Uri::encode(
+ rObjDesc.maDisplayName, pToAccept, rtl_UriEncodeIgnoreEscapes,
+ RTL_TEXTENCODING_UTF8)
+ + "\"";
}
- aParams += OUString( ";viewaspect=\"" );
- aParams += OUString::number( rObjDesc.mnViewAspect );
- aParams += aChar;
-
- aParams += OUString( ";width=\"" );
- aParams += OUString::number( rObjDesc.maSize.Width() );
- aParams += aChar;
-
- aParams += OUString( ";height=\"" );
- aParams += OUString::number( rObjDesc.maSize.Height() );
- aParams += aChar;
-
- aParams += OUString( ";posx=\"" );
- aParams += OUString::number( rObjDesc.maDragStartPos.X() );
- aParams += aChar;
-
- aParams += OUString( ";posy=\"" );
- aParams += OUString::number( rObjDesc.maDragStartPos.X() );
- aParams += aChar;
+ aParams += ";viewaspect=\"" + OUString::number(rObjDesc.mnViewAspect)
+ + "\";width=\"" + OUString::number(rObjDesc.maSize.Width())
+ + "\";height=\"" + OUString::number(rObjDesc.maSize.Height())
+ + "\";posx=\"" + OUString::number(rObjDesc.maDragStartPos.X())
+ + "\";posy=\"" + OUString::number(rObjDesc.maDragStartPos.X()) + "\"";
return aParams;
}
diff --git a/svtools/source/urlobj/inetimg.cxx b/svtools/source/urlobj/inetimg.cxx
index 51ef978..d1b7fd7 100644
--- a/svtools/source/urlobj/inetimg.cxx
+++ b/svtools/source/urlobj/inetimg.cxx
@@ -32,14 +32,14 @@ bool INetImage::Write( SvStream& rOStm, SotClipboardFormatId nFormat ) const
{
case SotClipboardFormatId::INET_IMAGE:
{
- OUString sString;
- (sString += aImageURL ) += OUString(TOKEN_SEPARATOR);
- (sString += aTargetURL ) += OUString(TOKEN_SEPARATOR);
- (sString += aTargetFrame ) += OUString(TOKEN_SEPARATOR);
- (sString += aAlternateText ) += OUString(TOKEN_SEPARATOR);
- sString += OUString::number( aSizePixel.Width() );
- sString += OUString(TOKEN_SEPARATOR);
- sString += OUString::number( aSizePixel.Height() );
+ OUString sString(
+ aImageURL + OUStringLiteral1<TOKEN_SEPARATOR>() + aTargetURL
+ + OUStringLiteral1<TOKEN_SEPARATOR>() + aTargetFrame
+ + OUStringLiteral1<TOKEN_SEPARATOR>() + aAlternateText
+ + OUStringLiteral1<TOKEN_SEPARATOR>()
+ + OUString::number(aSizePixel.Width())
+ + OUStringLiteral1<TOKEN_SEPARATOR>()
+ + OUString::number(aSizePixel.Height()));
OString sOut(OUStringToOString(sString,
RTL_TEXTENCODING_UTF8));
commit c92853c93e537b75444ea2852777d73390de1b1a
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Jun 26 13:54:11 2015 +0200
loplugin:stringconstant: handle OUString+=OUString(literal)
Change-Id: I367a880669138406e715e8574543b1d54754b0ba
diff --git a/svgio/source/svgreader/svgcharacternode.cxx b/svgio/source/svgreader/svgcharacternode.cxx
index 5fe2ef3..9dcaba7 100644
--- a/svgio/source/svgreader/svgcharacternode.cxx
+++ b/svgio/source/svgreader/svgcharacternode.cxx
@@ -558,7 +558,7 @@ namespace svgio
void SvgCharacterNode::addGap()
{
- maText += OUString(' ');
+ maText += " ";
}
void SvgCharacterNode::concatenate(const OUString& rText)
commit a023842a74e2611e70db076457688539c65e6ab1
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Jun 26 13:54:07 2015 +0200
loplugin:stringconstant: handle OUString+=OUString(literal)
Change-Id: I4ba0f758304977825d44dd1e3c8f348a94546a38
diff --git a/shell/source/backends/macbe/macbackend.mm b/shell/source/backends/macbe/macbackend.mm
index f2fff03..2b0acf5 100644
--- a/shell/source/backends/macbe/macbackend.mm
+++ b/shell/source/backends/macbe/macbackend.mm
@@ -410,7 +410,7 @@ css::uno::Any MacOSXBackend::getPropertyValue(
CFStringRef rException = static_cast<CFStringRef>(CFArrayGetValueAtIndex(rExceptionsList, idx));
if (idx>0)
- aProxyBypassList += rtl::OUString(";");
+ aProxyBypassList += ";";
aProxyBypassList += CFStringToOUString(rException);
}
commit 99f4c12a6e75058587f779d52db77ba20f85dac8
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Jun 26 13:54:03 2015 +0200
loplugin:stringconstant: handle OUString+=OUString(literal)
Change-Id: I40b8e5df15d836a00536d9f21cd1125264aefd86
diff --git a/sfx2/source/dialog/dialoghelper.cxx b/sfx2/source/dialog/dialoghelper.cxx
index e60edb1..554238d 100644
--- a/sfx2/source/dialog/dialoghelper.cxx
+++ b/sfx2/source/dialog/dialoghelper.cxx
@@ -88,10 +88,8 @@ OUString getWidestTime(const LocaleDataWrapper& rWrapper)
OUString formatTime(const DateTime& rDateTime, const LocaleDataWrapper& rWrapper)
{
- OUString sString = rWrapper.getDate(rDateTime);
- sString += OUString(' ');
- sString += rWrapper.getTime(rDateTime, false);
- return sString;
+ return rWrapper.getDate(rDateTime) + " "
+ + rWrapper.getTime(rDateTime, false);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/notify/eventsupplier.cxx b/sfx2/source/notify/eventsupplier.cxx
index b6ad3b1..51ad4dc 100644
--- a/sfx2/source/notify/eventsupplier.cxx
+++ b/sfx2/source/notify/eventsupplier.cxx
@@ -463,11 +463,8 @@ void SfxEvents_Impl::NormalizeMacro( const ::comphelper::NamedValueCollection& i
{
aScript = MACRO_PRFIX;
if ( aLibrary != SfxGetpApp()->GetName() && aLibrary != "StarDesktop" && aLibrary != "application" )
- aScript += OUString('.');
-
- aScript += OUString('/');
- aScript += aMacroName;
- aScript += OUString( MACRO_POSTFIX );
+ aScript += ".";
+ aScript += "/" + aMacroName + MACRO_POSTFIX;
}
else
// wrong properties
commit 85c6b88e74b4a6f058cc55c2ed2772699211ce66
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Jun 26 13:54:00 2015 +0200
loplugin:stringconstant: handle OUString+=OUString(literal)
Change-Id: I0d1d7f598a0c61d36d72f9d51cccdcd1071c30b6
diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx
index 3383060..e274f03 100644
--- a/sd/source/core/drawdoc3.cxx
+++ b/sd/source/core/drawdoc3.cxx
@@ -112,7 +112,8 @@ void InsertBookmarkAsPage_FindDuplicateLayouts::operator()( SdDrawDocument& rDoc
// about this
if( bRenameDuplicates && aTest != OUString( SdResId( STR_LAYOUT_DEFAULT_NAME ) ) && pTestPage->getHash() != pBMMPage->getHash() )
{
- pBookmarkDoc->RenameLayoutTemplate( pBMMPage->GetLayoutName(), OUString(pBMMPage->GetName())+=OUString("_") );
+ pBookmarkDoc->RenameLayoutTemplate(
+ pBMMPage->GetLayoutName(), pBMMPage->GetName() + "_");
aLayout = pBMMPage->GetName();
break;
diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx
index 0ff1b97..f6446ae 100644
--- a/sd/source/ui/animations/CustomAnimationPane.cxx
+++ b/sd/source/ui/animations/CustomAnimationPane.cxx
@@ -520,8 +520,7 @@ void CustomAnimationPane::updateControls()
if( !aUIName.isEmpty() )
{
- aTemp += OUString( (sal_Unicode)' ' );
- aTemp += aUIName;
+ aTemp += " " + aUIName;
mpFTEffect->SetText( aTemp );
}
diff --git a/sd/source/ui/annotations/annotationtag.cxx b/sd/source/ui/annotations/annotationtag.cxx
index 5301029..f5a75cf 100644
--- a/sd/source/ui/annotations/annotationtag.cxx
+++ b/sd/source/ui/annotations/annotationtag.cxx
@@ -517,9 +517,9 @@ BitmapEx AnnotationTag::CreateAnnotationBitmap( bool bSelected )
{
ScopedVclPtrInstance< VirtualDevice > pVDev;
- OUString sAuthor( getInitials( mxAnnotation->getAuthor() ) );
- sAuthor += OUString( ' ' );
- sAuthor += OUString::number( mnIndex );
+ OUString sAuthor(
+ getInitials(mxAnnotation->getAuthor()) + " "
+ + OUString::number(mnIndex));
pVDev->SetFont( mrFont );
diff --git a/sd/source/ui/dlg/tpaction.cxx b/sd/source/ui/dlg/tpaction.cxx
index e038120..81a7114 100644
--- a/sd/source/ui/dlg/tpaction.cxx
+++ b/sd/source/ui/dlg/tpaction.cxx
@@ -844,8 +844,7 @@ OUString SdTPAction::GetEditText( bool bFullDocDestination )
OUString aTmpStr( m_pLbTreeDocument->GetSelectEntry() );
if( !aTmpStr.isEmpty() )
{
- aStr += OUString(DOCUMENT_TOKEN);
- aStr += aTmpStr;
+ aStr += OUStringLiteral1<DOCUMENT_TOKEN>() + aTmpStr;
}
}
diff --git a/sd/source/ui/func/fuprobjs.cxx b/sd/source/ui/func/fuprobjs.cxx
index 3946dc7..46988bf 100644
--- a/sd/source/ui/func/fuprobjs.cxx
+++ b/sd/source/ui/func/fuprobjs.cxx
@@ -127,9 +127,8 @@ void FuPresentationObjects::DoExecute( SfxRequest& )
else
{
ePO = (PresentationObjects) ( PO_OUTLINE_1 + nDepth - 1 );
- aStyleName += SD_RESSTR(STR_LAYOUT_OUTLINE);
- aStyleName += OUString(' ') ;
- aStyleName += OUString::number( nDepth ) ;
+ aStyleName += SD_RESSTR(STR_LAYOUT_OUTLINE) + " "
+ + OUString::number(nDepth);
}
SfxStyleSheetBasePool* pStyleSheetPool = mpDocSh->GetStyleSheetPool();
commit cf029c125d188c22b87590f1d58d3866f9ea796a
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Jun 26 13:53:58 2015 +0200
loplugin:stringconstant: handle OUString+=OUString(literal)
Change-Id: Ie4e62535848718ca66a1fa977b09891e91ee7421
diff --git a/sc/qa/extras/macros-test.cxx b/sc/qa/extras/macros-test.cxx
index 3bc3a94..d769ff4 100644
--- a/sc/qa/extras/macros-test.cxx
+++ b/sc/qa/extras/macros-test.cxx
@@ -238,7 +238,7 @@ void ScMacrosTest::testVba()
OUString sTempDirURL;
osl::FileBase:: getTempDirURL( sTempDirURL );
osl::FileBase::getSystemPathFromFileURL( sTempDirURL, sTempDir );
- sTempDir += OUString( SAL_PATHDELIMITER );
+ sTempDir += OUStringLiteral1<SAL_PATHDELIMITER>();
OUString sTestFileName("My Test WorkBook.xls");
Sequence< uno::Any > aParams;
for ( sal_uInt32 i=0; i<SAL_N_ELEMENTS( testInfo ); ++i )
diff --git a/sc/source/core/data/global2.cxx b/sc/source/core/data/global2.cxx
index afafff4..71867c4 100644
--- a/sc/source/core/data/global2.cxx
+++ b/sc/source/core/data/global2.cxx
@@ -351,9 +351,8 @@ OUString ScGlobal::GetDocTabName( const OUString& rFileName,
aDocTab = aDocTab.replaceAt( nPos, 0, "\\" );
nPos += 2;
}
- aDocTab += "'";
- aDocTab += OUString(SC_COMPILER_FILE_TAB_SEP);
- aDocTab += rTabName; // "'Doc'#Tab"
+ aDocTab += "'" + OUStringLiteral1<SC_COMPILER_FILE_TAB_SEP>() + rTabName;
+ // "'Doc'#Tab"
return aDocTab;
}
diff --git a/sc/source/core/tool/addincol.cxx b/sc/source/core/tool/addincol.cxx
index cb64c1a..3dc1d49 100644
--- a/sc/source/core/tool/addincol.cxx
+++ b/sc/source/core/tool/addincol.cxx
@@ -379,9 +379,7 @@ void ScUnoAddInCollection::ReadConfiguration()
OUString aServiceName = aServiceNames[nService];
ScUnoAddInHelpIdGenerator aHelpIdGenerator( aServiceName );
- OUString aFunctionsPath = aServiceName;
- aFunctionsPath += sSlash;
- aFunctionsPath += OUString(CFGSTR_ADDINFUNCTIONS);
+ OUString aFunctionsPath(aServiceName + sSlash + CFGSTR_ADDINFUNCTIONS);
uno::Sequence<OUString> aFunctionNames = rAddInConfig.GetNodeNames( aFunctionsPath );
sal_Int32 nNewCount = aFunctionNames.getLength();
@@ -440,12 +438,12 @@ void ScUnoAddInCollection::ReadConfiguration()
uno::Sequence<OUString> aFuncPropNames(CFG_FUNCPROP_COUNT);
OUString* pNameArray = aFuncPropNames.getArray();
- pNameArray[CFG_FUNCPROP_DISPLAYNAME] = aFuncPropPath;
- pNameArray[CFG_FUNCPROP_DISPLAYNAME] += OUString(CFGSTR_DISPLAYNAME);
- pNameArray[CFG_FUNCPROP_DESCRIPTION] = aFuncPropPath;
- pNameArray[CFG_FUNCPROP_DESCRIPTION] += OUString(CFGSTR_DESCRIPTION);
- pNameArray[CFG_FUNCPROP_CATEGORY] = aFuncPropPath;
- pNameArray[CFG_FUNCPROP_CATEGORY] += OUString(CFGSTR_CATEGORY);
+ pNameArray[CFG_FUNCPROP_DISPLAYNAME] = aFuncPropPath
+ + CFGSTR_DISPLAYNAME;
+ pNameArray[CFG_FUNCPROP_DESCRIPTION] = aFuncPropPath
+ + CFGSTR_DESCRIPTION;
+ pNameArray[CFG_FUNCPROP_CATEGORY] = aFuncPropPath
+ + CFGSTR_CATEGORY;
uno::Sequence<uno::Any> aFuncProperties = rAddInConfig.GetProperties( aFuncPropNames );
if ( aFuncProperties.getLength() == CFG_FUNCPROP_COUNT )
@@ -462,8 +460,7 @@ void ScUnoAddInCollection::ReadConfiguration()
::std::vector<ScUnoAddInFuncData::LocalizedName> aCompNames;
- OUString aCompPath = aFuncPropPath;
- aCompPath += OUString(CFGSTR_COMPATIBILITYNAME);
+ OUString aCompPath(aFuncPropPath + CFGSTR_COMPATIBILITYNAME);
uno::Sequence<OUString> aCompPropNames( &aCompPath, 1 );
uno::Sequence<uno::Any> aCompProperties = aAllLocalesConfig.GetProperties( aCompPropNames );
@@ -494,8 +491,7 @@ void ScUnoAddInCollection::ReadConfiguration()
long nVisibleCount = 0;
long nCallerPos = SC_CALLERPOS_NONE;
- OUString aArgumentsPath = aFuncPropPath;
- aArgumentsPath += OUString(CFGSTR_PARAMETERS);
+ OUString aArgumentsPath(aFuncPropPath + CFGSTR_PARAMETERS);
uno::Sequence<OUString> aArgumentNames = rAddInConfig.GetNodeNames( aArgumentsPath );
sal_Int32 nArgumentCount = aArgumentNames.getLength();
@@ -515,10 +511,10 @@ void ScUnoAddInCollection::ReadConfiguration()
aOneArgPath += pArgNameArray[nArgument];
aOneArgPath += sSlash;
- pPropNameArray[nIndex] = aOneArgPath;
- pPropNameArray[nIndex++] += OUString(CFGSTR_DISPLAYNAME);
- pPropNameArray[nIndex] = aOneArgPath;
- pPropNameArray[nIndex++] += OUString(CFGSTR_DESCRIPTION);
+ pPropNameArray[nIndex++] = aOneArgPath
+ + CFGSTR_DISPLAYNAME;
+ pPropNameArray[nIndex++] = aOneArgPath
+ + CFGSTR_DESCRIPTION;
}
uno::Sequence<uno::Any> aArgProperties = rAddInConfig.GetProperties( aArgPropNames );
diff --git a/sc/source/core/tool/rangeutl.cxx b/sc/source/core/tool/rangeutl.cxx
index e101463..fe8b5c0 100644
--- a/sc/source/core/tool/rangeutl.cxx
+++ b/sc/source/core/tool/rangeutl.cxx
@@ -645,10 +645,8 @@ void ScRangeStringConverter::GetStringFromRange(
ScAddress aEndAddress( rRange.aEnd );
OUString sStartAddress(aStartAddress.Format(nFormatFlags, pDocument, eConv));
OUString sEndAddress(aEndAddress.Format(nFormatFlags, pDocument, eConv));
- OUString sOUStartAddress( sStartAddress );
- sOUStartAddress += OUString(':');
- sOUStartAddress += OUString( sEndAddress );
- AssignString( rString, sOUStartAddress, bAppendStr, cSeparator );
+ AssignString(
+ rString, sStartAddress + ":" + sEndAddress, bAppendStr, cSeparator);
}
}
diff --git a/sc/source/core/tool/unitconv.cxx b/sc/source/core/tool/unitconv.cxx
index d2d2bec9..ef72184 100644
--- a/sc/source/core/tool/unitconv.cxx
+++ b/sc/source/core/tool/unitconv.cxx
@@ -81,12 +81,9 @@ ScUnitConverter::ScUnitConverter()
OUString sPrefix = pNodeArray[i];
sPrefix += sSlash;
- pValNameArray[nIndex] = sPrefix;
- pValNameArray[nIndex++] += OUString( CFGSTR_UNIT_FROM );
- pValNameArray[nIndex] = sPrefix;
- pValNameArray[nIndex++] += OUString( CFGSTR_UNIT_TO );
- pValNameArray[nIndex] = sPrefix;
- pValNameArray[nIndex++] += OUString( CFGSTR_UNIT_FACTOR );
+ pValNameArray[nIndex++] = sPrefix + CFGSTR_UNIT_FROM;
+ pValNameArray[nIndex++] = sPrefix + CFGSTR_UNIT_TO;
+ pValNameArray[nIndex++] = sPrefix + CFGSTR_UNIT_FACTOR;
}
Sequence<Any> aProperties = aConfigItem.GetProperties(aValNames);
diff --git a/sc/source/filter/excel/xicontent.cxx b/sc/source/filter/excel/xicontent.cxx
index b473982..3b10649 100644
--- a/sc/source/filter/excel/xicontent.cxx
+++ b/sc/source/filter/excel/xicontent.cxx
@@ -372,10 +372,10 @@ void XclImpHyperlink::ConvertToValidTabName(OUString& rUrl)
if (!bInQuote && !aTabName.isEmpty())
{
if (bQuoteTabName)
- aNewUrl += OUString('\'');
+ aNewUrl += "'";
aNewUrl += aTabName;
if (bQuoteTabName)
- aNewUrl += OUString('\'');
+ aNewUrl += "'";
}
}
else if (bInQuote)
diff --git a/sc/source/filter/excel/xihelper.cxx b/sc/source/filter/excel/xihelper.cxx
index 1309d04..1f7446d 100644
--- a/sc/source/filter/excel/xihelper.cxx
+++ b/sc/source/filter/excel/xihelper.cxx
@@ -693,7 +693,7 @@ void XclImpUrlHelper::DecodeUrl(
rUrl += "\\";
else // control character in raw name -> DDE link
{
- rUrl += OUString( EXC_DDE_DELIM );
+ rUrl += OUStringLiteral1<EXC_DDE_DELIM>();
eState = xlUrlRaw;
}
break;
diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index 1b46428..c9f2c70 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -2375,8 +2375,7 @@ OUString ReadCsvLine( SvStream &rStream, bool bEmbeddedLineBreak,
nLastOffset = aStr.getLength();
OUString aNext;
rStream.ReadUniOrByteStringLine(aNext, rStream.GetStreamCharSet(), nArbitraryLineLengthLimit);
- aStr += OUString('\n');
- aStr += aNext;
+ aStr += "\n" + aNext;
}
}
}
diff --git a/sc/source/ui/optdlg/tpusrlst.cxx b/sc/source/ui/optdlg/tpusrlst.cxx
index 3f0e9e8..d172fb9 100644
--- a/sc/source/ui/optdlg/tpusrlst.cxx
+++ b/sc/source/ui/optdlg/tpusrlst.cxx
@@ -287,7 +287,7 @@ void ScTpUserLists::UpdateEntries( size_t nList )
for ( size_t i=0; i<nSubCount; i++ )
{
if ( i!=0 )
- aEntryListStr += OUString(CR);
+ aEntryListStr += OUStringLiteral1<CR>();
aEntryListStr += pList->GetSubStr(i);
}
@@ -309,7 +309,7 @@ void ScTpUserLists::MakeListStr( OUString& rListStr )
{
OUString aString = comphelper::string::strip(rListStr.getToken(i, LF), ' ');
aStr += aString;
- aStr += OUString(cDelimiter);
+ aStr += OUStringLiteral1<cDelimiter>();
}
aStr = comphelper::string::strip(aStr, cDelimiter);
diff --git a/sc/source/ui/vba/vbapane.cxx b/sc/source/ui/vba/vbapane.cxx
index db9c0e9..1b8e905 100644
--- a/sc/source/ui/vba/vbapane.cxx
+++ b/sc/source/ui/vba/vbapane.cxx
@@ -98,7 +98,7 @@ ScVbaPane::SmallScroll( const uno::Any& Down, const uno::Any& Up, const uno::Any
if( Down >>= down )
downRows += down;
else
- messageBuffer += OUString( "Error getting parameter: Down\n" );
+ messageBuffer += "Error getting parameter: Down\n";
}
if( Up.hasValue() )
{
@@ -106,7 +106,7 @@ ScVbaPane::SmallScroll( const uno::Any& Down, const uno::Any& Up, const uno::Any
if( Up >>= up )
downRows -= up;
else
- messageBuffer += OUString( "Error getting parameter: Up\n" );
+ messageBuffer += "Error getting parameter: Up\n";
}
if( ToRight.hasValue() )
{
@@ -114,7 +114,7 @@ ScVbaPane::SmallScroll( const uno::Any& Down, const uno::Any& Up, const uno::Any
if( ToRight >>= right )
rightCols += right;
else
- messageBuffer += OUString( "Error getting parameter: ToRight\n" );
+ messageBuffer += "Error getting parameter: ToRight\n";
}
if( ToLeft.hasValue() )
{
@@ -122,7 +122,7 @@ ScVbaPane::SmallScroll( const uno::Any& Down, const uno::Any& Up, const uno::Any
if( ToLeft >>= left )
rightCols -= left;
else
- messageBuffer += OUString( "Error getting parameter: ToLeft\n" );
+ messageBuffer += "Error getting parameter: ToLeft\n";
}
if( !messageBuffer.isEmpty() )
throw uno::RuntimeException( messageBuffer );
@@ -153,7 +153,7 @@ ScVbaPane::LargeScroll( const uno::Any& Down, const uno::Any& Up, const uno::Any
if( Down >>= down )
downPages += down;
else
- messageBuffer += OUString( "Error getting parameter: Down\n" );
+ messageBuffer += "Error getting parameter: Down\n";
}
if( Up.hasValue() )
{
@@ -161,7 +161,7 @@ ScVbaPane::LargeScroll( const uno::Any& Down, const uno::Any& Up, const uno::Any
if( Up >>= up )
downPages -= up;
else
- messageBuffer += OUString( "Error getting parameter: Up\n" );
+ messageBuffer += "Error getting parameter: Up\n";
}
if( ToRight.hasValue() )
{
@@ -169,7 +169,7 @@ ScVbaPane::LargeScroll( const uno::Any& Down, const uno::Any& Up, const uno::Any
if( ToRight >>= right )
acrossPages += right;
else
- messageBuffer += OUString( "Error getting parameter: ToRight\n" );
+ messageBuffer += "Error getting parameter: ToRight\n";
}
if( ToLeft.hasValue() )
{
@@ -177,7 +177,7 @@ ScVbaPane::LargeScroll( const uno::Any& Down, const uno::Any& Up, const uno::Any
if( ToLeft >>= left )
acrossPages -= left;
else
- messageBuffer += OUString( "Error getting parameter: ToLeft\n" );
+ messageBuffer += "Error getting parameter: ToLeft\n";
}
if( !messageBuffer.isEmpty() )
throw uno::RuntimeException( messageBuffer );
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index b1ee0e2..bf31b23 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -2049,7 +2049,7 @@ ScVbaRange::Address( const uno::Any& RowAbsolute, const uno::Any& ColumnAbsolut
uno::Reference< excel::XRange > xRange( xCollection->Item( uno::makeAny( index ), uno::Any() ), uno::UNO_QUERY_THROW );
if ( index > 1 )
{
- sAddress += OUString( ',' );
+ sAddress += ",";
// force external to be false
// only first address should have the
// document and sheet specifications
diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx
index e0e0599..ceb7d57 100644
--- a/sc/source/ui/view/prevwsh.cxx
+++ b/sc/source/ui/view/prevwsh.cxx
@@ -922,9 +922,9 @@ void ScPreviewShell::WriteUserData(OUString& rData, bool /* bBrowse */)
// nZoom
// nPageNo
- rData = OUString::number(pPreview->GetZoom());
- rData += OUString(SC_USERDATA_SEP);
- rData += OUString::number(pPreview->GetPageNo());
+ rData = OUString::number(pPreview->GetZoom())
+ + OUStringLiteral1<SC_USERDATA_SEP>()
+ + OUString::number(pPreview->GetPageNo());
}
void ScPreviewShell::ReadUserData(const OUString& rData, bool /* bBrowse */)
commit 8437b42cff4ef9aeb3428432dac77851885b13e3
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Jun 26 13:53:53 2015 +0200
loplugin:stringconstant: handle OUString+=OUString(literal)
Change-Id: Ia304622214c47d35387dd0393db8e9afa55118f2
diff --git a/sal/qa/osl/file/osl_File.cxx b/sal/qa/osl/file/osl_File.cxx
index eb3159b..6f0611f 100644
--- a/sal/qa/osl/file/osl_File.cxx
+++ b/sal/qa/osl/file/osl_File.cxx
@@ -547,8 +547,8 @@ namespace osl_FileBase
{
#if ( defined UNX ) //Link is not defined in Windows
::rtl::OUString aUStr_LnkFileSys( aTempDirectorySys ), aUStr_SrcFileSys( aTempDirectorySys );
- ( ( aUStr_LnkFileSys += aSlashURL ) += getCurrentPID() ) += ::rtl::OUString("/link.file");
- ( ( aUStr_SrcFileSys += aSlashURL ) += getCurrentPID() ) += ::rtl::OUString("/canonical.name");
+ aUStr_LnkFileSys += aSlashURL + getCurrentPID() + "/link.file";
+ aUStr_SrcFileSys += aSlashURL + getCurrentPID() + "/canonical.name";
rtl::OString strLinkFileName, strSrcFileName;
strLinkFileName = OUStringToOString( aUStr_LnkFileSys, RTL_TEXTENCODING_ASCII_US );
@@ -1432,8 +1432,8 @@ namespace osl_FileStatus
sal_Int32 fd;
::rtl::OUString aUStr_LnkFileSys( aTempDirectorySys ), aUStr_SrcFileSys( aTempDirectorySys );
- ( ( aUStr_LnkFileSys += aSlashURL ) += getCurrentPID() ) += ::rtl::OUString("/tmpdir/link.file");
- ( ( aUStr_SrcFileSys += aSlashURL ) += getCurrentPID() ) += ::rtl::OUString("/tmpdir/tmpname");
+ aUStr_LnkFileSys += aSlashURL + getCurrentPID() + "/tmpdir/link.file";
+ aUStr_SrcFileSys += aSlashURL + getCurrentPID() + "/tmpdir/tmpname";
rtl::OString strLinkFileName;
rtl::OString strSrcFileName;
@@ -2053,8 +2053,8 @@ namespace osl_FileStatus
{
//create a link file;
::rtl::OUString aUStr_LnkFileSys( aTempDirectorySys ), aUStr_SrcFileSys( aTempDirectorySys );
- ( ( aUStr_LnkFileSys += aSlashURL ) += getCurrentPID() ) += ::rtl::OUString("/link.file");
- ( ( aUStr_SrcFileSys += aSlashURL ) += getCurrentPID() ) += ::rtl::OUString("/tmpname");
+ aUStr_LnkFileSys += aSlashURL + getCurrentPID() + "/link.file";
+ aUStr_SrcFileSys += aSlashURL + getCurrentPID() + "/tmpname";
rtl::OString strLinkFileName, strSrcFileName;
strLinkFileName = OUStringToOString( aUStr_LnkFileSys, RTL_TEXTENCODING_ASCII_US );
@@ -4406,8 +4406,8 @@ namespace osl_Directory
bool bFoundOK = false;
::rtl::OUString aUStr_LnkFileSys( aTempDirectorySys ), aUStr_SrcFileSys( aTempDirectorySys );
- ( aUStr_LnkFileSys += aSlashURL ) += ::rtl::OUString("/tmpdir/link.file");
- ( aUStr_SrcFileSys += aSlashURL ) += ::rtl::OUString("/tmpdir/tmpname");
+ aUStr_LnkFileSys += aSlashURL + "/tmpdir/link.file";
+ aUStr_SrcFileSys += aSlashURL + "/tmpdir/tmpname";
::rtl::OString strLinkFileName, strSrcFileName;
strLinkFileName = OUStringToOString( aUStr_LnkFileSys, RTL_TEXTENCODING_ASCII_US );
diff --git a/sal/qa/osl/process/osl_process.cxx b/sal/qa/osl/process/osl_process.cxx
index 4a9cd425..39e254c 100644
--- a/sal/qa/osl/process/osl_process.cxx
+++ b/sal/qa/osl/process/osl_process.cxx
@@ -87,7 +87,7 @@ inline ::rtl::OUString getExecutablePath()
reinterpret_cast<oslGenericFunction>(&getExecutablePath), dirPath);
dirPath = dirPath.copy( 0, dirPath.lastIndexOf('/') );
dirPath = dirPath.copy( 0, dirPath.lastIndexOf('/') + 1);
- dirPath += rtl::OUString("Executable");
+ dirPath += "Executable";
return dirPath;
}
@@ -199,9 +199,7 @@ public:
{
parameters_[0] = env_param_.pData;
suCWD = getExecutablePath();
- suExecutableFileURL = suCWD;
- suExecutableFileURL += rtl::OUString("/");
- suExecutableFileURL += EXECUTABLE_NAME;
+ suExecutableFileURL = suCWD + "/" + EXECUTABLE_NAME;
}
virtual void setUp() SAL_OVERRIDE
diff --git a/sal/qa/rtl/process/rtl_Process.cxx b/sal/qa/rtl/process/rtl_Process.cxx
index 3c709f0..5b13b3c 100644
--- a/sal/qa/rtl/process/rtl_Process.cxx
+++ b/sal/qa/rtl/process/rtl_Process.cxx
@@ -62,7 +62,7 @@ inline ::rtl::OUString getModulePath()
printUString(suDirPath, "modulePath:");
suDirPath = suDirPath.copy( 0, suDirPath.lastIndexOf('/') );
suDirPath = suDirPath.copy( 0, suDirPath.lastIndexOf('/') + 1);
- suDirPath += rtl::OUString("bin");
+ suDirPath += "bin";
return suDirPath;
}
@@ -103,9 +103,7 @@ public:
pParameters[2] = suParam2.pData;
pParameters[3] = suParam3.pData;
- rtl::OUString suFileURL = suCWD;
- suFileURL += rtl::OUString("/");
- suFileURL += EXECUTABLE_NAME;
+ rtl::OUString suFileURL = suCWD + "/" + EXECUTABLE_NAME;
oslProcessError osl_error = osl_executeProcess(
suFileURL.pData,
@@ -232,9 +230,7 @@ public:
rtl::OUString suCWD = getModulePath();
oslProcess hProcess = NULL;
- rtl::OUString suFileURL = suCWD;
- suFileURL += rtl::OUString("/");
- suFileURL += EXEC_NAME;
+ rtl::OUString suFileURL = suCWD + "/" + EXEC_NAME;
oslFileHandle* pChildOutputRead = new oslFileHandle();
oslProcessError osl_error = osl_executeProcess_WithRedirectedIO(
suFileURL.pData,
diff --git a/sal/rtl/bootstrap.cxx b/sal/rtl/bootstrap.cxx
index 715555a..3c34e79 100644
--- a/sal/rtl/bootstrap.cxx
+++ b/sal/rtl/bootstrap.cxx
@@ -270,7 +270,7 @@ static OUString & getIniFileName_Impl()
fileName = fileName.copy(0, fileName.getLength() - progExt.getLength());
// append config file suffix
- fileName += OUString(SAL_CONFIGFILE(""));
+ fileName += SAL_CONFIGFILE("");
#ifdef MACOSX
// We keep only executables in the MacOS folder, and all
commit 63e81af351b09ceecb29c3064660261058fbb2d3
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Jun 26 13:53:48 2015 +0200
loplugin:stringconstant: handle OUString+=OUString(literal)
Change-Id: Id2efd6f38390bb73620cf40121430c4226024103
diff --git a/pyuno/source/module/pyuno_runtime.cxx b/pyuno/source/module/pyuno_runtime.cxx
index 9d69797..1aba10a 100644
--- a/pyuno/source/module/pyuno_runtime.cxx
+++ b/pyuno/source/module/pyuno_runtime.cxx
@@ -964,9 +964,7 @@ Any Runtime::extractUnoException( const PyRef & excType, const PyRef &excValue,
str = "Could not load uno.py, no stacktrace available";
if ( !e.Message.isEmpty() )
{
- str += OUString (" (Error loading uno.py: ");
- str += e.Message;
- str += OUString (")");
+ str += " (Error loading uno.py: " + e.Message + ")";
}
}
commit a77caf49cd2c8382ce06e502822f5d060be20a89
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Jun 26 13:53:44 2015 +0200
loplugin:stringconstant: handle OUString+=OUString(literal)
Change-Id: Ib9bf6e0919ee0cab02d826859317ea20cb64cabb
diff --git a/package/source/zippackage/zipfileaccess.cxx b/package/source/zippackage/zipfileaccess.cxx
index ccd0746..163f1e2 100644
--- a/package/source/zippackage/zipfileaccess.cxx
+++ b/package/source/zippackage/zipfileaccess.cxx
@@ -85,18 +85,18 @@ uno::Sequence< OUString > OZipFileAccess::GetPatternsFromString_Impl( const OUSt
if ( *pString == (sal_Unicode)'\\' )
{
- aPattern[nInd] += OUString( (sal_Unicode)'\\' );
+ aPattern[nInd] += "\\";
pString++;
}
else if ( *pString == (sal_Unicode)'*' )
{
- aPattern[nInd] += OUString( (sal_Unicode)'*' );
+ aPattern[nInd] += "*";
pString++;
}
else
{
OSL_FAIL( "The backslash is not guarded!\n" );
- aPattern[nInd] += OUString( (sal_Unicode)'\\' );
+ aPattern[nInd] += "\\";
}
}
else if ( *pString == (sal_Unicode)'*' )
commit e32f18ad3fe12c4c2a52a9b08ea7bb8b9d4c11cd
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Jun 26 13:53:40 2015 +0200
loplugin:stringconstant: handle OUString+=OUString(literal)
Change-Id: If12ab824969f93af0d129f5ba9aa628000f7ba27
diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx
index 3824b91..a9a74f1 100644
--- a/linguistic/source/lngsvcmgr.cxx
+++ b/linguistic/source/lngsvcmgr.cxx
@@ -613,9 +613,7 @@ namespace
{
Sequence< OUString > aNames(1);
OUString &rNodeName = aNames.getArray()[0];
- rNodeName = rLastFoundList;
- rNodeName += OUString( (sal_Unicode)'/' );
- rNodeName += aCfgLocaleStr;
+ rNodeName = rLastFoundList + "/" + aCfgLocaleStr;
Sequence< Any > aValues( rCfg.GetProperties( aNames ) );
if (aValues.getLength())
{
@@ -793,11 +791,7 @@ void LngSvcMgr::UpdateAll()
PropertyValue *pNewValue = aNewValues.getArray();
while (aIt != rCurMap.end())
{
- OUString aCfgEntryName( aSubNodeName );
- aCfgEntryName += OUString( (sal_Unicode) '/' );
- aCfgEntryName += (*aIt).first;
-
- pNewValue->Name = aCfgEntryName;
+ pNewValue->Name = aSubNodeName + "/" + (*aIt).first;
pNewValue->Value <<= (*aIt).second;
++pNewValue;
++aIt;
@@ -863,10 +857,7 @@ void LngSvcMgr::Notify( const uno::Sequence< OUString > &rPropertyNames )
OUString aNode( aSpellCheckerList );
if (lcl_SeqHasString( aSpellCheckerListEntries, aKeyText ))
{
- OUString aPropName( aNode );
- aPropName += OUString( (sal_Unicode) '/' );
- aPropName += aKeyText;
- pNames[0] = aPropName;
+ pNames[0] = aNode + "/" + aKeyText;
aValues = /*aCfg.*/GetProperties( aNames );
uno::Sequence< OUString > aSvcImplNames;
if (aValues.getLength())
@@ -890,10 +881,7 @@ void LngSvcMgr::Notify( const uno::Sequence< OUString > &rPropertyNames )
OUString aNode( aGrammarCheckerList );
if (lcl_SeqHasString( aGrammarCheckerListEntries, aKeyText ))
{
- OUString aPropName( aNode );
- aPropName += OUString( (sal_Unicode) '/' );
- aPropName += aKeyText;
- pNames[0] = aPropName;
+ pNames[0] = aNode + "/" + aKeyText;
aValues = /*aCfg.*/GetProperties( aNames );
uno::Sequence< OUString > aSvcImplNames;
if (aValues.getLength())
@@ -920,10 +908,7 @@ void LngSvcMgr::Notify( const uno::Sequence< OUString > &rPropertyNames )
OUString aNode( aHyphenatorList );
if (lcl_SeqHasString( aHyphenatorListEntries, aKeyText ))
{
- OUString aPropName( aNode );
- aPropName += OUString( (sal_Unicode) '/' );
- aPropName += aKeyText;
- pNames[0] = aPropName;
+ pNames[0] = aNode + "/" + aKeyText;
aValues = /*aCfg.*/GetProperties( aNames );
uno::Sequence< OUString > aSvcImplNames;
if (aValues.getLength())
@@ -947,10 +932,7 @@ void LngSvcMgr::Notify( const uno::Sequence< OUString > &rPropertyNames )
OUString aNode( aThesaurusList );
if (lcl_SeqHasString( aThesaurusListEntries, aKeyText ))
{
- OUString aPropName( aNode );
- aPropName += OUString( (sal_Unicode) '/' );
- aPropName += aKeyText;
- pNames[0] = aPropName;
+ pNames[0] = aNode + "/" + aKeyText;
aValues = /*aCfg.*/GetProperties( aNames );
uno::Sequence< OUString > aSvcImplNames;
if (aValues.getLength())
@@ -1831,9 +1813,7 @@ bool LngSvcMgr::SaveCfgSvcs( const OUString &rServiceName )
OUString aCfgLocaleStr( (LanguageTag(pLocale[i])).getBcp47() );
pValue->Value = aCfgAny;
- pValue->Name = aNodeName;
- pValue->Name += OUString( (sal_Unicode) '/' );
- pValue->Name += aCfgLocaleStr;
+ pValue->Name = aNodeName + "/" + aCfgLocaleStr;
pValue++;
}
{
@@ -1928,10 +1908,7 @@ uno::Sequence< OUString > SAL_CALL
const uno::Sequence< OUString > aNodeEntries( GetNodeNames( aNode ) );
if (lcl_SeqHasString( aNodeEntries, aCfgLocale ))
{
- OUString aPropName( aNode );
- aPropName += OUString( (sal_Unicode) '/' );
- aPropName += aCfgLocale;
- pNames[0] = aPropName;
+ pNames[0] = aNode + "/" + aCfgLocale;
aValues = /*aCfg.*/GetProperties( aNames );
if (aValues.getLength())
aSvcImplNames = GetLangSvcList( aValues.getConstArray()[0] );
@@ -1943,10 +1920,7 @@ uno::Sequence< OUString > SAL_CALL
const uno::Sequence< OUString > aNodeEntries( GetNodeNames( aNode ) );
if (lcl_SeqHasString( aNodeEntries, aCfgLocale ))
{
- OUString aPropName( aNode );
- aPropName += OUString( (sal_Unicode) '/' );
- aPropName += aCfgLocale;
- pNames[0] = aPropName;
+ pNames[0] = aNode + "/" + aCfgLocale;
aValues = /*aCfg.*/GetProperties( aNames );
if (aValues.getLength())
aSvcImplNames = GetLangSvc( aValues.getConstArray()[0] );
@@ -1958,10 +1932,7 @@ uno::Sequence< OUString > SAL_CALL
const uno::Sequence< OUString > aNodeEntries( GetNodeNames( aNode ) );
if (lcl_SeqHasString( aNodeEntries, aCfgLocale ))
{
- OUString aPropName( aNode );
- aPropName += OUString( (sal_Unicode) '/' );
- aPropName += aCfgLocale;
- pNames[0] = aPropName;
+ pNames[0] = aNode + "/" + aCfgLocale;
aValues = /*aCfg.*/GetProperties( aNames );
if (aValues.getLength())
aSvcImplNames = GetLangSvc( aValues.getConstArray()[0] );
@@ -1973,10 +1944,7 @@ uno::Sequence< OUString > SAL_CALL
const uno::Sequence< OUString > aNodeEntries( GetNodeNames( aNode ) );
if (lcl_SeqHasString( aNodeEntries, aCfgLocale ))
{
- OUString aPropName( aNode );
- aPropName += OUString( (sal_Unicode) '/' );
- aPropName += aCfgLocale;
- pNames[0] = aPropName;
+ pNames[0] = aNode + "/" + aCfgLocale;
aValues = /*aCfg.*/GetProperties( aNames );
if (aValues.getLength())
aSvcImplNames = GetLangSvcList( aValues.getConstArray()[0] );
commit 884a4caa4aac9678e3815360edbdd1c813c22b09
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Jun 26 13:53:35 2015 +0200
loplugin:stringconstant: handle OUString+=OUString(literal)
Change-Id: I3561a665cffbdf063c5a8de1225f4ddefd71718f
diff --git a/javaunohelper/source/javaunohelper.cxx b/javaunohelper/source/javaunohelper.cxx
index d91a081..86e0cd0 100644
--- a/javaunohelper/source/javaunohelper.cxx
+++ b/javaunohelper/source/javaunohelper.cxx
@@ -153,7 +153,7 @@ jobject Java_com_sun_star_comp_helper_SharedLibraryLoader_component_1getFactory(
fprintf(stderr, "Hmm, %s called for %s\n", __PRETTY_FUNCTION__, OUStringToOString(aLibName, osl_getThreadTextEncoding()).getStr());
#endif
- aLibName += OUString( SAL_DLLEXTENSION );
+ aLibName += SAL_DLLEXTENSION;
jobject joSLL_cpp = 0;
commit 9e7c54eb33e18b717783b67f8c1f62fa9a591d8b
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Jun 26 13:53:31 2015 +0200
loplugin:stringconstant: handle OUString+=OUString(literal)
Change-Id: I26212f3d0bb92440e77b86c751c21e34446143d6
diff --git a/idl/source/prj/command.cxx b/idl/source/prj/command.cxx
index 005c0f0..39c1bc4 100644
--- a/idl/source/prj/command.cxx
+++ b/idl/source/prj/command.cxx
@@ -265,7 +265,7 @@ SvCommand::SvCommand( int argc, char ** argv )
{ // define include paths
OUString aName( aParam.copy( 1 ) );
if( !aPath.isEmpty() )
- aPath += OUString( SAL_PATHSEPARATOR );
+ aPath += OUStringLiteral1<SAL_PATHSEPARATOR>();
aPath += aName;
}
else if( aParam.startsWithIgnoreAsciiCase( "rsc" ) )
@@ -304,7 +304,7 @@ SvCommand::SvCommand( int argc, char ** argv )
if( aInc.getLength() )
{
if( !aPath.isEmpty() )
- aPath += OUString( SAL_PATHSEPARATOR );
+ aPath += OUStringLiteral1<SAL_PATHSEPARATOR>();
aPath += OStringToOUString(aInc, RTL_TEXTENCODING_ASCII_US);
}
}
commit 5de7df5107b8cd18d7e048d394fa464079db1474
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Jun 26 13:53:21 2015 +0200
loplugin:stringconstant: handle OUString+=OUString(literal)
Change-Id: I4d168bda12604116c223b6fd0d78ded484591855
diff --git a/helpcompiler/inc/HelpCompiler.hxx b/helpcompiler/inc/HelpCompiler.hxx
index 4c59953..4d5a201 100644
--- a/helpcompiler/inc/HelpCompiler.hxx
+++ b/helpcompiler/inc/HelpCompiler.hxx
@@ -111,8 +111,7 @@ namespace fs
OUStringToOString(ret.data, RTL_TEXTENCODING_UTF8).getStr() << std::endl);
OString tmp(in.c_str());
OUString ustrSystemPath(OStringToOUString(tmp, getThreadTextEncoding()));
- ret.data += OUString(sal_Unicode('/'));
- ret.data += ustrSystemPath;
+ ret.data += "/" + ustrSystemPath;
HCDBG(std::cerr << "final is " <<
OUStringToOString(ret.data, RTL_TEXTENCODING_UTF8).getStr() << std::endl);
return ret;
commit 0b60670850d936173bc0f1253f55ceda56d7984d
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Jun 26 13:53:15 2015 +0200
loplugin:stringconstant: handle OUString+=OUString(literal)
Change-Id: Ie17c1d6c7664b3d3ad0255094b26ba433c2c1921
diff --git a/framework/source/accelerators/storageholder.cxx b/framework/source/accelerators/storageholder.cxx
index e315ef0..46fc19a 100644
--- a/framework/source/accelerators/storageholder.cxx
+++ b/framework/source/accelerators/storageholder.cxx
@@ -39,9 +39,8 @@
#include <algorithm>
-#define PATH_SEPARATOR_ASCII "/"
+#define PATH_SEPARATOR "/"
#define PATH_SEPARATOR_UNICODE ((sal_Unicode)'/')
-#define PATH_SEPARATOR OUString(PATH_SEPARATOR_ASCII)
namespace framework
{
@@ -104,9 +103,7 @@ css::uno::Reference< css::embed::XStorage > StorageHolder::openPath(const OUStri
++pIt )
{
const OUString& sChild = *pIt;
- OUString sCheckPath (sRelPath);
- sCheckPath += sChild;
- sCheckPath += PATH_SEPARATOR;
+ OUString sCheckPath (sRelPath + sChild + PATH_SEPARATOR);
// SAFE -> ------------------------------
aReadLock.reset();
@@ -157,8 +154,7 @@ css::uno::Reference< css::embed::XStorage > StorageHolder::openPath(const OUStri
}
xParent = xChild;
- sRelPath += sChild;
- sRelPath += PATH_SEPARATOR;
+ sRelPath += sChild + PATH_SEPARATOR;
}
// TODO think about return last storage as working storage ... but dont caching it inside this holder!
@@ -183,9 +179,7 @@ StorageHolder::TStorageList StorageHolder::getAllPathStorages(const OUString& sP
++pIt )
{
const OUString& sChild = *pIt;
- OUString sCheckPath (sRelPath);
- sCheckPath += sChild;
- sCheckPath += PATH_SEPARATOR;
+ OUString sCheckPath (sRelPath + sChild + PATH_SEPARATOR);
TPath2StorageInfo::iterator pCheck = m_lStorages.find(sCheckPath);
if (pCheck == m_lStorages.end())
@@ -199,8 +193,7 @@ StorageHolder::TStorageList StorageHolder::getAllPathStorages(const OUString& sP
TStorageInfo& rInfo = pCheck->second;
lStoragesOfPath.push_back(rInfo.Storage);
- sRelPath += sChild;
- sRelPath += PATH_SEPARATOR;
+ sRelPath += sChild + PATH_SEPARATOR;
}
return lStoragesOfPath;
@@ -248,9 +241,7 @@ void StorageHolder::closePath(const OUString& rPath)
pIt1 != lFolders.end();
++pIt1 )
{
- OUString sCurrentRelPath = sParentPath;
- sCurrentRelPath += *pIt1;
- sCurrentRelPath += PATH_SEPARATOR;
+ OUString sCurrentRelPath(sParentPath + *pIt1 + PATH_SEPARATOR);
*pIt1 = sCurrentRelPath;
sParentPath = sCurrentRelPath;
}
@@ -386,8 +377,7 @@ css::uno::Reference< css::embed::XStorage > StorageHolder::getParentStorage(cons
sal_Int32 i = 0;
for (i=0; i<c-1; ++i)
{
- sParentPath += lFolders[i];
- sParentPath += PATH_SEPARATOR;
+ sParentPath += lFolders[i] + PATH_SEPARATOR;
}
TPath2StorageInfo::const_iterator pParent = m_lStorages.find(sParentPath);
@@ -494,7 +484,7 @@ OUString StorageHolder::impl_st_normPath(const OUString& sPath)
OUString sNormedPath = sPath;
// "/bla" => "bla" && "/" => "" (!)
- sNormedPath.startsWith(PATH_SEPARATOR_ASCII, &sNormedPath);
+ sNormedPath.startsWith(PATH_SEPARATOR, &sNormedPath);
// "/" => "" || "" => "" ?
if (sNormedPath.isEmpty())
diff --git a/framework/source/fwe/xml/statusbardocumenthandler.cxx b/framework/source/fwe/xml/statusbardocumenthandler.cxx
index aa36aa8..cea1e3b 100644
--- a/framework/source/fwe/xml/statusbardocumenthandler.cxx
+++ b/framework/source/fwe/xml/statusbardocumenthandler.cxx
@@ -576,8 +576,7 @@ throw ( SAXException, RuntimeException )
if (m_aAttributeURL.isEmpty() )
{
- m_aAttributeURL = m_aXMLXlinkNS;
- m_aAttributeURL += OUString( ATTRIBUTE_URL );
+ m_aAttributeURL = m_aXMLXlinkNS + ATTRIBUTE_URL;
}
// save required attribute (URL)
diff --git a/framework/source/fwe/xml/toolboxdocumenthandler.cxx b/framework/source/fwe/xml/toolboxdocumenthandler.cxx
index 2457da9..013fad3 100644
--- a/framework/source/fwe/xml/toolboxdocumenthandler.cxx
+++ b/framework/source/fwe/xml/toolboxdocumenthandler.cxx
@@ -768,8 +768,7 @@ throw ( SAXException, RuntimeException )
if ( m_aAttributeURL.isEmpty() )
{
- m_aAttributeURL = m_aXMLXlinkNS;
- m_aAttributeURL += OUString( ATTRIBUTE_URL );
+ m_aAttributeURL = m_aXMLXlinkNS + ATTRIBUTE_URL;
}
// save required attribute (URL)
commit 17b2a351b713053258630084174ac59b3b5988be
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Jun 26 13:53:11 2015 +0200
loplugin:stringconstant: handle OUString+=OUString(literal)
Change-Id: I8d923a656e185ebb46ab0a70c7a122b12b86ace1
diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx
index cc24f50..5012ed1 100644
--- a/filter/source/svg/svgexport.cxx
+++ b/filter/source/svg/svgexport.cxx
@@ -909,8 +909,7 @@ OUString implGenerateFieldId( std::vector< TextField* > & aFieldSet,
break;
}
}
- OUString sFieldId( sOOOElemField );
- sFieldId += OUString( '_' );
+ OUString sFieldId(sOOOElemField + "_");
if( !bFound )
{
aFieldSet.push_back( new TextFieldType( aField ) );
@@ -991,9 +990,7 @@ bool SVGFilter::implGenerateMetaData()
const Reference< XDrawPage > & xDrawPage = mSelectedPages[i];
Reference< XMasterPageTarget > xMasterPageTarget( xDrawPage, UNO_QUERY );
Reference< XDrawPage > xMasterPage( xMasterPageTarget->getMasterPage(), UNO_QUERY );
- OUString aSlideId( aId );
- aSlideId += OUString( '_' );
- aSlideId += OUString::number( i );
+ OUString aSlideId(aId + "_" + OUString::number( i ));
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "id", aSlideId );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, aOOOAttrSlide, implGetValidIDFromInterface( xDrawPage ) );
commit 36abd8c69eeabe07d35391832a3d4945ebb6a5eb
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Jun 26 13:53:05 2015 +0200
loplugin:stringconstant: handle OUString+=OUString(literal)
Change-Id: I6f877a3b58686e037a48e2b594c58b6502c2ef78
diff --git a/extensions/source/abpilot/fieldmappingimpl.cxx b/extensions/source/abpilot/fieldmappingimpl.cxx
index 7103319..6c99566 100644
--- a/extensions/source/abpilot/fieldmappingimpl.cxx
+++ b/extensions/source/abpilot/fieldmappingimpl.cxx
@@ -159,8 +159,9 @@ namespace abp
// access the configuration information which the driver uses for determining it's column names
- OUString sDriverAliasesNodeName = sDriverSettingsNodeName;
- sDriverAliasesNodeName += OUString( "/ColumnAliases" );
+ OUString sDriverAliasesNodeName(
+ OUStringLiteral(sDriverSettingsNodeName)
+ + "/ColumnAliases");
// create a config node for this
OConfigurationTreeRoot aDriverFieldAliasing = OConfigurationTreeRoot::createWithComponentContext(
commit 9423044abc81e324a483ac369a8f42d2150c7bbd
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Jun 26 13:53:00 2015 +0200
loplugin:stringconstant: handle OUString+=OUString(literal)
Change-Id: I19f7a0a3cc6641a21ed6004adecdac7956e5132f
diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx
index 3540877..b8aaa65 100644
--- a/editeng/source/editeng/editeng.cxx
+++ b/editeng/source/editeng/editeng.cxx
@@ -2099,7 +2099,7 @@ void EditEngine::SetWordDelimiters( const OUString& rDelimiters )
{
pImpEditEngine->aWordDelimiters = rDelimiters;
if (pImpEditEngine->aWordDelimiters.indexOf(CH_FEATURE) == -1)
- pImpEditEngine->aWordDelimiters += OUString(CH_FEATURE);
+ pImpEditEngine->aWordDelimiters += OUStringLiteral1<CH_FEATURE>();
}
OUString EditEngine::GetWordDelimiters() const
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index e4b9f56..f5a4449 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -3210,7 +3210,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRect, Point aSt
{
if ( pTextPortion->GetExtraValue() )
aText = OUString(pTextPortion->GetExtraValue());
- aText += OUString(CH_HYPH);
+ aText += OUStringLiteral1<CH_HYPH>();
nTextStart = 0;
nTextLen = aText.getLength();
commit 6aa627c662fd83b64b48d4e7647d768915d1f746
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Jun 26 13:52:56 2015 +0200
loplugin:stringconstant: handle OUString+=OUString(literal)
Change-Id: Ifd3537f5478079f4a82ddd7c5e32170c2080df2d
diff --git a/desktop/source/migration/services/basicmigration.cxx b/desktop/source/migration/services/basicmigration.cxx
index b6924b9..00631a5 100644
--- a/desktop/source/migration/services/basicmigration.cxx
+++ b/desktop/source/migration/services/basicmigration.cxx
@@ -33,8 +33,8 @@ namespace migration
- #define sSourceUserBasic OUString( "/user/basic" )
- #define sTargetUserBasic OUString( "/user/__basic_80" )
+ #define sSourceUserBasic "/user/basic"
+ #define sTargetUserBasic "/user/__basic_80"
// component operations
commit 67d16fc0811b50aa2e8f53684c7d5f5e0764f1a0
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Jun 26 13:52:50 2015 +0200
loplugin:stringconstant: handle OUString+=OUString(literal)
Change-Id: Idcbd6b31a3147fc883fed49095e518af170daf38
diff --git a/dbaccess/source/ui/querydesign/QTableWindow.cxx b/dbaccess/source/ui/querydesign/QTableWindow.cxx
index 607552f..289da9c 100644
--- a/dbaccess/source/ui/querydesign/QTableWindow.cxx
+++ b/dbaccess/source/ui/querydesign/QTableWindow.cxx
@@ -90,8 +90,7 @@ bool OQueryTableWindow::Init()
// Alias with successive number
if (pContainer->CountTableAlias(sAliasName, m_nAliasNum))
{
- sAliasName += OUString('_');
- sAliasName += OUString::number(m_nAliasNum);
+ sAliasName += "_" + OUString::number(m_nAliasNum);
}
sAliasName = comphelper::string::remove(sAliasName, '"');
diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
index a101bd8..bdb2dc7 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
@@ -930,16 +930,16 @@ namespace
else if ( pEntryField->isNumericOrAggreateFunction() )
{
OSL_ENSURE(!pEntryField->GetFunction().isEmpty(),"Function name cannot be empty! ;-(");
- aWorkStr += pEntryField->GetFunction();
- aWorkStr += OUString('(');
- aWorkStr += quoteTableAlias(bMulti,pEntryField->GetAlias(),aQuote);
+ aWorkStr += pEntryField->GetFunction() + "("
+ + quoteTableAlias(
+ bMulti, pEntryField->GetAlias(), aQuote);
// only quote column name when we don't have a numeric
if ( pEntryField->isNumeric() )
aWorkStr += aColumnName;
else
aWorkStr += ::dbtools::quoteName(aQuote, aColumnName);
- aWorkStr += OUString(')');
+ aWorkStr += ")";
}
else if ( pEntryField->isOtherFunction() )
{
diff --git a/dbaccess/source/ui/querydesign/QueryTableView.cxx b/dbaccess/source/ui/querydesign/QueryTableView.cxx
index 3dcd670..c86c7ce 100644
--- a/dbaccess/source/ui/querydesign/QueryTableView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryTableView.cxx
@@ -391,7 +391,7 @@ void OQueryTableView::AddTabWin(const OUString& _rTableName, const OUString& _rA
::dbtools::eInDataManipulation);
OUString sRealName(sSchema);
if (!sRealName.isEmpty())
- sRealName+= OUString('.');
+ sRealName += ".";
sRealName += sTable;
AddTabWin(_rTableName, sRealName, _rAliasName, bNewTable);
commit 35c81431a6f76d2e7dbbb450f5ef4ca39efe1684
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Jun 26 13:52:46 2015 +0200
loplugin:stringconstant: handle OUString+=OUString(literal)
Change-Id: I89536204943c0bb86ad9a7cf11050d040650078d
diff --git a/cui/source/dialogs/hldocntp.cxx b/cui/source/dialogs/hldocntp.cxx
index 234ea38..1ae6e03 100644
--- a/cui/source/dialogs/hldocntp.cxx
+++ b/cui/source/dialogs/hldocntp.cxx
@@ -347,7 +347,7 @@ void SvxHyperlinkNewDocTp::DoApply ()
OUString aStrFlags('S');
if ( m_pRbtEditLater->IsChecked() )
{
- aStrFlags += OUString('H');
+ aStrFlags += "H";
}
SfxStringItem aFlags (SID_OPTIONS, aStrFlags);
diff --git a/cui/source/options/optgenrl.cxx b/cui/source/options/optgenrl.cxx
index 788ce72..824447b 100644
--- a/cui/source/options/optgenrl.cxx
+++ b/cui/source/options/optgenrl.cxx
@@ -378,7 +378,7 @@ IMPL_LINK( SvxGeneralTabPage, ModifyHdl_Impl, Edit *, pEdit )
rShortName.pEdit->SetText(OUString());
}
while ((unsigned)sShortName.getLength() < nInits)
- sShortName += OUString(' ');
+ sShortName += " ";
OUString sName = pEdit->GetText();
OUString sLetter = sName.isEmpty()
? OUString(sal_Unicode(' ')) : sName.copy(0, 1);
diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index 31c94c6..14c2a22 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -1110,7 +1110,7 @@ OUString SvxJavaClassPathDlg::GetClassPath() const
for ( sal_Int32 i = 0; i < nCount; ++i )
{
if ( !sPath.isEmpty() )
- sPath += OUString(CLASSPATH_DELIMITER);
+ sPath += OUStringLiteral1<CLASSPATH_DELIMITER>();
OUString* pFullPath = static_cast< OUString* >( m_pPathList->GetEntryData(i) );
if ( pFullPath )
sPath += *pFullPath;
diff --git a/cui/source/options/optpath.cxx b/cui/source/options/optpath.cxx
index 06f6fee..45c8bbb 100644
--- a/cui/source/options/optpath.cxx
+++ b/cui/source/options/optpath.cxx
@@ -63,9 +63,9 @@ using namespace svx;
#define ITEMID_TYPE 1
#define ITEMID_PATH 2
-#define POSTFIX_INTERNAL OUString("_internal")
-#define POSTFIX_USER OUString("_user")
-#define POSTFIX_WRITABLE OUString("_writable")
+#define POSTFIX_INTERNAL "_internal"
+#define POSTFIX_USER "_user"
+#define POSTFIX_WRITABLE "_writable"
#define VAR_ONE "%1"
#define IODLG_CONFIGNAME OUString("FilePicker_Save")
@@ -155,7 +155,7 @@ OUString Convert_Impl( const OUString& rValue )
else if ( ::utl::LocalFileHelper::IsFileContent( aValue ) )
aReturn += aObj.GetURLPath( INetURLObject::DECODE_WITH_CHARSET );
if ( i+1 < nCount)
- aReturn += OUString(MULTIPATH_DELIMITER);
+ aReturn += OUStringLiteral1<MULTIPATH_DELIMITER>();
}
return aReturn;
@@ -313,7 +313,7 @@ void SvxPathTabPage::Reset( const SfxItemSet* )
GetPathList( i, sInternal, sUser, sWritable, bReadOnly );
OUString sTmpPath = sUser;
if ( !sTmpPath.isEmpty() && !sWritable.isEmpty() )
- sTmpPath += OUString(MULTIPATH_DELIMITER);
+ sTmpPath += OUStringLiteral1<MULTIPATH_DELIMITER>();
sTmpPath += sWritable;
OUString aValue( sTmpPath );
aValue = Convert_Impl( aValue );
@@ -434,7 +434,7 @@ IMPL_LINK_NOARG(SvxPathTabPage, StandardHdl_Impl)
if ( !bFound )
{
if ( !sTemp.isEmpty() )
- sTemp += OUString(MULTIPATH_DELIMITER);
+ sTemp += OUStringLiteral1<MULTIPATH_DELIMITER>();
sTemp += sOnePath;
}
}
@@ -444,7 +444,7 @@ IMPL_LINK_NOARG(SvxPathTabPage, StandardHdl_Impl)
for ( i = 0; nOldCount > 0 && i < nOldCount - 1; ++i )
{
if ( !sUserPath.isEmpty() )
- sUserPath += OUString(MULTIPATH_DELIMITER);
+ sUserPath += OUStringLiteral1<MULTIPATH_DELIMITER>();
sUserPath += sTemp.getToken( i, MULTIPATH_DELIMITER );
}
sWritablePath = sTemp.getToken( nOldCount - 1, MULTIPATH_DELIMITER );
@@ -554,7 +554,7 @@ IMPL_LINK_NOARG(SvxPathTabPage, PathHdl_Impl)
OUString sPath( sUser );
if ( !sPath.isEmpty() )
- sPath += OUString(MULTIPATH_DELIMITER);
+ sPath += OUStringLiteral1<MULTIPATH_DELIMITER>();
sPath += sWritable;
pMultiDlg->SetPath( sPath );
@@ -721,9 +721,8 @@ void SvxPathTabPage::GetPathList(
}
// load internal paths
- OUString sProp( sCfgName );
- sProp += POSTFIX_INTERNAL;
- Any aAny = pImpl->m_xPathSettings->getPropertyValue( sProp );
+ Any aAny = pImpl->m_xPathSettings->getPropertyValue(
+ sCfgName + POSTFIX_INTERNAL);
Sequence< OUString > aPathSeq;
if ( aAny >>= aPathSeq )
{
@@ -738,9 +737,8 @@ void SvxPathTabPage::GetPathList(
}
}
// load user paths
- sProp = sCfgName;
- sProp += POSTFIX_USER;
- aAny = pImpl->m_xPathSettings->getPropertyValue( sProp );
+ aAny = pImpl->m_xPathSettings->getPropertyValue(
+ sCfgName + POSTFIX_USER);
if ( aAny >>= aPathSeq )
{
long i, nCount = aPathSeq.getLength();
@@ -754,17 +752,15 @@ void SvxPathTabPage::GetPathList(
}
}
// then the writable path
- sProp = sCfgName;
- sProp += POSTFIX_WRITABLE;
- aAny = pImpl->m_xPathSettings->getPropertyValue( sProp );
+ aAny = pImpl->m_xPathSettings->getPropertyValue(
+ sCfgName + POSTFIX_WRITABLE);
OUString sWritablePath;
if ( aAny >>= sWritablePath )
_rWritablePath = sWritablePath;
// and the readonly flag
- sProp = sCfgName;
Reference< XPropertySetInfo > xInfo = pImpl->m_xPathSettings->getPropertySetInfo();
- Property aProp = xInfo->getPropertyByName( sProp );
+ Property aProp = xInfo->getPropertyByName(sCfgName);
_rReadOnly = ( ( aProp.Attributes & PropertyAttribute::READONLY ) == PropertyAttribute::READONLY );
}
catch( const Exception& )
@@ -796,16 +792,14 @@ void SvxPathTabPage::SetPathList(
OUString* pArray = aPathSeq.getArray();
for ( sal_uInt16 i = 0; i < nCount; ++i )
pArray[i] = _rUserPath.getToken( i, cDelim );
- OUString sProp( sCfgName );
- sProp += POSTFIX_USER;
Any aValue = makeAny( aPathSeq );
- pImpl->m_xPathSettings->setPropertyValue( sProp, aValue );
+ pImpl->m_xPathSettings->setPropertyValue(
+ sCfgName + POSTFIX_USER, aValue);
// then the writable path
aValue = makeAny( OUString( _rWritablePath ) );
- sProp = sCfgName;
- sProp += POSTFIX_WRITABLE;
- pImpl->m_xPathSettings->setPropertyValue( sProp, aValue );
+ pImpl->m_xPathSettings->setPropertyValue(
+ sCfgName + POSTFIX_WRITABLE, aValue);
}
catch( const Exception& e )
{
diff --git a/cui/source/options/webconninfo.cxx b/cui/source/options/webconninfo.cxx
index ffa1ef2..98e0b87 100644
--- a/cui/source/options/webconninfo.cxx
+++ b/cui/source/options/webconninfo.cxx
@@ -180,10 +180,9 @@ void WebConnectionInfoDialog::FillPasswordList()
{
for ( sal_Int32 nUserInd = 0; nUserInd < aURLEntries[nURLInd].UserList.getLength(); nUserInd++ )
{
- OUString aUIEntry( aURLEntries[nURLInd].Url );
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list