From db7a015c86248bd2a3d090240f9360f84b3bec8c Mon Sep 17 00:00:00 2001 From: Justin Luth Date: Thu, 24 Aug 2017 15:48:29 -0400 Subject: [PATCH] tdf#111891 unostyle: use default handler for non-page style LO 5.1 commit 664197d95becd516c3dac25a50439078ba61e051 introduced a handler for RES_TEXT_VERT_ADJUST to handle page styles, but that meant that the default handler was no longer called for frames (the only other item currently using RES_TEXT_VERT_ADJUST). Change-Id: I33827160fe64dc4cc2107afc26f7ac2e698007e1 Reviewed-on: https://gerrit.libreoffice.org/41538 Tested-by: Justin Luth Reviewed-by: Justin Luth (cherry picked from commit 10dc371d31f003ac3ed9b89ca1db95d36603603f) Reviewed-on: https://gerrit.libreoffice.org/41910 Tested-by: Jenkins Reviewed-by: Miklos Vajna (cherry picked from commit 461aa995d75f031209711feda9d785d915c42dd2) Reviewed-on: https://gerrit.libreoffice.org/42082 --- sw/qa/extras/odfexport/data/tdf111891_frameVertStyle.odt | Bin 0 -> 8814 bytes sw/qa/extras/odfexport/odfexport.cxx | 6 ++++++ sw/source/core/unocore/unostyle.cxx | 7 ++++++- 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 sw/qa/extras/odfexport/data/tdf111891_frameVertStyle.odt diff --git a/sw/qa/extras/odfexport/data/tdf111891_frameVertStyle.odt b/sw/qa/extras/odfexport/data/tdf111891_frameVertStyle.odt new file mode 100644 index 0000000000000000000000000000000000000000..8fcf98a6272bb749d26c88030b35f8c147a02308 GIT binary patch literal 8814 zcmb_>1z1~Kvo^({xND*1KyfKjw73Fc9i$3k2BOT7yghP>>CT!wF)>ZUb-tIk4N<0wHELrjB4B1j-Htx#OUD!~b8PQmfSX-I}tH`UY ztZZ&>E^h5_`8d~BmegL8Kh#(-)l%Bo3GeLc?dgIK_I3^Q_Vf&VY#o^!8W|tyZyOov zUz{GCn3x!wU0C=u*EO-yGrcjhusXN2zP>cKwKVp9fA;If(%#p#uekup~0g||37(7)jwKGZ<>Q6`eMBf9!tdc3tpxP<%Q|7s)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YIU;ETF$Y;V+W*;Oad^UU+f#8g0oZf=wWabuX_;Hw0HDBs(xUmzwLoBi z1<-**0t5vEY#sjLk`%vDwzaW!w7r|{|56WXV`FU#fB>!kmwFCR0MyappG`ycn|T6E zO@Y?HTl?DllX-rpX=`s|VGnfpAFlbkhj@37KWF;8+S^_B0R})o=0FE1ySPzAjtU5UHg3bg2M{2dLs+ilANqjSC zMSPfFQ~UBfnPlv&E3=NB&LcC~hh*G%P{_a!Hmscj*~wnhUoP#jB8@jcnU3GS{GQ-l zxeCzY4}2FSb_g&l!0i}g)7e&aBUX%lPlYV6dqGluC@3fv>-}||e`{+H;dHya|D9`1 zMRfjkX=dS9OYj17eY_%Ts3HI@K~3Oz=WduZWpZy4lL!DHfLxgD~m0{-x2T3nOe(Fg>`Gr(Lc?3 z50MDr@0-52HvL6@w18C={;Kuw-QAxmO1Gzf*X#X(^1~N?tx(@}&3=l|?M#2^q5Zq! zulu~a0`^bYLi@Fx{qK6eZVK*pfj?#bwn%>4?f!F5`0rZ3#_>Cs{VAISf89R((EPhN z|5MY7{GX!!Uyc1!>tC((pX03Gp!{Tkzel;_fuAz@8`nV-Tz`QL5* zlXd=u^267D4XJ-!#K2pW|B9ZsEc9a$|Iqw3dfbKFpOSlPqTdE!RRxsWyaxdR|MmsE LZ9yGT-;Mqsc2j`C literal 0 HcmV?d00001 diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx index e513aaa..19f1695 100644 --- a/sw/qa/extras/odfexport/odfexport.cxx +++ b/sw/qa/extras/odfexport/odfexport.cxx @@ -758,6 +758,12 @@ DECLARE_ODFEXPORT_TEST(testTextFrameVertAdjust, "textframe-vertadjust.odt") CPPUNIT_ASSERT_EQUAL(drawing::TextVerticalAdjust_BOTTOM, getProperty(xFrame, "TextVerticalAdjust")); } +DECLARE_ODFEXPORT_TEST(testTdf111891_frameVertStyle, "tdf111891_frameVertStyle.odt") +{ + uno::Reference xFrame(getShape(1), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(drawing::TextVerticalAdjust_BOTTOM, getProperty(xFrame, "TextVerticalAdjust")); +} + DECLARE_ODFEXPORT_TEST(testShapeRelsize, "shape-relsize.odt") { uno::Reference xShape = getShape(1); diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index ad6dd78..db6fc57 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -1803,8 +1803,13 @@ void SwXStyle::SetPropertyValue(const SfxItemPropertySimpleEntry& } } template<> -void SwXStyle::SetPropertyValue(const SfxItemPropertySimpleEntry&, const SfxItemPropertySet&, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase) +void SwXStyle::SetPropertyValue(const SfxItemPropertySimpleEntry& rEntry, const SfxItemPropertySet& rPropSet, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase) { + if(m_rEntry.m_eFamily != SfxStyleFamily::Page) + { + SetPropertyValue(rEntry, rPropSet, rValue, o_rStyleBase); + return; + } if(!m_pDoc || !rValue.has() || !o_rStyleBase.GetOldPageDesc()) return; SwPageDesc* pPageDesc = m_pDoc->FindPageDesc(o_rStyleBase.GetOldPageDesc()->GetName()); -- 2.9.5