summaryrefslogtreecommitdiff
path: root/sw/source/filter
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/filter')
-rw-r--r--sw/source/filter/ww8/ww8graf.cxx3
-rw-r--r--sw/source/filter/ww8/ww8graf.hxx6
-rw-r--r--sw/source/filter/ww8/ww8graf2.cxx9
3 files changed, 15 insertions, 3 deletions
diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index 89a3e8ac14f2..07ff4d41f730 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -2798,6 +2798,7 @@ SwFrameFormat* SwWW8ImplReader::Read_GrafLayer( tools::Long nGrafAnchorCp )
/* Need to make sure that the correct layer ordering is applied. */
// pass information, if object is in page header|footer to method.
m_xWWZOrder->InsertEscherObject( pObject, pF->nSpId,
+ pRecord->bDrawHell,
m_bIsHeader || m_bIsFooter );
}
else
@@ -3029,6 +3030,7 @@ SwFlyFrameFormat* SwWW8ImplReader::ConvertDrawTextToFly(SdrObject* &rpObject,
{
// pass information, if object is in page header|footer to method.
m_xWWZOrder->InsertEscherObject( rpOurNewObject, pF->nSpId,
+ pRecord->bDrawHell,
m_bIsHeader || m_bIsFooter );
}
}
@@ -3180,6 +3182,7 @@ SwFlyFrameFormat* SwWW8ImplReader::ImportReplaceableDrawables( SdrObject* &rpObj
{
// pass information, if object is in page header|footer to method.
m_xWWZOrder->InsertEscherObject( rpOurNewObject, pF->nSpId,
+ pRecord->bDrawHell,
m_bIsHeader || m_bIsFooter );
}
}
diff --git a/sw/source/filter/ww8/ww8graf.hxx b/sw/source/filter/ww8/ww8graf.hxx
index 3b05c53d2c5d..7058fd1af897 100644
--- a/sw/source/filter/ww8/ww8graf.hxx
+++ b/sw/source/filter/ww8/ww8graf.hxx
@@ -33,12 +33,14 @@ struct EscherShape
{
sal_uLong mnEscherShapeOrder;
sal_uLong mnNoInlines;
- // new member <mbInHeaderFooter>
+ bool mbInHellLayer;
bool mbInHeaderFooter;
EscherShape( sal_uLong nEscherShapeOrder,
+ bool bInHellLayer,
bool _bInHeaderFooter )
: mnEscherShapeOrder(nEscherShapeOrder),
mnNoInlines(0),
+ mbInHellLayer(bInHellLayer),
mbInHeaderFooter( _bInHeaderFooter )
{}
};
@@ -71,6 +73,7 @@ private:
// new parameter <_bInHeaderFooter>, indicating
// that object is in header or footer
sal_uLong GetEscherObjectPos( sal_uLong nSpId,
+ const bool bInHellLayer,
const bool _bInHeaderFooter );
sal_uLong GetDrawingObjectPos(short nWwHeight);
void InsertObject(SdrObject *pObject, sal_uLong nPos);
@@ -86,6 +89,7 @@ public:
// new parameter <_bInHeaderFooter>, indicating that object is in header or footer
void InsertEscherObject( SdrObject* pObject,
sal_uLong nSpId,
+ const bool bInHellLayer,
const bool _bInHeaderFooter );
void InsideEscher(sal_uLong nIndex);
void OutsideEscher();
diff --git a/sw/source/filter/ww8/ww8graf2.cxx b/sw/source/filter/ww8/ww8graf2.cxx
index 08ef81f6e397..13bf81c97c9f 100644
--- a/sw/source/filter/ww8/ww8graf2.cxx
+++ b/sw/source/filter/ww8/ww8graf2.cxx
@@ -69,9 +69,10 @@ void wwZOrderer::OutsideEscher()
// consider new parameter <_bInHeaderFooter>
void wwZOrderer::InsertEscherObject( SdrObject* pObject,
sal_uLong nSpId,
+ const bool bInHellLayer,
const bool _bInHeaderFooter )
{
- sal_uLong nInsertPos = GetEscherObjectPos( nSpId, _bInHeaderFooter );
+ sal_uLong nInsertPos = GetEscherObjectPos( nSpId, bInHellLayer, _bInHeaderFooter );
InsertObject(pObject, nInsertPos + mnNoInitialObjects + mnInlines);
}
@@ -100,6 +101,7 @@ sal_uInt16 wwZOrderer::GetEscherObjectIdx(sal_uLong nSpId)
// consider new parameter <_bInHeaderFooter>
sal_uLong wwZOrderer::GetEscherObjectPos( sal_uLong nSpId,
+ const bool bInHellLayer,
const bool _bInHeaderFooter )
{
/*
@@ -137,12 +139,15 @@ sal_uLong wwZOrderer::GetEscherObjectPos( sal_uLong nSpId,
{
break;
}
+ if ( bInHellLayer && !aIter->mbInHellLayer )
+ break;
+
if ( aIter->mnEscherShapeOrder > nFound )
break;
nRet += aIter->mnNoInlines+1;
++aIter;
}
- maEscherLayer.insert(aIter, EscherShape( nFound, _bInHeaderFooter ) );
+ maEscherLayer.insert(aIter, EscherShape( nFound, bInHellLayer, _bInHeaderFooter ) );
return nRet;
}