summaryrefslogtreecommitdiff
path: root/sw/source/core/doc
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/doc')
-rw-r--r--sw/source/core/doc/DocumentSettingManager.cxx5
-rw-r--r--sw/source/core/doc/textboxhelper.cxx10
2 files changed, 15 insertions, 0 deletions
diff --git a/sw/source/core/doc/DocumentSettingManager.cxx b/sw/source/core/doc/DocumentSettingManager.cxx
index 6970d1f8044e..02b927a55e3e 100644
--- a/sw/source/core/doc/DocumentSettingManager.cxx
+++ b/sw/source/core/doc/DocumentSettingManager.cxx
@@ -53,6 +53,7 @@ sw::DocumentSettingManager::DocumentSettingManager(SwDoc &rDoc)
// COMPATIBILITY FLAGS START
mbAddFlyOffsets(false),
+ mbAddVerticalFlyOffsets(false),
mbUseHiResolutionVirtualDevice(true),
mbMathBaselineAlignment(false), // default for *old* documents is 'off'
mbStylesNoDefault(false),
@@ -125,6 +126,7 @@ bool sw::DocumentSettingManager::get(/*[in]*/ DocumentSettingId id) const
case DocumentSettingId::PARA_SPACE_MAX_AT_PAGES: return mbParaSpaceMaxAtPages; //(n8Dummy1 & DUMMY_PARASPACEMAX_AT_PAGES);
case DocumentSettingId::TAB_COMPAT: return mbTabCompat; //(n8Dummy1 & DUMMY_TAB_COMPAT);
case DocumentSettingId::ADD_FLY_OFFSETS: return mbAddFlyOffsets; //(n8Dummy2 & DUMMY_ADD_FLY_OFFSETS);
+ case DocumentSettingId::ADD_VERTICAL_FLY_OFFSETS: return mbAddVerticalFlyOffsets;
case DocumentSettingId::ADD_EXT_LEADING: return mbAddExternalLeading; //(n8Dummy2 & DUMMY_ADD_EXTERNAL_LEADING);
case DocumentSettingId::USE_VIRTUAL_DEVICE: return mbUseVirtualDevice; //(n8Dummy1 & DUMMY_USE_VIRTUAL_DEVICE);
case DocumentSettingId::USE_HIRES_VIRTUAL_DEVICE: return mbUseHiResolutionVirtualDevice; //(n8Dummy2 & DUMMY_USE_HIRES_VIR_DEV);
@@ -196,6 +198,9 @@ void sw::DocumentSettingManager::set(/*[in]*/ DocumentSettingId id, /*[in]*/ boo
case DocumentSettingId::ADD_FLY_OFFSETS:
mbAddFlyOffsets = value;
break;
+ case DocumentSettingId::ADD_VERTICAL_FLY_OFFSETS:
+ mbAddVerticalFlyOffsets = value;
+ break;
case DocumentSettingId::ADD_EXT_LEADING:
mbAddExternalLeading = value;
break;
diff --git a/sw/source/core/doc/textboxhelper.cxx b/sw/source/core/doc/textboxhelper.cxx
index 57c64f107b26..e50c2385477b 100644
--- a/sw/source/core/doc/textboxhelper.cxx
+++ b/sw/source/core/doc/textboxhelper.cxx
@@ -27,6 +27,7 @@
#include <mvsave.hxx>
#include <sortedobjs.hxx>
#include <cntfrm.hxx>
+#include <fmtsrnd.hxx>
#include <editeng/unoprnms.hxx>
#include <editeng/charrotateitem.hxx>
@@ -264,6 +265,15 @@ sal_Int32 SwTextBoxHelper::getOrdNum(const SdrObject* pObject, std::set<const Sw
return pObject->GetOrdNum();
}
+void SwTextBoxHelper::getShapeWrapThrough(const SwFrameFormat* pTextBox, bool& rWrapThrough)
+{
+ std::map<SwFrameFormat*, SwFrameFormat*> aMap = findShapes(pTextBox->GetDoc());
+ std::map<SwFrameFormat*, SwFrameFormat*>::iterator it = aMap.find(const_cast<SwFrameFormat*>(pTextBox));
+ if (it != aMap.end())
+ // pTextBox is indeed a TextBox, it->second is its shape.
+ rWrapThrough = it->second->GetSurround().GetSurround() == SURROUND_THROUGHT;
+}
+
SwFrameFormat* SwTextBoxHelper::findTextBox(uno::Reference<drawing::XShape> xShape)
{
SwXShape* pShape = dynamic_cast<SwXShape*>(xShape.get());