StarCellAttribute.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; c-default-style: "k&r"; indent-tabs-mode: nil; tab-width: 2; c-basic-offset: 2 -*- */
2
3 /* libstaroffice
4 * Version: MPL 2.0 / LGPLv2+
5 *
6 * The contents of this file are subject to the Mozilla Public License Version
7 * 2.0 (the "License"); you may not use this file except in compliance with
8 * the License or as specified alternatively below. You may obtain a copy of
9 * the License at http://www.mozilla.org/MPL/
10 *
11 * Software distributed under the License is distributed on an "AS IS" basis,
12 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13 * for the specific language governing rights and limitations under the
14 * License.
15 *
16 * Major Contributor(s):
17 * Copyright (C) 2002 William Lachance (wrlach@gmail.com)
18 * Copyright (C) 2002,2004 Marc Maurer (uwog@uwog.net)
19 * Copyright (C) 2004-2006 Fridrich Strba (fridrich.strba@bluewin.ch)
20 * Copyright (C) 2006, 2007 Andrew Ziem
21 * Copyright (C) 2011, 2012 Alonso Laurent (alonso@loria.fr)
22 *
23 *
24 * All Rights Reserved.
25 *
26 * For minor contributions see the git repository.
27 *
28 * Alternatively, the contents of this file may be used under the terms of
29 * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"),
30 * in which case the provisions of the LGPLv2+ are applicable
31 * instead of those above.
32 */
33
34 /*
35 * file to read/parse StarOffice cell attributes
36 *
37 */
38 #ifndef STAR_CELL_ATTRIBUTE
39 # define STAR_CELL_ATTRIBUTE
40
41 #include <map>
42
43 #include "libstaroffice_internal.hxx"
44
45 class StarAttribute;
46
48 namespace StarCellAttribute
49 {
51 void addInitTo(std::map<int, std::shared_ptr<StarAttribute> > &whichToAttributeMap);
52 }
53
54 #endif
55 // vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
StarAttribute::ATTR_SC_VALUE_FORMAT
@ ATTR_SC_VALUE_FORMAT
Definition: StarAttribute.hxx:219
StarCellAttribute::StarCAttributeProtection::m_hiddenCell
bool m_hiddenCell
the cell is hidden and protected
Definition: StarCellAttribute.cxx:472
StarAttribute
virtual class used to store the different attribute
Definition: StarAttribute.hxx:62
StarCellAttribute::StarCAttributeVoid::StarCAttributeVoid
StarCAttributeVoid(Type type, std::string const &debugName)
constructor
Definition: StarCellAttribute.cxx:143
StarCellAttribute::StarCAttributeMerge::printData
void printData(libstoff::DebugStream &o) const final
debug function to print the data
Definition: StarCellAttribute.cxx:349
STOFFVec2< int >
StarAttribute::ATTR_SC_ROTATE_VALUE
@ ATTR_SC_ROTATE_VALUE
Definition: StarAttribute.hxx:211
StarCellAttribute::StarCAttributePattern
Pattern attribute of StarAttributeInternal.
Definition: StarCellAttribute.cxx:364
StarCellAttribute::StarCAttributeBool
a character bool attribute
Definition: StarCellAttribute.cxx:50
libstoff::getString
librevenge::RVNGString getString(std::vector< uint32_t > const &unicode)
transform a unicode string in a RNVGString
Definition: libstaroffice_internal.cxx:63
StarAttribute::ATTR_SC_VERJUSTIFY
@ ATTR_SC_VERJUSTIFY
Definition: StarAttribute.hxx:209
StarCellAttribute::StarCAttributeUInt::addTo
void addTo(StarState &state, std::set< StarAttribute const * > &) const final
add to a cell style
Definition: StarCellAttribute.cxx:176
StarAttribute::Type
Type
the attribute list
Definition: StarAttribute.hxx:66
StarZone::ascii
libstoff::DebugFile & ascii()
returns the ascii file
Definition: StarZone.hxx:254
StarCellAttribute::StarCAttributeVoid::~StarCAttributeVoid
~StarCAttributeVoid() final
destructor
Definition: StarCellAttribute.cxx:160
STOFFCellStyle::m_format
unsigned m_format
the cell format : 0 by default
Definition: STOFFCellStyle.hxx:67
StarAttribute::ATTR_SC_PROTECTION
@ ATTR_SC_PROTECTION
Definition: StarAttribute.hxx:222
STOFF_DEBUG_MSG
#define STOFF_DEBUG_MSG(M)
Definition: libstaroffice_internal.hxx:129
StarCellAttribute::addAttributeBool
void addAttributeBool(std::map< int, std::shared_ptr< StarAttribute > > &map, StarAttribute::Type type, std::string const &debugName, bool defValue)
add a bool attribute
Definition: StarCellAttribute.cxx:267
StarAttribute::m_type
Type m_type
the type
Definition: StarAttribute.hxx:805
StarItemSet::m_style
librevenge::RVNGString m_style
item set name
Definition: StarItem.hxx:107
StarCellAttribute::StarCAttributeProtection::create
std::shared_ptr< StarAttribute > create() const final
create a new attribute
Definition: StarCellAttribute.cxx:445
StarAttribute::ATTR_SC_USERDEF
@ ATTR_SC_USERDEF
Definition: StarAttribute.hxx:205
StarAttribute::ATTR_SC_MARGIN
@ ATTR_SC_MARGIN
Definition: StarAttribute.hxx:216
StarObjectSmallText.hxx
StarCellAttribute::StarCAttributeColor::~StarCAttributeColor
~StarCAttributeColor() final
destructor
Definition: StarCellAttribute.cxx:93
StarAttribute::ATTR_SC_HORJUSTIFY
@ ATTR_SC_HORJUSTIFY
Definition: StarAttribute.hxx:207
StarCellAttribute::StarCAttributeMargins::m_margins
int m_margins[4]
the top, left, right, bottom margins
Definition: StarCellAttribute.cxx:328
StarCellAttribute::StarCAttributeMerge::StarCAttributeMerge
StarCAttributeMerge(Type type, std::string const &debugName)
constructor
Definition: StarCellAttribute.cxx:336
STOFFColor
the class to store a color
Definition: libstaroffice_internal.hxx:189
StarCellAttribute::StarCAttributeMargins::StarCAttributeMargins
StarCAttributeMargins(Type type, std::string const &debugName)
constructor
Definition: StarCellAttribute.cxx:301
StarCellAttribute::StarCAttributeMargins
a margins attribute
Definition: StarCellAttribute.cxx:297
StarCellAttribute::StarCAttributeInt::create
std::shared_ptr< StarAttribute > create() const final
create a new attribute
Definition: StarCellAttribute.cxx:108
StarCellAttribute::StarCAttributeMargins::create
std::shared_ptr< StarAttribute > create() const final
create a new attribute
Definition: StarCellAttribute.cxx:306
STOFFCellStyle::m_numberCellSpanned
STOFFVec2i m_numberCellSpanned
the cell spanned : by default (1,1)
Definition: STOFFCellStyle.hxx:65
StarState
class to store an state: ie.
Definition: StarState.hxx:67
StarCellAttribute::StarCAttributeUInt::StarCAttributeUInt
StarCAttributeUInt(Type type, std::string const &debugName, int intSize, unsigned int value)
constructor
Definition: StarCellAttribute.cxx:122
STOFFCellStyle::m_propertyList
librevenge::RVNGPropertyList m_propertyList
the property list
Definition: STOFFCellStyle.hxx:63
libstaroffice_internal.hxx
StarCellAttribute::StarCAttributeInt::StarCAttributeInt
StarCAttributeInt(Type type, std::string const &debugName, int intSize, int value)
constructor
Definition: StarCellAttribute.cxx:101
libstoff::DebugStream::str
static std::string str()
Definition: STOFFDebug.hxx:203
StarItemSet::m_family
int m_family
the family
Definition: StarItem.hxx:109
StarCellAttribute.hxx
StarCellAttribute::StarCAttributeInt::addTo
void addTo(StarState &state, std::set< StarAttribute const * > &) const final
add to a cell style
Definition: StarCellAttribute.cxx:170
StarCellAttribute::StarCAttributeProtection::StarCAttributeProtection
StarCAttributeProtection(Type type, std::string const &debugName)
constructor
Definition: StarCellAttribute.cxx:440
StarAttribute::ATTR_SC_VERTICAL_ASIAN
@ ATTR_SC_VERTICAL_ASIAN
Definition: StarAttribute.hxx:213
StarCellAttribute::StarCAttributeProtection::m_doNotPrint
bool m_doNotPrint
do not print the formula
Definition: StarCellAttribute.cxx:474
StarAttribute::ATTR_SC_ORIENTATION
@ ATTR_SC_ORIENTATION
Definition: StarAttribute.hxx:210
StarAttribute::ATTR_SC_ROTATE_MODE
@ ATTR_SC_ROTATE_MODE
Definition: StarAttribute.hxx:212
StarCellAttribute::StarCAttributeMargins::addTo
void addTo(StarState &state, std::set< StarAttribute const * > &) const final
add to a cell style
Definition: StarCellAttribute.cxx:477
StarAttributeUInt
a unsigned integer attribute
Definition: StarAttribute.hxx:946
StarCellAttribute::StarCAttributePattern::StarCAttributePattern
StarCAttributePattern()
constructor
Definition: StarCellAttribute.cxx:368
StarCellAttribute::StarCAttributeUInt::create
std::shared_ptr< StarAttribute > create() const final
create a new attribute
Definition: StarCellAttribute.cxx:127
StarAttributeInt::m_value
int m_value
Definition: StarAttribute.hxx:940
STOFFInputStreamPtr
std::shared_ptr< STOFFInputStream > STOFFInputStreamPtr
a smart pointer of STOFFInputStream
Definition: libstaroffice_internal.hxx:489
StarCellAttribute::addAttributeInt
void addAttributeInt(std::map< int, std::shared_ptr< StarAttribute > > &map, StarAttribute::Type type, std::string const &debugName, int numBytes, int defValue)
add a int attribute
Definition: StarCellAttribute.cxx:277
StarAttributeItemSet::m_itemSet
StarItemSet m_itemSet
the list of items
Definition: StarAttribute.hxx:1054
StarZone
a zone in a StarOffice file
Definition: StarZone.hxx:56
STOFFCellStyle.hxx
StarZone::getRecordLevel
int getRecordLevel() const
returns the record level
Definition: StarZone.hxx:195
StarCellAttribute::StarCAttributePattern::print
void print(libstoff::DebugStream &o, std::set< StarAttribute const * > &done) const final
debug function to print the data
Definition: StarCellAttribute.cxx:417
StarAttribute::ATTR_SC_WRITINGDIR
@ ATTR_SC_WRITINGDIR
Definition: StarAttribute.hxx:214
StarObject
an object corresponding to an OLE directory
Definition: StarObject.hxx:64
StarCellAttribute::StarCAttributeBool::addTo
void addTo(StarState &state, std::set< StarAttribute const * > &) const final
add to a cell style
Definition: StarCellAttribute.cxx:164
StarCellAttribute::addAttributeVoid
void addAttributeVoid(std::map< int, std::shared_ptr< StarAttribute > > &map, StarAttribute::Type type, std::string const &debugName)
add a void attribute
Definition: StarCellAttribute.cxx:287
StarAttributeUInt::m_value
unsigned int m_value
Definition: StarAttribute.hxx:978
StarCellAttribute::StarCAttributeUInt
a character unsigned integer attribute
Definition: StarCellAttribute.cxx:118
StarCellAttribute::StarCAttributePattern::~StarCAttributePattern
~StarCAttributePattern() final
destructor
Definition: StarCellAttribute.cxx:431
libstoff::DebugStream
Definition: STOFFDebug.hxx:194
StarCellAttribute::StarCAttributePattern::create
std::shared_ptr< StarAttribute > create() const final
create a new attribute
Definition: StarCellAttribute.cxx:376
StarAttributeBool::m_value
bool m_value
Definition: StarAttribute.hxx:841
StarAttributeColor
a color attribute
Definition: StarAttribute.hxx:845
StarCellAttribute::StarCAttributePattern::m_style
librevenge::RVNGString m_style
the style
Definition: StarCellAttribute.cxx:428
StarCellAttribute::StarCAttributeProtection::printData
void printData(libstoff::DebugStream &o) const final
debug function to print the data
Definition: StarCellAttribute.cxx:454
StarCellAttribute::StarCAttributeBool::create
std::shared_ptr< StarAttribute > create() const final
create a new attribute
Definition: StarCellAttribute.cxx:59
StarCellAttribute::StarCAttributeProtection::m_protected
bool m_protected
the cell is protected
Definition: StarCellAttribute.cxx:468
StarAttributeItemSet::m_limits
std::vector< STOFFVec2i > m_limits
the pool limits id
Definition: StarAttribute.hxx:1052
StarCellAttribute::StarCAttributeProtection
a protection attribute
Definition: StarCellAttribute.cxx:436
StarAttribute::ATTR_SC_PATTERN
@ ATTR_SC_PATTERN
Definition: StarAttribute.hxx:228
StarCellAttribute::StarCAttributeMerge::create
std::shared_ptr< StarAttribute > create() const final
create a new attribute
Definition: StarCellAttribute.cxx:340
StarCellAttribute::StarCAttributeColor::StarCAttributeColor
StarCAttributeColor(Type type, std::string const &debugName, STOFFColor const &value)
constructor
Definition: StarCellAttribute.cxx:76
StarAttributeItemSet
a list of item attribute of StarAttributeInternal
Definition: StarAttribute.hxx:1023
StarCellAttribute::StarCAttributeProtection::addTo
void addTo(StarState &state, std::set< StarAttribute const * > &) const final
add to a cell style
Definition: StarCellAttribute.cxx:501
StarAttribute::ATTR_SC_INDENT
@ ATTR_SC_INDENT
Definition: StarAttribute.hxx:208
StarCellAttribute::addInitTo
void addInitTo(std::map< int, std::shared_ptr< StarAttribute > > &map)
adds cell attribute to the general it to attribute map
Definition: StarCellAttribute.cxx:571
StarState.hxx
StarCellAttribute::addAttributeUInt
void addAttributeUInt(std::map< int, std::shared_ptr< StarAttribute > > &map, StarAttribute::Type type, std::string const &debugName, int numBytes, unsigned int defValue)
add a unsigned int attribute
Definition: StarCellAttribute.cxx:282
StarState::m_cell
STOFFCellStyle m_cell
the cell style
Definition: StarState.hxx:173
libstoff::DebugFile::addPos
static void addPos(long)
Definition: STOFFDebug.hxx:223
StarObject.hxx
StarZone.hxx
StarCellAttribute::StarCAttributeColor
a character color attribute
Definition: StarCellAttribute.cxx:72
StarAttribute::ATTR_SC_VALIDDATA
@ ATTR_SC_VALIDDATA
Definition: StarAttribute.hxx:226
StarCellAttribute::StarCAttributeMargins::read
bool read(StarZone &zone, int vers, long endPos, StarObject &object) final
read a zone
Definition: StarCellAttribute.cxx:516
StarCellAttribute::addAttributeColor
void addAttributeColor(std::map< int, std::shared_ptr< StarAttribute > > &map, StarAttribute::Type type, std::string const &debugName, STOFFColor const &defValue)
add a color attribute
Definition: StarCellAttribute.cxx:272
StarAttributeVoid
void attribute of StarAttribute
Definition: StarAttribute.hxx:1058
StarCellAttribute::StarCAttributeProtection::m_hiddenFormula
bool m_hiddenFormula
the formula is hidden
Definition: StarCellAttribute.cxx:470
libstoff::DebugFile
Definition: STOFFDebug.hxx:210
StarAttribute::m_debugName
std::string m_debugName
the debug name
Definition: StarAttribute.hxx:807
StarAttribute::ATTR_SC_MERGE
@ ATTR_SC_MERGE
Definition: StarAttribute.hxx:217
StarCellAttribute::StarCAttributeMargins::printData
void printData(libstoff::DebugStream &o) const final
debug function to print the data
Definition: StarCellAttribute.cxx:315
StarAttribute::ATTR_SC_LINEBREAK
@ ATTR_SC_LINEBREAK
Definition: StarAttribute.hxx:215
StarCellAttribute::StarCAttributeMerge
a merge attribute
Definition: StarCellAttribute.cxx:332
StarCellAttribute::StarCAttributeVoid
a void attribute
Definition: StarCellAttribute.cxx:139
libstoff::DebugFile::addNote
static void addNote(char const *)
Definition: STOFFDebug.hxx:224
StarAttribute::ATTR_SC_CONDITIONAL
@ ATTR_SC_CONDITIONAL
Definition: StarAttribute.hxx:227
StarAttribute::ATTR_SC_MERGE_FLAG
@ ATTR_SC_MERGE_FLAG
Definition: StarAttribute.hxx:218
StarCellAttribute::StarCAttributeVoid::create
std::shared_ptr< StarAttribute > create() const final
create a new attribute
Definition: StarCellAttribute.cxx:149
StarZone::input
STOFFInputStreamPtr input()
return the zone input
Definition: StarZone.hxx:247
StarCellAttribute::StarCAttributeColor::create
std::shared_ptr< StarAttribute > create() const final
create a new attribute
Definition: StarCellAttribute.cxx:82
STOFFVec2i
STOFFVec2< int > STOFFVec2i
STOFFVec2 of int.
Definition: libstaroffice_internal.hxx:767
StarCellAttribute::StarCAttributeBool::StarCAttributeBool
StarCAttributeBool(Type type, std::string const &debugName, bool value)
constructor
Definition: StarCellAttribute.cxx:54
StarCellAttribute::StarCAttributeMerge::addTo
void addTo(StarState &state, std::set< StarAttribute const * > &) const final
add to a cell style
Definition: StarCellAttribute.cxx:487
StarCellAttribute
namespace used to contain cell attributes (and some cell attributes which are similar)
Definition: StarCellAttribute.cxx:47
StarItemPool.hxx
StarCellAttribute::StarCAttributePattern::read
bool read(StarZone &zone, int, long endPos, StarObject &object) final
read a zone
Definition: StarCellAttribute.cxx:381
StarAttribute.hxx
StarCellAttribute::StarCAttributeMerge::read
bool read(StarZone &zone, int vers, long endPos, StarObject &object) final
read a zone
Definition: StarCellAttribute.cxx:532
StarAttributeInt
an integer attribute
Definition: StarAttribute.hxx:907
StarCellAttribute::StarCAttributeInt
a character integer attribute
Definition: StarCellAttribute.cxx:97
StarCellAttribute::StarCAttributeProtection::read
bool read(StarZone &zone, int vers, long endPos, StarObject &object) final
read a zone
Definition: StarCellAttribute.cxx:550
StarAttributeBool
a boolean attribute
Definition: StarAttribute.hxx:814
StarAttributeItemSet::print
void print(libstoff::DebugStream &o, std::set< StarAttribute const * > &done) const override
debug function to print the data
Definition: StarAttribute.cxx:397
StarCellAttribute::StarCAttributeMerge::m_span
STOFFVec2i m_span
the span
Definition: StarCellAttribute.cxx:360