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