summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2021-06-10 15:11:03 +0200
committerMiklos Vajna <vmiklos@collabora.com>2021-06-10 16:35:34 +0200
commit5951da5175b9d7e5b3b47bd0d90989d2ef528c79 (patch)
tree45211bd176933aefffc5875e3e32bf9fda6d5c0b
parent71070e7df254ffdcf57f4c82b1597d9855218f23 (diff)
sw image anchor type: add style UI for this
A frame style contains RES_ANCHOR, and SwFormatAnchor::m_eAnchorId already describes an anchor type. This is even exposed on the UNO API as the AnchorType property and its ODF import/export is also implemented. Enable UI for this, so that templates can decide the default anchor type when inserting images. Still keep the "to frame" anchor type disabled as its meaning is unclear for frame styles. Change-Id: I5d8ef63af9c8f2efa6485c4ec827ba9aef9b8956 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116990 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
-rw-r--r--sw/source/ui/frmdlg/frmpage.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index dc148972e277..09d732efce5a 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -884,8 +884,8 @@ void SwFramePage::Reset( const SfxItemSet *rSet )
if (m_bFormat)
{
- // at formats no anchor editing
- m_xAnchorFrame->set_sensitive(false);
+ // at formats no to-fly anchor
+ m_xAnchorAtFrameRB->set_sensitive(false);
if (rSet->GetItemState(FN_KEEP_ASPECT_RATIO) != SfxItemState::SET)
{
m_xFixedRatioCB->set_sensitive(false);
@@ -1047,7 +1047,7 @@ bool SwFramePage::FillItemSet(SfxItemSet *rSet)
RndStdIds eAnchorId = GetAnchor();
- if ( !m_bFormat )
+ if ( !m_bFormat || eAnchorId != RndStdIds::FLY_AT_FLY )
{
pOldItem = GetOldItem(*rSet, RES_ANCHOR);
if (m_bNew || !pOldItem || eAnchorId != static_cast<const SwFormatAnchor*>(pOldItem)->GetAnchorId())
@@ -2287,7 +2287,7 @@ void SwFramePage::SetFormatUsed(bool bFormatUsed)
{
m_bFormat = bFormatUsed;
if (m_bFormat)
- m_xAnchorFrame->hide();
+ m_xAnchorAtFrameRB->hide();
}
void SwFramePage::EnableVerticalPositioning( bool bEnable )