nss: upgrade to release 3.73
[LibreOffice.git] / sw / source / filter / ww8 / ww8graf.hxx
blob3b05c53d2c5d8c66fb93c580e6ec6fe0bcc51e73
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_SW_SOURCE_FILTER_WW8_WW8GRAF_HXX
21 #define INCLUDED_SW_SOURCE_FILTER_WW8_WW8GRAF_HXX
23 #include <vector>
24 #include <stack>
26 #include <filter/msfilter/msdffimp.hxx>
27 #include <svx/svdpage.hxx>
29 #include "writerhelper.hxx"
30 #include "ww8struc.hxx"
32 struct EscherShape
34 sal_uLong mnEscherShapeOrder;
35 sal_uLong mnNoInlines;
36 // new member <mbInHeaderFooter>
37 bool mbInHeaderFooter;
38 EscherShape( sal_uLong nEscherShapeOrder,
39 bool _bInHeaderFooter )
40 : mnEscherShapeOrder(nEscherShapeOrder),
41 mnNoInlines(0),
42 mbInHeaderFooter( _bInHeaderFooter )
46 class wwZOrderer
48 private:
49 // consider that objects in page header/footer
50 // are always behind objects in page body. Thus, assure, that in vector
51 // <maEscherLayer> objects in page header|footer are inserted before
52 // objects in page body - see method <GetEscherObjectPos(..)>.
53 //No of objects in doc before starting (always 0 unless using file->insert
54 //and probably 0 then as well
55 std::vector<EscherShape> maEscherLayer;
56 typedef std::vector<EscherShape>::iterator myeiter;
58 std::vector<short> maDrawHeight;
60 std::stack<sal_uInt16> maIndexes;
62 sw::util::SetLayer maSetLayer;
64 sal_uLong mnNoInitialObjects;
65 sal_uLong mnInlines;
66 SdrPage* mpDrawPg;
67 const SvxMSDffShapeOrders *mpShapeOrders;
69 sal_uInt16 GetEscherObjectIdx(sal_uLong nSpId);
70 myeiter MapEscherIdxToIter(sal_uLong nIdx);
71 // new parameter <_bInHeaderFooter>, indicating
72 // that object is in header or footer
73 sal_uLong GetEscherObjectPos( sal_uLong nSpId,
74 const bool _bInHeaderFooter );
75 sal_uLong GetDrawingObjectPos(short nWwHeight);
76 void InsertObject(SdrObject *pObject, sal_uLong nPos);
77 public:
78 wwZOrderer(const sw::util::SetLayer &rSetLayer, SdrPage* pDrawPg,
79 const SvxMSDffShapeOrders *pShapeOrders);
80 void InsertTextLayerObject(SdrObject* pObject);
82 We should have separate ZOrder classes for 95- and 97+ and
83 instantiate the appropriate one at run time.
85 void InsertDrawingObject(SdrObject* pObj, short nWwHeight);
86 // new parameter <_bInHeaderFooter>, indicating that object is in header or footer
87 void InsertEscherObject( SdrObject* pObject,
88 sal_uLong nSpId,
89 const bool _bInHeaderFooter );
90 void InsideEscher(sal_uLong nIndex);
91 void OutsideEscher();
94 void WW8FSPAShadowToReal( WW8_FSPA_SHADOW const * pFSPAS, WW8_FSPA* pPic );
95 #endif
97 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */