summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/source/ui/frmdlg/wrap.cxx18
-rw-r--r--sw/source/uibase/inc/wrap.hxx1
-rw-r--r--sw/source/uibase/shells/drwbassh.cxx1
-rw-r--r--sw/uiconfig/swriter/ui/wrappage.ui15
4 files changed, 35 insertions, 0 deletions
diff --git a/sw/source/ui/frmdlg/wrap.cxx b/sw/source/ui/frmdlg/wrap.cxx
index 14dbad2cc19f..99d9ad75e1b4 100644
--- a/sw/source/ui/frmdlg/wrap.cxx
+++ b/sw/source/ui/frmdlg/wrap.cxx
@@ -43,6 +43,7 @@
#include <globals.hrc>
#include <wrap.hxx>
#include <bitmaps.hlst>
+#include <fmtwrapinfluenceonobjpos.hxx>
using namespace ::com::sun::star;
@@ -88,6 +89,7 @@ SwWrapTabPage::SwWrapTabPage(TabPageParent pParent, const SfxItemSet &rSet)
, m_xWrapTransparentCB(m_xBuilder->weld_check_button("transparent"))
, m_xWrapOutlineCB(m_xBuilder->weld_check_button("outline"))
, m_xWrapOutsideCB(m_xBuilder->weld_check_button("outside"))
+ , m_xAllowOverlapCB(m_xBuilder->weld_check_button("allowoverlap"))
{
SetExchangeSupport();
@@ -248,6 +250,10 @@ void SwWrapTabPage::Reset(const SfxItemSet *rSet)
m_xBottomMarginED->save_value();
ContourHdl(*m_xWrapOutlineCB);
+
+ const SwFormatWrapInfluenceOnObjPos& rInfluence = rSet->Get(RES_WRAP_INFLUENCE_ON_OBJPOS);
+ m_xAllowOverlapCB->set_active(rInfluence.GetAllowOverlap());
+
ActivatePage( *rSet );
}
@@ -349,6 +355,18 @@ bool SwWrapTabPage::FillItemSet(SfxItemSet *rSet)
bModified |= nullptr != rSet->Put(SfxInt16Item(FN_DRAW_WRAP_DLG, bChecked ? 0 : 1));
}
+ const SwFormatWrapInfluenceOnObjPos& rOldInfluence
+ = GetItemSet().Get(RES_WRAP_INFLUENCE_ON_OBJPOS);
+ SwFormatWrapInfluenceOnObjPos aInfluence(rOldInfluence);
+ aInfluence.SetAllowOverlap(m_xAllowOverlapCB->get_active());
+
+ pOldItem = GetOldItem(*rSet, RES_WRAP_INFLUENCE_ON_OBJPOS);
+ if (!pOldItem || aInfluence != *pOldItem)
+ {
+ rSet->Put(aInfluence);
+ bModified = true;
+ }
+
return bModified;
}
diff --git a/sw/source/uibase/inc/wrap.hxx b/sw/source/uibase/inc/wrap.hxx
index acb9bc3c2791..bffc69bb1c28 100644
--- a/sw/source/uibase/inc/wrap.hxx
+++ b/sw/source/uibase/inc/wrap.hxx
@@ -66,6 +66,7 @@ class SwWrapTabPage: public SfxTabPage
std::unique_ptr<weld::CheckButton> m_xWrapTransparentCB;
std::unique_ptr<weld::CheckButton> m_xWrapOutlineCB;
std::unique_ptr<weld::CheckButton> m_xWrapOutsideCB;
+ std::unique_ptr<weld::CheckButton> m_xAllowOverlapCB;
virtual ~SwWrapTabPage() override;
diff --git a/sw/source/uibase/shells/drwbassh.cxx b/sw/source/uibase/shells/drwbassh.cxx
index 409bcd94ac26..12d87bab691b 100644
--- a/sw/source/uibase/shells/drwbassh.cxx
+++ b/sw/source/uibase/shells/drwbassh.cxx
@@ -129,6 +129,7 @@ void SwDrawBaseShell::Execute(SfxRequest const &rReq)
RES_LR_SPACE, RES_UL_SPACE,
RES_SURROUND, RES_SURROUND,
RES_ANCHOR, RES_ANCHOR,
+ RES_WRAP_INFLUENCE_ON_OBJPOS, RES_WRAP_INFLUENCE_ON_OBJPOS,
SID_HTML_MODE, SID_HTML_MODE,
FN_DRAW_WRAP_DLG, FN_DRAW_WRAP_DLG>{});
diff --git a/sw/uiconfig/swriter/ui/wrappage.ui b/sw/uiconfig/swriter/ui/wrappage.ui
index cf409da7999e..64a362d5e62e 100644
--- a/sw/uiconfig/swriter/ui/wrappage.ui
+++ b/sw/uiconfig/swriter/ui/wrappage.ui
@@ -446,6 +446,21 @@
<property name="top_attach">3</property>
</packing>
</child>
+ <child>
+ <object class="GtkCheckButton" id="allowoverlap">
+ <property name="label" translatable="yes" context="wrappage|outside">Allow overlap</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">4</property>
+ </packing>
+ </child>
</object>
</child>
</object>