sw/source/ui/frmdlg/frmpage.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
New commits: commit 5951da5175b9d7e5b3b47bd0d90989d2ef528c79 Author: Miklos Vajna <vmik...@collabora.com> AuthorDate: Thu Jun 10 15:11:03 2021 +0200 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Thu Jun 10 16:35:34 2021 +0200 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 <vmik...@collabora.com> Tested-by: Jenkins 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 ) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits