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 #include "WP6PrefixDataPacket.h" 00029 #include "WP6Listener.h" 00030 #include "WPXStream.h" 00031 #include "WPXString.h" 00032 00033 class WP6GraphicsBoxStylePacket : public WP6PrefixDataPacket 00034 { 00035 public: 00036 WP6GraphicsBoxStylePacket(WPXInputStream *input, WPXEncryption *encryption, int id, uint32_t dataOffset, uint32_t dataSize); 00037 ~WP6GraphicsBoxStylePacket(); 00038 void _readContents(WPXInputStream *input, WPXEncryption *encryption); 00039 void parse(WP6Listener * /*listener*/) const {} 00040 00041 uint8_t getGeneralPositioningFlags() const 00042 { 00043 return m_generalPositioningFlags; 00044 } 00045 uint8_t getHorizontalPositioningFlags() const 00046 { 00047 return m_horizontalPositioningFlags; 00048 } 00049 int16_t getHorizontalOffset() const 00050 { 00051 return m_horizontalOffset; 00052 } 00053 uint8_t getLeftColumn() const 00054 { 00055 return m_leftColumn; 00056 } 00057 uint8_t getRightColumn() const 00058 { 00059 return m_rightColumn; 00060 } 00061 uint8_t getVerticalPositioningFlags() const 00062 { 00063 return m_verticalPositioningFlags; 00064 } 00065 int16_t getVerticalOffset() const 00066 { 00067 return m_verticalOffset; 00068 } 00069 uint8_t getWidthFlags() const 00070 { 00071 return m_widthFlags; 00072 } 00073 uint16_t getWidth() const 00074 { 00075 return m_width; 00076 } 00077 uint8_t getHeightFlags() const 00078 { 00079 return m_heightFlags; 00080 } 00081 uint16_t getHeight() const 00082 { 00083 return m_height; 00084 } 00085 uint8_t getContentType() const 00086 { 00087 return m_contentType; 00088 } 00089 uint16_t getNativeWidth() const 00090 { 00091 return m_nativeWidth; 00092 } 00093 uint16_t getNativeHeight() const 00094 { 00095 return m_nativeHeight; 00096 } 00097 00098 private: 00099 WP6GraphicsBoxStylePacket(const WP6GraphicsBoxStylePacket &); 00100 WP6GraphicsBoxStylePacket &operator=(const WP6GraphicsBoxStylePacket &); 00101 bool m_isLibraryStyle; 00102 WPXString m_boxStyleName; 00103 uint8_t m_generalPositioningFlags; 00104 uint8_t m_horizontalPositioningFlags; 00105 int16_t m_horizontalOffset; 00106 uint8_t m_leftColumn, m_rightColumn; 00107 uint8_t m_verticalPositioningFlags; 00108 int16_t m_verticalOffset; 00109 uint8_t m_widthFlags; 00110 uint16_t m_width; 00111 uint8_t m_heightFlags; 00112 uint16_t m_height; 00113 uint8_t m_contentType, m_contentHAlign, m_contentVAlign; 00114 bool m_contentPreserveAspectRatio; 00115 uint16_t m_nativeWidth, m_nativeHeight; 00116 }; 00117 #endif /* WP6GRAPHICSBOXSTYLEPACKET_H */ 00118 /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */