LCOV - code coverage report
Current view: top level - sw/source/filter/ww8 - ww8graf.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 4 4 100.0 %
Date: 2012-08-25 Functions: 2 2 100.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2                 :            : /*************************************************************************
       3                 :            :  *
       4                 :            :  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       5                 :            :  *
       6                 :            :  * Copyright 2000, 2010 Oracle and/or its affiliates.
       7                 :            :  *
       8                 :            :  * OpenOffice.org - a multi-platform office productivity suite
       9                 :            :  *
      10                 :            :  * This file is part of OpenOffice.org.
      11                 :            :  *
      12                 :            :  * OpenOffice.org is free software: you can redistribute it and/or modify
      13                 :            :  * it under the terms of the GNU Lesser General Public License version 3
      14                 :            :  * only, as published by the Free Software Foundation.
      15                 :            :  *
      16                 :            :  * OpenOffice.org is distributed in the hope that it will be useful,
      17                 :            :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      18                 :            :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      19                 :            :  * GNU Lesser General Public License version 3 for more details
      20                 :            :  * (a copy is included in the LICENSE file that accompanied this code).
      21                 :            :  *
      22                 :            :  * You should have received a copy of the GNU Lesser General Public License
      23                 :            :  * version 3 along with OpenOffice.org.  If not, see
      24                 :            :  * <http://www.openoffice.org/license.html>
      25                 :            :  * for a copy of the LGPLv3 License.
      26                 :            :  *
      27                 :            :  ************************************************************************/
      28                 :            : 
      29                 :            : #ifndef _WW8GRAF_HXX
      30                 :            : #define _WW8GRAF_HXX
      31                 :            : 
      32                 :            : #include <vector>
      33                 :            : #include <stack>
      34                 :            : #include "writerhelper.hxx"
      35                 :            : 
      36                 :            : struct EscherShape
      37                 :            : {
      38                 :            :     sal_uLong mnEscherShapeOrder;
      39                 :            :     sal_uLong mnNoInlines;
      40                 :            :     // new member <mbInHeaderFooter>
      41                 :            :     bool mbInHeaderFooter;
      42                 :        141 :     EscherShape( sal_uLong nEscherShapeOrder,
      43                 :            :                  bool _bInHeaderFooter )
      44                 :            :         : mnEscherShapeOrder(nEscherShapeOrder),
      45                 :            :           mnNoInlines(0),
      46                 :        141 :           mbInHeaderFooter( _bInHeaderFooter )
      47                 :        141 :     {}
      48                 :            : };
      49                 :            : 
      50                 :         42 : class wwZOrderer
      51                 :            : {
      52                 :            : private:
      53                 :            :     // consider that objects in page header/footer
      54                 :            :     // are always behind objects in page body. Thus, assure, that in vector
      55                 :            :     // <maEscherLayer> objects in page header|footer are inserted before
      56                 :            :     // objects in page body - see method <GetEscherObjectPos(..)>.
      57                 :            :     //No of objects in doc before starting (always 0 unless using file->insert
      58                 :            :     //and probably 0 then as well
      59                 :            :     std::vector<EscherShape> maEscherLayer;
      60                 :            :     typedef std::vector<EscherShape>::iterator myeiter;
      61                 :            : 
      62                 :            :     std::vector<short> maDrawHeight;
      63                 :            :     typedef std::vector<short>::iterator myditer;
      64                 :            : 
      65                 :            :     std::stack<sal_uInt16> maIndexes;
      66                 :            : 
      67                 :            :     sw::util::SetLayer maSetLayer;
      68                 :            : 
      69                 :            :     sal_uLong mnNoInitialObjects;
      70                 :            :     sal_uLong mnInlines;
      71                 :            :     SdrPage* mpDrawPg;
      72                 :            :     const SvxMSDffShapeOrders *mpShapeOrders;
      73                 :            : 
      74                 :            :     sal_uInt16 GetEscherObjectIdx(sal_uLong nSpId);
      75                 :            :     myeiter MapEscherIdxToIter(sal_uLong nIdx);
      76                 :            :     // new parameter <_bInHeaderFooter>, indicating
      77                 :            :     // that object is in header or footer
      78                 :            :     sal_uLong GetEscherObjectPos( sal_uLong nSpId,
      79                 :            :                               const bool _bInHeaderFooter );
      80                 :            :     sal_uLong GetDrawingObjectPos(short nWwHeight);
      81                 :            :     bool InsertObject(SdrObject *pObject, sal_uLong nPos);
      82                 :            : public:
      83                 :            :     wwZOrderer(const sw::util::SetLayer &rSetLayer, SdrPage* pDrawPg,
      84                 :            :         const SvxMSDffShapeOrders *pShapeOrders);
      85                 :            :     void InsertTextLayerObject(SdrObject* pObject);
      86                 :            :     /*
      87                 :            :      cmc: We should have have seperate ZOrder classes for 95- and 97+ and
      88                 :            :      instantiate the appropriate one at run time.
      89                 :            :      */
      90                 :            :     void InsertDrawingObject(SdrObject* pObj, short nWwHeight);
      91                 :            :     // new parameter <_bInHeaderFooter>, indicating that object is in header or footer
      92                 :            :     void InsertEscherObject( SdrObject* pObject,
      93                 :            :                              sal_uLong nSpId,
      94                 :            :                              const bool _bInHeaderFooter );
      95                 :            :     void InsideEscher(sal_uLong nIndex);
      96                 :            :     void OutsideEscher();
      97                 :            : };
      98                 :            : 
      99                 :            : void WW8FSPAShadowToReal( WW8_FSPA_SHADOW* pFSPAS, WW8_FSPA* pPic );
     100                 :            : #endif
     101                 :            : 
     102                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10