summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/qa/extras/odfexport/data/tdf111891_frameVertStyle.odtbin0 -> 8814 bytes
-rw-r--r--sw/qa/extras/odfexport/odfexport.cxx6
-rw-r--r--sw/source/core/unocore/unostyle.cxx7
3 files changed, 12 insertions, 1 deletions
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 000000000000..8fcf98a6272b
--- /dev/null
+++ b/sw/qa/extras/odfexport/data/tdf111891_frameVertStyle.odt
Binary files differ
diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx
index 544602996baf..e9e458c4a243 100644
--- a/sw/qa/extras/odfexport/odfexport.cxx
+++ b/sw/qa/extras/odfexport/odfexport.cxx
@@ -794,6 +794,12 @@ DECLARE_ODFEXPORT_TEST(testTextFrameVertAdjust, "textframe-vertadjust.odt")
CPPUNIT_ASSERT_EQUAL(drawing::TextVerticalAdjust_BOTTOM, getProperty<drawing::TextVerticalAdjust>(xFrame, "TextVerticalAdjust"));
}
+DECLARE_ODFEXPORT_TEST(testTdf111891_frameVertStyle, "tdf111891_frameVertStyle.odt")
+{
+ uno::Reference<beans::XPropertySet> xFrame(getShape(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(drawing::TextVerticalAdjust_BOTTOM, getProperty<drawing::TextVerticalAdjust>(xFrame, "TextVerticalAdjust"));
+}
+
DECLARE_ODFEXPORT_TEST(testShapeRelsize, "shape-relsize.odt")
{
uno::Reference<drawing::XShape> xShape = getShape(1);
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index 2cce53ca24b6..c2237f4a0ae1 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -1788,8 +1788,13 @@ void SwXStyle::SetPropertyValue<RES_PAGEDESC>(const SfxItemPropertySimpleEntry&
}
}
template<>
-void SwXStyle::SetPropertyValue<RES_TEXT_VERT_ADJUST>(const SfxItemPropertySimpleEntry&, const SfxItemPropertySet&, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase)
+void SwXStyle::SetPropertyValue<RES_TEXT_VERT_ADJUST>(const SfxItemPropertySimpleEntry& rEntry, const SfxItemPropertySet& rPropSet, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase)
{
+ if(m_rEntry.m_eFamily != SfxStyleFamily::Page)
+ {
+ SetPropertyValue<HINT_BEGIN>(rEntry, rPropSet, rValue, o_rStyleBase);
+ return;
+ }
if(!m_pDoc || !rValue.has<drawing::TextVerticalAdjust>() || !o_rStyleBase.GetOldPageDesc())
return;
SwPageDesc* pPageDesc = m_pDoc->FindPageDesc(o_rStyleBase.GetOldPageDesc()->GetName());