loplugin:stringadd in helpcompiler..oox
Change-Id: I858870d883de10a673d7ce2798bda8c8f511cee5 Reviewed-on: https://gerrit.libreoffice.org/79889 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
@@ -737,8 +737,7 @@ void HelpLinker::main( std::vector<std::string> &args,
|
||||
{
|
||||
//This part is used when compileExtensionHelp is called from the extensions manager.
|
||||
//If extension help is compiled using helplinker in the build process
|
||||
OUString aIdxCaptionPathFileURL( *pOfficeHelpPath );
|
||||
aIdxCaptionPathFileURL += "/idxcaption.xsl";
|
||||
OUString aIdxCaptionPathFileURL = *pOfficeHelpPath + "/idxcaption.xsl";
|
||||
|
||||
OString aOStr_IdxCaptionPathFileURL( OUStringToOString
|
||||
( aIdxCaptionPathFileURL, fs::getThreadTextEncoding() ) );
|
||||
@@ -762,8 +761,7 @@ void HelpLinker::main( std::vector<std::string> &args,
|
||||
//If extension help is compiled using helplinker in the build process
|
||||
//then -idxcontent must be supplied
|
||||
//This part is used when compileExtensionHelp is called from the extensions manager.
|
||||
OUString aIdxContentPathFileURL( *pOfficeHelpPath );
|
||||
aIdxContentPathFileURL += "/idxcontent.xsl";
|
||||
OUString aIdxContentPathFileURL = *pOfficeHelpPath + "/idxcontent.xsl";
|
||||
|
||||
OString aOStr_IdxContentPathFileURL( OUStringToOString
|
||||
( aIdxContentPathFileURL, fs::getThreadTextEncoding() ) );
|
||||
|
||||
@@ -2656,11 +2656,11 @@ void HwpReader::makeFStyle(FBoxStyle * fstyle)
|
||||
else if( fstyle->boxtype == 'G' )
|
||||
{
|
||||
if( fstyle->margin[1][0] || fstyle->margin[1][1] || fstyle->margin[1][2] || fstyle->margin[1][3] ){
|
||||
OUString clip = "rect(";
|
||||
clip += Double2Str(WTMM(-fstyle->margin[1][0]) ) + "mm ";
|
||||
clip += Double2Str(WTMM(-fstyle->margin[1][1]) ) + "mm ";
|
||||
clip += Double2Str(WTMM(-fstyle->margin[1][2]) ) + "mm ";
|
||||
clip += Double2Str(WTMM(-fstyle->margin[1][3]) ) + "mm)";
|
||||
OUString clip = "rect(" +
|
||||
Double2Str(WTMM(-fstyle->margin[1][0]) ) + "mm " +
|
||||
Double2Str(WTMM(-fstyle->margin[1][1]) ) + "mm " +
|
||||
Double2Str(WTMM(-fstyle->margin[1][2]) ) + "mm " +
|
||||
Double2Str(WTMM(-fstyle->margin[1][3]) ) + "mm)";
|
||||
padd("style:mirror", sXML_CDATA, "none");
|
||||
padd("fo:clip", sXML_CDATA, clip);
|
||||
}
|
||||
|
||||
@@ -204,8 +204,7 @@ void LiblangtagDataRef::setupDataPath()
|
||||
|
||||
// Check if data is in our own installation, else assume system
|
||||
// installation.
|
||||
OUString aData( aURL);
|
||||
aData += "/language-subtag-registry.xml";
|
||||
OUString aData = aURL + "/language-subtag-registry.xml";
|
||||
osl::DirectoryItem aDirItem;
|
||||
if (osl::DirectoryItem::get( aData, aDirItem) == osl::DirectoryItem::E_None)
|
||||
{
|
||||
|
||||
+28
-30
@@ -371,33 +371,33 @@ bool Options::initOptions(std::vector< std::string > & rArgs)
|
||||
|
||||
OString Options::prepareHelp() const
|
||||
{
|
||||
OString help("\nusing: ");
|
||||
help += m_program + " [-options] <file_1> ... <file_n> | @<filename> | -stdin\n";
|
||||
help += " <file_n> = file_n specifies one or more idl files.\n";
|
||||
help += " Only files with the extension '.idl' are valid.\n";
|
||||
help += " @<filename> = filename specifies the name of a command file.\n";
|
||||
help += " -stdin = read idl file from standard input.\n";
|
||||
help += " Options:\n";
|
||||
help += " -O<path> = path specifies the output directory.\n";
|
||||
help += " The generated output is a registry file with\n";
|
||||
help += " the same name as the idl input file (or 'stdin'\n";
|
||||
help += " for -stdin).\n";
|
||||
help += " -M<path> = path specifies the output directory for deps.\n";
|
||||
help += " Generate GNU make dependency files with the\n";
|
||||
help += " same name as the idl input file.\n";
|
||||
help += " -I<path> = path specifies a directory where include\n";
|
||||
help += " files will be searched by the preprocessor.\n";
|
||||
help += " Multiple directories can be combined with ';'.\n";
|
||||
help += " -D<name> = name defines a macro for the preprocessor.\n";
|
||||
help += " -C = generate complete type information, including\n";
|
||||
help += " documentation.\n";
|
||||
help += " -cid = check if identifiers fulfill the UNO naming\n";
|
||||
help += " requirements.\n";
|
||||
help += " -quiet = no output.\n";
|
||||
help += " -verbose = verbose output.\n";
|
||||
help += " -w = display warning messages.\n";
|
||||
help += " -we = treat warnings as errors.\n";
|
||||
help += " -h|-? = print this help message and exit.\n\n";
|
||||
OString help = "\nusing: " +
|
||||
m_program + " [-options] <file_1> ... <file_n> | @<filename> | -stdin\n"
|
||||
" <file_n> = file_n specifies one or more idl files.\n"
|
||||
" Only files with the extension '.idl' are valid.\n"
|
||||
" @<filename> = filename specifies the name of a command file.\n"
|
||||
" -stdin = read idl file from standard input.\n"
|
||||
" Options:\n"
|
||||
" -O<path> = path specifies the output directory.\n"
|
||||
" The generated output is a registry file with\n"
|
||||
" the same name as the idl input file (or 'stdin'\n"
|
||||
" for -stdin).\n"
|
||||
" -M<path> = path specifies the output directory for deps.\n"
|
||||
" Generate GNU make dependency files with the\n"
|
||||
" same name as the idl input file.\n"
|
||||
" -I<path> = path specifies a directory where include\n"
|
||||
" files will be searched by the preprocessor.\n"
|
||||
" Multiple directories can be combined with ';'.\n"
|
||||
" -D<name> = name defines a macro for the preprocessor.\n"
|
||||
" -C = generate complete type information, including\n"
|
||||
" documentation.\n"
|
||||
" -cid = check if identifiers fulfill the UNO naming\n"
|
||||
" requirements.\n"
|
||||
" -quiet = no output.\n"
|
||||
" -verbose = verbose output.\n"
|
||||
" -w = display warning messages.\n"
|
||||
" -we = treat warnings as errors.\n"
|
||||
" -h|-? = print this help message and exit.\n\n";
|
||||
help += prepareVersion();
|
||||
|
||||
return help;
|
||||
@@ -405,9 +405,7 @@ OString Options::prepareHelp() const
|
||||
|
||||
OString Options::prepareVersion() const
|
||||
{
|
||||
OString version(m_program);
|
||||
version += " Version 1.1\n\n";
|
||||
return version;
|
||||
return m_program + " Version 1.1\n\n";
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -92,11 +92,7 @@ namespace io_acceptor
|
||||
: m_pFlag( pFlag )
|
||||
{
|
||||
if( *m_pFlag )
|
||||
{
|
||||
OUString sMessage( "AlreadyAcceptingException :" );
|
||||
sMessage += sConnectionDescription;
|
||||
throw AlreadyAcceptingException( sMessage );
|
||||
}
|
||||
throw AlreadyAcceptingException( "AlreadyAcceptingException :" + sConnectionDescription );
|
||||
*m_pFlag = true;
|
||||
}
|
||||
~BeingInAccept()
|
||||
@@ -186,12 +182,7 @@ namespace io_acceptor
|
||||
_xAcceptor.set(_xSMgr->createInstanceWithContext(delegatee, _xCtx), UNO_QUERY);
|
||||
|
||||
if(!_xAcceptor.is())
|
||||
{
|
||||
OUString message("Acceptor: unknown delegatee ");
|
||||
message += delegatee;
|
||||
|
||||
throw ConnectionSetupException(message);
|
||||
}
|
||||
throw ConnectionSetupException("Acceptor: unknown delegatee " + delegatee);
|
||||
}
|
||||
}
|
||||
catch (const rtl::MalformedUriException & rEx)
|
||||
|
||||
@@ -114,8 +114,7 @@ namespace stoc_connector
|
||||
{
|
||||
OUString sMessage("Connector : couldn't connect to socket (");
|
||||
OUString sError = pConn->m_socket.getErrorAsString();
|
||||
sMessage += sError;
|
||||
sMessage += ")";
|
||||
sMessage += sError + ")";
|
||||
throw NoConnectException( sMessage );
|
||||
}
|
||||
// we enable tcpNoDelay for loopback connections because
|
||||
@@ -137,12 +136,7 @@ namespace stoc_connector
|
||||
_xSMgr->createInstanceWithContext(delegatee, _xCtx), UNO_QUERY );
|
||||
|
||||
if(!xConnector.is())
|
||||
{
|
||||
OUString message("Connector: unknown delegatee ");
|
||||
message += delegatee;
|
||||
|
||||
throw ConnectionSetupException(message);
|
||||
}
|
||||
throw ConnectionSetupException("Connector: unknown delegatee " + delegatee);
|
||||
|
||||
sal_Int32 index = sConnectionDescription.indexOf(',');
|
||||
|
||||
|
||||
@@ -461,8 +461,7 @@ OString makeClassPathOption(OUString const & sUserClassPath)
|
||||
sPaths = OUStringToOString(
|
||||
sBufCP.makeStringAndClear(), osl_getThreadTextEncoding());
|
||||
|
||||
OString sOptionClassPath("-Djava.class.path=");
|
||||
sOptionClassPath += sPaths;
|
||||
OString sOptionClassPath = "-Djava.class.path=" + sPaths;
|
||||
return sOptionClassPath;
|
||||
}
|
||||
|
||||
|
||||
@@ -121,12 +121,9 @@ OString UnQuotHTML( const OString& rString )
|
||||
bool isWellFormedXML( OString const & text )
|
||||
{
|
||||
xmlDocPtr doc;
|
||||
OString content;
|
||||
bool result = true;
|
||||
|
||||
content = "<root>";
|
||||
content += text;
|
||||
content += "</root>";
|
||||
OString content = "<root>" + text + "</root>";
|
||||
doc = xmlParseMemory(content.getStr(),static_cast<int>(content.getLength()));
|
||||
if (doc == nullptr) {
|
||||
result = false;
|
||||
|
||||
@@ -322,12 +322,7 @@ OString MergeDataFile::CreateKey(const OString& rTYP, const OString& rGID,
|
||||
const OString& rLID, const OString& rFilename, bool bCaseSensitive)
|
||||
{
|
||||
static const char sStroke[] = "-";
|
||||
OString sKey( rTYP );
|
||||
sKey += sStroke;
|
||||
sKey += rGID;
|
||||
sKey += sStroke;
|
||||
sKey += rLID;
|
||||
sKey += sStroke;
|
||||
OString sKey = rTYP + sStroke + rGID + sStroke + rLID + sStroke;
|
||||
sKey += lcl_NormalizeFilename(rFilename);
|
||||
if(bCaseSensitive)
|
||||
return sKey; // officecfg case sensitive identifier
|
||||
|
||||
@@ -191,8 +191,7 @@ void LangGuess_Impl::SetFingerPrintsDB(
|
||||
{
|
||||
//! text encoding for file name / path needs to be in the same encoding the OS uses
|
||||
OString path = OUStringToOString( filePath, osl_getThreadTextEncoding() );
|
||||
OString conf_file_path(path);
|
||||
conf_file_path += DEFAULT_CONF_FILE_NAME;
|
||||
OString conf_file_path = path + DEFAULT_CONF_FILE_NAME;
|
||||
|
||||
m_aGuesser.SetDBPath(conf_file_path.getStr(), path.getStr());
|
||||
}
|
||||
|
||||
@@ -542,9 +542,7 @@ uno::Reference< XHyphenatedWord > RebuildHyphensAndControlChars(
|
||||
aLeft = rOrigWord.copy( 0, nPos );
|
||||
aRight = rOrigWord.copy( nPos ); // FIXME: changes at the right side
|
||||
|
||||
aOrigHyphenatedWord = aLeft;
|
||||
aOrigHyphenatedWord += aRplc;
|
||||
aOrigHyphenatedWord += aRight;
|
||||
aOrigHyphenatedWord = aLeft + aRplc + aRight;
|
||||
|
||||
nOrigHyphenPos = sal::static_int_cast< sal_Int16 >(aLeft.getLength() +
|
||||
rxHyphWord->getHyphenPos() - nChgPos);
|
||||
|
||||
@@ -101,8 +101,7 @@ void LwpFormulaInfo::ReadText()
|
||||
std::vector<char> aBuf(nStrLen + 1);
|
||||
m_pObjStrm->QuickRead(aBuf.data(), nStrLen);
|
||||
aBuf[nStrLen]= '\0';
|
||||
OUString aText;
|
||||
aText += "\"";
|
||||
OUString aText = "\"";
|
||||
aText += OUString(aBuf.data(), nStrLen, osl_getThreadTextEncoding());
|
||||
aText += "\"";
|
||||
|
||||
|
||||
@@ -209,20 +209,17 @@ void XFFont::ToXml(IXFStream *pStrm)
|
||||
//font size:
|
||||
if( (m_nFlag & XFFONT_FLAG_SIZE) && m_nFontSize != 0 )
|
||||
{
|
||||
OUString strSize = OUString::number(m_nFontSize);
|
||||
strSize += "pt";
|
||||
OUString strSize = OUString::number(m_nFontSize) + "pt";
|
||||
pAttrList->AddAttribute("fo:font-size",strSize);
|
||||
}
|
||||
if( (m_nFlag & XFFONT_FLAG_SIZE_ASIA) && m_nFontSizeAsia )
|
||||
{
|
||||
OUString strSize = OUString::number(m_nFontSizeAsia);
|
||||
strSize += "pt";
|
||||
OUString strSize = OUString::number(m_nFontSizeAsia) + "pt";
|
||||
pAttrList->AddAttribute("style:font-size-asian",strSize);
|
||||
}
|
||||
if( (m_nFlag & XFFONT_FLAG_SIZE_COMPLEX) && m_nFontSizeComplex )
|
||||
{
|
||||
OUString strSize = OUString::number(m_nFontSizeComplex);
|
||||
strSize += "pt";
|
||||
OUString strSize = OUString::number(m_nFontSizeComplex) + "pt";
|
||||
pAttrList->AddAttribute("style:font-size-complex",strSize);
|
||||
}
|
||||
|
||||
|
||||
@@ -190,8 +190,7 @@ OUString VbaModule::readSourceCode( StorageBase& rVbaStrg ) const
|
||||
{
|
||||
// cntrl modifier is explicit ( but could be cntrl+shift ), parseKeyEvent
|
||||
// will handle and uppercase letter appropriately
|
||||
OUString sApiKey = "^";
|
||||
sApiKey += sKey;
|
||||
OUString sApiKey = "^" + sKey;
|
||||
try
|
||||
{
|
||||
KeyEvent aKeyEvent = ooo::vba::parseKeyEvent( sApiKey );
|
||||
|
||||
@@ -155,8 +155,7 @@ bool PowerPointImport::importDocument()
|
||||
SfxErrorContext aContext(ERRCTX_SFX_OPENDOC, aURL.getName(INetURLObject::LAST_SEGMENT, true, INetURLObject::DecodeMechanism::WithCharset), nullptr, RID_ERRCTX);
|
||||
OUString aWarning;
|
||||
aContext.GetString(ERRCODE_NONE.MakeWarning(), aWarning);
|
||||
aWarning += ":\n";
|
||||
aWarning += SvxResId(RID_SVXSTR_WARN_MISSING_SMARTART);
|
||||
aWarning += ":\n" + SvxResId(RID_SVXSTR_WARN_MISSING_SMARTART);
|
||||
|
||||
// Show it.
|
||||
std::unique_ptr<weld::MessageDialog> xWarn(Application::CreateMessageDialog(nullptr,
|
||||
|
||||
Reference in New Issue
Block a user