00001 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ 00002 /* libwpd 00003 * Version: MPL 2.0 / LGPLv2.1+ 00004 * 00005 * This Source Code Form is subject to the terms of the Mozilla Public 00006 * License, v. 2.0. If a copy of the MPL was not distributed with this 00007 * file, You can obtain one at http://mozilla.org/MPL/2.0/. 00008 * 00009 * Major Contributor(s): 00010 * Copyright (C) 2007 Fridrich Strba (fridrich.strba@bluewin.ch) 00011 * 00012 * For minor contributions see the git repository. 00013 * 00014 * Alternatively, the contents of this file may be used under the terms 00015 * of the GNU Lesser General Public License Version 2.1 or later 00016 * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are 00017 * applicable instead of those above. 00018 * 00019 * For further information visit http://libwpd.sourceforge.net 00020 */ 00021 00022 /* "This product is not manufactured, approved, or supported by 00023 * Corel Corporation or Corel Corporation Limited." 00024 */ 00025 00026 #ifndef WP6GRAPHICSBOXSTYLEPACKET_H 00027 #define WP6GRAPHICSBOXSTYLEPACKET_H 00028 00029 #include <libwpd/libwpd.h> 00030 #include <libwpd-stream/libwpd-stream.h> 00031 #include "WP6PrefixDataPacket.h" 00032 #include "WP6Listener.h" 00033 00034 class WP6GraphicsBoxStylePacket : public WP6PrefixDataPacket 00035 { 00036 public: 00037 WP6GraphicsBoxStylePacket(WPXInputStream *input, WPXEncryption *encryption, int id, uint32_t dataOffset, uint32_t dataSize); 00038 ~WP6GraphicsBoxStylePacket(); 00039 void _readContents(WPXInputStream *input, WPXEncryption *encryption); 00040 void parse(WP6Listener * /*listener*/) const {} 00041 00042 uint8_t getGeneralPositioningFlags() const 00043 { 00044 return m_generalPositioningFlags; 00045 } 00046 uint8_t getHorizontalPositioningFlags() const 00047 { 00048 return m_horizontalPositioningFlags; 00049 } 00050 int16_t getHorizontalOffset() const 00051 { 00052 return m_horizontalOffset; 00053 } 00054 uint8_t getLeftColumn() const 00055 { 00056 return m_leftColumn; 00057 } 00058 uint8_t getRightColumn() const 00059 { 00060 return m_rightColumn; 00061 } 00062 uint8_t getVerticalPositioningFlags() const 00063 { 00064 return m_verticalPositioningFlags; 00065 } 00066 int16_t getVerticalOffset() const 00067 { 00068 return m_verticalOffset; 00069 } 00070 uint8_t getWidthFlags() const 00071 { 00072 return m_widthFlags; 00073 } 00074 uint16_t getWidth() const 00075 { 00076 return m_width; 00077 } 00078 uint8_t getHeightFlags() const 00079 { 00080 return m_heightFlags; 00081 } 00082 uint16_t getHeight() const 00083 { 00084 return m_height; 00085 } 00086 uint8_t getContentType() const 00087 { 00088 return m_contentType; 00089 } 00090 uint16_t getNativeWidth() const 00091 { 00092 return m_nativeWidth; 00093 } 00094 uint16_t getNativeHeight() const 00095 { 00096 return m_nativeHeight; 00097 } 00098 00099 private: 00100 WP6GraphicsBoxStylePacket(const WP6GraphicsBoxStylePacket &); 00101 WP6GraphicsBoxStylePacket &operator=(const WP6GraphicsBoxStylePacket &); 00102 bool m_isLibraryStyle; 00103 WPXString m_boxStyleName; 00104 uint8_t m_generalPositioningFlags; 00105 uint8_t m_horizontalPositioningFlags; 00106 int16_t m_horizontalOffset; 00107 uint8_t m_leftColumn, m_rightColumn; 00108 uint8_t m_verticalPositioningFlags; 00109 int16_t m_verticalOffset; 00110 uint8_t m_widthFlags; 00111 uint16_t m_width; 00112 uint8_t m_heightFlags; 00113 uint16_t m_height; 00114 uint8_t m_contentType, m_contentHAlign, m_contentVAlign; 00115 bool m_contentPreserveAspectRatio; 00116 uint16_t m_nativeWidth, m_nativeHeight; 00117 }; 00118 #endif /* WP6GRAPHICSBOXSTYLEPACKET_H */ 00119 /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */