diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2019-05-23 21:44:20 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2019-05-24 09:06:28 +0200 |
commit | ad96f6f378a9fce11c2f7d9ad39a8203189444e3 (patch) | |
tree | 0983689bf4b4d57e1dddb48da2553e44d6a2cb0b /sw/qa/extras | |
parent | 8a70f02c7d5b7dc4f947138052002499b24b3903 (diff) |
sw btlr writing mode: fix btlr <-> tbrl switch for fly frames
The "BT" flag was not clear, so if the fly frame was first tbrl, then
switched to btlr, then this was changed back, the result was not tbrl
but tblr.
Change-Id: I9a258e64e7a6e5849edd5a6a21a6182f642e44ab
Reviewed-on: https://gerrit.libreoffice.org/72881
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sw/qa/extras')
-rw-r--r-- | sw/qa/extras/odfexport/odfexport.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx index eeb16f2d9ef7..90a467b0d05c 100644 --- a/sw/qa/extras/odfexport/odfexport.cxx +++ b/sw/qa/extras/odfexport/odfexport.cxx @@ -1453,6 +1453,16 @@ DECLARE_ODFEXPORT_TEST(testBtlrFrame, "btlr-frame.odt") auto* pFlyFrame = dynamic_cast<SwFlyFrame*>(rAnchored[0]); CPPUNIT_ASSERT(pFlyFrame); CPPUNIT_ASSERT(pFlyFrame->IsVertLRBT()); + + if (!mbExported) + // Not yet exported, don't modify the doc model for test purposes. + return; + + // Make sure that btlr -> tbrl transition clears the "BT" flag. + xTextFrame->setPropertyValue("WritingMode", uno::makeAny(static_cast<sal_Int16>(text::WritingMode2::TB_LR))); + pFlyFrame = dynamic_cast<SwFlyFrame*>(rAnchored[0]); + CPPUNIT_ASSERT(pFlyFrame); + CPPUNIT_ASSERT(!pFlyFrame->IsVertLRBT()); } DECLARE_ODFEXPORT_TEST(testFdo86963, "fdo86963.odt") |