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 <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
; }
67 class SvxNumberFormat
;
69 enum class PptSlideLayout
;
70 enum class PptPlaceholder
: sal_uInt8
;
72 #define PPT_IMPORTFLAGS_NO_TEXT_ASSERT 1
74 struct MSFILTER_DLLPUBLIC PptCurrentUserAtom
77 sal_uInt32 nCurrentUserEdit
;
78 sal_uInt16 nDocFileVersion
;
79 sal_uInt8 nMajorVersion
;
80 sal_uInt8 nMinorVersion
;
81 OUString aCurrentUser
;
85 PptCurrentUserAtom() : nMagic ( 0 ),
86 nCurrentUserEdit ( 0 ),
87 nDocFileVersion ( 0 ),
89 nMinorVersion ( 0 ) {}
91 MSFILTER_DLLPUBLIC
friend SvStream
& ReadPptCurrentUserAtom( SvStream
& rIn
, PptCurrentUserAtom
& rAtom
);
94 struct MSFILTER_DLLPUBLIC PowerPointImportParam
97 sal_uInt32 nImportFlags
;
98 PptCurrentUserAtom aCurrentUserAtom
;
100 PowerPointImportParam( SvStream
& rDocStream
);
103 struct SdHyperlinkEntry
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
;
125 sal_uInt8 nHyperlinkType
;
127 // unknown, because total size is 16
134 MSFILTER_DLLPUBLIC
friend bool ReadPptInteractiveInfoAtom( SvStream
& rIn
, PptInteractiveInfoAtom
& rAtom
);
137 enum PptPageKind
{ PPT_MASTERPAGE
, PPT_SLIDEPAGE
, PPT_NOTEPAGE
};
141 PPTPF_USLETTER
, // 8.5x11"
142 PPTPF_A4
, // 210x297mm
143 PPTPF_35MMDIA
, // DIA
148 // values for PPT_PST_TextHeaderAtom's sal_uLong
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 {
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;
195 : nNotesMasterPersist(0)
196 , nHandoutMasterPersist(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 ];
218 PptSlideLayoutAtom() { Clear(); }
221 // SlideLayoutAtom is read without header!
222 friend SvStream
& ReadPptSlideLayoutAtom( SvStream
& rIn
, PptSlideLayoutAtom
& rAtom
);
227 PptSlideLayoutAtom aLayout
;
228 sal_uInt32 nMasterId
;
233 PptSlideAtom() { Clear(); }
236 friend SvStream
& ReadPptSlideAtom(SvStream
& rIn
, PptSlideAtom
& rAtom
);
239 struct PptSlidePersistAtom
241 sal_uInt32 nPsrReference
;
243 sal_uInt32 nNumberTexts
;
245 sal_uInt32 nReserved
; // we will use nReserved temporarily to set the offset to SSSlideInfoAtom ( if possible )
248 PptSlidePersistAtom() { Clear(); }
251 friend SvStream
& ReadPptSlidePersistAtom(SvStream
& rIn
, PptSlidePersistAtom
& rAtom
);
260 PptNotesAtom() { Clear(); }
263 friend SvStream
& ReadPptNotesAtom(SvStream
& rIn
, PptNotesAtom
& rAtom
);
266 struct PptColorSchemeAtom
268 sal_uInt8 aData
[32] = {};
271 PptColorSchemeAtom();
272 Color
GetColor( sal_uInt16 nNum
) const;
274 friend SvStream
& ReadPptColorSchemeAtom(SvStream
& rIn
, PptColorSchemeAtom
& rAtom
);
277 struct PptFontEntityAtom
280 sal_uInt8 lfClipPrecision
;
283 rtl_TextEncoding eCharSet
;
288 friend SvStream
& ReadPptFontEntityAtom(SvStream
& rIn
, PptFontEntityAtom
& rAtom
);
291 enum class PptViewTypeEnum
: sal_uInt16
305 SlideShowFullScreen
= 12,
309 MasterThumbnails
= 16,
310 PodiumSlideView
= 17,
311 PodiumNotesView
= 18,
314 struct PptUserEditAtom
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
329 , nOffsetLastEdit( 0 )
330 , nOffsetPersistDirectory( 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
346 PptOEPlaceholderAtom() { 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
383 PptSlidePersistEntry();
384 ~PptSlidePersistEntry();
385 sal_uInt32
GetSlideId() const { return aPersistAtom
.nSlideId
; }
388 #define PPTSLIDEPERSIST_ENTRY_NOTFOUND 0xFFFF
390 class MSFILTER_DLLPUBLIC PptSlidePersistList
393 PptSlidePersistList(const PptSlidePersistList
&) = delete;
394 PptSlidePersistList
& operator=( const PptSlidePersistList
& ) = delete;
396 typedef std::vector
<std::unique_ptr
<PptSlidePersistEntry
>> Entries_t
;
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
;
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
)
439 struct PptExOleObjAtom
443 sal_uInt32 nPersistPtr
;
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
) {}
458 class MSFILTER_DLLPUBLIC SdrEscherImport
: public SvxMSDffManager
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;
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
501 sal_uInt16 nTextRangeEnd
;
502 std::unique_ptr
<SvxFieldItem
> xField1
;
503 std::unique_ptr
<SvxFieldItem
> xField2
;
504 std::optional
<OUString
> xString
;
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 ];
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
;
543 ::std::vector
< rtl::Reference
<SdrObject
> > aBackgroundColoredObjects
;
544 std::unique_ptr
<sal_uInt32
[]> pTableRowProperties
;
546 ProcessData( PptSlidePersistEntry
& rP
, SdPageCapsule pP
) :
547 rPersistEntry ( rP
),
550 virtual void NotifyFreeObj(SdrObject
* pObj
) override
;
556 class MSFILTER_DLLPUBLIC SdrPowerPointImport
: public SdrEscherImport
560 friend class PPTTextObj
;
561 friend class PPTExtParaProv
;
562 friend struct PPTStyleSheet
;
563 friend class PPTNumberFormatCreator
;
566 PptUserEditAtom m_aUserEditAtom
;
567 PptColorSchemeAtom m_aPageColors
;
568 ::std::vector
< SdHyperlinkEntry
> m_aHyperList
;
569 std::unique_ptr
<sal_uInt32
[]>
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
;
586 using SdrEscherImport::ReadObjText
;
588 bool SeekToCurrentPage(DffRecordHeader
* pRecHd
) const;
589 bool SeekToDocument(DffRecordHeader
* pRecHd
) const;
590 static bool SeekToContentOfProgTag(
593 const DffRecordHeader
& rProgTagBinaryDataHd
,
594 DffRecordHeader
& rContentHd
596 virtual SdrObject
* ApplyTextObj(
597 PPTTextObj
* pTextObj
,
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(
608 const Graphic
& rGraf
,
609 const tools::Rectangle
& rBoundRect
,
610 const tools::Rectangle
& rVisArea
,
611 const int _nCalledByGroup
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;
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;
639 PptPageKind ePageKind
= PPT_SLIDEPAGE
641 sal_uInt16
GetMasterPageIndex(
643 PptPageKind ePageKind
= PPT_SLIDEPAGE
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
661 bool bForbiddenRules
;
662 bool bHangingPunctuation
;
665 PPTTextParagraphStyleAtomInterpreter();
667 bool Read( SvStream
& rIn
, const DffRecordHeader
& rRecHd
);
670 struct PPTTextSpecInfo
673 LanguageType nLanguage
[ 3 ];
674 sal_uInt16 nDontKnow
;
676 explicit PPTTextSpecInfo( sal_uInt32 nCharIdx
);
679 struct PPTTextSpecInfoAtomInterpreter
682 ::std::vector
< PPTTextSpecInfo
> aList
;
684 PPTTextSpecInfoAtomInterpreter();
685 ~PPTTextSpecInfoAtomInterpreter();
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
;
703 sal_uInt32 mnAnmScheme
;
704 sal_uInt32 mpfPP10Ext
;
705 sal_uInt32 mnExtCharacterMask
;
706 sal_uInt32 mcfPP10Ext
;
710 friend SvStream
& ReadPPTExtParaLevel( SvStream
& rIn
, PPTExtParaLevel
& rL
);
713 struct PPTExtParaSheet
715 PPTExtParaLevel aExtParaLevel
[nMaxPPTLevels
];
720 sal_uInt32 nInstance
;
723 PPTBuGraEntry( Graphic aGraphic
, sal_uInt32 nInstance
);
728 ::std::vector
< std::unique_ptr
<PPTBuGraEntry
> > aBuGraList
;
732 DffRecordManager aExtendedPresRules
;
734 o3tl::enumarray
<TSS_Type
, PPTExtParaSheet
> aExtParaSheet
;
736 bool GetGraphic( sal_uInt32 nInstance
, Graphic
& rGraphic
) const;
739 SdrPowerPointImport
& rManager
,
741 const DffRecordHeader
* pMainMasterHd
748 Color mnFontColorInStyleSheet
;
749 sal_uInt32 mnFontColor
;
752 sal_uInt16 mnAsianOrComplexFont
;
753 sal_uInt16 mnFontHeight
;
754 sal_uInt16 mnEscapement
;
759 PPTCharLevel maCharLevel
[nMaxPPTLevels
];
761 explicit PPTCharSheet( TSS_Type nInstance
);
763 void Read( SvStream
& rIn
, sal_uInt32 nLevel
);
768 sal_uInt16 mnBuFlags
;
769 sal_uInt16 mnBulletChar
;
770 sal_uInt16 mnBulletFont
;
771 sal_uInt16 mnBulletHeight
;
772 sal_uInt32 mnBulletColor
;
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
791 PPTParaLevel maParaLevel
[nMaxPPTLevels
];
793 explicit PPTParaSheet( TSS_Type nInstance
);
796 SdrPowerPointImport
const & rMan
,
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
;
813 sal_uInt32 nBulletOfs
;
815 void ImplGetNumberFormat(
816 SdrPowerPointImport
const & rMan
,
817 SvxNumberFormat
& rNumberFormat
819 bool ImplGetExtNumberFormat(
820 SdrPowerPointImport
const & rMan
,
821 SvxNumberFormat
& rNumberFormat
,
824 TSS_Type nInstanceInSheet
,
825 std::optional
< sal_Int16
>& rStartNumbering
,
826 sal_uInt32 nFontHeight
,
827 PPTParagraphObj
const * pPara
832 PPTNumberFormatCreator( std::unique_ptr
<PPTExtParaProv
> );
833 ~PPTNumberFormatCreator();
837 std::unique_ptr
<PPTExtParaProv
> pExtParaProv
;
839 void GetNumberFormat(
840 SdrPowerPointImport
const & rMan
,
841 SvxNumberFormat
& rNumberFormat
,
843 const PPTParaLevel
& rParaLevel
,
844 const PPTCharLevel
& rCharLevel
,
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
;
866 const DffRecordHeader
& rSlideHd
,
867 SvStream
& rSt
, SdrPowerPointImport
&,
868 const PPTTextParagraphStyleAtomInterpreter
&,
869 const PPTTextSpecInfo
&
874 struct ImplPPTParaPropSet final
: public salhelper::SimpleReferenceObject
877 sal_uInt32 mnAttrSet
;
878 sal_uInt32 mnBulletColor
;
879 sal_uInt16 mpArry
[ 22 ];
881 sal_uInt32 mnExtParagraphMask
;
882 sal_uInt32 mnAnmScheme
;
886 sal_uInt32 nDontKnow1
;
887 sal_uInt32 nDontKnow2
;
888 sal_uInt16 nDontKnow2bit06
;
894 , mnExtParagraphMask( 0 )
900 , nDontKnow2bit06( 0 )
904 struct PPTParaPropSet
906 rtl::Reference
<ImplPPTParaPropSet
> mxParaSet
;
910 struct ImplPPTCharPropSet
912 sal_uInt32 mnAttrSet
;
916 sal_uInt16 mnAsianOrComplexFont
;
917 sal_uInt16 mnANSITypeface
;
918 sal_uInt16 mnFontHeight
;
919 sal_uInt16 mnEscapement
;
920 sal_uInt16 mnSymbolFont
;
927 , mnAsianOrComplexFont( 0 )
928 , mnANSITypeface( 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.
943 //the hyperlink text whether has a custom color.
944 bool mbHardHylinkOrigColor
;
946 sal_uInt32 mnOriginalTextPos
;
947 sal_uInt32 mnParagraph
;
949 std::unique_ptr
<SvxFieldItem
>
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
);
961 PPTCharPropSet
& operator=( const PPTCharPropSet
& rCharPropSet
);
963 friend class PPTTextObj
;
964 friend class PPTParagraphObj
;
965 friend class PPTPortionObj
;
966 friend struct PPTStyleTextPropReader
;
969 o3tl::cow_wrapper
< ImplPPTCharPropSet
> mpImplPPTCharPropSet
;
978 struct PPTRuler final
: public salhelper::SimpleReferenceObject
981 sal_uInt16 nDefaultTab
;
982 sal_uInt16 nTextOfs
[nMaxPPTLevels
] = {};
983 sal_uInt16 nBulletOfs
[nMaxPPTLevels
] = {};
984 std::unique_ptr
<PPTTabEntry
[]>
986 sal_uInt16 nTabCount
;
989 virtual ~PPTRuler() override
;
992 struct PPTTextRulerInterpreter
995 rtl::Reference
<PPTRuler
> mxImplRuler
;
997 PPTTextRulerInterpreter();
998 PPTTextRulerInterpreter( PPTTextRulerInterpreter
const & rRuler
);
999 PPTTextRulerInterpreter(
1000 sal_uInt32 nFileOfs
,
1001 DffRecordHeader
const & rHd
,
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
;
1037 : mnExtParagraphMask( 0 )
1042 , mnExtCharacterMask( 0 )
1044 , mnSpecialInfoMask( 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(
1060 const DffRecordHeader
& rClientTextBoxHd
,
1061 PPTTextRulerInterpreter
const & rInterpreter
,
1062 const DffRecordHeader
& rExtParaHd
,
1063 TSS_Type nTextInstance
1065 ~PPTStyleTextPropReader();
1069 const DffRecordHeader
& rClientTextBoxHd
,
1070 PPTTextRulerInterpreter
const & rInterpreter
,
1071 const DffRecordHeader
& rExtParaHd
,
1072 TSS_Type nTextInstance
1076 const DffRecordHeader
& rTextHeader
,
1077 const OUString
& aString
,
1078 PPTTextRulerInterpreter
const & rRuler
,
1081 // returns CharCount
1082 static sal_uInt32
ReadCharProps(
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
;
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
);
1113 const PPTCharPropSet
&,
1114 const PPTStyleSheet
&,
1118 PPTPortionObj( const PPTPortionObj
& );
1121 // the following function should be removed during next full update
1124 SdrPowerPointImport
& rManager
,
1125 TSS_Type nInstanceInSheet
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
;
1154 void UpdateBulletRelSize( sal_uInt32
& nBulletRelSize
) const;
1155 bool GetAttrib( sal_uInt32 nAttr
, sal_uInt32
& nVal
, TSS_Type nInstanceInSheet
);
1158 const PPTStyleSheet
&,
1163 PPTStyleTextPropReader
&,
1165 size_t& rnCurCharPos
,
1166 const PPTStyleSheet
&,
1168 PPTTextRulerInterpreter
const & rRuler
1172 sal_uInt32
GetTextSize();
1173 PPTPortionObj
* First();
1174 PPTPortionObj
* Next();
1176 void AppendPortion( PPTPortionObj
& rPortion
);
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
>>
1204 PptSlidePersistEntry
& mrPersistEntry
;
1206 sal_uInt32 mnTextFlags
;
1208 explicit ImplPPTTextObj( PptSlidePersistEntry
& rPersistEntry
)
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
;
1227 SdrPowerPointImport
&,
1228 PptSlidePersistEntry
&,
1231 PPTTextObj( PPTTextObj
const & rTextObj
);
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
)
1254 mxImplTextObj
->mnTextFlags
|= PPT_TEXTOBJ_FLAGS_VERTICAL
;
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
;
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
,
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
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: */