1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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
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 <tools/color.hxx>
44 #include <tools/fontenum.hxx>
45 #include <tools/gen.hxx>
46 #include <tools/ref.hxx>
47 #include <tools/solar.h>
48 #include <vcl/graph.hxx>
49 #include <salhelper/simplereferenceobject.hxx>
51 namespace com::sun::star
{
52 namespace awt
{ struct Size
; }
53 namespace drawing
{ class XShape
; }
54 namespace form
{ class XFormComponent
; }
55 namespace frame
{ class XModel
; }
66 class SvxNumberFormat
;
68 enum class PptSlideLayout
;
69 enum class PptPlaceholder
: sal_uInt8
;
71 #define PPT_IMPORTFLAGS_NO_TEXT_ASSERT 1
73 struct MSFILTER_DLLPUBLIC PptCurrentUserAtom
76 sal_uInt32 nCurrentUserEdit
;
77 sal_uInt16 nDocFileVersion
;
78 sal_uInt8 nMajorVersion
;
79 sal_uInt8 nMinorVersion
;
80 OUString aCurrentUser
;
84 PptCurrentUserAtom() : nMagic ( 0 ),
85 nCurrentUserEdit ( 0 ),
86 nDocFileVersion ( 0 ),
88 nMinorVersion ( 0 ) {}
90 MSFILTER_DLLPUBLIC
friend SvStream
& ReadPptCurrentUserAtom( SvStream
& rIn
, PptCurrentUserAtom
& rAtom
);
93 struct MSFILTER_DLLPUBLIC PowerPointImportParam
96 sal_uInt32 nImportFlags
;
97 PptCurrentUserAtom aCurrentUserAtom
;
99 PowerPointImportParam( SvStream
& rDocStream
);
102 struct SdHyperlinkEntry
110 OUString aSubAddress
;
112 OUString aConvSubString
;
115 // Helper class for reading the PPT InteractiveInfoAtom
116 struct MSFILTER_DLLPUBLIC PptInteractiveInfoAtom
118 sal_uInt32 nSoundRef
;
119 sal_uInt32 nExHyperlinkId
;
124 sal_uInt8 nHyperlinkType
;
126 // unknown, because total size is 16
133 MSFILTER_DLLPUBLIC
friend SvStream
& ReadPptInteractiveInfoAtom( SvStream
& rIn
, PptInteractiveInfoAtom
& rAtom
);
136 enum PptPageKind
{ PPT_MASTERPAGE
, PPT_SLIDEPAGE
, PPT_NOTEPAGE
};
140 PPTPF_USLETTER
, // 8.5x11"
141 PPTPF_A4
, // 210x297mm
142 PPTPF_35MMDIA
, // DIA
147 // values for PPT_PST_TextHeaderAtom's sal_uLong
154 PPTTH_OTHER
, // Text in a Shape
155 PPTTH_CENTERBODY
, // Subtitle in Title-Slide
156 PPTTH_CENTERTITLE
, // Title in Title-Slide
157 PPTTH_HALFBODY
, // Body in two-column slide
158 PPTTH_QUARTERBODY
// Body in four-body slide
161 enum class TSS_Type
: unsigned {
172 Unknown
= 0xffffffff // or invalid
175 const int nMaxPPTLevels
= 10;
177 // Object IDs for StarDraw UserData
178 #define PPT_OBJECTINFO_ID (1)
180 struct MSFILTER_DLLPUBLIC PptDocumentAtom
182 Size aSlidesPageSize
; // page size of the slides in 576DPI
183 Size aNotesPageSize
; // page size of the notes in 576DPI
184 // avoid RatioAtom for the time being
185 sal_uInt32 nNotesMasterPersist
; // 0=non-existent
186 sal_uInt32 nHandoutMasterPersist
; // 0=non-existent
187 sal_uInt16 n1stPageNumber
; // page number of the first slide
188 PptPageFormat eSlidesPageFormat
; // page format of the slides
189 bool bEmbeddedTrueType
: 1; // TrueType directly within the File?
190 bool bTitlePlaceholdersOmitted
: 1;
191 bool bRightToLeft
: 1;
192 bool bShowComments
: 1;
197 : nNotesMasterPersist(0)
198 , nHandoutMasterPersist(0)
200 , eSlidesPageFormat(PPTPF_SCREEN
)
201 , bEmbeddedTrueType(false)
202 , bTitlePlaceholdersOmitted(false)
203 , bRightToLeft(false)
204 , bShowComments(false)
208 Size
const & GetSlidesPageSize() const { return aSlidesPageSize
; }
209 Size
const & GetNotesPageSize() const { return aNotesPageSize
; }
211 friend SvStream
& ReadPptDocumentAtom( SvStream
& rIn
, PptDocumentAtom
& rAtom
);
214 struct PptSlideLayoutAtom
216 PptSlideLayout eLayout
; // 0..18
217 PptPlaceholder aPlaceholderId
[ 8 ];
220 PptSlideLayoutAtom() { Clear(); }
223 // SlideLayoutAtom is read without header!
224 friend SvStream
& ReadPptSlideLayoutAtom( SvStream
& rIn
, PptSlideLayoutAtom
& rAtom
);
229 PptSlideLayoutAtom aLayout
;
230 sal_uInt32 nMasterId
;
235 PptSlideAtom() { Clear(); }
238 friend SvStream
& ReadPptSlideAtom(SvStream
& rIn
, PptSlideAtom
& rAtom
);
241 struct PptSlidePersistAtom
243 sal_uInt32 nPsrReference
;
245 sal_uInt32 nNumberTexts
;
247 sal_uInt32 nReserved
; // we will use nReserved temporarily to set the offset to SSSlideInfoAtom ( if possible )
250 PptSlidePersistAtom() { Clear(); }
253 friend SvStream
& ReadPptSlidePersistAtom(SvStream
& rIn
, PptSlidePersistAtom
& rAtom
);
262 PptNotesAtom() { Clear(); }
265 friend SvStream
& ReadPptNotesAtom(SvStream
& rIn
, PptNotesAtom
& rAtom
);
268 struct PptColorSchemeAtom
270 sal_uInt8 aData
[32] = {};
273 PptColorSchemeAtom();
274 Color
GetColor( sal_uInt16 nNum
) const;
276 friend SvStream
& ReadPptColorSchemeAtom(SvStream
& rIn
, PptColorSchemeAtom
& rAtom
);
279 struct PptFontEntityAtom
282 sal_uInt8 lfClipPrecision
;
285 rtl_TextEncoding eCharSet
;
290 friend SvStream
& ReadPptFontEntityAtom(SvStream
& rIn
, PptFontEntityAtom
& rAtom
);
293 enum class PptViewTypeEnum
: sal_uInt16
307 SlideShowFullScreen
= 12,
311 MasterThumbnails
= 16,
312 PodiumSlideView
= 17,
313 PodiumNotesView
= 18,
316 struct PptUserEditAtom
319 sal_Int32 nLastSlideID
; // ID of last visible slide
320 sal_uInt32 nVersion
; // This is major/minor/build which did the edit
321 sal_uInt32 nOffsetLastEdit
; // File offset of prev PptUserEditAtom
322 sal_uInt32 nOffsetPersistDirectory
; // Offset to PersistPtrs for this file version.
323 sal_uInt32 nDocumentRef
;
324 sal_uInt32 nMaxPersistWritten
; // total number of Persist entries up to this point
325 PptViewTypeEnum eLastViewType
; // enum view type
331 , nOffsetLastEdit( 0 )
332 , nOffsetPersistDirectory( 0 )
334 , nMaxPersistWritten( 0 )
335 , eLastViewType( PptViewTypeEnum::NONE
)
338 friend SvStream
& ReadPptUserEditAtom( SvStream
& rIn
, PptUserEditAtom
& rAtom
);
341 struct PptOEPlaceholderAtom
343 sal_uInt32 nPlacementId
;
344 PptPlaceholder nPlaceholderId
;
345 sal_uInt8 nPlaceholderSize
; // 0=Full size, 1=Half size, 2=Quarter of Slide
348 PptOEPlaceholderAtom() { Clear(); }
351 friend SvStream
& ReadPptOEPlaceholderAtom( SvStream
& rIn
, PptOEPlaceholderAtom
& rAtom
);
354 struct PPTStyleSheet
;
355 struct HeaderFooterEntry
;
356 struct PptSlidePersistEntry
358 PptSlidePersistEntry(const PptSlidePersistEntry
&) = delete;
359 PptSlidePersistEntry
& operator=( const PptSlidePersistEntry
& ) = delete;
361 PptSlidePersistAtom aPersistAtom
;
362 PptSlideAtom aSlideAtom
;
363 PptNotesAtom aNotesAtom
;
364 PptColorSchemeAtom aColorScheme
; // each slide includes this colorscheme atom
365 std::unique_ptr
<PPTStyleSheet
> xStyleSheet
; // stylesheet of this page (only in masterpages), since XP supports more than one masterpage
367 sal_uInt32 HeaderFooterOfs
[ 4 ]; // containing the ofs to the placeholder (only masterpage)
368 std::unique_ptr
<HeaderFooterEntry
> xHeaderFooterEntry
;
369 std::unique_ptr
<SvxMSDffSolverContainer
> xSolverContainer
;
370 sal_uInt32 nSlidePersistStartOffset
;// is an array to the end of the SlidePersistAtom of this page, TextHeaderAtom is following
371 sal_uInt32 nSlidePersistEndOffset
;
372 sal_uInt32 nBackgroundOffset
; // fileoffset
373 sal_uInt32 nDrawingDgId
; // valid, if not -1
374 std::unique_ptr
<sal_uInt32
[]>
375 pPresentationObjects
; // if valid, this is a pointer to an array that includes the offsets to the presentation objects
376 // on this masterpage for each instance (0 - 8);
377 rtl::Reference
<SdrObject
> pBObj
;
379 PptPageKind ePageKind
;
381 bool bNotesMaster
: 1; // for NotesMaster
382 bool bHandoutMaster
: 1; // for HandoutMaster
383 bool bStarDrawFiller
: 1; // special for StarDraw
385 PptSlidePersistEntry();
386 ~PptSlidePersistEntry();
387 sal_uInt32
GetSlideId() const { return aPersistAtom
.nSlideId
; }
390 #define PPTSLIDEPERSIST_ENTRY_NOTFOUND 0xFFFF
392 class MSFILTER_DLLPUBLIC PptSlidePersistList
395 PptSlidePersistList(const PptSlidePersistList
&) = delete;
396 PptSlidePersistList
& operator=( const PptSlidePersistList
& ) = delete;
398 typedef std::vector
<std::unique_ptr
<PptSlidePersistEntry
>> Entries_t
;
402 PptSlidePersistList();
403 ~PptSlidePersistList();
405 size_t size() const { return mvEntries
.size(); }
406 bool is_null( size_t nIdx
) const { return mvEntries
[ nIdx
] == nullptr; }
407 const PptSlidePersistEntry
& operator[](size_t nIdx
) const { return *mvEntries
[ nIdx
]; }
408 PptSlidePersistEntry
& operator[](size_t nIdx
) { return *mvEntries
[ nIdx
]; }
409 Entries_t::iterator
begin() { return mvEntries
.begin(); }
410 void insert( Entries_t::iterator it
,
411 std::unique_ptr
<PptSlidePersistEntry
> pEntry
)
413 mvEntries
.insert(it
, std::move(pEntry
));
415 void push_back(std::unique_ptr
<PptSlidePersistEntry
> pEntry
)
417 mvEntries
.push_back(std::move(pEntry
));
420 sal_uInt16
FindPage( sal_uInt32 nId
) const;
423 class SfxObjectShell
;
426 sal_uInt32 nId
; // OleId
427 sal_uInt32 nRecHdOfs
; // points to the record header: ExObjListHd
428 SfxObjectShell
* pShell
;
429 sal_uInt16 nType
; // maybe PPT_PST_ExEmbed or PPT_PST_ExControl
430 sal_uInt32 nAspect
; // the aspect of the OLE object
432 PPTOleEntry( sal_uInt32 nid
, sal_uInt32 nOfs
, SfxObjectShell
* pSh
, sal_uInt16 nT
, sal_uInt32 nAsp
)
441 struct PptExOleObjAtom
445 sal_uInt32 nPersistPtr
;
449 friend SvStream
& ReadPptExOleObjAtom( SvStream
& rIn
, PptExOleObjAtom
& rAtom
);
452 // SdPage derives from SdrPage, is only known inside sd, and needs to be carried
453 // around as an opaque pointer here:
454 struct SdPageCapsule
{
455 explicit SdPageCapsule(SdrPage
* thePage
): page(thePage
) {}
460 class MSFILTER_DLLPUBLIC SdrEscherImport
: public SvxMSDffManager
464 friend class PPTTextObj
;
465 friend class PPTPortionObj
;
466 friend struct PPTStyleTextPropReader
;
467 friend class ImplSdPPTImport
;
469 PptDocumentAtom aDocAtom
;
470 DffRecordManager aDocRecManager
; // contains all first level container and atoms of the document container
472 ::std::vector
< PPTOleEntry
> aOleObjectList
;
474 std::optional
<std::vector
<PptFontEntityAtom
>> m_xFonts
;
476 sal_uInt32 nStreamLen
;
478 bool ReadString( OUString
& rStr
) const;
479 // only for PowerPoint filter:
480 virtual const PptSlideLayoutAtom
* GetSlideLayoutAtom() const;
483 using SvxMSDffManager::ReadObjText
;
485 PowerPointImportParam
& rImportParam
;
487 SdrEscherImport( PowerPointImportParam
&, const OUString
& rBaseURL
);
488 virtual ~SdrEscherImport() override
;
489 virtual bool GetColorFromPalette( sal_uInt16 nNum
, Color
& rColor
) const override
;
490 virtual bool SeekToShape( SvStream
& rSt
, SvxMSDffClientData
* pClientData
, sal_uInt32 nId
) const override
;
491 const PptFontEntityAtom
* GetFontEnityAtom( sal_uInt32 nNum
) const;
492 void RecolorGraphic( SvStream
& rSt
, sal_uInt32 nRecLen
, Graphic
& rGraph
);
493 virtual SdrObject
* ReadObjText( PPTTextObj
* pTextObj
, SdrObject
* pObj
, SdPageCapsule pPage
) const;
494 virtual rtl::Reference
<SdrObject
> ProcessObj( SvStream
& rSt
, DffObjData
& rData
, SvxMSDffClientData
& rClientData
, tools::Rectangle
& rTextRect
, SdrObject
* pObj
) override
;
495 virtual void ProcessClientAnchor2( SvStream
& rSt
, DffRecordHeader
& rHd
, DffObjData
& rObj
) override
;
496 void ImportHeaderFooterContainer( DffRecordHeader
const & rHeader
, HeaderFooterEntry
& rEntry
);
500 struct MSFILTER_DLLPUBLIC PPTFieldEntry
503 sal_uInt16 nTextRangeEnd
;
504 std::unique_ptr
<SvxFieldItem
> xField1
;
505 std::unique_ptr
<SvxFieldItem
> xField2
;
506 std::optional
<OUString
> xString
;
516 void SetDateTime( sal_uInt32 nType
);
518 // converting PPT date time format:
519 static void GetDateTime(
520 const sal_uInt32 nVal
,
521 SvxDateFormat
& eDateFormat
,
522 SvxTimeFormat
& eTimeFormat
526 struct MSFILTER_DLLPUBLIC HeaderFooterEntry
528 const PptSlidePersistEntry
* pMasterPersist
;
529 OUString pPlaceholder
[ 4 ];
532 sal_uInt32
IsToDisplay( sal_uInt32 nInstance
);
533 sal_uInt32
NeedToImportInstance(
534 const sal_uInt32 nInstance
,
535 const PptSlidePersistEntry
& rSlidePersist
538 explicit HeaderFooterEntry( const PptSlidePersistEntry
* pMaster
= nullptr );
541 struct MSFILTER_DLLPUBLIC ProcessData final
: public SvxMSDffClientData
543 PptSlidePersistEntry
& rPersistEntry
;
545 ::std::vector
< rtl::Reference
<SdrObject
> > aBackgroundColoredObjects
;
546 std::unique_ptr
<sal_uInt32
[]> pTableRowProperties
;
548 ProcessData( PptSlidePersistEntry
& rP
, SdPageCapsule pP
) :
549 rPersistEntry ( rP
),
552 virtual void NotifyFreeObj(SdrObject
* pObj
) override
;
558 class MSFILTER_DLLPUBLIC SdrPowerPointImport
: public SdrEscherImport
562 friend class PPTTextObj
;
563 friend class PPTExtParaProv
;
564 friend struct PPTStyleSheet
;
565 friend class PPTNumberFormatCreator
;
568 PptUserEditAtom m_aUserEditAtom
;
569 PptColorSchemeAtom m_aPageColors
;
570 ::std::vector
< SdHyperlinkEntry
> m_aHyperList
;
571 std::unique_ptr
<sal_uInt32
[]>
573 sal_uInt32 m_nPersistPtrCnt
;
575 const PPTStyleSheet
* m_pPPTStyleSheet
; // this is the current stylesheet;
576 const PPTStyleSheet
* m_pDefaultSheet
; // this is a sheet we are using if no masterpage can be found, but that should
577 // never happen just preventing a crash
578 std::unique_ptr
<PptSlidePersistList
> m_pMasterPages
;
579 std::unique_ptr
<PptSlidePersistList
> m_pSlidePages
;
580 std::unique_ptr
<PptSlidePersistList
> m_pNotePages
;
581 sal_uInt16 m_nCurrentPageNum
;
582 sal_uLong m_nDocStreamPos
;
583 sal_uInt16 m_nPageColorsNum
;
584 PptPageKind m_ePageColorsKind
;
585 PptPageKind m_eCurrentPageKind
;
588 using SdrEscherImport::ReadObjText
;
590 bool SeekToCurrentPage(DffRecordHeader
* pRecHd
) const;
591 bool SeekToDocument(DffRecordHeader
* pRecHd
) const;
592 static bool SeekToContentOfProgTag(
595 const DffRecordHeader
& rProgTagBinaryDataHd
,
596 DffRecordHeader
& rContentHd
598 virtual SdrObject
* ApplyTextObj(
599 PPTTextObj
* pTextObj
,
605 virtual SdrObject
* ReadObjText( PPTTextObj
* pTextObj
, SdrObject
* pObj
, SdPageCapsule pPage
) const override
;
606 // #i32596# - new parameter <_nCalledByGroup>, which
607 // indicates, if the OLE object is imported inside a group object.
608 virtual rtl::Reference
<SdrObject
> ImportOLE(
610 const Graphic
& rGraf
,
611 const tools::Rectangle
& rBoundRect
,
612 const tools::Rectangle
& rVisArea
,
613 const int _nCalledByGroup
615 std::unique_ptr
<SvMemoryStream
> ImportExOleObjStg( sal_uInt32 nPersistPtr
, sal_uInt32
& nOleId
) const;
616 rtl::Reference
<SdrPage
> MakeBlankPage(bool bMaster
) const;
617 bool ReadFontCollection();
618 PptSlidePersistList
* GetPageList(PptPageKind ePageKind
) const;
619 sal_uInt32
GetCurrentPageId();
620 sal_uInt32
GetMasterPageId(sal_uInt16 nPageNum
, PptPageKind ePageKind
) const;
621 sal_uInt32
GetNotesPageId(sal_uInt16 nPageNum
) const;
622 static SdrOutliner
* GetDrawOutliner( SdrTextObj
const * pSdrText
);
623 void SeekOle( SfxObjectShell
* pShell
, sal_uInt32 nFilterOptions
);
625 void ApplyTextAnchorAttributes( PPTTextObj
const & rTextObj
, SfxItemSet
& rSet
) const;
626 bool IsVerticalText() const;
629 SdrPowerPointImport( PowerPointImportParam
&, const OUString
& rBaseURL
);
630 virtual ~SdrPowerPointImport() override
;
631 sal_uInt16
GetPageCount( PptPageKind eKind
= PPT_SLIDEPAGE
) const;
632 void SetPageNum( sal_uInt16 nPageNum
, PptPageKind
= PPT_SLIDEPAGE
);
633 Size
GetPageSize() const;
634 rtl::Reference
<SdrObject
> ImportPageBackgroundObject(
635 const SdrPage
& rPage
,
636 sal_uInt32
& nBgFileOffset
638 bool IsNoteOrHandout( sal_uInt16 nPageNum
) const;
641 PptPageKind ePageKind
= PPT_SLIDEPAGE
643 sal_uInt16
GetMasterPageIndex(
645 PptPageKind ePageKind
= PPT_SLIDEPAGE
648 void ImportPage( SdrPage
* pPage
, const PptSlidePersistEntry
* pMasterPersist
);
649 virtual bool GetColorFromPalette(sal_uInt16 nNum
, Color
& rColor
) const override
;
650 virtual bool SeekToShape( SvStream
& rSt
, SvxMSDffClientData
* pClientData
, sal_uInt32 nId
) const override
;
651 virtual const PptSlideLayoutAtom
* GetSlideLayoutAtom() const override
;
652 rtl::Reference
<SdrObject
> CreateTable(
653 SdrObject
* pGroupObject
,
654 const sal_uInt32
* pTableArry
,
655 SvxMSDffSolverContainer
* pSolverContainer
657 virtual bool ReadFormControl( tools::SvRef
<SotStorage
>& rSrc1
, css::uno::Reference
< css::form::XFormComponent
> & rFormComp
) const = 0;
660 struct PPTTextParagraphStyleAtomInterpreter
663 bool bForbiddenRules
;
664 bool bHangingPunctuation
;
667 PPTTextParagraphStyleAtomInterpreter();
669 bool Read( SvStream
& rIn
, const DffRecordHeader
& rRecHd
);
672 struct PPTTextSpecInfo
675 LanguageType nLanguage
[ 3 ];
676 sal_uInt16 nDontKnow
;
678 explicit PPTTextSpecInfo( sal_uInt32 nCharIdx
);
681 struct PPTTextSpecInfoAtomInterpreter
684 ::std::vector
< PPTTextSpecInfo
> aList
;
686 PPTTextSpecInfoAtomInterpreter();
687 ~PPTTextSpecInfoAtomInterpreter();
691 const DffRecordHeader
& rRecHd
,
692 sal_uInt16 nRecordType
,
693 const PPTTextSpecInfo
* pTextSpecDefault
= nullptr
698 #define PPT_STYLESHEETENTRIES 9
700 struct PPTExtParaLevel
702 sal_uInt32 mnExtParagraphMask
;
705 sal_uInt32 mnAnmScheme
;
706 sal_uInt32 mpfPP10Ext
;
707 sal_uInt32 mnExtCharacterMask
;
708 sal_uInt32 mcfPP10Ext
;
712 friend SvStream
& ReadPPTExtParaLevel( SvStream
& rIn
, PPTExtParaLevel
& rL
);
715 struct PPTExtParaSheet
717 PPTExtParaLevel aExtParaLevel
[nMaxPPTLevels
];
722 sal_uInt32 nInstance
;
725 PPTBuGraEntry( Graphic aGraphic
, sal_uInt32 nInstance
);
730 ::std::vector
< std::unique_ptr
<PPTBuGraEntry
> > aBuGraList
;
734 DffRecordManager aExtendedPresRules
;
736 o3tl::enumarray
<TSS_Type
, PPTExtParaSheet
> aExtParaSheet
;
738 bool GetGraphic( sal_uInt32 nInstance
, Graphic
& rGraphic
) const;
741 SdrPowerPointImport
& rManager
,
743 const DffRecordHeader
* pMainMasterHd
750 Color mnFontColorInStyleSheet
;
751 sal_uInt32 mnFontColor
;
754 sal_uInt16 mnAsianOrComplexFont
;
755 sal_uInt16 mnFontHeight
;
756 sal_uInt16 mnEscapement
;
761 PPTCharLevel maCharLevel
[nMaxPPTLevels
];
763 explicit PPTCharSheet( TSS_Type nInstance
);
765 void Read( SvStream
& rIn
, sal_uInt32 nLevel
);
770 sal_uInt16 mnBuFlags
;
771 sal_uInt16 mnBulletChar
;
772 sal_uInt16 mnBulletFont
;
773 sal_uInt16 mnBulletHeight
;
774 sal_uInt32 mnBulletColor
;
777 sal_uInt16 mnLineFeed
;
778 sal_uInt16 mnUpperDist
;
779 sal_uInt16 mnLowerDist
;
780 sal_uInt16 mnTextOfs
;
781 sal_uInt16 mnBulletOfs
;
782 sal_uInt16 mnDefaultTab
;
783 sal_uInt16 mnAsianLineBreak
; // bit0: use asian rules for first and last character
784 // 1: do not wrap latin text in the middle of the word
785 // 2: allow hanging punctuation
793 PPTParaLevel maParaLevel
[nMaxPPTLevels
];
795 explicit PPTParaSheet( TSS_Type nInstance
);
798 SdrPowerPointImport
const & rMan
,
803 void UpdateBulletRelSize( sal_uInt32 nLevel
, sal_uInt16 nFontHeight
);
806 class PPTParagraphObj
;
807 class PPTNumberFormatCreator
809 sal_uInt32 nIsBullet
;
810 sal_uInt32 nBulletChar
;
811 sal_uInt32 nBulletFont
;
812 sal_uInt32 nBulletHeight
;
813 sal_uInt32 nBulletColor
;
815 sal_uInt32 nBulletOfs
;
817 void ImplGetNumberFormat(
818 SdrPowerPointImport
const & rMan
,
819 SvxNumberFormat
& rNumberFormat
821 bool ImplGetExtNumberFormat(
822 SdrPowerPointImport
const & rMan
,
823 SvxNumberFormat
& rNumberFormat
,
826 TSS_Type nInstanceInSheet
,
827 std::optional
< sal_Int16
>& rStartNumbering
,
828 sal_uInt32 nFontHeight
,
829 PPTParagraphObj
const * pPara
834 PPTNumberFormatCreator( std::unique_ptr
<PPTExtParaProv
> );
835 ~PPTNumberFormatCreator();
839 std::unique_ptr
<PPTExtParaProv
> pExtParaProv
;
841 void GetNumberFormat(
842 SdrPowerPointImport
const & rMan
,
843 SvxNumberFormat
& rNumberFormat
,
845 const PPTParaLevel
& rParaLevel
,
846 const PPTCharLevel
& rCharLevel
,
850 bool GetNumberFormat(
851 SdrPowerPointImport
const & rMan
,
852 SvxNumberFormat
& rNumberFormat
,
853 PPTParagraphObj
* pPara
,
854 TSS_Type nInstanceInSheet
,
855 std::optional
< sal_Int16
>& rStartNumbering
859 class SvxNumBulletItem
;
860 struct PPTStyleSheet
: public PPTNumberFormatCreator
862 PPTTextSpecInfo maTxSI
;
863 o3tl::enumarray
<TSS_Type
, std::unique_ptr
<PPTCharSheet
>> mpCharSheet
;
864 o3tl::enumarray
<TSS_Type
, std::unique_ptr
<PPTParaSheet
>> mpParaSheet
;
865 o3tl::enumarray
<TSS_Type
, std::unique_ptr
<SvxNumBulletItem
>> mpNumBulletItem
;
868 const DffRecordHeader
& rSlideHd
,
869 SvStream
& rSt
, SdrPowerPointImport
&,
870 const PPTTextParagraphStyleAtomInterpreter
&,
871 const PPTTextSpecInfo
&
876 struct ImplPPTParaPropSet final
: public salhelper::SimpleReferenceObject
879 sal_uInt32 mnAttrSet
;
880 sal_uInt32 mnBulletColor
;
881 sal_uInt16 mpArry
[ 22 ];
883 sal_uInt32 mnExtParagraphMask
;
884 sal_uInt32 mnAnmScheme
;
888 sal_uInt32 nDontKnow1
;
889 sal_uInt32 nDontKnow2
;
890 sal_uInt16 nDontKnow2bit06
;
896 , mnExtParagraphMask( 0 )
902 , nDontKnow2bit06( 0 )
906 struct PPTParaPropSet
908 sal_uInt32 mnOriginalTextPos
;
909 rtl::Reference
<ImplPPTParaPropSet
> mxParaSet
;
912 PPTParaPropSet( PPTParaPropSet
const & rParaPropSet
);
915 PPTParaPropSet
& operator=( const PPTParaPropSet
& rParaPropSet
);
918 struct ImplPPTCharPropSet
920 sal_uInt32 mnAttrSet
;
924 sal_uInt16 mnAsianOrComplexFont
;
925 sal_uInt16 mnANSITypeface
;
926 sal_uInt16 mnFontHeight
;
927 sal_uInt16 mnEscapement
;
928 sal_uInt16 mnSymbolFont
;
935 , mnAsianOrComplexFont( 0 )
936 , mnANSITypeface( 0 )
943 struct PPTCharPropSet
945 //when the bullet text has more than two color,next the text following with bullet has been set hyperlink.
946 //now,the bullet color should be set original hyperlink text's color
947 //so "mbHardHylinkOrigColor" hold the original hyperlink text's color.
948 sal_uInt32 mnHylinkOrigColor
;
949 //the bullet text whether has a hyperlink.
951 //the hyperlink text whether has a custom color.
952 bool mbHardHylinkOrigColor
;
954 sal_uInt32 mnOriginalTextPos
;
955 sal_uInt32 mnParagraph
;
957 std::unique_ptr
<SvxFieldItem
>
959 LanguageType mnLanguage
[ 3 ];
961 void SetFont( sal_uInt16 nFont
);
962 void SetColor( sal_uInt32 nColor
);
964 explicit PPTCharPropSet( sal_uInt32 nParagraph
);
965 PPTCharPropSet( const PPTCharPropSet
& rCharPropSet
);
966 PPTCharPropSet( const PPTCharPropSet
& rCharPropSet
, sal_uInt32 nParagraph
);
969 PPTCharPropSet
& operator=( const PPTCharPropSet
& rCharPropSet
);
971 friend class PPTTextObj
;
972 friend class PPTParagraphObj
;
973 friend class PPTPortionObj
;
974 friend struct PPTStyleTextPropReader
;
977 o3tl::cow_wrapper
< ImplPPTCharPropSet
> mpImplPPTCharPropSet
;
986 struct PPTRuler final
: public salhelper::SimpleReferenceObject
989 sal_uInt16 nDefaultTab
;
990 sal_uInt16 nTextOfs
[nMaxPPTLevels
] = {};
991 sal_uInt16 nBulletOfs
[nMaxPPTLevels
] = {};
992 std::unique_ptr
<PPTTabEntry
[]>
994 sal_uInt16 nTabCount
;
997 virtual ~PPTRuler() override
;
1000 struct PPTTextRulerInterpreter
1003 rtl::Reference
<PPTRuler
> mxImplRuler
;
1005 PPTTextRulerInterpreter();
1006 PPTTextRulerInterpreter( PPTTextRulerInterpreter
const & rRuler
);
1007 PPTTextRulerInterpreter(
1008 sal_uInt32 nFileOfs
,
1009 DffRecordHeader
const & rHd
,
1012 ~PPTTextRulerInterpreter();
1014 sal_uInt16
GetTabOffsetByIndex( sal_uInt16 nIndex
) const
1015 { return mxImplRuler
->pTab
[ nIndex
].nOffset
; };
1017 sal_uInt16
GetTabStyleByIndex( sal_uInt16 nIndex
) const
1018 { return mxImplRuler
->pTab
[ nIndex
].nStyle
; };
1020 sal_uInt16
GetTabCount() const { return mxImplRuler
->nTabCount
; };
1021 bool GetDefaultTab( sal_uInt16
& nValue
) const;
1022 bool GetTextOfs( sal_uInt32 nLevel
, sal_uInt16
& nValue
) const;
1023 bool GetBulletOfs( sal_uInt32 nLevel
, sal_uInt16
& nValue
) const;
1025 PPTTextRulerInterpreter
& operator=( const PPTTextRulerInterpreter
& rRuler
);
1028 #define PPT_SPEC_NEWLINE 0x10000
1029 #define PPT_SPEC_SYMBOL 0x20000
1031 struct StyleTextProp9
1033 sal_uInt32 mnExtParagraphMask
;
1034 sal_uInt16 mnBuBlip
;
1035 sal_uInt16 mnHasAnm
;
1036 sal_uInt32 mnAnmScheme
;
1037 sal_uInt32 mpfPP10Ext
;
1038 sal_uInt32 mnExtCharacterMask
;
1039 sal_uInt32 mncfPP10Ext
;
1040 sal_uInt32 mnSpecialInfoMask
;
1041 sal_uInt32 mnPP10Ext
;
1045 : mnExtParagraphMask( 0 )
1050 , mnExtCharacterMask( 0 )
1052 , mnSpecialInfoMask( 0 )
1057 void Read( SvStream
& rSt
);
1060 struct PPTStyleTextPropReader
1062 std::vector
< sal_uInt32
> aSpecMarkerList
; // hiword -> Flags, loword -> Position
1063 std::vector
<std::unique_ptr
<PPTParaPropSet
>> aParaPropList
;
1064 std::vector
<std::unique_ptr
<PPTCharPropSet
>> aCharPropList
;
1066 PPTStyleTextPropReader(
1068 const DffRecordHeader
& rClientTextBoxHd
,
1069 PPTTextRulerInterpreter
const & rInterpreter
,
1070 const DffRecordHeader
& rExtParaHd
,
1071 TSS_Type nTextInstance
1073 ~PPTStyleTextPropReader();
1077 const DffRecordHeader
& rClientTextBoxHd
,
1078 PPTTextRulerInterpreter
const & rInterpreter
,
1079 const DffRecordHeader
& rExtParaHd
,
1080 TSS_Type nTextInstance
1084 const DffRecordHeader
& rTextHeader
,
1085 const OUString
& aString
,
1086 PPTTextRulerInterpreter
const & rRuler
,
1087 sal_uInt32
& nCharCount
,
1090 static void ReadCharProps(
1092 PPTCharPropSet
& aCharPropSet
,
1093 std::u16string_view aString
,
1094 sal_uInt32
& nCharCount
,
1095 sal_uInt32 nCharReadCnt
,
1096 bool& bTextPropAtom
,
1097 sal_uInt32 nExtParaPos
,
1098 const std::vector
< StyleTextProp9
>& aStyleTextProp9
,
1099 sal_uInt32
& nExtParaFlags
,
1100 sal_uInt16
& nBuBlip
,
1101 sal_uInt16
& nHasAnm
,
1102 sal_uInt32
& nAnmScheme
1106 class MSFILTER_DLLPUBLIC PPTPortionObj
: public PPTCharPropSet
1109 friend class PPTParagraphObj
;
1111 const PPTStyleSheet
& mrStyleSheet
;
1112 TSS_Type mnInstance
;
1117 bool GetAttrib( sal_uInt32 nAttr
, sal_uInt32
& nVal
, TSS_Type nInstanceInSheet
) const;
1118 SvxFieldItem
* GetTextField();
1120 PPTPortionObj( const PPTStyleSheet
&, TSS_Type nInstance
, sal_uInt32 nDepth
);
1122 const PPTCharPropSet
&,
1123 const PPTStyleSheet
&,
1127 PPTPortionObj( const PPTPortionObj
& );
1130 // the following function should be removed during next full update
1133 SdrPowerPointImport
& rManager
,
1134 TSS_Type nInstanceInSheet
1138 SdrPowerPointImport
& rManager
,
1139 TSS_Type nInstanceInSheet
,
1140 const PPTTextObj
* pTextObj
1142 sal_uInt32
Count() const { return mpFieldItem
? 1 : maString
.getLength(); };
1145 class MSFILTER_DLLPUBLIC PPTParagraphObj
1146 : public PPTParaPropSet
,
1147 public PPTNumberFormatCreator
,
1148 public PPTTextRulerInterpreter
1150 friend class PPTTextObj
;
1151 friend class PPTNumberFormatCreator
;
1153 const PPTStyleSheet
& mrStyleSheet
;
1154 TSS_Type mnInstance
;
1156 PPTParagraphObj(PPTParagraphObj
const&) = delete;
1157 void operator=(PPTParagraphObj
const&) = delete;
1159 sal_uInt32 mnCurrentObject
;
1160 ::std::vector
<std::unique_ptr
<PPTPortionObj
>> m_PortionList
;
1163 void UpdateBulletRelSize( sal_uInt32
& nBulletRelSize
) const;
1164 bool GetAttrib( sal_uInt32 nAttr
, sal_uInt32
& nVal
, TSS_Type nInstanceInSheet
);
1167 const PPTStyleSheet
&,
1172 PPTStyleTextPropReader
&,
1174 size_t& rnCurCharPos
,
1175 const PPTStyleSheet
&,
1177 PPTTextRulerInterpreter
const & rRuler
1181 sal_uInt32
GetTextSize();
1182 PPTPortionObj
* First();
1183 PPTPortionObj
* Next();
1185 void AppendPortion( PPTPortionObj
& rPortion
);
1188 std::optional
< sal_Int16
>& rStartNumbering
,
1189 SdrPowerPointImport
const & rManager
,
1190 TSS_Type nInstanceInSheet
1194 #define PPT_TEXTOBJ_FLAGS_PARA_ALIGNMENT_USED_LEFT 1
1195 #define PPT_TEXTOBJ_FLAGS_PARA_ALIGNMENT_USED_CENTER 2
1196 #define PPT_TEXTOBJ_FLAGS_PARA_ALIGNMENT_USED_RIGHT 4
1197 #define PPT_TEXTOBJ_FLAGS_PARA_ALIGNMENT_USED_BLOCK 8
1198 #define PPT_TEXTOBJ_FLAGS_VERTICAL 16
1200 struct ImplPPTTextObj final
: public salhelper::SimpleReferenceObject
1202 sal_uInt32 mnShapeId
;
1203 sal_uInt32 mnShapeMaster
;
1204 std::optional
<PptOEPlaceholderAtom
> moPlaceHolderAtom
;
1205 TSS_Type mnInstance
;
1206 TSS_Type mnDestinationInstance
;
1207 MSO_SPT meShapeType
;
1209 sal_uInt32 mnCurrentObject
;
1210 sal_uInt32 mnParagraphCount
;
1211 std::vector
<std::unique_ptr
<PPTParagraphObj
>>
1213 PptSlidePersistEntry
& mrPersistEntry
;
1215 sal_uInt32 mnTextFlags
;
1217 explicit ImplPPTTextObj( PptSlidePersistEntry
& rPersistEntry
)
1220 , mnInstance(TSS_Type::PageTitle
)
1221 , mnDestinationInstance(TSS_Type::PageTitle
)
1222 , meShapeType(mso_sptMin
)
1223 , mnCurrentObject(0)
1224 , mnParagraphCount(0)
1225 , mrPersistEntry ( rPersistEntry
)
1226 , mnTextFlags(0) {};
1229 class MSFILTER_DLLPUBLIC PPTTextObj
1231 rtl::Reference
<ImplPPTTextObj
> mxImplTextObj
;
1236 SdrPowerPointImport
&,
1237 PptSlidePersistEntry
&,
1240 PPTTextObj( PPTTextObj
const & rTextObj
);
1243 sal_uInt32
GetCurrentIndex() const { return mxImplTextObj
->mnCurrentObject
; };
1244 sal_uInt32
Count() const { return mxImplTextObj
->mnParagraphCount
; };
1245 PPTParagraphObj
* First();
1246 PPTParagraphObj
* Next();
1247 MSO_SPT
GetShapeType() const { return mxImplTextObj
->meShapeType
; };
1248 TSS_Type
GetInstance() const { return mxImplTextObj
->mnInstance
; };
1249 void SetInstance( TSS_Type nInstance
)
1250 { mxImplTextObj
->mnInstance
= nInstance
; }
1252 TSS_Type
GetDestinationInstance() const
1253 { return mxImplTextObj
->mnDestinationInstance
; }
1255 void SetDestinationInstance( TSS_Type nInstance
)
1256 { mxImplTextObj
->mnDestinationInstance
= nInstance
; }
1258 const std::optional
<PptOEPlaceholderAtom
> & GetOEPlaceHolderAtom() const { return mxImplTextObj
->moPlaceHolderAtom
; }
1259 sal_uInt32
GetTextFlags() const { return mxImplTextObj
->mnTextFlags
; }
1260 void SetVertical( bool bVertical
)
1263 mxImplTextObj
->mnTextFlags
|= PPT_TEXTOBJ_FLAGS_VERTICAL
;
1265 mxImplTextObj
->mnTextFlags
&= ~PPT_TEXTOBJ_FLAGS_VERTICAL
;
1267 bool GetVertical() const
1268 { return ( mxImplTextObj
->mnTextFlags
& PPT_TEXTOBJ_FLAGS_VERTICAL
) != 0; }
1270 const SfxItemSet
* GetBackground() const;
1272 PPTTextObj
& operator=( const PPTTextObj
& rTextObj
);
1275 class PPTConvertOCXControls final
: public SvxMSConvertOCXControls
1277 virtual void GetDrawPage() override
;
1278 PptPageKind ePageKind
;
1279 const SdrPowerPointImport
* mpPPTImporter
;
1282 PPTConvertOCXControls( const SdrPowerPointImport
* pPPTImporter
, const css::uno::Reference
< css::frame::XModel
>& rxModel
, PptPageKind ePKind
) :
1283 SvxMSConvertOCXControls ( rxModel
),
1284 ePageKind ( ePKind
),
1285 mpPPTImporter ( pPPTImporter
)
1287 bool ReadOCXStream( tools::SvRef
<SotStorage
>& rSrc1
,
1288 css::uno::Reference
<css::drawing::XShape
> *pShapeRef
);
1289 virtual bool InsertControl(
1290 const css::uno::Reference
< css::form::XFormComponent
> &rFComp
,
1291 const css::awt::Size
& rSize
,
1292 css::uno::Reference
< css::drawing::XShape
> *pShape
,
1297 // PowerPoint record types
1298 #define PPT_PST_Document 1000
1299 #define PPT_PST_DocumentAtom 1001
1300 #define PPT_PST_SlideAtom 1007
1301 #define PPT_PST_NotesAtom 1009
1302 #define PPT_PST_Environment 1010
1303 #define PPT_PST_SlidePersistAtom 1011
1304 #define PPT_PST_SSSlideInfoAtom 1017
1305 #define PPT_PST_VBAInfo 1023
1306 #define PPT_PST_VBAInfoAtom 1024
1307 #define PPT_PST_SSDocInfoAtom 1025
1308 #define PPT_PST_ExObjList 1033
1309 #define PPT_PST_PPDrawingGroup 1035
1310 #define PPT_PST_PPDrawing 1036
1311 #define PPT_PST_GridSpacing10Atom 1037
1312 #define PPT_PST_NamedShows 1040
1313 #define PPT_PST_NamedShow 1041
1314 #define PPT_PST_NamedShowSlides 1042
1315 #define PPT_PST_List 2000
1316 #define PPT_PST_FontCollection 2005
1317 #define PPT_PST_SoundCollection 2020
1318 #define PPT_PST_Sound 2022
1319 #define PPT_PST_SoundData 2023
1320 #define PPT_PST_ColorSchemeAtom 2032
1322 // these atoms first was seen in ppt2000 in a private Tag atom
1323 #define PPT_PST_ExtendedBuGraContainer 2040 // consist of 4041
1324 #define PPT_PST_ExtendedBuGraAtom 2041 // the instance of this atom indices the current graphic
1326 #define PPT_PST_ExObjRefAtom 3009
1327 #define PPT_PST_OEPlaceholderAtom 3011
1328 #define PPT_PST_OutlineTextRefAtom 3998
1329 #define PPT_PST_TextHeaderAtom 3999
1330 #define PPT_PST_TextCharsAtom 4000
1331 #define PPT_PST_StyleTextPropAtom 4001
1332 #define PPT_PST_TxMasterStyleAtom 4003
1333 #define PPT_PST_TxPFStyleAtom 4005
1334 #define PPT_PST_TextRulerAtom 4006
1335 #define PPT_PST_TextBytesAtom 4008
1336 #define PPT_PST_TxSIStyleAtom 4009
1337 #define PPT_PST_TextSpecInfoAtom 4010
1339 // these atoms first was seen in ppt2000 in a private Tag atom
1340 #define PPT_PST_ExtendedParagraphAtom 4012
1341 #define PPT_PST_ExtendedParagraphMasterAtom 4013
1342 #define PPT_PST_ExtendedPresRuleContainer 4014 // consist of 4012, 4015,
1343 #define PPT_PST_ExtendedParagraphHeaderAtom 4015 // the instance of this atom indices the current presobj
1344 // the first sal_uInt32 in this atom indices the current slideId
1345 #define PPT_PST_TextDefaults9Atom 4016
1347 #define PPT_PST_FontEntityAtom 4023
1348 #define PPT_PST_CString 4026
1349 #define PPT_PST_ExOleObjAtom 4035
1350 #define PPT_PST_SrKinsoku 4040
1351 #define PPT_PST_ExEmbed 4044
1352 #define PPT_PST_ExHyperlinkAtom 4051
1353 #define PPT_PST_ExHyperlink 4055
1354 #define PPT_PST_SlideNumberMCAtom 4056
1355 #define PPT_PST_HeadersFooters 4057
1356 #define PPT_PST_HeadersFootersAtom 4058
1357 #define PPT_PST_TxInteractiveInfoAtom 4063
1358 #define PPT_PST_MasterText 4068
1359 #define PPT_PST_RecolorInfoAtom 4071
1360 #define PPT_PST_ExControl 4078
1361 #define PPT_PST_SlideListWithText 4080
1362 #define PPT_PST_AnimationInfoAtom 4081
1363 #define PPT_PST_InteractiveInfo 4082
1364 #define PPT_PST_InteractiveInfoAtom 4083
1365 #define PPT_PST_UserEditAtom 4085
1366 #define PPT_PST_CurrentUserAtom 4086
1367 #define PPT_PST_DateTimeMCAtom 4087
1368 #define PPT_PST_GenericDateMCAtom 4088
1369 #define PPT_PST_HeaderMCAtom 4089
1370 #define PPT_PST_FooterMCAtom 4090
1371 #define PPT_PST_ExMediaAtom 4100
1372 #define PPT_PST_ExVideo 4101
1373 #define PPT_PST_ExAviMovie 4102
1374 #define PPT_PST_ExMCIMovie 4103
1375 #define PPT_PST_AnimationInfo 4116
1376 #define PPT_PST_RTFDateTimeMCAtom 4117
1377 #define PPT_PST_ProgTags 5000
1378 #define PPT_PST_ProgBinaryTag 5002
1379 #define PPT_PST_BinaryTagData 5003
1380 #define PPT_PST_PersistPtrIncrementalBlock 6002
1382 // these atoms first was seen in ppt2000 in a private Tag atom
1383 #define PPT_PST_PresentationAdvisorFlags9Atom 6010
1384 #define PPT_PST_HtmlDocInfo9Atom 6011
1387 #define PPT_PST_HashCodeAtom 11008
1388 #define PPT_PST_BuildList 11010
1389 #define PPT_PST_Comment10 12000
1390 #define PPT_PST_CommentAtom10 12001
1391 #define PPT_PST_CommentIndex10 12004
1392 #define PPT_PST_SlideFlags10Atom 12010
1393 #define PPT_PST_SlideTime10Atom 12011
1394 #define PPT_PST_DocToolbarStates10Atom 14001
1396 // attributes for PptTextStyleSheet
1397 #define PPT_ParaAttr_BulletOn 0 //00000001
1398 #define PPT_ParaAttr_BuHardFont 1 //00000002
1399 #define PPT_ParaAttr_BuHardColor 2 //00000004
1400 #define PPT_ParaAttr_BuHardHeight 3 //00000008
1401 #define PPT_ParaAttr_BulletFont 4 //00000010
1402 #define PPT_ParaAttr_BulletColor 5 //00000020
1403 #define PPT_ParaAttr_BulletHeight 6 //00000040
1404 #define PPT_ParaAttr_BulletChar 7 //00000080
1405 #define PPT_ParaAttr_Adjust 11 //00000800 0000=Left, 0001=Center, 0002=Right, 0003=Block
1406 #define PPT_ParaAttr_LineFeed 12 //00001000
1407 #define PPT_ParaAttr_UpperDist 13 //00002000 is set to 0032 for TextFrames by default
1408 #define PPT_ParaAttr_LowerDist 14 //00004000
1409 #define PPT_ParaAttr_TextOfs 15 //00008000
1410 #define PPT_ParaAttr_BulletOfs 16 //00010000
1411 #define PPT_ParaAttr_DefaultTab 17 //00020000
1412 #define PPT_ParaAttr_AsianLB_1 18
1413 #define PPT_ParaAttr_AsianLB_2 19
1414 #define PPT_ParaAttr_AsianLB_3 20
1415 #define PPT_ParaAttr_BiDi 21 //00200000
1417 #define PPT_CharAttr_Bold 0 //00000001
1418 #define PPT_CharAttr_Italic 1 //00000002
1419 #define PPT_CharAttr_Underline 2 //00000004
1420 #define PPT_CharAttr_Shadow 4 //00000010
1421 #define PPT_CharAttr_Strikeout 8 //00000100
1422 #define PPT_CharAttr_Embossed 9 //00000200
1423 #define PPT_CharAttr_Font 16 //00010000
1424 #define PPT_CharAttr_AsianOrComplexFont 21 //00200000
1425 #define PPT_CharAttr_ANSITypeface 22 //00400000
1426 #define PPT_CharAttr_Symbol 23 //00800000
1427 #define PPT_CharAttr_FontHeight 17 //00020000
1428 #define PPT_CharAttr_FontColor 18 //00040000
1429 #define PPT_CharAttr_Escapement 19 //00080000
1431 // values for PptSlideLayoutAtom.eLayout
1432 enum class PptSlideLayout
1434 TITLESLIDE
= 0, // The slide is a title slide
1435 TITLEANDBODYSLIDE
= 1, // Title and body slide
1436 TITLEMASTERSLIDE
= 2, // Title master slide
1437 MASTERSLIDE
= 3, // Master slide layout
1438 MASTERNOTES
= 4, // Master notes layout
1439 NOTESTITLEBODY
= 5, // Notes title/body layout
1440 HANDOUTLAYOUT
= 6, // Handout layout, therefore it doesn't have placeholders except header, footer, and date
1441 ONLYTITLE
= 7, // Only title placeholder
1442 TWOCOLUMNSANDTITLE
= 8, // Body of the slide has 2 columns and a title
1443 TWOROWSANDTITLE
= 9, // Slide's body has 2 rows and a title
1444 RIGHTCOLUMN2ROWS
= 10, // Body contains 2 columns, right column has 2 rows
1445 LEFTCOLUMN2ROWS
= 11, // Body contains 2 columns, left column has 2 rows
1446 BOTTOMROW2COLUMNS
= 12, // Body contains 2 rows, bottom row has 2 columns
1447 TOPROW2COLUMN
= 13, // Body contains 2 rows, top row has 2 columns
1448 FOUROBJECTS
= 14, // 4 objects
1449 BIGOBJECT
= 15, // Big object
1450 BLANKSLIDE
= 16, // Blank slide
1451 TITLERIGHTBODYLEFT
= 17, // Vertical title on the right, body on the left
1452 TITLERIGHT2BODIESLEFT
= 18 // Vertical title on the right, body on the left split into 2 rows
1455 // the following table describes the placeholder id's (values from reality followed by values taken from the documentation)
1456 enum class PptPlaceholder
: sal_uInt8
1459 MASTERTITLE
= 1, // 1 Master title
1460 MASTERBODY
= 2, // 2 Master body
1461 MASTERCENTEREDTITLE
= 3, // 3 Master centered title
1462 MASTERSUBTITLE
= 4, // 10 Master subtitle
1463 MASTERNOTESSLIDEIMAGE
= 5, // 4 Master notes slide image
1464 MASTERNOTESBODYIMAGE
= 6, // 5 Master notes body image
1465 MASTERDATE
= 7, // 6 Master date
1466 MASTERSLIDENUMBER
= 8, // 7 Master slide number
1467 MASTERFOOTER
= 9, // 8 Master footer
1468 MASTERHEADER
= 10, // 9 Master header
1469 // 11 Generic text object
1470 TITLE
= 13, // 12 Title
1471 BODY
= 14, // 13 Body
1472 NOTESBODY
= 12, // 14 Notes body
1473 CENTEREDTITLE
= 15, // 15 Centered title
1474 SUBTITLE
= 16, // 16 Subtitle
1475 VERTICALTEXTTITLE
= 17, // 17 Vertical text title
1476 VERTICALTEXTBODY
= 18, // 18 Vertical text body
1477 NOTESSLIDEIMAGE
= 11, // 19 Notes slide image
1478 OBJECT
= 19, // 20 Object (no matter the size)
1479 GRAPH
= 20, // 21 Graph
1480 TABLE
= 21, // 22 Table
1481 CLIPART
= 22, // 23 Clip Art
1482 ORGANISZATIONCHART
= 23, // 24 Organization Chart
1483 MEDIACLIP
= 24 // 25 Media Clip
1486 #endif // INCLUDED_FILTER_MSFILTER_SVDFPPT_HXX
1488 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */