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