diff options
author | Arnaud Versini <arnaud.versini@gmail.com> | 2017-05-02 13:04:17 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-05-04 08:39:18 +0200 |
commit | 1fdb0e1897b063c7a0f29ed5a0de440ea057b2ed (patch) | |
tree | c3b81991090cefd9468fe0d3dced9da6fb073971 /sw/qa | |
parent | 0025fc13d805751f8eeb14febbdd0033e0a6d91e (diff) |
Replace all OUString("") with OUString()
Change-Id: Ie14c4d76cb61cfbe0410103adfc1afc8ade0f3e0
Reviewed-on: https://gerrit.libreoffice.org/37146
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/qa')
-rw-r--r-- | sw/qa/core/macros-test.cxx | 4 | ||||
-rw-r--r-- | sw/qa/extras/htmlimport/htmlimport.cxx | 4 | ||||
-rw-r--r-- | sw/qa/extras/mailmerge/mailmerge.cxx | 4 | ||||
-rw-r--r-- | sw/qa/extras/odfexport/odfexport.cxx | 10 | ||||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport8.cxx | 2 | ||||
-rw-r--r-- | sw/qa/extras/rtfexport/rtfexport.cxx | 6 | ||||
-rw-r--r-- | sw/qa/extras/rtfimport/rtfimport.cxx | 2 | ||||
-rw-r--r-- | sw/qa/extras/uiwriter/uiwriter.cxx | 12 | ||||
-rw-r--r-- | sw/qa/extras/ww8export/ww8export.cxx | 10 |
9 files changed, 27 insertions, 27 deletions
diff --git a/sw/qa/core/macros-test.cxx b/sw/qa/core/macros-test.cxx index ed2324a62053..8ac5c15946ea 100644 --- a/sw/qa/core/macros-test.cxx +++ b/sw/qa/core/macros-test.cxx @@ -563,7 +563,7 @@ void SwMacrosTest::testFindReplace() opts, false, SwDocPositions::Curr, SwDocPositions::End, bCancel); CPPUNIT_ASSERT(bFound); CPPUNIT_ASSERT(pPaM->HasMark()); - CPPUNIT_ASSERT_EQUAL(OUString(""), pPaM->GetText()); + CPPUNIT_ASSERT_EQUAL(OUString(), pPaM->GetText()); // now do another Find, inside the selection from the first Find // opts.searchFlags = 71680; @@ -571,7 +571,7 @@ void SwMacrosTest::testFindReplace() opts, false, SwDocPositions::Curr, SwDocPositions::End, bCancel, FindRanges::InSel); CPPUNIT_ASSERT(bFound); CPPUNIT_ASSERT(pPaM->HasMark()); - CPPUNIT_ASSERT_EQUAL(OUString(""), pPaM->GetText()); + CPPUNIT_ASSERT_EQUAL(OUString(), pPaM->GetText()); rIDCO.ReplaceRange(*pPaM, " ", true); diff --git a/sw/qa/extras/htmlimport/htmlimport.cxx b/sw/qa/extras/htmlimport/htmlimport.cxx index b04f7c927b70..216b7f42f12c 100644 --- a/sw/qa/extras/htmlimport/htmlimport.cxx +++ b/sw/qa/extras/htmlimport/htmlimport.cxx @@ -106,7 +106,7 @@ DECLARE_HTMLIMPORT_TEST(testInlinedImagesPageAndParagraph, "PageAndParagraphFill // due to being loaded embedded. BitmapMode is repeat. uno::Reference<beans::XPropertySet> xPageProperties1(getStyles("PageStyles")->getByName("HTML"), uno::UNO_QUERY); CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_BITMAP, getProperty<drawing::FillStyle>(xPageProperties1, "FillStyle")); - CPPUNIT_ASSERT_EQUAL(OUString(""), getProperty<OUString>(xPageProperties1, "FillBitmapName")); + CPPUNIT_ASSERT_EQUAL(OUString(), getProperty<OUString>(xPageProperties1, "FillBitmapName")); CPPUNIT_ASSERT_EQUAL(drawing::BitmapMode_REPEAT, getProperty<drawing::BitmapMode>(xPageProperties1, "FillBitmapMode")); // we should have one paragraph @@ -121,7 +121,7 @@ DECLARE_HTMLIMPORT_TEST(testInlinedImagesPageAndParagraph, "PageAndParagraphFill // check for Bitmap FillStyle, name empty, repeat CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_BITMAP, getProperty<drawing::FillStyle>(xParagraphProperties, "FillStyle")); - CPPUNIT_ASSERT_EQUAL(OUString(""), getProperty<OUString>(xParagraphProperties, "FillBitmapName")); + CPPUNIT_ASSERT_EQUAL(OUString(), getProperty<OUString>(xParagraphProperties, "FillBitmapName")); CPPUNIT_ASSERT_EQUAL(drawing::BitmapMode_REPEAT, getProperty<drawing::BitmapMode>(xParagraphProperties, "FillBitmapMode")); } } diff --git a/sw/qa/extras/mailmerge/mailmerge.cxx b/sw/qa/extras/mailmerge/mailmerge.cxx index a8f55d9cafdf..9a6c23d1dbdd 100644 --- a/sw/qa/extras/mailmerge/mailmerge.cxx +++ b/sw/qa/extras/mailmerge/mailmerge.cxx @@ -440,13 +440,13 @@ DECLARE_FILE_MAILMERGE_TEST(test2Pages, "simple-mail-merge-2pages.odt", "10-test CPPUNIT_ASSERT_EQUAL( OUString( "Fixed text." ), getRun( getParagraph( 1 ), 1 )->getString()); CPPUNIT_ASSERT_EQUAL( lastname, getRun( getParagraph( 2 ), 1 )->getString()); CPPUNIT_ASSERT_EQUAL( OUString( "Another fixed text." ), getRun( getParagraph( 3 ), 1 )->getString()); - CPPUNIT_ASSERT_EQUAL( OUString( "" ), getRun( getParagraph( 4 ), 1 )->getString()); // empty para at the end of page 1 + CPPUNIT_ASSERT_EQUAL( OUString(), getRun( getParagraph( 4 ), 1 )->getString()); // empty para at the end of page 1 CPPUNIT_ASSERT_EQUAL( OUString( "Second page." ), getRun( getParagraph( 5 ), 1 )->getString()); CPPUNIT_ASSERT_EQUAL( firstname, getRun( getParagraph( 6 ), 1 )->getString()); // Also verify the layout. CPPUNIT_ASSERT_EQUAL( lastname, parseDump("/root/page[1]/body/txt[2]/Special", "rText")); CPPUNIT_ASSERT_EQUAL( OUString( "Fixed text." ), parseDump("/root/page[1]/body/txt[1]", "")); - CPPUNIT_ASSERT_EQUAL( OUString( "" ), parseDump("/root/page[1]/body/txt[4]", "")); + CPPUNIT_ASSERT_EQUAL( OUString(), parseDump("/root/page[1]/body/txt[4]", "")); CPPUNIT_ASSERT_EQUAL( OUString( "Second page." ), parseDump("/root/page[2]/body/txt[1]", "")); CPPUNIT_ASSERT_EQUAL( firstname, parseDump("/root/page[2]/body/txt[2]/Special", "rText")); } diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx index 2110f549031e..a8a8812508b5 100644 --- a/sw/qa/extras/odfexport/odfexport.cxx +++ b/sw/qa/extras/odfexport/odfexport.cxx @@ -863,14 +863,14 @@ DECLARE_ODFEXPORT_TEST(testWhitespace, "whitespace.odt") CPPUNIT_ASSERT_EQUAL(OUString("X "), xPortion->getString()); xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); CPPUNIT_ASSERT_EQUAL(OUString("Ruby"), getProperty<OUString>(xPortion, "TextPortionType")); - CPPUNIT_ASSERT_EQUAL(OUString(""), xPortion->getString()); + CPPUNIT_ASSERT_EQUAL(OUString(), xPortion->getString()); CPPUNIT_ASSERT_EQUAL(OUString("foo"), getProperty<OUString>(xPortion, "RubyText")); xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); CPPUNIT_ASSERT_EQUAL(OUString("Text"), getProperty<OUString>(xPortion, "TextPortionType")); CPPUNIT_ASSERT_EQUAL(OUString(" "), xPortion->getString()); xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); CPPUNIT_ASSERT_EQUAL(OUString("Ruby"), getProperty<OUString>(xPortion, "TextPortionType")); - CPPUNIT_ASSERT_EQUAL(OUString(""), xPortion->getString()); + CPPUNIT_ASSERT_EQUAL(OUString(), xPortion->getString()); xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); CPPUNIT_ASSERT_EQUAL(OUString("Text"), getProperty<OUString>(xPortion, "TextPortionType")); CPPUNIT_ASSERT_EQUAL(OUString(" X"), xPortion->getString()); @@ -1318,7 +1318,7 @@ DECLARE_ODFEXPORT_TEST(testTableStyles2, "table_styles_2.odt") xCell1Style->getPropertyValue("CharFontName") >>= sString; CPPUNIT_ASSERT_EQUAL(OUString("Courier"), sString); xCell1Style->getPropertyValue("CharFontStyleName") >>= sString; - CPPUNIT_ASSERT_EQUAL(OUString(""), sString); + CPPUNIT_ASSERT_EQUAL(OUString(), sString); xCell1Style->getPropertyValue("CharFontFamily") >>= nInt16; CPPUNIT_ASSERT_EQUAL(sal_Int16(2), nInt16); xCell1Style->getPropertyValue("CharFontPitch") >>= nInt16; @@ -1379,7 +1379,7 @@ DECLARE_ODFEXPORT_TEST(testTableStyles2, "table_styles_2.odt") xCell1Style->getPropertyValue("CharFontName") >>= sString; CPPUNIT_ASSERT_EQUAL(OUString("Liberation Serif"), sString); xCell1Style->getPropertyValue("CharFontStyleName") >>= sString; - CPPUNIT_ASSERT_EQUAL(OUString(""), sString); + CPPUNIT_ASSERT_EQUAL(OUString(), sString); xCell1Style->getPropertyValue("CharFontFamily") >>= nInt16; CPPUNIT_ASSERT_EQUAL(sal_Int16(3), nInt16); xCell1Style->getPropertyValue("CharFontPitch") >>= nInt16; @@ -1440,7 +1440,7 @@ DECLARE_ODFEXPORT_TEST(testTableStyles2, "table_styles_2.odt") xCell1Style->getPropertyValue("CharFontName") >>= sString; CPPUNIT_ASSERT_EQUAL(OUString("Open Sans"), sString); xCell1Style->getPropertyValue("CharFontStyleName") >>= sString; - CPPUNIT_ASSERT_EQUAL(OUString(""), sString); + CPPUNIT_ASSERT_EQUAL(OUString(), sString); xCell1Style->getPropertyValue("CharFontFamily") >>= nInt16; CPPUNIT_ASSERT_EQUAL(sal_Int16(0), nInt16); xCell1Style->getPropertyValue("CharFontPitch") >>= nInt16; diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx index 612656cde2ec..9fdad718157e 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx @@ -1789,7 +1789,7 @@ DECLARE_OOXMLEXPORT_TEST(testFdo85542, "fdo85542.docx") // B3 -- testing a collapsed bookmark uno::Reference<text::XTextContent> xContent3(xBookmarksByName->getByName("B3"), uno::UNO_QUERY); uno::Reference<text::XTextRange> xRange3(xContent3->getAnchor(), uno::UNO_QUERY); - CPPUNIT_ASSERT_EQUAL(xRange3->getString(), OUString("")); + CPPUNIT_ASSERT_EQUAL(xRange3->getString(), OUString()); uno::Reference<text::XText> xText(xRange3->getText( ), uno::UNO_QUERY); uno::Reference<text::XTextCursor> xNeighborhoodCursor(xText->createTextCursor( ), uno::UNO_QUERY); xNeighborhoodCursor->gotoRange(xRange3, false); diff --git a/sw/qa/extras/rtfexport/rtfexport.cxx b/sw/qa/extras/rtfexport/rtfexport.cxx index 12cc5e19b806..0eccf65dd748 100644 --- a/sw/qa/extras/rtfexport/rtfexport.cxx +++ b/sw/qa/extras/rtfexport/rtfexport.cxx @@ -519,9 +519,9 @@ DECLARE_RTFEXPORT_TEST(testBookmark, "bookmark.rtf") DECLARE_RTFEXPORT_TEST(testHyperlink, "hyperlink.rtf") { - CPPUNIT_ASSERT_EQUAL(OUString(""), getProperty<OUString>(getRun(getParagraph(1), 1, "Hello"), "HyperLinkURL")); + CPPUNIT_ASSERT_EQUAL(OUString(), getProperty<OUString>(getRun(getParagraph(1), 1, "Hello"), "HyperLinkURL")); CPPUNIT_ASSERT_EQUAL(OUString("http://en.wikipedia.org/wiki/World"), getProperty<OUString>(getRun(getParagraph(1), 2, "world"), "HyperLinkURL")); - CPPUNIT_ASSERT_EQUAL(OUString(""), getProperty<OUString>(getRun(getParagraph(1), 3, "!"), "HyperLinkURL")); + CPPUNIT_ASSERT_EQUAL(OUString(), getProperty<OUString>(getRun(getParagraph(1), 3, "!"), "HyperLinkURL")); } DECLARE_RTFEXPORT_TEST(testHyperlinkTdf100105, "hyperlink_empty.rtf") @@ -532,7 +532,7 @@ DECLARE_RTFEXPORT_TEST(testHyperlinkTdf100105, "hyperlink_empty.rtf") xCursor->gotoStart(false); CPPUNIT_ASSERT_EQUAL(OUString("http://example.net"), getProperty<OUString>(xCursor, "HyperLinkURL")); // getRun doesn't provide a 0-length hyperlink - CPPUNIT_ASSERT_EQUAL(OUString(""), getProperty<OUString>(getRun(getParagraph(1), 1, "foobar"), "HyperLinkURL")); + CPPUNIT_ASSERT_EQUAL(OUString(), getProperty<OUString>(getRun(getParagraph(1), 1, "foobar"), "HyperLinkURL")); } DECLARE_RTFEXPORT_TEST(test78758, "fdo78758.rtf") diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx index 598e4700b733..91625bb5bb28 100644 --- a/sw/qa/extras/rtfimport/rtfimport.cxx +++ b/sw/qa/extras/rtfimport/rtfimport.cxx @@ -1734,7 +1734,7 @@ DECLARE_RTFIMPORT_TEST(testContSectionPageBreak, "cont-section-pagebreak.rtf") // actually not sure how many paragraph there should be between // SECOND and THIRD - important is that the page break is on there uno::Reference<text::XTextRange> xParaNext = getParagraph(3); - CPPUNIT_ASSERT_EQUAL(OUString(""), xParaNext->getString()); + CPPUNIT_ASSERT_EQUAL(OUString(), xParaNext->getString()); //If PageDescName is not empty, a page break / switch to page style is defined CPPUNIT_ASSERT(uno::Any() != getProperty<OUString>(xParaNext, "PageDescName")); uno::Reference<text::XTextRange> xParaThird = getParagraph(4); diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx index 89229db942a4..c64e8b124f2e 100644 --- a/sw/qa/extras/uiwriter/uiwriter.cxx +++ b/sw/qa/extras/uiwriter/uiwriter.cxx @@ -2115,7 +2115,7 @@ void SwUiWriterTest::testSearchWithTransliterate() //transliteration option set so that at least one of the search strings is not found sal_uLong case1 = pWrtShell->SearchPattern(SearchOpt,true,SwDocPositions::Start,SwDocPositions::End); SwShellCursor* pShellCursor = pWrtShell->getShellCursor(true); - CPPUNIT_ASSERT_EQUAL(OUString(""),pShellCursor->GetText()); + CPPUNIT_ASSERT_EQUAL(OUString(),pShellCursor->GetText()); CPPUNIT_ASSERT_EQUAL(0,(int)case1); SearchOpt.searchString = "paragraph"; SearchOpt.transliterateFlags = TransliterationFlags::IGNORE_KASHIDA_CTL; @@ -3553,7 +3553,7 @@ void SwUiWriterTest::testTdf87922() struct PortionItem { PortionItem(OUString const & sItemType, sal_Int32 nLength = 0, - sal_uInt16 nTextType = 0, OUString const & sText = OUString("")) + sal_uInt16 nTextType = 0, OUString const & sText = OUString()) : msItemType(sItemType) , mnLength(nLength) , mnTextType(nTextType) @@ -4639,10 +4639,10 @@ void SwUiWriterTest::testMsWordCompTrailingBlanks() calcLayout(); // Check that trailing spaces spans have no width if option is enabled - CPPUNIT_ASSERT_EQUAL( OUString( "" ), parseDump( "/root/page/body/txt[2]/Text[4]", "nWidth" ) ); - CPPUNIT_ASSERT_EQUAL( OUString( "" ), parseDump( "/root/page/body/txt[2]/Text[5]", "nWidth" ) ); - CPPUNIT_ASSERT_EQUAL( OUString( "" ), parseDump( "/root/page/body/txt[3]/Text[4]", "nWidth" ) ); - CPPUNIT_ASSERT_EQUAL( OUString( "" ), parseDump( "/root/page/body/txt[3]/Text[5]", "nWidth" ) ); + CPPUNIT_ASSERT_EQUAL( OUString(), parseDump( "/root/page/body/txt[2]/Text[4]", "nWidth" ) ); + CPPUNIT_ASSERT_EQUAL( OUString(), parseDump( "/root/page/body/txt[2]/Text[5]", "nWidth" ) ); + CPPUNIT_ASSERT_EQUAL( OUString(), parseDump( "/root/page/body/txt[3]/Text[4]", "nWidth" ) ); + CPPUNIT_ASSERT_EQUAL( OUString(), parseDump( "/root/page/body/txt[3]/Text[5]", "nWidth" ) ); // The option is false in settings.xml pDoc = createDoc( "MsWordCompTrailingBlanksFalse.odt" ); diff --git a/sw/qa/extras/ww8export/ww8export.cxx b/sw/qa/extras/ww8export/ww8export.cxx index 4e70aa3aff16..ebb49f6ae2d1 100644 --- a/sw/qa/extras/ww8export/ww8export.cxx +++ b/sw/qa/extras/ww8export/ww8export.cxx @@ -1223,20 +1223,20 @@ DECLARE_WW8EXPORT_TEST(testCommentExport, "comment-export.odt") {OUString("Text"), OUString("[B x "), 0}, {OUString("Annotation"), OUString("Comment on [C..C]"), 2}, {OUString("Text"), OUString("[C x B]"), 0}, - {OUString("AnnotationEnd"), OUString(""), 1}, + {OUString("AnnotationEnd"), OUString(), 1}, {OUString("Text"), OUString(" x C]"), 0}, - {OUString("AnnotationEnd"), OUString(""), 2}, + {OUString("AnnotationEnd"), OUString(), 2}, {OUString("Text"), OUString(" xx A]"), 0}, - {OUString("AnnotationEnd"), OUString(""), 0}, + {OUString("AnnotationEnd"), OUString(), 0}, {OUString("Text"), OUString(" Comment on a point"), 0}, {OUString("Annotation"), OUString("Comment on point"), 3}, {OUString("Text"), OUString("x "), 0}, {OUString("Annotation"), OUString("Comment on AA...BB"), 4}, {OUString("Annotation"), OUString("Comment on AAAAAA"), 5}, {OUString("Text"), OUString("AAAAAA"), 0}, - {OUString("AnnotationEnd"), OUString(""), 5}, + {OUString("AnnotationEnd"), OUString(), 5}, {OUString("Text"), OUString(" BBBBBB"), 0}, - {OUString("AnnotationEnd"), OUString(""), 4} + {OUString("AnnotationEnd"), OUString(), 4} }; OUString sNames[6]; |