LCOV - code coverage report
Current view: top level - sw/source/filter/ww8 - ww8graf.hxx (source / functions) Hit Total Coverage
Test: commit 0e63ca4fde4e446f346e35849c756a30ca294aab Lines: 4 4 100.0 %
Date: 2014-04-11 Functions: 2 2 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       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             : #include "writerhelper.hxx"
      26             : 
      27             : struct EscherShape
      28             : {
      29             :     sal_uLong mnEscherShapeOrder;
      30             :     sal_uLong mnNoInlines;
      31             :     // new member <mbInHeaderFooter>
      32             :     bool mbInHeaderFooter;
      33          82 :     EscherShape( sal_uLong nEscherShapeOrder,
      34             :                  bool _bInHeaderFooter )
      35             :         : mnEscherShapeOrder(nEscherShapeOrder),
      36             :           mnNoInlines(0),
      37          82 :           mbInHeaderFooter( _bInHeaderFooter )
      38          82 :     {}
      39             : };
      40             : 
      41          40 : class wwZOrderer
      42             : {
      43             : private:
      44             :     // consider that objects in page header/footer
      45             :     // are always behind objects in page body. Thus, assure, that in vector
      46             :     // <maEscherLayer> objects in page header|footer are inserted before
      47             :     // objects in page body - see method <GetEscherObjectPos(..)>.
      48             :     //No of objects in doc before starting (always 0 unless using file->insert
      49             :     //and probably 0 then as well
      50             :     std::vector<EscherShape> maEscherLayer;
      51             :     typedef std::vector<EscherShape>::iterator myeiter;
      52             : 
      53             :     std::vector<short> maDrawHeight;
      54             :     typedef std::vector<short>::iterator myditer;
      55             : 
      56             :     std::stack<sal_uInt16> maIndexes;
      57             : 
      58             :     sw::util::SetLayer maSetLayer;
      59             : 
      60             :     sal_uLong mnNoInitialObjects;
      61             :     sal_uLong mnInlines;
      62             :     SdrPage* mpDrawPg;
      63             :     const SvxMSDffShapeOrders *mpShapeOrders;
      64             : 
      65             :     sal_uInt16 GetEscherObjectIdx(sal_uLong nSpId);
      66             :     myeiter MapEscherIdxToIter(sal_uLong nIdx);
      67             :     // new parameter <_bInHeaderFooter>, indicating
      68             :     // that object is in header or footer
      69             :     sal_uLong GetEscherObjectPos( sal_uLong nSpId,
      70             :                               const bool _bInHeaderFooter );
      71             :     sal_uLong GetDrawingObjectPos(short nWwHeight);
      72             :     bool InsertObject(SdrObject *pObject, sal_uLong nPos);
      73             : public:
      74             :     wwZOrderer(const sw::util::SetLayer &rSetLayer, SdrPage* pDrawPg,
      75             :         const SvxMSDffShapeOrders *pShapeOrders);
      76             :     void InsertTextLayerObject(SdrObject* pObject);
      77             :     /*
      78             :      cmc: We should have have separate ZOrder classes for 95- and 97+ and
      79             :      instantiate the appropriate one at run time.
      80             :      */
      81             :     void InsertDrawingObject(SdrObject* pObj, short nWwHeight);
      82             :     // new parameter <_bInHeaderFooter>, indicating that object is in header or footer
      83             :     void InsertEscherObject( SdrObject* pObject,
      84             :                              sal_uLong nSpId,
      85             :                              const bool _bInHeaderFooter );
      86             :     void InsideEscher(sal_uLong nIndex);
      87             :     void OutsideEscher();
      88             : };
      89             : 
      90             : void WW8FSPAShadowToReal( WW8_FSPA_SHADOW* pFSPAS, WW8_FSPA* pPic );
      91             : #endif
      92             : 
      93             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10