update dev300-m58
[ooovba.git] / sw / source / filter / ww8 / ww8graf.hxx
blob4b76f6b0812bdc5c30431d88f4fc45be8098cd06
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: ww8graf.hxx,v $
10 * $Revision: 1.19 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
33 #ifndef _WW8GRAF_HXX
34 #define _WW8GRAF_HXX
36 #ifndef __SGI_STL_VECTOR
37 #include <vector>
38 #endif
39 #ifndef __SGI_STL_STACK
40 #include <stack>
41 #endif
42 #include "writerhelper.hxx"
44 struct EscherShape
46 ULONG mnEscherShapeOrder;
47 ULONG mnNoInlines;
48 // --> OD 2004-12-13 #117915# - new member <mbInHeaderFooter>
49 bool mbInHeaderFooter;
50 EscherShape( ULONG nEscherShapeOrder,
51 bool _bInHeaderFooter )
52 : mnEscherShapeOrder(nEscherShapeOrder),
53 mnNoInlines(0),
54 mbInHeaderFooter( _bInHeaderFooter )
56 // <--
59 class wwZOrderer
61 private:
62 // --> OD 2004-12-13 #117915# - consider that objects in page header/footer
63 // are always behind objects in page body. Thus, assure, that in vector
64 // <maEscherLayer> objects in page header|footer are inserted before
65 // objects in page body - see method <GetEscherObjectPos(..)>.
66 //No of objects in doc before starting (always 0 unless using file->insert
67 //and probably 0 then as well
68 std::vector<EscherShape> maEscherLayer;
69 // <--
70 typedef std::vector<EscherShape>::iterator myeiter;
72 std::vector<short> maDrawHeight;
73 typedef std::vector<short>::iterator myditer;
75 std::stack<USHORT> maIndexes;
77 sw::util::SetLayer maSetLayer;
79 ULONG mnNoInitialObjects;
80 ULONG mnInlines;
81 SdrPage* mpDrawPg;
82 const SvxMSDffShapeOrders *mpShapeOrders;
84 USHORT GetEscherObjectIdx(ULONG nSpId);
85 myeiter MapEscherIdxToIter(ULONG nIdx);
86 // --> OD 2004-12-13 #117915# - new parameter <_bInHeaderFooter>, indicating
87 // that object is in header or footer
88 ULONG GetEscherObjectPos( ULONG nSpId,
89 const bool _bInHeaderFooter );
90 // <--
91 ULONG GetDrawingObjectPos(short nWwHeight);
92 bool InsertObject(SdrObject *pObject, ULONG nPos);
93 public:
94 wwZOrderer(const sw::util::SetLayer &rSetLayer, SdrPage* pDrawPg,
95 const SvxMSDffShapeOrders *pShapeOrders);
96 void InsertTextLayerObject(SdrObject* pObject);
98 cmc: We should have have seperate ZOrder classes for 95- and 97+ and
99 instantiate the appropiate one at run time.
101 void InsertDrawingObject(SdrObject* pObj, short nWwHeight);
102 // --> OD 2004-12-13 #117915# - new parameter <_bInHeaderFooter>, indicating
103 // that object is in header or footer
104 void InsertEscherObject( SdrObject* pObject,
105 ULONG nSpId,
106 const bool _bInHeaderFooter );
107 // <--
108 void InsideEscher(ULONG nIndex);
109 void OutsideEscher();
112 void WW8FSPAShadowToReal( WW8_FSPA_SHADOW* pFSPAS, WW8_FSPA* pPic );
113 #endif
115 /* vi:set tabstop=4 shiftwidth=4 expandtab: */