Kaydet (Commit) 974492a0 authored tarafından Michael Stahl's avatar Michael Stahl

sw: try not to include sw/souce/core stuff from sw/source/filter

Change-Id: I21f1de79ed0a6df73afc53d1c93450f9eef23ac6
üst 68ec7f48
...@@ -28,7 +28,6 @@ $(eval $(call gb_Library_use_custom_headers,msword,\ ...@@ -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_precompiled_header,msword,$(SRCDIR)/sw/inc/pch/precompiled_msword))
$(eval $(call gb_Library_set_include,msword,\ $(eval $(call gb_Library_set_include,msword,\
-I$(SRCDIR)/sw/source/core/inc \
-I$(SRCDIR)/sw/source/filter/inc \ -I$(SRCDIR)/sw/source/filter/inc \
-I$(SRCDIR)/sw/inc \ -I$(SRCDIR)/sw/inc \
$$(INCLUDE) \ $$(INCLUDE) \
......
...@@ -295,6 +295,8 @@ public: ...@@ -295,6 +295,8 @@ public:
DECL_FIXEDMEMPOOL_NEWDEL(SwDrawFrmFmt); DECL_FIXEDMEMPOOL_NEWDEL(SwDrawFrmFmt);
}; };
SW_DLLPUBLIC bool IsFlyFrmFmtInHeader(const SwFrmFmt& rFmt);
#endif #endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -3304,4 +3304,29 @@ FillAttributesPtr SwFrmFmt::getFillAttributes() const ...@@ -3304,4 +3304,29 @@ FillAttributesPtr SwFrmFmt::getFillAttributes() const
return maFillAttributes; 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: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -58,8 +58,6 @@ ...@@ -58,8 +58,6 @@
#include <fmtfollowtextflow.hxx> #include <fmtfollowtextflow.hxx>
#include <dcontact.hxx> #include <dcontact.hxx>
#include <frmfmt.hxx> #include <frmfmt.hxx>
#include <flyfrm.hxx>
#include <pagefrm.hxx>
#include <frmatr.hxx> #include <frmatr.hxx>
#include <fmtcntnt.hxx> #include <fmtcntnt.hxx>
#include <ndindex.hxx> #include <ndindex.hxx>
...@@ -1893,31 +1891,6 @@ void SwBasicEscherEx::WriteBrushAttr(const SvxBrushItem &rBrush, ...@@ -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, sal_Int32 SwBasicEscherEx::WriteFlyFrameAttr(const SwFrmFmt& rFmt,
MSO_SPT eShapeType, EscherPropertyContainer& rPropOpt) MSO_SPT eShapeType, EscherPropertyContainer& rPropOpt)
{ {
...@@ -2061,7 +2034,7 @@ sal_Int32 SwBasicEscherEx::WriteFlyFrameAttr(const SwFrmFmt& rFmt, ...@@ -2061,7 +2034,7 @@ sal_Int32 SwBasicEscherEx::WriteFlyFrameAttr(const SwFrmFmt& rFmt,
// SwWW8ImplReader::Read_GrafLayer() imports these as opaque // SwWW8ImplReader::Read_GrafLayer() imports these as opaque
// unconditionally, so if both are true, don't export the property. // 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; bool bIsThrought = rFmt.GetSurround().GetValue() == SURROUND_THROUGHT;
if (bIsInHeader) if (bIsInHeader)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment