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
31class SvXMLImport;
32class SvXMLExport;
33
34namespace 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
48public:
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(); }
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
68public:
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(); }
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
90public:
91 SdXMLImExViewBox(double fX, double fY, double fW, double fH);
92 SdXMLImExViewBox(OUString aNew, 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 AddTranslate(const ::basegfx::B2DTuple &rNew)
Definition: xexptran.cxx:232
std::vector< std::shared_ptr< ImpSdXMLExpTransObj2DBase > > maList
Definition: xexptran.hxx:45
void AddSkewX(double fNew)
Definition: xexptran.cxx:238
void AddRotate(double fNew)
Definition: xexptran.cxx:226
const OUString & GetExportString(const SvXMLUnitConverter &rConv)
Definition: xexptran.cxx:245
bool NeedsAction() const
Definition: xexptran.hxx:55
void SetString(const OUString &rNew, const SvXMLUnitConverter &rConv)
Definition: xexptran.cxx:347
void GetFullTransform(::basegfx::B2DHomMatrix &rFullTrans)
Definition: xexptran.cxx:480
void SetString(const OUString &rNew, const SvXMLUnitConverter &rConv)
Definition: xexptran.cxx:754
void GetFullTransform(::basegfx::B3DHomMatrix &rFullTrans)
Definition: xexptran.cxx:934
bool GetFullHomogenTransform(css::drawing::HomogenMatrix &xHomMat)
Definition: xexptran.cxx:920
const OUString & GetExportString(const SvXMLUnitConverter &rConv)
Definition: xexptran.cxx:618
bool NeedsAction() const
Definition: xexptran.hxx:75
std::vector< std::shared_ptr< ImpSdXMLExpTransObj3DBase > > maList
Definition: xexptran.hxx:65
void AddMatrix(const ::basegfx::B3DHomMatrix &rNew)
Definition: xexptran.cxx:606
void AddHomogenMatrix(const css::drawing::HomogenMatrix &xHomMat)
Definition: xexptran.cxx:612
OUString msString
Definition: xexptran.hxx:84
double GetHeight() const
Definition: xexptran.hxx:97
double GetY() const
Definition: xexptran.hxx:95
double GetX() const
Definition: xexptran.hxx:94
const OUString & GetExportString()
Definition: xexptran.cxx:1034
SdXMLImExViewBox(double fX, double fY, double fW, double fH)
Definition: xexptran.cxx:985
double GetWidth() const
Definition: xexptran.hxx:96
the SvXMLTypeConverter converts values of various types from their internal representation to the tex...
Definition: xmluconv.hxx:83