diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-03-07 11:19:35 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-03-08 06:30:49 +0000 |
commit | 9cb57a50d7eeaa1dda19d18bcb3cde7e4a7984e5 (patch) | |
tree | 790282bdd3d41f9ceda28267cb72dd119ac15230 /sd/qa/unit | |
parent | bb4cf1da125344d5ef4fe51b0f1549718a11affa (diff) |
convert SvxAdjust to scoped enum
Change-Id: I0df7a5313d6d62d0c657e62ef6014a3ddbab4639
Reviewed-on: https://gerrit.libreoffice.org/34941
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd/qa/unit')
-rw-r--r-- | sd/qa/unit/misc-tests.cxx | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/sd/qa/unit/misc-tests.cxx b/sd/qa/unit/misc-tests.cxx index 2a1620c28f21..87c6beb66ca0 100644 --- a/sd/qa/unit/misc-tests.cxx +++ b/sd/qa/unit/misc-tests.cxx @@ -73,6 +73,12 @@ private: sd::DrawDocShellRef Load(const OUString& rURL, sal_Int32 nFormat); }; +std::ostream& operator<<(std::ostream& s, SvxAdjust n) +{ + s << (int)n; + return s; +} + sd::DrawDocShellRef SdMiscTest::Load(const OUString& rURL, sal_Int32 nFormat) { uno::Reference< frame::XDesktop2 > xDesktop = frame::Desktop::create(::comphelper::getProcessComponentContext()); @@ -204,7 +210,7 @@ void SdMiscTest::testTdf99396TextEdit() SfxItemSet aEditAttr(xDocSh->GetDoc()->GetPool()); pView->GetAttributes(aEditAttr); SfxItemSet aNewAttr(*(aEditAttr.GetPool()), aEditAttr.GetRanges()); - aNewAttr.Put(SvxAdjustItem(SVX_ADJUST_RIGHT, EE_PARA_JUST)); + aNewAttr.Put(SvxAdjustItem(SvxAdjust::Right, EE_PARA_JUST)); aRequest.Done(aNewAttr); const SfxItemSet* pArgs = aRequest.GetArgs(); pView->SetAttributes(*pArgs); @@ -228,7 +234,7 @@ void SdMiscTest::testTdf99396TextEdit() const EditTextObject& rEdit = pTableObject->getText(0)->GetOutlinerParaObject()->GetTextObject(); const SfxItemSet& rParaAttribs = rEdit.GetParaAttribs(0); auto pAdjust = static_cast<const SvxAdjustItem*>(rParaAttribs.GetItem(EE_PARA_JUST)); - CPPUNIT_ASSERT_EQUAL(SVX_ADJUST_RIGHT, pAdjust->GetAdjust()); + CPPUNIT_ASSERT_EQUAL(SvxAdjust::Right, pAdjust->GetAdjust()); } // Now undo. @@ -246,7 +252,7 @@ void SdMiscTest::testTdf99396TextEdit() const EditTextObject& rEdit = pTableObject->getText(0)->GetOutlinerParaObject()->GetTextObject(); const SfxItemSet& rParaAttribs = rEdit.GetParaAttribs(0); auto pAdjust = static_cast<const SvxAdjustItem*>(rParaAttribs.GetItem(EE_PARA_JUST)); - CPPUNIT_ASSERT_EQUAL(SVX_ADJUST_CENTER, pAdjust->GetAdjust()); + CPPUNIT_ASSERT_EQUAL(SvxAdjust::Center, pAdjust->GetAdjust()); } |