LCOV - code coverage report
Current view: top level - xmloff/inc - xexptran.hxx (source / functions) Hit Total Coverage
Test: commit 0e63ca4fde4e446f346e35849c756a30ca294aab Lines: 11 11 100.0 %
Date: 2014-04-11 Functions: 11 11 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_XMLOFF_INC_XEXPTRAN_HXX
      21             : #define INCLUDED_XMLOFF_INC_XEXPTRAN_HXX
      22             : 
      23             : #include <rtl/ustring.hxx>
      24             : #include <com/sun/star/drawing/PolyPolygonBezierCoords.hpp>
      25             : #include <com/sun/star/drawing/PointSequence.hpp>
      26             : #include <com/sun/star/drawing/FlagSequence.hpp>
      27             : #include <com/sun/star/awt/Size.hpp>
      28             : #include <com/sun/star/drawing/HomogenMatrix.hpp>
      29             : #include <tools/mapunit.hxx>
      30             : 
      31             : #include <vector>
      32             : 
      33             : // predeclarations
      34             : 
      35             : struct ImpSdXMLExpTransObj2DBase;
      36             : struct ImpSdXMLExpTransObj3DBase;
      37             : class SvXMLUnitConverter;
      38             : class SvXMLImport;
      39             : class SvXMLExport;
      40             : 
      41             : namespace basegfx
      42             : {
      43             :     class B2DTuple;
      44             :     class B2DHomMatrix;
      45             :     class B3DHomMatrix;
      46             : } // end of namespace basegfx
      47             : 
      48             : typedef ::std::vector< ImpSdXMLExpTransObj2DBase* > ImpSdXMLExpTransObj2DBaseList;
      49             : typedef ::std::vector< ImpSdXMLExpTransObj3DBase* > ImpSdXMLExpTransObj3DBaseList;
      50             : 
      51             : class SdXMLImExTransform2D
      52             : {
      53             :     ImpSdXMLExpTransObj2DBaseList   maList;
      54             :     OUString                   msString;
      55             : 
      56             :     void EmptyList();
      57             : 
      58             : public:
      59         842 :     SdXMLImExTransform2D() {}
      60         842 :     ~SdXMLImExTransform2D() { EmptyList(); }
      61             : 
      62             :     void AddRotate(double fNew);
      63             :     void AddTranslate(const ::basegfx::B2DTuple& rNew);
      64             :     void AddSkewX(double fNew);
      65             : 
      66         566 :     bool NeedsAction() const { return !maList.empty(); }
      67             :     void GetFullTransform(::basegfx::B2DHomMatrix& rFullTrans);
      68             :     const OUString& GetExportString(const SvXMLUnitConverter& rConv);
      69             :     void SetString(const OUString& rNew, const SvXMLUnitConverter& rConv);
      70             : };
      71             : 
      72             : class SdXMLImExTransform3D
      73             : {
      74             :     ImpSdXMLExpTransObj3DBaseList   maList;
      75             :     OUString                   msString;
      76             : 
      77             :     void EmptyList();
      78             : 
      79             : public:
      80          87 :     SdXMLImExTransform3D() {}
      81             :     SdXMLImExTransform3D(const OUString& rNew, const SvXMLUnitConverter& rConv);
      82         114 :     ~SdXMLImExTransform3D() { EmptyList(); }
      83             : 
      84             :     void AddMatrix(const ::basegfx::B3DHomMatrix& rNew);
      85             : 
      86             :     void AddHomogenMatrix(const com::sun::star::drawing::HomogenMatrix& xHomMat);
      87         114 :     bool NeedsAction() const { return !maList.empty(); }
      88             :     void GetFullTransform(::basegfx::B3DHomMatrix& rFullTrans);
      89             :     bool GetFullHomogenTransform(com::sun::star::drawing::HomogenMatrix& xHomMat);
      90             :     const OUString& GetExportString(const SvXMLUnitConverter& rConv);
      91             :     void SetString(const OUString& rNew, const SvXMLUnitConverter& rConv);
      92             : };
      93             : 
      94         181 : class SdXMLImExViewBox
      95             : {
      96             :     OUString msString;
      97             :     double   mfX;
      98             :     double   mfY;
      99             :     double   mfW;
     100             :     double   mfH;
     101             : 
     102             : public:
     103             :     SdXMLImExViewBox(double fX = 0.0, double fY = 0.0, double fW = 1000.0, double fH = 1000.0);
     104             :     SdXMLImExViewBox(const OUString& rNew, const SvXMLUnitConverter& rConv);
     105             : 
     106         274 :     double GetX() const { return mfX; }
     107         274 :     double GetY() const { return mfY; }
     108         246 :     double GetWidth() const { return mfW; }
     109         246 :     double GetHeight() const { return mfH; }
     110             :     const OUString& GetExportString();
     111             : };
     112             : 
     113             : #endif  //  _XEXPTRANSFORM_HXX
     114             : 
     115             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10