LibreOffice Module sw (master)  1
ww8graf.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 
20 #ifndef INCLUDED_SW_SOURCE_FILTER_WW8_WW8GRAF_HXX
21 #define INCLUDED_SW_SOURCE_FILTER_WW8_WW8GRAF_HXX
22 
23 #include <vector>
24 #include <stack>
25 
27 #include <svx/svdpage.hxx>
28 
29 #include "writerhelper.hxx"
30 #include "ww8struc.hxx"
31 
33 {
38  EscherShape( sal_uLong nEscherShapeOrder,
39  bool bInHellLayer,
40  bool _bInHeaderFooter )
41  : mnEscherShapeOrder(nEscherShapeOrder),
42  mnNoInlines(0),
43  mbInHellLayer(bInHellLayer),
44  mbInHeaderFooter( _bInHeaderFooter )
45  {}
46 };
47 
49 {
50 private:
51  // consider that objects in page header/footer
52  // are always behind objects in page body. Thus, assure, that in vector
53  // <maEscherLayer> objects in page header|footer are inserted before
54  // objects in page body - see method <GetEscherObjectPos(..)>.
55  //No of objects in doc before starting (always 0 unless using file->insert
56  //and probably 0 then as well
57  std::vector<EscherShape> maEscherLayer;
58  typedef std::vector<EscherShape>::iterator myeiter;
59 
60  std::vector<short> maDrawHeight;
61 
62  std::stack<sal_uInt16> maIndexes;
63 
65 
70 
71  sal_uInt16 GetEscherObjectIdx(sal_uLong nSpId);
72  myeiter MapEscherIdxToIter(sal_uLong nIdx);
73  // new parameter <_bInHeaderFooter>, indicating
74  // that object is in header or footer
76  const bool bInHellLayer,
77  const bool _bInHeaderFooter );
78  sal_uLong GetDrawingObjectPos(short nWwHeight);
79  void InsertObject(SdrObject *pObject, sal_uLong nPos);
80 public:
81  wwZOrderer(const sw::util::SetLayer &rSetLayer, SdrPage* pDrawPg,
82  const SvxMSDffShapeOrders *pShapeOrders);
83  void InsertTextLayerObject(SdrObject* pObject);
84  /*
85  We should have separate ZOrder classes for 95- and 97+ and
86  instantiate the appropriate one at run time.
87  */
88  void InsertDrawingObject(SdrObject* pObj, short nWwHeight);
89  // new parameter <_bInHeaderFooter>, indicating that object is in header or footer
90  void InsertEscherObject( SdrObject* pObject,
91  sal_uLong nSpId,
92  const bool bInHellLayer,
93  const bool _bInHeaderFooter );
94  void InsideEscher(sal_uLong nIndex);
95  void OutsideEscher();
96 };
97 
98 void WW8FSPAShadowToReal(const WW8_FSPA_SHADOW& rFSPAS, WW8_FSPA& rPic);
99 #endif
100 
101 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void OutsideEscher()
Definition: ww8graf2.cxx:64
const SvxMSDffShapeOrders * mpShapeOrders
Definition: ww8graf.hxx:69
void InsertTextLayerObject(SdrObject *pObject)
Definition: ww8graf2.cxx:177
sal_uIntPtr sal_uLong
sal_uLong mnEscherShapeOrder
Definition: ww8graf.hxx:34
void WW8FSPAShadowToReal(const WW8_FSPA_SHADOW &rFSPAS, WW8_FSPA &rPic)
Definition: ww8graf2.cxx:763
std::vector< std::unique_ptr< SvxMSDffShapeOrder > > SvxMSDffShapeOrders
std::vector< EscherShape >::iterator myeiter
Definition: ww8graf.hxx:58
std::vector< short > maDrawHeight
Definition: ww8graf.hxx:60
sal_uInt16 GetEscherObjectIdx(sal_uLong nSpId)
Definition: ww8graf2.cxx:85
Make setting a drawing object's layer in a Writer document easy.
myeiter MapEscherIdxToIter(sal_uLong nIdx)
Definition: ww8graf2.cxx:79
sal_uLong GetEscherObjectPos(sal_uLong nSpId, const bool bInHellLayer, const bool _bInHeaderFooter)
Definition: ww8graf2.cxx:103
EscherShape(sal_uLong nEscherShapeOrder, bool bInHellLayer, bool _bInHeaderFooter)
Definition: ww8graf.hxx:38
void InsertObject(SdrObject *pObject, sal_uLong nPos)
Definition: ww8graf2.cxx:224
sal_uLong mnNoInlines
Definition: ww8graf.hxx:35
wwZOrderer(const sw::util::SetLayer &rSetLayer, SdrPage *pDrawPg, const SvxMSDffShapeOrders *pShapeOrders)
Definition: ww8graf2.cxx:50
void InsertDrawingObject(SdrObject *pObj, short nWwHeight)
Definition: ww8graf2.cxx:166
sw::util::SetLayer maSetLayer
Definition: ww8graf.hxx:64
sal_uLong GetDrawingObjectPos(short nWwHeight)
Definition: ww8graf2.cxx:214
SdrPage * mpDrawPg
Definition: ww8graf.hxx:68
sal_uLong mnInlines
Definition: ww8graf.hxx:67
bool mbInHellLayer
Definition: ww8graf.hxx:36
bool mbInHeaderFooter
Definition: ww8graf.hxx:37
void InsideEscher(sal_uLong nIndex)
Definition: ww8graf2.cxx:59
void InsertEscherObject(SdrObject *pObject, sal_uLong nSpId, const bool bInHellLayer, const bool _bInHeaderFooter)
Definition: ww8graf2.cxx:70
sal_uLong mnNoInitialObjects
Definition: ww8graf.hxx:66
std::stack< sal_uInt16 > maIndexes
Definition: ww8graf.hxx:62
std::vector< EscherShape > maEscherLayer
Definition: ww8graf.hxx:57