1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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>
34 struct ImpSdXMLExpTransObj2DBase
;
35 struct ImpSdXMLExpTransObj3DBase
;
36 class SvXMLUnitConverter
;
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
;
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
;
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
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: */