nss: upgrade to release 3.73
[LibreOffice.git] / filter / source / graphicfilter / icgm / bundles.hxx
bloba884937f8dae31a4a57c8a413fceae52417afad2
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_FILTER_SOURCE_GRAPHICFILTER_ICGM_BUNDLES_HXX
21 #define INCLUDED_FILTER_SOURCE_GRAPHICFILTER_ICGM_BUNDLES_HXX
23 #include <sal/types.h>
24 #include "cgmtypes.hxx"
25 #include <vector>
26 #include <memory>
29 class Bundle
32 tools::Long mnBundleIndex;
33 sal_uInt32 mnColor;
35 public:
36 void SetColor( sal_uInt32 nColor ) ;
37 sal_uInt32 GetColor() const { return mnColor;}
38 tools::Long GetIndex() const { return mnBundleIndex; } ;
39 void SetIndex( tools::Long nBundleIndex ) { mnBundleIndex = nBundleIndex; } ;
41 Bundle()
42 : mnBundleIndex( 0 )
43 , mnColor( 0 )
44 {};
46 virtual std::unique_ptr<Bundle> Clone() { return std::make_unique<Bundle>( *this ); };
48 virtual ~Bundle() {} ;
50 Bundle(Bundle const &) = default;
51 Bundle(Bundle &&) = default;
52 Bundle & operator =(Bundle const &) = default;
53 Bundle & operator =(Bundle &&) = default;
57 class LineBundle : public Bundle
59 public:
61 LineType eLineType;
62 double nLineWidth;
64 LineBundle()
65 : eLineType(LT_SOLID)
66 , nLineWidth(0)
69 virtual std::unique_ptr<Bundle> Clone() override { return std::make_unique<LineBundle>( *this ); }
73 class MarkerBundle : public Bundle
75 public:
77 MarkerType eMarkerType;
78 double nMarkerSize;
80 MarkerBundle()
81 : eMarkerType( MT_POINT )
82 , nMarkerSize( 0.0 )
83 {};
85 virtual std::unique_ptr<Bundle> Clone() override { return std::make_unique<MarkerBundle>( *this ); } ;
89 class EdgeBundle : public Bundle
91 public:
93 EdgeType eEdgeType;
94 double nEdgeWidth;
96 EdgeBundle()
97 : eEdgeType(ET_NONE)
98 , nEdgeWidth(0)
100 virtual std::unique_ptr<Bundle> Clone() override { return std::make_unique<EdgeBundle>( *this ); }
104 class TextBundle : public Bundle
106 public:
108 sal_uInt32 nTextFontIndex;
109 TextPrecision eTextPrecision;
110 double nCharacterExpansion;
111 double nCharacterSpacing;
113 TextBundle()
114 : nTextFontIndex( 0 )
115 , eTextPrecision( TPR_UNDEFINED )
116 , nCharacterExpansion( 0.0 )
117 , nCharacterSpacing( 0.0 )
120 virtual std::unique_ptr<Bundle> Clone() override { return std::make_unique<TextBundle>( *this ); } ;
124 class FillBundle : public Bundle
126 public:
128 FillInteriorStyle eFillInteriorStyle;
129 tools::Long nFillPatternIndex;
130 tools::Long nFillHatchIndex;
132 FillBundle()
133 : eFillInteriorStyle(FIS_HOLLOW)
134 , nFillPatternIndex(0)
135 , nFillHatchIndex(0)
137 virtual std::unique_ptr<Bundle> Clone() override { return std::make_unique<FillBundle>( *this ); }
141 struct FontEntry
143 std::vector<sal_Int8> aFontName;
144 std::vector<sal_Int8> aCharSetValue;
145 sal_uInt32 nFontType; // bit 0 = 1 -> Italic,
146 // bit 1 = 1 -> Bold
147 FontEntry()
148 : nFontType(0)
153 class CGMFList
155 sal_uInt32 nFontNameCount;
156 sal_uInt32 nCharSetCount;
157 std::vector<FontEntry> aFontEntryList;
159 public:
160 CGMFList();
162 FontEntry* GetFontEntry( sal_uInt32 );
163 void InsertName( sal_uInt8 const * pSource, sal_uInt32 nSize );
164 void InsertCharSet( sal_uInt8 const * pSource, sal_uInt32 nSize );
167 #endif
169 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */