summaryrefslogtreecommitdiff
path: root/sc/qa/unit
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-12-18 13:29:00 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-12-18 14:12:30 +0100
commit9ba13265e3ea2a204a45c54acbbf8a1bca11a55c (patch)
tree8d90c9fa4296ad9c3d9a0f1909f1c686c5bb193d /sc/qa/unit
parentf4fbcef061fbd3786a42d98573aa6073d5c684bf (diff)
sc: Use appropriate OUString functions on string constants
Change-Id: Ifc00b2045de0d356e175733b0f03ab0c90083039
Diffstat (limited to 'sc/qa/unit')
-rw-r--r--sc/qa/unit/subsequent_export-test.cxx14
-rw-r--r--sc/qa/unit/ucalc.cxx4
2 files changed, 9 insertions, 9 deletions
diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx
index a57a652f8098..1727d30c959b 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -728,7 +728,7 @@ void ScExportTest::testRichTextExportODS()
if (pText->GetParagraphCount() != 6)
return false;
- if (pText->GetText(0) != "")
+ if (!pText->GetText(0).isEmpty())
return false;
if (pText->GetText(1) != "Two")
@@ -737,13 +737,13 @@ void ScExportTest::testRichTextExportODS()
if (pText->GetText(2) != "Three")
return false;
- if (pText->GetText(3) != "")
+ if (!pText->GetText(3).isEmpty())
return false;
if (pText->GetText(4) != "Five")
return false;
- if (pText->GetText(5) != "")
+ if (!pText->GetText(5).isEmpty())
return false;
return true;
@@ -2308,7 +2308,7 @@ void ScExportTest::testSwappedOutImageExport()
{
OUString sURL;
XPropSet->getPropertyValue("GraphicURL") >>= sURL;
- CPPUNIT_ASSERT_MESSAGE(sFailedMessage.getStr(), sURL != OUString("vnd.sun.star.GraphicObject:00000000000000000000000000000000"));
+ CPPUNIT_ASSERT_MESSAGE(sFailedMessage.getStr(), sURL != "vnd.sun.star.GraphicObject:00000000000000000000000000000000");
}
// Check size
{
@@ -2326,7 +2326,7 @@ void ScExportTest::testSwappedOutImageExport()
{
OUString sURL;
XPropSet->getPropertyValue("GraphicURL") >>= sURL;
- CPPUNIT_ASSERT_MESSAGE(sFailedMessage.getStr(), sURL != OUString("vnd.sun.star.GraphicObject:00000000000000000000000000000000"));
+ CPPUNIT_ASSERT_MESSAGE(sFailedMessage.getStr(), sURL != "vnd.sun.star.GraphicObject:00000000000000000000000000000000");
}
// Check size
{
@@ -2458,7 +2458,7 @@ void ScExportTest::testImageWithSpecialID()
{
OUString sURL;
XPropSet->getPropertyValue("GraphicURL") >>= sURL;
- CPPUNIT_ASSERT_MESSAGE(sFailedMessage.getStr(), sURL != OUString("vnd.sun.star.GraphicObject:00000000000000000000000000000000"));
+ CPPUNIT_ASSERT_MESSAGE(sFailedMessage.getStr(), sURL != "vnd.sun.star.GraphicObject:00000000000000000000000000000000");
}
// Check size
{
@@ -2476,7 +2476,7 @@ void ScExportTest::testImageWithSpecialID()
{
OUString sURL;
XPropSet->getPropertyValue("GraphicURL") >>= sURL;
- CPPUNIT_ASSERT_MESSAGE(sFailedMessage.getStr(), sURL != OUString("vnd.sun.star.GraphicObject:00000000000000000000000000000000"));
+ CPPUNIT_ASSERT_MESSAGE(sFailedMessage.getStr(), sURL != "vnd.sun.star.GraphicObject:00000000000000000000000000000000");
}
// Check size
{
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 029db9dfedf8..093ec5304b73 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -3238,7 +3238,7 @@ void Test::testCopyPaste()
fValue = m_pDoc->GetValue(ScAddress(1,1,1));
ASSERT_DOUBLES_EQUAL_MESSAGE("after undo formula should return nothing", fValue, 0);
aString = m_pDoc->GetString(2, 1, 1);
- CPPUNIT_ASSERT_MESSAGE("after undo, string should be removed", aString == "");
+ CPPUNIT_ASSERT_MESSAGE("after undo, string should be removed", aString.isEmpty());
CPPUNIT_ASSERT_MESSAGE("after undo, note on A2 should be removed", !m_pDoc->HasNote(ScAddress(0, 1, 1)));
CPPUNIT_ASSERT_MESSAGE("after undo, note on B2 should be removed", !m_pDoc->HasNote(ScAddress(1, 1, 1)));
CPPUNIT_ASSERT_MESSAGE("after undo, note on C2 should be removed", !m_pDoc->HasNote(ScAddress(2, 1, 1)));
@@ -4500,7 +4500,7 @@ void Test::testAutoFill()
m_pDoc->Fill(100, 110, 100, 110, NULL, aMarkData, 10, FILL_TO_TOP, FILL_AUTO);
for(SCROW nRow = 110; nRow >= 100; --nRow)
{
- OUString aExpected = OUString("=A") + OUString::number(nRow +1);
+ OUString aExpected = "=A" + OUString::number(nRow +1);
OUString aFormula;
m_pDoc->GetFormula(100, nRow, 0, aFormula);
CPPUNIT_ASSERT_EQUAL(aExpected, aFormula);