LibreOffice Module filter (master) 1
chart.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/types.h>
23
24#include <memory>
25#include <vector>
26
27/* FILE TYPE CONSTANTS: */
28#define BULCHART 32 /* Bullet chart file. */
29/* the following were added although SPC doesn't have a #define */
30/* for them... */
31#define AUTOTTLCHT 95 /* Autobuild TTL CHT */
32#define AUTOBULCHT 96 /* Autobuild BUL CHT */
33#define AUTOTABCHT 97 /* Autobuild TAB CHT */
34
35typedef struct TextEntry
36{
37 sal_uInt16 nTypeOfText;
38 sal_uInt16 nRowOrLineNum;
39 sal_uInt16 nColumnNum;
40 sal_uInt16 nZoneSize; // textzone attributes
41 sal_uInt16 nLineType;
42 sal_uInt16 nAttributes;
43 char* pText; // null terminated text
45
47{
48 sal_Int16 nBoxX1;
49 sal_Int16 nBoxY1;
50 sal_Int16 nBoxX2;
51 sal_Int16 nBoxY2;
54 : nBoxX1(0)
55 , nBoxY1(0)
56 , nBoxX2(0)
57 , nBoxY2(0)
58 , nZoneEnum(0)
59 {
60 }
61};
62
63class CGM;
65class CGMChart final
66{
67 friend class CGM;
68 friend class CGMImpressOutAct;
69
71 ::std::vector< std::unique_ptr<TextEntry> > maTextEntryList;
73
74 public:
75 CGMChart();
76 ~CGMChart();
77
78 void InsertTextEntry( std::unique_ptr<TextEntry> );
79
80 void ResetAnnotation();
81 bool IsAnnotation() const;
82};
83
84/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
struct TextEntry TextEntry
DataNode mDataNode[7]
Definition: chart.hxx:72
void InsertTextEntry(std::unique_ptr< TextEntry >)
Definition: chart.cxx:42
void ResetAnnotation()
Definition: chart.cxx:47
sal_Int8 mnCurrentFileType
Definition: chart.hxx:70
CGMChart()
Definition: chart.cxx:23
bool IsAnnotation() const
Definition: chart.cxx:52
::std::vector< std::unique_ptr< TextEntry > > maTextEntryList
Definition: chart.hxx:71
~CGMChart()
Definition: chart.cxx:32
Definition: cgm.hxx:39
sal_Int8 nZoneEnum
Definition: chart.hxx:52
sal_Int16 nBoxY1
Definition: chart.hxx:49
sal_Int16 nBoxY2
Definition: chart.hxx:51
DataNode()
Definition: chart.hxx:53
sal_Int16 nBoxX2
Definition: chart.hxx:50
sal_Int16 nBoxX1
Definition: chart.hxx:48
sal_uInt16 nTypeOfText
Definition: chart.hxx:37
sal_uInt16 nAttributes
Definition: chart.hxx:42
char * pText
Definition: chart.hxx:43
sal_uInt16 nColumnNum
Definition: chart.hxx:39
sal_uInt16 nRowOrLineNum
Definition: chart.hxx:38
sal_uInt16 nLineType
Definition: chart.hxx:41
sal_uInt16 nZoneSize
Definition: chart.hxx:40
signed char sal_Int8