diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-11-06 09:37:55 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-11-06 09:37:55 +0100 |
commit | 42cf4f9a2700e5d8ba5f551be2355cb827f4c5bf (patch) | |
tree | 774156f03d654c4df3e368fe10c94b5a086a7ddd /sw | |
parent | 2f88f0adf0f787ae1e1a2a5ac2156b347984fd4a (diff) |
loplugin:stringconstant: elide explicit ctor usage (automatic rewrite)
Change-Id: I55970d363ab53eb78d580192006e52d9240d46fb
Diffstat (limited to 'sw')
69 files changed, 228 insertions, 229 deletions
diff --git a/sw/qa/core/filters-test.cxx b/sw/qa/core/filters-test.cxx index 03db7a932e43..23fb6a2f03e8 100644 --- a/sw/qa/core/filters-test.cxx +++ b/sw/qa/core/filters-test.cxx @@ -133,47 +133,47 @@ bool SwFiltersTest::filter(const OUString &rFilter, const OUString &rURL, void SwFiltersTest::testCVEs() { - testDir(OUString("StarOffice XML (Writer)"), + testDir("StarOffice XML (Writer)", getURLFromSrc("/sw/qa/core/data/xml/"), - OUString(FILTER_XML), + FILTER_XML, SfxFilterFlags::IMPORT | SfxFilterFlags::OWN | SfxFilterFlags::DEFAULT, isstorage, SOFFICE_FILEFORMAT_CURRENT); - testDir(OUString("writer8"), + testDir("writer8", getURLFromSrc("/sw/qa/core/data/odt/"), - OUString(FILTER_XML), + FILTER_XML, SfxFilterFlags::IMPORT | SfxFilterFlags::OWN | SfxFilterFlags::DEFAULT, isstorage, SOFFICE_FILEFORMAT_CURRENT); - testDir(OUString("MS Word 97"), + testDir("MS Word 97", getURLFromSrc("/sw/qa/core/data/ww8/"), - OUString(FILTER_WW8)); + FILTER_WW8); - testDir(OUString("MS WinWord 6.0"), + testDir("MS WinWord 6.0", getURLFromSrc("/sw/qa/core/data/ww6/"), - OUString(sWW6)); + sWW6); - testDir(OUString("MS WinWord 5"), + testDir("MS WinWord 5", getURLFromSrc("/sw/qa/core/data/ww5/"), - OUString(sWW5)); + sWW5); - testDir(OUString("Text (encoded)"), + testDir("Text (encoded)", getURLFromSrc("/sw/qa/core/data/txt/"), - OUString(FILTER_TEXT_DLG)); + FILTER_TEXT_DLG); - testDir(OUString("MS Word 2007 XML"), + testDir("MS Word 2007 XML", getURLFromSrc("/sw/qa/core/data/ooxml/"), OUString(), SfxFilterFlags::STARONEFILTER); - testDir(OUString("Rich Text Format"), + testDir("Rich Text Format", getURLFromSrc("/sw/qa/core/data/rtf/"), OUString(), SfxFilterFlags::STARONEFILTER); - testDir(OUString("HTML"), + testDir("HTML", getURLFromSrc("/sw/qa/core/data/html/"), - OUString(sHTML)); + sHTML); testDir("T602Document", getURLFromSrc("/sw/qa/core/data/602/"), @@ -190,7 +190,7 @@ void SwFiltersTest::testCVEs() testDir("HTML", getURLFromSrc("/sw/qa/core/exportdata/html/"), - OUString(sHTML), + sHTML, SfxFilterFlags::NONE, SotClipboardFormatId::NONE, 0, diff --git a/sw/qa/core/macros-test.cxx b/sw/qa/core/macros-test.cxx index e6d21d9a5f53..2223fd7e752f 100644 --- a/sw/qa/core/macros-test.cxx +++ b/sw/qa/core/macros-test.cxx @@ -194,9 +194,9 @@ void SwMacrosTest::testBookmarkDeleteAndJoin() IDocumentContentOperations & rIDCO(pDoc->getIDocumentContentOperations()); rIDCO.AppendTextNode(*aPaM.GetPoint()); - rIDCO.InsertString(aPaM, OUString("A")); + rIDCO.InsertString(aPaM, "A"); rIDCO.AppendTextNode(*aPaM.GetPoint()); - rIDCO.InsertString(aPaM, OUString("A")); + rIDCO.InsertString(aPaM, "A"); rIDCO.AppendTextNode(*aPaM.GetPoint()); aPaM.Move(fnMoveBackward, fnGoNode); aPaM.Move(fnMoveBackward, fnGoNode); @@ -233,7 +233,7 @@ void SwMacrosTest::testBookmarkDeleteTdf90816() IDocumentContentOperations & rIDCO(pDoc->getIDocumentContentOperations()); rIDCO.AppendTextNode(*aPaM.GetPoint()); - rIDCO.InsertString(aPaM, OUString("ABC")); + rIDCO.InsertString(aPaM, "ABC"); aPaM.Move(fnMoveBackward, fnGoContent); aPaM.SetMark(); aPaM.Move(fnMoveBackward, fnGoContent); @@ -443,11 +443,11 @@ void SwMacrosTest::testFindReplace() auto pPaM(pDoc->CreateUnoCrsr(SwPosition(aIdx))); IDocumentContentOperations & rIDCO(pDoc->getIDocumentContentOperations()); - rIDCO.InsertString(*pPaM, OUString("foo")); + rIDCO.InsertString(*pPaM, "foo"); rIDCO.AppendTextNode(*pPaM->GetPoint()); - rIDCO.InsertString(*pPaM, OUString("bar")); + rIDCO.InsertString(*pPaM, "bar"); rIDCO.AppendTextNode(*pPaM->GetPoint()); - rIDCO.InsertString(*pPaM, OUString("baz")); + rIDCO.InsertString(*pPaM, "baz"); pPaM->Move(fnMoveBackward, fnGoDoc); bool bCancel(false); diff --git a/sw/qa/core/uwriter.cxx b/sw/qa/core/uwriter.cxx index 425a556ca099..bb76e6cf8f54 100644 --- a/sw/qa/core/uwriter.cxx +++ b/sw/qa/core/uwriter.cxx @@ -281,17 +281,17 @@ SwTextNode* getModelToViewTestDocument(SwDoc *pDoc) SwPaM aPaM(aIdx); SwFormatFootnote aFootnote; - aFootnote.SetNumStr(OUString("foo")); + aFootnote.SetNumStr("foo"); pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint()); - pDoc->getIDocumentContentOperations().InsertString(aPaM, OUString("AAAAA BBBBB ")); + pDoc->getIDocumentContentOperations().InsertString(aPaM, "AAAAA BBBBB "); SwTextNode* pTextNode = aPaM.GetNode().GetTextNode(); sal_Int32 nPos = aPaM.GetPoint()->nContent.GetIndex(); pTextNode->InsertItem(aFootnote, nPos, nPos); - pDoc->getIDocumentContentOperations().InsertString(aPaM, OUString(" CCCCC ")); + pDoc->getIDocumentContentOperations().InsertString(aPaM, " CCCCC "); nPos = aPaM.GetPoint()->nContent.GetIndex(); pTextNode->InsertItem(aFootnote, nPos, nPos); - pDoc->getIDocumentContentOperations().InsertString(aPaM, OUString(" DDDDD")); + pDoc->getIDocumentContentOperations().InsertString(aPaM, " DDDDD"); CPPUNIT_ASSERT(pTextNode->GetText().getLength() == (4*5) + 5 + 2); //set start of selection to first B @@ -328,7 +328,7 @@ SwTextNode* getModelToViewTestDocument2(SwDoc *pDoc) SwPaM aPaM(aIdx); pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint()); - pDoc->getIDocumentContentOperations().InsertString(aPaM, OUString("AAAAA")); + pDoc->getIDocumentContentOperations().InsertString(aPaM, "AAAAA"); IDocumentMarkAccess* pMarksAccess = pDoc->getIDocumentMarkAccess(); sw::mark::IFieldmark *pFieldmark = dynamic_cast<sw::mark::IFieldmark*>( pMarksAccess->makeNoTextFieldBookmark(aPaM, "test", ODF_FORMDROPDOWN)); @@ -337,7 +337,7 @@ SwTextNode* getModelToViewTestDocument2(SwDoc *pDoc) vListEntries[0] = "BBBBB"; (*pFieldmark->GetParameters())[ODF_FORMDROPDOWN_LISTENTRY] = uno::makeAny(vListEntries); (*pFieldmark->GetParameters())[ODF_FORMDROPDOWN_RESULT] = uno::makeAny(sal_Int32(0)); - pDoc->getIDocumentContentOperations().InsertString(aPaM, OUString("CCCCC")); + pDoc->getIDocumentContentOperations().InsertString(aPaM, "CCCCC"); SwTextNode* pTextNode = aPaM.GetNode().GetTextNode(); CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(11), pTextNode->GetText().getLength()); @@ -685,11 +685,11 @@ void SwDocTest::testSwScanner() SwDocStat aDocStat; m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint()); - m_pDoc->getIDocumentContentOperations().InsertString(aPaM, OUString("Apple")); + m_pDoc->getIDocumentContentOperations().InsertString(aPaM, "Apple"); pTextNode = aPaM.GetNode().GetTextNode(); sal_Int32 nPos = aPaM.GetPoint()->nContent.GetIndex(); SwFormatFootnote aFootnote; - aFootnote.SetNumStr(OUString("banana")); + aFootnote.SetNumStr("banana"); SwTextAttr* pTA = pTextNode->InsertItem(aFootnote, nPos, nPos); CPPUNIT_ASSERT(pTA); CPPUNIT_ASSERT(pTextNode->Len() == 6); //Apple + 0x02 @@ -710,7 +710,7 @@ void SwDocTest::testSwScanner() CPPUNIT_ASSERT_MESSAGE("refmark anchor should not be counted", aDocStat.nChar == 11); m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint()); - m_pDoc->getIDocumentContentOperations().InsertString(aPaM, OUString("Apple")); + m_pDoc->getIDocumentContentOperations().InsertString(aPaM, "Apple"); DateTime aDate(DateTime::SYSTEM); SwPostItField aPostIt( @@ -718,7 +718,7 @@ void SwDocTest::testSwScanner() OUString("Some Text"), OUString("Initials"), OUString("Name"), aDate ); m_pDoc->getIDocumentContentOperations().InsertPoolItem(aPaM, SwFormatField(aPostIt)); - m_pDoc->getIDocumentContentOperations().InsertString(aPaM, OUString("Apple")); + m_pDoc->getIDocumentContentOperations().InsertString(aPaM, "Apple"); pTextNode = aPaM.GetNode().GetTextNode(); aDocStat.Reset(); pTextNode->CountWords(aDocStat, 0, pTextNode->Len()); @@ -735,7 +735,7 @@ void SwDocTest::testSwScanner() const char aString[] = "Lorem ipsum"; m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint()); - m_pDoc->getIDocumentContentOperations().InsertString(aPaM, OUString(aString)); + m_pDoc->getIDocumentContentOperations().InsertString(aPaM, aString); pTextNode = aPaM.GetNode().GetTextNode(); pTextNode->CountWords(aDocStat, 0, pTextNode->Len()); CPPUNIT_ASSERT_EQUAL(aDocStat.nWord, static_cast<sal_uLong>(2)); @@ -924,7 +924,7 @@ void SwDocTest::testMergePortionsDeleteNotSorted() { SwNodeIndex aIdx(m_pDoc->GetNodes().GetEndOfContent(), -1); SwPaM aPaM(aIdx); - m_pDoc->getIDocumentContentOperations().InsertString(aPaM, OUString(" AABBCC")); + m_pDoc->getIDocumentContentOperations().InsertString(aPaM, " AABBCC"); SwCharFormat *const pCharFormat(m_pDoc->MakeCharFormat("foo", 0)); SwFormatCharFormat const charFormat(pCharFormat); @@ -956,14 +956,14 @@ void SwDocTest::testGraphicAnchorDeletion() SwNodeIndex aIdx(m_pDoc->GetNodes().GetEndOfContent(), -1); SwPaM aPaM(aIdx); - m_pDoc->getIDocumentContentOperations().InsertString(aPaM, OUString("Paragraph 1")); + m_pDoc->getIDocumentContentOperations().InsertString(aPaM, "Paragraph 1"); m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint()); - m_pDoc->getIDocumentContentOperations().InsertString(aPaM, OUString("graphic anchor>><<graphic anchor")); + m_pDoc->getIDocumentContentOperations().InsertString(aPaM, "graphic anchor>><<graphic anchor"); SwNodeIndex nPara2 = aPaM.GetPoint()->nNode; m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint()); - m_pDoc->getIDocumentContentOperations().InsertString(aPaM, OUString("Paragraph 3")); + m_pDoc->getIDocumentContentOperations().InsertString(aPaM, "Paragraph 3"); aPaM.GetPoint()->nNode = nPara2; aPaM.GetPoint()->nContent.Assign(aPaM.GetContentNode(), RTL_CONSTASCII_LENGTH("graphic anchor>>")); @@ -1156,7 +1156,7 @@ void SwDocTest::testTransliterate() // just some simple test to see if it's totally broken SwNodeIndex aIdx(m_pDoc->GetNodes().GetEndOfContent(), -1); SwPaM aPaM(aIdx); - m_pDoc->getIDocumentContentOperations().InsertString(aPaM, OUString("foobar")); + m_pDoc->getIDocumentContentOperations().InsertString(aPaM, "foobar"); aPaM.SetMark(); aPaM.GetPoint()->nContent = 0; CPPUNIT_ASSERT_EQUAL(OUString("foobar"), aPaM.GetText()); @@ -1223,22 +1223,22 @@ void SwDocTest::testMarkMove() { SwNodeIndex aIdx(m_pDoc->GetNodes().GetEndOfContent(), -1); SwPaM aPaM(aIdx); - m_pDoc->getIDocumentContentOperations().InsertString(aPaM, OUString("Paragraph 1")); + m_pDoc->getIDocumentContentOperations().InsertString(aPaM, "Paragraph 1"); aPaM.SetMark(); aPaM.GetMark()->nContent -= aPaM.GetMark()->nContent.GetIndex(); - pMarksAccess->makeMark(aPaM, OUString("Para1"), IDocumentMarkAccess::MarkType::BOOKMARK); + pMarksAccess->makeMark(aPaM, "Para1", IDocumentMarkAccess::MarkType::BOOKMARK); m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint()); - m_pDoc->getIDocumentContentOperations().InsertString(aPaM, OUString("Paragraph 2")); + m_pDoc->getIDocumentContentOperations().InsertString(aPaM, "Paragraph 2"); aPaM.SetMark(); aPaM.GetMark()->nContent -= aPaM.GetMark()->nContent.GetIndex(); - pMarksAccess->makeMark(aPaM, OUString("Para2"), IDocumentMarkAccess::MarkType::BOOKMARK); + pMarksAccess->makeMark(aPaM, "Para2", IDocumentMarkAccess::MarkType::BOOKMARK); m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint()); - m_pDoc->getIDocumentContentOperations().InsertString(aPaM, OUString("Paragraph 3")); + m_pDoc->getIDocumentContentOperations().InsertString(aPaM, "Paragraph 3"); aPaM.SetMark(); aPaM.GetMark()->nContent -= aPaM.GetMark()->nContent.GetIndex(); - pMarksAccess->makeMark(aPaM, OUString("Para3"), IDocumentMarkAccess::MarkType::BOOKMARK); + pMarksAccess->makeMark(aPaM, "Para3", IDocumentMarkAccess::MarkType::BOOKMARK); } // join paragraph 2 and 3 and check diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx index 655e9bc1bb38..36eaf0346475 100644 --- a/sw/qa/extras/rtfimport/rtfimport.cxx +++ b/sw/qa/extras/rtfimport/rtfimport.cxx @@ -548,7 +548,7 @@ DECLARE_RTFIMPORT_TEST(testFdo38786, "fdo38786.rtf") DECLARE_RTFIMPORT_TEST(testN757651, "n757651.rtf") { // The bug was that due to buggy layout the text expanded to two pages. - if (Application::GetDefaultDevice()->IsFontAvailable(OUString("Times New Roman"))) + if (Application::GetDefaultDevice()->IsFontAvailable("Times New Roman")) CPPUNIT_ASSERT_EQUAL(1, getPages()); } diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx index 0ff3ab58c8ac..8924f28056ab 100644 --- a/sw/qa/extras/uiwriter/uiwriter.cxx +++ b/sw/qa/extras/uiwriter/uiwriter.cxx @@ -286,7 +286,7 @@ void SwUiWriterTest::testReplaceForward() SwTextNode* pTextNode = aPaM.GetNode().GetTextNode(); lcl_selectCharacters(aPaM, 5, 9); - pDoc->getIDocumentContentOperations().ReplaceRange(aPaM, OUString("toto"), false); + pDoc->getIDocumentContentOperations().ReplaceRange(aPaM, "toto", false); CPPUNIT_ASSERT_EQUAL(EXPECTED_REPLACE_CONTENT, pTextNode->GetText()); @@ -329,16 +329,16 @@ void SwUiWriterTest::testBookmarkCopy() IDocumentContentOperations & rIDCO(pDoc->getIDocumentContentOperations()); SwNodeIndex aIdx(pDoc->GetNodes().GetEndOfContent(), -1); SwCursor aPaM(SwPosition(aIdx), nullptr, false); - rIDCO.InsertString(aPaM, OUString("foo")); + rIDCO.InsertString(aPaM, "foo"); rIDCO.SplitNode(*aPaM.GetPoint(), false); - rIDCO.InsertString(aPaM, OUString("bar")); + rIDCO.InsertString(aPaM, "bar"); aPaM.SetMark(); aPaM.MovePara(GetfnParaCurr(), GetfnParaStart()); - rIDMA.makeMark(aPaM, OUString("Mark"), IDocumentMarkAccess::MarkType::BOOKMARK); + rIDMA.makeMark(aPaM, "Mark", IDocumentMarkAccess::MarkType::BOOKMARK); aPaM.Exchange(); aPaM.DeleteMark(); rIDCO.SplitNode(*aPaM.GetPoint(), false); - rIDCO.InsertString(aPaM, OUString("baz")); + rIDCO.InsertString(aPaM, "baz"); // copy range rIDCO.SplitNode(*aPaM.GetPoint(), false); @@ -412,11 +412,11 @@ void SwUiWriterTest::testReplaceBackward() SwNodeIndex aIdx(pDoc->GetNodes().GetEndOfContent(), -1); SwPaM aPaM(aIdx); - pDoc->getIDocumentContentOperations().InsertString(aPaM, OUString("toto titi tutu")); + pDoc->getIDocumentContentOperations().InsertString(aPaM, "toto titi tutu"); SwTextNode* pTextNode = aPaM.GetNode().GetTextNode(); lcl_selectCharacters(aPaM, 9, 5); - pDoc->getIDocumentContentOperations().ReplaceRange(aPaM, OUString("toto"), false); + pDoc->getIDocumentContentOperations().ReplaceRange(aPaM, "toto", false); CPPUNIT_ASSERT_EQUAL(EXPECTED_REPLACE_CONTENT, pTextNode->GetText()); @@ -903,7 +903,7 @@ void SwUiWriterTest::testBookmarkUndo() IDocumentMarkAccess* const pMarkAccess = pDoc->getIDocumentMarkAccess(); SwPaM aPaM( SwNodeIndex(pDoc->GetNodes().GetEndOfContent(), -1) ); - pMarkAccess->makeMark(aPaM, OUString("Mark"), IDocumentMarkAccess::MarkType::BOOKMARK); + pMarkAccess->makeMark(aPaM, "Mark", IDocumentMarkAccess::MarkType::BOOKMARK); CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pMarkAccess->getAllMarksCount()); rUndoManager.Undo(); CPPUNIT_ASSERT_EQUAL(sal_Int32(0), pMarkAccess->getAllMarksCount()); @@ -1055,7 +1055,7 @@ void SwUiWriterTest::testTdf63214() aPaM.SetMark(); aPaM.Move(fnMoveForward, fnGoContent); //Inserting a crossRefBookmark - pMarkAccess->makeMark(aPaM, OUString("Bookmark"), IDocumentMarkAccess::MarkType::CROSSREF_HEADING_BOOKMARK); + pMarkAccess->makeMark(aPaM, "Bookmark", IDocumentMarkAccess::MarkType::CROSSREF_HEADING_BOOKMARK); CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pMarkAccess->getAllMarksCount()); } //moving cursor to the end of paragraph @@ -1084,7 +1084,7 @@ void SwUiWriterTest::testTdf51741() IDocumentMarkAccess* const pMarkAccess = pDoc->getIDocumentMarkAccess(); SwPaM aPaM( SwNodeIndex(pDoc->GetNodes().GetEndOfContent(), -1) ); //Modification 1 - pMarkAccess->makeMark(aPaM, OUString("Mark"), IDocumentMarkAccess::MarkType::BOOKMARK); + pMarkAccess->makeMark(aPaM, "Mark", IDocumentMarkAccess::MarkType::BOOKMARK); CPPUNIT_ASSERT(pWrtShell->IsModified()); pWrtShell->ResetModified(); CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pMarkAccess->getAllMarksCount()); @@ -1172,9 +1172,9 @@ void SwUiWriterTest::testDeleteTableRedlines() CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTable->getRows()->getCount()); CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xTable->getColumns()->getCount()); uno::Sequence<beans::PropertyValue> aDescriptor; - SwUnoCursorHelper::makeTableCellRedline((*const_cast<SwTableBox*>(rTbl.GetTableBox(OUString("A1")))), OUString("TableCellInsert"), aDescriptor); - SwUnoCursorHelper::makeTableCellRedline((*const_cast<SwTableBox*>(rTbl.GetTableBox(OUString("B1")))), OUString("TableCellInsert"), aDescriptor); - SwUnoCursorHelper::makeTableCellRedline((*const_cast<SwTableBox*>(rTbl.GetTableBox(OUString("C1")))), OUString("TableCellInsert"), aDescriptor); + SwUnoCursorHelper::makeTableCellRedline((*const_cast<SwTableBox*>(rTbl.GetTableBox("A1"))), "TableCellInsert", aDescriptor); + SwUnoCursorHelper::makeTableCellRedline((*const_cast<SwTableBox*>(rTbl.GetTableBox("B1"))), "TableCellInsert", aDescriptor); + SwUnoCursorHelper::makeTableCellRedline((*const_cast<SwTableBox*>(rTbl.GetTableBox("C1"))), "TableCellInsert", aDescriptor); IDocumentRedlineAccess& rIDRA = pDoc->getIDocumentRedlineAccess(); SwExtraRedlineTable& rExtras = rIDRA.GetExtraRedlineTable(); rExtras.DeleteAllTableRedlines(pDoc, rTbl, false, sal_uInt16(USHRT_MAX)); @@ -1314,7 +1314,7 @@ void SwUiWriterTest::testTdf79236() SwDoc* pDoc = createDoc(); sw::UndoManager& rUndoManager = pDoc->GetUndoManager(); //Getting some paragraph style - SwTextFormatColl* pTextFormat = pDoc->FindTextFormatCollByName(OUString("Text Body")); + SwTextFormatColl* pTextFormat = pDoc->FindTextFormatCollByName("Text Body"); const SwAttrSet& rAttrSet = pTextFormat->GetAttrSet(); SfxItemSet* pNewSet = rAttrSet.Clone(); sal_uInt16 initialCount = pNewSet->Count(); @@ -1335,7 +1335,7 @@ void SwUiWriterTest::testTdf79236() //Setting the updated item set on the style pDoc->ChgFormat(*pTextFormat, *pNewSet); //Checking the Changes - SwTextFormatColl* pTextFormat2 = pDoc->FindTextFormatCollByName(OUString("Text Body")); + SwTextFormatColl* pTextFormat2 = pDoc->FindTextFormatCollByName("Text Body"); const SwAttrSet& rAttrSet2 = pTextFormat2->GetAttrSet(); const SvxAdjustItem& rAdjustItem2 = rAttrSet2.GetAdjust(); SvxAdjust Adjust2 = rAdjustItem2.GetAdjust(); @@ -1343,7 +1343,7 @@ void SwUiWriterTest::testTdf79236() CPPUNIT_ASSERT_EQUAL(SVX_ADJUST_RIGHT, Adjust2); //Undo the changes rUndoManager.Undo(); - SwTextFormatColl* pTextFormat3 = pDoc->FindTextFormatCollByName(OUString("Text Body")); + SwTextFormatColl* pTextFormat3 = pDoc->FindTextFormatCollByName("Text Body"); const SwAttrSet& rAttrSet3 = pTextFormat3->GetAttrSet(); const SvxAdjustItem& rAdjustItem3 = rAttrSet3.GetAdjust(); SvxAdjust Adjust3 = rAdjustItem3.GetAdjust(); @@ -1351,7 +1351,7 @@ void SwUiWriterTest::testTdf79236() CPPUNIT_ASSERT_EQUAL(SVX_ADJUST_LEFT, Adjust3); //Redo the changes rUndoManager.Redo(); - SwTextFormatColl* pTextFormat4 = pDoc->FindTextFormatCollByName(OUString("Text Body")); + SwTextFormatColl* pTextFormat4 = pDoc->FindTextFormatCollByName("Text Body"); const SwAttrSet& rAttrSet4 = pTextFormat4->GetAttrSet(); const SvxAdjustItem& rAdjustItem4 = rAttrSet4.GetAdjust(); SvxAdjust Adjust4 = rAdjustItem4.GetAdjust(); @@ -1359,7 +1359,7 @@ void SwUiWriterTest::testTdf79236() CPPUNIT_ASSERT_EQUAL(SVX_ADJUST_RIGHT, Adjust4); //Undo the changes rUndoManager.Undo(); - SwTextFormatColl* pTextFormat5 = pDoc->FindTextFormatCollByName(OUString("Text Body")); + SwTextFormatColl* pTextFormat5 = pDoc->FindTextFormatCollByName("Text Body"); const SwAttrSet& rAttrSet5 = pTextFormat5->GetAttrSet(); const SvxAdjustItem& rAdjustItem5 = rAttrSet5.GetAdjust(); SvxAdjust Adjust5 = rAdjustItem5.GetAdjust(); @@ -1455,8 +1455,8 @@ void SwUiWriterTest::testTdf69282() uno::Reference<lang::XComponent> xSourceDoc(mxComponent, uno::UNO_QUERY); mxComponent.clear(); SwDoc* target = createDoc(); - SwPageDesc* sPageDesc = source->MakePageDesc(OUString("SourceStyle")); - SwPageDesc* tPageDesc = target->MakePageDesc(OUString("TargetStyle")); + SwPageDesc* sPageDesc = source->MakePageDesc("SourceStyle"); + SwPageDesc* tPageDesc = target->MakePageDesc("TargetStyle"); sPageDesc->ChgFirstShare(false); CPPUNIT_ASSERT(!sPageDesc->IsFirstShared()); SwFrameFormat& rSourceMasterFormat = sPageDesc->GetMaster(); @@ -1516,8 +1516,8 @@ void SwUiWriterTest::testTdf69282WithMirror() uno::Reference<lang::XComponent> xSourceDoc(mxComponent, uno::UNO_QUERY); mxComponent.clear(); SwDoc* target = createDoc(); - SwPageDesc* sPageDesc = source->MakePageDesc(OUString("SourceStyle")); - SwPageDesc* tPageDesc = target->MakePageDesc(OUString("TargetStyle")); + SwPageDesc* sPageDesc = source->MakePageDesc("SourceStyle"); + SwPageDesc* tPageDesc = target->MakePageDesc("TargetStyle"); //Enabling Mirror sPageDesc->SetUseOn(nsUseOnPage::PD_MIRROR); SwFrameFormat& rSourceMasterFormat = sPageDesc->GetMaster(); @@ -1640,7 +1640,7 @@ void SwUiWriterTest::testTdf60967() SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); SwPaM* pCrsr = pDoc->GetEditShell()->GetCrsr(); sw::UndoManager& rUndoManager = pDoc->GetUndoManager(); - pWrtShell->ChangeHeaderOrFooter(OUString("Default Style"), true, true, true); + pWrtShell->ChangeHeaderOrFooter("Default Style", true, true, true); //Inserting table SwInsertTableOptions TableOpt(tabopts::DEFAULT_BORDER, 0); pWrtShell->InsertTable(TableOpt, 2, 2); @@ -1726,7 +1726,7 @@ void SwUiWriterTest::testTdf77342() SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); SwPaM* pCrsr = pDoc->GetEditShell()->GetCrsr(); //inserting first footnote - pWrtShell->InsertFootnote(OUString("")); + pWrtShell->InsertFootnote(""); SwFieldType* pField = pWrtShell->GetFieldType(0, RES_GETREFFLD); SwGetRefFieldType* pRefType = static_cast<SwGetRefFieldType*>(pField); //moving cursor to the starting of document @@ -1735,14 +1735,14 @@ void SwUiWriterTest::testTdf77342() SwGetRefField aField1(pRefType, OUString(""), REF_FOOTNOTE, sal_uInt16(0), REF_CONTENT); pWrtShell->Insert(aField1); //inserting second footnote - pWrtShell->InsertFootnote(OUString("")); + pWrtShell->InsertFootnote(""); pWrtShell->SttDoc(); pCrsr->Move(fnMoveForward); //inserting reference field 2 SwGetRefField aField2(pRefType, OUString(""), REF_FOOTNOTE, sal_uInt16(1), REF_CONTENT); pWrtShell->Insert(aField2); //inserting third footnote - pWrtShell->InsertFootnote(OUString("")); + pWrtShell->InsertFootnote(""); pWrtShell->SttDoc(); pCrsr->Move(fnMoveForward); pCrsr->Move(fnMoveForward); @@ -2216,10 +2216,10 @@ void SwUiWriterTest::testTdf75137() SwDoc* pDoc = createDoc(); SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); SwShellCrsr* pShellCrsr = pWrtShell->getShellCrsr(true); - pWrtShell->InsertFootnote(OUString("This is first footnote")); + pWrtShell->InsertFootnote("This is first footnote"); sal_uLong firstIndex = pShellCrsr->GetNode().GetIndex(); pShellCrsr->GotoFootnoteAnchor(); - pWrtShell->InsertFootnote(OUString("This is second footnote")); + pWrtShell->InsertFootnote("This is second footnote"); pWrtShell->Up(false); sal_uLong secondIndex = pShellCrsr->GetNode().GetIndex(); pWrtShell->Down(false); @@ -2525,13 +2525,13 @@ void SwUiWriterTest::testUnoCursorPointer() void SwUiWriterTest::testTextTableCellNames() { sal_Int32 nCol, nRow2; - SwXTextTable::GetCellPosition( OUString("z1"), nCol, nRow2); + SwXTextTable::GetCellPosition( "z1", nCol, nRow2); CPPUNIT_ASSERT(nCol == 51); - SwXTextTable::GetCellPosition( OUString("AA1"), nCol, nRow2); + SwXTextTable::GetCellPosition( "AA1", nCol, nRow2); CPPUNIT_ASSERT(nCol == 52); - SwXTextTable::GetCellPosition( OUString("AB1"), nCol, nRow2); + SwXTextTable::GetCellPosition( "AB1", nCol, nRow2); CPPUNIT_ASSERT(nCol == 53); - SwXTextTable::GetCellPosition( OUString("BB1"), nCol, nRow2); + SwXTextTable::GetCellPosition( "BB1", nCol, nRow2); CPPUNIT_ASSERT(nCol == 105); } diff --git a/sw/source/core/access/acccell.cxx b/sw/source/core/access/acccell.cxx index 294aaaae2cd8..f2f02bcf3c69 100644 --- a/sw/source/core/access/acccell.cxx +++ b/sw/source/core/access/acccell.cxx @@ -404,11 +404,11 @@ static OUString ReplaceOneChar(const OUString& oldOUString, const OUString& repl static OUString ReplaceFourChar(const OUString& oldOUString) { - OUString aRet = ReplaceOneChar(oldOUString,OUString("\\"),OUString("\\\\")); - aRet = ReplaceOneChar(aRet,OUString(";"),OUString("\\;")); - aRet = ReplaceOneChar(aRet,OUString("="),OUString("\\=")); - aRet = ReplaceOneChar(aRet,OUString(","),OUString("\\,")); - aRet = ReplaceOneChar(aRet,OUString(":"),OUString("\\:")); + OUString aRet = ReplaceOneChar(oldOUString,"\\","\\\\"); + aRet = ReplaceOneChar(aRet,";","\\;"); + aRet = ReplaceOneChar(aRet,"=","\\="); + aRet = ReplaceOneChar(aRet,",","\\,"); + aRet = ReplaceOneChar(aRet,":","\\:"); return aRet; } diff --git a/sw/source/core/bastyp/SwSmartTagMgr.cxx b/sw/source/core/bastyp/SwSmartTagMgr.cxx index 468bd72ce3b0..0f7c767ab3f2 100644 --- a/sw/source/core/bastyp/SwSmartTagMgr.cxx +++ b/sw/source/core/bastyp/SwSmartTagMgr.cxx @@ -34,7 +34,7 @@ SwSmartTagMgr& SwSmartTagMgr::Get() if ( !mpTheSwSmartTagMgr ) { mpTheSwSmartTagMgr = new SwSmartTagMgr( SwDocShell::Factory().GetModuleName() ); - mpTheSwSmartTagMgr->Init(OUString("Writer")); + mpTheSwSmartTagMgr->Init("Writer"); } return *mpTheSwSmartTagMgr; } diff --git a/sw/source/core/crsr/bookmrk.cxx b/sw/source/core/crsr/bookmrk.cxx index 76536daff6b6..6984040ba906 100644 --- a/sw/source/core/crsr/bookmrk.cxx +++ b/sw/source/core/crsr/bookmrk.cxx @@ -239,11 +239,11 @@ namespace sw { namespace mark { } UnoMark::UnoMark(const SwPaM& aPaM) - : MarkBase(aPaM, MarkBase::GenerateNewName(OUString("__UnoMark__"))) + : MarkBase(aPaM, MarkBase::GenerateNewName("__UnoMark__")) { } DdeBookmark::DdeBookmark(const SwPaM& aPaM) - : MarkBase(aPaM, MarkBase::GenerateNewName(OUString("__DdeLink__"))) + : MarkBase(aPaM, MarkBase::GenerateNewName("__DdeLink__")) , m_aRefObj(NULL) { } @@ -341,7 +341,7 @@ namespace sw { namespace mark } Fieldmark::Fieldmark(const SwPaM& rPaM) - : MarkBase(rPaM, MarkBase::GenerateNewName(OUString("__Fieldmark__"))) + : MarkBase(rPaM, MarkBase::GenerateNewName("__Fieldmark__")) { if(!IsExpanded()) SetOtherMarkPos(GetMarkPos()); diff --git a/sw/source/core/doc/docdraw.cxx b/sw/source/core/doc/docdraw.cxx index ae8aa932878b..af0cc62cc296 100644 --- a/sw/source/core/doc/docdraw.cxx +++ b/sw/source/core/doc/docdraw.cxx @@ -253,7 +253,7 @@ SwDrawContact* SwDoc::GroupSelection( SdrView& rDrawView ) pObj->NbcMove( Size( aAnchorPos.getX(), aAnchorPos.getY() ) ); } - pFormat = MakeDrawFrameFormat( OUString("DrawObject"), + pFormat = MakeDrawFrameFormat( "DrawObject", GetDfltFrameFormat() ); pFormat->SetFormatAttr( aAnch ); // #i36010# - set layout direction of the position diff --git a/sw/source/core/doc/docglbl.cxx b/sw/source/core/doc/docglbl.cxx index e479b538495c..60bb6193e658 100644 --- a/sw/source/core/doc/docglbl.cxx +++ b/sw/source/core/doc/docglbl.cxx @@ -202,11 +202,11 @@ bool SwDoc::SplitDoc( sal_uInt16 eDocType, const OUString& rPath, bool bOutline, switch( eDocType ) { case SPLITDOC_TO_HTML: - pFilter = SwIoSystem::GetFilterOfFormat(OUString("HTML")); + pFilter = SwIoSystem::GetFilterOfFormat("HTML"); break; default: - pFilter = SwIoSystem::GetFilterOfFormat(OUString(FILTER_XML)); + pFilter = SwIoSystem::GetFilterOfFormat(FILTER_XML); eDocType = SPLITDOC_TO_GLOBALDOC; break; } diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx index 56753aa183a5..17d6d25cb0a0 100644 --- a/sw/source/core/doc/notxtfrm.cxx +++ b/sw/source/core/doc/notxtfrm.cxx @@ -103,7 +103,7 @@ static void lcl_PaintReplacement( const SwRect &rRect, const OUString &rText, pFont = new vcl::Font(); pFont->SetWeight( WEIGHT_BOLD ); pFont->SetStyleName( OUString() ); - pFont->SetName(OUString("Arial Unicode")); + pFont->SetName("Arial Unicode"); pFont->SetFamily( FAMILY_SWISS ); pFont->SetTransparent( true ); } diff --git a/sw/source/core/draw/drawdoc.cxx b/sw/source/core/draw/drawdoc.cxx index b18f242face3..f463541d5b3d 100644 --- a/sw/source/core/draw/drawdoc.cxx +++ b/sw/source/core/draw/drawdoc.cxx @@ -120,7 +120,7 @@ SwDrawModel::~SwDrawModel() SdrPage* SwDrawModel::AllocPage(bool bMasterPage) { SwDPage* pPage = new SwDPage(*this, bMasterPage); - pPage->SetName(OUString("Controls")); + pPage->SetName("Controls"); return pPage; } diff --git a/sw/source/core/edit/edglss.cxx b/sw/source/core/edit/edglss.cxx index 5ffbdfcfa1b2..97b26356d61c 100644 --- a/sw/source/core/edit/edglss.cxx +++ b/sw/source/core/edit/edglss.cxx @@ -290,7 +290,7 @@ bool SwEditShell::GetSelectedText( OUString &rBuf, int nHndlParaBrk ) aStream.SetEndian( SvStreamEndian::LITTLE ); #endif WriterRef xWrt; - SwReaderWriter::GetWriter( OUString(FILTER_TEXT), OUString(), xWrt ); + SwReaderWriter::GetWriter( FILTER_TEXT, OUString(), xWrt ); if( xWrt.Is() ) { // write selected areas into a ASCII document diff --git a/sw/source/core/frmedt/fews.cxx b/sw/source/core/frmedt/fews.cxx index acb70a299b8d..98469a66155b 100644 --- a/sw/source/core/frmedt/fews.cxx +++ b/sw/source/core/frmedt/fews.cxx @@ -495,7 +495,7 @@ void SwFEShell::InsertLabel( const SwLabelType eType, const OUString &rText, con //put a hard-break after the graphic to keep it separated //from the caption text if the outer frame is resized SwIndex aIdx(pTxtNode, bBefore ? nInsertPos : 1); - pTxtNode->InsertText(OUString("\n"), aIdx); + pTxtNode->InsertText("\n", aIdx); } } diff --git a/sw/source/core/layout/newfrm.cxx b/sw/source/core/layout/newfrm.cxx index 5a703f9d6173..67ccf0243fc7 100644 --- a/sw/source/core/layout/newfrm.cxx +++ b/sw/source/core/layout/newfrm.cxx @@ -452,7 +452,7 @@ void InitCurrShells( SwRootFrm *pRoot ) |*/ SwRootFrm::SwRootFrm( SwFrameFormat *pFormat, SwViewShell * pSh ) : SwLayoutFrm( pFormat->GetDoc()->MakeFrameFormat( - OUString("Root"), pFormat ), 0 ), + "Root", pFormat ), 0 ), maPagesArea(), mnViewWidth( -1 ), mnColumns( 0 ), diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 69751e0de87f..3f6acc2547d6 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -7360,7 +7360,7 @@ const vcl::Font& SwPageFrm::GetEmptyPageFont() pEmptyPgFont->SetSize( Size( 0, 80 * 20 )); // == 80 pt pEmptyPgFont->SetWeight( WEIGHT_BOLD ); pEmptyPgFont->SetStyleName( aEmptyOUStr ); - pEmptyPgFont->SetName(OUString("Helvetica")); + pEmptyPgFont->SetName("Helvetica"); pEmptyPgFont->SetFamily( FAMILY_SWISS ); pEmptyPgFont->SetTransparent( true ); pEmptyPgFont->SetColor( COL_GRAY ); diff --git a/sw/source/core/swg/SwXMLSectionList.cxx b/sw/source/core/swg/SwXMLSectionList.cxx index c0dbb802a9e1..8027654bafae 100644 --- a/sw/source/core/swg/SwXMLSectionList.cxx +++ b/sw/source/core/swg/SwXMLSectionList.cxx @@ -36,10 +36,10 @@ SwXMLSectionList::SwXMLSectionList( : SvXMLImport( rContext, "" ), rSectionList ( rNewSectionList ) { - GetNamespaceMap().Add( OUString( sXML_np__office ), + GetNamespaceMap().Add( sXML_np__office, GetXMLToken(XML_N_OFFICE_OOO), XML_NAMESPACE_OFFICE ); - GetNamespaceMap().Add( OUString( sXML_np__text ), + GetNamespaceMap().Add( sXML_np__text, GetXMLToken(XML_N_TEXT_OOO), XML_NAMESPACE_TEXT ); } diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx index e0f4f64ed316..da59db9f6b88 100644 --- a/sw/source/core/text/EnhancedPDFExportHelper.cxx +++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx @@ -954,12 +954,12 @@ void SwTaggedPDFHelper::BeginNumberedListStructureElements() const bool bNewItemTag = bNewListTag || pTextNd->IsCountedInList(); // If the text node is not counted, we do not start a new list item: if ( bNewListTag ) - BeginTag( vcl::PDFWriter::List, OUString(aListString) ); + BeginTag( vcl::PDFWriter::List, aListString ); if ( bNewItemTag ) { - BeginTag( vcl::PDFWriter::ListItem, OUString(aListItemString) ); - BeginTag( vcl::PDFWriter::LIBody, OUString(aListBodyString) ); + BeginTag( vcl::PDFWriter::ListItem, aListItemString ); + BeginTag( vcl::PDFWriter::LIBody, aListBodyString ); } } @@ -1155,7 +1155,7 @@ void SwTaggedPDFHelper::BeginBlockStructureElements() if ( pTOXBase && TOX_INDEX != pTOXBase->GetType() ) { // Special case: Open additional TOCI tag: - BeginTag( vcl::PDFWriter::TOCI, OUString(aTOCIString) ); + BeginTag( vcl::PDFWriter::TOCI, aTOCIString ); } } } diff --git a/sw/source/core/txtnode/fntcap.cxx b/sw/source/core/txtnode/fntcap.cxx index ab0c97b88ae7..027e9ae2ae7e 100644 --- a/sw/source/core/txtnode/fntcap.cxx +++ b/sw/source/core/txtnode/fntcap.cxx @@ -296,7 +296,7 @@ void SwDoDrawCapital::DrawSpace( Point &rPos ) { rInf.ApplyAutoColor(); GetOut().DrawStretchText( aPos, nDiff, - OUString(" "), 0, 2 ); + " ", 0, 2 ); } rPos.X() = rInf.GetPos().X() + rInf.GetWidth(); } diff --git a/sw/source/core/undo/unins.cxx b/sw/source/core/undo/unins.cxx index e4ccc79c3fdd..0aa6fca8e03f 100644 --- a/sw/source/core/undo/unins.cxx +++ b/sw/source/core/undo/unins.cxx @@ -474,7 +474,7 @@ SwRewriter SwUndoInsert::GetRewriter() const if ( ! bDone ) { - aResult.AddRule(UndoArg1, OUString("??")); + aResult.AddRule(UndoArg1, "??"); } return aResult; diff --git a/sw/source/filter/basflt/fltini.cxx b/sw/source/filter/basflt/fltini.cxx index 5aa4b747f84f..ae2693af88a4 100644 --- a/sw/source/filter/basflt/fltini.cxx +++ b/sw/source/filter/basflt/fltini.cxx @@ -350,7 +350,7 @@ void CalculateFlySize(SfxItemSet& rFlySet, const SwNodeIndex& rAnchor, // if the first node don't contained any content, then // insert one char in it calc again and delete once again SwIndex aNdIdx( pFirstTextNd ); - pFirstTextNd->InsertText(OUString("MM"), aNdIdx); + pFirstTextNd->InsertText("MM", aNdIdx); sal_uLong nAbsMinCnts; pFirstTextNd->GetMinMaxSize( pFirstTextNd->GetIndex(), nMinFrm, nMaxFrm, nAbsMinCnts ); diff --git a/sw/source/filter/basflt/iodetect.cxx b/sw/source/filter/basflt/iodetect.cxx index 257f09cda84d..8421dedac9a2 100644 --- a/sw/source/filter/basflt/iodetect.cxx +++ b/sw/source/filter/basflt/iodetect.cxx @@ -120,13 +120,13 @@ bool SwIoSystem::IsValidStgFilter(SotStorage& rStg, const SfxFilter& rFilter) /* Bug 62703 - and also WinWord Docs w/o ClipBoardId! */ if (rFilter.GetUserData() == FILTER_WW8 || rFilter.GetUserData() == sWW6) { - bRet = (rStg.IsContained(OUString("0Table")) - || rStg.IsContained(OUString("1Table"))) + bRet = (rStg.IsContained("0Table") + || rStg.IsContained("1Table")) == (rFilter.GetUserData() == FILTER_WW8); if (bRet && !rFilter.IsAllowedAsTemplate()) { tools::SvRef<SotStorageStream> xRef = - rStg.OpenSotStream(OUString("WordDocument"), + rStg.OpenSotStream("WordDocument", STREAM_STD_READ | StreamMode::NOCREATE ); xRef->Seek(10); sal_uInt8 nByte; diff --git a/sw/source/filter/html/htmlcss1.cxx b/sw/source/filter/html/htmlcss1.cxx index 0b996e6f4cb3..de9604d2005d 100644 --- a/sw/source/filter/html/htmlcss1.cxx +++ b/sw/source/filter/html/htmlcss1.cxx @@ -224,7 +224,7 @@ void SwCSS1Parser::SetLinkCharFormats() OSL_ENSURE( !bLinkCharFormatsSet, "Aufruf von SetLinkCharFormats unnoetig" ); SvxCSS1MapEntry *pStyleEntry = - GetTag( OUString(OOO_STRING_SVTOOLS_HTML_anchor) ); + GetTag( OOO_STRING_SVTOOLS_HTML_anchor ); SwCharFormat *pUnvisited = 0, *pVisited = 0; if( pStyleEntry ) { diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 60a237a94289..fe4e5e9de740 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -1240,7 +1240,7 @@ void DocxAttributeOutput::EndRun() m_pSerializer->startElementNS( XML_w, XML_r, FSEND ); if(GetExport().m_bTabInTOC && m_pHyperlinkAttrList.is()) { - RunText(OUString("\t")) ; + RunText("\t") ; } m_pSerializer->mergeTopMarks(Tag_EndRun_1, sax_fastparser::MergeMarks::PREPEND); // merges with "postponed run start", see above @@ -1576,7 +1576,7 @@ void DocxAttributeOutput::CmdField_Impl( FieldInfos& rInfos ) // Replace tabs by </instrText><tab/><instrText> if ( i < ( nNbToken - 1 ) ) - RunText( OUString( "\t" ) ); + RunText( "\t" ); } m_pSerializer->endElementNS( XML_w, XML_r ); diff --git a/sw/source/filter/ww8/docxsdrexport.cxx b/sw/source/filter/ww8/docxsdrexport.cxx index 06023ee47e73..ba9c83905abf 100644 --- a/sw/source/filter/ww8/docxsdrexport.cxx +++ b/sw/source/filter/ww8/docxsdrexport.cxx @@ -1251,7 +1251,7 @@ void DocxSdrExport::writeDiagram(const SdrObject* sdrObject, const SwFrameFormat uno::Sequence< beans::StringPair >()); // write the associated Images and rels for data file - writeDiagramRels(dataDom, xDataRelSeq, xDataOutputStream, OUString("OOXDiagramDataRels"), nAnchorId); + writeDiagramRels(dataDom, xDataRelSeq, xDataOutputStream, "OOXDiagramDataRels", nAnchorId); // write layout file serializer.set(layoutDom, uno::UNO_QUERY); @@ -1288,7 +1288,7 @@ void DocxSdrExport::writeDiagram(const SdrObject* sdrObject, const SwFrameFormat // write the associated Images and rels for drawing file uno::Sequence< uno::Sequence< uno::Any > > xDrawingRelSeq; diagramDrawing[1] >>= xDrawingRelSeq; - writeDiagramRels(drawingDom, xDrawingRelSeq, xDrawingOutputStream, OUString("OOXDiagramDrawingRels"), nAnchorId); + writeDiagramRels(drawingDom, xDrawingRelSeq, xDrawingOutputStream, "OOXDiagramDrawingRels", nAnchorId); } } diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx index 39b8124248c3..434ec181c9db 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.cxx +++ b/sw/source/filter/ww8/rtfattributeoutput.cxx @@ -540,7 +540,7 @@ void RtfAttributeOutput::StartRuby(const SwTextNode& rNode, sal_Int32 /*nPos*/, void RtfAttributeOutput::EndRuby() { - m_rExport.OutputField(0, ww::eEQ, OUString(")"), WRITEFIELD_END | WRITEFIELD_CLOSE); + m_rExport.OutputField(0, ww::eEQ, ")", WRITEFIELD_END | WRITEFIELD_CLOSE); EndRun(); } diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx index 1e710a635cf9..1d4edb4852b4 100644 --- a/sw/source/filter/ww8/wrtw8sty.cxx +++ b/sw/source/filter/ww8/wrtw8sty.cxx @@ -2074,7 +2074,7 @@ bool WW8_WrPlcSubDoc::WriteGenericText( WW8Export& rWrt, sal_uInt8 nTTyp, // Additional paragraph containing a space to // assure that by WW created RTF from written WW8 // does not crash WW. - rWrt.WriteStringAsPara( OUString(" ") ); + rWrt.WriteStringAsPara( " " ); } } } diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index 45cfa7b3ac80..dfabbce26f5a 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -1535,7 +1535,7 @@ sal_uInt16 WW8Export::AddRedlineAuthor( sal_uInt16 nId ) if( !m_pRedlAuthors ) { m_pRedlAuthors = new WW8_WrtRedlineAuthor; - m_pRedlAuthors->AddName(OUString("Unknown")); + m_pRedlAuthors->AddName("Unknown"); } return m_pRedlAuthors->AddName( SW_MOD()->GetRedlineAuthor( nId ) ); } diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 4d56d1d4bb9a..fbf205375768 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -4883,7 +4883,7 @@ bool SwWW8ImplReader::ReadGlobalTemplateSettings( const OUString& sCreatedFrom, aBasicImporter.import( m_pDocShell->GetMedium()->GetInputStream() ); lcl_createTemplateToProjectEntry( xPrjNameCache, aURL, aBasicImporter.getProjectName() ); // Read toolbars & menus - tools::SvRef<SotStorageStream> refMainStream = rRoot->OpenSotStream( OUString( "WordDocument" )); + tools::SvRef<SotStorageStream> refMainStream = rRoot->OpenSotStream( "WordDocument"); refMainStream->SetEndian(SvStreamEndian::LITTLE); WW8Fib aWwFib( *refMainStream, 8 ); tools::SvRef<SotStorageStream> xTableStream = rRoot->OpenSotStream(OUString::createFromAscii( aWwFib.fWhichTableStm ? SL::a1Table : SL::a0Table), STREAM_STD_READ); @@ -6102,7 +6102,7 @@ sal_uLong WW8Reader::OpenMainStream( tools::SvRef<SotStorageStream>& rRef, sal_u { sal_uLong nRet = ERR_SWG_READ_ERROR; OSL_ENSURE( pStg, "Where is my Storage?" ); - rRef = pStg->OpenSotStream( OUString("WordDocument"), StreamMode::READ | StreamMode::SHARE_DENYALL); + rRef = pStg->OpenSotStream( "WordDocument", StreamMode::READ | StreamMode::SHARE_DENYALL); if( rRef.Is() ) { diff --git a/sw/source/filter/ww8/ww8par4.cxx b/sw/source/filter/ww8/ww8par4.cxx index f14fcbcb4149..a8f4856627a6 100644 --- a/sw/source/filter/ww8/ww8par4.cxx +++ b/sw/source/filter/ww8/ww8par4.cxx @@ -82,7 +82,7 @@ static bool SwWw8ReadScaling(long& rX, long& rY, tools::SvRef<SotStorage>& rSrc1 // 0x2c, 0x30 scaling x,y in per thousand // 0x34, 0x38, 0x3c, 0x40 Crop Left, Top, Right, Bot in tw - tools::SvRef<SotStorageStream> xSrc3 = rSrc1->OpenSotStream( OUString("\3PIC"), + tools::SvRef<SotStorageStream> xSrc3 = rSrc1->OpenSotStream( "\3PIC", STREAM_STD_READ | StreamMode::NOCREATE); SotStorageStream* pS = xSrc3; pS->SetEndian( SvStreamEndian::LITTLE ); @@ -127,7 +127,7 @@ static bool SwWw8ReadScaling(long& rX, long& rY, tools::SvRef<SotStorage>& rSrc1 static bool SwWw6ReadMetaStream(GDIMetaFile& rWMF, OLE_MFP* pMfp, tools::SvRef<SotStorage>& rSrc1) { - tools::SvRef<SotStorageStream> xSrc2 = rSrc1->OpenSotStream( OUString("\3META"), + tools::SvRef<SotStorageStream> xSrc2 = rSrc1->OpenSotStream( "\3META", STREAM_STD_READ | StreamMode::NOCREATE); SotStorageStream* pSt = xSrc2; pSt->SetEndian( SvStreamEndian::LITTLE ); @@ -181,7 +181,7 @@ static bool SwWw6ReadMetaStream(GDIMetaFile& rWMF, OLE_MFP* pMfp, static bool SwWw6ReadMacPICTStream(Graphic& rGraph, tools::SvRef<SotStorage>& rSrc1) { // 03-META-stream does not exist. Maybe a 03-PICT? - tools::SvRef<SotStorageStream> xSrc4 = rSrc1->OpenSotStream(OUString("\3PICT")); + tools::SvRef<SotStorageStream> xSrc4 = rSrc1->OpenSotStream("\3PICT"); SotStorageStream* pStp = xSrc4; pStp->SetEndian( SvStreamEndian::LITTLE ); sal_uInt8 aTestA[10]; // Does the 01Ole-stream even exist? @@ -423,7 +423,7 @@ SdrObject* SwWW8ImplReader::ImportOleBase( Graphic& rGraph, sal_Int64 nAspect = embed::Aspects::MSOLE_CONTENT; { - tools::SvRef<SotStorageStream> xObjInfoSrc = xSrc1->OpenSotStream(OUString("\3ObjInfo"), + tools::SvRef<SotStorageStream> xObjInfoSrc = xSrc1->OpenSotStream("\3ObjInfo", STREAM_STD_READ | StreamMode::NOCREATE ); if ( xObjInfoSrc.Is() && !xObjInfoSrc->GetError() ) { diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx index 865cbc488c63..595ab85ef7a5 100644 --- a/sw/source/filter/ww8/ww8par5.cxx +++ b/sw/source/filter/ww8/ww8par5.cxx @@ -1846,7 +1846,7 @@ eF_ResT SwWW8ImplReader::Read_F_Symbol( WW8FieldDesc*, OUString& rStr ) } else { - m_rDoc.getIDocumentContentOperations().InsertString(*m_pPaM, OUString("###")); + m_rDoc.getIDocumentContentOperations().InsertString(*m_pPaM, "###"); } return FLD_OK; diff --git a/sw/source/ui/dbui/mmoutputpage.cxx b/sw/source/ui/dbui/mmoutputpage.cxx index dbd3d81f2f28..11b7e5321a79 100644 --- a/sw/source/ui/dbui/mmoutputpage.cxx +++ b/sw/source/ui/dbui/mmoutputpage.cxx @@ -696,7 +696,7 @@ IMPL_LINK_TYPED(SwMailMergeOutputPage, SaveOutputHdl_Impl, Button*, pButton, voi INetURLObject(), utl::TempFile::CreateTempName(), URIHelper::GetMaybeFileHdl()); const SfxFilter *pSfxFlt = SwIoSystem::GetFilterOfFormat( - OUString( FILTER_XML ), + FILTER_XML, SwDocShell::Factory().GetFilterContainer() ); uno::Sequence< beans::PropertyValue > aValues(1); @@ -1008,14 +1008,14 @@ IMPL_LINK_TYPED(SwMailMergeOutputPage, SendDocumentsHdl_Impl, Button*, pButton, //Make sure we don't pick e.g. the flat xml filter //for this format pSfxFlt = SwIoSystem::GetFilterOfFormat( - OUString( FILTER_XML ), + FILTER_XML, SwDocShell::Factory().GetFilterContainer() ); } break; case MM_DOCTYPE_PDF: { pSfxFlt = pFilterContainer->GetFilter4FilterName( - OUString("writer_pdf_Export"), + "writer_pdf_Export", SfxFilterFlags::EXPORT); } break; @@ -1049,7 +1049,7 @@ IMPL_LINK_TYPED(SwMailMergeOutputPage, SendDocumentsHdl_Impl, Button*, pButton, { bAsBody = true; pSfxFlt = pFilterContainer->GetFilter4FilterName( - OUString("Text (encoded)"), SfxFilterFlags::EXPORT); + "Text (encoded)", SfxFilterFlags::EXPORT); } break; } @@ -1118,7 +1118,7 @@ IMPL_LINK_TYPED(SwMailMergeOutputPage, SendDocumentsHdl_Impl, Button*, pButton, INetURLObject(), utl::TempFile::CreateTempName(), URIHelper::GetMaybeFileHdl()); const SfxFilter *pTargetSfxFlt = SwIoSystem::GetFilterOfFormat( - OUString( FILTER_XML ), + FILTER_XML, SwDocShell::Factory().GetFilterContainer() ); uno::Sequence< beans::PropertyValue > aValues(1); diff --git a/sw/source/ui/envelp/labprt.cxx b/sw/source/ui/envelp/labprt.cxx index 026b2803e688..922e32592ac2 100644 --- a/sw/source/ui/envelp/labprt.cxx +++ b/sw/source/ui/envelp/labprt.cxx @@ -53,7 +53,7 @@ SwLabPrtPage::SwLabPrtPage(vcl::Window* pParent, const SfxItemSet& rSet) SvtCommandOptions aCmdOpts; if ( aCmdOpts.Lookup( SvtCommandOptions::CMDOPTION_DISABLED, - OUString( "Print" ) ) ) + "Print" ) ) { m_pPrinterFrame->Hide(); } diff --git a/sw/source/ui/fldui/fldtdlg.cxx b/sw/source/ui/fldui/fldtdlg.cxx index e0f3d9b94fe7..ca4a4fa7f0cb 100644 --- a/sw/source/ui/fldui/fldtdlg.cxx +++ b/sw/source/ui/fldui/fldtdlg.cxx @@ -78,8 +78,7 @@ SwFieldDlg::SwFieldDlg(SfxBindings* pB, SwChildWinWrapper* pCW, vcl::Window *pPa utl::OConfigurationTreeRoot aCfgRoot = utl::OConfigurationTreeRoot::createWithComponentContext( ::comphelper::getProcessComponentContext(), - OUString( - "/org.openoffice.Office.DataAccess/Policies/Features/Writer" ), + "/org.openoffice.Office.DataAccess/Policies/Features/Writer", -1, utl::OConfigurationTreeRoot::CM_READONLY); diff --git a/sw/source/ui/vba/vbaheaderfooter.cxx b/sw/source/ui/vba/vbaheaderfooter.cxx index f12ce3d9f7bf..b54a768dc1b8 100644 --- a/sw/source/ui/vba/vbaheaderfooter.cxx +++ b/sw/source/ui/vba/vbaheaderfooter.cxx @@ -62,7 +62,7 @@ uno::Reference< word::XRange > SAL_CALL SwVbaHeaderFooter::getRange() throw (uno } if( mnIndex == word::WdHeaderFooterIndex::wdHeaderFooterEvenPages ) { - sPropsNameText = sPropsNameText.concat( OUString("Left") ); + sPropsNameText = sPropsNameText.concat( "Left" ); } uno::Reference< text::XText > xText( mxPageStyleProps->getPropertyValue( sPropsNameText ), uno::UNO_QUERY_THROW ); diff --git a/sw/source/ui/vba/vbalisthelper.cxx b/sw/source/ui/vba/vbalisthelper.cxx index db788a8c5c39..73d35f6e0716 100644 --- a/sw/source/ui/vba/vbalisthelper.cxx +++ b/sw/source/ui/vba/vbalisthelper.cxx @@ -137,9 +137,9 @@ void SwVbaListHelper::CreateBulletListTemplate() throw( css::uno::RuntimeExcepti uno::Sequence< beans::PropertyValue > aPropertyValues; mxNumberingRules->getByIndex( nLevel ) >>= aPropertyValues; OUString sCharStyleName( "Bullet Symbols" ); - setOrAppendPropertyValue( aPropertyValues, OUString(UNO_NAME_CHAR_STYLE_NAME ), uno::makeAny( sCharStyleName ) ); + setOrAppendPropertyValue( aPropertyValues, UNO_NAME_CHAR_STYLE_NAME, uno::makeAny( sCharStyleName ) ); sal_Int16 nNumberingType = style::NumberingType::CHAR_SPECIAL; - setOrAppendPropertyValue( aPropertyValues, OUString(UNO_NAME_NUMBERING_TYPE ), uno::makeAny( nNumberingType ) ); + setOrAppendPropertyValue( aPropertyValues, UNO_NAME_NUMBERING_TYPE, uno::makeAny( nNumberingType ) ); OUString aBulletChar; switch( mnTemplateType ) @@ -185,7 +185,7 @@ void SwVbaListHelper::CreateBulletListTemplate() throw( css::uno::RuntimeExcepti throw css::uno::RuntimeException(); } } - setOrAppendPropertyValue( aPropertyValues, OUString(UNO_NAME_BULLET_CHAR ), uno::makeAny( aBulletChar ) ); + setOrAppendPropertyValue( aPropertyValues, UNO_NAME_BULLET_CHAR, uno::makeAny( aBulletChar ) ); mxNumberingRules->replaceByIndex( nLevel, uno::makeAny( aPropertyValues ) ); } @@ -249,8 +249,8 @@ void SwVbaListHelper::CreateNumberListTemplate() throw( css::uno::RuntimeExcepti throw css::uno::RuntimeException(); } } - setOrAppendPropertyValue( aPropertyValues, OUString(UNO_NAME_NUMBERING_TYPE ), uno::makeAny( nNumberingType ) ); - setOrAppendPropertyValue( aPropertyValues, OUString(UNO_NAME_SUFFIX ), uno::makeAny( sSuffix ) ); + setOrAppendPropertyValue( aPropertyValues, UNO_NAME_NUMBERING_TYPE, uno::makeAny( nNumberingType ) ); + setOrAppendPropertyValue( aPropertyValues, UNO_NAME_SUFFIX, uno::makeAny( sSuffix ) ); mxNumberingRules->replaceByIndex( nLevel, uno::makeAny( aPropertyValues ) ); } @@ -372,9 +372,9 @@ void SwVbaListHelper::CreateOutlineNumberForType1() throw( css::uno::RuntimeExce break; } } - setOrAppendPropertyValue( aPropertyValues, OUString(UNO_NAME_NUMBERING_TYPE ), uno::makeAny( nNumberingType ) ); - setOrAppendPropertyValue( aPropertyValues, OUString(UNO_NAME_PREFIX ), uno::makeAny( sPrefix ) ); - setOrAppendPropertyValue( aPropertyValues, OUString(UNO_NAME_SUFFIX ), uno::makeAny( sSuffix ) ); + setOrAppendPropertyValue( aPropertyValues, UNO_NAME_NUMBERING_TYPE, uno::makeAny( nNumberingType ) ); + setOrAppendPropertyValue( aPropertyValues, UNO_NAME_PREFIX, uno::makeAny( sPrefix ) ); + setOrAppendPropertyValue( aPropertyValues, UNO_NAME_SUFFIX, uno::makeAny( sSuffix ) ); mxNumberingRules->replaceByIndex( nLevel, uno::makeAny( aPropertyValues ) ); } } @@ -389,12 +389,12 @@ void SwVbaListHelper::CreateOutlineNumberForType2() throw( css::uno::RuntimeExce for( sal_Int32 nLevel = 0; nLevel < LIST_LEVEL_COUNT; nLevel++ ) { mxNumberingRules->getByIndex( nLevel ) >>= aPropertyValues; - setOrAppendPropertyValue( aPropertyValues, OUString(UNO_NAME_NUMBERING_TYPE ), uno::makeAny( nNumberingType ) ); - setOrAppendPropertyValue( aPropertyValues, OUString(UNO_NAME_SUFFIX ), uno::makeAny( sSuffix ) ); + setOrAppendPropertyValue( aPropertyValues, UNO_NAME_NUMBERING_TYPE, uno::makeAny( nNumberingType ) ); + setOrAppendPropertyValue( aPropertyValues, UNO_NAME_SUFFIX, uno::makeAny( sSuffix ) ); if( nLevel != 0 ) { nParentNumbering = sal_Int16( nLevel - 1 ); - setOrAppendPropertyValue( aPropertyValues, OUString(UNO_NAME_PARENT_NUMBERING ), uno::makeAny( nParentNumbering ) ); + setOrAppendPropertyValue( aPropertyValues, UNO_NAME_PARENT_NUMBERING, uno::makeAny( nParentNumbering ) ); } mxNumberingRules->replaceByIndex( nLevel, uno::makeAny( aPropertyValues ) ); } @@ -410,8 +410,8 @@ void SwVbaListHelper::CreateOutlineNumberForType3() throw( css::uno::RuntimeExce for( sal_Int32 nLevel = 0; nLevel < LIST_LEVEL_COUNT; nLevel++ ) { mxNumberingRules->getByIndex( nLevel ) >>= aPropertyValues; - setOrAppendPropertyValue( aPropertyValues, OUString(UNO_NAME_NUMBERING_TYPE ), uno::makeAny( nNumberingType ) ); - setOrAppendPropertyValue( aPropertyValues, OUString(UNO_NAME_CHAR_STYLE_NAME ), uno::makeAny( sCharStyleName ) ); + setOrAppendPropertyValue( aPropertyValues, UNO_NAME_NUMBERING_TYPE, uno::makeAny( nNumberingType ) ); + setOrAppendPropertyValue( aPropertyValues, UNO_NAME_CHAR_STYLE_NAME, uno::makeAny( sCharStyleName ) ); switch( nLevel ) { case 0: @@ -444,7 +444,7 @@ void SwVbaListHelper::CreateOutlineNumberForType3() throw( css::uno::RuntimeExce break; } } - setOrAppendPropertyValue( aPropertyValues, OUString(UNO_NAME_BULLET_CHAR ), uno::makeAny( aBulletChar ) ); + setOrAppendPropertyValue( aPropertyValues, UNO_NAME_BULLET_CHAR, uno::makeAny( aBulletChar ) ); mxNumberingRules->replaceByIndex( nLevel, uno::makeAny( aPropertyValues ) ); } } @@ -474,7 +474,7 @@ void SwVbaListHelper::CreateOutlineNumberForType4() throw( css::uno::RuntimeExce sPrefix.clear(); sSuffix = "."; sal_Int16 nParentNumbering = 0; - setOrAppendPropertyValue( aPropertyValues, OUString(UNO_NAME_PARENT_NUMBERING ), uno::makeAny( nParentNumbering ) ); + setOrAppendPropertyValue( aPropertyValues, UNO_NAME_PARENT_NUMBERING, uno::makeAny( nParentNumbering ) ); break; } case 2: @@ -527,9 +527,9 @@ void SwVbaListHelper::CreateOutlineNumberForType4() throw( css::uno::RuntimeExce break; } } - setOrAppendPropertyValue( aPropertyValues, OUString(UNO_NAME_NUMBERING_TYPE ), uno::makeAny( nNumberingType ) ); - setOrAppendPropertyValue( aPropertyValues, OUString(UNO_NAME_PREFIX ), uno::makeAny( sPrefix ) ); - setOrAppendPropertyValue( aPropertyValues, OUString(UNO_NAME_SUFFIX ), uno::makeAny( sSuffix ) ); + setOrAppendPropertyValue( aPropertyValues, UNO_NAME_NUMBERING_TYPE, uno::makeAny( nNumberingType ) ); + setOrAppendPropertyValue( aPropertyValues, UNO_NAME_PREFIX, uno::makeAny( sPrefix ) ); + setOrAppendPropertyValue( aPropertyValues, UNO_NAME_SUFFIX, uno::makeAny( sSuffix ) ); mxNumberingRules->replaceByIndex( nLevel, uno::makeAny( aPropertyValues ) ); } } @@ -543,11 +543,11 @@ void SwVbaListHelper::CreateOutlineNumberForType5() throw( css::uno::RuntimeExce for( sal_Int32 nLevel = 0; nLevel < LIST_LEVEL_COUNT; nLevel++ ) { mxNumberingRules->getByIndex( nLevel ) >>= aPropertyValues; - setOrAppendPropertyValue( aPropertyValues, OUString(UNO_NAME_NUMBERING_TYPE ), uno::makeAny( nNumberingType ) ); + setOrAppendPropertyValue( aPropertyValues, UNO_NAME_NUMBERING_TYPE, uno::makeAny( nNumberingType ) ); if( nLevel != 0 ) { nParentNumbering = sal_Int16( nLevel - 1 ); - setOrAppendPropertyValue( aPropertyValues, OUString(UNO_NAME_PARENT_NUMBERING ), uno::makeAny( nParentNumbering ) ); + setOrAppendPropertyValue( aPropertyValues, UNO_NAME_PARENT_NUMBERING, uno::makeAny( nParentNumbering ) ); } mxNumberingRules->replaceByIndex( nLevel, uno::makeAny( aPropertyValues ) ); } @@ -629,9 +629,9 @@ void SwVbaListHelper::CreateOutlineNumberForType6() throw( css::uno::RuntimeExce break; } } - setOrAppendPropertyValue( aPropertyValues, OUString(UNO_NAME_NUMBERING_TYPE ), uno::makeAny( nNumberingType ) ); - setOrAppendPropertyValue( aPropertyValues, OUString(UNO_NAME_PREFIX ), uno::makeAny( sPrefix ) ); - setOrAppendPropertyValue( aPropertyValues, OUString(UNO_NAME_SUFFIX ), uno::makeAny( sSuffix ) ); + setOrAppendPropertyValue( aPropertyValues, UNO_NAME_NUMBERING_TYPE, uno::makeAny( nNumberingType ) ); + setOrAppendPropertyValue( aPropertyValues, UNO_NAME_PREFIX, uno::makeAny( sPrefix ) ); + setOrAppendPropertyValue( aPropertyValues, UNO_NAME_SUFFIX, uno::makeAny( sSuffix ) ); mxNumberingRules->replaceByIndex( nLevel, uno::makeAny( aPropertyValues ) ); } } @@ -645,8 +645,8 @@ void SwVbaListHelper::CreateOutlineNumberForType7() throw( css::uno::RuntimeExce for( sal_Int32 nLevel = 0; nLevel < LIST_LEVEL_COUNT; nLevel++ ) { mxNumberingRules->getByIndex( nLevel ) >>= aPropertyValues; - setOrAppendPropertyValue( aPropertyValues, OUString(UNO_NAME_NUMBERING_TYPE ), uno::makeAny( nNumberingType ) ); - setOrAppendPropertyValue( aPropertyValues, OUString(UNO_NAME_PREFIX ), uno::makeAny( sPrefix ) ); + setOrAppendPropertyValue( aPropertyValues, UNO_NAME_NUMBERING_TYPE, uno::makeAny( nNumberingType ) ); + setOrAppendPropertyValue( aPropertyValues, UNO_NAME_PREFIX, uno::makeAny( sPrefix ) ); mxNumberingRules->replaceByIndex( nLevel, uno::makeAny( aPropertyValues ) ); } } diff --git a/sw/source/ui/vba/vbalistlevel.cxx b/sw/source/ui/vba/vbalistlevel.cxx index 1fe4f8fae34e..7b38e7ea5c59 100644 --- a/sw/source/ui/vba/vbalistlevel.cxx +++ b/sw/source/ui/vba/vbalistlevel.cxx @@ -39,7 +39,7 @@ SwVbaListLevel::~SwVbaListLevel() ::sal_Int32 SAL_CALL SwVbaListLevel::getAlignment() throw (uno::RuntimeException, std::exception) { sal_Int16 nAlignment = 0; - pListHelper->getPropertyValueWithNameAndLevel( mnLevel, OUString("Adjust") ) >>= nAlignment; + pListHelper->getPropertyValueWithNameAndLevel( mnLevel, "Adjust" ) >>= nAlignment; switch( nAlignment ) { case text::HoriOrientation::LEFT: @@ -90,7 +90,7 @@ void SAL_CALL SwVbaListLevel::setAlignment( ::sal_Int32 _alignment ) throw (uno: throw uno::RuntimeException(); } } - pListHelper->setPropertyValueWithNameAndLevel( mnLevel, OUString("Adjust"), uno::makeAny( nAlignment ) ); + pListHelper->setPropertyValueWithNameAndLevel( mnLevel, "Adjust", uno::makeAny( nAlignment ) ); } uno::Reference< ::ooo::vba::word::XFont > SAL_CALL SwVbaListLevel::getFont() throw (uno::RuntimeException, std::exception) @@ -135,8 +135,8 @@ float SAL_CALL SwVbaListLevel::getNumberPosition() throw (uno::RuntimeException, // indentAt + firstlineindent sal_Int32 nIndentAt = 0; sal_Int32 nFirstLineIndent = 0; - pListHelper->getPropertyValueWithNameAndLevel( mnLevel, OUString("IndentAt") ) >>= nIndentAt; - pListHelper->getPropertyValueWithNameAndLevel( mnLevel, OUString("FirstLineIndent") ) >>= nFirstLineIndent; + pListHelper->getPropertyValueWithNameAndLevel( mnLevel, "IndentAt" ) >>= nIndentAt; + pListHelper->getPropertyValueWithNameAndLevel( mnLevel, "FirstLineIndent" ) >>= nFirstLineIndent; sal_Int32 nResult = nIndentAt + nFirstLineIndent; @@ -148,16 +148,16 @@ void SAL_CALL SwVbaListLevel::setNumberPosition( float _numberposition ) throw ( sal_Int32 nNumberPosition = Millimeter::getInHundredthsOfOneMillimeter( _numberposition ); sal_Int32 nIndentAt = 0; - pListHelper->getPropertyValueWithNameAndLevel( mnLevel, OUString("IndentAt") ) >>= nIndentAt; + pListHelper->getPropertyValueWithNameAndLevel( mnLevel, "IndentAt" ) >>= nIndentAt; sal_Int32 nFirstLineIndent = nNumberPosition - nIndentAt; - pListHelper->setPropertyValueWithNameAndLevel( mnLevel, OUString("FirstLineIndent"), uno::makeAny( nFirstLineIndent ) ); + pListHelper->setPropertyValueWithNameAndLevel( mnLevel, "FirstLineIndent", uno::makeAny( nFirstLineIndent ) ); } ::sal_Int32 SAL_CALL SwVbaListLevel::getNumberStyle() throw (uno::RuntimeException, std::exception) { sal_Int16 nNumberingType = 0; - pListHelper->getPropertyValueWithNameAndLevel( mnLevel, OUString("NumberingType") ) >>= nNumberingType; + pListHelper->getPropertyValueWithNameAndLevel( mnLevel, "NumberingType" ) >>= nNumberingType; switch( nNumberingType ) { case style::NumberingType::CHAR_SPECIAL: @@ -289,7 +289,7 @@ void SAL_CALL SwVbaListLevel::setNumberStyle( ::sal_Int32 _numberstyle ) throw ( } } - pListHelper->setPropertyValueWithNameAndLevel( mnLevel, OUString("NumberingType"), uno::makeAny( nNumberingType ) ); + pListHelper->setPropertyValueWithNameAndLevel( mnLevel, "NumberingType", uno::makeAny( nNumberingType ) ); } ::sal_Int32 SAL_CALL SwVbaListLevel::getResetOnHigher() throw (uno::RuntimeException, std::exception) @@ -306,20 +306,20 @@ void SAL_CALL SwVbaListLevel::setResetOnHigher( ::sal_Int32 /*_resetonhigher*/ ) ::sal_Int32 SAL_CALL SwVbaListLevel::getStartAt() throw (uno::RuntimeException, std::exception) { sal_Int16 nStartWith = 0; - pListHelper->getPropertyValueWithNameAndLevel( mnLevel, OUString("StartWith") ) >>= nStartWith; + pListHelper->getPropertyValueWithNameAndLevel( mnLevel, "StartWith" ) >>= nStartWith; return nStartWith; } void SAL_CALL SwVbaListLevel::setStartAt( ::sal_Int32 _startat ) throw (uno::RuntimeException, std::exception) { sal_Int16 nStartWith = (sal_Int16)_startat; - pListHelper->setPropertyValueWithNameAndLevel( mnLevel, OUString("StartWith"), uno::makeAny( nStartWith ) ); + pListHelper->setPropertyValueWithNameAndLevel( mnLevel, "StartWith", uno::makeAny( nStartWith ) ); } float SAL_CALL SwVbaListLevel::getTabPosition() throw (uno::RuntimeException, std::exception) { sal_Int32 nTabPosition = 0; - pListHelper->getPropertyValueWithNameAndLevel( mnLevel, OUString("ListtabStopPosition") ) >>= nTabPosition; + pListHelper->getPropertyValueWithNameAndLevel( mnLevel, "ListtabStopPosition" ) >>= nTabPosition; return static_cast< float >( Millimeter::getInPoints( nTabPosition ) ); } @@ -327,14 +327,14 @@ float SAL_CALL SwVbaListLevel::getTabPosition() throw (uno::RuntimeException, st void SAL_CALL SwVbaListLevel::setTabPosition( float _tabposition ) throw (uno::RuntimeException, std::exception) { sal_Int32 nTabPosition = Millimeter::getInHundredthsOfOneMillimeter( _tabposition ); - pListHelper->setPropertyValueWithNameAndLevel( mnLevel, OUString("ListtabStopPosition"), uno::makeAny( nTabPosition ) ); + pListHelper->setPropertyValueWithNameAndLevel( mnLevel, "ListtabStopPosition", uno::makeAny( nTabPosition ) ); } float SAL_CALL SwVbaListLevel::getTextPosition() throw (uno::RuntimeException, std::exception) { // indentAt sal_Int32 nIndentAt = 0; - pListHelper->getPropertyValueWithNameAndLevel( mnLevel, OUString("IndentAt") ) >>= nIndentAt; + pListHelper->getPropertyValueWithNameAndLevel( mnLevel, "IndentAt" ) >>= nIndentAt; return static_cast< float >( Millimeter::getInPoints( nIndentAt ) ); } @@ -343,21 +343,21 @@ void SAL_CALL SwVbaListLevel::setTextPosition( float _textposition ) throw (uno: { sal_Int32 nIndentAt = 0; sal_Int32 nFirstLineIndent = 0; - pListHelper->getPropertyValueWithNameAndLevel( mnLevel, OUString("IndentAt") ) >>= nIndentAt; - pListHelper->getPropertyValueWithNameAndLevel( mnLevel, OUString("FirstLineIndent") ) >>= nFirstLineIndent; + pListHelper->getPropertyValueWithNameAndLevel( mnLevel, "IndentAt" ) >>= nIndentAt; + pListHelper->getPropertyValueWithNameAndLevel( mnLevel, "FirstLineIndent" ) >>= nFirstLineIndent; sal_Int32 nAlignedAt = nIndentAt + nFirstLineIndent; nIndentAt = Millimeter::getInHundredthsOfOneMillimeter( _textposition ); nFirstLineIndent = nAlignedAt - nIndentAt; - pListHelper->setPropertyValueWithNameAndLevel( mnLevel, OUString("IndentAt"), uno::makeAny( nIndentAt ) ); - pListHelper->setPropertyValueWithNameAndLevel( mnLevel, OUString("FirstLineIndent"), uno::makeAny( nFirstLineIndent ) ); + pListHelper->setPropertyValueWithNameAndLevel( mnLevel, "IndentAt", uno::makeAny( nIndentAt ) ); + pListHelper->setPropertyValueWithNameAndLevel( mnLevel, "FirstLineIndent", uno::makeAny( nFirstLineIndent ) ); } ::sal_Int32 SAL_CALL SwVbaListLevel::getTrailingCharacter() throw (uno::RuntimeException, std::exception) { sal_Int16 nLabelFollowedBy= 0; - pListHelper->getPropertyValueWithNameAndLevel( mnLevel, OUString("LabelFollowedBy") ) >>= nLabelFollowedBy; + pListHelper->getPropertyValueWithNameAndLevel( mnLevel, "LabelFollowedBy" ) >>= nLabelFollowedBy; return nLabelFollowedBy; } @@ -365,7 +365,7 @@ void SAL_CALL SwVbaListLevel::setTextPosition( float _textposition ) throw (uno: void SAL_CALL SwVbaListLevel::setTrailingCharacter( ::sal_Int32 _trailingcharacter ) throw (uno::RuntimeException, std::exception) { sal_Int16 nLabelFollowedBy = (sal_Int16)_trailingcharacter; - pListHelper->setPropertyValueWithNameAndLevel( mnLevel, OUString("LabelFollowedBy"), uno::makeAny( nLabelFollowedBy ) ); + pListHelper->setPropertyValueWithNameAndLevel( mnLevel, "LabelFollowedBy", uno::makeAny( nLabelFollowedBy ) ); } OUString diff --git a/sw/source/ui/vba/vbawrapformat.cxx b/sw/source/ui/vba/vbawrapformat.cxx index 243f7fc1e1c2..d31f5fd332ee 100644 --- a/sw/source/ui/vba/vbawrapformat.cxx +++ b/sw/source/ui/vba/vbawrapformat.cxx @@ -174,42 +174,42 @@ void SwVbaWrapFormat::setDistance( const OUString& sName, float _distance ) thro float SAL_CALL SwVbaWrapFormat::getDistanceTop() throw (uno::RuntimeException, std::exception) { - return getDistance( OUString("TopMargin") ); + return getDistance( "TopMargin" ); } void SAL_CALL SwVbaWrapFormat::setDistanceTop( float _distancetop ) throw (uno::RuntimeException, std::exception) { - setDistance( OUString("TopMargin"), _distancetop ); + setDistance( "TopMargin", _distancetop ); } float SAL_CALL SwVbaWrapFormat::getDistanceBottom() throw (uno::RuntimeException, std::exception) { - return getDistance( OUString("BottomMargin") ); + return getDistance( "BottomMargin" ); } void SAL_CALL SwVbaWrapFormat::setDistanceBottom( float _distancebottom ) throw (uno::RuntimeException, std::exception) { - setDistance( OUString("BottomMargin"), _distancebottom ); + setDistance( "BottomMargin", _distancebottom ); } float SAL_CALL SwVbaWrapFormat::getDistanceLeft() throw (uno::RuntimeException, std::exception) { - return getDistance( OUString("LeftMargin") ); + return getDistance( "LeftMargin" ); } void SAL_CALL SwVbaWrapFormat::setDistanceLeft( float _distanceleft ) throw (uno::RuntimeException, std::exception) { - setDistance( OUString("LeftMargin"), _distanceleft ); + setDistance( "LeftMargin", _distanceleft ); } float SAL_CALL SwVbaWrapFormat::getDistanceRight() throw (uno::RuntimeException, std::exception) { - return getDistance( OUString("RightMargin") ); + return getDistance( "RightMargin" ); } void SAL_CALL SwVbaWrapFormat::setDistanceRight( float _distanceright ) throw (uno::RuntimeException, std::exception) { - setDistance( OUString("RightMargin"), _distanceright ); + setDistance( "RightMargin", _distanceright ); } OUString diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx index 9cdaceec28fb..37304d230101 100644 --- a/sw/source/uibase/app/docsh.cxx +++ b/sw/source/uibase/app/docsh.cxx @@ -276,7 +276,7 @@ bool SwDocShell::ConvertFrom( SfxMedium& rMedium ) SW_MOD()->SetEmbeddedLoadSave( false ); - SetError( nErr, OUString( OSL_LOG_PREFIX ) ); + SetError( nErr, OSL_LOG_PREFIX ); bool bOk = !IsError( nErr ); if (bOk && !m_pDoc->IsInLoadAsynchron()) @@ -367,7 +367,7 @@ bool SwDocShell::Save() } SW_MOD()->SetEmbeddedLoadSave( false ); } - SetError( nErr ? nErr : nVBWarning, OUString( OSL_LOG_PREFIX ) ); + SetError( nErr ? nErr : nVBWarning, OSL_LOG_PREFIX ); SfxViewFrame *const pFrm = (m_pWrtShell) ? m_pWrtShell->GetView().GetViewFrame() : nullptr; @@ -519,7 +519,7 @@ bool SwDocShell::SaveAs( SfxMedium& rMedium ) m_pDoc->cleanupUnoCrsrTbl(); } - SetError( nErr ? nErr : nVBWarning, OUString( OSL_LOG_PREFIX ) ); + SetError( nErr ? nErr : nVBWarning, OSL_LOG_PREFIX ); return !IsError( nErr ); } @@ -573,7 +573,7 @@ bool SwDocShell::ConvertTo( SfxMedium& rMedium ) OSL_ENSURE( !xStg->GetError(), "No storage available for storing VBA macros!" ); if ( !xStg->GetError() ) { - nVBWarning = SaveOrDelMSVBAStorage( (SfxObjectShell&) *this, *xStg, bSave, OUString("Macros") ); + nVBWarning = SaveOrDelMSVBAStorage( (SfxObjectShell&) *this, *xStg, bSave, "Macros" ); xStg->Commit(); m_pDoc->SetContainsMSVBasic( true ); } @@ -603,7 +603,7 @@ bool SwDocShell::ConvertTo( SfxMedium& rMedium ) Sequence<OUString> aModNames = xLib->getElementNames(); if(aModNames.getLength()) { - SetError(WARN_SWG_HTML_NO_MACROS, OUString( OSL_LOG_PREFIX ) ); + SetError(WARN_SWG_HTML_NO_MACROS, OSL_LOG_PREFIX ); break; } } @@ -759,7 +759,7 @@ bool SwDocShell::ConvertTo( SfxMedium& rMedium ) } SW_MOD()->SetEmbeddedLoadSave( false ); - SetError( nErrno ? nErrno : nVBWarning, OUString( OSL_LOG_PREFIX ) ); + SetError( nErrno ? nErrno : nVBWarning, OSL_LOG_PREFIX ); if( !rMedium.IsStorage() ) rMedium.CloseOutStream(); diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx index 09c4b5fc55f1..dbe1d4f5df34 100644 --- a/sw/source/uibase/app/docsh2.cxx +++ b/sw/source/uibase/app/docsh2.cxx @@ -527,7 +527,7 @@ void SwDocShell::Execute(SfxRequest& rReq) bool bWeb = dynamic_cast< SwWebDocShell *>( this ) != nullptr; const SfxFilter *pOwnFlt = SwDocShell::Factory().GetFilterContainer()-> - GetFilter4FilterName(OUString("writer8")); + GetFilter4FilterName("writer8"); // make sure the default file format is also available if(bWeb) @@ -573,7 +573,7 @@ void SwDocShell::Execute(SfxRequest& rReq) bMerge = bool(nFlags & SfxTemplateFlags::MERGE_STYLES); aOpt.SetMerge( !bMerge ); - SetError( LoadStylesFromFile( aFileName, aOpt, false ), OUString( OSL_LOG_PREFIX )); + SetError( LoadStylesFromFile( aFileName, aOpt, false ), OSL_LOG_PREFIX); if ( !GetError() ) rReq.Done(); } @@ -594,7 +594,7 @@ void SwDocShell::Execute(SfxRequest& rReq) // 3 - file saved in non-HTML -> QueryBox to save as HTML const SfxFilter* pHtmlFlt = SwIoSystem::GetFilterOfFormat( - OUString("HTML"), + "HTML", SwWebDocShell::Factory().GetFilterContainer() ); bool bLocalHasName = HasName(); if(bLocalHasName) @@ -925,7 +925,7 @@ void SwDocShell::Execute(SfxRequest& rReq) { // for HTML there is only one filter!! pFlt = SwIoSystem::GetFilterOfFormat( - OUString("HTML"), + "HTML", SwWebDocShell::Factory().GetFilterContainer() ); nStrId = STR_LOAD_HTML_DOC; } @@ -933,7 +933,7 @@ void SwDocShell::Execute(SfxRequest& rReq) { // for Global-documents we now only offer the current one. pFlt = SwGlobalDocShell::Factory().GetFilterContainer()-> - GetFilter4Extension( OUString("odm") ); + GetFilter4Extension( "odm" ); nStrId = STR_LOAD_GLOBAL_DOC; } diff --git a/sw/source/uibase/app/docshini.cxx b/sw/source/uibase/app/docshini.cxx index c91b99d0bf0e..4fb66e70cc49 100644 --- a/sw/source/uibase/app/docshini.cxx +++ b/sw/source/uibase/app/docshini.cxx @@ -567,7 +567,7 @@ bool SwDocShell::Load( SfxMedium& rMedium ) UpdateFontList(); InitDrawModelAndDocShell(this, m_pDoc ? m_pDoc->getIDocumentDrawModelAccess().GetDrawModel() : 0); - SetError( nErr, OUString( OSL_LOG_PREFIX ) ); + SetError( nErr, OSL_LOG_PREFIX ); bRet = !IsError( nErr ); if (bRet && !m_pDoc->IsInLoadAsynchron() && @@ -616,7 +616,7 @@ bool SwDocShell::LoadFrom( SfxMedium& rMedium ) OSL_FAIL("Code removed!"); } - SetError( nErr, OUString( OSL_LOG_PREFIX ) ); + SetError( nErr, OSL_LOG_PREFIX ); bRet = !IsError( nErr ); } while( false ); diff --git a/sw/source/uibase/app/swdll.cxx b/sw/source/uibase/app/swdll.cxx index cff230ce9313..ae6862d2924d 100644 --- a/sw/source/uibase/app/swdll.cxx +++ b/sw/source/uibase/app/swdll.cxx @@ -102,12 +102,12 @@ SwDLL::SwDLL() SwModule* pModule = new SwModule( pWDocFact, pDocFact, pGlobDocFact ); *ppShlPtr = pModule; - pWDocFact->SetDocumentServiceName(OUString("com.sun.star.text.WebDocument")); + pWDocFact->SetDocumentServiceName("com.sun.star.text.WebDocument"); if (xOpt && xOpt->IsWriter()) { - pGlobDocFact->SetDocumentServiceName(OUString("com.sun.star.text.GlobalDocument")); - pDocFact->SetDocumentServiceName(OUString("com.sun.star.text.TextDocument")); + pGlobDocFact->SetDocumentServiceName("com.sun.star.text.GlobalDocument"); + pDocFact->SetDocumentServiceName("com.sun.star.text.TextDocument"); } // register SvDraw-Fields diff --git a/sw/source/uibase/app/swmodule.cxx b/sw/source/uibase/app/swmodule.cxx index 9be3159c792f..d2d99939dd50 100644 --- a/sw/source/uibase/app/swmodule.cxx +++ b/sw/source/uibase/app/swmodule.cxx @@ -169,7 +169,7 @@ SwModule::SwModule( SfxObjectFactory* pWebFact, m_pDragDrop( 0 ), m_pXSelection( 0 ) { - SetName( OUString("StarWriter") ); + SetName( "StarWriter" ); pSwResMgr = GetResMgr(); SvxErrorHandler::ensure(); m_pErrorHandler = new SfxErrorHandler( RID_SW_ERRHDL, diff --git a/sw/source/uibase/config/viewopt.cxx b/sw/source/uibase/config/viewopt.cxx index f7e22b4a8d0f..2f354fa54958 100644 --- a/sw/source/uibase/config/viewopt.cxx +++ b/sw/source/uibase/config/viewopt.cxx @@ -131,7 +131,7 @@ void SwViewOption::DrawRectPrinter( OutputDevice *pOut, sal_uInt16 SwViewOption::GetPostItsWidth( const OutputDevice *pOut ) { assert(pOut && "no Outdev"); - return sal_uInt16(pOut->GetTextWidth( OUString(aPostItStr ))); + return sal_uInt16(pOut->GetTextWidth( aPostItStr)); } void SwViewOption::PaintPostIts( OutputDevice *pOut, const SwRect &rRect, bool bIsScript ) diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx index 49446b9ed506..36c7a362c4c9 100644 --- a/sw/source/uibase/dbui/dbmgr.cxx +++ b/sw/source/uibase/dbui/dbmgr.cxx @@ -2836,7 +2836,7 @@ void SwDBManager::ExecuteFormLetter( SwWrtShell& rSh, //copy rSh to aTempFile OUString sTempURL; const SfxFilter *pSfxFlt = SwIoSystem::GetFilterOfFormat( - OUString(FILTER_XML), + FILTER_XML, SwDocShell::Factory().GetFilterContainer() ); try { diff --git a/sw/source/uibase/docvw/AnnotationWin.cxx b/sw/source/uibase/docvw/AnnotationWin.cxx index 17ab5200437c..ea9d50da3d1b 100644 --- a/sw/source/uibase/docvw/AnnotationWin.cxx +++ b/sw/source/uibase/docvw/AnnotationWin.cxx @@ -250,8 +250,8 @@ void SwAnnotationWin::InitAnswer(OutlinerParaObject* pText) if (!pText->GetTextObject().GetText(0).isEmpty()) GetOutlinerView()->GetEditView().InsertText(pText->GetTextObject()); else - GetOutlinerView()->InsertText(OUString("...")); - GetOutlinerView()->InsertText(OUString("\"\n")); + GetOutlinerView()->InsertText("..."); + GetOutlinerView()->InsertText("\"\n"); GetOutlinerView()->SetSelection(ESelection(0,0,EE_PARA_ALL,EE_TEXTPOS_ALL)); SfxItemSet aAnswerSet( DocView().GetDocShell()->GetPool() ); diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx index cac03184b213..58921faec742 100644 --- a/sw/source/uibase/shells/basesh.cxx +++ b/sw/source/uibase/shells/basesh.cxx @@ -1913,7 +1913,7 @@ SwBaseShell::SwBaseShell(SwView& rVw) : SwWrtShell& rWrtSh = rView.GetWrtShell(); SetPool(&rWrtSh.GetAttrPool()); - SetName(OUString("Base")); + SetName("Base"); rWrtSh.SetGrfArrivedLnk( LINK( this, SwBaseShell, GraphicArrivedHdl)); } diff --git a/sw/source/uibase/shells/beziersh.cxx b/sw/source/uibase/shells/beziersh.cxx index fb33ad4ea1d5..ef49f21f72fb 100644 --- a/sw/source/uibase/shells/beziersh.cxx +++ b/sw/source/uibase/shells/beziersh.cxx @@ -57,7 +57,7 @@ TYPEINIT1(SwBezierShell,SwBaseShell) SwBezierShell::SwBezierShell(SwView &_rView): SwBaseShell( _rView ) { - SetName(OUString("Bezier")); + SetName("Bezier"); SetHelpId(SW_BEZIERSHELL); SwWrtShell *pSh = &GetShell(); diff --git a/sw/source/uibase/shells/drawsh.cxx b/sw/source/uibase/shells/drawsh.cxx index 4cca4f1a4833..86df26664185 100644 --- a/sw/source/uibase/shells/drawsh.cxx +++ b/sw/source/uibase/shells/drawsh.cxx @@ -537,7 +537,7 @@ SwDrawShell::SwDrawShell(SwView &_rView) : SwDrawBaseShell(_rView) { SetHelpId(SW_DRAWSHELL); - SetName(OUString("Draw")); + SetName("Draw"); SfxShell::SetContextName(sfx2::sidebar::EnumContext::GetContextName(sfx2::sidebar::EnumContext::Context_Draw)); } diff --git a/sw/source/uibase/shells/drformsh.cxx b/sw/source/uibase/shells/drformsh.cxx index c4f36db3dd20..7fe17f17b6f2 100644 --- a/sw/source/uibase/shells/drformsh.cxx +++ b/sw/source/uibase/shells/drformsh.cxx @@ -250,7 +250,7 @@ SwDrawFormShell::SwDrawFormShell(SwView &_rView) : { SetHelpId(SW_DRAWFORMSHELL); GetShell().NoEdit(); - SetName(OUString("DrawForm")); + SetName("DrawForm"); SfxShell::SetContextName(sfx2::sidebar::EnumContext::GetContextName(sfx2::sidebar::EnumContext::Context_Form)); } diff --git a/sw/source/uibase/shells/drwtxtsh.cxx b/sw/source/uibase/shells/drwtxtsh.cxx index b98db0f16ae2..ff2c67e550c7 100644 --- a/sw/source/uibase/shells/drwtxtsh.cxx +++ b/sw/source/uibase/shells/drwtxtsh.cxx @@ -132,7 +132,7 @@ SwDrawTextShell::SwDrawTextShell(SwView &rV) : Init(); rSh.NoEdit(); - SetName(OUString("ObjectText")); + SetName("ObjectText"); SetHelpId(SW_DRWTXTSHELL); SfxShell::SetContextName(sfx2::sidebar::EnumContext::GetContextName(sfx2::sidebar::EnumContext::Context_DrawText)); } diff --git a/sw/source/uibase/shells/frmsh.cxx b/sw/source/uibase/shells/frmsh.cxx index ca15226035ce..0872981aa2be 100644 --- a/sw/source/uibase/shells/frmsh.cxx +++ b/sw/source/uibase/shells/frmsh.cxx @@ -929,7 +929,7 @@ void SwFrameShell::GetState(SfxItemSet& rSet) SwFrameShell::SwFrameShell(SwView &_rView) : SwBaseShell( _rView ) { - SetName(OUString("Frame")); + SetName("Frame"); SetHelpId(SW_FRAMESHELL); // #96392# Use this to announce it is the frame shell who creates the selection. diff --git a/sw/source/uibase/shells/grfsh.cxx b/sw/source/uibase/shells/grfsh.cxx index a64baf5692ef..bc681b588b02 100644 --- a/sw/source/uibase/shells/grfsh.cxx +++ b/sw/source/uibase/shells/grfsh.cxx @@ -938,7 +938,7 @@ SwGrfShell::~SwGrfShell() SwGrfShell::SwGrfShell(SwView &_rView) : SwBaseShell(_rView) { - SetName(OUString("Graphic")); + SetName("Graphic"); SetHelpId(SW_GRFSHELL); SfxShell::SetContextName(sfx2::sidebar::EnumContext::GetContextName(sfx2::sidebar::EnumContext::Context_Graphic)); } diff --git a/sw/source/uibase/shells/listsh.cxx b/sw/source/uibase/shells/listsh.cxx index 4d02524c75ce..0ec00e554c19 100644 --- a/sw/source/uibase/shells/listsh.cxx +++ b/sw/source/uibase/shells/listsh.cxx @@ -274,7 +274,7 @@ void SwListShell::GetState(SfxItemSet &rSet) SwListShell::SwListShell(SwView &_rView) : SwBaseShell(_rView) { - SetName(OUString("List")); + SetName("List"); SetHelpId(SW_LISTSHELL); } diff --git a/sw/source/uibase/shells/mediash.cxx b/sw/source/uibase/shells/mediash.cxx index 415f6cbd5524..6afb7f525ccf 100644 --- a/sw/source/uibase/shells/mediash.cxx +++ b/sw/source/uibase/shells/mediash.cxx @@ -190,7 +190,7 @@ SwMediaShell::SwMediaShell(SwView &_rView) : SwBaseShell(_rView) { - SetName(OUString("Media Playback")); + SetName("Media Playback"); SetHelpId(SW_MEDIASHELL); SfxShell::SetContextName(sfx2::sidebar::EnumContext::GetContextName(sfx2::sidebar::EnumContext::Context_Media)); } diff --git a/sw/source/uibase/shells/navsh.cxx b/sw/source/uibase/shells/navsh.cxx index c3c37391fda2..8b0283e92a70 100644 --- a/sw/source/uibase/shells/navsh.cxx +++ b/sw/source/uibase/shells/navsh.cxx @@ -38,7 +38,7 @@ void SwNavigationShell::InitInterface_Impl() SwNavigationShell::SwNavigationShell(SwView &_rView) : SwBaseShell( _rView ) { - SetName(OUString("Navigation")); + SetName("Navigation"); SetHelpId(SW_NAVIGATIONSHELL); } diff --git a/sw/source/uibase/shells/olesh.cxx b/sw/source/uibase/shells/olesh.cxx index f0e3fe68d7d2..f14e39db5454 100644 --- a/sw/source/uibase/shells/olesh.cxx +++ b/sw/source/uibase/shells/olesh.cxx @@ -50,7 +50,7 @@ SwOleShell::SwOleShell(SwView &_rView) : SwFrameShell(_rView) { - SetName(OUString("Object")); + SetName("Object"); SetHelpId(SW_OLESHELL); SfxShell::SetContextName(sfx2::sidebar::EnumContext::GetContextName(sfx2::sidebar::EnumContext::Context_OLE)); } diff --git a/sw/source/uibase/shells/tabsh.cxx b/sw/source/uibase/shells/tabsh.cxx index 0cb89f9b01bf..37084876810d 100644 --- a/sw/source/uibase/shells/tabsh.cxx +++ b/sw/source/uibase/shells/tabsh.cxx @@ -1377,7 +1377,7 @@ void SwTableShell::GetState(SfxItemSet &rSet) SwTableShell::SwTableShell(SwView &_rView) : SwBaseShell(_rView) { - SetName(OUString("Table")); + SetName("Table"); SetHelpId(SW_TABSHELL); SfxShell::SetContextName(sfx2::sidebar::EnumContext::GetContextName(sfx2::sidebar::EnumContext::Context_Table)); } diff --git a/sw/source/uibase/shells/textsh.cxx b/sw/source/uibase/shells/textsh.cxx index 0c254c7b2fa2..8c65f71359fd 100644 --- a/sw/source/uibase/shells/textsh.cxx +++ b/sw/source/uibase/shells/textsh.cxx @@ -928,7 +928,7 @@ void SwTextShell::ExecRotateTransliteration( SfxRequest & rReq ) SwTextShell::SwTextShell(SwView &_rView) : SwBaseShell(_rView), pPostItFieldMgr( 0 ) { - SetName(OUString("Text")); + SetName("Text"); SetHelpId(SW_TEXTSHELL); SfxShell::SetContextName(sfx2::sidebar::EnumContext::GetContextName(sfx2::sidebar::EnumContext::Context_Text)); } diff --git a/sw/source/uibase/uiview/pview.cxx b/sw/source/uibase/uiview/pview.cxx index 2a9018834aeb..7535940181ea 100644 --- a/sw/source/uibase/uiview/pview.cxx +++ b/sw/source/uibase/uiview/pview.cxx @@ -1192,7 +1192,7 @@ SwPagePreview::SwPagePreview(SfxViewFrame *pViewFrame, SfxViewShell* pOldSh): mbResetFormDesignMode( false ), mbFormDesignModeToReset( false ) { - SetName(OUString("PageView" )); + SetName("PageView"); SetWindow( pViewWin ); SetHelpId(SW_PAGEPREVIEW); _CreateScrollbar( true ); diff --git a/sw/source/uibase/uiview/srcview.cxx b/sw/source/uibase/uiview/srcview.cxx index fe991822fab2..eb66d8ac5fa5 100644 --- a/sw/source/uibase/uiview/srcview.cxx +++ b/sw/source/uibase/uiview/srcview.cxx @@ -257,7 +257,7 @@ void SwSrcView::SaveContentTo(SfxMedium& rMed) void SwSrcView::Init() { SetHelpId(SW_SRC_VIEWSHELL); - SetName(OUString("Source")); + SetName("Source"); SetWindow( aEditWin.get() ); SwDocShell* pDocShell = GetDocShell(); // If the doc is still loading, then the DocShell must fire up @@ -306,7 +306,7 @@ void SwSrcView::Execute(SfxRequest& rReq) // search for an html filter for export SfxFilterContainer* pFilterCont = GetObjectShell()->GetFactory().GetFilterContainer(); const SfxFilter* pFilter = - pFilterCont->GetFilter4Extension( OUString("html"), SfxFilterFlags::EXPORT ); + pFilterCont->GetFilter4Extension( "html", SfxFilterFlags::EXPORT ); if ( pFilter ) { // filter found -> use its uiname and wildcard diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx index 4eb4d60596c3..7dd9064caad0 100644 --- a/sw/source/uibase/uiview/view.cxx +++ b/sw/source/uibase/uiview/view.cxx @@ -737,7 +737,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh ) _CreateScrollbar( false ); m_pViewImpl = new SwView_Impl(this); - SetName(OUString("View")); + SetName("View"); SetWindow( m_pEditWin ); m_aTimer.SetTimeout( 120 ); diff --git a/sw/source/uibase/uno/unomailmerge.cxx b/sw/source/uibase/uno/unomailmerge.cxx index 5655b9b4e26d..2dde9d41362b 100644 --- a/sw/source/uibase/uno/unomailmerge.cxx +++ b/sw/source/uibase/uno/unomailmerge.cxx @@ -775,7 +775,7 @@ uno::Any SAL_CALL SwXMailMerge::execute( // save document with temporary filename const SfxFilter *pSfxFlt = SwIoSystem::GetFilterOfFormat( - OUString( FILTER_XML ), + FILTER_XML, SwDocShell::Factory().GetFilterContainer() ); OUString aExtension(comphelper::string::stripStart(pSfxFlt->GetDefaultExtension(), '*')); utl::TempFile aTempFile( "SwMM", true, &aExtension ); diff --git a/sw/source/uibase/uno/unomod.cxx b/sw/source/uibase/uno/unomod.cxx index 57fba72ea608..2971c05d25c4 100644 --- a/sw/source/uibase/uno/unomod.cxx +++ b/sw/source/uibase/uno/unomod.cxx @@ -554,7 +554,7 @@ SwXViewSettings::SwXViewSettings(bool bWebView, SwView* pVw) { // This property only exists if we have a view (ie, not at the module ) if ( !pView ) - mpInfo->remove ( OUString ( "HelpURL" ) ); + mpInfo->remove ( "HelpURL" ); } diff --git a/sw/source/uibase/web/wgrfsh.cxx b/sw/source/uibase/web/wgrfsh.cxx index 58a32bd39b27..5994df559fd5 100644 --- a/sw/source/uibase/web/wgrfsh.cxx +++ b/sw/source/uibase/web/wgrfsh.cxx @@ -56,7 +56,7 @@ SwWebGrfShell::SwWebGrfShell(SwView &_rView) : SwGrfShell(_rView) { - SetName(OUString("Graphic")); + SetName("Graphic"); SetHelpId(SW_GRFSHELL); } diff --git a/sw/source/uibase/web/wlistsh.cxx b/sw/source/uibase/web/wlistsh.cxx index e41c8ad5b8be..65397e033dad 100644 --- a/sw/source/uibase/web/wlistsh.cxx +++ b/sw/source/uibase/web/wlistsh.cxx @@ -49,7 +49,7 @@ TYPEINIT1(SwWebListShell,SwListShell) SwWebListShell::SwWebListShell(SwView &_rView) : SwListShell(_rView) { - SetName(OUString("List")); + SetName("List"); SetHelpId(SW_LISTSHELL); } diff --git a/sw/source/uibase/web/wolesh.cxx b/sw/source/uibase/web/wolesh.cxx index 01c03a1c7255..d6afecc0ddc6 100644 --- a/sw/source/uibase/web/wolesh.cxx +++ b/sw/source/uibase/web/wolesh.cxx @@ -48,7 +48,7 @@ SwWebOleShell::SwWebOleShell(SwView &_rView) : SwOleShell(_rView) { - SetName(OUString("Object")); + SetName("Object"); SetHelpId(SW_OLESHELL); } diff --git a/sw/source/uibase/web/wtabsh.cxx b/sw/source/uibase/web/wtabsh.cxx index a50e56617ca7..f6578e83f6df 100644 --- a/sw/source/uibase/web/wtabsh.cxx +++ b/sw/source/uibase/web/wtabsh.cxx @@ -56,7 +56,7 @@ SwWebTableShell::SwWebTableShell(SwView &_rView) : SwTableShell(_rView) { GetShell().UpdateTable(); - SetName(OUString("Table")); + SetName("Table"); SetHelpId(SW_TABSHELL); } diff --git a/sw/source/uibase/wrtsh/wrtsh2.cxx b/sw/source/uibase/wrtsh/wrtsh2.cxx index 6e52a5ee8a1e..42fc249e9888 100644 --- a/sw/source/uibase/wrtsh/wrtsh2.cxx +++ b/sw/source/uibase/wrtsh/wrtsh2.cxx @@ -508,7 +508,7 @@ void LoadURL( SwViewShell& rVSh, const OUString& rURL, sal_uInt16 nFilter, SfxBoolItem aBrowse( SID_BROWSE, true ); if( nFilter & URLLOAD_NEWVIEW ) - aTargetFrameName.SetValue( OUString("_blank") ); + aTargetFrameName.SetValue( "_blank" ); const SfxPoolItem* aArr[] = { &aName, |