home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / wv2 / paragraphproperties.h < prev    next >
Encoding:
C/C++ Source or Header  |  2003-08-07  |  2.1 KB  |  68 lines

  1. /* This file is part of the wvWare 2 project
  2.    Copyright (C) 2002-2003 Werner Trobin <trobin@kde.org>
  3.  
  4.    This library is free software; you can redistribute it and/or
  5.    modify it under the terms of the GNU Library General Public
  6.    License version 2 as published by the Free Software Foundation.
  7.  
  8.    This library is distributed in the hope that it will be useful,
  9.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  10.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  11.    Library General Public License for more details.
  12.  
  13.    You should have received a copy of the GNU Library General Public License
  14.    along with this library; see the file COPYING.LIB.  If not, write to
  15.    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  16.    Boston, MA 02111-1307, USA.
  17. */
  18.  
  19. #ifndef PARAGRAPHPROPERTIES_H
  20. #define PARAGRAPHPROPERTIES_H
  21.  
  22. #include "word97_generated.h"
  23.  
  24. namespace wvWare
  25. {
  26.  
  27.     class ListInfo;
  28.     class ListInfoProvider;
  29.  
  30.     /**
  31.      * A tiny helper class to wrap the PAP and any additional information
  32.      * we want to pass to the consumer. Right now we have a ListInfo object
  33.      * if the paragraph belongs to some list.
  34.      */
  35.     class ParagraphProperties : public Shared
  36.     {
  37.     public:
  38.         ParagraphProperties();
  39.         explicit ParagraphProperties( const Word97::PAP& pap );
  40.         ParagraphProperties( const ParagraphProperties& rhs );
  41.         ~ParagraphProperties();
  42.  
  43.         Word97::PAP& pap();
  44.         const Word97::PAP& pap() const;
  45.         /**
  46.          * If this paragraph belongs to a list, the ListInfo object will be
  47.          * valid and contain useful information about the formatting of the
  48.          * list counter. If the paragraph is not inside a list, this method
  49.          * will return 0.
  50.          */
  51.         const ListInfo* listInfo() const;
  52.  
  53.         /**
  54.          * @internal
  55.          */
  56.         void createListInfo( ListInfoProvider& listInfoProvider );
  57.  
  58.     private:
  59.         ParagraphProperties& operator=( const ParagraphProperties& rhs );
  60.  
  61.         Word97::PAP m_pap;
  62.         ListInfo* m_listInfo;
  63.     };
  64.  
  65. } // namespace wvWare
  66.  
  67. #endif // PARAGRAPHPROPERTIES_H
  68.