LCOV - code coverage report
Current view: top level - include/filter/msfilter - svdfppt.hxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 77 0.0 %
Date: 2014-04-14 Functions: 0 52 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : 
      20             : #ifndef INCLUDED_FILTER_MSFILTER_SVDFPPT_HXX
      21             : #define INCLUDED_FILTER_MSFILTER_SVDFPPT_HXX
      22             : 
      23             : #include <rtl/ustring.hxx>
      24             : #include <tools/solar.h>
      25             : #include <tools/gen.hxx>
      26             : #include <tools/color.hxx>
      27             : #include <svx/svdobj.hxx>
      28             : #include <editeng/numitem.hxx>
      29             : #include <editeng/editdata.hxx>
      30             : #include <filter/msfilter/msdffimp.hxx>
      31             : #include <filter/msfilter/msocximex.hxx>
      32             : #include <editeng/eeitem.hxx>
      33             : #define ITEMID_FIELD EE_FEATURE_FIELD
      34             : #include <editeng/flditem.hxx>
      35             : #undef ITEMID_FIELD
      36             : #include <filter/msfilter/msfilterdllapi.h>
      37             : #include <vcl/font.hxx>
      38             : #include <vector>
      39             : #include <boost/optional.hpp>
      40             : #include <boost/ptr_container/ptr_vector.hpp>
      41             : 
      42             : class SdrModel;
      43             : class SdPage;
      44             : class SdrPage;
      45             : class SdrObject;
      46             : class SvStream;
      47             : class Polygon;
      48             : class PolyPolygon;
      49             : class SfxItemSet;
      50             : class Outliner;
      51             : class Graphic;
      52             : class SvxMSDffManager;
      53             : class PPTTextObj;
      54             : class DffRecordHeader;
      55             : class SvxBulletItem;
      56             : 
      57             : #define PPT_IMPORTFLAGS_NO_TEXT_ASSERT  1
      58             : 
      59           0 : struct MSFILTER_DLLPUBLIC PptCurrentUserAtom
      60             : {
      61             :     sal_uInt32  nMagic;
      62             :     sal_uInt32  nCurrentUserEdit;
      63             :     sal_uInt16  nDocFileVersion;
      64             :     sal_uInt8   nMajorVersion;
      65             :     sal_uInt8   nMinorVersion;
      66             :     OUString    aCurrentUser;
      67             : 
      68             : public:
      69             : 
      70           0 :     PptCurrentUserAtom() :  nMagic              ( 0 ),
      71             :                             nCurrentUserEdit    ( 0 ),
      72             :                             nDocFileVersion     ( 0 ),
      73             :                             nMajorVersion       ( 0 ),
      74           0 :                             nMinorVersion       ( 0 ) {}
      75             : 
      76             :     MSFILTER_DLLPUBLIC friend SvStream& ReadPptCurrentUserAtom( SvStream& rIn, PptCurrentUserAtom& rAtom );
      77             : };
      78             : 
      79           0 : struct MSFILTER_DLLPUBLIC PowerPointImportParam
      80             : {
      81             :     SvStream&           rDocStream;
      82             :     sal_uInt32          nImportFlags;
      83             :     PptCurrentUserAtom  aCurrentUserAtom;
      84             : 
      85             :     PowerPointImportParam( SvStream& rDocStream, sal_uInt32 nImportFlags );
      86             : };
      87             : 
      88           0 : struct SdHyperlinkEntry
      89             : {
      90             :     sal_uInt32  nIndex;
      91             :     sal_Int32   nPrivate1;
      92             :     sal_Int32   nPrivate2;
      93             :     sal_Int32   nPrivate3;
      94             :     sal_Int32   nInfo;
      95             :     OUString    aTarget;
      96             :     OUString    aSubAdress;
      97             : 
      98             :     sal_Int32   nStartPos;
      99             :     sal_Int32   nEndPos;
     100             : 
     101             :     OUString    aConvSubString;
     102             :     ESelection  aESelection;
     103             :     bool        bSelection;
     104             : };
     105             : 
     106             : // Helper class for reading the PPT InteractiveInfoAtom
     107             : struct MSFILTER_DLLPUBLIC PptInteractiveInfoAtom
     108             : {
     109             :     sal_uInt32          nSoundRef;
     110             :     sal_uInt32          nExHyperlinkId;
     111             :     sal_uInt8           nAction;
     112             :     sal_uInt8           nOleVerb;
     113             :     sal_uInt8           nJump;
     114             :     sal_uInt8           nFlags;
     115             :     sal_uInt8           nHyperlinkType;
     116             : 
     117             :     // unknown, because total size is 16
     118             :     sal_uInt8           nUnknown1;
     119             :     sal_uInt8           nUnknown2;
     120             :     sal_uInt8           nUnknown3;
     121             : 
     122             : public:
     123             : 
     124             :     MSFILTER_DLLPUBLIC friend SvStream& ReadPptInteractiveInfoAtom( SvStream& rIn, PptInteractiveInfoAtom& rAtom );
     125             : };
     126             : 
     127             : enum PptPageKind { PPT_MASTERPAGE, PPT_SLIDEPAGE, PPT_NOTEPAGE };
     128             : 
     129             : enum PptPageFormat
     130             : {   PPTPF_SCREEN,
     131             :     PPTPF_USLETTER, // 8.5x11"
     132             :     PPTPF_A4,       // 210x297mm
     133             :     PPTPF_35MMDIA,  // DIA
     134             :     PPTPF_OVERHEAD,
     135             :     PPTPF_CUSTOM
     136             : };
     137             : 
     138             : // values for PPT_PST_TextHeaderAtom's sal_uLong
     139             : enum PPT_TextHeader
     140             : {
     141             :     PPTTH_TITLE,
     142             :     PPTTH_BODY,
     143             :     PPTTH_NOTES,
     144             :     PPTTH_NOTUSED,
     145             :     PPTTH_OTHER,       // Text in a Shape
     146             :     PPTTH_CENTERBODY,  // Subtitle in Title-Slide
     147             :     PPTTH_CENTERTITLE, // Title in Title-Slide
     148             :     PPTTH_HALFBODY,    // Body in two-column slide
     149             :     PPTTH_QUARTERBODY  // Body in four-body slide
     150             : };
     151             : 
     152             : #define TSS_TYPE_PAGETITLE      (0)
     153             : #define TSS_TYPE_BODY           (1)
     154             : #define TSS_TYPE_NOTES          (2)
     155             : #define TSS_TYPE_UNUSED         (3)
     156             : #define TSS_TYPE_TEXT_IN_SHAPE  (4)
     157             : #define TSS_TYPE_SUBTITLE       (5)
     158             : #define TSS_TYPE_TITLE          (6)
     159             : #define TSS_TYPE_HALFBODY       (7)
     160             : #define TSS_TYPE_QUARTERBODY    (8)
     161             : 
     162             : // Inventor-Id for PPT UserData
     163             : const sal_uInt32 PPTInventor = sal_uInt32('P') * 0x00000001
     164             :                              + sal_uInt32('P') * 0x00000100
     165             :                              + sal_uInt32('T') * 0x00010000
     166             :                              + sal_uInt32('0') * 0x01000000;
     167             : 
     168             : // Object IDs for StarDraw UserData
     169             : #define PPT_OBJECTINFO_ID       (1)
     170             : 
     171           0 : struct MSFILTER_DLLPUBLIC PptDocumentAtom
     172             : {
     173             :     Size            aSlidesPageSize;                    // page size of the slides in 576DPI
     174             :     Size            aNotesPageSize;                     // page size of the notes in 576DPI
     175             :     // avoid RatioAtom for the time being
     176             :     sal_uInt32      nNotesMasterPersist;                // 0=non-existent
     177             :     sal_uInt32      nHandoutMasterPersist;              // 0=non-existent
     178             :     sal_uInt16      n1stPageNumber;                     // page number of the first slide
     179             :     PptPageFormat   eSlidesPageFormat;                  // page format of the slides
     180             :     bool            bEmbeddedTrueType           : 1;    // TrueType direcly within the File?
     181             :     bool            bTitlePlaceholdersOmitted   : 1;
     182             :     bool            bRightToLeft                : 1;
     183             :     bool            bShowComments               : 1;
     184             : 
     185             : public:
     186             : 
     187             :     Size    GetPageSize( const Size& rSiz ) const;
     188           0 :     Size    GetSlidesPageSize() const { return GetPageSize( aSlidesPageSize ); }
     189           0 :     Size    GetNotesPageSize() const { return GetPageSize( aNotesPageSize ); }
     190             : 
     191             :     friend SvStream& ReadPptDocumentAtom( SvStream& rIn, PptDocumentAtom& rAtom );
     192             : };
     193             : 
     194             : struct PptSlideLayoutAtom
     195             : {
     196             :     sal_Int32           eLayout;                // 0..18
     197             :     sal_uInt8           aPlaceholderId[ 8 ];
     198             : 
     199             : public:
     200           0 :                         PptSlideLayoutAtom() { Clear(); }
     201             :     void                Clear();
     202             : 
     203             :     // SlideLayoutAtom is read without header!
     204             :     friend SvStream& ReadPptSlideLayoutAtom( SvStream& rIn, PptSlideLayoutAtom& rAtom );
     205             : };
     206             : 
     207             : struct PptSlideAtom
     208             : {
     209             :     PptSlideLayoutAtom  aLayout;
     210             :     sal_uInt32          nMasterId;
     211             :     sal_uInt32          nNotesId;
     212             :     sal_uInt16          nFlags;
     213             : 
     214             : public:
     215           0 :                         PptSlideAtom() { Clear(); }
     216             :     void                Clear();
     217             : 
     218             :     friend SvStream& ReadPptSlideAtom(SvStream& rIn, PptSlideAtom& rAtom);
     219             : };
     220             : 
     221             : struct PptSlidePersistAtom
     222             : {
     223             :     sal_uInt32          nPsrReference;
     224             :     sal_uInt32          nFlags;
     225             :     sal_uInt32          nNumberTexts;
     226             :     sal_uInt32          nSlideId;
     227             :     sal_uInt32          nReserved;                  // we will use nReserved temporarly to set the offset to SSSlideInfoAtom ( if possible )
     228             : 
     229             : public:
     230           0 :                         PptSlidePersistAtom() { Clear(); }
     231             :     void                Clear();
     232             : 
     233             :     friend SvStream& ReadPptSlidePersistAtom(SvStream& rIn, PptSlidePersistAtom& rAtom);
     234             : };
     235             : 
     236             : struct PptNotesAtom
     237             : {
     238             :     sal_uInt32          nSlideId;
     239             :     sal_uInt16          nFlags;
     240             : 
     241             : public:
     242           0 :                         PptNotesAtom() { Clear(); }
     243             :     void                Clear();
     244             : 
     245             :     friend SvStream& ReadPptNotesAtom(SvStream& rIn, PptNotesAtom& rAtom);
     246             : };
     247             : 
     248             : struct PptColorSchemeAtom
     249             : {
     250             :     sal_uInt8           aData[32];
     251             : 
     252             : public:
     253           0 :                         PptColorSchemeAtom () { Clear(); }
     254             :     void                Clear();
     255             :     Color               GetColor( sal_uInt16 nNum ) const;
     256             : 
     257             :     friend SvStream& ReadPptColorSchemeAtom(SvStream& rIn, PptColorSchemeAtom& rAtom);
     258             : };
     259             : 
     260           0 : struct PptFontEntityAtom
     261             : {
     262             :     OUString            aName;
     263             :     double              fScaling;
     264             :     sal_uInt8           lfClipPrecision;
     265             :     sal_uInt8           lfQuality;
     266             : 
     267             :     sal_uInt32          nUniqueFontId;          // not used anymore
     268             :     rtl_TextEncoding    eCharSet;
     269             :     FontFamily          eFamily;
     270             :     FontPitch           ePitch;
     271             :     bool                bAvailable;
     272             : 
     273             :     friend SvStream& ReadPptFontEntityAtom(SvStream& rIn, PptFontEntityAtom& rAtom);
     274             : };
     275             : 
     276             : class PptFontCollection;
     277             : struct PptUserEditAtom
     278             : {
     279             :     DffRecordHeader     aHd;
     280             :     sal_Int32           nLastSlideID;            // ID of last visible slide
     281             :     sal_uInt32          nVersion;                // This is major/minor/build which did the edit
     282             :     sal_uInt32          nOffsetLastEdit;         // File offset of prev PptUserEditAtom
     283             :     sal_uInt32          nOffsetPersistDirectory; // Offset to PersistPtrs for this file version.
     284             :     sal_uInt32          nDocumentRef;
     285             :     sal_uInt32          nMaxPersistWritten;      // total number of Persist entries up to this point
     286             :     sal_Int16           eLastViewType;           // enum view type
     287             : 
     288             : public:
     289           0 :     PptUserEditAtom()
     290             :         : nLastSlideID( 0 )
     291             :         , nVersion( 0 )
     292             :         , nOffsetLastEdit( 0 )
     293             :         , nOffsetPersistDirectory( 0 )
     294             :         , nDocumentRef( 0 )
     295             :         , nMaxPersistWritten( 0 )
     296           0 :         , eLastViewType( 0 )
     297           0 :         {}
     298             : 
     299             :     friend SvStream& ReadPptUserEditAtom( SvStream& rIn, PptUserEditAtom& rAtom );
     300             : };
     301             : 
     302             : struct PptOEPlaceholderAtom
     303             : {
     304             :     sal_uInt32          nPlacementId;
     305             :     sal_uInt8           nPlaceholderId;
     306             :     sal_uInt8           nPlaceholderSize; // 0=Full size, 1=Half size, 2=Quarter of Slide
     307             : 
     308             : public:
     309           0 :                         PptOEPlaceholderAtom() { Clear(); }
     310             :     void                Clear();
     311             : 
     312             :     friend SvStream& ReadPptOEPlaceholderAtom( SvStream& rIn, PptOEPlaceholderAtom& rAtom );
     313             : };
     314             : 
     315             : struct ProcessData;
     316             : struct PPTStyleSheet;
     317             : struct HeaderFooterEntry;
     318             : struct PptSlidePersistEntry
     319             : {
     320             :     PptSlidePersistAtom aPersistAtom;
     321             :     PptSlideAtom        aSlideAtom;
     322             :     PptNotesAtom        aNotesAtom;
     323             :     PptColorSchemeAtom  aColorScheme;           // each slide includes this colorscheme atom
     324             :     PPTStyleSheet*      pStyleSheet;            // stylesheet of this page (only in masterpages), since XP supports more than one masterpage
     325             : 
     326             :     sal_uInt32          HeaderFooterOfs[ 4 ];   // containing the ofs to the placeholder (only masterpage)
     327             :     HeaderFooterEntry*  pHeaderFooterEntry;
     328             :     SvxMSDffSolverContainer* pSolverContainer;
     329             :     sal_uInt32          nSlidePersistStartOffset;// is an array to the end of the SlidePersistAtom of this page, TextHeaderAtom is following
     330             :     sal_uInt32          nSlidePersistEndOffset;
     331             :     sal_uInt32          nBackgroundOffset;      // fileoffset
     332             :     sal_uInt32          nDrawingDgId;           // valid, if not -1
     333             :     sal_uInt32*         pPresentationObjects;   // if valid, this is a pointer to an array that includes the offsets to the presentation objects
     334             :                                                 // on this masterpage for each instance (0 - 8);
     335             :     SdrObject*          pBObj;
     336             :     bool                bBObjIsTemporary;
     337             : 
     338             :     PptPageKind         ePageKind;
     339             : 
     340             :     bool                bNotesMaster    : 1;    // for NotesMaster
     341             :     bool                bHandoutMaster  : 1;    // for HandoutMaster
     342             :     bool                bStarDrawFiller : 1;    // special for StarDraw
     343             : public:
     344             :                         PptSlidePersistEntry();
     345             :                         ~PptSlidePersistEntry();
     346           0 :     sal_uInt32          GetSlideId() const { return aPersistAtom.nSlideId; }
     347             : };
     348             : 
     349           0 : class _PptSlidePersistList : public std::vector<PptSlidePersistEntry*>
     350             : {
     351             : public:
     352           0 :     ~_PptSlidePersistList()
     353           0 :     {
     354           0 :         for( const_iterator it = begin(); it != end(); ++it )
     355           0 :             delete *it;
     356           0 :     }
     357             : };
     358             : 
     359             : #define PPTSLIDEPERSIST_ENTRY_NOTFOUND 0xFFFF
     360             : 
     361           0 : class MSFILTER_DLLPUBLIC PptSlidePersistList: public _PptSlidePersistList
     362             : {
     363             : public:
     364             :     sal_uInt16          FindPage( sal_uInt32 nId ) const;
     365             : };
     366             : 
     367             : class  SfxObjectShell;
     368             : struct PPTOleEntry
     369             : {
     370             :     sal_uInt32          nId;                        // OleId
     371             :     sal_uInt32          nPersistPtr;                // PersistPtr
     372             :     sal_uInt32          nRecHdOfs;                  // points to the record header: ExObjListHd
     373             :     SfxObjectShell*     pShell;
     374             :     sal_uInt16          nType;                      // maybe PPT_PST_ExEmbed or PPT_PST_ExControl
     375             :     sal_uInt32          nAspect;                    // the aspect of the OLE object
     376             : 
     377           0 :     PPTOleEntry( sal_uInt32 nid, sal_uInt32 nOfs, SfxObjectShell* pSh, sal_uInt16 nT, sal_uInt32 nAsp )
     378             :         : nId(nid)
     379             :         , nPersistPtr(0)
     380             :         , nRecHdOfs(nOfs)
     381             :         , pShell(pSh)
     382             :         , nType(nT)
     383           0 :         , nAspect(nAsp)
     384           0 :     {}
     385             : };
     386             : 
     387             : struct PptExOleObjAtom
     388             : {
     389             :     sal_uInt32  nAspect;
     390             :     sal_uInt32  nId;
     391             :     sal_uInt32  nPersistPtr;
     392             : 
     393             : public:
     394             : 
     395             :     friend SvStream& ReadPptExOleObjAtom( SvStream& rIn, PptExOleObjAtom& rAtom );
     396             : };
     397             : 
     398             : typedef ::std::vector< PPTOleEntry* > PPTOleEntryList;
     399             : class PPTExtParaProv;
     400             : class MSFILTER_DLLPUBLIC SdrEscherImport : public SvxMSDffManager
     401             : {
     402             : protected:
     403             : 
     404             :     friend class PPTTextObj;
     405             :     friend class PPTPortionObj;
     406             :     friend struct PPTStyleTextPropReader;
     407             :     friend class ImplSdPPTImport;
     408             : 
     409             :     PptDocumentAtom     aDocAtom;
     410             :     DffRecordManager    aDocRecManager;             // contains all first level container and atoms of the document container
     411             : 
     412             :     PPTOleEntryList     aOleObjectList;             // contains PPTOleEntrys
     413             : 
     414             :     PptFontCollection*  pFonts;
     415             : 
     416             :     sal_uInt32          nStreamLen;
     417             :     sal_uInt16          nTextStylesIndex;
     418             : 
     419             :     rtl_TextEncoding    eCharSetSystem;
     420             : 
     421             :     bool                bWingdingsChecked       : 1;
     422             :     bool                bWingdingsAvailable     : 1;
     423             :     bool                bMonotypeSortsChecked   : 1;
     424             :     bool                bMonotypeSortsAvailable : 1;
     425             :     bool                bTimesNewRomanChecked   : 1;
     426             :     bool                bTimesNewRomanAvailable : 1;
     427             : 
     428             :     bool                 ReadString( OUString& rStr ) const;
     429             :     // only for PowerPoint filter:
     430             :     virtual const PptSlideLayoutAtom* GetSlideLayoutAtom() const;
     431             : 
     432             : public:
     433             :     using SvxMSDffManager::ReadObjText;
     434             : 
     435             :     PowerPointImportParam& rImportParam;
     436             : 
     437             :                         SdrEscherImport( PowerPointImportParam&, const OUString& rBaseURL );
     438             :     virtual             ~SdrEscherImport();
     439             :     virtual bool        GetColorFromPalette( sal_uInt16 nNum, Color& rColor ) const SAL_OVERRIDE;
     440             :     virtual bool        SeekToShape( SvStream& rSt, void* pClientData, sal_uInt32 nId ) const SAL_OVERRIDE;
     441             :     PptFontEntityAtom*  GetFontEnityAtom( sal_uInt32 nNum ) const;
     442             :     void                RecolorGraphic( SvStream& rSt, sal_uInt32 nRecLen, Graphic& rGraph );
     443             :     virtual SdrObject*  ReadObjText( PPTTextObj* pTextObj, SdrObject* pObj, SdPage* pPage ) const;
     444             :     virtual SdrObject*  ProcessObj( SvStream& rSt, DffObjData& rData, void* pData, Rectangle& rTextRect, SdrObject* pObj ) SAL_OVERRIDE;
     445             :     virtual void        ProcessClientAnchor2( SvStream& rSt, DffRecordHeader& rHd, void* pData, DffObjData& rObj ) SAL_OVERRIDE;
     446             :     void                ImportHeaderFooterContainer( DffRecordHeader& rHeader, HeaderFooterEntry& rEntry );
     447             : };
     448             : 
     449             : 
     450             : 
     451             : #define SD_HEADERFOOTER_DATE        1
     452             : #define SD_HEADERFOOTER_TODAYDATE   2
     453             : #define SD_HEADERFOOTER_USERDATE    4
     454             : #define SD_HEADERFOOTER_SLIDENUMBER 8
     455             : #define SD_HEADERFOOTER_HEADER      16
     456             : #define SD_HEADERFOOTER_FOOTER      32
     457             : 
     458             : class SvxFieldItem;
     459             : struct MSFILTER_DLLPUBLIC PPTFieldEntry
     460             : {
     461             :     sal_uInt16          nPos;
     462             :     sal_uInt16          nTextRangeEnd;
     463             :     SvxFieldItem*       pField1;
     464             :     SvxFieldItem*       pField2;
     465             :     OUString*           pString;
     466             : 
     467           0 :     PPTFieldEntry() : nPos( 0 ), nTextRangeEnd( 0 ), pField1( NULL ), pField2( NULL ), pString( NULL ) {};
     468             :     ~PPTFieldEntry();
     469             : 
     470             :     void                SetDateTime( sal_uInt32 nType );
     471             : 
     472             :                         // converting PPT date time format:
     473             :     static void         GetDateTime(
     474             :                             const sal_uInt32 nVal,
     475             :                             SvxDateFormat& eDateFormat,
     476             :                             SvxTimeFormat& eTimeFormat
     477             :                         );
     478             : };
     479             : 
     480           0 : struct MSFILTER_DLLPUBLIC HeaderFooterEntry
     481             : {
     482             :     const PptSlidePersistEntry* pMasterPersist;
     483             :     OUString            pPlaceholder[ 4 ];
     484             :     sal_uInt32          nAtom;
     485             : 
     486             :     sal_uInt32          GetMaskForInstance( sal_uInt32 nInstance );
     487             :     sal_uInt32          IsToDisplay( sal_uInt32 nInstance );
     488             :     sal_uInt32          NeedToImportInstance(
     489             :                             const sal_uInt32 nInstance,
     490             :                             const PptSlidePersistEntry& rSlidePersist
     491             :                         );
     492             : 
     493             :                         explicit HeaderFooterEntry( const PptSlidePersistEntry* pMaster = NULL );
     494             :                         ~HeaderFooterEntry();
     495             : };
     496             : 
     497             : struct ProcessData
     498             : {
     499             :     PptSlidePersistEntry&       rPersistEntry;
     500             :     SdPage*                     pPage;
     501             :     ::std::vector< SdrObject* > aBackgroundColoredObjects;
     502             :     sal_uInt32*                 pTableRowProperties;
     503             : 
     504           0 :     ProcessData( PptSlidePersistEntry& rP, SdPage* pP ) :
     505             :         rPersistEntry               ( rP ),
     506             :         pPage                       ( pP ),
     507           0 :         pTableRowProperties         ( NULL ) {};
     508           0 :     ~ProcessData() { delete[] pTableRowProperties; };
     509             : };
     510             : 
     511             : 
     512             : 
     513             : typedef ::std::vector< SdHyperlinkEntry* > SdHyperlinkEntryList;
     514             : class SdrTextObj;
     515             : class SfxObjectShell;
     516             : 
     517             : class MSFILTER_DLLPUBLIC SdrPowerPointImport : public SdrEscherImport
     518             : {
     519             : protected:
     520             : 
     521             :     friend class PPTTextObj;
     522             :     friend class PPTExtParaProv;
     523             :     friend struct PPTStyleSheet;
     524             :     friend class PPTNumberFormatCreator;
     525             : 
     526             :     bool                    bOk;
     527             :     PptUserEditAtom         aUserEditAtom;
     528             :     PptColorSchemeAtom      aPageColors;
     529             :     SdHyperlinkEntryList    aHyperList;
     530             :     sal_uInt32*             pPersistPtr;
     531             :     sal_uLong               nPersistPtrAnz;
     532             : 
     533             :     const PPTStyleSheet*    pPPTStyleSheet; // this is the current stylesheet;
     534             :     const PPTStyleSheet*    pDefaultSheet;  // this is a sheet we are using if no masterpage can be found, but that should
     535             :                                             // never happen just preventing a crash
     536             :     PptSlidePersistList*    pMasterPages;
     537             :     PptSlidePersistList*    pSlidePages;
     538             :     PptSlidePersistList*    pNotePages;
     539             :     sal_uInt16              nAktPageNum;
     540             :     sal_uLong               nDocStreamPos;
     541             :     sal_uInt16              nPageColorsNum;
     542             :     PptPageKind             ePageColorsKind;
     543             :     PptPageKind             eAktPageKind;
     544             : 
     545             : protected:
     546             :     using SdrEscherImport::ReadObjText;
     547             : 
     548             :     bool                    SeekToAktPage(DffRecordHeader* pRecHd=NULL) const;
     549             :     bool                    SeekToDocument(DffRecordHeader* pRecHd=NULL) const;
     550             :     bool                    SeekToContentOfProgTag(
     551             :                                 sal_Int32 nVersion,
     552             :                                 SvStream& rSt,
     553             :                                 const DffRecordHeader& rProgTagBinaryDataHd,
     554             :                                 DffRecordHeader& rContentHd
     555             :                             );
     556             :     virtual SdrObject*      ApplyTextObj(
     557             :                                 PPTTextObj* pTextObj,
     558             :                                 SdrTextObj* pText,
     559             :                                 SdPage* pPage,
     560             :                                 SfxStyleSheet*,
     561             :                                 SfxStyleSheet** )
     562             :                              const;
     563             :     virtual SdrObject*      ReadObjText( PPTTextObj* pTextObj, SdrObject* pObj, SdPage* pPage ) const SAL_OVERRIDE;
     564             :     // #i32596# - new parameter <_nCalledByGroup>, which
     565             :     // indicates, if the OLE object is imported inside a group object.
     566             :     virtual SdrObject*      ImportOLE(
     567             :                                 long nOLEId,
     568             :                                 const Graphic& rGraf,
     569             :                                 const Rectangle& rBoundRect,
     570             :                                 const Rectangle& rVisArea,
     571             :                                 const int _nCalledByGroup,
     572             :                                 sal_Int64 nAspect
     573             :                             ) const SAL_OVERRIDE;
     574             :     SvMemoryStream*         ImportExOleObjStg( sal_uInt32 nPersistPtr, sal_uInt32& nOleId ) const;
     575             :     SdrPage*                MakeBlancPage(bool bMaster) const;
     576             :     bool                    ReadFontCollection();
     577             :     bool                    ForceFontCollection() const
     578             :                             { return pFonts!=NULL?sal_True:((SdrPowerPointImport*)this)->ReadFontCollection(); }
     579             :     PptSlidePersistList*    GetPageList(PptPageKind ePageKind) const;
     580             :     sal_uInt32              GetAktPageId();
     581             :     sal_uInt32              GetMasterPageId(sal_uInt16 nPageNum, PptPageKind ePageKind) const;
     582             :     sal_uInt32              GetNotesPageId(sal_uInt16 nPageNum ) const;
     583             :     SdrOutliner*            GetDrawOutliner( SdrTextObj* pSdrText ) const;
     584             :     void                    SeekOle( SfxObjectShell* pShell, sal_uInt32 nFilterOptions );
     585             : 
     586             :     void                    ApplyTextAnchorAttributes( PPTTextObj& rTextObj, SfxItemSet& rSet ) const;
     587             :     bool                    IsVerticalText() const;
     588             : 
     589             : public:
     590             :                             SdrPowerPointImport( PowerPointImportParam&, const OUString& rBaseURL );
     591             :     virtual                 ~SdrPowerPointImport();
     592             :     sal_uInt16              GetPageCount( PptPageKind eKind = PPT_SLIDEPAGE ) const;
     593             :     void                    SetPageNum( sal_uInt16 nPageNum, PptPageKind = PPT_SLIDEPAGE );
     594             :     sal_uInt16              GetPageNum() const { return nAktPageNum; }
     595             :     PptPageKind             GetPageKind() const { return eAktPageKind; }
     596             :     Size                    GetPageSize() const;
     597             :     SdrObject*              ImportPageBackgroundObject(
     598             :                                 const SdrPage& rPage,
     599             :                                 sal_uInt32& nBgFileOffset,
     600             :                                 bool bForce
     601             :                             );
     602             :     bool                    IsNoteOrHandout( sal_uInt16 nPageNum, PptPageKind ePageKind ) const;
     603             :     bool                    HasMasterPage(
     604             :                                 sal_uInt16 nPageNum,
     605             :                                 PptPageKind ePageKind = PPT_SLIDEPAGE
     606             :                             ) const;
     607             :     sal_uInt16              GetMasterPageIndex(
     608             :                                 sal_uInt16 nPageNum,
     609             :                                 PptPageKind ePageKind = PPT_SLIDEPAGE
     610             :                             ) const;
     611             : 
     612             :     void                    ImportPage( SdrPage* pPage, const PptSlidePersistEntry* pMasterPersist = NULL );
     613             :     virtual bool            GetColorFromPalette(sal_uInt16 nNum, Color& rColor) const SAL_OVERRIDE;
     614             :     virtual bool            SeekToShape( SvStream& rSt, void* pClientData, sal_uInt32 nId ) const SAL_OVERRIDE;
     615             :     sal_Unicode             PPTSubstitute(
     616             :                                 sal_uInt16 nFont,
     617             :                                 sal_Unicode nChar,
     618             :                                 sal_uInt32& nMappedFontId,
     619             :                                 Font& rFont,
     620             :                                 char nDefault
     621             :                             ) const;
     622             :     const PptDocumentAtom&  GetDocumentAtom() const { return aDocAtom; }
     623             :     virtual const PptSlideLayoutAtom*   GetSlideLayoutAtom() const SAL_OVERRIDE;
     624             :     SdrObject*              CreateTable(
     625             :                                 SdrObject* pGroupObject,
     626             :                                 sal_uInt32* pTableArry,
     627             :                                 SvxMSDffSolverContainer*
     628             :                             );
     629             :     virtual bool ReadFormControl( SotStorageRef& rSrc1, com::sun::star::uno::Reference< com::sun::star::form::XFormComponent > & rFormComp ) const = 0;
     630             : };
     631             : 
     632             : struct PPTTextCharacterStyleAtomInterpreter
     633             : {
     634             :     sal_uInt16      nFlags1;
     635             :     sal_uInt16      nFlags2;
     636             :     sal_uInt16      nFlags3;
     637             :     sal_Int32       n1;
     638             :     sal_uInt16      nFontHeight;
     639             :     sal_Int32       nFontColor;
     640             : 
     641             :                     PPTTextCharacterStyleAtomInterpreter();
     642             :                     ~PPTTextCharacterStyleAtomInterpreter();
     643             : 
     644             :     bool            Read( SvStream& rIn, const DffRecordHeader& rRecHd );
     645             : 
     646             :     sal_uInt32      GetColor( sal_uInt32 nDefault );
     647             : };
     648             : 
     649             : struct PPTTextParagraphStyleAtomInterpreter
     650             : {
     651             :     bool        bValid;
     652             :     bool        bForbiddenRules;
     653             :     bool        bHangingPunctuation;
     654             :     bool        bLatinTextWrap;
     655             : 
     656             :                 PPTTextParagraphStyleAtomInterpreter();
     657             :                 ~PPTTextParagraphStyleAtomInterpreter();
     658             : 
     659             :     bool        Read( SvStream& rIn, const DffRecordHeader& rRecHd );
     660             : };
     661             : 
     662             : struct PPTTextSpecInfo
     663             : {
     664             :     sal_uInt32      nCharIdx;
     665             :     sal_uInt16      nLanguage[ 3 ];
     666             :     sal_uInt16      nDontKnow;
     667             : 
     668             :     explicit PPTTextSpecInfo( sal_uInt32 nCharIdx );
     669             :     ~PPTTextSpecInfo();
     670             : };
     671             : 
     672             : typedef ::std::vector< PPTTextSpecInfo* > PPTTextSpecInfoList;
     673             : struct  PPTTextSpecInfoAtomInterpreter
     674             : {
     675             :     bool                bValid;
     676             :     PPTTextSpecInfoList aList;
     677             : 
     678             :                     PPTTextSpecInfoAtomInterpreter();
     679             :                     ~PPTTextSpecInfoAtomInterpreter();
     680             : 
     681             :     bool            Read(
     682             :                         SvStream& rIn,
     683             :                         const DffRecordHeader& rRecHd,
     684             :                         sal_uInt16 nRecordType,
     685             :                         const PPTTextSpecInfo* pTextSpecDefault = NULL
     686             :                     );
     687             : 
     688             : };
     689             : 
     690             : #define PPT_STYLESHEETENTRYS    9
     691             : 
     692             : struct PPTExtParaLevel
     693             : {
     694             :     sal_uInt32  mnExtParagraphMask;
     695             :     sal_uInt16  mnBuBlip;
     696             :     sal_uInt16  mnHasAnm;
     697             :     sal_uInt32  mnAnmScheme;
     698             :     sal_uInt32  mpfPP10Ext;
     699             :     sal_uInt32  mnExtCharacterMask;
     700             :     sal_uInt32  mcfPP10Ext;
     701             :     bool        mbSet;
     702             : 
     703             :     PPTExtParaLevel();
     704             :     friend SvStream& ReadPPTExtParaLevel( SvStream& rIn, PPTExtParaLevel& rL );
     705             : };
     706             : 
     707           0 : struct PPTExtParaSheet
     708             : {
     709             :     PPTExtParaLevel aExtParaLevel[ 5 ];
     710             : };
     711             : 
     712           0 : struct PPTBuGraEntry
     713             : {
     714             :     sal_uInt32  nInstance;
     715             :     Graphic     aBuGra;
     716             : 
     717             :                 PPTBuGraEntry( Graphic& rGraphic, sal_uInt32 nInstance );
     718             : };
     719             : 
     720             : typedef ::std::vector< PPTBuGraEntry* > PPTBuGraEntryList;
     721             : 
     722             : class PPTExtParaProv
     723             : {
     724             :     PPTBuGraEntryList   aBuGraList;
     725             : 
     726             : public :
     727             :     bool                bStyles;
     728             :     bool                bGraphics;
     729             :     DffRecordManager    aExtendedPresRules;
     730             : 
     731             :     PPTExtParaSheet     aExtParaSheet[ PPT_STYLESHEETENTRYS ];
     732             : 
     733             :     bool                GetGraphic( sal_uInt32 nInstance, Graphic& rGraphic ) const;
     734             : 
     735             :                         PPTExtParaProv(
     736             :                             SdrPowerPointImport& rManager,
     737             :                             SvStream& rSt,
     738             :                             const DffRecordHeader* pMainMasterHd
     739             :                         );
     740             :                         ~PPTExtParaProv();
     741             : };
     742             : 
     743           0 : struct PPTCharLevel
     744             : {
     745             :     Color       mnFontColorInStyleSheet;
     746             :     sal_uInt32  mnFontColor;
     747             :     sal_uInt16  mnFlags;
     748             :     sal_uInt16  mnFont;
     749             :     sal_uInt16  mnAsianOrComplexFont;
     750             :     sal_uInt16  mnFontHeight;
     751             :     sal_uInt16  mnEscapement;
     752             : };
     753             : 
     754             : struct PPTCharSheet
     755             : {
     756             :     PPTCharLevel    maCharLevel[ 5 ];
     757             : 
     758             :                     explicit PPTCharSheet( sal_uInt32 nInstance );
     759             :                     PPTCharSheet( const PPTCharSheet& rCharSheet );
     760             : 
     761             :     void            Read( SvStream& rIn, bool bMasterStyle, sal_uInt32 nLevel, bool bFirst );
     762             : };
     763             : 
     764             : struct PPTParaLevel
     765             : {
     766             :     sal_uInt16  mnBuFlags;
     767             :     sal_uInt16  mnBulletChar;
     768             :     sal_uInt16  mnBulletFont;
     769             :     sal_uInt16  mnBulletHeight;
     770             :     sal_uInt32  mnBulletColor;
     771             : 
     772             :     sal_uInt16  mnAdjust;
     773             :     sal_uInt16  mnLineFeed;
     774             :     sal_uInt16  mnUpperDist;
     775             :     sal_uInt16  mnLowerDist;
     776             :     sal_uInt16  mnTextOfs;
     777             :     sal_uInt16  mnBulletOfs;
     778             :     sal_uInt16  mnDefaultTab;
     779             :     sal_uInt16  mnAsianLineBreak;   // bit0:    use asian rules for first and last character
     780             :                                     //    1:    do not wrap latin text in the middle of the word
     781             :                                     //    2:    allow hanging punctuation
     782             :     sal_uInt16  mnBiDi;
     783             : };
     784             : 
     785             : struct PPTParaSheet
     786             : {
     787             : public:
     788             : 
     789             :     PPTParaLevel    maParaLevel[ 5 ];
     790             : 
     791             :                     explicit PPTParaSheet( sal_uInt32 nInstance );
     792             :                     PPTParaSheet( const PPTParaSheet& rParaSheet );
     793             : 
     794             :     void            Read(
     795             :                         SdrPowerPointImport& rMan,
     796             :                         SvStream& rIn,
     797             :                         bool bMasterStyle,
     798             :                         sal_uInt32 nLevel,
     799             :                         bool bFirst
     800             :                     );
     801             :     void        UpdateBulletRelSize(  sal_uInt32 nLevel, sal_uInt16 nFontHeight );
     802             : };
     803             : 
     804             : class PPTParagraphObj;
     805             : class PPTNumberFormatCreator
     806             : {
     807             :     sal_uInt32 nIsBullet;
     808             :     sal_uInt32 nBulletChar;
     809             :     sal_uInt32 nBulletFont;
     810             :     sal_uInt32 nBulletHeight;
     811             :     sal_uInt32 nBulletColor;
     812             :     sal_uInt32 nTextOfs;
     813             :     sal_uInt32 nBulletOfs;
     814             : 
     815             :     void        ImplGetNumberFormat(
     816             :                     SdrPowerPointImport& rMan,
     817             :                     SvxNumberFormat& rNumberFormat,
     818             :                     sal_uInt32 nLevel
     819             :                 );
     820             :     bool       ImplGetExtNumberFormat(
     821             :                     SdrPowerPointImport& rMan,
     822             :                     SvxNumberFormat& rNumberFormat,
     823             :                     sal_uInt32 nLevel,
     824             :                     sal_uInt32 nInstance,
     825             :                     sal_uInt32 nInstanceInSheet,
     826             :                     boost::optional< sal_Int16 >& rStartNumbering,
     827             :                     sal_uInt32 nFontHeight,
     828             :                     PPTParagraphObj* pPara
     829             :                 );
     830             : 
     831             : protected:
     832             : 
     833             :     PPTNumberFormatCreator( PPTExtParaProv* );
     834             :     ~PPTNumberFormatCreator();
     835             : 
     836             : public:
     837             : 
     838             :     PPTExtParaProv*  pExtParaProv;
     839             : 
     840             :     void        GetNumberFormat(
     841             :                     SdrPowerPointImport& rMan,
     842             :                     SvxNumberFormat& rNumberFormat,
     843             :                     sal_uInt32 nLevel,
     844             :                     const PPTParaLevel& rParaLevel,
     845             :                     const PPTCharLevel& rCharLevel,
     846             :                     sal_uInt32 nInstance
     847             :                 );
     848             : 
     849             :     bool        GetNumberFormat(
     850             :                     SdrPowerPointImport& rMan,
     851             :                     SvxNumberFormat& rNumberFormat,
     852             :                     PPTParagraphObj* pPara,
     853             :                     sal_uInt32 nInstanceInSheet,
     854             :                     boost::optional< sal_Int16 >& rStartNumbering
     855             :                 );
     856             : };
     857             : 
     858             : class SvxNumBulletItem;
     859             : struct PPTStyleSheet : public PPTNumberFormatCreator
     860             : {
     861             :     PPTTextSpecInfo     maTxSI;
     862             :     PPTCharSheet*       mpCharSheet[ PPT_STYLESHEETENTRYS ];
     863             :     PPTParaSheet*       mpParaSheet[ PPT_STYLESHEETENTRYS ];
     864             :     SvxNumBulletItem*   mpNumBulletItem[ PPT_STYLESHEETENTRYS ];
     865             : 
     866             :                         PPTStyleSheet(
     867             :                             const DffRecordHeader& rSlideHd,
     868             :                             SvStream& rSt, SdrPowerPointImport&,
     869             :                             const PPTTextCharacterStyleAtomInterpreter&,
     870             :                             const PPTTextParagraphStyleAtomInterpreter&,
     871             :                             const PPTTextSpecInfo&
     872             :                         );
     873             :                         ~PPTStyleSheet();
     874             : };
     875             : 
     876             : struct ImplPPTParaPropSet
     877             : {
     878             :     sal_uInt32  mnRefCount;
     879             : 
     880             :     sal_uInt16  mnDepth;
     881             :     sal_uInt32  mnAttrSet;
     882             :     sal_uInt32  mnBulletColor;
     883             :     sal_uInt16  mpArry[ 22 ];
     884             : 
     885             :     sal_uInt32  mnExtParagraphMask;
     886             :     sal_uInt32  mnAnmScheme;
     887             :     sal_uInt16  mnHasAnm;
     888             :     sal_uInt16  mnBuBlip;
     889             : 
     890             :     sal_uInt32  nDontKnow1;
     891             :     sal_uInt32  nDontKnow2;
     892             :     sal_uInt16  nDontKnow2bit06;
     893             : 
     894           0 :     ImplPPTParaPropSet()
     895             :         : mnRefCount( 1 )
     896             :         , mnDepth( 0 )
     897             :         , mnAttrSet( 0 )
     898             :         , mnBulletColor( 0 )
     899             :         , mnExtParagraphMask( 0 )
     900             :         , mnAnmScheme( 0 )
     901             :         , mnHasAnm( 0 )
     902             :         , mnBuBlip( 0 )
     903             :         , nDontKnow1( 0 )
     904             :         , nDontKnow2( 0 )
     905           0 :         , nDontKnow2bit06( 0 )
     906           0 :         { }
     907             : };
     908             : 
     909             : struct PPTParaPropSet
     910             : {
     911             :     sal_uInt32          mnOriginalTextPos;
     912             :     ImplPPTParaPropSet* pParaSet;
     913             : 
     914             :                         PPTParaPropSet();
     915             :                         PPTParaPropSet( PPTParaPropSet& rParaPropSet );
     916             :                         ~PPTParaPropSet();
     917             : 
     918             :     PPTParaPropSet&     operator=( PPTParaPropSet& rParaPropSet );
     919             : };
     920             : 
     921             : struct ImplPPTCharPropSet
     922             : {
     923             :     sal_uInt32  mnRefCount;
     924             : 
     925             :     sal_uInt32  mnAttrSet;
     926             :     sal_uInt16  mnFlags;
     927             :     sal_uInt32  mnColor;
     928             :     sal_uInt16  mnFont;
     929             :     sal_uInt16  mnAsianOrComplexFont;
     930             :     sal_uInt16  mnANSITypeface;
     931             :     sal_uInt16  mnFontHeight;
     932             :     sal_uInt16  mnEscapement;
     933             :     sal_uInt16  mnSymbolFont;
     934             : 
     935           0 :     ImplPPTCharPropSet()
     936             :         : mnRefCount ( 1 )
     937             :         , mnAttrSet( 0 )
     938             :         , mnFlags( 0 )
     939             :         , mnFont( 0 )
     940             :         , mnAsianOrComplexFont( 0 )
     941             :         , mnANSITypeface( 0 )
     942             :         , mnFontHeight( 0 )
     943             :         , mnEscapement( 0 )
     944           0 :         , mnSymbolFont( 0)
     945           0 :         { }
     946             : };
     947             : 
     948             : struct PPTCharPropSet
     949             : {
     950             :     //when the bullet text has more than two color,next the text following with bullet has been set hyperlink.
     951             :     //now,the bullet color should be set original hyperlink text's color
     952             :     //so  "mbHardHylinkOrigColor" hold the original hyperlink text's color.
     953             :     sal_uInt32  mnHylinkOrigColor;
     954             :     //the bullet text weather has a hyperlink.
     955             :     bool        mbIsHyperlink;
     956             :     //the hyperlink text weather has a custom color.
     957             :     bool        mbHardHylinkOrigColor;
     958             : 
     959             :     sal_uInt32          mnOriginalTextPos;
     960             :     sal_uInt32          mnParagraph;
     961             :     OUString            maString;
     962             :     SvxFieldItem*       mpFieldItem;
     963             :     sal_uInt16          mnLanguage[ 3 ];
     964             : 
     965             :     ImplPPTCharPropSet* pCharSet;
     966             : 
     967             :     void                SetFont( sal_uInt16 nFont );
     968             :     void                SetColor( sal_uInt32 nColor );
     969             : 
     970             :                         explicit PPTCharPropSet( sal_uInt32 nParagraph );
     971             :                         PPTCharPropSet( const PPTCharPropSet& rCharPropSet );
     972             :                         PPTCharPropSet( const PPTCharPropSet& rCharPropSet, sal_uInt32 nParagraph );
     973             :                         ~PPTCharPropSet();
     974             : 
     975             :     PPTCharPropSet&     operator=( const PPTCharPropSet& rCharPropSet );
     976             : 
     977             : private:
     978             :     void                ImplMakeUnique();
     979             : };
     980             : 
     981             : struct PPTTabEntry
     982             : {
     983             :     sal_uInt16  nOffset;
     984             :     sal_uInt16  nStyle;
     985             : };
     986             : 
     987             : struct PPTRuler
     988             : {
     989             :         sal_uInt32          nRefCount;
     990             : 
     991             :         sal_Int32           nFlags;
     992             :         sal_uInt16          nDefaultTab;
     993             :         sal_uInt16          nTextOfs[ 5 ];
     994             :         sal_uInt16          nBulletOfs[ 5 ];
     995             :         PPTTabEntry*        pTab;
     996             :         sal_uInt16          nTabCount;
     997             : 
     998             :         PPTRuler();
     999             :         ~PPTRuler();
    1000             : };
    1001             : 
    1002             : struct PPTTextRulerInterpreter
    1003             : {
    1004             :         PPTRuler    *mpImplRuler;
    1005             : 
    1006             :                     PPTTextRulerInterpreter();
    1007             :                     PPTTextRulerInterpreter( PPTTextRulerInterpreter& rRuler );
    1008             :                     PPTTextRulerInterpreter(
    1009             :                         sal_uInt32 nFileOfs,
    1010             :                         SdrPowerPointImport&,
    1011             :                         DffRecordHeader& rHd,
    1012             :                         SvStream& rIn
    1013             :                     );
    1014             :                     ~PPTTextRulerInterpreter();
    1015             : 
    1016           0 :         sal_uInt16  GetTabOffsetByIndex( sal_uInt16 nIndex ) const
    1017           0 :                     { return mpImplRuler->pTab[ nIndex ].nOffset; };
    1018             : 
    1019           0 :         sal_uInt16  GetTabStyleByIndex( sal_uInt16 nIndex ) const
    1020           0 :                     { return mpImplRuler->pTab[ nIndex ].nStyle; };
    1021             : 
    1022           0 :         sal_uInt16  GetTabCount() const { return mpImplRuler->nTabCount; };
    1023             :         bool        GetDefaultTab( sal_uInt32 nLevel, sal_uInt16& nValue ) const;
    1024             :         bool        GetTextOfs( sal_uInt32 nLevel, sal_uInt16& nValue ) const;
    1025             :         bool        GetBulletOfs( sal_uInt32 nLevel, sal_uInt16& nValue ) const;
    1026             : 
    1027             :         PPTTextRulerInterpreter& operator=( PPTTextRulerInterpreter& rRuler );
    1028             : };
    1029             : 
    1030             : #define PPT_SPEC_NEWLINE            0x10000
    1031             : #define PPT_SPEC_SYMBOL             0x20000
    1032             : #define PPT_SPEC_USE_STARBATS       0x40000
    1033             : 
    1034             : struct StyleTextProp9
    1035             : {
    1036             :     sal_uInt32  mnExtParagraphMask;
    1037             :     sal_uInt16  mnBuBlip;
    1038             :     sal_uInt16  mnHasAnm;
    1039             :     sal_uInt32  mnAnmScheme;
    1040             :     sal_uInt32  mpfPP10Ext;
    1041             :     sal_uInt32  mnExtCharacterMask;
    1042             :     sal_uInt32  mncfPP10Ext;
    1043             :     sal_uInt32  mnSpecialInfoMask;
    1044             :     sal_uInt32  mnPP10Ext;
    1045             :     sal_uInt16  mfBidi;
    1046             : 
    1047           0 :     StyleTextProp9()
    1048             :         : mnExtParagraphMask( 0 )
    1049             :         , mnBuBlip( 0 )
    1050             :         , mnHasAnm( 0 )
    1051             :         , mnAnmScheme( 0 )
    1052             :         , mpfPP10Ext( 0 )
    1053             :         , mnExtCharacterMask( 0 )
    1054             :         , mncfPP10Ext( 0 )
    1055             :         , mnSpecialInfoMask( 0 )
    1056             :         , mnPP10Ext( 0 )
    1057           0 :         , mfBidi( 0 )
    1058             :     {
    1059           0 :     }
    1060             :     void Read( SvStream& rSt );
    1061             : };
    1062             : 
    1063             : typedef std::vector<PPTParaPropSet*> PPTParaPropSetList;
    1064             : typedef std::vector<PPTCharPropSet*> PPTCharPropSetList;
    1065             : 
    1066             : struct PPTStyleTextPropReader
    1067             : {
    1068             :     std::vector< sal_uInt32 >  aSpecMarkerList;    // hiword -> Flags, loword -> Position
    1069             :     PPTParaPropSetList         aParaPropList;
    1070             :     PPTCharPropSetList         aCharPropList;
    1071             : 
    1072             :             PPTStyleTextPropReader(
    1073             :                 SvStream& rIn,
    1074             :                 SdrPowerPointImport&,
    1075             :                 const DffRecordHeader& rClientTextBoxHd,
    1076             :                 PPTTextRulerInterpreter& rInterpreter,
    1077             :                 const DffRecordHeader& rExtParaHd,
    1078             :                 sal_uInt32 nTextInstance
    1079             :             );
    1080             :             ~PPTStyleTextPropReader();
    1081             : 
    1082             :     void    Init(
    1083             :                 SvStream& rIn,
    1084             :                 SdrPowerPointImport&,
    1085             :                 const DffRecordHeader& rClientTextBoxHd,
    1086             :                 PPTTextRulerInterpreter& rInterpreter,
    1087             :                 const DffRecordHeader& rExtParaHd,
    1088             :                 sal_uInt32 nTextInstance
    1089             :             );
    1090             :     void    ReadParaProps(
    1091             :                 SvStream& rIn,
    1092             :                 SdrPowerPointImport& rMan,
    1093             :                 const DffRecordHeader& rTextHeader,
    1094             :                 const OUString& aString,
    1095             :                 PPTTextRulerInterpreter& rRuler,
    1096             :                 sal_uInt32& nCharCount,
    1097             :                 bool& bTextPropAtom
    1098             :             );
    1099             :     void    ReadCharProps(
    1100             :                 SvStream& rIn,
    1101             :                 PPTCharPropSet& aCharPropSet,
    1102             :                 const OUString& aString,
    1103             :                 sal_uInt32& nCharCount,
    1104             :                 sal_uInt32 nCharAnzRead,
    1105             :                 bool& bTextPropAtom,
    1106             :                 sal_uInt32 nExtParaPos,
    1107             :                 const std::vector< StyleTextProp9 >& aStyleTextProp9,
    1108             :                 sal_uInt32& nExtParaFlags,
    1109             :                 sal_uInt16& nBuBlip,
    1110             :                 sal_uInt16& nHasAnm,
    1111             :                 sal_uInt32& nAnmScheme
    1112             :             );
    1113             : };
    1114             : 
    1115             : class SvxFieldItem;
    1116             : class MSFILTER_DLLPUBLIC PPTPortionObj : public PPTCharPropSet
    1117             : {
    1118             : 
    1119             :     friend class PPTParagraphObj;
    1120             : 
    1121             :     const PPTStyleSheet&    mrStyleSheet;
    1122             :     sal_uInt32              mnInstance;
    1123             :     sal_uInt32              mnDepth;
    1124             : 
    1125             : public:
    1126             : 
    1127             :     bool            GetAttrib( sal_uInt32 nAttr, sal_uInt32& nVal, sal_uInt32 nInstanceInSheet ) const;
    1128             :     SvxFieldItem*   GetTextField();
    1129             : 
    1130             :                     PPTPortionObj( const PPTStyleSheet&, sal_uInt32 nInstance, sal_uInt32 nDepth );
    1131             :                     PPTPortionObj(
    1132             :                         const PPTCharPropSet&,
    1133             :                         const PPTStyleSheet&,
    1134             :                         sal_uInt32 nInstance,
    1135             :                         sal_uInt32 nDepth
    1136             :                     );
    1137             :                     PPTPortionObj( const PPTPortionObj& );
    1138             :                     ~PPTPortionObj();
    1139             : 
    1140             :     // the following function should be removed during next full update
    1141             :     void            ApplyTo(
    1142             :                         SfxItemSet& rSet,
    1143             :                         SdrPowerPointImport& rManager,
    1144             :                         sal_uInt32 nInstanceInSheet
    1145             :                     );
    1146             :     void            ApplyTo(
    1147             :                         SfxItemSet& rSet,
    1148             :                         SdrPowerPointImport& rManager,
    1149             :                         sal_uInt32 nInstanceInSheet,
    1150             :                         const PPTTextObj* pTextObj
    1151             :                     );
    1152           0 :     sal_uInt32      Count() const { return ( mpFieldItem ) ? 1 : maString.getLength(); };
    1153             :     bool            HasTabulator();
    1154             : };
    1155             : 
    1156             : class MSFILTER_DLLPUBLIC PPTParagraphObj
    1157             :     :   public PPTParaPropSet,
    1158             :         public PPTNumberFormatCreator,
    1159             :         public PPTTextRulerInterpreter
    1160             : {
    1161             :     friend class PPTTextObj;
    1162             :     friend class PPTNumberFormatCreator;
    1163             : 
    1164             :     const PPTStyleSheet&    mrStyleSheet;
    1165             :     sal_uInt32              mnInstance;
    1166             : 
    1167             : protected:
    1168             : 
    1169             :     void                    ImplClear();
    1170             : 
    1171             : public:
    1172             : 
    1173             :     bool                    mbTab;          // if true, this paragraph has tabulators in text
    1174             : 
    1175             :     sal_uInt32              mnCurrentObject;
    1176             :     ::boost::ptr_vector<PPTPortionObj> m_PortionList;
    1177             : 
    1178             :     void                    UpdateBulletRelSize( sal_uInt32& nBulletRelSize ) const;
    1179             :     bool                    GetAttrib( sal_uInt32 nAttr, sal_uInt32& nVal, sal_uInt32 nInstanceInSheet );
    1180             : 
    1181             :                             PPTParagraphObj(
    1182             :                                 const PPTStyleSheet&,
    1183             :                                 sal_uInt32 nInstance,
    1184             :                                 sal_uInt16 nDepth
    1185             :                             );
    1186             :                             PPTParagraphObj(
    1187             :                                 PPTStyleTextPropReader&,
    1188             :                                 size_t nCurParaPos,
    1189             :                                 size_t& rnCurCharPos,
    1190             :                                 const PPTStyleSheet&,
    1191             :                                 sal_uInt32 nInstance,
    1192             :                                 PPTTextRulerInterpreter& rRuler
    1193             :                             );
    1194             :                             ~PPTParagraphObj();
    1195             : 
    1196             :     sal_uInt32              GetTextSize();
    1197             :     PPTPortionObj*          First();
    1198             :     PPTPortionObj*          Next();
    1199             : 
    1200             :     void                    AppendPortion( PPTPortionObj& rPortion );
    1201             :     void                    ApplyTo(
    1202             :                                 SfxItemSet& rSet,
    1203             :                                 boost::optional< sal_Int16 >& rStartNumbering,
    1204             :                                 SdrPowerPointImport& rManager,
    1205             :                                 sal_uInt32 nInstanceInSheet,
    1206             :                                 const PPTParagraphObj* pPrev
    1207             :                             );
    1208             : };
    1209             : 
    1210             : #define PPT_TEXTOBJ_FLAGS_PARA_ALIGNMENT_USED_LEFT      1
    1211             : #define PPT_TEXTOBJ_FLAGS_PARA_ALIGNMENT_USED_CENTER    2
    1212             : #define PPT_TEXTOBJ_FLAGS_PARA_ALIGNMENT_USED_RIGHT     4
    1213             : #define PPT_TEXTOBJ_FLAGS_PARA_ALIGNMENT_USED_BLOCK     8
    1214             : #define PPT_TEXTOBJ_FLAGS_VERTICAL                      16
    1215             : 
    1216             : struct ImplPPTTextObj
    1217             : {
    1218             :     sal_uInt32                  mnRefCount;
    1219             :     sal_uInt32                  mnShapeId;
    1220             :     sal_uInt32                  mnShapeMaster;
    1221             :     PptOEPlaceholderAtom*       mpPlaceHolderAtom;
    1222             :     sal_uInt16                  mnInstance;
    1223             :     sal_uInt16                  mnDestinationInstance;
    1224             :     MSO_SPT                     meShapeType;
    1225             : 
    1226             :     sal_uInt32                  mnCurrentObject;
    1227             :     sal_uInt32                  mnParagraphCount;
    1228             :     PPTParagraphObj**           mpParagraphList;
    1229             :     PptSlidePersistEntry&       mrPersistEntry;
    1230             : 
    1231             :     sal_uInt32                  mnTextFlags;
    1232             : 
    1233           0 :     explicit ImplPPTTextObj( PptSlidePersistEntry& rPersistEntry )
    1234             :         : mnRefCount(0)
    1235             :         , mnShapeId(0)
    1236             :         , mnShapeMaster(0)
    1237             :         , mpPlaceHolderAtom(NULL)
    1238             :         , mnInstance(0)
    1239             :         , mnDestinationInstance(0)
    1240             :         , meShapeType(mso_sptMin)
    1241             :         , mnCurrentObject(0)
    1242             :         , mnParagraphCount(0)
    1243             :         , mpParagraphList(NULL)
    1244             :         , mrPersistEntry ( rPersistEntry )
    1245           0 :         , mnTextFlags(0) {};
    1246             : };
    1247             : 
    1248             : class MSFILTER_DLLPUBLIC PPTTextObj
    1249             : {
    1250             :     ImplPPTTextObj*         mpImplTextObj;
    1251             :     void                    ImplClear();
    1252             : 
    1253             :                             PPTTextObj(){};
    1254             : public:
    1255             :                             PPTTextObj(
    1256             :                                 SvStream& rSt,
    1257             :                                 SdrPowerPointImport&,
    1258             :                                 PptSlidePersistEntry&,
    1259             :                                 DffObjData*
    1260             :                             );
    1261             :                             PPTTextObj( PPTTextObj& rTextObj );
    1262             :                             ~PPTTextObj();
    1263             : 
    1264           0 :     sal_uInt32              GetCurrentIndex() const { return mpImplTextObj->mnCurrentObject; };
    1265           0 :     sal_uInt32              Count() const { return mpImplTextObj->mnParagraphCount; };
    1266             :     PPTParagraphObj*        First();
    1267             :     PPTParagraphObj*        Next();
    1268           0 :     MSO_SPT                 GetShapeType() const { return mpImplTextObj->meShapeType; };
    1269           0 :     sal_uInt32              GetInstance() const { return mpImplTextObj->mnInstance; };
    1270           0 :     void                    SetInstance( sal_uInt16 nInstance )
    1271           0 :                             { mpImplTextObj->mnInstance = nInstance; }
    1272             : 
    1273           0 :     sal_uInt32              GetDestinationInstance() const
    1274           0 :                             { return mpImplTextObj->mnDestinationInstance; }
    1275             : 
    1276           0 :     void                    SetDestinationInstance( sal_uInt16 nInstance )
    1277           0 :                             { mpImplTextObj->mnDestinationInstance = nInstance; }
    1278             : 
    1279           0 :     PptOEPlaceholderAtom*   GetOEPlaceHolderAtom() const { return mpImplTextObj->mpPlaceHolderAtom; }
    1280           0 :     sal_uInt32              GetTextFlags() const { return mpImplTextObj->mnTextFlags; }
    1281           0 :     void                    SetVertical( bool bVertical )
    1282             :                             {
    1283           0 :                                 if ( bVertical )
    1284           0 :                                     mpImplTextObj->mnTextFlags |= PPT_TEXTOBJ_FLAGS_VERTICAL;
    1285             :                                 else
    1286           0 :                                     mpImplTextObj->mnTextFlags &= ~PPT_TEXTOBJ_FLAGS_VERTICAL;
    1287           0 :                             }
    1288           0 :     bool                    GetVertical() const
    1289           0 :                             { return ( mpImplTextObj->mnTextFlags & PPT_TEXTOBJ_FLAGS_VERTICAL ) != 0; }
    1290             : 
    1291             :     const SfxItemSet*       GetBackground() const;
    1292             : 
    1293             :     PPTTextObj&             operator=( PPTTextObj& rTextObj );
    1294             : };
    1295             : 
    1296           0 : class PPTConvertOCXControls : public SvxMSConvertOCXControls
    1297             : {
    1298             :     virtual const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage > & GetDrawPage() SAL_OVERRIDE;
    1299             :     PptPageKind     ePageKind;
    1300             :     const SdrPowerPointImport* mpPPTImporter;
    1301             :     com::sun::star::uno::Reference< com::sun::star::io::XInputStream > mxInStrm;
    1302             : public :
    1303             : 
    1304           0 :     PPTConvertOCXControls( const SdrPowerPointImport* pPPTImporter, com::sun::star::uno::Reference< com::sun::star::io::XInputStream >& rxInStrm, const com::sun::star::uno::Reference< com::sun::star::frame::XModel >& rxModel, PptPageKind ePKind ) :
    1305             :         SvxMSConvertOCXControls ( rxModel ),
    1306             :         ePageKind               ( ePKind ),
    1307             :         mpPPTImporter           ( pPPTImporter ),
    1308           0 :         mxInStrm                ( rxInStrm )
    1309           0 :     {};
    1310             :     virtual bool ReadOCXStream( SotStorageRef& rSrc1,
    1311             :         com::sun::star::uno::Reference<
    1312             :         com::sun::star::drawing::XShape > *pShapeRef=0,
    1313             :         bool bFloatingCtrl=false );
    1314             :     virtual bool InsertControl(
    1315             :         const com::sun::star::uno::Reference< com::sun::star::form::XFormComponent > &rFComp,
    1316             :         const com::sun::star::awt::Size& rSize,
    1317             :         com::sun::star::uno::Reference< com::sun::star::drawing::XShape > *pShape,
    1318             :         bool bFloatingCtrl
    1319             :     ) SAL_OVERRIDE;
    1320             : };
    1321             : 
    1322             : // PowerPoint record types
    1323             : #define PPT_PST_Unknown                         0
    1324             : #define PPT_PST_SubContainerCompleted           1
    1325             : #define PPT_PST_IRRAtom                         2
    1326             : #define PPT_PST_PSS                             3
    1327             : #define PPT_PST_SubContainerException           4
    1328             : #define PPT_PST_ClientSignal1                   6
    1329             : #define PPT_PST_ClientSignal2                   7
    1330             : #define PPT_PST_PowerPointStateInfoAtom         10
    1331             : #define PPT_PST_Document                        1000
    1332             : #define PPT_PST_DocumentAtom                    1001
    1333             : #define PPT_PST_EndDocument                     1002
    1334             : #define PPT_PST_SlidePersist                    1003
    1335             : #define PPT_PST_SlideBase                       1004
    1336             : #define PPT_PST_SlideBaseAtom                   1005
    1337             : #define PPT_PST_Slide                           1006
    1338             : #define PPT_PST_SlideAtom                       1007
    1339             : #define PPT_PST_Notes                           1008
    1340             : #define PPT_PST_NotesAtom                       1009
    1341             : #define PPT_PST_Environment                     1010
    1342             : #define PPT_PST_SlidePersistAtom                1011
    1343             : #define PPT_PST_Scheme                          1012
    1344             : #define PPT_PST_SchemeAtom                      1013
    1345             : #define PPT_PST_DocViewInfo                     1014
    1346             : #define PPT_PST_SslideLayoutAtom                1015
    1347             : #define PPT_PST_MainMaster                      1016
    1348             : #define PPT_PST_SSSlideInfoAtom                 1017
    1349             : #define PPT_PST_SlideViewInfo                   1018
    1350             : #define PPT_PST_GuideAtom                       1019
    1351             : #define PPT_PST_ViewInfo                        1020
    1352             : #define PPT_PST_ViewInfoAtom                    1021
    1353             : #define PPT_PST_SlideViewInfoAtom               1022
    1354             : #define PPT_PST_VBAInfo                         1023
    1355             : #define PPT_PST_VBAInfoAtom                     1024
    1356             : #define PPT_PST_SSDocInfoAtom                   1025
    1357             : #define PPT_PST_Summary                         1026
    1358             : #define PPT_PST_Texture                         1027
    1359             : #define PPT_PST_VBASlideInfo                    1028
    1360             : #define PPT_PST_VBASlideInfoAtom                1029
    1361             : #define PPT_PST_DocRoutingSlip                  1030
    1362             : #define PPT_PST_OutlineViewInfo                 1031
    1363             : #define PPT_PST_SorterViewInfo                  1032
    1364             : #define PPT_PST_ExObjList                       1033
    1365             : #define PPT_PST_ExObjListAtom                   1034
    1366             : #define PPT_PST_PPDrawingGroup                  1035
    1367             : #define PPT_PST_PPDrawing                       1036
    1368             : #define PPT_PST_NewlyAddedAtomByXP1037          1037
    1369             : #define PPT_PST_NamedShows                      1040
    1370             : #define PPT_PST_NamedShow                       1041
    1371             : #define PPT_PST_NamedShowSlides                 1042
    1372             : #define PPT_PST_List                            2000
    1373             : #define PPT_PST_FontCollection                  2005
    1374             : #define PPT_PST_ListPlaceholder                 2017
    1375             : #define PPT_PST_BookmarkCollection              2019
    1376             : #define PPT_PST_SoundCollection                 2020
    1377             : #define PPT_PST_SoundCollAtom                   2021
    1378             : #define PPT_PST_Sound                           2022
    1379             : #define PPT_PST_SoundData                       2023
    1380             : #define PPT_PST_BookmarkSeedAtom                2025
    1381             : #define PPT_PST_GuideList                       2026
    1382             : #define PPT_PST_RunArray                        2028
    1383             : #define PPT_PST_RunArrayAtom                    2029
    1384             : #define PPT_PST_ArrayElementAtom                2030
    1385             : #define PPT_PST_Int4ArrayAtom                   2031
    1386             : #define PPT_PST_ColorSchemeAtom                 2032
    1387             : 
    1388             : // these atoms first was seen in ppt2000 in a private Tag atom
    1389             : #define PPT_PST_ExtendedBuGraContainer          2040    // consist of 4041
    1390             : #define PPT_PST_ExtendedBuGraAtom               2041    // the instance of this atom indices the current graphic
    1391             : 
    1392             : #define PPT_PST_OEShape                         3008
    1393             : #define PPT_PST_ExObjRefAtom                    3009
    1394             : #define PPT_PST_OEPlaceholderAtom               3011
    1395             : #define PPT_PST_GrColor                         3020
    1396             : #define PPT_PST_GrectAtom                       3025
    1397             : #define PPT_PST_GratioAtom                      3031
    1398             : #define PPT_PST_Gscaling                        3032
    1399             : #define PPT_PST_GpointAtom                      3034
    1400             : #define PPT_PST_OEShapeAtom                     3035
    1401             : #define PPT_PST_OutlineTextRefAtom              3998
    1402             : #define PPT_PST_TextHeaderAtom                  3999
    1403             : #define PPT_PST_TextCharsAtom                   4000
    1404             : #define PPT_PST_StyleTextPropAtom               4001
    1405             : #define PPT_PST_BaseTextPropAtom                4002
    1406             : #define PPT_PST_TxMasterStyleAtom               4003
    1407             : #define PPT_PST_TxCFStyleAtom                   4004
    1408             : #define PPT_PST_TxPFStyleAtom                   4005
    1409             : #define PPT_PST_TextRulerAtom                   4006
    1410             : #define PPT_PST_TextBookmarkAtom                4007
    1411             : #define PPT_PST_TextBytesAtom                   4008
    1412             : #define PPT_PST_TxSIStyleAtom                   4009
    1413             : #define PPT_PST_TextSpecInfoAtom                4010
    1414             : #define PPT_PST_DefaultRulerAtom                4011
    1415             : 
    1416             : // these atoms first was seen in ppt2000 in a private Tag atom
    1417             : #define PPT_PST_ExtendedParagraphAtom           4012
    1418             : #define PPT_PST_ExtendedParagraphMasterAtom     4013
    1419             : #define PPT_PST_ExtendedPresRuleContainer       4014    // consist of 4012, 4015,
    1420             : #define PPT_PST_ExtendedParagraphHeaderAtom     4015    // the instance of this atom indices the current presobj
    1421             :                                                         // the first sal_uInt32 in this atom indices the current slideId
    1422             : #define PPT_PST_NewlyAddedAtom4016              4016
    1423             : 
    1424             : #define PPT_PST_FontEntityAtom                  4023
    1425             : #define PPT_PST_FontEmbedData                   4024
    1426             : #define PPT_PST_TypeFace                        4025
    1427             : #define PPT_PST_CString                         4026
    1428             : #define PPT_PST_ExternalObject                  4027
    1429             : #define PPT_PST_MetaFile                        4033
    1430             : #define PPT_PST_ExOleObj                        4034
    1431             : #define PPT_PST_ExOleObjAtom                    4035
    1432             : #define PPT_PST_ExPlainLinkAtom                 4036
    1433             : #define PPT_PST_CorePict                        4037
    1434             : #define PPT_PST_CorePictAtom                    4038
    1435             : #define PPT_PST_ExPlainAtom                     4039
    1436             : #define PPT_PST_SrKinsoku                       4040
    1437             : #define PPT_PST_Handout                         4041
    1438             : #define PPT_PST_ExEmbed                         4044
    1439             : #define PPT_PST_ExEmbedAtom                     4045
    1440             : #define PPT_PST_ExLink                          4046
    1441             : #define PPT_PST_ExLinkAtom_old                  4047
    1442             : #define PPT_PST_BookmarkEntityAtom              4048
    1443             : #define PPT_PST_ExLinkAtom                      4049
    1444             : #define PPT_PST_SrKinsokuAtom                   4050
    1445             : #define PPT_PST_ExHyperlinkAtom                 4051
    1446             : #define PPT_PST_ExPlain                         4053
    1447             : #define PPT_PST_ExPlainLink                     4054
    1448             : #define PPT_PST_ExHyperlink                     4055
    1449             : #define PPT_PST_SlideNumberMCAtom               4056
    1450             : #define PPT_PST_HeadersFooters                  4057
    1451             : #define PPT_PST_HeadersFootersAtom              4058
    1452             : #define PPT_PST_RecolorEntryAtom                4062
    1453             : #define PPT_PST_TxInteractiveInfoAtom           4063
    1454             : #define PPT_PST_EmFormatAtom                    4065
    1455             : #define PPT_PST_CharFormatAtom                  4066
    1456             : #define PPT_PST_ParaFormatAtom                  4067
    1457             : #define PPT_PST_MasterText                      4068
    1458             : #define PPT_PST_RecolorInfoAtom                 4071
    1459             : #define PPT_PST_ExQuickTime                     4073
    1460             : #define PPT_PST_ExQuickTimeMovie                4074
    1461             : #define PPT_PST_ExQuickTimeMovieData            4075
    1462             : #define PPT_PST_ExSubscription                  4076
    1463             : #define PPT_PST_ExSubscriptionSection           4077
    1464             : #define PPT_PST_ExControl                       4078
    1465             : #define PPT_PST_ExControlAtom                   4091
    1466             : #define PPT_PST_SlideListWithText               4080
    1467             : #define PPT_PST_AnimationInfoAtom               4081
    1468             : #define PPT_PST_InteractiveInfo                 4082
    1469             : #define PPT_PST_InteractiveInfoAtom             4083
    1470             : #define PPT_PST_SlideList                       4084
    1471             : #define PPT_PST_UserEditAtom                    4085
    1472             : #define PPT_PST_CurrentUserAtom                 4086
    1473             : #define PPT_PST_DateTimeMCAtom                  4087
    1474             : #define PPT_PST_GenericDateMCAtom               4088
    1475             : #define PPT_PST_HeaderMCAtom                    4089
    1476             : #define PPT_PST_FooterMCAtom                    4090
    1477             : #define PPT_PST_ExMediaAtom                     4100
    1478             : #define PPT_PST_ExVideo                         4101
    1479             : #define PPT_PST_ExAviMovie                      4102
    1480             : #define PPT_PST_ExMCIMovie                      4103
    1481             : #define PPT_PST_ExMIDIAudio                     4109
    1482             : #define PPT_PST_ExCDAudio                       4110
    1483             : #define PPT_PST_ExWAVAudioEmbedded              4111
    1484             : #define PPT_PST_ExWAVAudioLink                  4112
    1485             : #define PPT_PST_ExOleObjStg                     4113
    1486             : #define PPT_PST_ExCDAudioAtom                   4114
    1487             : #define PPT_PST_ExWAVAudioEmbeddedAtom          4115
    1488             : #define PPT_PST_AnimationInfo                   4116
    1489             : #define PPT_PST_RTFDateTimeMCAtom               4117
    1490             : #define PPT_PST_ProgTags                        5000
    1491             : #define PPT_PST_ProgStringTag                   5001
    1492             : #define PPT_PST_ProgBinaryTag                   5002
    1493             : #define PPT_PST_BinaryTagData                   5003
    1494             : #define PPT_PST_PrintOptions                    6000
    1495             : #define PPT_PST_PersistPtrFullBlock             6001
    1496             : #define PPT_PST_PersistPtrIncrementalBlock      6002
    1497             : 
    1498             : // these atoms first was seen in ppt2000 in a private Tag atom
    1499             : #define PPT_PST_NewlyAddedAtomByPPT2000_6010    6010
    1500             : #define PPT_PST_NewlyAddedAtomByPPT2000_6011    6011
    1501             : 
    1502             : #define PPT_PST_RulerIndentAtom                 10000
    1503             : #define PPT_PST_GscalingAtom                    10001
    1504             : #define PPT_PST_GrColorAtom                     10002
    1505             : #define PPT_PST_GLPointAtom                     10003
    1506             : #define PPT_PST_GlineAtom                       10004
    1507             : 
    1508             : #define PPT_PST_NewlyAddedAtomByXP11008         11008
    1509             : #define PPT_PST_NewlyAddedAtomByXP11010         11010
    1510             : #define PPT_PST_Comment10                       12000
    1511             : #define PPT_PST_CommentAtom10                   12001
    1512             : #define PPT_PST_NewlyAddedAtomByXP12004         12004
    1513             : #define PPT_PST_NewlyAddedAtomByXP12010         12010
    1514             : #define PPT_PST_NewlyAddedAtomByXP12011         12011
    1515             : #define PPT_PST_NewlyAddedAtomByXP14001         14001
    1516             : 
    1517             : // attributes for PptTextStyleSheet
    1518             : #define PPT_ParaAttr_BulletOn       0   //00000001
    1519             : #define PPT_ParaAttr_BuHardFont     1   //00000002
    1520             : #define PPT_ParaAttr_BuHardColor    2   //00000004
    1521             : #define PPT_ParaAttr_BuHardHeight   3   //00000008
    1522             : #define PPT_ParaAttr_BulletFont     4   //00000010
    1523             : #define PPT_ParaAttr_BulletColor    5   //00000020
    1524             : #define PPT_ParaAttr_BulletHeight   6   //00000040
    1525             : #define PPT_ParaAttr_BulletChar     7   //00000080
    1526             : #define PPT_ParaAttr_DontKnow1      8   //00000100
    1527             : #define PPT_ParaAttr_DontKnow2      9   //00000200
    1528             : #define PPT_ParaAttr_DontKnow3      10  //00000400
    1529             : #define PPT_ParaAttr_Adjust         11  //00000800 0000=Left, 0001=Center, 0002=Right, 0003=Block
    1530             : #define PPT_ParaAttr_LineFeed       12  //00001000
    1531             : #define PPT_ParaAttr_UpperDist      13  //00002000 is set to 0032 for TextFrames by default
    1532             : #define PPT_ParaAttr_LowerDist      14  //00004000
    1533             : #define PPT_ParaAttr_TextOfs        15  //00008000
    1534             : #define PPT_ParaAttr_BulletOfs      16  //00010000
    1535             : #define PPT_ParaAttr_DefaultTab     17  //00020000
    1536             : #define PPT_ParaAttr_AsianLB_1      18
    1537             : #define PPT_ParaAttr_AsianLB_2      19
    1538             : #define PPT_ParaAttr_AsianLB_3      20
    1539             : #define PPT_ParaAttr_BiDi           21  //00200000
    1540             : 
    1541             : #define PPT_CharAttr_Bold               0   //00000001
    1542             : #define PPT_CharAttr_Italic             1   //00000002
    1543             : #define PPT_CharAttr_Underline          2   //00000004
    1544             : #define PPT_CharAttr_Shadow             4   //00000010
    1545             : #define PPT_CharAttr_Strikeout          8   //00000100
    1546             : #define PPT_CharAttr_Embossed           9   //00000200
    1547             : #define PPT_CharAttr_ResetNumbering     10  //00000400
    1548             : #define PPT_CharAttr_EnableNumbering1   11  //00000800
    1549             : #define PPT_CharAttr_EnableNumbering2   12  //00001000
    1550             : #define PPT_CharAttr_Font               16  //00010000
    1551             : #define PPT_CharAttr_AsianOrComplexFont 21  //00200000
    1552             : #define PPT_CharAttr_ANSITypeface       22  //00400000
    1553             : #define PPT_CharAttr_Symbol             23  //00800000
    1554             : #define PPT_CharAttr_FontHeight         17  //00020000
    1555             : #define PPT_CharAttr_FontColor          18  //00040000
    1556             : #define PPT_CharAttr_Escapement         19  //00080000
    1557             : 
    1558             : // values for PptSlideLayoutAtom.eLayout
    1559             : #define PPT_LAYOUT_TITLESLIDE               0   // The slide is a title slide
    1560             : #define PPT_LAYOUT_TITLEANDBODYSLIDE        1   // Title and body slide
    1561             : #define PPT_LAYOUT_TITLEMASTERSLIDE         2   // Title master slide
    1562             : #define PPT_LAYOUT_MASTERSLIDE              3   // Master slide layout
    1563             : #define PPT_LAYOUT_MASTERNOTES              4   // Master notes layout
    1564             : #define PPT_LAYOUT_NOTESTITLEBODY           5   // Notes title/body layout
    1565             : #define PPT_LAYOUT_HANDOUTLAYOUT            6   // Handout layout, therefore it doesn't have placeholders except header, footer, and date
    1566             : #define PPT_LAYOUT_ONLYTITLE                7   // Only title placeholder
    1567             : #define PPT_LAYOUT_2COLUMNSANDTITLE         8   // Body of the slide has 2 columns and a title
    1568             : #define PPT_LAYOUT_2ROWSANDTITLE            9   // Slide's body has 2 rows and a title
    1569             : #define PPT_LAYOUT_RIGHTCOLUMN2ROWS         10  // Body contains 2 columns, right column has 2 rows
    1570             : #define PPT_LAYOUT_LEFTCOLUMN2ROWS          11  // Body contains 2 columns, left column has 2 rows
    1571             : #define PPT_LAYOUT_BOTTOMROW2COLUMNS        12  // Body contains 2 rows, bottom row has 2 columns
    1572             : #define PPT_LAYOUT_TOPROW2COLUMN            13  // Body contains 2 rows, top row has 2 columns
    1573             : #define PPT_LAYOUT_4OBJECTS                 14  // 4 objects
    1574             : #define PPT_LAYOUT_BIGOBJECT                15  // Big object
    1575             : #define PPT_LAYOUT_BLANCSLIDE               16  // Blank slide
    1576             : #define PPT_LAYOUT_TITLERIGHTBODYLEFT       17  // Vertical title on the right, body on the left
    1577             : #define PPT_LAYOUT_TITLERIGHT2BODIESLEFT    18  // Vertical title on the right, body on the left split into 2 rows
    1578             : 
    1579             : // the following table describes the placeholder id's (values from reality followed by values taken from the documentation)
    1580             : #define PPT_PLACEHOLDER_NONE                    0   //  0 None
    1581             : #define PPT_PLACEHOLDER_MASTERTITLE             1   //  1 Master title
    1582             : #define PPT_PLACEHOLDER_MASTERBODY              2   //  2 Master body
    1583             : #define PPT_PLACEHOLDER_MASTERCENTEREDTITLE     3   //  3 Master centered title
    1584             : #define PPT_PLACEHOLDER_MASTERSUBTITLE          4   // 10 Master subtitle
    1585             : #define PPT_PLACEHOLDER_MASTERNOTESSLIDEIMAGE   5   //  4 Master notes slide image
    1586             : #define PPT_PLACEHOLDER_MASTERNOTESBODYIMAGE    6   //  5 Master notes body image
    1587             : #define PPT_PLACEHOLDER_MASTERDATE              7   //  6 Master date
    1588             : #define PPT_PLACEHOLDER_MASTERSLIDENUMBER       8   //  7 Master slide number
    1589             : #define PPT_PLACEHOLDER_MASTERFOOTER            9   //  8 Master footer
    1590             : #define PPT_PLACEHOLDER_MASTERHEADER            10  //  9 Master header
    1591             : #define PPT_PLACEHOLDER_GENERICTEXTOBJECT           // 11 Generic text object
    1592             : #define PPT_PLACEHOLDER_TITLE                   13  // 12 Title
    1593             : #define PPT_PLACEHOLDER_BODY                    14  // 13 Body
    1594             : #define PPT_PLACEHOLDER_NOTESBODY               12  // 14 Notes body
    1595             : #define PPT_PLACEHOLDER_CENTEREDTITLE           15  // 15 Centered title
    1596             : #define PPT_PLACEHOLDER_SUBTITLE                16  // 16 Subtitle
    1597             : #define PPT_PLACEHOLDER_VERTICALTEXTTITLE       17  // 17 Vertical text title
    1598             : #define PPT_PLACEHOLDER_VERTICALTEXTBODY        18  // 18 Vertical text body
    1599             : #define PPT_PLACEHOLDER_NOTESSLIDEIMAGE         11  // 19 Notes slide image
    1600             : #define PPT_PLACEHOLDER_OBJECT                  19  // 20 Object (no matter the size)
    1601             : #define PPT_PLACEHOLDER_GRAPH                   20  // 21 Graph
    1602             : #define PPT_PLACEHOLDER_TABLE                   21  // 22 Table
    1603             : #define PPT_PLACEHOLDER_CLIPART                 22  // 23 Clip Art
    1604             : #define PPT_PLACEHOLDER_ORGANISZATIONCHART      23  // 24 Organization Chart
    1605             : #define PPT_PLACEHOLDER_MEDIACLIP               24  // 25 Media Clip
    1606             : 
    1607             : #endif // INCLUDED_FILTER_MSFILTER_SVDFPPT_HXX
    1608             : 
    1609             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10