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