update emoji autocorrect entries from po-files
[LibreOffice.git] / include / drawinglayer / primitive2d / textstrikeoutprimitive2d.hxx
blob82b455a54123a63c648d7f2a8079cf842ae39f83
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_DRAWINGLAYER_PRIMITIVE2D_TEXTSTRIKEOUTPRIMITIVE2D_HXX
21 #define INCLUDED_DRAWINGLAYER_PRIMITIVE2D_TEXTSTRIKEOUTPRIMITIVE2D_HXX
23 #include <drawinglayer/drawinglayerdllapi.h>
25 #include <drawinglayer/primitive2d/baseprimitive2d.hxx>
26 #include <drawinglayer/primitive2d/textenumsprimitive2d.hxx>
27 #include <basegfx/matrix/b2dhommatrix.hxx>
28 #include <basegfx/color/bcolor.hxx>
29 #include <drawinglayer/attribute/fontattribute.hxx>
30 #include <com/sun/star/lang/Locale.hpp>
34 namespace drawinglayer
36 namespace primitive2d
38 class DRAWINGLAYER_DLLPUBLIC BaseTextStrikeoutPrimitive2D : public BufferedDecompositionPrimitive2D
40 private:
41 /// geometric definitions
42 basegfx::B2DHomMatrix maObjectTransformation;
43 double mfWidth;
45 /// decoration definitions
46 basegfx::BColor maFontColor;
48 public:
49 /// constructor
50 BaseTextStrikeoutPrimitive2D(
51 const basegfx::B2DHomMatrix& rObjectTransformation,
52 double fWidth,
53 const basegfx::BColor& rFontColor);
55 /// data read access
56 const basegfx::B2DHomMatrix& getObjectTransformation() const { return maObjectTransformation; }
57 double getWidth() const { return mfWidth; }
58 const basegfx::BColor& getFontColor() const { return maFontColor; }
60 /// compare operator
61 virtual bool operator==( const BasePrimitive2D& rPrimitive ) const SAL_OVERRIDE;
63 } // end of namespace primitive2d
64 } // end of namespace drawinglayer
68 namespace drawinglayer
70 namespace primitive2d
72 class DRAWINGLAYER_DLLPUBLIC TextCharacterStrikeoutPrimitive2D : public BaseTextStrikeoutPrimitive2D
74 private:
75 sal_Unicode maStrikeoutChar;
76 attribute::FontAttribute maFontAttribute;
77 ::com::sun::star::lang::Locale maLocale;
79 protected:
80 /// local decomposition.
81 virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const SAL_OVERRIDE;
83 public:
84 /// constructor
85 TextCharacterStrikeoutPrimitive2D(
86 const basegfx::B2DHomMatrix& rObjectTransformation,
87 double fWidth,
88 const basegfx::BColor& rFontColor,
89 sal_Unicode aStrikeoutChar,
90 const attribute::FontAttribute& rFontAttribute,
91 const ::com::sun::star::lang::Locale& rLocale);
93 /// data read access
94 sal_Unicode getStrikeoutChar() const { return maStrikeoutChar; }
95 const attribute::FontAttribute& getFontAttribute() const { return maFontAttribute; }
96 const ::com::sun::star::lang::Locale& getLocale() const { return maLocale; }
98 /// compare operator
99 virtual bool operator==( const BasePrimitive2D& rPrimitive ) const SAL_OVERRIDE;
101 /// provide unique ID
102 DeclPrimitive2DIDBlock()
104 } // end of namespace primitive2d
105 } // end of namespace drawinglayer
109 namespace drawinglayer
111 namespace primitive2d
113 class DRAWINGLAYER_DLLPUBLIC TextGeometryStrikeoutPrimitive2D : public BaseTextStrikeoutPrimitive2D
115 private:
116 double mfHeight;
117 double mfOffset;
118 TextStrikeout meTextStrikeout;
120 protected:
121 /// local decomposition.
122 virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const SAL_OVERRIDE;
124 public:
125 /// constructor
126 TextGeometryStrikeoutPrimitive2D(
127 const basegfx::B2DHomMatrix& rObjectTransformation,
128 double fWidth,
129 const basegfx::BColor& rFontColor,
130 double fHeight,
131 double fOffset,
132 TextStrikeout eTextStrikeout);
134 /// data read access
135 double getHeight() const { return mfHeight; }
136 double getOffset() const { return mfOffset; }
137 TextStrikeout getTextStrikeout() const { return meTextStrikeout; }
139 /// compare operator
140 virtual bool operator==( const BasePrimitive2D& rPrimitive ) const SAL_OVERRIDE;
142 /// provide unique ID
143 DeclPrimitive2DIDBlock()
145 } // end of namespace primitive2d
146 } // end of namespace drawinglayer
150 #endif //INCLUDED_DRAWINGLAYER_PRIMITIVE2D_TEXTSTRIKEOUTPRIMITIVE2D_HXX
152 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */