[Libreoffice-commits] core.git: 4 commits - sd/source svx/qa svx/source tools/source ucb/source unotools/source vcl/source vcl/unx
Julien Nabet (via logerrit)
logerrit at kemper.freedesktop.org
Wed Oct 2 06:03:01 UTC 2019
sd/source/filter/ppt/pptin.cxx | 3
svx/qa/unit/customshapes.cxx | 4
svx/source/customshapes/EnhancedCustomShape2d.cxx | 4
svx/source/dialog/svxbmpnumvalueset.cxx | 6
svx/source/fmcomp/gridctrl.cxx | 8
svx/source/form/datanavi.cxx | 34 +--
svx/source/form/fmPropBrw.cxx | 4
svx/source/form/fmobj.cxx | 3
svx/source/sidebar/line/LineWidthPopup.cxx | 4
svx/source/svdraw/svdibrow.cxx | 3
svx/source/svdraw/svdotext.cxx | 7
svx/source/tbxctrls/fontworkgallery.cxx | 4
svx/source/tbxctrls/layctrl.cxx | 8
svx/source/xml/xmleohlp.cxx | 6
svx/source/xml/xmlgrhlp.cxx | 6
tools/source/debug/debug.cxx | 205 +++++++++++-----------
ucb/source/core/ucbcmds.cxx | 5
ucb/source/core/ucbstore.cxx | 49 +----
ucb/source/ucp/ftp/ftpurl.cxx | 4
ucb/source/ucp/hierarchy/hierarchycontent.cxx | 4
ucb/source/ucp/hierarchy/hierarchydata.cxx | 12 -
unotools/source/config/compatibility.cxx | 5
unotools/source/config/eventcfg.cxx | 7
vcl/source/app/settings.cxx | 3
vcl/source/control/fmtfield.cxx | 4
vcl/source/gdi/embeddedfontshelper.cxx | 4
vcl/source/gdi/pdfwriter_impl.cxx | 4
vcl/source/image/ImplImageTree.cxx | 4
vcl/source/opengl/OpenGLHelper.cxx | 13 -
vcl/source/outdev/text.cxx | 3
vcl/unx/generic/fontmanager/fontmanager.cxx | 8
vcl/unx/generic/fontmanager/helper.cxx | 3
vcl/unx/generic/printer/printerinfomanager.cxx | 8
vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx | 4
34 files changed, 195 insertions(+), 258 deletions(-)
New commits:
commit d820136dab6271dd591842002b2591e041801cf7
Author: Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Tue Oct 1 20:34:09 2019 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Wed Oct 2 08:01:59 2019 +0200
save/restore locking properly in ImplSdPPTImport::Import
noticed in passing
Change-Id: Ia13b1095e1dcc576f767af90bd1c001ab03f2c44
Reviewed-on: https://gerrit.libreoffice.org/79993
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index 606bb18a8025..92327dbee3f2 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -226,6 +226,7 @@ bool ImplSdPPTImport::Import()
if ( !m_bOk )
return false;
+ bool bWasLocked = pSdrModel->isLocked();
pSdrModel->setLock(true);
const bool bSavedUndoEnabled = pSdrModel->IsUndoEnabled();
pSdrModel->EnableUndo(false);
@@ -1396,7 +1397,7 @@ bool ImplSdPPTImport::Import()
sfx2::LoadOlePropertySet(xDocProps, &mrStorage);
xDocProps->setTemplateName(OUString());
- pSdrModel->setLock(false);
+ pSdrModel->setLock(bWasLocked);
pSdrModel->EnableUndo(bSavedUndoEnabled);
return m_bOk;
}
commit b1ca0e5ad728e1d4105c961b27c9256d86f867c1
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Tue Oct 1 18:24:51 2019 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Wed Oct 2 08:01:49 2019 +0200
loplugin:stringadd in vcl
Change-Id: I21154abe6992418ff2541e5913a0aae0c2c1912c
Reviewed-on: https://gerrit.libreoffice.org/79987
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index 8ada1de6fe3a..74bb8fcd5219 100644
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -2130,8 +2130,7 @@ static void setupPersonaHeaderFooter( WhichPersona eWhich, OUString& rHeaderFoot
}
else if ( aPersona == "default" )
{
- gallery = "$BRAND_BASE_DIR/" LIBO_SHARE_FOLDER;
- gallery += "/gallery/personas/";
+ gallery = "$BRAND_BASE_DIR/" LIBO_SHARE_FOLDER "/gallery/personas/";
}
rHeaderFooterBitmap = readBitmapEx( gallery + aName );
diff --git a/vcl/source/control/fmtfield.cxx b/vcl/source/control/fmtfield.cxx
index cb4f0c68ca5f..7ae57b9f62b7 100644
--- a/vcl/source/control/fmtfield.cxx
+++ b/vcl/source/control/fmtfield.cxx
@@ -251,9 +251,7 @@ namespace validation
return true;
// normalize the string
- OUString sNormalized( "_" );
- sNormalized += _rText;
- sNormalized += "_";
+ OUString sNormalized = "_" + _rText + "_";
return implValidateNormalized( sNormalized );
}
diff --git a/vcl/source/gdi/embeddedfontshelper.cxx b/vcl/source/gdi/embeddedfontshelper.cxx
index 28cebf73d2c3..c5ab8914eb17 100644
--- a/vcl/source/gdi/embeddedfontshelper.cxx
+++ b/vcl/source/gdi/embeddedfontshelper.cxx
@@ -218,8 +218,8 @@ OUString EmbeddedFontsHelper::fontFileUrl( const OUString& familyName, FontFamil
path += "/user/temp/embeddedfonts/fromsystem/";
osl::Directory::createPath( path );
OUString filename = familyName + "_" + OUString::number( family ) + "_" + OUString::number( italic )
- + "_" + OUString::number( weight ) + "_" + OUString::number( pitch );
- filename += ".ttf"; // TODO is it always ttf?
+ + "_" + OUString::number( weight ) + "_" + OUString::number( pitch )
+ + ".ttf"; // TODO is it always ttf?
OUString url = path + filename;
if( osl::File( url ).open( osl_File_OpenFlag_Read ) == osl::File::E_None ) // = exists()
{
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index abfa1682e347..49c2ca9050b8 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -401,8 +401,8 @@ void PDFWriterImpl::createWidgetFieldName( sal_Int32 i_nWidgetIndex, const PDFWr
// how funny, an empty field name
if( i_rControl.getType() == PDFWriter::RadioButton )
{
- aPartialName = "RadioGroup";
- aPartialName += OString::number( static_cast<const PDFWriter::RadioButtonWidget&>(i_rControl).RadioGroup );
+ aPartialName = "RadioGroup" +
+ OString::number( static_cast<const PDFWriter::RadioButtonWidget&>(i_rControl).RadioGroup );
}
else
aPartialName = OString( "Widget" );
diff --git a/vcl/source/image/ImplImageTree.cxx b/vcl/source/image/ImplImageTree.cxx
index 6d85500b2884..5c1fb72ddc9e 100644
--- a/vcl/source/image/ImplImageTree.cxx
+++ b/vcl/source/image/ImplImageTree.cxx
@@ -105,8 +105,8 @@ OUString createPath(OUString const & name, sal_Int32 pos, OUString const & local
OUString getIconCacheUrl(OUString const & sVariant, ImageRequestParameters const & rParameters)
{
- OUString sUrl("${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE("bootstrap") ":UserInstallation}/cache/");
- sUrl += rParameters.msStyle + "/" + sVariant + "/" + rParameters.msName;
+ OUString sUrl = "${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE("bootstrap") ":UserInstallation}/cache/"
+ + rParameters.msStyle + "/" + sVariant + "/" + rParameters.msName;
rtl::Bootstrap::expandMacros(sUrl);
return sUrl;
}
diff --git a/vcl/source/opengl/OpenGLHelper.cxx b/vcl/source/opengl/OpenGLHelper.cxx
index 715fb4568e71..6a4234da3c19 100644
--- a/vcl/source/opengl/OpenGLHelper.cxx
+++ b/vcl/source/opengl/OpenGLHelper.cxx
@@ -230,11 +230,10 @@ namespace
// get info about the graphic device
static const OString aDeviceInfo (getDeviceInfoString());
- OString aMessage;
- aMessage += rPreamble;
- aMessage += aVertexShaderSource;
- aMessage += aFragmentShaderSource;
- aMessage += aDeviceInfo;
+ OString aMessage = rPreamble +
+ aVertexShaderSource +
+ aFragmentShaderSource +
+ aDeviceInfo;
return generateMD5(aMessage.getStr(), aMessage.getLength());
}
@@ -309,8 +308,8 @@ namespace
{
OString aFileName;
aFileName += getCacheFolder();
- aFileName += OUStringToOString( rVertexShaderName, RTL_TEXTENCODING_UTF8 ) + "-";
- aFileName += OUStringToOString( rFragmentShaderName, RTL_TEXTENCODING_UTF8 ) + "-";
+ aFileName += OUStringToOString( rVertexShaderName, RTL_TEXTENCODING_UTF8 ) + "-" +
+ OUStringToOString( rFragmentShaderName, RTL_TEXTENCODING_UTF8 ) + "-";
if (!rGeometryShaderName.isEmpty())
aFileName += OUStringToOString( rGeometryShaderName, RTL_TEXTENCODING_UTF8 ) + "-";
aFileName += rDigest + ".bin";
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index afa7d8d4a501..614ee3dd19ec 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -1984,8 +1984,7 @@ OUString OutputDevice::ImplGetEllipsisString( const OutputDevice& rTargetDevice,
nLastContent--;
OUString aLastStr = aStr.copy(nLastContent);
- OUString aTempLastStr1( "..." );
- aTempLastStr1 += aLastStr;
+ OUString aTempLastStr1 = "..." + aLastStr;
if ( _rLayout.GetTextWidth( aTempLastStr1, 0, aTempLastStr1.getLength() ) > nMaxWidth )
aStr = OutputDevice::ImplGetEllipsisString( rTargetDevice, aStr, nMaxWidth, nStyle | DrawTextFlags::EndEllipsis, _rLayout );
else
diff --git a/vcl/unx/generic/fontmanager/fontmanager.cxx b/vcl/unx/generic/fontmanager/fontmanager.cxx
index 36f049432114..baaae5211fbf 100644
--- a/vcl/unx/generic/fontmanager/fontmanager.cxx
+++ b/vcl/unx/generic/fontmanager/fontmanager.cxx
@@ -179,9 +179,7 @@ std::vector<std::unique_ptr<PrintFontManager::PrintFont>> PrintFontManager::anal
OString aDir( getDirectory( nDirID ) );
- OString aFullPath( aDir );
- aFullPath += "/";
- aFullPath += rFontFile;
+ OString aFullPath = aDir + "/" + rFontFile;
// #i1872# reject unreadable files
if( access( aFullPath.getStr(), R_OK ) )
@@ -912,9 +910,7 @@ OString PrintFontManager::getFontFile(const PrintFont* pFont) const
if (pFont)
{
std::unordered_map< int, OString >::const_iterator it = m_aAtomToDir.find(pFont->m_nDirectory);
- aPath = it->second;
- aPath += "/";
- aPath += pFont->m_aFontFile;
+ aPath = it->second + "/" + pFont->m_aFontFile;
}
return aPath;
}
diff --git a/vcl/unx/generic/fontmanager/helper.cxx b/vcl/unx/generic/fontmanager/helper.cxx
index bd34d34a5b83..834efc439422 100644
--- a/vcl/unx/generic/fontmanager/helper.cxx
+++ b/vcl/unx/generic/fontmanager/helper.cxx
@@ -140,8 +140,7 @@ void psp::getPrinterPathList( std::vector< OUString >& rPathList, const char* pS
if( pSubDir )
{
- aDir += "/";
- aDir += pSubDir;
+ aDir += OString("/") + pSubDir;
}
struct stat aStat;
if( stat( aDir.getStr(), &aStat ) || ! S_ISDIR( aStat.st_mode ) )
diff --git a/vcl/unx/generic/printer/printerinfomanager.cxx b/vcl/unx/generic/printer/printerinfomanager.cxx
index 104c5e04e091..1977a80b5e7f 100644
--- a/vcl/unx/generic/printer/printerinfomanager.cxx
+++ b/vcl/unx/generic/printer/printerinfomanager.cxx
@@ -511,9 +511,7 @@ void PrinterInfoManager::initialize()
}
for (auto const& printQueue : m_aSystemPrintQueues)
{
- OUString aPrinterName( "<" );
- aPrinterName += printQueue.m_aQueue;
- aPrinterName += ">";
+ OUString aPrinterName = "<" + printQueue.m_aQueue + ">";
if( m_aPrinters.find( aPrinterName ) != m_aPrinters.end() )
// probably user made this one permanent
@@ -570,8 +568,8 @@ FILE* PrinterInfoManager::startSpool( const OUString& rPrintername, bool bQuickC
const PrinterInfo& rPrinterInfo = getPrinterInfo (rPrintername);
const OUString& rCommand = (bQuickCommand && !rPrinterInfo.m_aQuickCommand.isEmpty() ) ?
rPrinterInfo.m_aQuickCommand : rPrinterInfo.m_aCommand;
- OString aShellCommand = OUStringToOString (rCommand, RTL_TEXTENCODING_ISO_8859_1);
- aShellCommand += " 2>/dev/null";
+ OString aShellCommand = OUStringToOString (rCommand, RTL_TEXTENCODING_ISO_8859_1) +
+ " 2>/dev/null";
return popen (aShellCommand.getStr(), "w");
}
diff --git a/vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx b/vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx
index 2552bb16b253..d95f58035aad 100644
--- a/vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx
+++ b/vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx
@@ -1430,8 +1430,8 @@ void SalGtkFilePicker::implChangeType( GtkTreeSelection *selection )
{
gchar *title;
gtk_tree_model_get (model, &iter, 2, &title, -1);
- aLabel += ": ";
- aLabel += OUString( title, strlen(title), RTL_TEXTENCODING_UTF8 );
+ aLabel += ": " +
+ OUString( title, strlen(title), RTL_TEXTENCODING_UTF8 );
g_free (title);
}
gtk_expander_set_label (GTK_EXPANDER (m_pFilterExpander),
commit 9e5b43ff37683b7b67be96c2953e851498a310c9
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Tue Oct 1 18:24:17 2019 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Wed Oct 2 08:01:38 2019 +0200
loplugin:stringadd in tools..unotools
Change-Id: I441a5ccef6adc8be8029178e304ff3044e812e2a
Reviewed-on: https://gerrit.libreoffice.org/79986
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/tools/source/debug/debug.cxx b/tools/source/debug/debug.cxx
index 9b9419599b7d..22c3b08698bd 100644
--- a/tools/source/debug/debug.cxx
+++ b/tools/source/debug/debug.cxx
@@ -50,6 +50,7 @@
#include <tools/debug.hxx>
#include <sal/log.hxx>
#include <osl/thread.h>
+#include <rtl/strbuf.hxx>
#include <cstdlib>
#include <typeinfo>
@@ -94,18 +95,18 @@ void DbgTestSolarMutex()
#endif
-OString exceptionToString(const css::uno::Any & caught)
+static void exceptionToStringImpl(OStringBuffer& sMessage, const css::uno::Any & caught)
{
auto toOString = [](OUString const & s) {
return OUStringToOString( s, osl_getThreadTextEncoding() );
};
- OString sMessage = toOString(caught.getValueTypeName());
+ sMessage.append(toOString(caught.getValueTypeName()));
css::uno::Exception exception;
caught >>= exception;
if ( !exception.Message.isEmpty() )
{
- sMessage += " message: ";
- sMessage += toOString(exception.Message);
+ sMessage.append(" message: ");
+ sMessage.append(toOString(exception.Message));
}
if ( exception.Context.is() )
{
@@ -115,8 +116,8 @@ OString exceptionToString(const css::uno::Any & caught)
int status;
pContext = abi::__cxa_demangle( pContext, nullptr, nullptr, &status);
#endif
- sMessage += " context: ";
- sMessage += pContext;
+ sMessage.append(" context: ");
+ sMessage.append(pContext);
#if defined __GLIBCXX__
std::free(const_cast<char *>(pContext));
#endif
@@ -125,289 +126,295 @@ OString exceptionToString(const css::uno::Any & caught)
css::configuration::CorruptedConfigurationException specialized;
if ( caught >>= specialized )
{
- sMessage += " details: ";
- sMessage += toOString(specialized.Details);
+ sMessage.append(" details: ");
+ sMessage.append(toOString(specialized.Details));
}
}
{
css::configuration::InvalidBootstrapFileException specialized;
if ( caught >>= specialized )
{
- sMessage += " BootstrapFileURL: ";
- sMessage += toOString(specialized.BootstrapFileURL);
+ sMessage.append(" BootstrapFileURL: ");
+ sMessage.append(toOString(specialized.BootstrapFileURL));
}
}
{
css::configuration::MissingBootstrapFileException specialized;
if ( caught >>= specialized )
{
- sMessage += " BootstrapFileURL: ";
- sMessage += toOString(specialized.BootstrapFileURL);
+ sMessage.append(" BootstrapFileURL: ");
+ sMessage.append(toOString(specialized.BootstrapFileURL));
}
}
{
css::configuration::backend::MalformedDataException specialized;
if ( caught >>= specialized )
{
- sMessage += "\n wrapped: ";
- sMessage += exceptionToString(specialized.ErrorDetails);
+ sMessage.append("\n wrapped: ");
+ sMessage.append(exceptionToString(specialized.ErrorDetails));
}
}
{
css::configuration::backend::BackendSetupException specialized;
if ( caught >>= specialized )
{
- sMessage += "\n wrapped: ";
- sMessage += exceptionToString(specialized.BackendException);
+ sMessage.append("\n wrapped: ");
+ sMessage.append(exceptionToString(specialized.BackendException));
}
}
{
css::deployment::DependencyException specialized;
if ( caught >>= specialized )
{
- sMessage += " UnsatisfiedDependencies: ";
- sMessage += toOString(comphelper::anyToString(css::uno::Any(specialized.UnsatisfiedDependencies)));
+ sMessage.append(" UnsatisfiedDependencies: ");
+ sMessage.append(toOString(comphelper::anyToString(css::uno::Any(specialized.UnsatisfiedDependencies))));
}
}
{
css::deployment::DeploymentException specialized;
if ( caught >>= specialized )
{
- sMessage += "\n wrapped: ";
- sMessage += exceptionToString(specialized.Cause);
+ sMessage.append("\n wrapped: ");
+ sMessage.append(exceptionToString(specialized.Cause));
}
}
{
css::document::CorruptedFilterConfigurationException specialized;
if ( caught >>= specialized )
{
- sMessage += " Details: ";
- sMessage += toOString(specialized.Details);
+ sMessage.append(" Details: ");
+ sMessage.append(toOString(specialized.Details));
}
}
{
css::document::UndoFailedException specialized;
if ( caught >>= specialized )
{
- sMessage += " Reason: ";
- sMessage += toOString(comphelper::anyToString(specialized.Reason));
+ sMessage.append(" Reason: ");
+ sMessage.append(toOString(comphelper::anyToString(specialized.Reason)));
}
}
{
css::lang::IllegalArgumentException specialized;
if ( caught >>= specialized )
{
- sMessage += " ArgumentPosition: ";
- sMessage += OString::number(specialized.ArgumentPosition);
+ sMessage.append(" ArgumentPosition: ");
+ sMessage.append(OString::number(specialized.ArgumentPosition));
}
}
{
css::lang::WrappedTargetException specialized;
if ( caught >>= specialized )
{
- sMessage += "\n wrapped: ";
- sMessage += exceptionToString(specialized.TargetException);
+ sMessage.append("\n wrapped: ");
+ sMessage.append(exceptionToString(specialized.TargetException));
}
}
{
css::lang::WrappedTargetRuntimeException specialized;
if ( caught >>= specialized )
{
- sMessage += "\n wrapped: ";
- sMessage += exceptionToString(specialized.TargetException);
+ sMessage.append("\n wrapped: ");
+ sMessage.append(exceptionToString(specialized.TargetException));
}
}
{
css::ldap::LdapGenericException specialized;
if ( caught >>= specialized )
{
- sMessage += " ErrorCode: ";
- sMessage += OString::number(specialized.ErrorCode);
+ sMessage.append(" ErrorCode: ");
+ sMessage.append(OString::number(specialized.ErrorCode));
}
}
{
css::script::BasicErrorException specialized;
if ( caught >>= specialized )
{
- sMessage += " ErrorCode: ";
- sMessage += OString::number(specialized.ErrorCode);
- sMessage += " ErrorMessageArgument: ";
- sMessage += toOString(specialized.ErrorMessageArgument);
+ sMessage.append(" ErrorCode: ");
+ sMessage.append(OString::number(specialized.ErrorCode));
+ sMessage.append(" ErrorMessageArgument: ");
+ sMessage.append(toOString(specialized.ErrorMessageArgument));
}
}
{
css::script::CannotConvertException specialized;
if ( caught >>= specialized )
{
- sMessage += " DestinationTypeClass: ";
- sMessage += toOString(comphelper::anyToString(css::uno::Any(specialized.DestinationTypeClass)));
- sMessage += " Reason: ";
- sMessage += OString::number(specialized.Reason);
- sMessage += " ArgumentIndex: ";
- sMessage += OString::number(specialized.ArgumentIndex);
+ sMessage.append(" DestinationTypeClass: ");
+ sMessage.append(toOString(comphelper::anyToString(css::uno::Any(specialized.DestinationTypeClass))));
+ sMessage.append(" Reason: ");
+ sMessage.append(OString::number(specialized.Reason));
+ sMessage.append(" ArgumentIndex: ");
+ sMessage.append(OString::number(specialized.ArgumentIndex));
}
}
{
css::script::provider::ScriptErrorRaisedException specialized;
if ( caught >>= specialized )
{
- sMessage += " scriptName: ";
- sMessage += toOString(specialized.scriptName);
- sMessage += " language: ";
- sMessage += toOString(specialized.language);
- sMessage += " lineNum: ";
- sMessage += OString::number(specialized.lineNum);
+ sMessage.append(" scriptName: ");
+ sMessage.append(toOString(specialized.scriptName));
+ sMessage.append(" language: ");
+ sMessage.append(toOString(specialized.language));
+ sMessage.append(" lineNum: ");
+ sMessage.append(OString::number(specialized.lineNum));
}
}
{
css::script::provider::ScriptExceptionRaisedException specialized;
if ( caught >>= specialized )
{
- sMessage += " exceptionType: ";
- sMessage += toOString(specialized.exceptionType);
+ sMessage.append(" exceptionType: ");
+ sMessage.append(toOString(specialized.exceptionType));
}
}
{
css::script::provider::ScriptFrameworkErrorException specialized;
if ( caught >>= specialized )
{
- sMessage += " scriptName: ";
- sMessage += toOString(specialized.scriptName);
- sMessage += " language: ";
- sMessage += toOString(specialized.language);
- sMessage += " errorType: ";
- sMessage += OString::number(specialized.errorType);
+ sMessage.append(" scriptName: ");
+ sMessage.append(toOString(specialized.scriptName));
+ sMessage.append(" language: ");
+ sMessage.append(toOString(specialized.language));
+ sMessage.append(" errorType: ");
+ sMessage.append(OString::number(specialized.errorType));
}
}
{
css::sdbc::SQLException specialized;
if ( caught >>= specialized )
{
- sMessage += " SQLState: ";
- sMessage += toOString(specialized.SQLState);
- sMessage += " ErrorCode: ";
- sMessage += OString::number(specialized.ErrorCode);
- sMessage += "\n wrapped: ";
- sMessage += exceptionToString(specialized.NextException);
+ sMessage.append(" SQLState: ");
+ sMessage.append(toOString(specialized.SQLState));
+ sMessage.append(" ErrorCode: ");
+ sMessage.append(OString::number(specialized.ErrorCode));
+ sMessage.append("\n wrapped: ");
+ sMessage.append(exceptionToString(specialized.NextException));
}
}
{
css::system::SystemShellExecuteException specialized;
if ( caught >>= specialized )
{
- sMessage += " PosixError: ";
- sMessage += OString::number(specialized.PosixError);
+ sMessage.append(" PosixError: ");
+ sMessage.append(OString::number(specialized.PosixError));
}
}
{
css::task::ErrorCodeIOException specialized;
if ( caught >>= specialized )
{
- sMessage += " errcode: ";
- sMessage += OString::number( specialized.ErrCode );
+ sMessage.append(" errcode: ");
+ sMessage.append(OString::number( specialized.ErrCode ));
}
}
{
css::ucb::CommandFailedException specialized;
if ( caught >>= specialized )
{
- sMessage += "\n Reason: ";
- sMessage += exceptionToString( specialized.Reason );
+ sMessage.append("\n Reason: ");
+ sMessage.append(exceptionToString( specialized.Reason ));
}
}
{
css::ucb::ContentCreationException specialized;
if ( caught >>= specialized )
{
- sMessage += " eError: ";
- sMessage += toOString(comphelper::anyToString( css::uno::Any(specialized.eError) ));
+ sMessage.append(" eError: ");
+ sMessage.append(toOString(comphelper::anyToString( css::uno::Any(specialized.eError) )));
}
}
{
css::ucb::MissingPropertiesException specialized;
if ( caught >>= specialized )
{
- sMessage += " Properties: ";
- sMessage += toOString(comphelper::anyToString( css::uno::Any(specialized.Properties) ));
+ sMessage.append(" Properties: ");
+ sMessage.append(toOString(comphelper::anyToString( css::uno::Any(specialized.Properties) )));
}
}
{
css::ucb::NameClashException specialized;
if ( caught >>= specialized )
{
- sMessage += " Name: ";
- sMessage += toOString( specialized.Name );
+ sMessage.append(" Name: ");
+ sMessage.append(toOString( specialized.Name ));
}
}
{
css::util::MalformedNumberFormatException specialized;
if ( caught >>= specialized )
{
- sMessage += " CheckPos: ";
- sMessage += OString::number( specialized.CheckPos );
+ sMessage.append(" CheckPos: ");
+ sMessage.append(OString::number( specialized.CheckPos ));
}
}
{
css::xml::dom::DOMException specialized;
if ( caught >>= specialized )
{
- sMessage += " Code: ";
- sMessage += toOString(comphelper::anyToString( css::uno::Any(specialized.Code) ));
+ sMessage.append(" Code: ");
+ sMessage.append(toOString(comphelper::anyToString( css::uno::Any(specialized.Code) )));
}
}
{
css::xml::dom::DOMException specialized;
if ( caught >>= specialized )
{
- sMessage += " Code: ";
- sMessage += toOString(comphelper::anyToString( css::uno::Any(specialized.Code) ));
+ sMessage.append(" Code: ");
+ sMessage.append(toOString(comphelper::anyToString( css::uno::Any(specialized.Code) )));
}
}
{
css::xml::sax::SAXException specialized;
if ( caught >>= specialized )
{
- sMessage += "\n wrapped: ";
- sMessage += exceptionToString( specialized.WrappedException );
+ sMessage.append("\n wrapped: ");
+ sMessage.append(exceptionToString( specialized.WrappedException ));
}
}
{
css::xml::sax::SAXParseException specialized;
if ( caught >>= specialized )
{
- sMessage += " PublicId: ";
- sMessage += toOString( specialized.PublicId );
- sMessage += " SystemId: ";
- sMessage += toOString( specialized.SystemId );
- sMessage += " LineNumber: ";
- sMessage += OString::number( specialized.LineNumber );
- sMessage += " ColumnNumber: ";
- sMessage += OString::number( specialized.ColumnNumber );
+ sMessage.append(" PublicId: ");
+ sMessage.append(toOString( specialized.PublicId ));
+ sMessage.append(" SystemId: ");
+ sMessage.append(toOString( specialized.SystemId ));
+ sMessage.append(" LineNumber: ");
+ sMessage.append(OString::number( specialized.LineNumber ));
+ sMessage.append(" ColumnNumber: ");
+ sMessage.append(OString::number( specialized.ColumnNumber ));
}
}
{
css::ucb::InteractiveIOException specialized;
if ( caught >>= specialized )
{
- sMessage += " Code: ";
- sMessage += OString::number( static_cast<sal_Int32>(specialized.Code) );
+ sMessage.append(" Code: ");
+ sMessage.append(OString::number( static_cast<sal_Int32>(specialized.Code) ));
}
}
- return sMessage;
+}
+
+OString exceptionToString(const css::uno::Any & caught)
+{
+ OStringBuffer sMessage;
+ exceptionToStringImpl(sMessage, caught);
+ return sMessage.makeStringAndClear();
}
void DbgUnhandledException(const css::uno::Any & caught, const char* currentFunction, const char* fileAndLineNo,
const char* area, const char* explanatory)
{
- OString sMessage( "DBG_UNHANDLED_EXCEPTION in " );
- sMessage += currentFunction;
+ OStringBuffer sMessage( "DBG_UNHANDLED_EXCEPTION in " );
+ sMessage.append(currentFunction);
if (explanatory)
{
- sMessage += "\n when: ";
- sMessage += explanatory;
+ sMessage.append("\n when: ");
+ sMessage.append(explanatory);
}
- sMessage += " exception: ";
- sMessage += exceptionToString(caught);
+ sMessage.append(" exception: ");
+ exceptionToStringImpl(sMessage, caught);
if (area == nullptr)
area = "legacy.osl";
diff --git a/ucb/source/core/ucbcmds.cxx b/ucb/source/core/ucbcmds.cxx
index ebef83f92ae7..4e511a0b44d3 100644
--- a/ucb/source/core/ucbcmds.cxx
+++ b/ucb/source/core/ucbcmds.cxx
@@ -1000,9 +1000,8 @@ void handleNameClashRename(
{
nTry++;
- OUString aNewTitle = aOldTitlePre;
- aNewTitle += OUString::number( nTry );
- aNewTitle += aOldTitlePost;
+ OUString aNewTitle = aOldTitlePre + OUString::number( nTry ) +
+ aOldTitlePost;
// Set new title
setTitle( xCommandProcessorN, rContext.xEnv, aNewTitle );
diff --git a/ucb/source/core/ucbstore.cxx b/ucb/source/core/ucbstore.cxx
index f25a0fb21cf2..cdd746ceb7e6 100644
--- a/ucb/source/core/ucbstore.cxx
+++ b/ucb/source/core/ucbstore.cxx
@@ -1210,8 +1210,7 @@ void SAL_CALL PersistentPropertySet::setPropertyValue( const OUString& aProperty
try
{
// Obtain old value
- OUString aValueName = aFullPropName;
- aValueName += "/Value";
+ OUString aValueName = aFullPropName + "/Value";
Any aOldValue
= xRootHierNameAccess->getByHierarchicalName(
aValueName );
@@ -1239,8 +1238,7 @@ void SAL_CALL PersistentPropertySet::setPropertyValue( const OUString& aProperty
if ( m_pImpl->m_pPropertyChangeListeners )
{
// Obtain handle
- aValueName = aFullPropName;
- aValueName += "/Handle";
+ aValueName = aFullPropName + "/Handle";
sal_Int32 nHandle = -1;
xRootHierNameAccess->getByHierarchicalName( aValueName )
>>= nHandle;
@@ -1422,8 +1420,7 @@ void SAL_CALL PersistentPropertySet::addProperty(
if ( xRootHierNameAccess.is() )
{
aFullValuesName = getFullKey();
- OUString aFullPropName = aFullValuesName;
- aFullPropName += "/";
+ OUString aFullPropName = aFullValuesName + "/";
aFullPropName += makeHierarchalNameSegment( Name );
if ( xRootHierNameAccess->hasByHierarchicalName( aFullPropName ) )
@@ -1570,8 +1567,7 @@ void SAL_CALL PersistentPropertySet::removeProperty( const OUString& Name )
if ( xRootHierNameAccess.is() )
{
aFullValuesName = getFullKey();
- aFullPropName = aFullValuesName;
- aFullPropName += "/";
+ aFullPropName = aFullValuesName + "/";
aFullPropName += makeHierarchalNameSegment( Name );
// Property in set?
@@ -1581,8 +1577,7 @@ void SAL_CALL PersistentPropertySet::removeProperty( const OUString& Name )
// Property removable?
try
{
- OUString aFullAttrName = aFullPropName;
- aFullAttrName += "/Attributes";
+ OUString aFullAttrName = aFullPropName + "/Attributes";
sal_Int32 nAttribs = 0;
if ( xRootHierNameAccess->getByHierarchicalName( aFullAttrName )
@@ -1638,9 +1633,7 @@ void SAL_CALL PersistentPropertySet::removeProperty( const OUString& Name )
try
{
- OUString aFullHandleName = aFullPropName;
- aFullHandleName
- += "/Handle";
+ OUString aFullHandleName = aFullPropName + "/Handle";
if ( ! ( xRootHierNameAccess->getByHierarchicalName(
aFullHandleName ) >>= nHandle ) )
@@ -1781,8 +1774,7 @@ Sequence< PropertyValue > SAL_CALL PersistentPropertySet::getPropertyValues()
try
{
// Obtain and set property handle
- OUString aHierName = aXMLName;
- aHierName += aHandleName;
+ OUString aHierName = aXMLName + aHandleName;
Any aKeyValue
= xHierNameAccess->getByHierarchicalName(
aHierName );
@@ -1802,8 +1794,7 @@ Sequence< PropertyValue > SAL_CALL PersistentPropertySet::getPropertyValues()
try
{
// Obtain and set property value
- OUString aHierName = aXMLName;
- aHierName += aValueName;
+ OUString aHierName = aXMLName + aValueName;
rValue.Value
= xHierNameAccess->getByHierarchicalName(
aHierName );
@@ -1823,8 +1814,7 @@ Sequence< PropertyValue > SAL_CALL PersistentPropertySet::getPropertyValues()
try
{
// Obtain and set property state
- OUString aHierName = aXMLName;
- aHierName += aStateName;
+ OUString aHierName = aXMLName +aStateName;
Any aKeyValue
= xHierNameAccess->getByHierarchicalName(
aHierName );
@@ -1906,8 +1896,7 @@ void SAL_CALL PersistentPropertySet::setPropertyValues(
makeAny( rNewValue.Handle ) );
// Save old value
- OUString aValueName = aFullPropName;
- aValueName += "/Value";
+ OUString aValueName = aFullPropName +"/Value";
Any aOldValue
= xRootHierNameAccess->getByHierarchicalName(
aValueName );
@@ -2129,8 +2118,7 @@ Sequence< Property > SAL_CALL PropertySetInfo_Impl::getProperties()
try
{
// Obtain and set property handle
- OUString aHierName = aXMLName;
- aHierName += aHandleName;
+ OUString aHierName = aXMLName + aHandleName;
Any aKeyValue
= xHierNameAccess->getByHierarchicalName(
aHierName );
@@ -2150,8 +2138,7 @@ Sequence< Property > SAL_CALL PropertySetInfo_Impl::getProperties()
try
{
// Obtain and set property type
- OUString aHierName = aXMLName;
- aHierName += aValueName;
+ OUString aHierName = aXMLName + aValueName;
Any aKeyValue
= xHierNameAccess->getByHierarchicalName(
aHierName );
@@ -2173,8 +2160,7 @@ Sequence< Property > SAL_CALL PropertySetInfo_Impl::getProperties()
try
{
// Obtain and set property attributes
- OUString aHierName = aXMLName;
- aHierName += aAttrName;
+ OUString aHierName = aXMLName + aAttrName;
Any aKeyValue
= xHierNameAccess->getByHierarchicalName(
aHierName );
@@ -2239,8 +2225,7 @@ Property SAL_CALL PropertySetInfo_Impl::getPropertyByName(
Property aProp;
// Obtain handle.
- OUString aKey = aFullPropName;
- aKey += "/Handle";
+ OUString aKey = aFullPropName + "/Handle";
if ( !( xRootHierNameAccess->getByHierarchicalName( aKey )
>>= aProp.Handle ) )
@@ -2251,8 +2236,7 @@ Property SAL_CALL PropertySetInfo_Impl::getPropertyByName(
}
// Obtain Value and extract type.
- aKey = aFullPropName;
- aKey += "/Value";
+ aKey = aFullPropName + "/Value";
Any aValue = xRootHierNameAccess->getByHierarchicalName( aKey );
if ( !aValue.hasValue() )
@@ -2265,8 +2249,7 @@ Property SAL_CALL PropertySetInfo_Impl::getPropertyByName(
aProp.Type = aValue.getValueType();
// Obtain Attributes.
- aKey = aFullPropName;
- aKey += "/Attributes";
+ aKey = aFullPropName + "/Attributes";
sal_Int32 nAttribs = 0;
if ( xRootHierNameAccess->getByHierarchicalName( aKey )
diff --git a/ucb/source/ucp/ftp/ftpurl.cxx b/ucb/source/ucp/ftp/ftpurl.cxx
index c938097bb746..1964e47f22d7 100644
--- a/ucb/source/ucp/ftp/ftpurl.cxx
+++ b/ucb/source/ucp/ftp/ftpurl.cxx
@@ -675,8 +675,8 @@ void FTPURL::mkdir(bool ReplaceExisting) const
// will give an error
title = OString("/");
- OString aDel("del "); aDel += title;
- OString mkd("mkd "); mkd += title;
+ OString aDel = "del " + title;
+ OString mkd = "mkd " + title;
struct curl_slist *slist = nullptr;
diff --git a/ucb/source/ucp/hierarchy/hierarchycontent.cxx b/ucb/source/ucp/hierarchy/hierarchycontent.cxx
index 3c2b23538d88..6f2029888bcb 100644
--- a/ucb/source/ucp/hierarchy/hierarchycontent.cxx
+++ b/ucb/source/ucp/hierarchy/hierarchycontent.cxx
@@ -1372,8 +1372,8 @@ void HierarchyContent::insert( sal_Int32 nNameClashResolve,
else
{
OUString aNewTitle( m_aProps.getTitle() );
- aNewTitle += "_";
- aNewTitle += OUString::number( nTry );
+ aNewTitle += "_" +
+ OUString::number( nTry );
m_aProps.setTitle( aNewTitle );
}
}
diff --git a/ucb/source/ucp/hierarchy/hierarchydata.cxx b/ucb/source/ucp/hierarchy/hierarchydata.cxx
index 37494f50b9a8..f1ff3cdbd64b 100644
--- a/ucb/source/ucp/hierarchy/hierarchydata.cxx
+++ b/ucb/source/ucp/hierarchy/hierarchydata.cxx
@@ -164,8 +164,7 @@ bool HierarchyEntry::getData( HierarchyEntryData& rData )
if ( xRootReadAccess.is() )
{
- OUString aTitlePath = m_aPath;
- aTitlePath += "/Title";
+ OUString aTitlePath = m_aPath + "/Title";
// Note: Avoid NoSuchElementExceptions, because exceptions are
// relatively 'expensive'. Checking for availability of
@@ -188,8 +187,7 @@ bool HierarchyEntry::getData( HierarchyEntryData& rData )
rData.setTitle( aValue );
// Get TargetURL value.
- OUString aTargetURLPath = m_aPath;
- aTargetURLPath += "/TargetURL";
+ OUString aTargetURLPath = m_aPath + "/TargetURL";
if ( !( xRootReadAccess->getByHierarchicalName( aTargetURLPath )
>>= aValue ) )
{
@@ -207,8 +205,7 @@ bool HierarchyEntry::getData( HierarchyEntryData& rData )
aValue = m_xOfficeInstDirs->makeAbsoluteURL( aValue );
rData.setTargetURL( aValue );
- OUString aTypePath = m_aPath;
- aTypePath += "/Type";
+ OUString aTypePath = m_aPath + "/Type";
if ( xRootReadAccess->hasByHierarchicalName( aTypePath ) )
{
// Might not be present since it was introduced long after
@@ -884,8 +881,7 @@ bool HierarchyEntry::first( iterator const & it )
if ( !m_aPath.isEmpty() )
{
- OUString aPath = m_aPath;
- aPath += "/Children";
+ OUString aPath = m_aPath + "/Children";
xRootHierNameAccess->getByHierarchicalName( aPath )
>>= xNameAccess;
diff --git a/unotools/source/config/compatibility.cxx b/unotools/source/config/compatibility.cxx
index 6fe672e78c31..a71c8ac39c8d 100644
--- a/unotools/source/config/compatibility.cxx
+++ b/unotools/source/config/compatibility.cxx
@@ -295,10 +295,7 @@ Sequence< OUString > SvtCompatibilityOptions_Impl::impl_GetPropertyNames( Sequen
// Copy entries to destination and expand every item with 2 supported sub properties.
for ( const auto& rItem : std::as_const(rItems) )
{
- OUString sFixPath = SETNODE_ALLFILEFORMATS;
- sFixPath += PATHDELIMITER;
- sFixPath += rItem;
- sFixPath += PATHDELIMITER;
+ OUString sFixPath = SETNODE_ALLFILEFORMATS PATHDELIMITER + rItem + PATHDELIMITER;
for ( int i = static_cast<int>(SvtCompatibilityEntry::Index::Module); i < static_cast<int>(SvtCompatibilityEntry::Index::INVALID); ++i )
{
lProperties[ nDestStep ] = sFixPath + SvtCompatibilityEntry::getName( SvtCompatibilityEntry::Index(i) );
diff --git a/unotools/source/config/eventcfg.cxx b/unotools/source/config/eventcfg.cxx
index 362a161bdfaf..deb87647599c 100644
--- a/unotools/source/config/eventcfg.cxx
+++ b/unotools/source/config/eventcfg.cxx
@@ -187,11 +187,8 @@ void GlobalEventConfig_Impl::initBindingInfo()
// Get ALL names of current existing list items in configuration!
const Sequence< OUString > lEventNames = GetNodeNames( SETNODE_BINDINGS, utl::ConfigNameFormat::LocalPath );
- OUString aSetNode( SETNODE_BINDINGS );
- aSetNode += PATHDELIMITER;
-
- OUString aCommandKey( PATHDELIMITER );
- aCommandKey += PROPERTYNAME_BINDINGURL;
+ OUString aSetNode = SETNODE_BINDINGS PATHDELIMITER;
+ OUString aCommandKey = PATHDELIMITER PROPERTYNAME_BINDINGURL;
// Expand all keys
Sequence< OUString > lMacros(1);
commit 32617df2f59b05ca5942fd18b3440ec834982565
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Tue Oct 1 18:22:54 2019 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Wed Oct 2 08:01:26 2019 +0200
loplugin:stringadd in svx
Change-Id: I47944e589c5261d26d5ef0c116a9173bf6ed1f03
Reviewed-on: https://gerrit.libreoffice.org/79983
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/svx/qa/unit/customshapes.cxx b/svx/qa/unit/customshapes.cxx
index ed26337380bf..5ad16cc5ea53 100644
--- a/svx/qa/unit/customshapes.cxx
+++ b/svx/qa/unit/customshapes.cxx
@@ -453,8 +453,8 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf126512_OOXML_handle_in_ODP)
if (aInitialPosition.X == aObservedPosition.X
&& aInitialPosition.Y == aObservedPosition.Y)
{
- sErrors += "\n";
- sErrors += OUString::number(i) + " " + sShapeType + " " + OUString::number(j);
+ sErrors
+ += "\n" + OUString::number(i) + " " + sShapeType + " " + OUString::number(j);
}
}
}
diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx
index 6151ea928e47..fdec9dbdebf3 100644
--- a/svx/source/customshapes/EnhancedCustomShape2d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx
@@ -271,8 +271,8 @@ OUString EnhancedCustomShape2d::GetEquation( const sal_uInt16 nFlags, sal_Int32
EnhancedCustomShape2d::AppendEnhancedCustomShapeEquationParameter( aEquation, nP1, b1Special );
aEquation += "/";
EnhancedCustomShape2d::AppendEnhancedCustomShapeEquationParameter( aEquation, nP2, b2Special );
- aEquation += ")";
- aEquation += "*(";
+ aEquation += ")"
+ "*(";
EnhancedCustomShape2d::AppendEnhancedCustomShapeEquationParameter( aEquation, nP1, b1Special );
aEquation += "/";
EnhancedCustomShape2d::AppendEnhancedCustomShapeEquationParameter( aEquation, nP2, b2Special );
diff --git a/svx/source/dialog/svxbmpnumvalueset.cxx b/svx/source/dialog/svxbmpnumvalueset.cxx
index 7bc0df78cf2d..ba2bbb140d07 100644
--- a/svx/source/dialog/svxbmpnumvalueset.cxx
+++ b/svx/source/dialog/svxbmpnumvalueset.cxx
@@ -315,8 +315,7 @@ void SvxNumValueSet::UserDraw( const UserDrawEvent& rUDEvt )
sal_Int32 nStartLevel = std::min(static_cast<sal_Int32>(aParentNumberings[i]), i);
for(sal_Int32 nParentLevel = i - nStartLevel; nParentLevel < i; nParentLevel++)
{
- OUString sTmp(sLevelTexts[nParentLevel]);
- sTmp += ".";
+ OUString sTmp = sLevelTexts[nParentLevel] + ".";
lcl_PaintLevel(pVDev,
aNumberingTypes[nParentLevel],
sBulletChars[nParentLevel],
@@ -690,8 +689,7 @@ void NumValueSet::UserDraw( const UserDrawEvent& rUDEvt )
sal_Int32 nStartLevel = std::min(static_cast<sal_Int32>(aParentNumberings[i]), i);
for(sal_Int32 nParentLevel = i - nStartLevel; nParentLevel < i; nParentLevel++)
{
- OUString sTmp(sLevelTexts[nParentLevel]);
- sTmp += ".";
+ OUString sTmp = sLevelTexts[nParentLevel] + ".";
lcl_PaintLevel(pVDev,
aNumberingTypes[nParentLevel],
sBulletChars[nParentLevel],
diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx
index bd44a83b3f50..0c3a7ce185dc 100644
--- a/svx/source/fmcomp/gridctrl.cxx
+++ b/svx/source/fmcomp/gridctrl.cxx
@@ -455,9 +455,7 @@ sal_uInt16 DbGridControl::NavigationBar::ArrangeControls()
// count an extra hairspace (U+200A) left and right
const OUString sevenDigits(m_aAbsolute->CreateFieldText(6000000));
const OUString hairSpace(u'\x200A');
- OUString textPattern(hairSpace);
- textPattern += sevenDigits;
- textPattern += hairSpace;
+ OUString textPattern = hairSpace + sevenDigits + hairSpace;
nTextWidth = m_aAbsolute->GetTextWidth(textPattern);
m_aAbsolute->SetPosPixel(Point(nX,nY));
m_aAbsolute->SetSizePixel(Size(nTextWidth, nH));
@@ -741,8 +739,8 @@ void DbGridControl::NavigationBar::SetState(DbGridControlNavigationBarState nWhi
// add the number of selected rows, if applicable
if (pParent->GetSelectRowCount())
{
- OUString aExtendedInfo(aText);
- aExtendedInfo += " (";
+ OUString aExtendedInfo = aText +
+ " (";
aExtendedInfo += m_aAbsolute->CreateFieldText(pParent->GetSelectRowCount());
aExtendedInfo += ")";
pWnd->SetText(aExtendedInfo);
diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx
index e8966b1d97c4..c39630ea3dd4 100644
--- a/svx/source/form/datanavi.cxx
+++ b/svx/source/form/datanavi.cxx
@@ -726,8 +726,7 @@ namespace svxform
{
OUString sTemp;
pNode->m_xPropSet->getPropertyValue( PN_BINDING_ID ) >>= sTemp;
- sNewName += sTemp;
- sNewName += ": ";
+ sNewName += sTemp + ": ";
pNode->m_xPropSet->getPropertyValue( PN_BINDING_EXPR ) >>= sTemp;
sNewName += sTemp;
}
@@ -811,8 +810,7 @@ namespace svxform
pEntry = m_pItemList->InsertEntry( sTemp, aImage, aImage, nullptr, false, TREELIST_APPEND, pNode );
// Action
_rEntry->getPropertyValue( PN_SUBMISSION_ACTION ) >>= sTemp;
- OUString sEntry = SvxResId( RID_STR_DATANAV_SUBM_ACTION );
- sEntry += sTemp;
+ OUString sEntry = SvxResId( RID_STR_DATANAV_SUBM_ACTION ) + sTemp;
m_pItemList->InsertEntry( sEntry, aImage, aImage, pEntry );
// Method
_rEntry->getPropertyValue( PN_SUBMISSION_METHOD ) >>= sTemp;
@@ -821,13 +819,11 @@ namespace svxform
m_pItemList->InsertEntry( sEntry, aImage, aImage, pEntry );
// Ref
_rEntry->getPropertyValue( PN_SUBMISSION_REF ) >>= sTemp;
- sEntry = SvxResId( RID_STR_DATANAV_SUBM_REF );
- sEntry += sTemp;
+ sEntry = SvxResId( RID_STR_DATANAV_SUBM_REF ) + sTemp;
m_pItemList->InsertEntry( sEntry, aImage, aImage, pEntry );
// Bind
_rEntry->getPropertyValue( PN_SUBMISSION_BIND ) >>= sTemp;
- sEntry = SvxResId( RID_STR_DATANAV_SUBM_BIND );
- sEntry += sTemp;
+ sEntry = SvxResId( RID_STR_DATANAV_SUBM_BIND ) + sTemp;
m_pItemList->InsertEntry( sEntry, aImage, aImage, pEntry );
// Replace
_rEntry->getPropertyValue( PN_SUBMISSION_REPLACE ) >>= sTemp;
@@ -846,8 +842,7 @@ namespace svxform
{
OUString sName;
_rEntry->getPropertyValue( PN_BINDING_ID ) >>= sTemp;
- sName += sTemp;
- sName += ": ";
+ sName += sTemp + ": ";
_rEntry->getPropertyValue( PN_BINDING_EXPR ) >>= sTemp;
sName += sTemp;
pEntry = m_pItemList->InsertEntry(
@@ -885,19 +880,16 @@ namespace svxform
m_pItemList->SetEntryText( pEntry, sTemp );
_rEntry->getPropertyValue( PN_SUBMISSION_BIND ) >>= sTemp;
- OUString sEntry = SvxResId( RID_STR_DATANAV_SUBM_BIND );
- sEntry += sTemp;
+ OUString sEntry = SvxResId( RID_STR_DATANAV_SUBM_BIND ) + sTemp;
sal_uIntPtr nPos = 0;
SvTreeListEntry* pChild = m_pItemList->GetEntry( pEntry, nPos++ );
m_pItemList->SetEntryText( pChild, sEntry );
_rEntry->getPropertyValue( PN_SUBMISSION_REF ) >>= sTemp;
- sEntry = SvxResId( RID_STR_DATANAV_SUBM_REF );
- sEntry += sTemp;
+ sEntry = SvxResId( RID_STR_DATANAV_SUBM_REF ) + sTemp;
pChild = m_pItemList->GetEntry( pEntry, nPos++ );
m_pItemList->SetEntryText( pChild, sEntry );
_rEntry->getPropertyValue( PN_SUBMISSION_ACTION ) >>= sTemp;
- sEntry = SvxResId( RID_STR_DATANAV_SUBM_ACTION );
- sEntry += sTemp;
+ sEntry = SvxResId( RID_STR_DATANAV_SUBM_ACTION ) + sTemp;
pChild = m_pItemList->GetEntry( pEntry, nPos++ );
m_pItemList->SetEntryText( pChild, sEntry );
_rEntry->getPropertyValue( PN_SUBMISSION_METHOD ) >>= sTemp;
@@ -1158,8 +1150,7 @@ namespace svxform
OUString sEntry;
OUString sTemp;
xPropSet->getPropertyValue( PN_BINDING_ID ) >>= sTemp;
- sEntry += sTemp;
- sEntry += ": ";
+ sEntry += sTemp + ": ";
xPropSet->getPropertyValue( PN_BINDING_EXPR ) >>= sTemp;
sEntry += sTemp;
@@ -2006,9 +1997,7 @@ namespace svxform
if ( sInstName.isEmpty() )
{
SAL_WARN( "svx.form", "DataNavigatorWindow::CreateInstancePage(): instance without name" );
- OUString sTemp("untitled");
- sTemp += OUString::number( nPageId );
- sInstName = sTemp;
+ sInstName = "untitled" + OUString::number( nPageId );
}
m_pTabCtrl->InsertPage( nPageId, sInstName, m_pTabCtrl->GetPageCount() - 2 );
}
@@ -3094,8 +3083,7 @@ namespace svxform
OUString sEntry;
OUString sTemp;
xPropSet->getPropertyValue( PN_BINDING_ID ) >>= sTemp;
- sEntry += sTemp;
- sEntry += ": ";
+ sEntry += sTemp + ": ";
xPropSet->getPropertyValue( PN_BINDING_EXPR ) >>= sTemp;
sEntry += sTemp;
m_xBindLB->append_text(sEntry);
diff --git a/svx/source/form/fmPropBrw.cxx b/svx/source/form/fmPropBrw.cxx
index 1674c5806824..3dec43d293f9 100644
--- a/svx/source/form/fmPropBrw.cxx
+++ b/svx/source/form/fmPropBrw.cxx
@@ -418,8 +418,8 @@ void FmPropBrw::implSetNewSelection( const InterfaceBag& _rSelection )
else if ( _rSelection.size() > 1 )
{
// no form component and (no form or no name) -> Multiselection
- sTitle = SvxResId(RID_STR_PROPERTIES_CONTROL);
- sTitle += SvxResId(RID_STR_PROPTITLE_MULTISELECT);
+ sTitle = SvxResId(RID_STR_PROPERTIES_CONTROL) +
+ SvxResId(RID_STR_PROPTITLE_MULTISELECT);
}
else
{
diff --git a/svx/source/form/fmobj.cxx b/svx/source/form/fmobj.cxx
index 62ca4bc61775..fc7c9aac731d 100644
--- a/svx/source/form/fmobj.cxx
+++ b/svx/source/form/fmobj.cxx
@@ -418,8 +418,7 @@ namespace
OUString sCurrentIndex = OUString::number(nPos);
if (!sReturn.isEmpty())
{
- sCurrentIndex += "\\";
- sCurrentIndex += sReturn;
+ sCurrentIndex += "\\" + sReturn;
}
sReturn = sCurrentIndex;
diff --git a/svx/source/sidebar/line/LineWidthPopup.cxx b/svx/source/sidebar/line/LineWidthPopup.cxx
index 813160616611..8df03806ad1e 100644
--- a/svx/source/sidebar/line/LineWidthPopup.cxx
+++ b/svx/source/sidebar/line/LineWidthPopup.cxx
@@ -188,8 +188,8 @@ void LineWidthPopup::SetWidthSelect(long lValue, bool bValuable, MapUnit eMapUni
m_xVSWidth->SetImage(m_aIMGCus);
m_xVSWidth->SetCusEnable(true);
- OUString aStrTip( OUString::number( static_cast<double>(m_nCustomWidth) / 10));
- aStrTip += m_sPt;
+ OUString aStrTip = OUString::number( static_cast<double>(m_nCustomWidth) / 10) +
+ m_sPt;
m_xVSWidth->SetItemText(9, aStrTip);
}
else
diff --git a/svx/source/svdraw/svdibrow.cxx b/svx/source/svdraw/svdibrow.cxx
index 431b36f4efc7..91cbd07ff29f 100644
--- a/svx/source/svdraw/svdibrow.cxx
+++ b/svx/source/svdraw/svdibrow.cxx
@@ -497,8 +497,7 @@ bool SdrItemBrowserControl::BeginChangeEntry(std::size_t nPos)
pEditControl->SetSelection(Selection(SELECTION_MIN,SELECTION_MAX));
vcl::Window* pParent=GetParent();
aWNameMemorized=pParent->GetText();
- OUString aNewName(aWNameMemorized);
- aNewName += " ";
+ OUString aNewName = aWNameMemorized + " ";
aNewName += pEntry->GetItemTypeStr();
if (pEntry->bCanNum) {
aNewName += ": ";
diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx
index 93c80ff56325..7fd3a450bd2c 100644
--- a/svx/source/svdraw/svdotext.cxx
+++ b/svx/source/svdraw/svdotext.cxx
@@ -965,9 +965,7 @@ OUString SdrTextObj::TakeObjNameSingul() const
if(!aStr2.isEmpty() && aStr2.indexOf(u'\x00FF') == -1)
{
// space between ResStr and content text
- aStr += " ";
-
- aStr += "\'";
+ aStr += " \'";
if(aStr2.getLength() > 10)
{
@@ -975,8 +973,7 @@ OUString SdrTextObj::TakeObjNameSingul() const
aStr2 += "...";
}
- aStr += aStr2;
- aStr += "\'";
+ aStr += aStr2 + "\'";
}
}
diff --git a/svx/source/tbxctrls/fontworkgallery.cxx b/svx/source/tbxctrls/fontworkgallery.cxx
index 37e1eb8c8461..1b2483f11e4e 100644
--- a/svx/source/tbxctrls/fontworkgallery.cxx
+++ b/svx/source/tbxctrls/fontworkgallery.cxx
@@ -160,9 +160,7 @@ void FontWorkGalleryDialog::fillFavorites(sal_uInt16 nThemeId)
for( size_t nFavorite = 1; nFavorite <= nFavCount; nFavorite++ )
{
- OUString aStr(SvxResId(RID_SVXFLOAT3D_FAVORITE));
- aStr += " ";
- aStr += OUString::number(nFavorite);
+ OUString aStr = SvxResId(RID_SVXFLOAT3D_FAVORITE) + " " + OUString::number(nFavorite);
Image aThumbImage( maFavoritesHorizontal[nFavorite-1] );
maCtlFavorites.InsertItem( static_cast<sal_uInt16>(nFavorite), aThumbImage, aStr );
}
diff --git a/svx/source/tbxctrls/layctrl.cxx b/svx/source/tbxctrls/layctrl.cxx
index 38646d3dcd91..4cb6101d6f9b 100644
--- a/svx/source/tbxctrls/layctrl.cxx
+++ b/svx/source/tbxctrls/layctrl.cxx
@@ -293,14 +293,10 @@ void TableWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectang
if (!nCol || !nLine)
return;
- OUString aText;
- aText += OUString::number( nCol );
- aText += " x ";
- aText += OUString::number( nLine );
+ OUString aText = OUString::number( nCol ) + " x " + OUString::number( nLine );
if(GetId() == FN_SHOW_MULTIPLE_PAGES)
{
- aText += " ";
- aText += SvxResId(RID_SVXSTR_PAGES);
+ aText += " " + SvxResId(RID_SVXSTR_PAGES);
}
Size aTextSize(rRenderContext.GetTextWidth(aText), rRenderContext.GetTextHeight());
diff --git a/svx/source/xml/xmleohlp.cxx b/svx/source/xml/xmleohlp.cxx
index 59fcdaa4db6d..96827d4e418c 100644
--- a/svx/source/xml/xmleohlp.cxx
+++ b/svx/source/xml/xmleohlp.cxx
@@ -449,8 +449,7 @@ OUString SvXMLEmbeddedObjectHelper::ImplInsertEmbeddedObjectURL(
}
ImplReadObject( aContainerStorageName, aObjectStorageName, pClassId, pOut ? pOut->GetStream() : nullptr );
- sRetURL = XML_EMBEDDEDOBJECT_URL_BASE;
- sRetURL += aObjectStorageName;
+ sRetURL = XML_EMBEDDEDOBJECT_URL_BASE + aObjectStorageName;
if( pOut )
{
@@ -463,8 +462,7 @@ OUString SvXMLEmbeddedObjectHelper::ImplInsertEmbeddedObjectURL(
sRetURL = "./";
if( !aContainerStorageName.isEmpty() )
{
- sRetURL += aContainerStorageName;
- sRetURL += "/";
+ sRetURL += aContainerStorageName + "/";
}
sRetURL += aObjectStorageName;
}
diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx
index 82f48337df01..14f9313c625d 100644
--- a/svx/source/xml/xmlgrhlp.cxx
+++ b/svx/source/xml/xmlgrhlp.cxx
@@ -844,8 +844,7 @@ OUString SvXMLGraphicHelper::implSaveGraphic(css::uno::Reference<css::graphic::X
if (xStorage.is())
xStorage->commit();
- OUString aStoragePath("Pictures/");
- aStoragePath += rPictureStreamName;
+ OUString aStoragePath = "Pictures/" + rPictureStreamName;
// put into cache
maExportGraphics[aGraphic] = std::make_pair(aStoragePath, rOutSavedMimeType);
@@ -923,8 +922,7 @@ OUString SAL_CALL SvXMLGraphicHelper::resolveOutputStream( const Reference< XOut
if( !aId.isEmpty() )
{
- aRet = XML_GRAPHICOBJECT_URL_BASE;
- aRet += aId;
+ aRet = XML_GRAPHICOBJECT_URL_BASE + aId;
}
}
}
More information about the Libreoffice-commits
mailing list