sw/source/uibase/app/docst.cxx | 6 ++++-- sw/source/uibase/shells/tabsh.cxx | 14 ++++++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-)
New commits: commit 9080200713292a200f2c6283f9c3f438411fc7d4 Author: Maxim Monastirsky <momonas...@gmail.com> AuthorDate: Thu Oct 6 01:32:11 2022 +0300 Commit: Maxim Monastirsky <momonas...@gmail.com> CommitDate: Thu Oct 6 20:05:34 2022 +0200 tdf#149741 Handle also inherited direction Change-Id: I0abc381bb9895c8ec5a18ddee1071fa6d13183ce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141003 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <momonas...@gmail.com> diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx index 0ff18faa34d9..7e3b7e024ee2 100644 --- a/sw/source/uibase/app/docst.cxx +++ b/sw/source/uibase/app/docst.cxx @@ -596,12 +596,14 @@ IMPL_LINK_NOARG(ApplyStyle, ApplyHdl, LinkParamNone*, void) } else { - if(SfxStyleFamily::Page == m_nFamily) + if(SfxStyleFamily::Page == m_nFamily || SfxStyleFamily::Frame == m_nFamily) { static const sal_uInt16 aInval[] = { SID_IMAGE_ORIENTATION, SID_ATTR_CHAR_FONT, - FN_INSERT_CTRL, FN_INSERT_OBJ_CTRL, 0}; + FN_INSERT_CTRL, FN_INSERT_OBJ_CTRL, + FN_TABLE_INSERT_COL_BEFORE, + FN_TABLE_INSERT_COL_AFTER, 0}; pView->GetViewFrame()->GetBindings().Invalidate(aInval); } SfxItemSet aTmpSet( *m_pDlg->GetOutputItemSet() ); diff --git a/sw/source/uibase/shells/tabsh.cxx b/sw/source/uibase/shells/tabsh.cxx index 9a9182f40978..01bd9389c152 100644 --- a/sw/source/uibase/shells/tabsh.cxx +++ b/sw/source/uibase/shells/tabsh.cxx @@ -72,6 +72,7 @@ #include <docsh.hxx> #include <tblsel.hxx> #include <viewopt.hxx> +#include <tabfrm.hxx> #include <strings.hrc> #include <cmdid.h> @@ -1363,8 +1364,17 @@ void SwTableShell::GetState(SfxItemSet &rSet) case FN_TABLE_INSERT_COL_AFTER: { SfxImageItem aImageItem(nSlot); - if (pFormat->GetFrameDir().GetValue() == SvxFrameDirection::Horizontal_RL_TB) - aImageItem.SetMirrored(true); + if (pFormat->GetFrameDir().GetValue() == SvxFrameDirection::Environment) + { + // Inherited from superordinate object (page or frame). + // If the table spans multiple pages, direction is set by the first page. + SwIterator<SwTabFrame, SwFrameFormat> aIterT(*pFormat); + for (SwTabFrame* pFrame = aIterT.First(); pFrame; + pFrame = static_cast<SwTabFrame*>(pFrame->GetPrecede())) + aImageItem.SetMirrored(pFrame->IsRightToLeft()); + } + else + aImageItem.SetMirrored(pFormat->GetFrameDir().GetValue() == SvxFrameDirection::Horizontal_RL_TB); rSet.Put(aImageItem); break; }