diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2023-11-10 10:17:16 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2023-11-10 13:49:10 +0100 |
commit | 8d973c5b9405bfa6964d3dfebd0017fd60ec3eca (patch) | |
tree | 2b8a1ff98834edf2a17241e8f5e1bf4a8abce6c3 /sw/source | |
parent | c1bd25e4674571e04b6445af36e4520a70ac166b (diff) |
sw floattable, insert UI: default to at-char for non-split flys
Inserting new images defaulted to the at-char anchor type, but inserting
a new frame defaulted to at-para, which is inconsistent. This is now more
visible, since LOK exposes the insert frame dialog.
An additional problem is that the LOK case hides anything other than
at-char and as-char in the frame properties dialog since commit
4154d281fbecaadf6cd118c00cc6cff929e339a4 (sw lok: hide UI to set
Word-incompatible anchor types, 2019-07-05), which was intended for
images, but also affects text frames as well. But floating tables want
to-para anchored frames to be able to split.
Fix the problem by defaulting to at-char anchoring, unless we deal with
floating tables.
And show the to-para anchor widget in the LOK case again, given that all
of to-para, to-char and as-char have their use-cases, even when editing
Word documents.
Change-Id: I89b0973183a750d86f56e0cccd7b0fbcb3dc070d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159261
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/ui/frmdlg/frmpage.cxx | 1 | ||||
-rw-r--r-- | sw/source/uibase/shells/textsh.cxx | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx index 911df55f66d7..bdf1c90291ff 100644 --- a/sw/source/ui/frmdlg/frmpage.cxx +++ b/sw/source/ui/frmdlg/frmpage.cxx @@ -721,7 +721,6 @@ SwFramePage::SwFramePage(weld::Container* pPage, weld::DialogController* pContro if (comphelper::LibreOfficeKit::isActive()) { m_xAnchorAtPageRB->hide(); - m_xAnchorAtParaRB->hide(); m_xAnchorAtFrameRB->hide(); } } diff --git a/sw/source/uibase/shells/textsh.cxx b/sw/source/uibase/shells/textsh.cxx index c9e0e8a4d6f9..d0c9aabc979f 100644 --- a/sw/source/uibase/shells/textsh.cxx +++ b/sw/source/uibase/shells/textsh.cxx @@ -918,6 +918,12 @@ SfxItemSet SwTextShell::CreateInsertFrameItemSet(SwFlyFrameAttrMgr& rMgr) aBoxInfo.SetDefDist(rBox.GetDistance(SvxBoxItemLine::LEFT)); aSet.Put(aBoxInfo); + if (!SwFlyFrameAttrMgr::SingleTableSelected(GetShell())) + { + SwFormatAnchor aAnchor(RndStdIds::FLY_AT_CHAR); + aSet.Put(aAnchor); + } + return aSet; } |