[Libreoffice-commits] core.git: sw/inc sw/Library_msword.mk sw/source
Michael Stahl
mstahl at redhat.com
Fri May 23 07:15:51 PDT 2014
sw/Library_msword.mk | 1 -
sw/inc/frmfmt.hxx | 2 ++
sw/source/core/layout/atrfrm.cxx | 25 +++++++++++++++++++++++++
sw/source/filter/ww8/wrtw8esh.cxx | 29 +----------------------------
4 files changed, 28 insertions(+), 29 deletions(-)
New commits:
commit 974492a0a02ade14d1ed300016fdf3be8ceef12e
Author: Michael Stahl <mstahl at redhat.com>
Date: Fri May 23 16:07:38 2014 +0200
sw: try not to include sw/souce/core stuff from sw/source/filter
Change-Id: I21f1de79ed0a6df73afc53d1c93450f9eef23ac6
diff --git a/sw/Library_msword.mk b/sw/Library_msword.mk
index 92e806d..ca49750 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 03bda2e..1b063ff 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 a829e74..583ccc7 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 858a721..a5bf48a 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)
More information about the Libreoffice-commits
mailing list