LibreOffice Module xmloff (master)  1
xexptran.hxx
Go to the documentation of this file.
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/HomogenMatrix.hpp>
25 
26 #include <memory>
27 #include <vector>
28 
31 class SvXMLUnitConverter;
32 class SvXMLImport;
33 class SvXMLExport;
34 
35 namespace basegfx
36 {
37  class B2DTuple;
38  class B2DHomMatrix;
39  class B3DHomMatrix;
40 }
41 
43 {
44  // NOTE: This uses shared_ptr, because with unique_ptr the code
45  // fails to compile because of incomplete type.
46  std::vector< std::shared_ptr< ImpSdXMLExpTransObj2DBase > > maList;
47  OUString msString;
48 
49 public:
51 
52  void AddRotate(double fNew);
53  void AddTranslate(const ::basegfx::B2DTuple& rNew);
54  void AddSkewX(double fNew);
55 
56  bool NeedsAction() const { return !maList.empty(); }
57  void GetFullTransform(::basegfx::B2DHomMatrix& rFullTrans);
58  const OUString& GetExportString(const SvXMLUnitConverter& rConv);
59  void SetString(const OUString& rNew, const SvXMLUnitConverter& rConv);
60 };
61 
63 {
64  // NOTE: This uses shared_ptr, because with unique_ptr the code
65  // fails to compile because of incomplete type.
66  std::vector< std::shared_ptr< ImpSdXMLExpTransObj3DBase > > maList;
67  OUString msString;
68 
69 public:
71  SdXMLImExTransform3D(const OUString& rNew, const SvXMLUnitConverter& rConv);
72 
73  void AddMatrix(const ::basegfx::B3DHomMatrix& rNew);
74 
75  void AddHomogenMatrix(const css::drawing::HomogenMatrix& xHomMat);
76  bool NeedsAction() const { return !maList.empty(); }
77  void GetFullTransform(::basegfx::B3DHomMatrix& rFullTrans);
78  bool GetFullHomogenTransform(css::drawing::HomogenMatrix& xHomMat);
79  const OUString& GetExportString(const SvXMLUnitConverter& rConv);
80  void SetString(const OUString& rNew, const SvXMLUnitConverter& rConv);
81 };
82 
84 {
85  OUString msString;
86  double mfX;
87  double mfY;
88  double mfW;
89  double mfH;
90 
91 public:
92  SdXMLImExViewBox(double fX, double fY, double fW, double fH);
93  SdXMLImExViewBox(const OUString& rNew, const SvXMLUnitConverter& rConv);
94 
95  double GetX() const { return mfX; }
96  double GetY() const { return mfY; }
97  double GetWidth() const { return mfW; }
98  double GetHeight() const { return mfH; }
99  const OUString& GetExportString();
100 };
101 
102 #endif // _XEXPTRANSFORM_HXX
103 
104 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void GetFullTransform(::basegfx::B3DHomMatrix &rFullTrans)
Definition: xexptran.cxx:936
void AddRotate(double fNew)
Definition: xexptran.cxx:228
bool NeedsAction() const
Definition: xexptran.hxx:56
OUString msString
Definition: xexptran.hxx:85
the SvXMLTypeConverter converts values of various types from their internal representation to the tex...
Definition: xmluconv.hxx:77
std::vector< std::shared_ptr< ImpSdXMLExpTransObj3DBase > > maList
Definition: xexptran.hxx:66
double GetWidth() const
Definition: xexptran.hxx:97
std::vector< std::shared_ptr< ImpSdXMLExpTransObj2DBase > > maList
Definition: xexptran.hxx:46
bool GetFullHomogenTransform(css::drawing::HomogenMatrix &xHomMat)
Definition: xexptran.cxx:922
const OUString & GetExportString()
Definition: xexptran.cxx:1036
void SetString(const OUString &rNew, const SvXMLUnitConverter &rConv)
Definition: xexptran.cxx:756
const OUString & GetExportString(const SvXMLUnitConverter &rConv)
Definition: xexptran.cxx:247
const OUString & GetExportString(const SvXMLUnitConverter &rConv)
Definition: xexptran.cxx:620
void SetString(const OUString &rNew, const SvXMLUnitConverter &rConv)
Definition: xexptran.cxx:349
void AddMatrix(const ::basegfx::B3DHomMatrix &rNew)
Definition: xexptran.cxx:608
bool NeedsAction() const
Definition: xexptran.hxx:76
void AddTranslate(const ::basegfx::B2DTuple &rNew)
Definition: xexptran.cxx:234
SdXMLImExViewBox(double fX, double fY, double fW, double fH)
Definition: xexptran.cxx:987
void AddHomogenMatrix(const css::drawing::HomogenMatrix &xHomMat)
Definition: xexptran.cxx:614
double GetHeight() const
Definition: xexptran.hxx:98
void GetFullTransform(::basegfx::B2DHomMatrix &rFullTrans)
Definition: xexptran.cxx:482
void AddSkewX(double fNew)
Definition: xexptran.cxx:240
double GetX() const
Definition: xexptran.hxx:95
double GetY() const
Definition: xexptran.hxx:96