diff options
author | Michael Stahl <michael.stahl@allotropia.de> | 2024-12-02 15:21:24 +0100 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2024-12-02 18:46:39 +0100 |
commit | 654e3134adbf48c61aaa29dcd9f52ce236694535 (patch) | |
tree | 454b123e35b4ddc9571cb66479c73c7cfb1575dc /sw/qa | |
parent | 6091e6b0ed363b7e65569830ac76cdcb7ba99b24 (diff) |
unotest,sw: introduce queryDispatchStatus()
... and reset the view options that are toggled in
testHiddenParagraphFollowFrame and testHiddenParagraphFlys.
Backporting these tests to the libreoffice-24-8 branch broke 2 unrelated
tests because of the changed view settings:
Test name: (anonymous namespace)::testHiddenSectionPageDescs::TestBody
equality assertion failed
- Expected: 532
- Actual : 798
- In <>, attribute 'height' of '/root/page[2]/body/section[1]/infos/bounds' incorrect value.
xmltesttools.cxx:203:Assertion
Test name: (anonymous namespace)::testTable0HeightRows::TestBody
equality assertion failed
- Expected: 28
- Actual : 22
- In <>, XPath '/root/page[1]/body/tab/row' number of nodes is incorrect
Change-Id: Ie58242348fecabe163e54048f3896c6d427d2608
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177691
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'sw/qa')
-rw-r--r-- | sw/qa/extras/layout/layout3.cxx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sw/qa/extras/layout/layout3.cxx b/sw/qa/extras/layout/layout3.cxx index b7dfcd739d61..ef5e948d5abf 100644 --- a/sw/qa/extras/layout/layout3.cxx +++ b/sw/qa/extras/layout/layout3.cxx @@ -1833,6 +1833,14 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testHiddenParagraphFollowFrame) { createSwDoc("hidden-para-follow-frame.fodt"); + uno::Any aOldValue{ queryDispatchStatus(mxComponent, m_xContext, ".uno:ShowHiddenParagraphs") }; + + Resetter g([this, aOldValue] { + uno::Sequence<beans::PropertyValue> argsSH( + comphelper::InitPropertySequence({ { "ShowHiddenParagraphs", aOldValue } })); + dispatchCommand(mxComponent, ".uno:ShowHiddenParagraphs", argsSH); + }); + uno::Sequence<beans::PropertyValue> argsSH( comphelper::InitPropertySequence({ { "ShowHiddenParagraphs", uno::Any(true) } })); dispatchCommand(mxComponent, ".uno:ShowHiddenParagraphs", argsSH); @@ -1871,6 +1879,14 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testHiddenParagraphFlys) { createSwDoc("hidden-para-as-char-fly.fodt"); + uno::Any aOldValue{ queryDispatchStatus(mxComponent, m_xContext, ".uno:ShowHiddenParagraphs") }; + + Resetter g([this, aOldValue] { + uno::Sequence<beans::PropertyValue> argsSH( + comphelper::InitPropertySequence({ { "ShowHiddenParagraphs", aOldValue } })); + dispatchCommand(mxComponent, ".uno:ShowHiddenParagraphs", argsSH); + }); + uno::Sequence<beans::PropertyValue> argsSH( comphelper::InitPropertySequence({ { "ShowHiddenParagraphs", uno::Any(true) } })); dispatchCommand(mxComponent, ".uno:ShowHiddenParagraphs", argsSH); |