From b1fab4ab325636eacf7c0387d55b6cc184f89c5f Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Thu, 18 Dec 2014 13:35:13 +0100 Subject: sw: Use appropriate OUString functions on string constants Change-Id: I9c3e03324c69beb5af4c43da208086600876f875 --- sw/inc/PostItMgr.hxx | 2 +- sw/qa/extras/globalfilter/globalfilter.cxx | 12 ++--- sw/qa/extras/ooxmlexport/ooxmlexport3.cxx | 2 +- sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx | 8 ++-- sw/qa/extras/uiwriter/uiwriter.cxx | 2 +- sw/source/core/access/acccell.cxx | 4 +- sw/source/core/access/accdoc.cxx | 4 +- sw/source/core/access/accembedded.cxx | 2 +- sw/source/core/access/accfootnote.cxx | 6 +-- sw/source/core/access/accgraphic.cxx | 2 +- sw/source/core/access/accheaderfooter.cxx | 2 +- sw/source/core/access/accpage.cxx | 4 +- sw/source/core/access/accpara.cxx | 10 ++--- sw/source/core/access/accpreview.cxx | 2 +- sw/source/core/access/acctable.cxx | 2 +- sw/source/core/access/acctextframe.cxx | 2 +- sw/source/core/bastyp/calc.cxx | 2 +- sw/source/core/bastyp/init.cxx | 2 +- sw/source/core/doc/doc.cxx | 2 +- sw/source/core/doc/docglbl.cxx | 2 +- sw/source/core/edit/edlingu.cxx | 2 +- sw/source/core/fields/cellfml.cxx | 2 +- sw/source/core/ole/ndole.cxx | 2 +- sw/source/core/swg/SwXMLTextBlocks1.cxx | 2 +- sw/source/core/table/swtable.cxx | 2 +- sw/source/core/text/EnhancedPDFExportHelper.cxx | 60 ++++++++++++------------- sw/source/core/tox/ToxTextGenerator.cxx | 2 +- sw/source/core/unocore/unoframe.cxx | 10 ++--- sw/source/filter/html/css1atr.cxx | 10 ++--- sw/source/filter/html/htmlatr.cxx | 2 +- sw/source/filter/html/htmlbas.cxx | 10 ++--- sw/source/filter/html/htmlcss1.cxx | 6 +-- sw/source/filter/html/htmlctxt.cxx | 2 +- sw/source/filter/html/htmldrawreader.cxx | 4 +- sw/source/filter/html/htmlfld.cxx | 2 +- sw/source/filter/html/htmlform.cxx | 2 +- sw/source/filter/html/htmlgrin.cxx | 6 +-- sw/source/filter/html/htmlnumreader.cxx | 2 +- sw/source/filter/html/htmlnumwriter.cxx | 2 +- sw/source/filter/html/htmlsect.cxx | 6 +-- sw/source/filter/html/parcss1.cxx | 4 +- sw/source/filter/html/svxcss1.cxx | 4 +- sw/source/filter/html/swhtml.cxx | 12 ++--- sw/source/filter/html/wrthtml.cxx | 4 +- sw/source/filter/ww8/docxattributeoutput.cxx | 18 ++++---- sw/source/filter/ww8/docxsdrexport.cxx | 2 +- sw/source/filter/ww8/rtfexport.cxx | 2 +- sw/source/filter/ww8/wrtw8nds.cxx | 2 +- sw/source/filter/ww8/ww8atr.cxx | 6 +-- sw/source/filter/ww8/ww8par2.cxx | 8 ++-- sw/source/ui/dbui/mmlayoutpage.cxx | 2 +- sw/source/ui/dbui/mmoutputpage.cxx | 3 +- sw/source/ui/fldui/fldpage.cxx | 2 +- sw/source/ui/fldui/fldref.cxx | 14 +++--- sw/source/ui/fmtui/tmpdlg.cxx | 4 +- sw/source/ui/frmdlg/frmdlg.cxx | 2 +- sw/source/ui/index/cnttab.cxx | 4 +- sw/source/ui/misc/srtdlg.cxx | 6 +-- sw/source/ui/vba/vbalisthelper.cxx | 6 +-- sw/source/uibase/app/appenv.cxx | 2 +- sw/source/uibase/app/docstyle.cxx | 12 ++--- sw/source/uibase/dbui/dbmgr.cxx | 7 ++- sw/source/uibase/dbui/mailmergehelper.cxx | 6 +-- sw/source/uibase/dochdl/swdtflvr.cxx | 2 +- sw/source/uibase/docvw/edtwin.cxx | 4 +- sw/source/uibase/envelp/labelcfg.cxx | 2 +- sw/source/uibase/fldui/fldmgr.cxx | 6 +-- sw/source/uibase/inc/view.hxx | 2 +- sw/source/uibase/ribbar/workctrl.cxx | 2 +- sw/source/uibase/shells/grfsh.cxx | 4 +- sw/source/uibase/uiview/formatclipboard.cxx | 4 +- sw/source/uibase/uiview/view.cxx | 2 +- sw/source/uibase/uiview/view1.cxx | 2 +- sw/source/uibase/uiview/viewdraw.cxx | 10 ++--- sw/source/uibase/uno/SwXFilterOptions.cxx | 2 +- sw/source/uibase/uno/unomailmerge.cxx | 2 +- sw/source/uibase/uno/unotxdoc.cxx | 12 ++--- 77 files changed, 198 insertions(+), 200 deletions(-) (limited to 'sw') diff --git a/sw/inc/PostItMgr.hxx b/sw/inc/PostItMgr.hxx index 1334ee43291d..948445e84048 100644 --- a/sw/inc/PostItMgr.hxx +++ b/sw/inc/PostItMgr.hxx @@ -123,7 +123,7 @@ class SwNoteProps: public utl::ConfigItem { aNames.realloc(1); OUString* pNames = aNames.getArray(); - pNames[0] = OUString("ShowAnkor"); + pNames[0] = "ShowAnkor"; } return aNames; } diff --git a/sw/qa/extras/globalfilter/globalfilter.cxx b/sw/qa/extras/globalfilter/globalfilter.cxx index 49c01f9b879e..a88292ab514c 100644 --- a/sw/qa/extras/globalfilter/globalfilter.cxx +++ b/sw/qa/extras/globalfilter/globalfilter.cxx @@ -86,7 +86,7 @@ void Test::testSwappedOutImageExport() { OUString sURL; XPropSet->getPropertyValue("GraphicURL") >>= sURL; - CPPUNIT_ASSERT_MESSAGE(sFailedMessage.getStr(), sURL != OUString("vnd.sun.star.GraphicObject:00000000000000000000000000000000")); + CPPUNIT_ASSERT_MESSAGE(sFailedMessage.getStr(), sURL != "vnd.sun.star.GraphicObject:00000000000000000000000000000000"); } // Check size { @@ -106,7 +106,7 @@ void Test::testSwappedOutImageExport() OUString sURL; XPropSet->getPropertyValue("GraphicURL") >>= sURL; CPPUNIT_ASSERT_MESSAGE( - sFailedMessage.getStr(), sURL != OUString("vnd.sun.star.GraphicObject:00000000000000000000000000000000")); + sFailedMessage.getStr(), sURL != "vnd.sun.star.GraphicObject:00000000000000000000000000000000"); } // Check size { @@ -231,7 +231,7 @@ void Test::testImageWithSpecialID() { OUString sURL; XPropSet->getPropertyValue("GraphicURL") >>= sURL; - CPPUNIT_ASSERT(sURL != OUString("vnd.sun.star.GraphicObject:00000000000000000000000000000000")); + CPPUNIT_ASSERT(sURL != "vnd.sun.star.GraphicObject:00000000000000000000000000000000"); } // Check size { @@ -249,7 +249,7 @@ void Test::testImageWithSpecialID() { OUString sURL; XPropSet->getPropertyValue("GraphicURL") >>= sURL; - CPPUNIT_ASSERT(sURL != OUString("vnd.sun.star.GraphicObject:00000000000000000000000000000000")); + CPPUNIT_ASSERT(sURL != "vnd.sun.star.GraphicObject:00000000000000000000000000000000"); } // Check size { @@ -313,7 +313,7 @@ void Test::testGraphicShape() { OUString sURL; XPropSet->getPropertyValue("GraphicURL") >>= sURL; - CPPUNIT_ASSERT_MESSAGE(sFailedMessage.getStr(), sURL != OUString("vnd.sun.star.GraphicObject:00000000000000000000000000000000")); + CPPUNIT_ASSERT_MESSAGE(sFailedMessage.getStr(), sURL != "vnd.sun.star.GraphicObject:00000000000000000000000000000000"); } // Check size { @@ -326,7 +326,7 @@ void Test::testGraphicShape() } // MS filters make this kind of linked images broken !? - if( OUString::createFromAscii(aFilterNames[nFilter]) != OUString("writer8") ) + if( OUString::createFromAscii(aFilterNames[nFilter]) != "writer8" ) return; // Second image is a linked one diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx index b411a4c6e331..c2361415072e 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx @@ -535,7 +535,7 @@ DECLARE_OOXMLEXPORT_TEST(testFontNameIsEmpty, "font-name-is-empty.docx") for(sal_Int32 index = 0; index < length; index++){ xmlNodePtr pXmlNode = pXmlNodes->nodeTab[index]; OUString attrVal = OUString::createFromAscii((const char*)xmlGetProp(pXmlNode, BAD_CAST("name"))); - if (attrVal == ""){ + if (attrVal.isEmpty()){ CPPUNIT_FAIL("Font name is empty."); } } diff --git a/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx index 3d7124111123..73831a90db73 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx @@ -551,22 +551,22 @@ DECLARE_OOXMLEXPORT_TEST(testFdo70838, "fdo70838.docx") OUString aStyleCommandName = aStyleCommand.getToken( 0, ':' ); OUString aStyleCommandValue = aStyleCommand.getToken( 1, ':' ); - if( aStyleCommandName.equals( "margin-left" ) ) + if( aStyleCommandName == "margin-left" ) { float fValue = aStyleCommandValue.getToken( 0, 'p' ).toFloat(); CPPUNIT_ASSERT_DOUBLES_EQUAL(97.6, fValue, 0.1); } - else if( aStyleCommandName.equals( "margin-top" ) ) + else if( aStyleCommandName == "margin-top" ) { float fValue = aStyleCommandValue.getToken( 0, 'p' ).toFloat(); CPPUNIT_ASSERT_DOUBLES_EQUAL(165.0, fValue, 0.2); } - else if( aStyleCommandName.equals( "width" ) ) + else if( aStyleCommandName == "width" ) { float fValue = aStyleCommandValue.getToken( 0, 'p' ).toFloat(); CPPUNIT_ASSERT_DOUBLES_EQUAL(283.4, fValue, 0.1); } - else if( aStyleCommandName.equals( "height" ) ) + else if( aStyleCommandName == "height" ) { float fValue = aStyleCommandValue.getToken( 0, 'p' ).toFloat(); CPPUNIT_ASSERT_DOUBLES_EQUAL(141.7, fValue, 0.1); diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx index 5de79d3257b8..c840b44c8ec0 100644 --- a/sw/qa/extras/uiwriter/uiwriter.cxx +++ b/sw/qa/extras/uiwriter/uiwriter.cxx @@ -650,7 +650,7 @@ void SwUiWriterTest::testMergeDoc() SwDoc* const pDoc1(createDoc("merge-change1.odt")); auto xDoc2Component(loadFromDesktop( - getURLFromSrc(DATA_DIRECTORY) + OUString("merge-change2.odt"), + getURLFromSrc(DATA_DIRECTORY) + "merge-change2.odt", "com.sun.star.text.TextDocument")); auto pxDoc2Document( dynamic_cast(xDoc2Component.get())); diff --git a/sw/source/core/access/acccell.cxx b/sw/source/core/access/acccell.cxx index 158037b1d8db..854b42de6cbc 100644 --- a/sw/source/core/access/acccell.cxx +++ b/sw/source/core/access/acccell.cxx @@ -258,8 +258,8 @@ uno::Sequence< OUString > SAL_CALL SwAccessibleCell::getSupportedServiceNames() { uno::Sequence< OUString > aRet(2); OUString* pArray = aRet.getArray(); - pArray[0] = OUString(sServiceName ); - pArray[1] = OUString(sAccessibleServiceName ); + pArray[0] = sServiceName; + pArray[1] = sAccessibleServiceName; return aRet; } diff --git a/sw/source/core/access/accdoc.cxx b/sw/source/core/access/accdoc.cxx index 2d82015f4916..a54ed2d423ff 100644 --- a/sw/source/core/access/accdoc.cxx +++ b/sw/source/core/access/accdoc.cxx @@ -448,8 +448,8 @@ uno::Sequence< OUString > SAL_CALL SwAccessibleDocument::getSupportedServiceName { uno::Sequence< OUString > aRet(2); OUString* pArray = aRet.getArray(); - pArray[0] = OUString( sServiceName ); - pArray[1] = OUString( sAccessibleServiceName ); + pArray[0] = sServiceName; + pArray[1] = sAccessibleServiceName; return aRet; } diff --git a/sw/source/core/access/accembedded.cxx b/sw/source/core/access/accembedded.cxx index 896175e310ff..cb0d021ccb89 100644 --- a/sw/source/core/access/accembedded.cxx +++ b/sw/source/core/access/accembedded.cxx @@ -90,7 +90,7 @@ uno::Sequence< OUString > SAL_CALL SwAccessibleEmbeddedObject::getSupportedServi uno::Sequence< OUString > aRet(2); OUString* pArray = aRet.getArray(); pArray[0] = "com.sun.star.text.AccessibleTextEmbeddedObject"; - pArray[1] = OUString( sAccessibleServiceName ); + pArray[1] = sAccessibleServiceName; return aRet; } diff --git a/sw/source/core/access/accfootnote.cxx b/sw/source/core/access/accfootnote.cxx index 63f0c2744be8..ddf7428b155a 100644 --- a/sw/source/core/access/accfootnote.cxx +++ b/sw/source/core/access/accfootnote.cxx @@ -115,10 +115,10 @@ Sequence< OUString > SAL_CALL SwAccessibleFootnote::getSupportedServiceNames() Sequence< OUString > aRet(2); OUString* pArray = aRet.getArray(); if( AccessibleRole::END_NOTE == GetRole() ) - pArray[0] = OUString( sServiceNameEndnote ); + pArray[0] = sServiceNameEndnote; else - pArray[0] = OUString( sServiceNameFootnote ); - pArray[1] = OUString( sAccessibleServiceName ); + pArray[0] = sServiceNameFootnote; + pArray[1] = sAccessibleServiceName; return aRet; } diff --git a/sw/source/core/access/accgraphic.cxx b/sw/source/core/access/accgraphic.cxx index b4f2902b49d2..04111a934deb 100644 --- a/sw/source/core/access/accgraphic.cxx +++ b/sw/source/core/access/accgraphic.cxx @@ -60,7 +60,7 @@ Sequence< OUString > SAL_CALL SwAccessibleGraphic::getSupportedServiceNames() Sequence< OUString > aRet(2); OUString* pArray = aRet.getArray(); pArray[0] = "com.sun.star.text.AccessibleTextGraphicObject"; - pArray[1] = OUString( sAccessibleServiceName ); + pArray[1] = sAccessibleServiceName; return aRet; } diff --git a/sw/source/core/access/accheaderfooter.cxx b/sw/source/core/access/accheaderfooter.cxx index b5a8a894914f..07d117db3e09 100644 --- a/sw/source/core/access/accheaderfooter.cxx +++ b/sw/source/core/access/accheaderfooter.cxx @@ -102,7 +102,7 @@ Sequence< OUString > SAL_CALL SwAccessibleHeaderFooter::getSupportedServiceNames pArray[0] = "com.sun.star.text.AccessibleHeaderView"; else pArray[0] = "com.sun.star.text.AccessibleFooterView"; - pArray[1] = OUString( sAccessibleServiceName ); + pArray[1] = sAccessibleServiceName; return aRet; } diff --git a/sw/source/core/access/accpage.cxx b/sw/source/core/access/accpage.cxx index 3fc1420b58fe..11a8bddf55ee 100644 --- a/sw/source/core/access/accpage.cxx +++ b/sw/source/core/access/accpage.cxx @@ -153,8 +153,8 @@ Sequence SwAccessiblePage::getSupportedServiceNames( ) { Sequence< OUString > aRet(2); OUString* pArray = aRet.getArray(); - pArray[0] = OUString( sServiceName ); - pArray[1] = OUString( sAccessibleServiceName ); + pArray[0] = sServiceName; + pArray[1] = sAccessibleServiceName; return aRet; } diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx index 34b485e9bb4f..00c3a94073c2 100644 --- a/sw/source/core/access/accpara.cxx +++ b/sw/source/core/access/accpara.cxx @@ -1118,8 +1118,8 @@ uno::Sequence< OUString > SAL_CALL SwAccessibleParagraph::getSupportedServiceNam { uno::Sequence< OUString > aRet(2); OUString* pArray = aRet.getArray(); - pArray[0] = OUString( sServiceName ); - pArray[1] = OUString( sAccessibleServiceName ); + pArray[0] = sServiceName; + pArray[1] = sAccessibleServiceName; return aRet; } @@ -1692,7 +1692,7 @@ uno::Sequence SwAccessibleParagraph::getCharacterAttributes( const SwTxtNode* pTxtNode( GetTxtNode() ); PropertyValue& rValue = pValues[aValues.getLength() - 1 ]; - rValue.Name = OUString("NumberingPrefix"); + rValue.Name = "NumberingPrefix"; OUString sNumBullet = pTxtNode->GetNumString(); rValue.Value <<= sNumBullet; rValue.Handle = -1; @@ -1704,7 +1704,7 @@ uno::Sequence SwAccessibleParagraph::getCharacterAttributes( aValues.realloc( aValues.getLength() + 1 ); pValues = aValues.getArray(); PropertyValue& rValueFT = pValues[aValues.getLength() - 1]; - rValueFT.Name = OUString("FieldType"); + rValueFT.Name = "FieldType"; rValueFT.Value <<= strTypeName.toAsciiLowerCase(); rValueFT.Handle = -1; rValueFT.State = PropertyState_DIRECT_VALUE; @@ -3867,7 +3867,7 @@ sal_Int32 SwAccessibleParagraph::GetRealHeadingLevel() if (length == 9 || length == 10) { OUString headStr = sValue.copy(0, 7); - if (headStr.equals("Heading")) + if (headStr == "Heading") { OUString intStr = sValue.copy(8); sal_Int32 headingLevel = intStr.toInt32(10); diff --git a/sw/source/core/access/accpreview.cxx b/sw/source/core/access/accpreview.cxx index 8b0f1b3fa4a7..ff89d78deaa2 100644 --- a/sw/source/core/access/accpreview.cxx +++ b/sw/source/core/access/accpreview.cxx @@ -57,7 +57,7 @@ Sequence SwAccessiblePreview::getSupportedServiceNames( ) { Sequence aSeq( 2 ); aSeq[0] = "com.sun.star.text.AccessibleTextDocumentPageView"; - aSeq[1] = OUString( sAccessibleServiceName ); + aSeq[1] = sAccessibleServiceName; return aSeq; } diff --git a/sw/source/core/access/acctable.cxx b/sw/source/core/access/acctable.cxx index 2c66fb6adb22..629e08d3a554 100644 --- a/sw/source/core/access/acctable.cxx +++ b/sw/source/core/access/acctable.cxx @@ -1376,7 +1376,7 @@ uno::Sequence< OUString > SAL_CALL SwAccessibleTable::getSupportedServiceNames() uno::Sequence< OUString > aRet(2); OUString* pArray = aRet.getArray(); pArray[0] = "com.sun.star.table.AccessibleTableView"; - pArray[1] = OUString( sAccessibleServiceName ); + pArray[1] = sAccessibleServiceName; return aRet; } diff --git a/sw/source/core/access/acctextframe.cxx b/sw/source/core/access/acctextframe.cxx index 2cea245a9ab2..20225f6c8edf 100644 --- a/sw/source/core/access/acctextframe.cxx +++ b/sw/source/core/access/acctextframe.cxx @@ -293,7 +293,7 @@ uno::Sequence< OUString > SAL_CALL SwAccessibleTextFrame::getSupportedServiceNam uno::Sequence< OUString > aRet(2); OUString* pArray = aRet.getArray(); pArray[0] = "com.sun.star.text.AccessibleTextFrameView"; - pArray[1] = OUString( sAccessibleServiceName ); + pArray[1] = sAccessibleServiceName; return aRet; } diff --git a/sw/source/core/bastyp/calc.cxx b/sw/source/core/bastyp/calc.cxx index 8353823d12f1..10c7d453c4cd 100644 --- a/sw/source/core/bastyp/calc.cxx +++ b/sw/source/core/bastyp/calc.cxx @@ -778,7 +778,7 @@ SwCalcOper SwCalc::GetToken() case '[': if( aRes.EndPos < sCommand.getLength() ) { - aVarName = ""; + aVarName.clear(); sal_Int32 nFndPos = aRes.EndPos, nSttPos = nFndPos; diff --git a/sw/source/core/bastyp/init.cxx b/sw/source/core/bastyp/init.cxx index e9d88ebc5993..a8cd5a00197c 100644 --- a/sw/source/core/bastyp/init.cxx +++ b/sw/source/core/bastyp/init.cxx @@ -845,7 +845,7 @@ CharClass& GetAppCharClass() void SwCalendarWrapper::LoadDefaultCalendar( sal_uInt16 eLang ) { - sUniqueId = ""; + sUniqueId.clear(); if( eLang != nLang ) loadDefaultCalendar( LanguageTag::convertToLocale( nLang = eLang )); } diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index b6531be08eed..1ae97f64d8e6 100644 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -1536,7 +1536,7 @@ bool SwDoc::ConvertFieldsToText() // database fields should not convert their command into text if( RES_DBFLD == pCurType->Which() && !static_cast(pField)->IsInitialized()) - sText = ""; + sText.clear(); SwPaM aInsertPam(*pTxtFld->GetpTxtNode(), pTxtFld->GetStart()); aInsertPam.SetMark(); diff --git a/sw/source/core/doc/docglbl.cxx b/sw/source/core/doc/docglbl.cxx index 294f4d22a5f2..aa81d02924e0 100644 --- a/sw/source/core/doc/docglbl.cxx +++ b/sw/source/core/doc/docglbl.cxx @@ -338,7 +338,7 @@ bool SwDoc::SplitDoc( sal_uInt16 eDocType, const OUString& rPath, bool bOutline, // do not insert a FileLinkSection in case of error if( xDocSh->GetError() ) - sFileName = ""; + sFileName.clear(); } xDocSh->DoClose(); } diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx index 97e30f721539..3809289d33af 100644 --- a/sw/source/core/edit/edlingu.cxx +++ b/sw/source/core/edit/edlingu.cxx @@ -864,7 +864,7 @@ uno::Reference< XSpellAlternatives > // implementation here by providing an additional parameter. Sequence< PropertyValue > aPropVals(1); PropertyValue &rVal = aPropVals.getArray()[0]; - rVal.Name = OUString( UPN_MAX_NUMBER_OF_SUGGESTIONS ); + rVal.Name = UPN_MAX_NUMBER_OF_SUGGESTIONS; rVal.Value <<= (sal_Int16) 7; xSpellAlt = xSpell->spell( aWord, eActLang, aPropVals ); diff --git a/sw/source/core/fields/cellfml.cxx b/sw/source/core/fields/cellfml.cxx index ad34b2d179a5..397ab2d97a22 100644 --- a/sw/source/core/fields/cellfml.cxx +++ b/sw/source/core/fields/cellfml.cxx @@ -45,7 +45,7 @@ namespace { const sal_Unicode cRelSeparator = ','; -const sal_Unicode cRelIdentifier = ''; // CTRL-R +const sal_Unicode cRelIdentifier = '\x12'; // CTRL-R enum { diff --git a/sw/source/core/ole/ndole.cxx b/sw/source/core/ole/ndole.cxx index b7020dc68748..786d9f2b2ed5 100644 --- a/sw/source/core/ole/ndole.cxx +++ b/sw/source/core/ole/ndole.cxx @@ -576,7 +576,7 @@ void SwOLENode::BreakFileLink_Impl() uno::Reference< embed::XLinkageSupport > xLinkSupport( aOLEObj.GetOleRef(), uno::UNO_QUERY_THROW ); xLinkSupport->breakLink( xStorage, aOLEObj.GetCurrentPersistName() ); DisconnectFileLink_Impl(); - maLinkURL = ""; + maLinkURL.clear(); } catch( uno::Exception& ) { diff --git a/sw/source/core/swg/SwXMLTextBlocks1.cxx b/sw/source/core/swg/SwXMLTextBlocks1.cxx index 0f0ce4a13740..3eca795659b5 100644 --- a/sw/source/core/swg/SwXMLTextBlocks1.cxx +++ b/sw/source/core/swg/SwXMLTextBlocks1.cxx @@ -279,7 +279,7 @@ sal_uLong SwXMLTextBlocks::GetBlockText( const OUString& rShort, OUString& rText bool bTextOnly = true; OUString aFolderName = GeneratePackageName ( rShort ); OUString aStreamName = aFolderName + ".xml"; - rText = ""; + rText.clear(); try { diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx index c73b3c2faf4b..e4d2fc44222d 100644 --- a/sw/source/core/table/swtable.cxx +++ b/sw/source/core/table/swtable.cxx @@ -2342,7 +2342,7 @@ void SwTableBoxFmt::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) if( !bChgTxt ) { - sNewTxt = ""; + sNewTxt.clear(); } } diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx index 6b3b79be69c1..78bfda42d2a8 100644 --- a/sw/source/core/text/EnhancedPDFExportHelper.cxx +++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx @@ -992,7 +992,7 @@ void SwTaggedPDFHelper::BeginBlockStructureElements() // Document: Document nPDFType = vcl::PDFWriter::Document; - aPDFType = OUString(aDocumentString); + aPDFType = aDocumentString; break; case FRM_HEADER : @@ -1008,7 +1008,7 @@ void SwTaggedPDFHelper::BeginBlockStructureElements() // Footnote container: Division nPDFType = vcl::PDFWriter::Division; - aPDFType = OUString(aDivString); + aPDFType = aDivString; break; case FRM_FTN : @@ -1018,7 +1018,7 @@ void SwTaggedPDFHelper::BeginBlockStructureElements() // Note: vcl::PDFWriter::Note is actually a ILSE. Nevertheless // we treat it like a grouping element! nPDFType = vcl::PDFWriter::Note; - aPDFType = OUString(aNoteString); + aPDFType = aNoteString; break; case FRM_SECTION : @@ -1036,19 +1036,19 @@ void SwTaggedPDFHelper::BeginBlockStructureElements() if ( TOX_INDEX == pTOXBase->GetType() ) { nPDFType = vcl::PDFWriter::Index; - aPDFType = OUString(aIndexString); + aPDFType = aIndexString; } else { nPDFType = vcl::PDFWriter::TOC; - aPDFType = OUString(aTOCString); + aPDFType = aTOCString; } } } else if ( CONTENT_SECTION == pSection->GetType() ) { nPDFType = vcl::PDFWriter::Section; - aPDFType = OUString(aSectString); + aPDFType = aSectString; } } break; @@ -1084,7 +1084,7 @@ void SwTaggedPDFHelper::BeginBlockStructureElements() if (sStyleName == aQuotations) { nPDFType = vcl::PDFWriter::BlockQuote; - aPDFType = OUString(aBlockQuoteString); + aPDFType = aBlockQuoteString; } // Caption: Caption @@ -1092,7 +1092,7 @@ void SwTaggedPDFHelper::BeginBlockStructureElements() else if (sStyleName == aCaption) { nPDFType = vcl::PDFWriter::Caption; - aPDFType = OUString(aCaptionString); + aPDFType = aCaptionString; } // Caption: Caption @@ -1108,7 +1108,7 @@ void SwTaggedPDFHelper::BeginBlockStructureElements() else if (sStyleName == aHeading) { nPDFType = vcl::PDFWriter::Heading; - aPDFType = OUString(aHString); + aPDFType = aHString; } // Heading: H1 - H6 @@ -1122,22 +1122,22 @@ void SwTaggedPDFHelper::BeginBlockStructureElements() switch(nRealLevel) { case 0 : - aPDFType = OUString(aH1String); + aPDFType = aH1String; break; case 1 : - aPDFType = OUString(aH2String); + aPDFType = aH2String; break; case 2 : - aPDFType = OUString(aH3String); + aPDFType = aH3String; break; case 3 : - aPDFType = OUString(aH4String); + aPDFType = aH4String; break; case 4 : - aPDFType = OUString(aH5String); + aPDFType = aH5String; break; default: - aPDFType = OUString(aH6String); + aPDFType = aH6String; break; } } @@ -1168,7 +1168,7 @@ void SwTaggedPDFHelper::BeginBlockStructureElements() // TabFrm: Table nPDFType = vcl::PDFWriter::Table; - aPDFType = OUString(aTableString); + aPDFType = aTableString; { // set up table column data: @@ -1222,7 +1222,7 @@ void SwTaggedPDFHelper::BeginBlockStructureElements() if ( !static_cast(pFrm)->IsRepeatedHeadline() ) { nPDFType = vcl::PDFWriter::TableRow; - aPDFType = OUString(aTRString); + aPDFType = aTRString; } else { @@ -1239,12 +1239,12 @@ void SwTaggedPDFHelper::BeginBlockStructureElements() if ( pTable->IsInHeadline( *pFrm ) || lcl_IsHeadlineCell( *static_cast(pFrm) ) ) { nPDFType = vcl::PDFWriter::TableHeader; - aPDFType = OUString(aTHString); + aPDFType = aTHString; } else { nPDFType = vcl::PDFWriter::TableData; - aPDFType = OUString(aTDString); + aPDFType = aTDString; } } break; @@ -1276,18 +1276,18 @@ void SwTaggedPDFHelper::BeginBlockStructureElements() if ( bFormula ) { nPDFType = vcl::PDFWriter::Formula; - aPDFType = OUString(aFormulaString); + aPDFType = aFormulaString; } else { nPDFType = vcl::PDFWriter::Figure; - aPDFType = OUString(aFigureString); + aPDFType = aFigureString; } } else { nPDFType = vcl::PDFWriter::Division; - aPDFType = OUString(aDivString); + aPDFType = aDivString; } } break; @@ -1332,7 +1332,7 @@ void SwTaggedPDFHelper::BeginInlineStructureElements() case POR_HYPHSTR : case POR_SOFTHYPHSTR : nPDFType = vcl::PDFWriter::Span; - aPDFType = OUString(aSpanString); + aPDFType = aSpanString; break; case POR_LAY : @@ -1359,18 +1359,18 @@ void SwTaggedPDFHelper::BeginInlineStructureElements() if( pInetFmtAttr ) { nPDFType = vcl::PDFWriter::Link; - aPDFType = OUString(aLinkString); + aPDFType = aLinkString; } // Check for Quote/Code character style: else if (sStyleName == aQuotation) { nPDFType = vcl::PDFWriter::Quote; - aPDFType = OUString(aQuoteString); + aPDFType = aQuoteString; } else if (sStyleName == aSourceText) { nPDFType = vcl::PDFWriter::Code; - aPDFType = OUString(aCodeString); + aPDFType = aCodeString; } else { @@ -1391,7 +1391,7 @@ void SwTaggedPDFHelper::BeginInlineStructureElements() if (!sStyleName.isEmpty()) aPDFType = sStyleName; else - aPDFType = OUString(aSpanString); + aPDFType = aSpanString; } } } @@ -1399,7 +1399,7 @@ void SwTaggedPDFHelper::BeginInlineStructureElements() case POR_FTN : nPDFType = vcl::PDFWriter::Link; - aPDFType = OUString(aLinkString); + aPDFType = aLinkString; break; case POR_FLD : @@ -1416,12 +1416,12 @@ void SwTaggedPDFHelper::BeginInlineStructureElements() if ( RES_GETREFFLD == pFld->Which() ) { nPDFType = vcl::PDFWriter::Link; - aPDFType = OUString(aLinkString); + aPDFType = aLinkString; } else if ( RES_AUTHORITY == pFld->Which() ) { nPDFType = vcl::PDFWriter::BibEntry; - aPDFType = OUString(aBibEntryString); + aPDFType = aBibEntryString; } } } diff --git a/sw/source/core/tox/ToxTextGenerator.cxx b/sw/source/core/tox/ToxTextGenerator.cxx index 7b43312870db..f7ef3f979960 100644 --- a/sw/source/core/tox/ToxTextGenerator.cxx +++ b/sw/source/core/tox/ToxTextGenerator.cxx @@ -160,7 +160,7 @@ ToxTextGenerator::GenerateText(SwDoc* pDoc, const std::vector SwTxtNode* pTOXNd = (SwTxtNode*)entries.at(indexOfEntryToProcess)->pTOXNd; // FIXME this operates directly on the node text OUString & rTxt = const_cast(pTOXNd->GetTxt()); - rTxt = ""; + rTxt.clear(); for(sal_uInt16 nIndex = indexOfEntryToProcess; nIndex < indexOfEntryToProcess + numberOfEntriesToProcess; nIndex++) { if(nIndex > indexOfEntryToProcess) diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx index 3a484d612b2f..db74773686d2 100644 --- a/sw/source/core/unocore/unoframe.cxx +++ b/sw/source/core/unocore/unoframe.cxx @@ -1558,7 +1558,7 @@ void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno:: { pGrfObj = new GraphicObject; pGrfObj->SetUserData( sTmp ); - sGrfName = ""; + sGrfName.clear(); } else if( sTmp.startsWith(sGraphicObjectProtocol) ) { @@ -1566,7 +1566,7 @@ void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno:: sTmp.copy(sizeof(sGraphicObjectProtocol)-1), RTL_TEXTENCODING_ASCII_US)); pGrfObj = new GraphicObject( sId ); - sGrfName = ""; + sGrfName.clear(); } else { @@ -2375,7 +2375,7 @@ uno::Sequence< beans::PropertyState > SwXFrame::getPropertyStates( { const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap().getByName(pNames[i]); if (!pEntry) - throw beans::UnknownPropertyException(OUString( "Unknown property: " ) + pNames[i], static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::UnknownPropertyException("Unknown property: " + pNames[i], static_cast < cppu::OWeakObject * > ( this ) ); if(pEntry->nWID == FN_UNO_ANCHOR_TYPES|| pEntry->nWID == FN_PARAM_LINK_DISPLAY_NAME|| @@ -2804,7 +2804,7 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan { pGrfObj = new GraphicObject; pGrfObj->SetUserData( sGraphicURL ); - sGraphicURL = ""; + sGraphicURL.clear(); } else if( sGraphicURL.startsWith(sGraphicObjectProtocol) ) { @@ -2812,7 +2812,7 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan sGraphicURL.copy( sizeof(sGraphicObjectProtocol)-1 ), RTL_TEXTENCODING_ASCII_US)); pGrfObj = new GraphicObject( sId ); - sGraphicURL = ""; + sGraphicURL.clear(); } } Graphic aGraphic; diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx index 72ab5c30b190..ed6a4314e5c5 100644 --- a/sw/source/filter/html/css1atr.cxx +++ b/sw/source/filter/html/css1atr.cxx @@ -661,10 +661,10 @@ sal_uInt16 SwHTMLWriter::GetCSS1Selector( const SwFmt *pFmt, OString& rToken, { sal_uInt16 nDeep = 0; rToken.clear(); - rClass = ""; + rClass.clear(); rRefPoolId = 0; if( pPseudo ) - *pPseudo = ""; + pPseudo->clear(); bool bChrFmt = RES_CHRFMT==pFmt->Which(); @@ -983,7 +983,7 @@ static sal_uInt16 GetCSS1Selector( const SwFmt *pFmt, OUString& rSelector, if( !aToken.isEmpty() ) rSelector = OStringToOUString(aToken, RTL_TEXTENCODING_ASCII_US); else - rSelector = ""; + rSelector.clear(); if( !aClass.isEmpty() ) rSelector += "." + aClass; @@ -1786,7 +1786,7 @@ static Writer& OutCSS1_SwFtnInfo( Writer& rWrt, const SwEndNoteInfo& rInfo, if( nNotes > 0 ) { - aSelector = OUString(OOO_STRING_SVTOOLS_HTML_anchor) + "." + + aSelector = OOO_STRING_SVTOOLS_HTML_anchor "." + ( bEndNote ? OUString(OOO_STRING_SVTOOLS_HTML_sdendnote_anc) : OUString(OOO_STRING_SVTOOLS_HTML_sdfootnote_anc) ); SwCSS1OutMode aMode( rHTMLWrt, CSS1_OUTMODE_RULE|CSS1_OUTMODE_TEMPLATE, @@ -1817,7 +1817,7 @@ static Writer& OutCSS1_SwFtnInfo( Writer& rWrt, const SwEndNoteInfo& rInfo, } if( aItemSet.Count() ) { - aSelector = OUString(OOO_STRING_SVTOOLS_HTML_anchor) + "." + + aSelector = OOO_STRING_SVTOOLS_HTML_anchor "." + ( bEndNote ? OUString(OOO_STRING_SVTOOLS_HTML_sdendnote_sym) : OUString(OOO_STRING_SVTOOLS_HTML_sdfootnote_sym)); if( OutCSS1Rule( rHTMLWrt, aSelector, aItemSet, true, false )) diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx index deedddaf1961..5705622ebbce 100644 --- a/sw/source/filter/html/htmlatr.cxx +++ b/sw/source/filter/html/htmlatr.cxx @@ -108,7 +108,7 @@ sal_uInt16 SwHTMLWriter::GetDefListLvl( const OUString& rNm, sal_uInt16 nPoolId // DefinitionList - term return (sal_uInt16)rNm.copy( sDTDD.getLength() ).toInt32() | HTML_DLCOLL_DT; - sDTDD = OUString( OOO_STRING_SVTOOLS_HTML_dd ) + " "; + sDTDD = OOO_STRING_SVTOOLS_HTML_dd " "; if( rNm.startsWith(sDTDD) ) // DefinitionList - definition return (sal_uInt16)rNm.copy( sDTDD.getLength() ).toInt32() | HTML_DLCOLL_DD; diff --git a/sw/source/filter/html/htmlbas.cxx b/sw/source/filter/html/htmlbas.cxx index 36926a2c35a5..33503450d5d0 100644 --- a/sw/source/filter/html/htmlbas.cxx +++ b/sw/source/filter/html/htmlbas.cxx @@ -172,12 +172,12 @@ void SwHTMLParser::EndScript() } } - aScriptSource = ""; - aScriptType = ""; - aScriptURL = ""; + aScriptSource.clear(); + aScriptType.clear(); + aScriptURL.clear(); - aBasicLib = ""; - aBasicModule = ""; + aBasicLib.clear(); + aBasicModule.clear(); } void SwHTMLParser::AddScriptSource() diff --git a/sw/source/filter/html/htmlcss1.cxx b/sw/source/filter/html/htmlcss1.cxx index 04a9d7122781..d4368d298f4f 100644 --- a/sw/source/filter/html/htmlcss1.cxx +++ b/sw/source/filter/html/htmlcss1.cxx @@ -613,7 +613,7 @@ sal_uInt16 SwCSS1Parser::GetScriptFromClass( OUString& rClass, } else { - rClass = ""; + rClass.clear(); } } @@ -625,7 +625,7 @@ static CSS1SelectorType GetTokenAndClass( const CSS1Selector *pSelector, sal_uInt16& rScriptFlags ) { rToken = pSelector->GetString(); - rClass = ""; + rClass.clear(); rScriptFlags = CSS1_SCRIPT_ALL; CSS1SelectorType eType = pSelector->GetType(); @@ -1700,7 +1700,7 @@ void SwHTMLParser::EndStyle() if( !aStyleSource.isEmpty() ) { pCSS1Parser->ParseStyleSheet( aStyleSource ); - aStyleSource = ""; + aStyleSource.clear(); } } diff --git a/sw/source/filter/html/htmlctxt.cxx b/sw/source/filter/html/htmlctxt.cxx index 794ade0d2b8e..5e8ecf30f939 100644 --- a/sw/source/filter/html/htmlctxt.cxx +++ b/sw/source/filter/html/htmlctxt.cxx @@ -447,7 +447,7 @@ bool SwHTMLParser::DoPositioning( SfxItemSet &rItemSet, InsertFlyFrame( aFrmItemSet, pContext, rPropInfo.aId, CONTEXT_FLAGS_ABSPOS ); pContext->SetPopStack( true ); - rPropInfo.aId = ""; + rPropInfo.aId.clear(); bRet = true; } diff --git a/sw/source/filter/html/htmldrawreader.cxx b/sw/source/filter/html/htmldrawreader.cxx index e15605e80c2b..6c9a11decbfa 100644 --- a/sw/source/filter/html/htmldrawreader.cxx +++ b/sw/source/filter/html/htmldrawreader.cxx @@ -252,7 +252,7 @@ void SwHTMLParser::NewMarquee( HTMLTable *pCurTable ) { OSL_ENSURE( !pMarquee, "Marquee in Marquee???" ); - aContents = ""; + aContents.clear(); OUString aId, aStyle, aClass; @@ -562,7 +562,7 @@ void SwHTMLParser::EndMarquee() static_cast(pMarquee)->FitFrameToTextSize(); } - aContents = ""; + aContents.clear(); pMarquee = 0; } diff --git a/sw/source/filter/html/htmlfld.cxx b/sw/source/filter/html/htmlfld.cxx index 1a120ccb454f..0ded359451b4 100644 --- a/sw/source/filter/html/htmlfld.cxx +++ b/sw/source/filter/html/htmlfld.cxx @@ -573,7 +573,7 @@ void SwHTMLParser::EndField() } bInField = false; - aContents = ""; + aContents.clear(); } void SwHTMLParser::InsertFieldText() diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx index 770f25d29006..4e201f963142 100644 --- a/sw/source/filter/html/htmlform.cxx +++ b/sw/source/filter/html/htmlform.cxx @@ -825,7 +825,7 @@ static void lcl_html_setEvents( rDesc.EventMethod = sMethod; rDesc.ScriptType = rType; rDesc.ScriptCode = sCode; - rDesc.AddListenerParam = ""; + rDesc.AddListenerParam.clear(); if(!rUnoMacroParamTbl.empty()) { diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx index b8552c20b86c..808e0eaaafd7 100644 --- a/sw/source/filter/html/htmlgrin.cxx +++ b/sw/source/filter/html/htmlgrin.cxx @@ -700,14 +700,14 @@ IMAGE_SETEVENT: if (pStream) { if (GRFILTER_OK == GraphicFilter::GetGraphicFilter().ImportGraphic(aGraphic, "", *pStream)) - sGrfNm = ""; + sGrfNm.clear(); } } // sBaseURL is empty if the source is clipboard else if (sBaseURL.isEmpty()) { if (GRFILTER_OK == GraphicFilter::GetGraphicFilter().ImportGraphic(aGraphic, aGraphicURL)) - sGrfNm = ""; + sGrfNm.clear(); } if (!sGrfNm.isEmpty()) { @@ -1155,7 +1155,7 @@ ANCHOR_SETEVENT: sCmp == "outline" || sCmp == "text" ) { - aName = ""; + aName.clear(); } } } diff --git a/sw/source/filter/html/htmlnumreader.cxx b/sw/source/filter/html/htmlnumreader.cxx index 8d774d4cc8f0..bcd3150d351e 100644 --- a/sw/source/filter/html/htmlnumreader.cxx +++ b/sw/source/filter/html/htmlnumreader.cxx @@ -247,7 +247,7 @@ void SwHTMLParser::NewNumBulList( int nToken ) bChangeNumFmt = true; } else - aBulletGrfs[nLevel] = ""; + aBulletGrfs[nLevel].clear(); // den aktuellen Absatz erst einmal nicht numerieren { diff --git a/sw/source/filter/html/htmlnumwriter.cxx b/sw/source/filter/html/htmlnumwriter.cxx index de244644fe68..94c57e303e4f 100644 --- a/sw/source/filter/html/htmlnumwriter.cxx +++ b/sw/source/filter/html/htmlnumwriter.cxx @@ -179,7 +179,7 @@ Writer& OutHTML_NumBulListStart( SwHTMLWriter& rWrt, { rWrt.OutNewLine(); //
    /
      in eine neue Zeile - rWrt.aBulletGrfs[i] = ""; + rWrt.aBulletGrfs[i].clear(); OStringBuffer sOut; sOut.append('<'); const SwNumFmt& rNumFmt = rInfo.GetNumRule()->Get( i ); diff --git a/sw/source/filter/html/htmlsect.cxx b/sw/source/filter/html/htmlsect.cxx index 09f555c859e5..404d13b93cde 100644 --- a/sw/source/filter/html/htmlsect.cxx +++ b/sw/source/filter/html/htmlsect.cxx @@ -365,7 +365,7 @@ void SwHTMLParser::NewDivision( int nToken ) // keine text::Bookmarks mit dem gleichen Namen wie Bereiche einfuegen if( !aPropInfo.aId.isEmpty() && aPropInfo.aId==aName ) - aPropInfo.aId = ""; + aPropInfo.aId.clear(); } else { @@ -645,7 +645,7 @@ void SwHTMLParser::NewMultiCol( sal_uInt16 columnsFromCss ) if( nCols < 2 ) { aFlyName = aId; - aPropInfo.aId = ""; + aPropInfo.aId.clear(); } InsertFlyFrame( aFrmItemSet, pCntxt, aFlyName, CONTEXT_FLAGS_ABSPOS ); @@ -753,7 +753,7 @@ void SwHTMLParser::NewMultiCol( sal_uInt16 columnsFromCss ) // Insert a bookmark if its name differs from the section's name only. if( !aPropInfo.aId.isEmpty() && aPropInfo.aId==aName ) - aPropInfo.aId = ""; + aPropInfo.aId.clear(); } // Additional attributes must be set as hard ones. diff --git a/sw/source/filter/html/parcss1.cxx b/sw/source/filter/html/parcss1.cxx index 1a96cfd9fe62..b901b5fb2ccd 100644 --- a/sw/source/filter/html/parcss1.cxx +++ b/sw/source/filter/html/parcss1.cxx @@ -105,7 +105,7 @@ sal_Unicode CSS1Parser::GetNextChar() CSS1Token CSS1Parser::GetNextToken() { CSS1Token nRet = CSS1_NULL; - aToken = ""; + aToken.clear(); do { // Merken, ob davor White-Space gelesen wurde @@ -176,7 +176,7 @@ CSS1Token CSS1Parser::GetNextToken() // Blocks ignorieren if( CSS1_NULL==nRet ) { - aToken = ""; + aToken.clear(); sal_uInt16 nBlockLvl = 0; sal_Unicode cQuoteCh = 0; bool bDone = false, bEscape = false; diff --git a/sw/source/filter/html/svxcss1.cxx b/sw/source/filter/html/svxcss1.cxx index 745b87f3270e..8960e3306e61 100644 --- a/sw/source/filter/html/svxcss1.cxx +++ b/sw/source/filter/html/svxcss1.cxx @@ -400,7 +400,7 @@ void SvxCSS1PropertyInfo::DestroyBorderInfos() void SvxCSS1PropertyInfo::Clear() { - aId = ""; + aId.clear(); bTopMargin = bBottomMargin = false; bLeftMargin = bRightMargin = bTextIndent = false; nLeftMargin = nRightMargin = 0; @@ -1554,7 +1554,7 @@ static void ParseCSS1_background( const CSS1Expression *pExpr, if( bTransparent ) { bColor = false; - aURL = ""; + aURL.clear(); } // repeat hat prio gegenueber einer Position diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index fe225ba83683..d2c6212dc8ac 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -1004,7 +1004,7 @@ void SwHTMLParser::NextToken( int nToken ) } } bInTitle = false; - sTitle = ""; + sTitle.clear(); break; case HTML_NONBREAKSPACE: @@ -1070,7 +1070,7 @@ void SwHTMLParser::NextToken( int nToken ) case HTML_NOEMBED_OFF: aContents = convertLineEnd(aContents, GetSystemLineEnd()); InsertComment( aContents, OOO_STRING_SVTOOLS_HTML_noembed ); - aContents = ""; + aContents.clear(); bCallNextToken = false; bInNoEmbed = false; break; @@ -1242,12 +1242,12 @@ void SwHTMLParser::NextToken( int nToken ) case HTML_HEAD_OFF: case HTML_BODY_ON: case HTML_IMAGE: // Don't know why Netscape acts this way. - aUnknownToken = ""; + aUnknownToken.clear(); break; case HTML_TEXTTOKEN: return; default: - aUnknownToken = ""; + aUnknownToken.clear(); break; } } @@ -1259,7 +1259,7 @@ void SwHTMLParser::NextToken( int nToken ) if( !aStyleSource.isEmpty() ) { pCSS1Parser->ParseStyleSheet( aStyleSource ); - aStyleSource = ""; + aStyleSource.clear(); } if( IsNewDoc() ) { @@ -1885,7 +1885,7 @@ void SwHTMLParser::NextToken( int nToken ) if( !aStyleSource.isEmpty() ) { pCSS1Parser->ParseStyleSheet( aStyleSource ); - aStyleSource = ""; + aStyleSource.clear(); } break; diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx index 07aa27f6bac7..e32983e96d42 100644 --- a/sw/source/filter/html/wrthtml.cxx +++ b/sw/source/filter/html/wrthtml.cxx @@ -484,9 +484,9 @@ sal_uLong SwHTMLWriter::WriteStream() ClearNextNumInfo(); for( i=0; iGetDocShell() ); diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index a37b1a8d1a4a..b45371b833cf 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -305,7 +305,7 @@ void DocxAttributeOutput::StartParagraph( ww8::WW8TableNodeInfo::Pointer_t pText // This is the common case: "close sdt before the current paragraph" was requrested by the next paragraph. EndSdtBlock(); m_bStartedParaSdt = false; - m_aStartedParagraphSdtPrAlias = ""; + m_aStartedParagraphSdtPrAlias.clear(); } m_bHadSectPr = false; @@ -339,7 +339,7 @@ static void lcl_deleteAndResetTheLists( ::sax_fastparser::FastAttributeList* &pS pSdtPrDataBindingAttrs = NULL; } if (!rSdtPrAlias.isEmpty()) - rSdtPrAlias = ""; + rSdtPrAlias.clear(); } void DocxAttributeOutput::PopulateFrameProperties(const SwFrmFmt* pFrmFmt, const Size& rSize) @@ -698,7 +698,7 @@ void DocxAttributeOutput::WriteSdtBlock( sal_Int32& nSdtPrToken, // do not delete yet; it's in xAttrList inside the parser pSdtPrDataBindingAttrs = NULL; } - rSdtPrAlias = ""; + rSdtPrAlias.clear(); } } @@ -1137,7 +1137,7 @@ void DocxAttributeOutput::EndRun() DoWriteBookmarks( ); DoWriteAnnotationMarks( ); - if( m_closeHyperlinkInThisRun && m_startedHyperlink && m_hyperLinkAnchor != "" && m_hyperLinkAnchor.startsWith("_Toc")) + if( m_closeHyperlinkInThisRun && m_startedHyperlink && !m_hyperLinkAnchor.isEmpty() && m_hyperLinkAnchor.startsWith("_Toc")) { OUString sToken; m_pSerializer->startElementNS( XML_w, XML_r, FSEND ); @@ -1237,7 +1237,7 @@ void DocxAttributeOutput::EndRun() FSEND ); m_pSerializer->endElementNS( XML_w, XML_r ); m_endPageRef = false; - m_hyperLinkAnchor = ""; + m_hyperLinkAnchor.clear(); } for ( int i = 0; i < m_nFieldsInHyperlink; i++ ) { @@ -2273,7 +2273,7 @@ bool DocxAttributeOutput::StartURL( const OUString& rUrl, const OUString& rTarge bool DocxAttributeOutput::EndURL(bool const) { m_closeHyperlinkInThisRun = true; - if(m_startedHyperlink && m_hyperLinkAnchor != "" && m_hyperLinkAnchor.startsWith("_Toc")) + if(m_startedHyperlink && !m_hyperLinkAnchor.isEmpty() && m_hyperLinkAnchor.startsWith("_Toc")) { m_endPageRef = true; } @@ -5749,7 +5749,7 @@ void DocxAttributeOutput::EmbedFontStyle( const OUString& name, int tag, FontFam if( file.open( osl_File_OpenFlag_Read ) != osl::File::E_None ) return; uno::Reference< com::sun::star::io::XOutputStream > xOutStream = m_rExport.GetFilter().openFragmentStream( - OUString( "word/fonts/font" ) + OUString::number(m_nextFontId) + ".odttf", + "word/fonts/font" + OUString::number(m_nextFontId) + ".odttf", "application/vnd.openxmlformats-officedocument.obfuscatedFont" ); // Not much point in trying hard with the obfuscation key, whoever reads the spec can read the font anyway, // so just alter the first and last part of the key. @@ -5800,7 +5800,7 @@ void DocxAttributeOutput::EmbedFontStyle( const OUString& name, int tag, FontFam xOutStream->closeOutput(); OString relId = OUStringToOString( GetExport().GetFilter().addRelation( m_pSerializer->getOutputStream(), "http://schemas.openxmlformats.org/officeDocument/2006/relationships/font", - OUString( "fonts/font" ) + OUString::number( m_nextFontId ) + ".odttf" ), RTL_TEXTENCODING_UTF8 ); + "fonts/font" + OUString::number( m_nextFontId ) + ".odttf" ), RTL_TEXTENCODING_UTF8 ); EmbeddedFontRef ref; ref.relId = relId; ref.fontKey = fontKeyStr; @@ -7563,7 +7563,7 @@ void DocxAttributeOutput::FormatBackground( const SvxBrushItem& rBrush ) m_pBackgroundAttrList->add( FSNS( XML_w, XML_fill ), sColor.getStr() ); m_pBackgroundAttrList->add( FSNS( XML_w, XML_val ), "clear" ); } - m_sOriginalBackgroundColor = ""; + m_sOriginalBackgroundColor.clear(); } } diff --git a/sw/source/filter/ww8/docxsdrexport.cxx b/sw/source/filter/ww8/docxsdrexport.cxx index 9b05166afd80..c796fc575a65 100644 --- a/sw/source/filter/ww8/docxsdrexport.cxx +++ b/sw/source/filter/ww8/docxsdrexport.cxx @@ -1056,7 +1056,7 @@ void DocxSdrExport::writeDiagramRels(uno::Reference xDom, if (sExtension.equalsIgnoreAsciiCase(".WMF")) sContentType = "image/x-wmf"; else - sContentType = OUString("image/") + sExtension.copy(1); + sContentType = "image/" + sExtension.copy(1); sRelId = sRelId.copy(3); StreamDataSequence dataSeq; diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx index 7cdd3da64be4..dd9ec5e85df5 100644 --- a/sw/source/filter/ww8/rtfexport.cxx +++ b/sw/source/filter/ww8/rtfexport.cxx @@ -192,7 +192,7 @@ static bool IsExportNumRule(const SwNumRule& rRule, sal_uInt8* pEnd = 0) for (nLvl = 0; nLvl < nEnd; ++nLvl) if (SVX_NUM_NUMBER_NONE != (pNFmt = &rRule.Get(nLvl)) ->GetNumberingType() || !pNFmt->GetPrefix().isEmpty() || - (!pNFmt->GetSuffix().isEmpty() && !pNFmt->GetSuffix().equals("."))) + (!pNFmt->GetSuffix().isEmpty() && pNFmt->GetSuffix() != ".")) break; if (pEnd) diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index 4bcd6225b31f..7203ef509ac4 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -2113,7 +2113,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode ) 2) Ensure that it is a text node and not in a fly. 3) If the anchor is associated with a text node with empty text then we ignore. */ - if ( rNode.IsTxtNode() && aStr != aStringForImage && aStr != "" && + if ( rNode.IsTxtNode() && aStr != aStringForImage && !aStr.isEmpty() && !rNode.GetFlyFmt() && aAttrIter.IsAnchorLinkedToThisNode(rNode.GetIndex())) bPostponeWritingText = true ; diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index 35f9c9e66658..4b7907f29fd1 100644 --- a/sw/source/filter/ww8/ww8atr.cxx +++ b/sw/source/filter/ww8/ww8atr.cxx @@ -2027,7 +2027,7 @@ sal_uInt16 MSWordExportBase::GetId( const SwTOXType& rTOXType ) static int lcl_CheckForm( const SwForm& rForm, sal_uInt8 nLvl, OUString& rText ) { int nRet = 4; - rText = ""; + rText.clear(); // #i21237# SwFormTokens aPattern = rForm.GetPattern(nLvl); @@ -2175,7 +2175,7 @@ void AttributeOutputBase::StartTOX( const SwSection& rSect ) else if ((4 == nRet) || (2 == nRet)) //#109414# aFillTxt = "\t"; else - aFillTxt = ""; + aFillTxt.clear(); } sStr += "\\e \""; sStr += aFillTxt; @@ -2399,7 +2399,7 @@ void AttributeOutputBase::StartTOX( const SwSection& rSect ) if( bFirstFillTxt ) aFillTxt = aTxt; else if( aFillTxt != aTxt ) - aFillTxt = ""; + aFillTxt.clear(); bFirstFillTxt = false; } } diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx index 4929642615af..0cd4d2cf882e 100644 --- a/sw/source/filter/ww8/ww8par2.cxx +++ b/sw/source/filter/ww8/ww8par2.cxx @@ -928,13 +928,13 @@ void SwWW8ImplReader::StartAnl(const sal_uInt8* pSprm13) { pNumRule = rDoc.FindNumRulePtr(sNumRule); if (!pNumRule) - sNumRule = ""; + sNumRule.clear(); else { // this is ROW numbering ? pS12 = pPlcxMan->HasParaSprm(bVer67 ? 12 : 0xC63E); // sprmAnld if (pS12 && 0 != ((WW8_ANLD*)pS12)->fNumberAcross) - sNumRule = ""; + sNumRule.clear(); } } } @@ -945,7 +945,7 @@ void SwWW8ImplReader::StartAnl(const sal_uInt8* pSprm13) sNumRule = pStyInf->pFmt->GetNumRule().GetValue(); pNumRule = rDoc.FindNumRulePtr(sNumRule); if (!pNumRule) - sNumRule = ""; + sNumRule.clear(); } if (sNumRule.isEmpty()) @@ -4264,7 +4264,7 @@ void WW8RStyle::ImportOldFormatStyles() } if (sName.isEmpty()) - sName = OUString("Unknown Style: ") + OUString::number(stc); + sName = "Unknown Style: " + OUString::number(stc); rSI.SetOrgWWIdent(sName, stc); stcp++; diff --git a/sw/source/ui/dbui/mmlayoutpage.cxx b/sw/source/ui/dbui/mmlayoutpage.cxx index 14c36fd94080..a89ed65b32c5 100644 --- a/sw/source/ui/dbui/mmlayoutpage.cxx +++ b/sw/source/ui/dbui/mmlayoutpage.cxx @@ -385,7 +385,7 @@ SwFrmFmt* SwMailMergeLayoutPage::InsertAddressFrame( SwInsertFld_Data aData(TYP_HIDDENPARAFLD, 0, sHideParagraphsExpression, aEmptyOUStr, 0, &rShell ); aFldMgr.InsertFld( aData ); } - sHideParagraphsExpression = ""; + sHideParagraphsExpression.clear(); //now add a new paragraph rShell.SplitNode(); } diff --git a/sw/source/ui/dbui/mmoutputpage.cxx b/sw/source/ui/dbui/mmoutputpage.cxx index 01a4d1f20d20..b5af54400312 100644 --- a/sw/source/ui/dbui/mmoutputpage.cxx +++ b/sw/source/ui/dbui/mmoutputpage.cxx @@ -1244,8 +1244,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton) OUString::createFromAscii(rtl_getBestMimeCharsetFromTextEncoding( eEncoding )); } else - aDesc.sBodyMimeType = - OUString("text/plain; charset=UTF-8; format=flowed"); + aDesc.sBodyMimeType = "text/plain; charset=UTF-8; format=flowed"; aDesc.sSubject = m_pSubjectED->GetText(); aDesc.sCC = m_sCC; diff --git a/sw/source/ui/fldui/fldpage.cxx b/sw/source/ui/fldui/fldpage.cxx index 253032bedafa..49205e8e3f08 100644 --- a/sw/source/ui/fldui/fldpage.cxx +++ b/sw/source/ui/fldui/fldpage.cxx @@ -291,7 +291,7 @@ void SwFldPage::SavePos( const ListBox* pLst1, const ListBox* pLst2, if( (*ppLB) && (*ppLB)->GetEntryCount() ) m_aLstStrArr[ i ] = (*ppLB)->GetSelectEntry(); else - m_aLstStrArr[ i ] = ""; + m_aLstStrArr[ i ].clear(); } void SwFldPage::RestorePos(ListBox* pLst1, ListBox* pLst2, ListBox* pLst3) diff --git a/sw/source/ui/fldui/fldref.cxx b/sw/source/ui/fldui/fldref.cxx index 83f1aebee4d1..4be5ad338f76 100644 --- a/sw/source/ui/fldui/fldref.cxx +++ b/sw/source/ui/fldui/fldref.cxx @@ -533,13 +533,13 @@ void SwFldRefPage::UpdateSubType() mpSavedSelectedTxtNode == maOutlineNodes[nOutlIdx] ) { m_pSelectionToolTipLB->Select( pEntry ); - sOldSel = ""; + sOldSel.clear(); bCertainTxtNodeSelected = true; } else if ( !bCertainTxtNodeSelected && mnSavedSelectedPos == nOutlIdx ) { m_pSelectionToolTipLB->Select( pEntry ); - sOldSel = ""; + sOldSel.clear(); } } } @@ -561,13 +561,13 @@ void SwFldRefPage::UpdateSubType() mpSavedSelectedTxtNode == maNumItems[nNumItemIdx]->GetTxtNode() ) { m_pSelectionToolTipLB->Select( pEntry ); - sOldSel = ""; + sOldSel.clear(); bCertainTxtNodeSelected = true; } else if ( !bCertainTxtNodeSelected && mnSavedSelectedPos == nNumItemIdx ) { m_pSelectionToolTipLB->Select( pEntry ); - sOldSel = ""; + sOldSel.clear(); } } } @@ -583,7 +583,7 @@ void SwFldRefPage::UpdateSubType() SwSeqFldList aArr; // old selection should be kept in non-edit mode if(IsFldEdit()) - sOldSel = ""; + sOldSel.clear(); const size_t nCnt = pType->GetSeqFldList( aArr ); for( size_t n = 0; n < nCnt; ++n ) @@ -812,7 +812,7 @@ bool SwFldRefPage::FillItemSet(SfxItemSet* ) nTypeId = TYP_GETREFFLD; nSubType = REF_FOOTNOTE; - aName = ""; + aName.clear(); if (pSh->GetSeqFtnList(aArr) && aArr.SeekEntry(aElem, &nPos)) { @@ -833,7 +833,7 @@ bool SwFldRefPage::FillItemSet(SfxItemSet* ) nTypeId = TYP_GETREFFLD; nSubType = REF_ENDNOTE; - aName = ""; + aName.clear(); if (pSh->GetSeqFtnList(aArr, true) && aArr.SeekEntry(aElem, &nPos)) { diff --git a/sw/source/ui/fmtui/tmpdlg.cxx b/sw/source/ui/fmtui/tmpdlg.cxx index f9727379f1e5..4ac9c0f8fb19 100644 --- a/sw/source/ui/fmtui/tmpdlg.cxx +++ b/sw/source/ui/fmtui/tmpdlg.cxx @@ -74,8 +74,8 @@ SwTemplateDlg::SwTemplateDlg(vcl::Window* pParent, SwWrtShell* pActShell, bool bNew) : SfxStyleDialog(pParent, - OUString("TemplateDialog") + OUString::number(nRegion), - OUString("modules/swriter/ui/templatedialog") + + "TemplateDialog" + OUString::number(nRegion), + "modules/swriter/ui/templatedialog" + OUString::number(nRegion) + ".ui", rBase) , nType(nRegion) diff --git a/sw/source/ui/frmdlg/frmdlg.cxx b/sw/source/ui/frmdlg/frmdlg.cxx index fbea5bf60151..99dcd41a47bf 100644 --- a/sw/source/ui/frmdlg/frmdlg.cxx +++ b/sw/source/ui/frmdlg/frmdlg.cxx @@ -54,7 +54,7 @@ SwFrmDlg::SwFrmDlg( SfxViewFrame* pViewFrame, const OUString* pStr) : SfxTabDialog(pViewFrame, pParent, sResType, - OUString("modules/swriter/ui/") + + "modules/swriter/ui/" + sResType.toAsciiLowerCase() + (".ui"), &rCoreSet, pStr != 0) , m_bFormat(bFormat) diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index 8bf0653b43d4..325ed0f2f9e5 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -712,7 +712,7 @@ SwAddStylesDlg_Impl::~SwAddStylesDlg_Impl() IMPL_LINK_NOARG(SwAddStylesDlg_Impl, OkHdl) { for(sal_uInt16 i = 0; i < MAXLEVEL; i++) - pStyleArr[i] = ""; + pStyleArr[i].clear(); SvTreeListEntry* pEntry = m_pHeaderTree->First(); while(pEntry) @@ -2415,7 +2415,7 @@ IMPL_LINK(SwTOXEntryTabPage, StyleSelectHdl, ListBox*, pBox) const bool bEqualsNoCharStyle = sEntry == sNoCharStyle; m_pEditStylePB->Enable(!bEqualsNoCharStyle); if (bEqualsNoCharStyle) - sEntry = ""; + sEntry.clear(); Control* pCtrl = m_pTokenWIN->GetActiveControl(); OSL_ENSURE(pCtrl, "no active control?"); if(pCtrl) diff --git a/sw/source/ui/misc/srtdlg.cxx b/sw/source/ui/misc/srtdlg.cxx index 9e511f3ea7ea..084c73ba1e0e 100644 --- a/sw/source/ui/misc/srtdlg.cxx +++ b/sw/source/ui/misc/srtdlg.cxx @@ -298,7 +298,7 @@ void SwSortDlg::Apply() { OUString sEntry( m_pTypDLB1->GetSelectEntry() ); if( sEntry == aNumericTxt ) - sEntry = ""; + sEntry.clear(); else if( 0 != (pUserData = m_pTypDLB1->GetEntryData( m_pTypDLB1->GetSelectEntryPos())) ) sEntry = *(OUString*)pUserData; @@ -312,7 +312,7 @@ void SwSortDlg::Apply() { OUString sEntry( m_pTypDLB2->GetSelectEntry() ); if( sEntry == aNumericTxt ) - sEntry = ""; + sEntry.clear(); else if( 0 != (pUserData = m_pTypDLB2->GetEntryData( m_pTypDLB2->GetSelectEntryPos())) ) sEntry = *(OUString*)pUserData; @@ -326,7 +326,7 @@ void SwSortDlg::Apply() { OUString sEntry( m_pTypDLB3->GetSelectEntry() ); if( sEntry == aNumericTxt ) - sEntry = ""; + sEntry.clear(); else if( 0 != (pUserData = m_pTypDLB3->GetEntryData( m_pTypDLB3->GetSelectEntryPos())) ) sEntry = *(OUString*)pUserData; diff --git a/sw/source/ui/vba/vbalisthelper.cxx b/sw/source/ui/vba/vbalisthelper.cxx index 2cec7b34bcbf..db788a8c5c39 100644 --- a/sw/source/ui/vba/vbalisthelper.cxx +++ b/sw/source/ui/vba/vbalisthelper.cxx @@ -60,17 +60,17 @@ void SwVbaListHelper::Init() throw( css::uno::RuntimeException ) { case word::WdListGalleryType::wdBulletGallery: { - msStyleName = OUString(WORD_BULLET_GALLERY ); + msStyleName = WORD_BULLET_GALLERY; break; } case word::WdListGalleryType::wdNumberGallery: { - msStyleName = OUString(WORD_NUMBER_GALLERY ); + msStyleName = WORD_NUMBER_GALLERY; break; } case word::WdListGalleryType::wdOutlineNumberGallery: { - msStyleName = OUString(WORD_OUTLINE_NUMBER_GALLERY ); + msStyleName = WORD_OUTLINE_NUMBER_GALLERY; break; } default: diff --git a/sw/source/uibase/app/appenv.cxx b/sw/source/uibase/app/appenv.cxx index 2cafbbbc163f..3f0e1731708a 100644 --- a/sw/source/uibase/app/appenv.cxx +++ b/sw/source/uibase/app/appenv.cxx @@ -102,7 +102,7 @@ OUString InsertLabEnvText( SwWrtShell& rSh, SwFldMgr& rFldMgr, const OUString& r if ( nPos == -1 ) { sTmpText = aLine; - aLine = ""; + aLine.clear(); } else { diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx index 75046037067f..ce60c981dfd1 100644 --- a/sw/source/uibase/app/docstyle.cxx +++ b/sw/source/uibase/app/docstyle.cxx @@ -437,9 +437,9 @@ SwDocStyleSheet::SwDocStyleSheet( const SwDocStyleSheet& rOrg) : void SwDocStyleSheet::Reset() { - aName = ""; - aFollow = ""; - aParent = ""; + aName.clear(); + aFollow.clear(); + aParent.clear(); SetPhysical(false); } @@ -1808,7 +1808,7 @@ bool SwDocStyleSheet::FillStyleSheet( FillStyleType eFType ) if( pDesc->GetPoolHlpFileId() != UCHAR_MAX ) aHelpFile = *rDoc.GetDocPattern( pDesc->GetPoolHlpFileId() ); else - aHelpFile = ""; + aHelpFile.clear(); } else if( !bCreate ) nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC ); @@ -1836,7 +1836,7 @@ bool SwDocStyleSheet::FillStyleSheet( FillStyleType eFType ) if( pNumRule->GetPoolHlpFileId() != UCHAR_MAX ) aHelpFile = *rDoc.GetDocPattern( pNumRule->GetPoolHlpFileId() ); else - aHelpFile = ""; + aHelpFile.clear(); } else if( !bCreate ) nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_NUMRULE ); @@ -1881,7 +1881,7 @@ bool SwDocStyleSheet::FillStyleSheet( FillStyleType eFType ) if( pFmt->GetPoolHlpFileId() != UCHAR_MAX ) aHelpFile = *rDoc.GetDocPattern( pFmt->GetPoolHlpFileId() ); else - aHelpFile = ""; + aHelpFile.clear(); if( RES_CONDTXTFMTCOLL == pFmt->Which() ) _nMask |= SWSTYLEBIT_CONDCOLL; diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx index 6005d42dc9b0..f9204f19d86e 100644 --- a/sw/source/uibase/dbui/dbmgr.cxx +++ b/sw/source/uibase/dbui/dbmgr.cxx @@ -832,8 +832,7 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell, eEncoding = rHtmlOptions.GetTextEncoding(); } else - sBodyMimeType = - OUString("text/plain; charset=UTF-8; format=flowed"); + sBodyMimeType = "text/plain; charset=UTF-8; format=flowed"; } uno::Reference< XPropertySet > xColumnProp; @@ -1863,7 +1862,7 @@ bool SwDBManager::GetMergeColumnCnt(const OUString& rColumnName, sal_uInt16 n { if(!pImpl->pMergeData || !pImpl->pMergeData->xResultSet.is() || pImpl->pMergeData->bAfterSelection ) { - rResult = ""; + rResult.clear(); return false; } @@ -2509,7 +2508,7 @@ OUString SwDBManager::LoadAndRegisterDataSource(const DBConnURITypes type, const } catch(const Exception&) { - sFind = ""; + sFind.clear(); } return sFind; } diff --git a/sw/source/uibase/dbui/mailmergehelper.cxx b/sw/source/uibase/dbui/mailmergehelper.cxx index 8142dfc90685..8590b1f75c6e 100644 --- a/sw/source/uibase/dbui/mailmergehelper.cxx +++ b/sw/source/uibase/dbui/mailmergehelper.cxx @@ -478,7 +478,7 @@ OUString SwAddressPreview::FillData( } SwAddressIterator aIter(sAddress); - sAddress = ""; + sAddress.clear(); while(aIter.HasMore()) { SwMergeAddressItem aItem = aIter.Next(); @@ -518,7 +518,7 @@ OUString SwAddressPreview::FillData( if( !rExcludeCountry.isEmpty() && sReplace != rExcludeCountry ) aItem.sText = sReplace; else - aItem.sText = ""; + aItem.sText.clear(); } else { @@ -578,7 +578,7 @@ SwMergeAddressItem SwAddressIterator::Next() else if(-1 == nOpen && -1 == nReturn) { aRet.sText = sAddress; - sAddress = ""; + sAddress.clear(); } else { diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx index 1c2c6c0f2d86..41603a2ba010 100644 --- a/sw/source/uibase/dochdl/swdtflvr.cxx +++ b/sw/source/uibase/dochdl/swdtflvr.cxx @@ -3643,7 +3643,7 @@ SwTrnsfrDdeLink::SwTrnsfrDdeLink( SwTransferable& rTrans, SwWrtShell& rSh ) rSh.ResetModified(); } else - sName = ""; + sName.clear(); rSh.DoUndo( bUndo ); } diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index 4e0a63607918..dfa4306a5177 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -900,7 +900,7 @@ void SwEditWin::FlushInBuffer() nExpandSelection = nOldLen - nChgPos; } else - m_aInBuffer = ""; + m_aInBuffer.clear(); } else { @@ -962,7 +962,7 @@ void SwEditWin::FlushInBuffer() rSh.Insert( m_aInBuffer ); m_eBufferLanguage = LANGUAGE_DONTKNOW; - m_aInBuffer = ""; + m_aInBuffer.clear(); bFlushCharBuffer = false; } } diff --git a/sw/source/uibase/envelp/labelcfg.cxx b/sw/source/uibase/envelp/labelcfg.cxx index f1f608c24be5..947540b06cf4 100644 --- a/sw/source/uibase/envelp/labelcfg.cxx +++ b/sw/source/uibase/envelp/labelcfg.cxx @@ -229,7 +229,7 @@ static Sequence lcl_CreateProperties( case 0: pValues[nProp].Value <<= OUString(rRec.aType); break; case 1: { - rMeasure = ""; + rMeasure.clear(); rMeasure += rRec.bCont ? OUString( "C" ) : OUString( "S" ); rMeasure += sColon; rMeasure += OUString::number( convertTwipToMm100( rRec.lHDist ) ); rMeasure += sColon; rMeasure += OUString::number( convertTwipToMm100( rRec.lVDist ) ); rMeasure += sColon; diff --git a/sw/source/uibase/fldui/fldmgr.cxx b/sw/source/uibase/fldui/fldmgr.cxx index 44436f986d48..18e2562d7d24 100644 --- a/sw/source/uibase/fldui/fldmgr.cxx +++ b/sw/source/uibase/fldui/fldmgr.cxx @@ -288,9 +288,9 @@ SwField* SwFldMgr::GetCurFld() pCurFld = NULL; // initialise strings and format - aCurPar1 = ""; - aCurPar2 = ""; - sCurFrame = ""; + aCurPar1.clear(); + aCurPar2.clear(); + sCurFrame.clear(); nCurFmt = 0; if(!pCurFld) diff --git a/sw/source/uibase/inc/view.hxx b/sw/source/uibase/inc/view.hxx index 64b8dc9a8735..fd27dba2c106 100644 --- a/sw/source/uibase/inc/view.hxx +++ b/sw/source/uibase/inc/view.hxx @@ -557,7 +557,7 @@ public: inline void FlipDrawSelMode() { m_bDrawSelMode = !m_bDrawSelMode; } void NoRotate(); // turn off rotate mode bool EnterDrawTextMode(const Point& aDocPos); - void LeaveDrawCreate() { m_nDrawSfxId = m_nFormSfxId = USHRT_MAX; m_sDrawCustom = "";} + void LeaveDrawCreate() { m_nDrawSfxId = m_nFormSfxId = USHRT_MAX; m_sDrawCustom.clear();} bool IsDrawMode() { return (m_nDrawSfxId != USHRT_MAX || m_nFormSfxId != USHRT_MAX); } bool IsFormMode() const; bool IsBezierEditMode(); diff --git a/sw/source/uibase/ribbar/workctrl.cxx b/sw/source/uibase/ribbar/workctrl.cxx index 2f2a502fe5de..629ff1513acc 100644 --- a/sw/source/uibase/ribbar/workctrl.cxx +++ b/sw/source/uibase/ribbar/workctrl.cxx @@ -492,7 +492,7 @@ IMPL_LINK(SwScrollNaviPopup, SelectHdl, ToolBox*, pSet) Sequence< PropertyValue > aArgs; OUString cmd(".uno:ScrollToPrevious"); if (NID_NEXT == nSet) - cmd = OUString(".uno:ScrollToNext"); + cmd = ".uno:ScrollToNext"; SfxToolBoxControl::Dispatch( Reference< XDispatchProvider >( GetFrame()->getController(), UNO_QUERY ), cmd, aArgs ); } diff --git a/sw/source/uibase/shells/grfsh.cxx b/sw/source/uibase/shells/grfsh.cxx index 31652274c3dd..b6714ce6e8ac 100644 --- a/sw/source/uibase/shells/grfsh.cxx +++ b/sw/source/uibase/shells/grfsh.cxx @@ -415,12 +415,12 @@ void SwGrfShell::Execute(SfxRequest &rReq) if( !static_cast(pItem)->GetGraphicLink().isEmpty() ) sGrfNm = static_cast(pItem)->GetGraphicLink(); else - sGrfNm = ""; + sGrfNm.clear(); if( !static_cast(pItem)->GetGraphicFilter().isEmpty() ) sFilterNm = static_cast(pItem)->GetGraphicFilter(); else - sFilterNm = ""; + sFilterNm.clear(); if( !sGrfNm.isEmpty() ) { diff --git a/sw/source/uibase/uiview/formatclipboard.cxx b/sw/source/uibase/uiview/formatclipboard.cxx index 229fb83869ea..31adc5ac0acf 100644 --- a/sw/source/uibase/uiview/formatclipboard.cxx +++ b/sw/source/uibase/uiview/formatclipboard.cxx @@ -588,9 +588,9 @@ void SwFormatClipboard::Erase() m_pTableItemSet = 0; if( !m_aCharStyle.isEmpty() ) - m_aCharStyle = ""; + m_aCharStyle.clear(); if( !m_aParaStyle.isEmpty() ) - m_aParaStyle = ""; + m_aParaStyle.clear(); m_bPersistentCopy = false; } diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx index 5fd4deb71035..d9c8990d9c0f 100644 --- a/sw/source/uibase/uiview/view.cxx +++ b/sw/source/uibase/uiview/view.cxx @@ -1217,7 +1217,7 @@ void SwView::ReadUserData( const OUString &rUserData, bool bBrowse ) m_pWrtShell->EnterSelFrmMode( &aCrsrPos2 ); } m_pWrtShell->MakeSelVisible(); - m_sNewCrsrPos = ""; + m_sNewCrsrPos.clear(); } else if(USHRT_MAX != m_nNewPage) { diff --git a/sw/source/uibase/uiview/view1.cxx b/sw/source/uibase/uiview/view1.cxx index b35767476df2..85bd42692725 100644 --- a/sw/source/uibase/uiview/view1.cxx +++ b/sw/source/uibase/uiview/view1.cxx @@ -75,7 +75,7 @@ void SwView::Activate(bool bMDIActivate) if( !m_sSwViewData.isEmpty() ) { ReadUserData(m_sSwViewData, false); - m_sSwViewData = ""; + m_sSwViewData.clear(); } AttrChangedNotify(m_pWrtShell); diff --git a/sw/source/uibase/uiview/viewdraw.cxx b/sw/source/uibase/uiview/viewdraw.cxx index d3e3705206a4..43037c9c6ea6 100644 --- a/sw/source/uibase/uiview/viewdraw.cxx +++ b/sw/source/uibase/uiview/viewdraw.cxx @@ -263,7 +263,7 @@ void SwView::ExecDraw(SfxRequest& rReq) case SID_DRAW_SELECT: pFuncPtr = new DrawSelection(m_pWrtShell, m_pEditWin, this); m_nDrawSfxId = m_nFormSfxId = SID_OBJECT_SELECT; - m_sDrawCustom = ""; + m_sDrawCustom.clear(); break; case SID_DRAW_LINE: @@ -276,7 +276,7 @@ void SwView::ExecDraw(SfxRequest& rReq) case SID_DRAW_CAPTION_VERTICAL: pFuncPtr = new ConstRectangle(m_pWrtShell, m_pEditWin, this); m_nDrawSfxId = nSlotId; - m_sDrawCustom = ""; + m_sDrawCustom.clear(); break; case SID_DRAW_POLYGON_NOFILL: @@ -284,7 +284,7 @@ void SwView::ExecDraw(SfxRequest& rReq) case SID_DRAW_FREELINE_NOFILL: pFuncPtr = new ConstPolygon(m_pWrtShell, m_pEditWin, this); m_nDrawSfxId = nSlotId; - m_sDrawCustom = ""; + m_sDrawCustom.clear(); break; case SID_DRAW_ARC: @@ -292,7 +292,7 @@ void SwView::ExecDraw(SfxRequest& rReq) case SID_DRAW_CIRCLECUT: pFuncPtr = new ConstArc(m_pWrtShell, m_pEditWin, this); m_nDrawSfxId = nSlotId; - m_sDrawCustom = ""; + m_sDrawCustom.clear(); break; case SID_FM_CREATE_CONTROL: @@ -645,7 +645,7 @@ void SwView::SetDrawFuncPtr(SwDrawBase* pFuncPtr) void SwView::SetSelDrawSlot() { m_nDrawSfxId = SID_OBJECT_SELECT; - m_sDrawCustom = ""; + m_sDrawCustom.clear(); } bool SwView::AreOnlyFormsSelected() const diff --git a/sw/source/uibase/uno/SwXFilterOptions.cxx b/sw/source/uibase/uno/SwXFilterOptions.cxx index 57477a0a3661..fef02b76f6bc 100644 --- a/sw/source/uibase/uno/SwXFilterOptions.cxx +++ b/sw/source/uibase/uno/SwXFilterOptions.cxx @@ -67,7 +67,7 @@ uno::Sequence< beans::PropertyValue > SwXFilterOptions::getPropertyValues() thro uno::Sequence aRet(1); beans::PropertyValue* pArray = aRet.getArray(); - pArray[0].Name = OUString( FILTER_OPTIONS_NAME ); + pArray[0].Name = FILTER_OPTIONS_NAME; pArray[0].Value <<= sFilterOptions; return aRet; diff --git a/sw/source/uibase/uno/unomailmerge.cxx b/sw/source/uibase/uno/unomailmerge.cxx index 39627971b482..5d96097863b3 100644 --- a/sw/source/uibase/uno/unomailmerge.cxx +++ b/sw/source/uibase/uno/unomailmerge.cxx @@ -811,7 +811,7 @@ uno::Any SAL_CALL SwXMailMerge::execute( if ( xCurModel.get() != xModel.get() ) { // in case it was a temporary model -> close it, and delete the file DeleteTmpFile_Impl( xCurModel, xCurDocSh, aTmpFileName ); - aTmpFileName = ""; + aTmpFileName.clear(); } // (in case it wasn't a temporary model, it will be closed in the dtor, at the latest) diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx index 56c148b939f5..ea3683fc8017 100644 --- a/sw/source/uibase/uno/unotxdoc.cxx +++ b/sw/source/uibase/uno/unotxdoc.cxx @@ -1784,15 +1784,15 @@ Sequence< OUString > SwXTextDocument::getSupportedServiceNames(void) throw( Runt Sequence< OUString > aRet (3); OUString* pArray = aRet.getArray(); - pArray[0] = OUString ( ( "com.sun.star.document.OfficeDocument" ) ); - pArray[1] = OUString ( ( "com.sun.star.text.GenericTextDocument" ) ); + pArray[0] = "com.sun.star.document.OfficeDocument"; + pArray[1] = "com.sun.star.text.GenericTextDocument"; if (bTextDoc) - pArray[2] = OUString ( ( "com.sun.star.text.TextDocument" ) ); + pArray[2] = "com.sun.star.text.TextDocument"; else if (bWebDoc) - pArray[2] = OUString ( ( "com.sun.star.text.WebDocument" ) ); + pArray[2] = "com.sun.star.text.WebDocument"; else if (bGlobalDoc) - pArray[2] = OUString ( ( "com.sun.star.text.GlobalDocument" ) ); + pArray[2] = "com.sun.star.text.GlobalDocument"; return aRet; } @@ -3425,7 +3425,7 @@ Any SwXLinkTargetSupplier::getByName(const OUString& rName) } else if(sToCompare == sBookmarks) { - sSuffix = ""; + sSuffix.clear(); Reference< XNameAccess > xBkms = new SwXLinkNameAccessWrapper( pxDoc->getBookmarks(), sToCompare, sSuffix ); Reference< XPropertySet > xRet(xBkms, UNO_QUERY); -- cgit