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 #pragma once
21 
22 #include <rtl/ustring.hxx>
23 #include <com/sun/star/drawing/HomogenMatrix.hpp>
24 
25 #include <memory>
26 #include <vector>
27 
30 class SvXMLUnitConverter;
31 class SvXMLImport;
32 class SvXMLExport;
33 
34 namespace basegfx
35 {
36  class B2DTuple;
37  class B2DHomMatrix;
38  class B3DHomMatrix;
39 }
40 
42 {
43  // NOTE: This uses shared_ptr, because with unique_ptr the code
44  // fails to compile because of incomplete type.
45  std::vector< std::shared_ptr< ImpSdXMLExpTransObj2DBase > > maList;
46  OUString msString;
47 
48 public:
50 
51  void AddRotate(double fNew);
52  void AddTranslate(const ::basegfx::B2DTuple& rNew);
53  void AddSkewX(double fNew);
54 
55  bool NeedsAction() const { return !maList.empty(); }
56  void GetFullTransform(::basegfx::B2DHomMatrix& rFullTrans);
57  const OUString& GetExportString(const SvXMLUnitConverter& rConv);
58  void SetString(const OUString& rNew, const SvXMLUnitConverter& rConv);
59 };
60 
62 {
63  // NOTE: This uses shared_ptr, because with unique_ptr the code
64  // fails to compile because of incomplete type.
65  std::vector< std::shared_ptr< ImpSdXMLExpTransObj3DBase > > maList;
66  OUString msString;
67 
68 public:
70  SdXMLImExTransform3D(const OUString& rNew, const SvXMLUnitConverter& rConv);
71 
72  void AddMatrix(const ::basegfx::B3DHomMatrix& rNew);
73 
74  void AddHomogenMatrix(const css::drawing::HomogenMatrix& xHomMat);
75  bool NeedsAction() const { return !maList.empty(); }
76  void GetFullTransform(::basegfx::B3DHomMatrix& rFullTrans);
77  bool GetFullHomogenTransform(css::drawing::HomogenMatrix& xHomMat);
78  const OUString& GetExportString(const SvXMLUnitConverter& rConv);
79  void SetString(const OUString& rNew, const SvXMLUnitConverter& rConv);
80 };
81 
83 {
84  OUString msString;
85  double mfX;
86  double mfY;
87  double mfW;
88  double mfH;
89 
90 public:
91  SdXMLImExViewBox(double fX, double fY, double fW, double fH);
92  SdXMLImExViewBox(const OUString& rNew, const SvXMLUnitConverter& rConv);
93 
94  double GetX() const { return mfX; }
95  double GetY() const { return mfY; }
96  double GetWidth() const { return mfW; }
97  double GetHeight() const { return mfH; }
98  const OUString& GetExportString();
99 };
100 
101 /* 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:55
OUString msString
Definition: xexptran.hxx:84
the SvXMLTypeConverter converts values of various types from their internal representation to the tex...
Definition: xmluconv.hxx:80
std::vector< std::shared_ptr< ImpSdXMLExpTransObj3DBase > > maList
Definition: xexptran.hxx:65
double GetWidth() const
Definition: xexptran.hxx:96
std::vector< std::shared_ptr< ImpSdXMLExpTransObj2DBase > > maList
Definition: xexptran.hxx:45
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:75
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:97
void GetFullTransform(::basegfx::B2DHomMatrix &rFullTrans)
Definition: xexptran.cxx:482
void AddSkewX(double fNew)
Definition: xexptran.cxx:240
double GetX() const
Definition: xexptran.hxx:94
double GetY() const
Definition: xexptran.hxx:95