editeng/source/items/frmitems.cxx | 6 ++++++ sw/source/core/unocore/unotbl.cxx | 8 +------- 2 files changed, 7 insertions(+), 7 deletions(-)
New commits: commit 052b5d375307245223e694bb835d86966c370d3b Author: Miklos Vajna <vmik...@collabora.com> AuthorDate: Tue Feb 12 14:36:43 2019 +0100 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Tue Feb 12 16:34:14 2019 +0100 sw btlr writing mode: implement UNO API The custom code in SwXCell::setPropertyValue() was added in commit 5a5597655a4bf12e4ca07c9c2b6f6221e217f080 (tentative fix for fdo#30474#, 2010-11-26), which suggests that not handling all constants from text::WritingMode2 was not intentional. Later the writerfilter side (which is the only client of this hidden property) was adapted to use text::WritingMode2, so do the same here. This implicitly adds support for the new text::WritingMode2::BT_LR as well. Change-Id: I37d8eaa844847cb19e7503b2d973069f9895e6bc Reviewed-on: https://gerrit.libreoffice.org/67730 Reviewed-by: Miklos Vajna <vmik...@collabora.com> Tested-by: Jenkins diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx index 2d6c98d59531..961f9ccffb51 100644 --- a/editeng/source/items/frmitems.cxx +++ b/editeng/source/items/frmitems.cxx @@ -3867,6 +3867,9 @@ bool SvxFrameDirectionItem::PutValue( const css::uno::Any& rVal, case text::WritingMode2::TB_LR: SetValue( SvxFrameDirection::Vertical_LR_TB ); break; + case text::WritingMode2::BT_LR: + SetValue( SvxFrameDirection::Vertical_LR_BT ); + break; case text::WritingMode2::PAGE: SetValue( SvxFrameDirection::Environment ); break; @@ -3900,6 +3903,9 @@ bool SvxFrameDirectionItem::QueryValue( css::uno::Any& rVal, case SvxFrameDirection::Vertical_LR_TB: nVal = text::WritingMode2::TB_LR; break; + case SvxFrameDirection::Vertical_LR_BT: + nVal = text::WritingMode2::BT_LR; + break; case SvxFrameDirection::Environment: nVal = text::WritingMode2::PAGE; break; diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index dd409f7529ca..df40b80a11a0 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -1022,14 +1022,8 @@ void SwXCell::setPropertyValue(const OUString& rPropertyName, const uno::Any& aV if(rPropertyName == "FRMDirection") { SvxFrameDirection eDir = SvxFrameDirection::Environment; - try - { - const std::array<SvxFrameDirection, 3> vDirs = { SvxFrameDirection::Horizontal_LR_TB, SvxFrameDirection::Horizontal_RL_TB, SvxFrameDirection::Vertical_RL_TB }; - eDir = vDirs.at(aValue.get<sal_Int32>()); - } catch(std::out_of_range &) { - SAL_WARN("sw.uno", "unknown direction code, maybe it's a bitfield"); - } SvxFrameDirectionItem aItem(eDir, RES_FRAMEDIR); + aItem.PutValue(aValue, 0); pBox->GetFrameFormat()->SetFormatAttr(aItem); } else if(rPropertyName == "TableRedlineParams") _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits