LibreOffice Module vcl (master)  1
dxftblrd.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_FILTER_SOURCE_GRAPHICFILTER_IDXF_DXFTBLRD_HXX
21 #define INCLUDED_FILTER_SOURCE_GRAPHICFILTER_IDXF_DXFTBLRD_HXX
22 
23 #include <sal/config.h>
24 
25 #include <string_view>
26 
27 #include "dxfgrprd.hxx"
28 #include "dxfvec.hxx"
29 
30 
31 //------------------- Line Type ----------------------------------------------
32 
33 
34 #define DXF_MAX_DASH_COUNT 32
35 
36 class DXFLType {
37 
38 public:
39 
41 
42  OString m_sName; // 2
44  OString m_sDescription; // 3
46  double fPatternLength; // 40
47  double fDash[DXF_MAX_DASH_COUNT]; // 49,49,...
48 
49  DXFLType();
50  void Read(DXFGroupReader & rDGR);
51 };
52 
53 
54 //------------------ Layer ---------------------------------------------------
55 
56 
57 class DXFLayer {
58 
59 public:
60 
62 
63  OString m_sName; // 2
66  OString m_sLineType; // 6
67 
68  DXFLayer();
69  void Read(DXFGroupReader & rDGR);
70 };
71 
72 
73 //------------------ Style ---------------------------------------------------
74 
75 
76 class DXFStyle {
77 
78 public:
79 
81 
82  OString m_sName; // 2
84  double fHeight; // 40
85  double fWidthFak; // 41
86  double fOblAngle; // 50
88  double fLastHeightUsed; // 42
89  OString m_sPrimFontFile; // 3
90  OString m_sBigFontFile; // 4
91 
92  DXFStyle();
93  void Read(DXFGroupReader & rDGR);
94 };
95 
96 
97 //------------------ VPort ---------------------------------------------------
98 
99 
100 class DXFVPort {
101 
102 public:
103 
105 
106  OString m_sName; // 2
108  double fMinX; // 10
109  double fMinY; // 20
110  double fMaxX; // 11
111  double fMaxY; // 21
112  double fCenterX; // 12
113  double fCenterY; // 22
114  double fSnapBaseX; // 13
115  double fSnapBaseY; // 23
116  double fSnapSpacingX; // 14
117  double fSnapSpacingY; // 24
118  double fGridX; // 15
119  double fGridY; // 25
120  DXFVector aDirection; // 16,26,36
121  DXFVector aTarget; // 17,27,37
122  double fHeight; // 40
123  double fAspectRatio; // 41
124  double fLensLength; // 42
125  double fFrontClipPlane; // 43
126  double fBackClipPlane; // 44
127  double fTwistAngle; // 51
138 
139  DXFVPort();
140  void Read(DXFGroupReader & rDGR);
141 };
142 
143 
144 //------------------ Tables --------------------------------------------------
145 
146 
147 class DXFTables {
148 
149  DXFLType * pLTypes; // list of line types
150  DXFLayer * pLayers; // list of layers
151  DXFStyle * pStyles; // list of styles
152  DXFVPort * pVPorts; // list of viewports
153 
154 public:
155 
156  DXFTables();
157  ~DXFTables();
158 
159  void Read(DXFGroupReader & rDGR);
160  // Reads the table until an ENDSEC or EOF
161  // (Unknown things/tables will be skipped)
162 
163  void Clear();
164 
165  // look for table entries:
166  DXFLType * SearchLType(std::string_view rName) const;
167  DXFLayer * SearchLayer(std::string_view rName) const;
168  DXFVPort * SearchVPort(std::string_view rName) const;
169 
170 };
171 
172 #endif
173 
174 
175 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
DXFVPort * pSucc
Definition: dxftblrd.hxx:104
void Read(DXFGroupReader &rDGR)
Definition: dxftblrd.cxx:268
DXFLType * pSucc
Definition: dxftblrd.hxx:40
double fAspectRatio
Definition: dxftblrd.hxx:123
double fCenterY
Definition: dxftblrd.hxx:113
DXFVPort * pVPorts
Definition: dxftblrd.hxx:152
double fCenterX
Definition: dxftblrd.hxx:112
OString m_sName
Definition: dxftblrd.hxx:63
tools::Long nDashCount
Definition: dxftblrd.hxx:45
DXFLayer * pSucc
Definition: dxftblrd.hxx:61
void Read(DXFGroupReader &rDGR)
Definition: dxftblrd.cxx:33
DXFVector aDirection
Definition: dxftblrd.hxx:120
long Long
DXFStyle * pStyles
Definition: dxftblrd.hxx:151
tools::Long nFlags
Definition: dxftblrd.hxx:43
tools::Long nSnap
Definition: dxftblrd.hxx:134
tools::Long nSnapStyle
Definition: dxftblrd.hxx:136
double fHeight
Definition: dxftblrd.hxx:122
void Read(DXFGroupReader &rDGR)
Definition: dxftblrd.cxx:128
tools::Long nSnapIsopair
Definition: dxftblrd.hxx:137
OString m_sName
Definition: dxftblrd.hxx:106
double fSnapBaseY
Definition: dxftblrd.hxx:115
tools::Long nFlags
Definition: dxftblrd.hxx:107
double fWidthFak
Definition: dxftblrd.hxx:85
DXFStyle * pSucc
Definition: dxftblrd.hxx:80
tools::Long nCircleZoomPercent
Definition: dxftblrd.hxx:131
tools::Long nUCSICON
Definition: dxftblrd.hxx:133
double fTwistAngle
Definition: dxftblrd.hxx:127
double fGridX
Definition: dxftblrd.hxx:118
tools::Long nMode
Definition: dxftblrd.hxx:130
double fHeight
Definition: dxftblrd.hxx:84
double fLensLength
Definition: dxftblrd.hxx:124
double fOblAngle
Definition: dxftblrd.hxx:86
void Clear()
Definition: dxftblrd.cxx:320
OString m_sName
Definition: dxftblrd.hxx:82
tools::Long nColor
Definition: dxftblrd.hxx:65
OString m_sName
Definition: dxftblrd.hxx:42
tools::Long nTextGenFlags
Definition: dxftblrd.hxx:87
double fPatternLength
Definition: dxftblrd.hxx:46
double fBackClipPlane
Definition: dxftblrd.hxx:126
tools::Long nFlags
Definition: dxftblrd.hxx:64
double fDash[DXF_MAX_DASH_COUNT]
Definition: dxftblrd.hxx:47
tools::Long nID
Definition: dxftblrd.hxx:129
void Read(DXFGroupReader &rDGR)
Definition: dxftblrd.cxx:93
OString m_sDescription
Definition: dxftblrd.hxx:44
double fMaxY
Definition: dxftblrd.hxx:111
double fFrontClipPlane
Definition: dxftblrd.hxx:125
double fSnapSpacingX
Definition: dxftblrd.hxx:116
DXFLayer()
Definition: dxftblrd.cxx:86
double fLastHeightUsed
Definition: dxftblrd.hxx:88
DXFVector aTarget
Definition: dxftblrd.hxx:121
DXFVPort * SearchVPort(std::string_view rName) const
Definition: dxftblrd.cxx:370
DXFLayer * SearchLayer(std::string_view rName) const
Definition: dxftblrd.cxx:360
OString m_sPrimFontFile
Definition: dxftblrd.hxx:89
double fMinX
Definition: dxftblrd.hxx:108
double fMinY
Definition: dxftblrd.hxx:109
OString m_sBigFontFile
Definition: dxftblrd.hxx:90
double fSnapSpacingY
Definition: dxftblrd.hxx:117
OString m_sLineType
Definition: dxftblrd.hxx:66
void Read(DXFGroupReader &rDGR)
Definition: dxftblrd.cxx:202
double fGridY
Definition: dxftblrd.hxx:119
double fMaxX
Definition: dxftblrd.hxx:110
tools::Long nStatus
Definition: dxftblrd.hxx:128
double fSnapBaseX
Definition: dxftblrd.hxx:114
#define DXF_MAX_DASH_COUNT
Definition: dxftblrd.hxx:34
DXFLType * SearchLType(std::string_view rName) const
Definition: dxftblrd.cxx:350
tools::Long nGrid
Definition: dxftblrd.hxx:135
DXFLType * pLTypes
Definition: dxftblrd.hxx:149
tools::Long nFlags
Definition: dxftblrd.hxx:83
DXFLayer * pLayers
Definition: dxftblrd.hxx:150
tools::Long nFastZoom
Definition: dxftblrd.hxx:132
DXFLType()
Definition: dxftblrd.cxx:25