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 {
36  // new member <mbInHeaderFooter>
38  EscherShape( sal_uLong nEscherShapeOrder,
39  bool _bInHeaderFooter )
40  : mnEscherShapeOrder(nEscherShapeOrder),
41  mnNoInlines(0),
42  mbInHeaderFooter( _bInHeaderFooter )
43  {}
44 };
45 
47 {
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;
57 
58  std::vector<short> maDrawHeight;
59 
60  std::stack<sal_uInt16> maIndexes;
61 
63 
68 
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
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);
81  /*
82  We should have separate ZOrder classes for 95- and 97+ and
83  instantiate the appropriate one at run time.
84  */
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();
92 };
93 
94 void WW8FSPAShadowToReal( WW8_FSPA_SHADOW const * pFSPAS, WW8_FSPA* pPic );
95 #endif
96 
97 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void OutsideEscher()
Definition: ww8graf2.cxx:72
const SvxMSDffShapeOrders * mpShapeOrders
Definition: ww8graf.hxx:67
void InsertTextLayerObject(SdrObject *pObject)
Definition: ww8graf2.cxx:170
sal_uIntPtr sal_uLong
sal_uLong mnEscherShapeOrder
Definition: ww8graf.hxx:34
std::vector< std::unique_ptr< SvxMSDffShapeOrder > > SvxMSDffShapeOrders
std::vector< EscherShape >::iterator myeiter
Definition: ww8graf.hxx:56
EscherShape(sal_uLong nEscherShapeOrder, bool _bInHeaderFooter)
Definition: ww8graf.hxx:38
std::vector< short > maDrawHeight
Definition: ww8graf.hxx:58
sal_uInt16 GetEscherObjectIdx(sal_uLong nSpId)
Definition: ww8graf2.cxx:92
Make setting a drawing object's layer in a Writer document easy.
myeiter MapEscherIdxToIter(sal_uLong nIdx)
Definition: ww8graf2.cxx:86
sal_uLong GetEscherObjectPos(sal_uLong nSpId, const bool _bInHeaderFooter)
Definition: ww8graf2.cxx:110
void InsertObject(SdrObject *pObject, sal_uLong nPos)
Definition: ww8graf2.cxx:217
void WW8FSPAShadowToReal(WW8_FSPA_SHADOW const *pFSPAS, WW8_FSPA *pPic)
Definition: ww8graf2.cxx:756
sw::util::SetLayer const maSetLayer
Definition: ww8graf.hxx:62
sal_uLong mnNoInlines
Definition: ww8graf.hxx:35
void InsertEscherObject(SdrObject *pObject, sal_uLong nSpId, const bool _bInHeaderFooter)
Definition: ww8graf2.cxx:78
wwZOrderer(const sw::util::SetLayer &rSetLayer, SdrPage *pDrawPg, const SvxMSDffShapeOrders *pShapeOrders)
Definition: ww8graf2.cxx:58
void InsertDrawingObject(SdrObject *pObj, short nWwHeight)
Definition: ww8graf2.cxx:159
sal_uLong GetDrawingObjectPos(short nWwHeight)
Definition: ww8graf2.cxx:207
SdrPage * mpDrawPg
Definition: ww8graf.hxx:66
sal_uLong mnInlines
Definition: ww8graf.hxx:65
bool mbInHeaderFooter
Definition: ww8graf.hxx:37
void InsideEscher(sal_uLong nIndex)
Definition: ww8graf2.cxx:67
sal_uLong mnNoInitialObjects
Definition: ww8graf.hxx:64
std::stack< sal_uInt16 > maIndexes
Definition: ww8graf.hxx:60
std::vector< EscherShape > maEscherLayer
Definition: ww8graf.hxx:55