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