StarTable.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  * StarTable to read/parse table in sdw file
36  *
37  */
38 #ifndef STAR_TABLE
39 # define STAR_TABLE
40 
41 #include <ostream>
42 #include <vector>
43 
45 
46 class StarObject;
47 class StarObjectText;
48 class StarState;
49 class StarZone;
50 namespace StarTableInternal
51 {
52 class Table;
53 }
54 
57 class StarTable
58 {
59 public:
61  StarTable();
63  ~StarTable();
65  bool read(StarZone &zone, StarObjectText &object);
67  bool send(STOFFListenerPtr listener, StarState &state) const;
68 
70  std::shared_ptr<StarTableInternal::Table> m_table;
71 };
72 #endif
73 // vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
STOFFListenerPtr
std::shared_ptr< STOFFListener > STOFFListenerPtr
a smart pointer of STOFFListener
Definition: libstaroffice_internal.hxx:487
STOFFVec2< int >
StarTableInternal::TableLine::m_position
STOFFBox2i m_position
the position
Definition: StarTable.cxx:115
SWFieldManager::readField
std::shared_ptr< SWFieldManagerInternal::Field > readField(StarZone &zone, char cKind='_')
try to read a field type
Definition: SWFieldManager.cxx:1025
StarZone::ascii
libstoff::DebugFile & ascii()
returns the ascii file
Definition: StarZone.hxx:254
StarZone::getPoolName
bool getPoolName(int poolId, librevenge::RVNGString &res) const
try to return a pool name
Definition: StarZone.hxx:235
STOFF_DEBUG_MSG
#define STOFF_DEBUG_MSG(M)
Definition: libstaroffice_internal.hxx:129
StarTableInternal::Table::m_chgMode
int m_chgMode
the change mode
Definition: StarTable.cxx:158
StarTableInternal::TableBox::TableBox
TableBox()
constructor
Definition: StarTable.cxx:64
StarState::m_frame
STOFFFrameStyle m_frame
the frame style
Definition: StarState.hxx:175
StarZone::isCompatibleWith
int isCompatibleWith(int vers) const
checks if the document is compatible with vers
Definition: StarZone.hxx:99
StarTable::StarTable
StarTable()
the constructor
Definition: StarTable.cxx:662
StarTableInternal::TableLine::updatePosition
void updatePosition(Table &table, StarState const &state, float xOrigin, STOFFVec2i const &RBpos=STOFFVec2i(-1,-1))
update the position to correspond to cover the m_position[0],right/bottom
Definition: StarTable.cxx:343
STOFFCell::setCellStyle
void setCellStyle(STOFFCellStyle const &cellStyle)
set the cell style
Definition: STOFFCell.hxx:195
STOFFBox2i
STOFFBox2< int > STOFFBox2i
STOFFBox2 of int.
Definition: libstaroffice_internal.hxx:1129
StarTableInternal::Table::m_dimension
STOFFVec2i m_dimension
the dimension
Definition: StarTable.cxx:160
STOFFCell
a structure used to define a cell and its format
Definition: STOFFCell.hxx:53
STOFFBox2< int >
StarTableInternal::Table::m_rowToBoxMap
std::map< int, std::vector< StarTableInternal::TableBox * > > m_rowToBoxMap
the list of row to box
Definition: StarTable.cxx:174
StarZone::closeFlagZone
void closeFlagZone()
close the cflag zone
Definition: StarZone.cxx:618
StarTableInternal::TableLine::read
bool read(Table &table, StarZone &zone, StarObjectText &object, STOFFBox2i &cPos)
try to read the data
Definition: StarTable.cxx:367
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
STOFFPosition::m_size
STOFFVec2f m_size
the size in point
Definition: STOFFPosition.hxx:149
StarObjectText
the main class to read a StarOffice sdw file
Definition: StarObjectText.hxx:100
STOFFCellStyle::m_propertyList
librevenge::RVNGPropertyList m_propertyList
the property list
Definition: STOFFCellStyle.hxx:63
libstaroffice_internal.hxx
libstoff::DebugStream::str
static std::string str()
Definition: STOFFDebug.hxx:203
StarTableInternal::Table::m_minColWidth
float m_minColWidth
the minimal col width
Definition: StarTable.cxx:162
StarTableInternal::Table::Table
Table()
the constructor
Definition: StarTable.cxx:132
StarTableInternal::TableBox
small structure used to store a table box
Definition: StarTable.cxx:62
StarTableInternal::TableBox::send
bool send(STOFFListenerPtr listener, StarState &state) const
try to send the data to a listener
Definition: StarTable.cxx:322
StarZone::closeSWRecord
bool closeSWRecord(char type, std::string const &debugName)
try to close a record
Definition: StarZone.hxx:177
STOFFListener.hxx
STOFFBox2::size
STOFFVec2< T > size() const
the box size
Definition: libstaroffice_internal.hxx:995
STOFFInputStreamPtr
std::shared_ptr< STOFFInputStream > STOFFInputStreamPtr
a smart pointer of STOFFInputStream
Definition: libstaroffice_internal.hxx:485
SWFieldManager
the main class to read/.
Definition: SWFieldManager.hxx:109
StarZone
a zone in a StarOffice file
Definition: StarZone.hxx:56
StarTableInternal::TableBox::m_numLines
int m_numLines
the number of lines
Definition: StarTable.cxx:86
STOFFCellStyle.hxx
StarZone::getRecordLevel
int getRecordLevel() const
returns the record level
Definition: StarZone.hxx:195
StarTableInternal::TableBox::m_format
std::shared_ptr< StarFormatManagerInternal::FormatDef > m_format
the format
Definition: StarTable.cxx:92
StarObject
an object corresponding to an OLE directory
Definition: StarObject.hxx:64
StarTableInternal::TableBox::m_formatId
int m_formatId
the format
Definition: StarTable.cxx:84
STOFFTable
a class used to recreate the table structure using cell informations, ....
Definition: STOFFTable.hxx:51
libstoff::DebugStream
Definition: STOFFDebug.hxx:194
StarTableInternal::Table::send
bool send(STOFFListenerPtr listener, StarState &state)
try to send the data to a listener
Definition: StarTable.cxx:580
StarWriterStruct::NodeRedline::read
bool read(StarZone &zone)
try to read a nodeRedline
Definition: StarWriterStruct.cxx:575
StarTable::read
bool read(StarZone &zone, StarObjectText &object)
try to read the data
Definition: StarTable.cxx:670
STOFFCell::setPosition
void setPosition(STOFFVec2i posi)
set the cell positions : 0,0 -> A1, 0,1 -> A2
Definition: STOFFCell.hxx:127
StarTableInternal::Table::m_headerRepeated
bool m_headerRepeated
flag to know if the header is repeated
Definition: StarTable.cxx:154
StarTableInternal::TableLine
small structure used to store a table line
Definition: StarTable.cxx:100
STOFFCellStyle
Class to store a cell style.
Definition: STOFFCellStyle.hxx:43
STOFFFrameStyle::m_position
STOFFPosition m_position
the position
Definition: STOFFFrameStyle.hxx:73
StarTableInternal::Table::m_xPositionSet
std::set< float > m_xPositionSet
the list of x position
Definition: StarTable.cxx:170
StarTableInternal::Table
class to store a table data in a sdw file
Definition: StarTable.cxx:128
StarTable
class to store a table in a sdw file
Definition: StarTable.hxx:57
STOFFVec2f
STOFFVec2< float > STOFFVec2f
STOFFVec2 of float.
Definition: libstaroffice_internal.hxx:767
StarTable::~StarTable
~StarTable()
the destructor
Definition: StarTable.cxx:666
StarObjectText.hxx
StarTableInternal::TableLine::TableLine
TableLine()
constructor
Definition: StarTable.cxx:102
StarTableInternal::TableLine::m_numBoxes
int m_numBoxes
the number of boxes
Definition: StarTable.cxx:119
STOFFDebug.hxx
STOFFBox2::max
const STOFFVec2< T > & max() const
the maximum 2D point (in x and in y)
Definition: libstaroffice_internal.hxx:972
StarTableInternal::TableLine::m_format
std::shared_ptr< StarFormatManagerInternal::FormatDef > m_format
the format
Definition: StarTable.cxx:123
StarState.hxx
StarState::m_cell
STOFFCellStyle m_cell
the cell style
Definition: StarState.hxx:173
StarTableInternal::Table::updateColumnsPosition
void updateColumnsPosition()
try use the xdimension to compute the final col positions
Definition: StarTable.cxx:449
libstoff::DebugFile::addPos
static void addPos(long)
Definition: STOFFDebug.hxx:223
StarTableInternal::TableBox::m_content
std::shared_ptr< StarObjectTextInternal::Content > m_content
the content
Definition: StarTable.cxx:88
STOFFTable.hxx
StarWriterStruct.hxx
StarZone.hxx
STOFFTable::m_propertyList
librevenge::RVNGPropertyList m_propertyList
the property list
Definition: STOFFTable.hxx:68
StarTableInternal::TableBox::m_xDimension
STOFFVec2f m_xDimension
the x position
Definition: StarTable.cxx:96
StarTableInternal::TableLine::m_formatId
int m_formatId
the format
Definition: StarTable.cxx:117
StarState::m_global
std::shared_ptr< GlobalState > m_global
global state
Definition: StarState.hxx:165
libstoff::DebugFile
Definition: STOFFDebug.hxx:210
StarTableInternal::Table::m_numBoxes
int m_numBoxes
the number of boxes
Definition: StarTable.cxx:156
StarTableInternal
brief namespace used to define some table structure
Definition: StarTable.cxx:58
StarTableInternal::Table::m_format
std::shared_ptr< StarFormatManagerInternal::FormatDef > m_format
the table format
Definition: StarTable.cxx:164
StarTableInternal::TableBox::updatePosition
void updatePosition(Table &table, StarState const &state, float xOrigin, STOFFVec2i const &RBpos=STOFFVec2i(-1,-1))
update the position to correspond to cover the m_position[0],right/bottom
Definition: StarTable.cxx:177
StarTableInternal::TableBox::m_cellStyle
STOFFCellStyle m_cellStyle
the cell style
Definition: StarTable.cxx:94
StarFormatManager.hxx
libstoff::DebugFile::addNote
static void addNote(char const *)
Definition: STOFFDebug.hxx:224
STOFFFrameStyle::addTo
void addTo(librevenge::RVNGPropertyList &propList) const
add to the propList
Definition: STOFFFrameStyle.cxx:79
StarZone::input
STOFFInputStreamPtr input()
return the zone input
Definition: StarZone.hxx:247
StarTableInternal::Table::read
bool read(StarZone &zone, StarObjectText &object)
try to read the data
Definition: StarTable.cxx:507
StarTable::send
bool send(STOFFListenerPtr listener, StarState &state) const
try to send the data to a listener
Definition: StarTable.cxx:675
StarTableInternal::TableLine::m_boxList
std::vector< std::shared_ptr< TableBox > > m_boxList
a list of box
Definition: StarTable.cxx:121
STOFFVec2i
STOFFVec2< int > STOFFVec2i
STOFFVec2 of int.
Definition: libstaroffice_internal.hxx:763
StarTable::m_table
std::shared_ptr< StarTableInternal::Table > m_table
the table
Definition: StarTable.hxx:70
StarTableInternal::Table::m_formatList
std::vector< std::shared_ptr< StarFormatManagerInternal::FormatDef > > m_formatList
map format id to format def
Definition: StarTable.cxx:166
StarTable.hxx
StarZone::openFlagZone
unsigned char openFlagZone()
try to open a cflag zone
Definition: StarZone.cxx:611
StarWriterStruct::NodeRedline
structure to store a nodeRedline in a text zone
Definition: StarWriterStruct.hxx:273
StarTableInternal::Table::m_lineList
std::vector< std::shared_ptr< StarTableInternal::TableLine > > m_lineList
the list of line
Definition: StarTable.cxx:168
StarZone::getRecordLastPosition
long getRecordLastPosition() const
returns the actual record last position
Definition: StarZone.hxx:200
STOFFBox2::min
const STOFFVec2< T > & min() const
the minimum 2D point (in x and in y)
Definition: libstaroffice_internal.hxx:967
StarZone::openSWRecord
bool openSWRecord(char &type)
try to open a SW record: type + size (24 bytes)
Definition: StarZone.cxx:507
StarTableInternal::TableBox::read
bool read(Table &table, StarZone &zone, StarObjectText &object, STOFFBox2i &cPos)
try to read the data
Definition: StarTable.cxx:235
StarTableInternal::TableBox::m_position
STOFFBox2i m_position
the position
Definition: StarTable.cxx:82
STOFFCell.hxx
StarTableInternal::TableBox::m_lineList
std::vector< std::shared_ptr< TableLine > > m_lineList
a list of line
Definition: StarTable.cxx:90
SWFieldManager.hxx
StarTableInternal::Table::m_columnWidthList
std::vector< float > m_columnWidthList
the column width
Definition: StarTable.cxx:172

Generated on Mon Jan 20 2020 23:02:18 for libstaroffice by doxygen 1.8.16