build fix: no comphelper/profilezone.hxx in this branch
[LibreOffice.git] / xmloff / inc / xexptran.hxx
blob3242d5211e3f0df10929b0a5ceeecbd101bcd35c
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_XMLOFF_INC_XEXPTRAN_HXX
21 #define INCLUDED_XMLOFF_INC_XEXPTRAN_HXX
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>
31 #include <memory>
32 #include <vector>
34 struct ImpSdXMLExpTransObj2DBase;
35 struct ImpSdXMLExpTransObj3DBase;
36 class SvXMLUnitConverter;
37 class SvXMLImport;
38 class SvXMLExport;
40 namespace basegfx
42 class B2DTuple;
43 class B2DHomMatrix;
44 class B3DHomMatrix;
47 class SdXMLImExTransform2D
49 // NOTE: This uses shared_ptr, because with unique_ptr the code
50 // fails to compile because of incomplete type.
51 std::vector< std::shared_ptr< ImpSdXMLExpTransObj2DBase > > maList;
52 OUString msString;
54 public:
55 SdXMLImExTransform2D() {}
57 void AddRotate(double fNew);
58 void AddTranslate(const ::basegfx::B2DTuple& rNew);
59 void AddSkewX(double fNew);
61 bool NeedsAction() const { return !maList.empty(); }
62 void GetFullTransform(::basegfx::B2DHomMatrix& rFullTrans);
63 const OUString& GetExportString(const SvXMLUnitConverter& rConv);
64 void SetString(const OUString& rNew, const SvXMLUnitConverter& rConv);
67 class SdXMLImExTransform3D
69 // NOTE: This uses shared_ptr, because with unique_ptr the code
70 // fails to compile because of incomplete type.
71 std::vector< std::shared_ptr< ImpSdXMLExpTransObj3DBase > > maList;
72 OUString msString;
74 public:
75 SdXMLImExTransform3D() {}
76 SdXMLImExTransform3D(const OUString& rNew, const SvXMLUnitConverter& rConv);
78 void AddMatrix(const ::basegfx::B3DHomMatrix& rNew);
80 void AddHomogenMatrix(const css::drawing::HomogenMatrix& xHomMat);
81 bool NeedsAction() const { return !maList.empty(); }
82 void GetFullTransform(::basegfx::B3DHomMatrix& rFullTrans);
83 bool GetFullHomogenTransform(css::drawing::HomogenMatrix& xHomMat);
84 const OUString& GetExportString(const SvXMLUnitConverter& rConv);
85 void SetString(const OUString& rNew, const SvXMLUnitConverter& rConv);
88 class SdXMLImExViewBox
90 OUString msString;
91 double mfX;
92 double mfY;
93 double mfW;
94 double mfH;
96 public:
97 SdXMLImExViewBox(double fX, double fY, double fW, double fH);
98 SdXMLImExViewBox(const OUString& rNew, const SvXMLUnitConverter& rConv);
100 double GetX() const { return mfX; }
101 double GetY() const { return mfY; }
102 double GetWidth() const { return mfW; }
103 double GetHeight() const { return mfH; }
104 const OUString& GetExportString();
107 #endif // _XEXPTRANSFORM_HXX
109 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */