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

Generated by: LCOV version 1.10