00001 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ 00002 /* libwpd 00003 * Copyright (C) 2007 Fridrich Strba (fridrich.strba@bluewin.ch) 00004 * Copyright (C) 2007 Novell Inc. (http://www.novell.com) 00005 * 00006 * This library is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU Library General Public 00008 * License as published by the Free Software Foundation; either 00009 * version 2 of the License, or (at your option) any later version. 00010 * 00011 * This library is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 * Library General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU Library General Public 00017 * License along with this library; if not, write to the Free Software 00018 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA 00019 * 00020 * For further information visit http://libwpd.sourceforge.net 00021 */ 00022 00023 /* "This product is not manufactured, approved, or supported by 00024 * Corel Corporation or Corel Corporation Limited." 00025 */ 00026 00027 #ifndef WP6GRAPHICSBOXSTYLEPACKET_H 00028 #define WP6GRAPHICSBOXSTYLEPACKET_H 00029 #include "WP6PrefixDataPacket.h" 00030 #include "WP6Listener.h" 00031 #include "WPXStream.h" 00032 #include "WPXString.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: */