diff options
-rw-r--r-- | sc/source/core/tool/chgtrack.cxx | 16 | ||||
-rw-r--r-- | sc/source/core/tool/compiler.cxx | 10 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlexprt.cxx | 8 | ||||
-rw-r--r-- | sc/source/ui/view/viewfun5.cxx | 39 |
4 files changed, 22 insertions, 51 deletions
diff --git a/sc/source/core/tool/chgtrack.cxx b/sc/source/core/tool/chgtrack.cxx index d5f1c6c92d18..64951951ff62 100644 --- a/sc/source/core/tool/chgtrack.cxx +++ b/sc/source/core/tool/chgtrack.cxx @@ -445,8 +445,7 @@ void ScChangeAction::GetDescription( if (GetType() == SC_CAT_MOVE) { aBuf.append( - ScGlobal::GetRscString(STR_CHANGED_MOVE_REJECTION_WARNING)); - aBuf.append(sal_Unicode(' ')); + ScGlobal::GetRscString(STR_CHANGED_MOVE_REJECTION_WARNING) + " "); rStr = aBuf.makeStringAndClear(); return; } @@ -454,8 +453,7 @@ void ScChangeAction::GetDescription( if (IsInsertType()) { aBuf.append( - ScGlobal::GetRscString(STR_CHANGED_DELETE_REJECTION_WARNING)); - aBuf.append(sal_Unicode(' ')); + ScGlobal::GetRscString(STR_CHANGED_DELETE_REJECTION_WARNING) + " "); rStr = aBuf.makeStringAndClear(); return; } @@ -1269,12 +1267,10 @@ void ScChangeActionMove::GetRefString( if ( !bFlag3D ) bFlag3D = ( GetFromRange().aStart.Tab() != GetBigRange().aStart.Tab() ); - OUStringBuffer aBuf; - aBuf.append(ScChangeAction::GetRefString(GetFromRange(), pDoc, bFlag3D)); - aBuf.append(sal_Unicode(',')); - aBuf.append(sal_Unicode(' ')); - aBuf.append(ScChangeAction::GetRefString(GetBigRange(), pDoc, bFlag3D)); - rStr = aBuf.makeStringAndClear(); // overwrite existing string value. + // overwrite existing string value. + rStr = ScChangeAction::GetRefString(GetFromRange(), pDoc, bFlag3D) + + ", " + + ScChangeAction::GetRefString(GetBigRange(), pDoc, bFlag3D); } diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index 5e58cc6aa1e9..a510f4b6a047 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -644,10 +644,7 @@ static OUString lcl_makeExternalNameStr(const OUString& rFile, const OUString& r OUStringBuffer aBuf(aFile.getLength() + aName.getLength() + 9); if (bODF) aBuf.append( sal_Unicode( '[')); - aBuf.append( sal_Unicode( '\'')); - aBuf.append( aFile); - aBuf.append( sal_Unicode( '\'')); - aBuf.append( cSep); + aBuf.append( "'" + aFile + "'" + OUString(cSep)); if (bODF) aBuf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "$$'")); aBuf.append( aName); @@ -892,10 +889,7 @@ struct ConventionOOO_A1 : public Convention_A1 aFile = INetURLObject::decode(*p, INET_HEX_ESCAPE, INetURLObject::DECODE_UNAMBIGUOUS); } - rBuffer.append(sal_Unicode('\'')); - rBuffer.append(aFile.replaceAll("'", "''")); - rBuffer.append(sal_Unicode('\'')); - rBuffer.append(sal_Unicode('#')); + rBuffer.append("'" + aFile.replaceAll("'", "''") + "'#"); if (!rRef.IsTabRel()) rBuffer.append(sal_Unicode('$')); diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx index 887323837dbc..45e2677ab92d 100644 --- a/sc/source/filter/xml/xmlexprt.cxx +++ b/sc/source/filter/xml/xmlexprt.cxx @@ -4526,13 +4526,7 @@ void ScXMLExport::WriteExternalRefCaches() if (!pTable.get() || !pTable->isReferenced()) continue; - OUStringBuffer aBuf; - aBuf.append(sal_Unicode('\'')); - aBuf.append(*pUrl); - aBuf.append(sal_Unicode('\'')); - aBuf.append(sal_Unicode('#')); - aBuf.append(*itr); - AddAttribute(XML_NAMESPACE_TABLE, XML_NAME, aBuf.makeStringAndClear()); + AddAttribute(XML_NAMESPACE_TABLE, XML_NAME, "'" + *pUrl + "'" + "#" + *itr); AddAttribute(XML_NAMESPACE_TABLE, XML_PRINT, GetXMLToken(XML_FALSE)); AddAttribute(XML_NAMESPACE_TABLE, XML_STYLE_NAME, sExternalRefTabStyleName); SvXMLElementExport aElemTable(*this, XML_NAMESPACE_TABLE, XML_TABLE, true, true); diff --git a/sc/source/ui/view/viewfun5.cxx b/sc/source/ui/view/viewfun5.cxx index b8c1d0172f75..9d99869e76c5 100644 --- a/sc/source/ui/view/viewfun5.cxx +++ b/sc/source/ui/view/viewfun5.cxx @@ -696,14 +696,10 @@ bool ScViewFunc::PasteLink( const uno::Reference<datatransfer::XTransferable>& r // Paste this as an external reference. Note that paste link always // uses Calc A1 syntax even when another formula syntax is specified // in the UI. - OUStringBuffer aBuf; - aBuf.appendAscii("='"); - OUString aPath = ScGlobal::GetAbsDocName( - *pTopic, GetViewData()->GetDocument()->GetDocumentShell()); - aBuf.append(aPath); - aBuf.appendAscii("'#"); - aBuf.append(*pItem); - EnterMatrix(aBuf.makeStringAndClear(), ::formula::FormulaGrammar::GRAM_NATIVE); + EnterMatrix("='" + + OUString(ScGlobal::GetAbsDocName(*pTopic, GetViewData()->GetDocument()->GetDocumentShell())) + + "'#" + *pItem + , ::formula::FormulaGrammar::GRAM_NATIVE); return true; } else @@ -711,24 +707,15 @@ bool ScViewFunc::PasteLink( const uno::Reference<datatransfer::XTransferable>& r // DDE in all other cases. // TODO: we could define ocQuote for " - OUStringBuffer aBuf; - aBuf.append(sal_Unicode('=')); - aBuf.append(ScCompiler::GetNativeSymbol(ocDde)); - aBuf.append(ScCompiler::GetNativeSymbol(ocOpen)); - aBuf.append(sal_Unicode('"')); - aBuf.append(*pApp); - aBuf.append(sal_Unicode('"')); - aBuf.append(ScCompiler::GetNativeSymbol(ocSep)); - aBuf.append(sal_Unicode('"')); - aBuf.append(*pTopic); - aBuf.append(sal_Unicode('"')); - aBuf.append(ScCompiler::GetNativeSymbol(ocSep)); - aBuf.append(sal_Unicode('"')); - aBuf.append(*pItem); - aBuf.append(sal_Unicode('"')); - aBuf.append(ScCompiler::GetNativeSymbol(ocClose)); - - EnterMatrix(aBuf.makeStringAndClear(), ::formula::FormulaGrammar::GRAM_NATIVE); + EnterMatrix("=" + OUString(ScCompiler::GetNativeSymbol(ocDde)) + + ScCompiler::GetNativeSymbol(ocOpen) + + "\"" + *pApp + "\"" + + ScCompiler::GetNativeSymbol(ocSep) + + "\"" + *pTopic + "\"" + + ScCompiler::GetNativeSymbol(ocSep) + + "\"" + *pItem + "\"" + + ScCompiler::GetNativeSymbol(ocClose) + , ::formula::FormulaGrammar::GRAM_NATIVE); } // mark range |