summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/Library_msword.mk1
-rw-r--r--sw/inc/frmfmt.hxx2
-rw-r--r--sw/source/core/layout/atrfrm.cxx25
-rw-r--r--sw/source/filter/ww8/wrtw8esh.cxx29
4 files changed, 28 insertions, 29 deletions
diff --git a/sw/Library_msword.mk b/sw/Library_msword.mk
index 92e806dd1071..ca4975049857 100644
--- a/sw/Library_msword.mk
+++ b/sw/Library_msword.mk
@@ -28,7 +28,6 @@ $(eval $(call gb_Library_use_custom_headers,msword,\
$(eval $(call gb_Library_set_precompiled_header,msword,$(SRCDIR)/sw/inc/pch/precompiled_msword))
$(eval $(call gb_Library_set_include,msword,\
- -I$(SRCDIR)/sw/source/core/inc \
-I$(SRCDIR)/sw/source/filter/inc \
-I$(SRCDIR)/sw/inc \
$$(INCLUDE) \
diff --git a/sw/inc/frmfmt.hxx b/sw/inc/frmfmt.hxx
index 03bda2e96c29..1b063ff4a077 100644
--- a/sw/inc/frmfmt.hxx
+++ b/sw/inc/frmfmt.hxx
@@ -295,6 +295,8 @@ public:
DECL_FIXEDMEMPOOL_NEWDEL(SwDrawFrmFmt);
};
+SW_DLLPUBLIC bool IsFlyFrmFmtInHeader(const SwFrmFmt& rFmt);
+
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index a829e7478d6d..583ccc793138 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -3304,4 +3304,29 @@ FillAttributesPtr SwFrmFmt::getFillAttributes() const
return maFillAttributes;
}
+bool IsFlyFrmFmtInHeader(const SwFrmFmt& rFmt)
+{
+ const SwFlyFrmFmt* pFlyFrmFmt = dynamic_cast<const SwFlyFrmFmt*>(&rFmt);
+ if (!pFlyFrmFmt)
+ return false;
+ SwFlyFrm* pFlyFrm = const_cast<SwFlyFrm*>(pFlyFrmFmt->GetFrm());
+ if (!pFlyFrm) // fdo#54648: "hidden" drawing object has no layout frame
+ {
+ return false;
+ }
+ SwPageFrm* pPageFrm = pFlyFrm->FindPageFrmOfAnchor();
+ SwFrm* pHeader = pPageFrm->Lower();
+ if (pHeader->GetType() == FRM_HEADER)
+ {
+ const SwFrm* pFrm = pFlyFrm->GetAnchorFrm();
+ while (pFrm)
+ {
+ if (pFrm == pHeader)
+ return true;
+ pFrm = pFrm->GetUpper();
+ }
+ }
+ return false;
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx
index 858a721bf79b..a5bf48ade882 100644
--- a/sw/source/filter/ww8/wrtw8esh.cxx
+++ b/sw/source/filter/ww8/wrtw8esh.cxx
@@ -58,8 +58,6 @@
#include <fmtfollowtextflow.hxx>
#include <dcontact.hxx>
#include <frmfmt.hxx>
-#include <flyfrm.hxx>
-#include <pagefrm.hxx>
#include <frmatr.hxx>
#include <fmtcntnt.hxx>
#include <ndindex.hxx>
@@ -1893,31 +1891,6 @@ void SwBasicEscherEx::WriteBrushAttr(const SvxBrushItem &rBrush,
}
}
-static bool lcl_isInHeader(const SwFrmFmt& rFmt)
-{
- const SwFlyFrmFmt* pFlyFrmFmt = dynamic_cast<const SwFlyFrmFmt*>(&rFmt);
- if (!pFlyFrmFmt)
- return false;
- SwFlyFrm* pFlyFrm = const_cast<SwFlyFrm*>(pFlyFrmFmt->GetFrm());
- if (!pFlyFrm) // fdo#54648: "hidden" drawing object has no layout frame
- {
- return false;
- }
- SwPageFrm* pPageFrm = pFlyFrm->FindPageFrmOfAnchor();
- SwFrm* pHeader = pPageFrm->Lower();
- if (pHeader->GetType() == FRM_HEADER)
- {
- const SwFrm* pFrm = pFlyFrm->GetAnchorFrm();
- while (pFrm)
- {
- if (pFrm == pHeader)
- return true;
- pFrm = pFrm->GetUpper();
- }
- }
- return false;
-}
-
sal_Int32 SwBasicEscherEx::WriteFlyFrameAttr(const SwFrmFmt& rFmt,
MSO_SPT eShapeType, EscherPropertyContainer& rPropOpt)
{
@@ -2061,7 +2034,7 @@ sal_Int32 SwBasicEscherEx::WriteFlyFrameAttr(const SwFrmFmt& rFmt,
// SwWW8ImplReader::Read_GrafLayer() imports these as opaque
// unconditionally, so if both are true, don't export the property.
- bool bIsInHeader = lcl_isInHeader(rFmt);
+ bool bIsInHeader = IsFlyFrmFmtInHeader(rFmt);
bool bIsThrought = rFmt.GetSurround().GetValue() == SURROUND_THROUGHT;
if (bIsInHeader)