tdf#130857 qt weld: Implement QtInstanceWidget::strip_mnemonic
[LibreOffice.git] / include / filter / msfilter / svdfppt.hxx
blobf1dfa6332c7eed92ea703dff5480631e78321de6
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 INCLUDED_FILTER_MSFILTER_SVDFPPT_HXX
21 #define INCLUDED_FILTER_MSFILTER_SVDFPPT_HXX
23 #include <algorithm>
24 #include <cstddef>
25 #include <memory>
26 #include <vector>
28 #include <optional>
30 #include <com/sun/star/uno/Reference.hxx>
31 #include <editeng/eeitem.hxx>
32 #include <editeng/flditem.hxx>
33 #include <filter/msfilter/dffrecordheader.hxx>
34 #include <filter/msfilter/msdffimp.hxx>
35 #include <filter/msfilter/msfilterdllapi.h>
36 #include <filter/msfilter/msocximex.hxx>
37 #include <o3tl/enumarray.hxx>
38 #include <rtl/ref.hxx>
39 #include <rtl/textenc.h>
40 #include <rtl/ustring.hxx>
41 #include <sal/types.h>
42 #include <svx/msdffdef.hxx>
43 #include <svx/svdobj.hxx>
44 #include <tools/color.hxx>
45 #include <tools/fontenum.hxx>
46 #include <tools/gen.hxx>
47 #include <tools/ref.hxx>
48 #include <tools/solar.h>
49 #include <vcl/graph.hxx>
50 #include <salhelper/simplereferenceobject.hxx>
52 namespace com::sun::star {
53 namespace awt { struct Size; }
54 namespace drawing { class XShape; }
55 namespace form { class XFormComponent; }
56 namespace frame { class XModel; }
59 class SdrPage;
60 class SdrObject;
61 class SvStream;
62 class SfxItemSet;
63 class SdrOutliner;
64 class SfxStyleSheet;
65 class SotStorage;
66 class SvMemoryStream;
67 class SvxNumberFormat;
68 class PPTTextObj;
69 enum class PptSlideLayout;
70 enum class PptPlaceholder : sal_uInt8;
72 #define PPT_IMPORTFLAGS_NO_TEXT_ASSERT 1
74 struct MSFILTER_DLLPUBLIC PptCurrentUserAtom
76 sal_uInt32 nMagic;
77 sal_uInt32 nCurrentUserEdit;
78 sal_uInt16 nDocFileVersion;
79 sal_uInt8 nMajorVersion;
80 sal_uInt8 nMinorVersion;
81 OUString aCurrentUser;
83 public:
85 PptCurrentUserAtom() : nMagic ( 0 ),
86 nCurrentUserEdit ( 0 ),
87 nDocFileVersion ( 0 ),
88 nMajorVersion ( 0 ),
89 nMinorVersion ( 0 ) {}
91 MSFILTER_DLLPUBLIC friend SvStream& ReadPptCurrentUserAtom( SvStream& rIn, PptCurrentUserAtom& rAtom );
94 struct MSFILTER_DLLPUBLIC PowerPointImportParam
96 SvStream& rDocStream;
97 sal_uInt32 nImportFlags;
98 PptCurrentUserAtom aCurrentUserAtom;
100 PowerPointImportParam( SvStream& rDocStream );
103 struct SdHyperlinkEntry
105 sal_uInt32 nIndex;
106 sal_Int32 nPrivate1;
107 sal_Int32 nPrivate2;
108 sal_Int32 nPrivate3;
109 sal_Int32 nInfo;
110 OUString aTarget;
111 OUString aSubAddress;
113 OUString aConvSubString;
116 // Helper class for reading the PPT InteractiveInfoAtom
117 struct MSFILTER_DLLPUBLIC PptInteractiveInfoAtom
119 sal_uInt32 nSoundRef;
120 sal_uInt32 nExHyperlinkId;
121 sal_uInt8 nAction;
122 sal_uInt8 nOleVerb;
123 sal_uInt8 nJump;
124 sal_uInt8 nFlags;
125 sal_uInt8 nHyperlinkType;
127 // unknown, because total size is 16
128 sal_uInt8 nUnknown1;
129 sal_uInt8 nUnknown2;
130 sal_uInt8 nUnknown3;
132 public:
134 MSFILTER_DLLPUBLIC friend bool ReadPptInteractiveInfoAtom( SvStream& rIn, PptInteractiveInfoAtom& rAtom );
137 enum PptPageKind { PPT_MASTERPAGE, PPT_SLIDEPAGE, PPT_NOTEPAGE };
139 enum PptPageFormat
140 { PPTPF_SCREEN,
141 PPTPF_USLETTER, // 8.5x11"
142 PPTPF_A4, // 210x297mm
143 PPTPF_35MMDIA, // DIA
144 PPTPF_OVERHEAD,
145 PPTPF_CUSTOM
148 // values for PPT_PST_TextHeaderAtom's sal_uLong
149 enum PPT_TextHeader
151 PPTTH_TITLE,
152 PPTTH_BODY,
153 PPTTH_NOTES,
154 PPTTH_NOTUSED,
155 PPTTH_OTHER, // Text in a Shape
156 PPTTH_CENTERBODY, // Subtitle in Title-Slide
157 PPTTH_CENTERTITLE, // Title in Title-Slide
158 PPTTH_HALFBODY, // Body in two-column slide
159 PPTTH_QUARTERBODY // Body in four-body slide
162 enum class TSS_Type : unsigned {
163 PageTitle = 0,
164 Body = 1,
165 Notes = 2,
166 Unused = 3,
167 TextInShape = 4,
168 Subtitle = 5,
169 Title = 6,
170 HalfBody = 7,
171 QuarterBody = 8,
172 LAST = QuarterBody,
173 Unknown = 0xffffffff // or invalid
176 const int nMaxPPTLevels = 10;
178 struct MSFILTER_DLLPUBLIC PptDocumentAtom
180 Size aSlidesPageSize; // page size of the slides in 576DPI
181 Size aNotesPageSize; // page size of the notes in 576DPI
182 // avoid RatioAtom for the time being
183 sal_uInt32 nNotesMasterPersist; // 0=non-existent
184 sal_uInt32 nHandoutMasterPersist; // 0=non-existent
185 sal_uInt16 n1stPageNumber; // page number of the first slide
186 PptPageFormat eSlidesPageFormat; // page format of the slides
187 bool bEmbeddedTrueType : 1; // TrueType directly within the File?
188 bool bTitlePlaceholdersOmitted : 1;
189 bool bRightToLeft : 1;
190 bool bShowComments : 1;
192 public:
194 PptDocumentAtom()
195 : nNotesMasterPersist(0)
196 , nHandoutMasterPersist(0)
197 , n1stPageNumber(0)
198 , eSlidesPageFormat(PPTPF_SCREEN)
199 , bEmbeddedTrueType(false)
200 , bTitlePlaceholdersOmitted(false)
201 , bRightToLeft(false)
202 , bShowComments(false)
206 Size const & GetSlidesPageSize() const { return aSlidesPageSize; }
207 Size const & GetNotesPageSize() const { return aNotesPageSize; }
209 friend SvStream& ReadPptDocumentAtom( SvStream& rIn, PptDocumentAtom& rAtom );
212 struct PptSlideLayoutAtom
214 PptSlideLayout eLayout; // 0..18
215 PptPlaceholder aPlaceholderId[ 8 ];
217 public:
218 PptSlideLayoutAtom() { Clear(); }
219 void Clear();
221 // SlideLayoutAtom is read without header!
222 friend SvStream& ReadPptSlideLayoutAtom( SvStream& rIn, PptSlideLayoutAtom& rAtom );
225 struct PptSlideAtom
227 PptSlideLayoutAtom aLayout;
228 sal_uInt32 nMasterId;
229 sal_uInt32 nNotesId;
230 sal_uInt16 nFlags;
232 public:
233 PptSlideAtom() { Clear(); }
234 void Clear();
236 friend SvStream& ReadPptSlideAtom(SvStream& rIn, PptSlideAtom& rAtom);
239 struct PptSlidePersistAtom
241 sal_uInt32 nPsrReference;
242 sal_uInt32 nFlags;
243 sal_uInt32 nNumberTexts;
244 sal_uInt32 nSlideId;
245 sal_uInt32 nReserved; // we will use nReserved temporarily to set the offset to SSSlideInfoAtom ( if possible )
247 public:
248 PptSlidePersistAtom() { Clear(); }
249 void Clear();
251 friend SvStream& ReadPptSlidePersistAtom(SvStream& rIn, PptSlidePersistAtom& rAtom);
254 struct PptNotesAtom
256 sal_uInt32 nSlideId;
257 sal_uInt16 nFlags;
259 public:
260 PptNotesAtom() { Clear(); }
261 void Clear();
263 friend SvStream& ReadPptNotesAtom(SvStream& rIn, PptNotesAtom& rAtom);
266 struct PptColorSchemeAtom
268 sal_uInt8 aData[32] = {};
270 public:
271 PptColorSchemeAtom();
272 Color GetColor( sal_uInt16 nNum ) const;
274 friend SvStream& ReadPptColorSchemeAtom(SvStream& rIn, PptColorSchemeAtom& rAtom);
277 struct PptFontEntityAtom
279 OUString aName;
280 sal_uInt8 lfClipPrecision;
281 sal_uInt8 lfQuality;
283 rtl_TextEncoding eCharSet;
284 FontFamily eFamily;
285 FontPitch ePitch;
286 bool bAvailable;
288 friend SvStream& ReadPptFontEntityAtom(SvStream& rIn, PptFontEntityAtom& rAtom);
291 enum class PptViewTypeEnum : sal_uInt16
293 NONE = 0,
294 Slide = 1,
295 SlideMaster = 2,
296 Notes = 3,
297 Handout = 4,
298 NotesMaster = 5,
299 OutlineMaster = 6,
300 Outline = 7,
301 SlideSorter = 8,
302 VisualBasic = 9,
303 TitleMaster = 10,
304 SlideShow = 11,
305 SlideShowFullScreen = 12,
306 NotesText = 13,
307 PrintPreview = 14,
308 Thumbnails = 15,
309 MasterThumbnails = 16,
310 PodiumSlideView = 17,
311 PodiumNotesView = 18,
314 struct PptUserEditAtom
316 DffRecordHeader aHd;
317 sal_Int32 nLastSlideID; // ID of last visible slide
318 sal_uInt32 nVersion; // This is major/minor/build which did the edit
319 sal_uInt32 nOffsetLastEdit; // File offset of prev PptUserEditAtom
320 sal_uInt32 nOffsetPersistDirectory; // Offset to PersistPtrs for this file version.
321 sal_uInt32 nDocumentRef;
322 sal_uInt32 nMaxPersistWritten; // total number of Persist entries up to this point
323 PptViewTypeEnum eLastViewType; // enum view type
325 public:
326 PptUserEditAtom()
327 : nLastSlideID( 0 )
328 , nVersion( 0 )
329 , nOffsetLastEdit( 0 )
330 , nOffsetPersistDirectory( 0 )
331 , nDocumentRef( 0 )
332 , nMaxPersistWritten( 0 )
333 , eLastViewType( PptViewTypeEnum::NONE )
336 friend SvStream& ReadPptUserEditAtom( SvStream& rIn, PptUserEditAtom& rAtom );
339 struct PptOEPlaceholderAtom
341 sal_uInt32 nPlacementId;
342 PptPlaceholder nPlaceholderId;
343 sal_uInt8 nPlaceholderSize; // 0=Full size, 1=Half size, 2=Quarter of Slide
345 public:
346 PptOEPlaceholderAtom() { Clear(); }
347 void Clear();
349 friend SvStream& ReadPptOEPlaceholderAtom( SvStream& rIn, PptOEPlaceholderAtom& rAtom );
352 struct PPTStyleSheet;
353 struct HeaderFooterEntry;
354 struct PptSlidePersistEntry
356 PptSlidePersistEntry(const PptSlidePersistEntry&) = delete;
357 PptSlidePersistEntry& operator=( const PptSlidePersistEntry& ) = delete;
359 PptSlidePersistAtom aPersistAtom;
360 PptSlideAtom aSlideAtom;
361 PptNotesAtom aNotesAtom;
362 PptColorSchemeAtom aColorScheme; // each slide includes this colorscheme atom
363 std::unique_ptr<PPTStyleSheet> xStyleSheet; // stylesheet of this page (only in masterpages), since XP supports more than one masterpage
365 sal_uInt32 HeaderFooterOfs[ 4 ]; // containing the ofs to the placeholder (only masterpage)
366 std::unique_ptr<HeaderFooterEntry> xHeaderFooterEntry;
367 std::unique_ptr<SvxMSDffSolverContainer> xSolverContainer;
368 sal_uInt32 nSlidePersistStartOffset;// is an array to the end of the SlidePersistAtom of this page, TextHeaderAtom is following
369 sal_uInt32 nSlidePersistEndOffset;
370 sal_uInt32 nBackgroundOffset; // fileoffset
371 sal_uInt32 nDrawingDgId; // valid, if not -1
372 std::unique_ptr<sal_uInt32[]>
373 pPresentationObjects; // if valid, this is a pointer to an array that includes the offsets to the presentation objects
374 // on this masterpage for each instance (0 - 8);
375 rtl::Reference<SdrObject> pBObj;
377 PptPageKind ePageKind;
379 bool bNotesMaster : 1; // for NotesMaster
380 bool bHandoutMaster : 1; // for HandoutMaster
381 bool bStarDrawFiller : 1; // special for StarDraw
382 public:
383 PptSlidePersistEntry();
384 ~PptSlidePersistEntry();
385 sal_uInt32 GetSlideId() const { return aPersistAtom.nSlideId; }
388 #define PPTSLIDEPERSIST_ENTRY_NOTFOUND 0xFFFF
390 class MSFILTER_DLLPUBLIC PptSlidePersistList
392 private:
393 PptSlidePersistList(const PptSlidePersistList&) = delete;
394 PptSlidePersistList& operator=( const PptSlidePersistList& ) = delete;
396 typedef std::vector<std::unique_ptr<PptSlidePersistEntry>> Entries_t;
397 Entries_t mvEntries;
399 public:
400 PptSlidePersistList();
401 ~PptSlidePersistList();
403 size_t size() const { return mvEntries.size(); }
404 bool is_null( size_t nIdx ) const { return mvEntries[ nIdx ] == nullptr; }
405 const PptSlidePersistEntry& operator[](size_t nIdx) const { return *mvEntries[ nIdx ]; }
406 PptSlidePersistEntry& operator[](size_t nIdx) { return *mvEntries[ nIdx ]; }
407 Entries_t::iterator begin() { return mvEntries.begin(); }
408 void insert( Entries_t::iterator it,
409 std::unique_ptr<PptSlidePersistEntry> pEntry )
411 mvEntries.insert(it, std::move(pEntry));
413 void push_back(std::unique_ptr<PptSlidePersistEntry> pEntry)
415 mvEntries.push_back(std::move(pEntry));
418 sal_uInt16 FindPage( sal_uInt32 nId ) const;
421 class SfxObjectShell;
422 struct PPTOleEntry
424 sal_uInt32 nId; // OleId
425 sal_uInt32 nRecHdOfs; // points to the record header: ExObjListHd
426 SfxObjectShell* pShell;
427 sal_uInt16 nType; // maybe PPT_PST_ExEmbed or PPT_PST_ExControl
428 sal_uInt32 nAspect; // the aspect of the OLE object
430 PPTOleEntry( sal_uInt32 nid, sal_uInt32 nOfs, SfxObjectShell* pSh, sal_uInt16 nT, sal_uInt32 nAsp )
431 : nId(nid)
432 , nRecHdOfs(nOfs)
433 , pShell(pSh)
434 , nType(nT)
435 , nAspect(nAsp)
439 struct PptExOleObjAtom
441 sal_uInt32 nAspect;
442 sal_uInt32 nId;
443 sal_uInt32 nPersistPtr;
445 public:
447 friend SvStream& ReadPptExOleObjAtom( SvStream& rIn, PptExOleObjAtom& rAtom );
450 // SdPage derives from SdrPage, is only known inside sd, and needs to be carried
451 // around as an opaque pointer here:
452 struct SdPageCapsule {
453 explicit SdPageCapsule(SdrPage * thePage): page(thePage) {}
455 SdrPage * page;
458 class MSFILTER_DLLPUBLIC SdrEscherImport : public SvxMSDffManager
460 protected:
462 friend class PPTTextObj;
463 friend class PPTPortionObj;
464 friend struct PPTStyleTextPropReader;
465 friend class ImplSdPPTImport;
467 PptDocumentAtom aDocAtom;
468 DffRecordManager aDocRecManager; // contains all first level container and atoms of the document container
470 ::std::vector< PPTOleEntry > aOleObjectList;
472 std::optional<std::vector<PptFontEntityAtom>> m_xFonts;
474 sal_uInt32 nStreamLen;
476 bool ReadString( OUString& rStr ) const;
477 // only for PowerPoint filter:
478 virtual const PptSlideLayoutAtom* GetSlideLayoutAtom() const;
480 public:
481 using SvxMSDffManager::ReadObjText;
483 PowerPointImportParam& rImportParam;
485 SdrEscherImport( PowerPointImportParam&, const OUString& rBaseURL );
486 virtual ~SdrEscherImport() override;
487 virtual bool GetColorFromPalette( sal_uInt16 nNum, Color& rColor ) const override;
488 virtual bool SeekToShape( SvStream& rSt, SvxMSDffClientData* pClientData, sal_uInt32 nId ) const override;
489 const PptFontEntityAtom* GetFontEnityAtom( sal_uInt32 nNum ) const;
490 void RecolorGraphic( SvStream& rSt, sal_uInt32 nRecLen, Graphic& rGraph );
491 virtual SdrObject* ReadObjText( PPTTextObj* pTextObj, SdrObject* pObj, SdPageCapsule pPage ) const;
492 virtual rtl::Reference<SdrObject> ProcessObj( SvStream& rSt, DffObjData& rData, SvxMSDffClientData& rClientData, tools::Rectangle& rTextRect, SdrObject* pObj ) override;
493 virtual void ProcessClientAnchor2( SvStream& rSt, DffRecordHeader& rHd, DffObjData& rObj ) override;
494 void ImportHeaderFooterContainer( DffRecordHeader const & rHeader, HeaderFooterEntry& rEntry );
498 struct MSFILTER_DLLPUBLIC PPTFieldEntry
500 sal_uInt16 nPos;
501 sal_uInt16 nTextRangeEnd;
502 std::unique_ptr<SvxFieldItem> xField1;
503 std::unique_ptr<SvxFieldItem> xField2;
504 std::optional<OUString> xString;
506 PPTFieldEntry()
507 : nPos(0)
508 , nTextRangeEnd(0)
512 ~PPTFieldEntry();
514 void SetDateTime( sal_uInt32 nType );
516 // converting PPT date time format:
517 static void GetDateTime(
518 const sal_uInt32 nVal,
519 SvxDateFormat& eDateFormat,
520 SvxTimeFormat& eTimeFormat
524 struct MSFILTER_DLLPUBLIC HeaderFooterEntry
526 const PptSlidePersistEntry* pMasterPersist;
527 OUString pPlaceholder[ 4 ];
528 sal_uInt32 nAtom;
530 sal_uInt32 IsToDisplay( sal_uInt32 nInstance );
531 sal_uInt32 NeedToImportInstance(
532 const sal_uInt32 nInstance,
533 const PptSlidePersistEntry& rSlidePersist
536 explicit HeaderFooterEntry( const PptSlidePersistEntry* pMaster = nullptr );
539 struct MSFILTER_DLLPUBLIC ProcessData final : public SvxMSDffClientData
541 PptSlidePersistEntry& rPersistEntry;
542 SdPageCapsule pPage;
543 ::std::vector< rtl::Reference<SdrObject> > aBackgroundColoredObjects;
544 std::unique_ptr<sal_uInt32[]> pTableRowProperties;
546 ProcessData( PptSlidePersistEntry& rP, SdPageCapsule pP ) :
547 rPersistEntry ( rP ),
548 pPage ( pP ) {};
550 virtual void NotifyFreeObj(SdrObject* pObj) override;
554 class SdrTextObj;
556 class MSFILTER_DLLPUBLIC SdrPowerPointImport : public SdrEscherImport
558 protected:
560 friend class PPTTextObj;
561 friend class PPTExtParaProv;
562 friend struct PPTStyleSheet;
563 friend class PPTNumberFormatCreator;
565 bool m_bOk;
566 PptUserEditAtom m_aUserEditAtom;
567 PptColorSchemeAtom m_aPageColors;
568 ::std::vector< SdHyperlinkEntry > m_aHyperList;
569 std::unique_ptr<sal_uInt32[]>
570 m_pPersistPtr;
571 sal_uInt32 m_nPersistPtrCnt;
573 const PPTStyleSheet* m_pPPTStyleSheet; // this is the current stylesheet;
574 const PPTStyleSheet* m_pDefaultSheet; // this is a sheet we are using if no masterpage can be found, but that should
575 // never happen just preventing a crash
576 std::unique_ptr<PptSlidePersistList> m_pMasterPages;
577 std::unique_ptr<PptSlidePersistList> m_pSlidePages;
578 std::unique_ptr<PptSlidePersistList> m_pNotePages;
579 sal_uInt16 m_nCurrentPageNum;
580 sal_uLong m_nDocStreamPos;
581 sal_uInt16 m_nPageColorsNum;
582 PptPageKind m_ePageColorsKind;
583 PptPageKind m_eCurrentPageKind;
585 protected:
586 using SdrEscherImport::ReadObjText;
588 bool SeekToCurrentPage(DffRecordHeader* pRecHd) const;
589 bool SeekToDocument(DffRecordHeader* pRecHd) const;
590 static bool SeekToContentOfProgTag(
591 sal_Int32 nVersion,
592 SvStream& rSt,
593 const DffRecordHeader& rProgTagBinaryDataHd,
594 DffRecordHeader& rContentHd
596 virtual SdrObject* ApplyTextObj(
597 PPTTextObj* pTextObj,
598 SdrTextObj* pText,
599 SdPageCapsule pPage,
600 SfxStyleSheet*,
601 SfxStyleSheet** )
602 const;
603 virtual SdrObject* ReadObjText( PPTTextObj* pTextObj, SdrObject* pObj, SdPageCapsule pPage ) const override;
604 // #i32596# - new parameter <_nCalledByGroup>, which
605 // indicates, if the OLE object is imported inside a group object.
606 virtual rtl::Reference<SdrObject> ImportOLE(
607 sal_uInt32 nOLEId,
608 const Graphic& rGraf,
609 const tools::Rectangle& rBoundRect,
610 const tools::Rectangle& rVisArea,
611 const int _nCalledByGroup
612 ) const override;
613 std::unique_ptr<SvMemoryStream> ImportExOleObjStg( sal_uInt32 nPersistPtr, sal_uInt32& nOleId ) const;
614 rtl::Reference<SdrPage> MakeBlankPage(bool bMaster) const;
615 bool ReadFontCollection();
616 PptSlidePersistList* GetPageList(PptPageKind ePageKind) const;
617 sal_uInt32 GetCurrentPageId();
618 sal_uInt32 GetMasterPageId(sal_uInt16 nPageNum, PptPageKind ePageKind) const;
619 sal_uInt32 GetNotesPageId(sal_uInt16 nPageNum ) const;
620 static SdrOutliner* GetDrawOutliner( SdrTextObj const * pSdrText );
621 void SeekOle( SfxObjectShell* pShell, sal_uInt32 nFilterOptions );
623 void ApplyTextAnchorAttributes( PPTTextObj const & rTextObj, SfxItemSet& rSet ) const;
624 bool IsVerticalText() const;
626 public:
627 SdrPowerPointImport( PowerPointImportParam&, const OUString& rBaseURL );
628 virtual ~SdrPowerPointImport() override;
629 sal_uInt16 GetPageCount( PptPageKind eKind = PPT_SLIDEPAGE ) const;
630 void SetPageNum( sal_uInt16 nPageNum, PptPageKind = PPT_SLIDEPAGE );
631 Size GetPageSize() const;
632 rtl::Reference<SdrObject> ImportPageBackgroundObject(
633 const SdrPage& rPage,
634 sal_uInt32& nBgFileOffset
636 bool IsNoteOrHandout( sal_uInt16 nPageNum ) const;
637 bool HasMasterPage(
638 sal_uInt16 nPageNum,
639 PptPageKind ePageKind = PPT_SLIDEPAGE
640 ) const;
641 sal_uInt16 GetMasterPageIndex(
642 sal_uInt16 nPageNum,
643 PptPageKind ePageKind = PPT_SLIDEPAGE
644 ) const;
646 void ImportPage( SdrPage* pPage, const PptSlidePersistEntry* pMasterPersist );
647 virtual bool GetColorFromPalette(sal_uInt16 nNum, Color& rColor) const override;
648 virtual bool SeekToShape( SvStream& rSt, SvxMSDffClientData* pClientData, sal_uInt32 nId ) const override;
649 virtual const PptSlideLayoutAtom* GetSlideLayoutAtom() const override;
650 rtl::Reference<SdrObject> CreateTable(
651 SdrObject* pGroupObject,
652 const sal_uInt32* pTableArry,
653 SvxMSDffSolverContainer* pSolverContainer
655 virtual bool ReadFormControl( rtl::Reference<SotStorage>& rSrc1, css::uno::Reference< css::form::XFormComponent > & rFormComp ) const = 0;
658 struct PPTTextParagraphStyleAtomInterpreter
660 bool bValid;
661 bool bForbiddenRules;
662 bool bHangingPunctuation;
663 bool bLatinTextWrap;
665 PPTTextParagraphStyleAtomInterpreter();
667 bool Read( SvStream& rIn, const DffRecordHeader& rRecHd );
670 struct PPTTextSpecInfo
672 sal_uInt32 nCharIdx;
673 LanguageType nLanguage[ 3 ];
674 sal_uInt16 nDontKnow;
676 explicit PPTTextSpecInfo( sal_uInt32 nCharIdx );
679 struct PPTTextSpecInfoAtomInterpreter
681 bool bValid;
682 ::std::vector< PPTTextSpecInfo > aList;
684 PPTTextSpecInfoAtomInterpreter();
685 ~PPTTextSpecInfoAtomInterpreter();
687 bool Read(
688 SvStream& rIn,
689 const DffRecordHeader& rRecHd,
690 sal_uInt16 nRecordType,
691 const PPTTextSpecInfo* pTextSpecDefault = nullptr
696 #define PPT_STYLESHEETENTRIES 9
698 struct PPTExtParaLevel
700 sal_uInt32 mnExtParagraphMask;
701 sal_uInt16 mnBuBlip;
702 sal_uInt16 mnHasAnm;
703 sal_uInt32 mnAnmScheme;
704 sal_uInt32 mpfPP10Ext;
705 sal_uInt32 mnExtCharacterMask;
706 sal_uInt32 mcfPP10Ext;
707 bool mbSet;
709 PPTExtParaLevel();
710 friend SvStream& ReadPPTExtParaLevel( SvStream& rIn, PPTExtParaLevel& rL );
713 struct PPTExtParaSheet
715 PPTExtParaLevel aExtParaLevel[nMaxPPTLevels];
718 struct PPTBuGraEntry
720 sal_uInt32 nInstance;
721 Graphic aBuGra;
723 PPTBuGraEntry( Graphic aGraphic, sal_uInt32 nInstance );
726 class PPTExtParaProv
728 ::std::vector< std::unique_ptr<PPTBuGraEntry> > aBuGraList;
730 public:
731 bool bStyles;
732 DffRecordManager aExtendedPresRules;
734 o3tl::enumarray<TSS_Type, PPTExtParaSheet> aExtParaSheet;
736 bool GetGraphic( sal_uInt32 nInstance, Graphic& rGraphic ) const;
738 PPTExtParaProv(
739 SdrPowerPointImport& rManager,
740 SvStream& rSt,
741 const DffRecordHeader* pMainMasterHd
743 ~PPTExtParaProv();
746 struct PPTCharLevel
748 Color mnFontColorInStyleSheet;
749 sal_uInt32 mnFontColor;
750 sal_uInt16 mnFlags;
751 sal_uInt16 mnFont;
752 sal_uInt16 mnAsianOrComplexFont;
753 sal_uInt16 mnFontHeight;
754 sal_uInt16 mnEscapement;
757 struct PPTCharSheet
759 PPTCharLevel maCharLevel[nMaxPPTLevels];
761 explicit PPTCharSheet( TSS_Type nInstance );
763 void Read( SvStream& rIn, sal_uInt32 nLevel );
766 struct PPTParaLevel
768 sal_uInt16 mnBuFlags;
769 sal_uInt16 mnBulletChar;
770 sal_uInt16 mnBulletFont;
771 sal_uInt16 mnBulletHeight;
772 sal_uInt32 mnBulletColor;
774 sal_uInt16 mnAdjust;
775 sal_uInt16 mnLineFeed;
776 sal_uInt16 mnUpperDist;
777 sal_uInt16 mnLowerDist;
778 sal_uInt16 mnTextOfs;
779 sal_uInt16 mnBulletOfs;
780 sal_uInt16 mnDefaultTab;
781 sal_uInt16 mnAsianLineBreak; // bit0: use asian rules for first and last character
782 // 1: do not wrap latin text in the middle of the word
783 // 2: allow hanging punctuation
784 sal_uInt16 mnBiDi;
787 struct PPTParaSheet
789 public:
791 PPTParaLevel maParaLevel[nMaxPPTLevels];
793 explicit PPTParaSheet( TSS_Type nInstance );
795 void Read(
796 SdrPowerPointImport const & rMan,
797 SvStream& rIn,
798 sal_uInt32 nLevel,
799 bool bFirst
801 void UpdateBulletRelSize( sal_uInt32 nLevel, sal_uInt16 nFontHeight );
804 class PPTParagraphObj;
805 class PPTNumberFormatCreator
807 sal_uInt32 nIsBullet;
808 sal_uInt32 nBulletChar;
809 sal_uInt32 nBulletFont;
810 sal_uInt32 nBulletHeight;
811 sal_uInt32 nBulletColor;
812 sal_uInt32 nTextOfs;
813 sal_uInt32 nBulletOfs;
815 void ImplGetNumberFormat(
816 SdrPowerPointImport const & rMan,
817 SvxNumberFormat& rNumberFormat
819 bool ImplGetExtNumberFormat(
820 SdrPowerPointImport const & rMan,
821 SvxNumberFormat& rNumberFormat,
822 sal_uInt32 nLevel,
823 TSS_Type nInstance,
824 TSS_Type nInstanceInSheet,
825 std::optional< sal_Int16 >& rStartNumbering,
826 sal_uInt32 nFontHeight,
827 PPTParagraphObj const * pPara
830 protected:
832 PPTNumberFormatCreator( std::unique_ptr<PPTExtParaProv> );
833 ~PPTNumberFormatCreator();
835 public:
837 std::unique_ptr<PPTExtParaProv> pExtParaProv;
839 void GetNumberFormat(
840 SdrPowerPointImport const & rMan,
841 SvxNumberFormat& rNumberFormat,
842 sal_uInt32 nLevel,
843 const PPTParaLevel& rParaLevel,
844 const PPTCharLevel& rCharLevel,
845 TSS_Type nInstance
848 bool GetNumberFormat(
849 SdrPowerPointImport const & rMan,
850 SvxNumberFormat& rNumberFormat,
851 PPTParagraphObj* pPara,
852 TSS_Type nInstanceInSheet,
853 std::optional< sal_Int16 >& rStartNumbering
857 class SvxNumBulletItem;
858 struct PPTStyleSheet : public PPTNumberFormatCreator
860 PPTTextSpecInfo maTxSI;
861 o3tl::enumarray<TSS_Type, std::unique_ptr<PPTCharSheet>> mpCharSheet;
862 o3tl::enumarray<TSS_Type, std::unique_ptr<PPTParaSheet>> mpParaSheet;
863 o3tl::enumarray<TSS_Type, std::unique_ptr<SvxNumBulletItem>> mpNumBulletItem;
865 PPTStyleSheet(
866 const DffRecordHeader& rSlideHd,
867 SvStream& rSt, SdrPowerPointImport&,
868 const PPTTextParagraphStyleAtomInterpreter&,
869 const PPTTextSpecInfo&
871 ~PPTStyleSheet();
874 struct ImplPPTParaPropSet final : public salhelper::SimpleReferenceObject
876 sal_uInt16 mnDepth;
877 sal_uInt32 mnAttrSet;
878 sal_uInt32 mnBulletColor;
879 sal_uInt16 mpArry[ 22 ];
881 sal_uInt32 mnExtParagraphMask;
882 sal_uInt32 mnAnmScheme;
883 sal_uInt16 mnHasAnm;
884 sal_uInt16 mnBuBlip;
886 sal_uInt32 nDontKnow1;
887 sal_uInt32 nDontKnow2;
888 sal_uInt16 nDontKnow2bit06;
890 ImplPPTParaPropSet()
891 : mnDepth( 0 )
892 , mnAttrSet( 0 )
893 , mnBulletColor( 0 )
894 , mnExtParagraphMask( 0 )
895 , mnAnmScheme( 0 )
896 , mnHasAnm( 0 )
897 , mnBuBlip( 0 )
898 , nDontKnow1( 0 )
899 , nDontKnow2( 0 )
900 , nDontKnow2bit06( 0 )
904 struct PPTParaPropSet
906 rtl::Reference<ImplPPTParaPropSet> mxParaSet;
907 PPTParaPropSet();
910 struct ImplPPTCharPropSet
912 sal_uInt32 mnAttrSet;
913 sal_uInt16 mnFlags;
914 sal_uInt32 mnColor;
915 sal_uInt16 mnFont;
916 sal_uInt16 mnAsianOrComplexFont;
917 sal_uInt16 mnANSITypeface;
918 sal_uInt16 mnFontHeight;
919 sal_uInt16 mnEscapement;
920 sal_uInt16 mnSymbolFont;
922 ImplPPTCharPropSet()
923 : mnAttrSet( 0 )
924 , mnFlags( 0 )
925 , mnColor( 0 )
926 , mnFont( 0 )
927 , mnAsianOrComplexFont( 0 )
928 , mnANSITypeface( 0 )
929 , mnFontHeight( 0 )
930 , mnEscapement( 0 )
931 , mnSymbolFont( 0)
935 struct PPTCharPropSet
937 //when the bullet text has more than two color,next the text following with bullet has been set hyperlink.
938 //now,the bullet color should be set original hyperlink text's color
939 //so "mbHardHylinkOrigColor" hold the original hyperlink text's color.
940 sal_uInt32 mnHylinkOrigColor;
941 //the bullet text whether has a hyperlink.
942 bool mbIsHyperlink;
943 //the hyperlink text whether has a custom color.
944 bool mbHardHylinkOrigColor;
946 sal_uInt32 mnOriginalTextPos;
947 sal_uInt32 mnParagraph;
948 OUString maString;
949 std::unique_ptr<SvxFieldItem>
950 mpFieldItem;
951 LanguageType mnLanguage[ 3 ];
953 void SetFont( sal_uInt16 nFont );
954 void SetColor( sal_uInt32 nColor );
956 explicit PPTCharPropSet( sal_uInt32 nParagraph );
957 PPTCharPropSet( const PPTCharPropSet& rCharPropSet );
958 PPTCharPropSet( const PPTCharPropSet& rCharPropSet, sal_uInt32 nParagraph );
959 ~PPTCharPropSet();
961 PPTCharPropSet& operator=( const PPTCharPropSet& rCharPropSet );
963 friend class PPTTextObj;
964 friend class PPTParagraphObj;
965 friend class PPTPortionObj;
966 friend struct PPTStyleTextPropReader;
968 private:
969 o3tl::cow_wrapper< ImplPPTCharPropSet > mpImplPPTCharPropSet;
972 struct PPTTabEntry
974 sal_uInt16 nOffset;
975 sal_uInt16 nStyle;
978 struct PPTRuler final : public salhelper::SimpleReferenceObject
980 sal_Int32 nFlags;
981 sal_uInt16 nDefaultTab;
982 sal_uInt16 nTextOfs[nMaxPPTLevels] = {};
983 sal_uInt16 nBulletOfs[nMaxPPTLevels] = {};
984 std::unique_ptr<PPTTabEntry[]>
985 pTab;
986 sal_uInt16 nTabCount;
988 PPTRuler();
989 virtual ~PPTRuler() override;
992 struct PPTTextRulerInterpreter
994 private:
995 rtl::Reference<PPTRuler> mxImplRuler;
996 public:
997 PPTTextRulerInterpreter();
998 PPTTextRulerInterpreter( PPTTextRulerInterpreter const & rRuler );
999 PPTTextRulerInterpreter(
1000 sal_uInt32 nFileOfs,
1001 DffRecordHeader const & rHd,
1002 SvStream& rIn
1004 ~PPTTextRulerInterpreter();
1006 sal_uInt16 GetTabOffsetByIndex( sal_uInt16 nIndex ) const
1007 { return mxImplRuler->pTab[ nIndex ].nOffset; };
1009 sal_uInt16 GetTabStyleByIndex( sal_uInt16 nIndex ) const
1010 { return mxImplRuler->pTab[ nIndex ].nStyle; };
1012 sal_uInt16 GetTabCount() const { return mxImplRuler->nTabCount; };
1013 bool GetDefaultTab( sal_uInt16& nValue ) const;
1014 bool GetTextOfs( sal_uInt32 nLevel, sal_uInt16& nValue ) const;
1015 bool GetBulletOfs( sal_uInt32 nLevel, sal_uInt16& nValue ) const;
1017 PPTTextRulerInterpreter& operator=( const PPTTextRulerInterpreter& rRuler );
1020 #define PPT_SPEC_NEWLINE 0x10000
1021 #define PPT_SPEC_SYMBOL 0x20000
1023 struct StyleTextProp9
1025 sal_uInt32 mnExtParagraphMask;
1026 sal_uInt16 mnBuBlip;
1027 sal_uInt16 mnHasAnm;
1028 sal_uInt32 mnAnmScheme;
1029 sal_uInt32 mpfPP10Ext;
1030 sal_uInt32 mnExtCharacterMask;
1031 sal_uInt32 mncfPP10Ext;
1032 sal_uInt32 mnSpecialInfoMask;
1033 sal_uInt32 mnPP10Ext;
1034 sal_uInt16 mfBidi;
1036 StyleTextProp9()
1037 : mnExtParagraphMask( 0 )
1038 , mnBuBlip( 0 )
1039 , mnHasAnm( 0 )
1040 , mnAnmScheme( 0 )
1041 , mpfPP10Ext( 0 )
1042 , mnExtCharacterMask( 0 )
1043 , mncfPP10Ext( 0 )
1044 , mnSpecialInfoMask( 0 )
1045 , mnPP10Ext( 0 )
1046 , mfBidi( 0 )
1049 void Read( SvStream& rSt );
1052 struct PPTStyleTextPropReader
1054 std::vector< sal_uInt32 > aSpecMarkerList; // hiword -> Flags, loword -> Position
1055 std::vector<std::unique_ptr<PPTParaPropSet>> aParaPropList;
1056 std::vector<std::unique_ptr<PPTCharPropSet>> aCharPropList;
1058 PPTStyleTextPropReader(
1059 SvStream& rIn,
1060 const DffRecordHeader& rClientTextBoxHd,
1061 PPTTextRulerInterpreter const & rInterpreter,
1062 const DffRecordHeader& rExtParaHd,
1063 TSS_Type nTextInstance
1065 ~PPTStyleTextPropReader();
1067 void Init(
1068 SvStream& rIn,
1069 const DffRecordHeader& rClientTextBoxHd,
1070 PPTTextRulerInterpreter const & rInterpreter,
1071 const DffRecordHeader& rExtParaHd,
1072 TSS_Type nTextInstance
1074 void ReadParaProps(
1075 SvStream& rIn,
1076 const DffRecordHeader& rTextHeader,
1077 const OUString& aString,
1078 PPTTextRulerInterpreter const & rRuler,
1079 bool& bTextPropAtom
1081 // returns CharCount
1082 static sal_uInt32 ReadCharProps(
1083 SvStream& rIn,
1084 PPTCharPropSet& aCharPropSet,
1085 std::u16string_view aString,
1086 sal_uInt32 nCharReadCnt,
1087 bool& bTextPropAtom,
1088 sal_uInt32 nExtParaPos,
1089 const std::vector< StyleTextProp9 >& aStyleTextProp9,
1090 sal_uInt32& nExtParaFlags,
1091 sal_uInt16& nBuBlip,
1092 sal_uInt16& nHasAnm,
1093 sal_uInt32& nAnmScheme
1097 class MSFILTER_DLLPUBLIC PPTPortionObj : public PPTCharPropSet
1100 friend class PPTParagraphObj;
1102 const PPTStyleSheet& mrStyleSheet;
1103 TSS_Type mnInstance;
1104 sal_uInt32 mnDepth;
1106 public:
1108 bool GetAttrib( sal_uInt32 nAttr, sal_uInt32& nVal, TSS_Type nInstanceInSheet ) const;
1109 SvxFieldItem* GetTextField();
1111 PPTPortionObj( const PPTStyleSheet&, TSS_Type nInstance, sal_uInt32 nDepth );
1112 PPTPortionObj(
1113 const PPTCharPropSet&,
1114 const PPTStyleSheet&,
1115 TSS_Type nInstance,
1116 sal_uInt32 nDepth
1118 PPTPortionObj( const PPTPortionObj& );
1119 ~PPTPortionObj();
1121 // the following function should be removed during next full update
1122 void ApplyTo(
1123 SfxItemSet& rSet,
1124 SdrPowerPointImport& rManager,
1125 TSS_Type nInstanceInSheet
1127 void ApplyTo(
1128 SfxItemSet& rSet,
1129 SdrPowerPointImport& rManager,
1130 TSS_Type nInstanceInSheet,
1131 const PPTTextObj* pTextObj
1133 sal_uInt32 Count() const { return mpFieldItem ? 1 : maString.getLength(); };
1136 class MSFILTER_DLLPUBLIC PPTParagraphObj
1137 : public PPTParaPropSet,
1138 public PPTNumberFormatCreator,
1139 public PPTTextRulerInterpreter
1141 friend class PPTTextObj;
1142 friend class PPTNumberFormatCreator;
1144 const PPTStyleSheet& mrStyleSheet;
1145 TSS_Type mnInstance;
1147 PPTParagraphObj(PPTParagraphObj const&) = delete;
1148 void operator=(PPTParagraphObj const&) = delete;
1150 sal_uInt32 mnCurrentObject;
1151 ::std::vector<std::unique_ptr<PPTPortionObj>> m_PortionList;
1153 public:
1154 void UpdateBulletRelSize( sal_uInt32& nBulletRelSize ) const;
1155 bool GetAttrib( sal_uInt32 nAttr, sal_uInt32& nVal, TSS_Type nInstanceInSheet );
1157 PPTParagraphObj(
1158 const PPTStyleSheet&,
1159 TSS_Type nInstance,
1160 sal_uInt16 nDepth
1162 PPTParagraphObj(
1163 PPTStyleTextPropReader&,
1164 size_t nCurParaPos,
1165 size_t& rnCurCharPos,
1166 const PPTStyleSheet&,
1167 TSS_Type nInstance,
1168 PPTTextRulerInterpreter const & rRuler
1170 ~PPTParagraphObj();
1172 sal_uInt32 GetTextSize();
1173 PPTPortionObj* First();
1174 PPTPortionObj* Next();
1176 void AppendPortion( PPTPortionObj& rPortion );
1177 void ApplyTo(
1178 SfxItemSet& rSet,
1179 std::optional< sal_Int16 >& rStartNumbering,
1180 SdrPowerPointImport const & rManager,
1181 TSS_Type nInstanceInSheet
1185 #define PPT_TEXTOBJ_FLAGS_PARA_ALIGNMENT_USED_LEFT 1
1186 #define PPT_TEXTOBJ_FLAGS_PARA_ALIGNMENT_USED_CENTER 2
1187 #define PPT_TEXTOBJ_FLAGS_PARA_ALIGNMENT_USED_RIGHT 4
1188 #define PPT_TEXTOBJ_FLAGS_PARA_ALIGNMENT_USED_BLOCK 8
1189 #define PPT_TEXTOBJ_FLAGS_VERTICAL 16
1191 struct ImplPPTTextObj final : public salhelper::SimpleReferenceObject
1193 sal_uInt32 mnShapeId;
1194 sal_uInt32 mnShapeMaster;
1195 std::optional<PptOEPlaceholderAtom> moPlaceHolderAtom;
1196 TSS_Type mnInstance;
1197 TSS_Type mnDestinationInstance;
1198 MSO_SPT meShapeType;
1200 sal_uInt32 mnCurrentObject;
1201 sal_uInt32 mnParagraphCount;
1202 std::vector<std::unique_ptr<PPTParagraphObj>>
1203 maParagraphList;
1204 PptSlidePersistEntry& mrPersistEntry;
1206 sal_uInt32 mnTextFlags;
1208 explicit ImplPPTTextObj( PptSlidePersistEntry& rPersistEntry )
1209 : mnShapeId(0)
1210 , mnShapeMaster(0)
1211 , mnInstance(TSS_Type::PageTitle)
1212 , mnDestinationInstance(TSS_Type::PageTitle)
1213 , meShapeType(mso_sptMin)
1214 , mnCurrentObject(0)
1215 , mnParagraphCount(0)
1216 , mrPersistEntry ( rPersistEntry )
1217 , mnTextFlags(0) {};
1220 class MSFILTER_DLLPUBLIC PPTTextObj
1222 rtl::Reference<ImplPPTTextObj> mxImplTextObj;
1224 public:
1225 PPTTextObj(
1226 SvStream& rSt,
1227 SdrPowerPointImport&,
1228 PptSlidePersistEntry&,
1229 DffObjData const *
1231 PPTTextObj( PPTTextObj const & rTextObj );
1232 ~PPTTextObj();
1234 sal_uInt32 GetCurrentIndex() const { return mxImplTextObj->mnCurrentObject; };
1235 sal_uInt32 Count() const { return mxImplTextObj->mnParagraphCount; };
1236 PPTParagraphObj* First();
1237 PPTParagraphObj* Next();
1238 MSO_SPT GetShapeType() const { return mxImplTextObj->meShapeType; };
1239 TSS_Type GetInstance() const { return mxImplTextObj->mnInstance; };
1240 void SetInstance( TSS_Type nInstance )
1241 { mxImplTextObj->mnInstance = nInstance; }
1243 TSS_Type GetDestinationInstance() const
1244 { return mxImplTextObj->mnDestinationInstance; }
1246 void SetDestinationInstance( TSS_Type nInstance )
1247 { mxImplTextObj->mnDestinationInstance = nInstance; }
1249 const std::optional<PptOEPlaceholderAtom> & GetOEPlaceHolderAtom() const { return mxImplTextObj->moPlaceHolderAtom; }
1250 sal_uInt32 GetTextFlags() const { return mxImplTextObj->mnTextFlags; }
1251 void SetVertical( bool bVertical )
1253 if ( bVertical )
1254 mxImplTextObj->mnTextFlags |= PPT_TEXTOBJ_FLAGS_VERTICAL;
1255 else
1256 mxImplTextObj->mnTextFlags &= ~PPT_TEXTOBJ_FLAGS_VERTICAL;
1258 bool GetVertical() const
1259 { return ( mxImplTextObj->mnTextFlags & PPT_TEXTOBJ_FLAGS_VERTICAL ) != 0; }
1261 const SfxItemSet* GetBackground() const;
1263 PPTTextObj& operator=( const PPTTextObj& rTextObj );
1266 class PPTConvertOCXControls final : public SvxMSConvertOCXControls
1268 virtual void GetDrawPage() override;
1269 PptPageKind ePageKind;
1270 const SdrPowerPointImport* mpPPTImporter;
1271 public:
1273 PPTConvertOCXControls( const SdrPowerPointImport* pPPTImporter, const css::uno::Reference< css::frame::XModel >& rxModel, PptPageKind ePKind ) :
1274 SvxMSConvertOCXControls ( rxModel ),
1275 ePageKind ( ePKind ),
1276 mpPPTImporter ( pPPTImporter )
1278 bool ReadOCXStream( rtl::Reference<SotStorage>& rSrc1,
1279 css::uno::Reference<css::drawing::XShape > *pShapeRef );
1280 virtual bool InsertControl(
1281 const css::uno::Reference< css::form::XFormComponent > &rFComp,
1282 const css::awt::Size& rSize,
1283 css::uno::Reference< css::drawing::XShape > *pShape,
1284 bool bFloatingCtrl
1285 ) override;
1288 // PowerPoint record types
1289 #define PPT_PST_Document 1000
1290 #define PPT_PST_DocumentAtom 1001
1291 #define PPT_PST_SlideAtom 1007
1292 #define PPT_PST_NotesAtom 1009
1293 #define PPT_PST_Environment 1010
1294 #define PPT_PST_SlidePersistAtom 1011
1295 #define PPT_PST_SSSlideInfoAtom 1017
1296 #define PPT_PST_VBAInfo 1023
1297 #define PPT_PST_VBAInfoAtom 1024
1298 #define PPT_PST_SSDocInfoAtom 1025
1299 #define PPT_PST_ExObjList 1033
1300 #define PPT_PST_PPDrawingGroup 1035
1301 #define PPT_PST_PPDrawing 1036
1302 #define PPT_PST_GridSpacing10Atom 1037
1303 #define PPT_PST_NamedShows 1040
1304 #define PPT_PST_NamedShow 1041
1305 #define PPT_PST_NamedShowSlides 1042
1306 #define PPT_PST_List 2000
1307 #define PPT_PST_FontCollection 2005
1308 #define PPT_PST_SoundCollection 2020
1309 #define PPT_PST_Sound 2022
1310 #define PPT_PST_SoundData 2023
1311 #define PPT_PST_ColorSchemeAtom 2032
1313 // these atoms first was seen in ppt2000 in a private Tag atom
1314 #define PPT_PST_ExtendedBuGraContainer 2040 // consist of 4041
1315 #define PPT_PST_ExtendedBuGraAtom 2041 // the instance of this atom indices the current graphic
1317 #define PPT_PST_ExObjRefAtom 3009
1318 #define PPT_PST_OEPlaceholderAtom 3011
1319 #define PPT_PST_OutlineTextRefAtom 3998
1320 #define PPT_PST_TextHeaderAtom 3999
1321 #define PPT_PST_TextCharsAtom 4000
1322 #define PPT_PST_StyleTextPropAtom 4001
1323 #define PPT_PST_TxMasterStyleAtom 4003
1324 #define PPT_PST_TxPFStyleAtom 4005
1325 #define PPT_PST_TextRulerAtom 4006
1326 #define PPT_PST_TextBytesAtom 4008
1327 #define PPT_PST_TxSIStyleAtom 4009
1328 #define PPT_PST_TextSpecInfoAtom 4010
1330 // these atoms first was seen in ppt2000 in a private Tag atom
1331 #define PPT_PST_ExtendedParagraphAtom 4012
1332 #define PPT_PST_ExtendedParagraphMasterAtom 4013
1333 #define PPT_PST_ExtendedPresRuleContainer 4014 // consist of 4012, 4015,
1334 #define PPT_PST_ExtendedParagraphHeaderAtom 4015 // the instance of this atom indices the current presobj
1335 // the first sal_uInt32 in this atom indices the current slideId
1336 #define PPT_PST_TextDefaults9Atom 4016
1338 #define PPT_PST_FontEntityAtom 4023
1339 #define PPT_PST_CString 4026
1340 #define PPT_PST_ExOleObjAtom 4035
1341 #define PPT_PST_SrKinsoku 4040
1342 #define PPT_PST_ExEmbed 4044
1343 #define PPT_PST_ExHyperlinkAtom 4051
1344 #define PPT_PST_ExHyperlink 4055
1345 #define PPT_PST_SlideNumberMCAtom 4056
1346 #define PPT_PST_HeadersFooters 4057
1347 #define PPT_PST_HeadersFootersAtom 4058
1348 #define PPT_PST_TxInteractiveInfoAtom 4063
1349 #define PPT_PST_MasterText 4068
1350 #define PPT_PST_RecolorInfoAtom 4071
1351 #define PPT_PST_ExControl 4078
1352 #define PPT_PST_SlideListWithText 4080
1353 #define PPT_PST_AnimationInfoAtom 4081
1354 #define PPT_PST_InteractiveInfo 4082
1355 #define PPT_PST_InteractiveInfoAtom 4083
1356 #define PPT_PST_UserEditAtom 4085
1357 #define PPT_PST_CurrentUserAtom 4086
1358 #define PPT_PST_DateTimeMCAtom 4087
1359 #define PPT_PST_GenericDateMCAtom 4088
1360 #define PPT_PST_HeaderMCAtom 4089
1361 #define PPT_PST_FooterMCAtom 4090
1362 #define PPT_PST_ExMediaAtom 4100
1363 #define PPT_PST_ExVideo 4101
1364 #define PPT_PST_ExAviMovie 4102
1365 #define PPT_PST_ExMCIMovie 4103
1366 #define PPT_PST_AnimationInfo 4116
1367 #define PPT_PST_RTFDateTimeMCAtom 4117
1368 #define PPT_PST_ProgTags 5000
1369 #define PPT_PST_ProgBinaryTag 5002
1370 #define PPT_PST_BinaryTagData 5003
1371 #define PPT_PST_PersistPtrIncrementalBlock 6002
1373 // these atoms first was seen in ppt2000 in a private Tag atom
1374 #define PPT_PST_PresentationAdvisorFlags9Atom 6010
1375 #define PPT_PST_HtmlDocInfo9Atom 6011
1378 #define PPT_PST_HashCodeAtom 11008
1379 #define PPT_PST_BuildList 11010
1380 #define PPT_PST_Comment10 12000
1381 #define PPT_PST_CommentAtom10 12001
1382 #define PPT_PST_CommentIndex10 12004
1383 #define PPT_PST_SlideFlags10Atom 12010
1384 #define PPT_PST_SlideTime10Atom 12011
1385 #define PPT_PST_DocToolbarStates10Atom 14001
1387 // attributes for PptTextStyleSheet
1388 #define PPT_ParaAttr_BulletOn 0 //00000001
1389 #define PPT_ParaAttr_BuHardFont 1 //00000002
1390 #define PPT_ParaAttr_BuHardColor 2 //00000004
1391 #define PPT_ParaAttr_BuHardHeight 3 //00000008
1392 #define PPT_ParaAttr_BulletFont 4 //00000010
1393 #define PPT_ParaAttr_BulletColor 5 //00000020
1394 #define PPT_ParaAttr_BulletHeight 6 //00000040
1395 #define PPT_ParaAttr_BulletChar 7 //00000080
1396 #define PPT_ParaAttr_Adjust 11 //00000800 0000=Left, 0001=Center, 0002=Right, 0003=Block
1397 #define PPT_ParaAttr_LineFeed 12 //00001000
1398 #define PPT_ParaAttr_UpperDist 13 //00002000 is set to 0032 for TextFrames by default
1399 #define PPT_ParaAttr_LowerDist 14 //00004000
1400 #define PPT_ParaAttr_TextOfs 15 //00008000
1401 #define PPT_ParaAttr_BulletOfs 16 //00010000
1402 #define PPT_ParaAttr_DefaultTab 17 //00020000
1403 #define PPT_ParaAttr_AsianLB_1 18
1404 #define PPT_ParaAttr_AsianLB_2 19
1405 #define PPT_ParaAttr_AsianLB_3 20
1406 #define PPT_ParaAttr_BiDi 21 //00200000
1408 #define PPT_CharAttr_Bold 0 //00000001
1409 #define PPT_CharAttr_Italic 1 //00000002
1410 #define PPT_CharAttr_Underline 2 //00000004
1411 #define PPT_CharAttr_Shadow 4 //00000010
1412 #define PPT_CharAttr_Strikeout 8 //00000100
1413 #define PPT_CharAttr_Embossed 9 //00000200
1414 #define PPT_CharAttr_Font 16 //00010000
1415 #define PPT_CharAttr_AsianOrComplexFont 21 //00200000
1416 #define PPT_CharAttr_ANSITypeface 22 //00400000
1417 #define PPT_CharAttr_Symbol 23 //00800000
1418 #define PPT_CharAttr_FontHeight 17 //00020000
1419 #define PPT_CharAttr_FontColor 18 //00040000
1420 #define PPT_CharAttr_Escapement 19 //00080000
1422 // values for PptSlideLayoutAtom.eLayout
1423 enum class PptSlideLayout
1425 TITLESLIDE = 0, // The slide is a title slide
1426 TITLEANDBODYSLIDE = 1, // Title and body slide
1427 TITLEMASTERSLIDE = 2, // Title master slide
1428 MASTERSLIDE = 3, // Master slide layout
1429 MASTERNOTES = 4, // Master notes layout
1430 NOTESTITLEBODY = 5, // Notes title/body layout
1431 HANDOUTLAYOUT = 6, // Handout layout, therefore it doesn't have placeholders except header, footer, and date
1432 ONLYTITLE = 7, // Only title placeholder
1433 TWOCOLUMNSANDTITLE = 8, // Body of the slide has 2 columns and a title
1434 TWOROWSANDTITLE = 9, // Slide's body has 2 rows and a title
1435 RIGHTCOLUMN2ROWS = 10, // Body contains 2 columns, right column has 2 rows
1436 LEFTCOLUMN2ROWS = 11, // Body contains 2 columns, left column has 2 rows
1437 BOTTOMROW2COLUMNS = 12, // Body contains 2 rows, bottom row has 2 columns
1438 TOPROW2COLUMN = 13, // Body contains 2 rows, top row has 2 columns
1439 FOUROBJECTS = 14, // 4 objects
1440 BIGOBJECT = 15, // Big object
1441 BLANKSLIDE = 16, // Blank slide
1442 TITLERIGHTBODYLEFT = 17, // Vertical title on the right, body on the left
1443 TITLERIGHT2BODIESLEFT = 18 // Vertical title on the right, body on the left split into 2 rows
1446 // the following table describes the placeholder id's (values from reality followed by values taken from the documentation)
1447 enum class PptPlaceholder : sal_uInt8
1449 NONE = 0, // 0 None
1450 MASTERTITLE = 1, // 1 Master title
1451 MASTERBODY = 2, // 2 Master body
1452 MASTERCENTEREDTITLE = 3, // 3 Master centered title
1453 MASTERSUBTITLE = 4, // 10 Master subtitle
1454 MASTERNOTESSLIDEIMAGE = 5, // 4 Master notes slide image
1455 MASTERNOTESBODYIMAGE = 6, // 5 Master notes body image
1456 MASTERDATE = 7, // 6 Master date
1457 MASTERSLIDENUMBER = 8, // 7 Master slide number
1458 MASTERFOOTER = 9, // 8 Master footer
1459 MASTERHEADER = 10, // 9 Master header
1460 // 11 Generic text object
1461 TITLE = 13, // 12 Title
1462 BODY = 14, // 13 Body
1463 NOTESBODY = 12, // 14 Notes body
1464 CENTEREDTITLE = 15, // 15 Centered title
1465 SUBTITLE = 16, // 16 Subtitle
1466 VERTICALTEXTTITLE = 17, // 17 Vertical text title
1467 VERTICALTEXTBODY = 18, // 18 Vertical text body
1468 NOTESSLIDEIMAGE = 11, // 19 Notes slide image
1469 OBJECT = 19, // 20 Object (no matter the size)
1470 GRAPH = 20, // 21 Graph
1471 TABLE = 21, // 22 Table
1472 CLIPART = 22, // 23 Clip Art
1473 ORGANISZATIONCHART = 23, // 24 Organization Chart
1474 MEDIACLIP = 24 // 25 Media Clip
1477 #endif // INCLUDED_FILTER_MSFILTER_SVDFPPT_HXX
1479 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */