StarLayout.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  * StarLanguage to read/parse some layout in StarOffice documents
36  *
37  */
38 #ifndef STAR_LAYOUT
39 # define STAR_LAYOUT
40 
41 #include <vector>
42 
44 #include "STOFFDebug.hxx"
45 
46 class StarObject;
47 class StarZone;
50 struct StarLayout {
51 public:
54  {
55  }
57  bool read(StarZone &zone, StarObject &object);
58 protected:
60  bool readC1(StarZone &zone, StarObject &object);
62  bool readC2(StarZone &zone, StarObject &object);
64  bool readC4(StarZone &zone, StarObject &object);
66  bool readD0(StarZone &zone, StarObject &object);
68  bool readD8(StarZone &zone, StarObject &object);
69 
71  bool readChild(StarZone &zone, StarObject &object);
73  bool readHeader(StarZone &zone, libstoff::DebugStream &f, int &type, int valueMode=1) const;
75  bool readDataBlock(StarZone &zone, libstoff::DebugStream &f) const;
80  int readNumber(STOFFInputStreamPtr input, int vers) const;
82  uint16_t m_version;
83 };
84 
85 #endif
86 // vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
bool readHeader(StarZone &zone, libstoff::DebugStream &f, int &type, int valueMode=1) const
try to read a block header
Definition: StarLayout.cxx:495
shared_ptr< STOFFInputStream > STOFFInputStreamPtr
a smart pointer of STOFFInputStream
Definition: libstaroffice_internal.hxx:488
structure to parse a layout in a text zone (very incomplete)
Definition: StarLayout.hxx:50
bool readChild(StarZone &zone, StarObject &object)
try to read a child of a zone
Definition: StarLayout.cxx:568
bool readC4(StarZone &zone, StarObject &object)
try to read a sub zone: &#39;c4&#39; or &#39;c7&#39;
Definition: StarLayout.cxx:310
bool readD8(StarZone &zone, StarObject &object)
try to read a sub zone: &#39;d8&#39;
Definition: StarLayout.cxx:435
int readNumber(STOFFInputStreamPtr input, int vers) const
try to read a positive number of 1|2 bytes depending on the version:
Definition: StarLayout.cxx:46
bool readDataBlock(StarZone &zone, libstoff::DebugStream &f) const
try to read a small data block
Definition: StarLayout.cxx:55
bool readD0(StarZone &zone, StarObject &object)
try to read a sub zone: &#39;d0&#39;
Definition: StarLayout.cxx:353
bool readC1(StarZone &zone, StarObject &object)
try to read a sub zone: &#39;c1&#39; or &#39;cc&#39;, &#39;cd&#39;
Definition: StarLayout.cxx:126
StarLayout()
constructor
Definition: StarLayout.hxx:53
bool readC2(StarZone &zone, StarObject &object)
try to read a sub zone: &#39;c2&#39;, &#39;c3&#39;, &#39;c6&#39;, &#39;c8&#39;, &#39;c9&#39;, &#39;ce&#39;, &#39;d2&#39;, &#39;d3&#39;, &#39;d7&#39;, &#39;e3&#39; or &#39;f2&#39; ...
Definition: StarLayout.cxx:207
uint16_t m_version
the version
Definition: StarLayout.hxx:82
bool read(StarZone &zone, StarObject &object)
try to read a layout: &#39;U&#39;
Definition: StarLayout.cxx:81
Definition: STOFFDebug.hxx:182
an object corresponding to an OLE directory
Definition: StarObject.hxx:64
a zone in a StarOffice file
Definition: StarZone.hxx:56

Generated on Fri Apr 13 2018 00:25:10 for libstaroffice by doxygen 1.8.5