[Libreoffice-commits] core.git: sd/qa
msrijita18 (via logerrit)
logerrit at kemper.freedesktop.org
Sat Feb 20 13:37:38 UTC 2021
sd/qa/unit/uiimpress.cxx | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
New commits:
commit e61c0af4718af5dcb2efa94fba2f031dd0c92e1d
Author: msrijita18 <msrijita189 at gmail.com>
AuthorDate: Sun Feb 14 12:28:32 2021 +0530
Commit: Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Sat Feb 20 14:36:52 2021 +0100
Add unittest for tdf#123841 Unfilled rectangles make filled rectangles
Change-Id: Ic429ab5aa21102a44c9a559438bf3659a9d9137c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110849
Tested-by: Xisco Fauli <xiscofauli at libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>
diff --git a/sd/qa/unit/uiimpress.cxx b/sd/qa/unit/uiimpress.cxx
index db2d6f4c61a3..f284806edceb 100644
--- a/sd/qa/unit/uiimpress.cxx
+++ b/sd/qa/unit/uiimpress.cxx
@@ -619,6 +619,40 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testSpellOnlineParameter)
CPPUNIT_ASSERT_EQUAL(!bSet, pImpressDocument->GetDoc()->GetOnlineSpell());
}
+CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf123841)
+{
+ // To check if selecting unfilled rectangle produces unfilled rectangle
+ mxComponent = loadFromDesktop("private:factory/simpress",
+ "com.sun.star.presentation.PresentationDocument");
+ auto pImpressDocument = dynamic_cast<SdXImpressDocument*>(mxComponent.get());
+ CPPUNIT_ASSERT(pImpressDocument);
+
+ uno::Sequence<beans::PropertyValue> aArgs(
+ comphelper::InitPropertySequence({ { "KeyModifier", uno::makeAny(KEY_MOD1) } }));
+ dispatchCommand(mxComponent, ".uno:Rect_Unfilled", aArgs);
+ Scheduler::ProcessEventsToIdle();
+
+ uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xDraws = xDrawPagesSupplier->getDrawPages();
+
+ int getShapes = xDraws->getCount();
+ CPPUNIT_ASSERT_EQUAL(1, getShapes);
+
+ uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
+ uno::UNO_QUERY);
+
+ for (int i = 0; i < 3; i++)
+ {
+ uno::Reference<beans::XPropertySet> XPropSet(xDrawPage->getByIndex(i), uno::UNO_QUERY);
+ drawing::FillStyle eFillStyle = drawing::FillStyle_NONE;
+ XPropSet->getPropertyValue("FillStyle") >>= eFillStyle;
+
+ // Without the fix in place, this test would have failed with
+ // with drawing::FillStyle_NONE != drawing::FillStyle_SOLID
+ CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_NONE, eFillStyle);
+ }
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
More information about the Libreoffice-commits
mailing list