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
26 #include <type_traits>
29 #include <com/sun/star/uno/Reference.hxx>
30 #include <editeng/eeitem.hxx>
31 #include <editeng/flditem.hxx>
32 #include <filter/msfilter/dffrecordheader.hxx>
33 #include <filter/msfilter/msdffimp.hxx>
34 #include <filter/msfilter/msfilterdllapi.h>
35 #include <filter/msfilter/msocximex.hxx>
36 #include <o3tl/enumarray.hxx>
37 #include <rtl/ref.hxx>
38 #include <rtl/textenc.h>
39 #include <rtl/ustring.hxx>
40 #include <sal/types.h>
41 #include <svx/msdffdef.hxx>
42 #include <tools/color.hxx>
43 #include <tools/fontenum.hxx>
44 #include <tools/gen.hxx>
45 #include <tools/ref.hxx>
46 #include <tools/solar.h>
47 #include <vcl/graph.hxx>
48 #include <salhelper/simplereferenceobject.hxx>
51 template <class T
> class optional
;
54 namespace com
{ namespace sun
{ namespace star
{
55 namespace awt
{ struct Size
; }
56 namespace drawing
{ class XShape
; }
57 namespace form
{ class XFormComponent
; }
58 namespace frame
{ class XModel
; }
69 class SvxNumberFormat
;
71 enum class PptSlideLayout
;
72 enum class PptPlaceholder
: sal_uInt8
;
74 #define PPT_IMPORTFLAGS_NO_TEXT_ASSERT 1
76 struct MSFILTER_DLLPUBLIC PptCurrentUserAtom
79 sal_uInt32 nCurrentUserEdit
;
80 sal_uInt16 nDocFileVersion
;
81 sal_uInt8 nMajorVersion
;
82 sal_uInt8 nMinorVersion
;
83 OUString aCurrentUser
;
87 PptCurrentUserAtom() : nMagic ( 0 ),
88 nCurrentUserEdit ( 0 ),
89 nDocFileVersion ( 0 ),
91 nMinorVersion ( 0 ) {}
93 MSFILTER_DLLPUBLIC
friend SvStream
& ReadPptCurrentUserAtom( SvStream
& rIn
, PptCurrentUserAtom
& rAtom
);
96 struct MSFILTER_DLLPUBLIC PowerPointImportParam
99 sal_uInt32 nImportFlags
;
100 PptCurrentUserAtom aCurrentUserAtom
;
102 PowerPointImportParam( SvStream
& rDocStream
);
105 struct SdHyperlinkEntry
115 OUString aConvSubString
;
118 // Helper class for reading the PPT InteractiveInfoAtom
119 struct MSFILTER_DLLPUBLIC PptInteractiveInfoAtom
121 sal_uInt32 nSoundRef
;
122 sal_uInt32 nExHyperlinkId
;
127 sal_uInt8 nHyperlinkType
;
129 // unknown, because total size is 16
136 MSFILTER_DLLPUBLIC
friend SvStream
& ReadPptInteractiveInfoAtom( SvStream
& rIn
, PptInteractiveInfoAtom
& rAtom
);
139 enum PptPageKind
{ PPT_MASTERPAGE
, PPT_SLIDEPAGE
, PPT_NOTEPAGE
};
143 PPTPF_USLETTER
, // 8.5x11"
144 PPTPF_A4
, // 210x297mm
145 PPTPF_35MMDIA
, // DIA
150 // values for PPT_PST_TextHeaderAtom's sal_uLong
157 PPTTH_OTHER
, // Text in a Shape
158 PPTTH_CENTERBODY
, // Subtitle in Title-Slide
159 PPTTH_CENTERTITLE
, // Title in Title-Slide
160 PPTTH_HALFBODY
, // Body in two-column slide
161 PPTTH_QUARTERBODY
// Body in four-body slide
164 enum class TSS_Type
: unsigned {
175 Unknown
= 0xffffffff // or invalid
178 const int nMaxPPTLevels
= 5;
180 // Object IDs for StarDraw UserData
181 #define PPT_OBJECTINFO_ID (1)
183 struct MSFILTER_DLLPUBLIC PptDocumentAtom
185 Size aSlidesPageSize
; // page size of the slides in 576DPI
186 Size aNotesPageSize
; // page size of the notes in 576DPI
187 // avoid RatioAtom for the time being
188 sal_uInt32 nNotesMasterPersist
; // 0=non-existent
189 sal_uInt32 nHandoutMasterPersist
; // 0=non-existent
190 sal_uInt16 n1stPageNumber
; // page number of the first slide
191 PptPageFormat eSlidesPageFormat
; // page format of the slides
192 bool bEmbeddedTrueType
: 1; // TrueType directly within the File?
193 bool bTitlePlaceholdersOmitted
: 1;
194 bool bRightToLeft
: 1;
195 bool bShowComments
: 1;
199 Size
const & GetSlidesPageSize() const { return aSlidesPageSize
; }
200 Size
const & GetNotesPageSize() const { return aNotesPageSize
; }
202 friend SvStream
& ReadPptDocumentAtom( SvStream
& rIn
, PptDocumentAtom
& rAtom
);
205 struct PptSlideLayoutAtom
207 PptSlideLayout eLayout
; // 0..18
208 PptPlaceholder aPlaceholderId
[ 8 ];
211 PptSlideLayoutAtom() { Clear(); }
214 // SlideLayoutAtom is read without header!
215 friend SvStream
& ReadPptSlideLayoutAtom( SvStream
& rIn
, PptSlideLayoutAtom
& rAtom
);
220 PptSlideLayoutAtom aLayout
;
221 sal_uInt32 nMasterId
;
226 PptSlideAtom() { Clear(); }
229 friend SvStream
& ReadPptSlideAtom(SvStream
& rIn
, PptSlideAtom
& rAtom
);
232 struct PptSlidePersistAtom
234 sal_uInt32 nPsrReference
;
236 sal_uInt32 nNumberTexts
;
238 sal_uInt32 nReserved
; // we will use nReserved temporarily to set the offset to SSSlideInfoAtom ( if possible )
241 PptSlidePersistAtom() { Clear(); }
244 friend SvStream
& ReadPptSlidePersistAtom(SvStream
& rIn
, PptSlidePersistAtom
& rAtom
);
253 PptNotesAtom() { Clear(); }
256 friend SvStream
& ReadPptNotesAtom(SvStream
& rIn
, PptNotesAtom
& rAtom
);
259 struct PptColorSchemeAtom
264 PptColorSchemeAtom();
265 Color
GetColor( sal_uInt16 nNum
) const;
267 friend SvStream
& ReadPptColorSchemeAtom(SvStream
& rIn
, PptColorSchemeAtom
& rAtom
);
270 struct PptFontEntityAtom
273 sal_uInt8 lfClipPrecision
;
276 rtl_TextEncoding eCharSet
;
281 friend SvStream
& ReadPptFontEntityAtom(SvStream
& rIn
, PptFontEntityAtom
& rAtom
);
284 enum class PptViewTypeEnum
: sal_uInt16
298 SlideShowFullScreen
= 12,
302 MasterThumbnails
= 16,
303 PodiumSlideView
= 17,
304 PodiumNotesView
= 18,
307 struct PptUserEditAtom
310 sal_Int32 nLastSlideID
; // ID of last visible slide
311 sal_uInt32 nVersion
; // This is major/minor/build which did the edit
312 sal_uInt32 nOffsetLastEdit
; // File offset of prev PptUserEditAtom
313 sal_uInt32 nOffsetPersistDirectory
; // Offset to PersistPtrs for this file version.
314 sal_uInt32 nDocumentRef
;
315 sal_uInt32 nMaxPersistWritten
; // total number of Persist entries up to this point
316 PptViewTypeEnum eLastViewType
; // enum view type
322 , nOffsetLastEdit( 0 )
323 , nOffsetPersistDirectory( 0 )
325 , nMaxPersistWritten( 0 )
326 , eLastViewType( PptViewTypeEnum::NONE
)
329 friend SvStream
& ReadPptUserEditAtom( SvStream
& rIn
, PptUserEditAtom
& rAtom
);
332 struct PptOEPlaceholderAtom
334 sal_uInt32 nPlacementId
;
335 PptPlaceholder nPlaceholderId
;
336 sal_uInt8 nPlaceholderSize
; // 0=Full size, 1=Half size, 2=Quarter of Slide
339 PptOEPlaceholderAtom() { Clear(); }
342 friend SvStream
& ReadPptOEPlaceholderAtom( SvStream
& rIn
, PptOEPlaceholderAtom
& rAtom
);
345 struct PPTStyleSheet
;
346 struct HeaderFooterEntry
;
347 struct PptSlidePersistEntry
349 PptSlidePersistEntry(const PptSlidePersistEntry
&) = delete;
350 PptSlidePersistEntry
& operator=( const PptSlidePersistEntry
& ) = delete;
352 PptSlidePersistAtom aPersistAtom
;
353 PptSlideAtom aSlideAtom
;
354 PptNotesAtom aNotesAtom
;
355 PptColorSchemeAtom aColorScheme
; // each slide includes this colorscheme atom
356 std::unique_ptr
<PPTStyleSheet
> xStyleSheet
; // stylesheet of this page (only in masterpages), since XP supports more than one masterpage
358 sal_uInt32 HeaderFooterOfs
[ 4 ]; // containing the ofs to the placeholder (only masterpage)
359 std::unique_ptr
<HeaderFooterEntry
> xHeaderFooterEntry
;
360 std::unique_ptr
<SvxMSDffSolverContainer
> xSolverContainer
;
361 sal_uInt32 nSlidePersistStartOffset
;// is an array to the end of the SlidePersistAtom of this page, TextHeaderAtom is following
362 sal_uInt32 nSlidePersistEndOffset
;
363 sal_uInt32 nBackgroundOffset
; // fileoffset
364 sal_uInt32 nDrawingDgId
; // valid, if not -1
365 std::unique_ptr
<sal_uInt32
[]>
366 pPresentationObjects
; // if valid, this is a pointer to an array that includes the offsets to the presentation objects
367 // on this masterpage for each instance (0 - 8);
370 PptPageKind ePageKind
;
372 bool bNotesMaster
: 1; // for NotesMaster
373 bool bHandoutMaster
: 1; // for HandoutMaster
374 bool bStarDrawFiller
: 1; // special for StarDraw
376 PptSlidePersistEntry();
377 ~PptSlidePersistEntry();
378 sal_uInt32
GetSlideId() const { return aPersistAtom
.nSlideId
; }
381 #define PPTSLIDEPERSIST_ENTRY_NOTFOUND 0xFFFF
383 class MSFILTER_DLLPUBLIC PptSlidePersistList
386 PptSlidePersistList(const PptSlidePersistList
&) = delete;
387 PptSlidePersistList
& operator=( const PptSlidePersistList
& ) = delete;
389 typedef std::vector
<std::unique_ptr
<PptSlidePersistEntry
>> Entries_t
;
393 PptSlidePersistList();
394 ~PptSlidePersistList();
396 size_t size() const { return mvEntries
.size(); }
397 bool is_null( size_t nIdx
) const { return mvEntries
[ nIdx
] == nullptr; }
398 const PptSlidePersistEntry
& operator[](size_t nIdx
) const { return *mvEntries
[ nIdx
]; }
399 PptSlidePersistEntry
& operator[](size_t nIdx
) { return *mvEntries
[ nIdx
]; }
400 Entries_t::iterator
begin() { return mvEntries
.begin(); }
401 void insert( Entries_t::iterator it
,
402 std::unique_ptr
<PptSlidePersistEntry
> pEntry
)
404 mvEntries
.insert(it
, std::move(pEntry
));
406 void push_back(std::unique_ptr
<PptSlidePersistEntry
> pEntry
)
408 mvEntries
.push_back(std::move(pEntry
));
411 sal_uInt16
FindPage( sal_uInt32 nId
) const;
414 class SfxObjectShell
;
417 sal_uInt32 nId
; // OleId
418 sal_uInt32 nRecHdOfs
; // points to the record header: ExObjListHd
419 SfxObjectShell
* pShell
;
420 sal_uInt16 nType
; // maybe PPT_PST_ExEmbed or PPT_PST_ExControl
421 sal_uInt32 nAspect
; // the aspect of the OLE object
423 PPTOleEntry( sal_uInt32 nid
, sal_uInt32 nOfs
, SfxObjectShell
* pSh
, sal_uInt16 nT
, sal_uInt32 nAsp
)
432 struct PptExOleObjAtom
436 sal_uInt32 nPersistPtr
;
440 friend SvStream
& ReadPptExOleObjAtom( SvStream
& rIn
, PptExOleObjAtom
& rAtom
);
443 // SdPage derives from SdrPage, is only known inside sd, and needs to be carried
444 // around as an opaque pointer here:
445 struct SdPageCapsule
{
446 explicit SdPageCapsule(SdrPage
* thePage
): page(thePage
) {}
451 class MSFILTER_DLLPUBLIC SdrEscherImport
: public SvxMSDffManager
455 friend class PPTTextObj
;
456 friend class PPTPortionObj
;
457 friend struct PPTStyleTextPropReader
;
458 friend class ImplSdPPTImport
;
460 PptDocumentAtom aDocAtom
;
461 DffRecordManager aDocRecManager
; // contains all first level container and atoms of the document container
463 ::std::vector
< PPTOleEntry
> aOleObjectList
;
465 std::unique_ptr
<std::vector
<std::unique_ptr
<PptFontEntityAtom
>>> m_pFonts
;
467 sal_uInt32 nStreamLen
;
469 bool ReadString( OUString
& rStr
) const;
470 // only for PowerPoint filter:
471 virtual const PptSlideLayoutAtom
* GetSlideLayoutAtom() const;
474 using SvxMSDffManager::ReadObjText
;
476 PowerPointImportParam
& rImportParam
;
478 SdrEscherImport( PowerPointImportParam
&, const OUString
& rBaseURL
);
479 virtual ~SdrEscherImport() override
;
480 virtual bool GetColorFromPalette( sal_uInt16 nNum
, Color
& rColor
) const override
;
481 virtual bool SeekToShape( SvStream
& rSt
, SvxMSDffClientData
* pClientData
, sal_uInt32 nId
) const override
;
482 PptFontEntityAtom
* GetFontEnityAtom( sal_uInt32 nNum
) const;
483 void RecolorGraphic( SvStream
& rSt
, sal_uInt32 nRecLen
, Graphic
& rGraph
);
484 virtual SdrObject
* ReadObjText( PPTTextObj
* pTextObj
, SdrObject
* pObj
, SdPageCapsule pPage
) const;
485 virtual SdrObject
* ProcessObj( SvStream
& rSt
, DffObjData
& rData
, SvxMSDffClientData
& rClientData
, tools::Rectangle
& rTextRect
, SdrObject
* pObj
) override
;
486 virtual void NotifyFreeObj(SvxMSDffClientData
& rData
, SdrObject
* pObj
) override
;
487 virtual void ProcessClientAnchor2( SvStream
& rSt
, DffRecordHeader
& rHd
, SvxMSDffClientData
& rData
, DffObjData
& rObj
) override
;
488 void ImportHeaderFooterContainer( DffRecordHeader
const & rHeader
, HeaderFooterEntry
& rEntry
);
492 struct MSFILTER_DLLPUBLIC PPTFieldEntry
495 sal_uInt16 nTextRangeEnd
;
496 std::unique_ptr
<SvxFieldItem
> xField1
;
497 std::unique_ptr
<SvxFieldItem
> xField2
;
498 boost::optional
<OUString
> xString
;
508 void SetDateTime( sal_uInt32 nType
);
510 // converting PPT date time format:
511 static void GetDateTime(
512 const sal_uInt32 nVal
,
513 SvxDateFormat
& eDateFormat
,
514 SvxTimeFormat
& eTimeFormat
518 struct MSFILTER_DLLPUBLIC HeaderFooterEntry
520 const PptSlidePersistEntry
* pMasterPersist
;
521 OUString pPlaceholder
[ 4 ];
524 sal_uInt32
IsToDisplay( sal_uInt32 nInstance
);
525 sal_uInt32
NeedToImportInstance(
526 const sal_uInt32 nInstance
,
527 const PptSlidePersistEntry
& rSlidePersist
530 explicit HeaderFooterEntry( const PptSlidePersistEntry
* pMaster
= nullptr );
533 struct MSFILTER_DLLPUBLIC ProcessData
: public SvxMSDffClientData
535 PptSlidePersistEntry
& rPersistEntry
;
537 ::std::vector
< SdrObject
* > aBackgroundColoredObjects
;
538 std::unique_ptr
<sal_uInt32
[]> pTableRowProperties
;
540 ProcessData( PptSlidePersistEntry
& rP
, SdPageCapsule pP
) :
541 rPersistEntry ( rP
),
544 virtual void NotifyFreeObj(SdrObject
* pObj
) override
;
550 class MSFILTER_DLLPUBLIC SdrPowerPointImport
: public SdrEscherImport
554 friend class PPTTextObj
;
555 friend class PPTExtParaProv
;
556 friend struct PPTStyleSheet
;
557 friend class PPTNumberFormatCreator
;
560 PptUserEditAtom aUserEditAtom
;
561 PptColorSchemeAtom aPageColors
;
562 ::std::vector
< SdHyperlinkEntry
> aHyperList
;
563 std::unique_ptr
<sal_uInt32
[]>
565 sal_uInt32 nPersistPtrCnt
;
567 const PPTStyleSheet
* pPPTStyleSheet
; // this is the current stylesheet;
568 const PPTStyleSheet
* pDefaultSheet
; // this is a sheet we are using if no masterpage can be found, but that should
569 // never happen just preventing a crash
570 std::unique_ptr
<PptSlidePersistList
> m_pMasterPages
;
571 std::unique_ptr
<PptSlidePersistList
> m_pSlidePages
;
572 std::unique_ptr
<PptSlidePersistList
> m_pNotePages
;
573 sal_uInt16 nCurrentPageNum
;
574 sal_uLong nDocStreamPos
;
575 sal_uInt16 nPageColorsNum
;
576 PptPageKind ePageColorsKind
;
577 PptPageKind eCurrentPageKind
;
580 using SdrEscherImport::ReadObjText
;
582 bool SeekToCurrentPage(DffRecordHeader
* pRecHd
) const;
583 bool SeekToDocument(DffRecordHeader
* pRecHd
) const;
584 static bool SeekToContentOfProgTag(
587 const DffRecordHeader
& rProgTagBinaryDataHd
,
588 DffRecordHeader
& rContentHd
590 virtual SdrObject
* ApplyTextObj(
591 PPTTextObj
* pTextObj
,
597 virtual SdrObject
* ReadObjText( PPTTextObj
* pTextObj
, SdrObject
* pObj
, SdPageCapsule pPage
) const override
;
598 // #i32596# - new parameter <_nCalledByGroup>, which
599 // indicates, if the OLE object is imported inside a group object.
600 virtual SdrObject
* ImportOLE(
602 const Graphic
& rGraf
,
603 const tools::Rectangle
& rBoundRect
,
604 const tools::Rectangle
& rVisArea
,
605 const int _nCalledByGroup
607 std::unique_ptr
<SvMemoryStream
> ImportExOleObjStg( sal_uInt32 nPersistPtr
, sal_uInt32
& nOleId
) const;
608 SdrPage
* MakeBlancPage(bool bMaster
) const;
609 bool ReadFontCollection();
610 PptSlidePersistList
* GetPageList(PptPageKind ePageKind
) const;
611 sal_uInt32
GetCurrentPageId();
612 sal_uInt32
GetMasterPageId(sal_uInt16 nPageNum
, PptPageKind ePageKind
) const;
613 sal_uInt32
GetNotesPageId(sal_uInt16 nPageNum
) const;
614 static SdrOutliner
* GetDrawOutliner( SdrTextObj
const * pSdrText
);
615 void SeekOle( SfxObjectShell
* pShell
, sal_uInt32 nFilterOptions
);
617 void ApplyTextAnchorAttributes( PPTTextObj
const & rTextObj
, SfxItemSet
& rSet
) const;
618 bool IsVerticalText() const;
621 SdrPowerPointImport( PowerPointImportParam
&, const OUString
& rBaseURL
);
622 virtual ~SdrPowerPointImport() override
;
623 sal_uInt16
GetPageCount( PptPageKind eKind
= PPT_SLIDEPAGE
) const;
624 void SetPageNum( sal_uInt16 nPageNum
, PptPageKind
= PPT_SLIDEPAGE
);
625 Size
GetPageSize() const;
626 SdrObject
* ImportPageBackgroundObject(
627 const SdrPage
& rPage
,
628 sal_uInt32
& nBgFileOffset
630 bool IsNoteOrHandout( sal_uInt16 nPageNum
) const;
633 PptPageKind ePageKind
= PPT_SLIDEPAGE
635 sal_uInt16
GetMasterPageIndex(
637 PptPageKind ePageKind
= PPT_SLIDEPAGE
640 void ImportPage( SdrPage
* pPage
, const PptSlidePersistEntry
* pMasterPersist
);
641 virtual bool GetColorFromPalette(sal_uInt16 nNum
, Color
& rColor
) const override
;
642 virtual bool SeekToShape( SvStream
& rSt
, SvxMSDffClientData
* pClientData
, sal_uInt32 nId
) const override
;
643 virtual const PptSlideLayoutAtom
* GetSlideLayoutAtom() const override
;
644 SdrObject
* CreateTable(
645 SdrObject
* pGroupObject
,
646 const sal_uInt32
* pTableArry
,
647 SvxMSDffSolverContainer
*
649 virtual bool ReadFormControl( tools::SvRef
<SotStorage
>& rSrc1
, css::uno::Reference
< css::form::XFormComponent
> & rFormComp
) const = 0;
652 struct PPTTextParagraphStyleAtomInterpreter
655 bool bForbiddenRules
;
656 bool bHangingPunctuation
;
659 PPTTextParagraphStyleAtomInterpreter();
660 ~PPTTextParagraphStyleAtomInterpreter();
662 bool Read( SvStream
& rIn
, const DffRecordHeader
& rRecHd
);
665 struct PPTTextSpecInfo
668 LanguageType nLanguage
[ 3 ];
669 sal_uInt16 nDontKnow
;
671 explicit PPTTextSpecInfo( sal_uInt32 nCharIdx
);
674 struct PPTTextSpecInfoAtomInterpreter
677 ::std::vector
< PPTTextSpecInfo
> aList
;
679 PPTTextSpecInfoAtomInterpreter();
680 ~PPTTextSpecInfoAtomInterpreter();
684 const DffRecordHeader
& rRecHd
,
685 sal_uInt16 nRecordType
,
686 const PPTTextSpecInfo
* pTextSpecDefault
= nullptr
691 #define PPT_STYLESHEETENTRIES 9
693 struct PPTExtParaLevel
695 sal_uInt32 mnExtParagraphMask
;
698 sal_uInt32 mnAnmScheme
;
699 sal_uInt32 mpfPP10Ext
;
700 sal_uInt32 mnExtCharacterMask
;
701 sal_uInt32 mcfPP10Ext
;
705 friend SvStream
& ReadPPTExtParaLevel( SvStream
& rIn
, PPTExtParaLevel
& rL
);
708 struct PPTExtParaSheet
710 PPTExtParaLevel aExtParaLevel
[nMaxPPTLevels
];
715 sal_uInt32 nInstance
;
718 PPTBuGraEntry( Graphic
const & rGraphic
, sal_uInt32 nInstance
);
723 ::std::vector
< std::unique_ptr
<PPTBuGraEntry
> > aBuGraList
;
727 DffRecordManager aExtendedPresRules
;
729 o3tl::enumarray
<TSS_Type
, PPTExtParaSheet
> aExtParaSheet
;
731 bool GetGraphic( sal_uInt32 nInstance
, Graphic
& rGraphic
) const;
734 SdrPowerPointImport
& rManager
,
736 const DffRecordHeader
* pMainMasterHd
743 Color mnFontColorInStyleSheet
;
744 sal_uInt32 mnFontColor
;
747 sal_uInt16 mnAsianOrComplexFont
;
748 sal_uInt16 mnFontHeight
;
749 sal_uInt16 mnEscapement
;
754 PPTCharLevel maCharLevel
[nMaxPPTLevels
];
756 explicit PPTCharSheet( TSS_Type nInstance
);
758 void Read( SvStream
& rIn
, sal_uInt32 nLevel
);
763 sal_uInt16 mnBuFlags
;
764 sal_uInt16 mnBulletChar
;
765 sal_uInt16 mnBulletFont
;
766 sal_uInt16 mnBulletHeight
;
767 sal_uInt32 mnBulletColor
;
770 sal_uInt16 mnLineFeed
;
771 sal_uInt16 mnUpperDist
;
772 sal_uInt16 mnLowerDist
;
773 sal_uInt16 mnTextOfs
;
774 sal_uInt16 mnBulletOfs
;
775 sal_uInt16 mnDefaultTab
;
776 sal_uInt16 mnAsianLineBreak
; // bit0: use asian rules for first and last character
777 // 1: do not wrap latin text in the middle of the word
778 // 2: allow hanging punctuation
786 PPTParaLevel maParaLevel
[nMaxPPTLevels
];
788 explicit PPTParaSheet( TSS_Type nInstance
);
791 SdrPowerPointImport
const & rMan
,
796 void UpdateBulletRelSize( sal_uInt32 nLevel
, sal_uInt16 nFontHeight
);
799 class PPTParagraphObj
;
800 class PPTNumberFormatCreator
802 sal_uInt32 nIsBullet
;
803 sal_uInt32 nBulletChar
;
804 sal_uInt32 nBulletFont
;
805 sal_uInt32 nBulletHeight
;
806 sal_uInt32 nBulletColor
;
808 sal_uInt32 nBulletOfs
;
810 void ImplGetNumberFormat(
811 SdrPowerPointImport
const & rMan
,
812 SvxNumberFormat
& rNumberFormat
814 bool ImplGetExtNumberFormat(
815 SdrPowerPointImport
const & rMan
,
816 SvxNumberFormat
& rNumberFormat
,
819 TSS_Type nInstanceInSheet
,
820 boost::optional
< sal_Int16
>& rStartNumbering
,
821 sal_uInt32 nFontHeight
,
822 PPTParagraphObj
const * pPara
827 PPTNumberFormatCreator( std::unique_ptr
<PPTExtParaProv
> );
828 ~PPTNumberFormatCreator();
832 std::unique_ptr
<PPTExtParaProv
> pExtParaProv
;
834 void GetNumberFormat(
835 SdrPowerPointImport
const & rMan
,
836 SvxNumberFormat
& rNumberFormat
,
838 const PPTParaLevel
& rParaLevel
,
839 const PPTCharLevel
& rCharLevel
,
843 bool GetNumberFormat(
844 SdrPowerPointImport
const & rMan
,
845 SvxNumberFormat
& rNumberFormat
,
846 PPTParagraphObj
* pPara
,
847 TSS_Type nInstanceInSheet
,
848 boost::optional
< sal_Int16
>& rStartNumbering
852 class SvxNumBulletItem
;
853 struct PPTStyleSheet
: public PPTNumberFormatCreator
855 PPTTextSpecInfo maTxSI
;
856 o3tl::enumarray
<TSS_Type
, PPTCharSheet
*> mpCharSheet
;
857 o3tl::enumarray
<TSS_Type
, PPTParaSheet
*> mpParaSheet
;
858 o3tl::enumarray
<TSS_Type
, SvxNumBulletItem
*> mpNumBulletItem
;
861 const DffRecordHeader
& rSlideHd
,
862 SvStream
& rSt
, SdrPowerPointImport
&,
863 const PPTTextParagraphStyleAtomInterpreter
&,
864 const PPTTextSpecInfo
&
869 struct ImplPPTParaPropSet
: public salhelper::SimpleReferenceObject
872 sal_uInt32 mnAttrSet
;
873 sal_uInt32 mnBulletColor
;
874 sal_uInt16 mpArry
[ 22 ];
876 sal_uInt32 mnExtParagraphMask
;
877 sal_uInt32 mnAnmScheme
;
881 sal_uInt32 nDontKnow1
;
882 sal_uInt32 nDontKnow2
;
883 sal_uInt16 nDontKnow2bit06
;
889 , mnExtParagraphMask( 0 )
895 , nDontKnow2bit06( 0 )
899 struct PPTParaPropSet
901 sal_uInt32 mnOriginalTextPos
;
902 rtl::Reference
<ImplPPTParaPropSet
> mxParaSet
;
905 PPTParaPropSet( PPTParaPropSet
const & rParaPropSet
);
908 PPTParaPropSet
& operator=( const PPTParaPropSet
& rParaPropSet
);
911 struct ImplPPTCharPropSet
913 sal_uInt32 mnAttrSet
;
917 sal_uInt16 mnAsianOrComplexFont
;
918 sal_uInt16 mnANSITypeface
;
919 sal_uInt16 mnFontHeight
;
920 sal_uInt16 mnEscapement
;
921 sal_uInt16 mnSymbolFont
;
928 , mnAsianOrComplexFont( 0 )
929 , mnANSITypeface( 0 )
936 struct PPTCharPropSet
938 //when the bullet text has more than two color,next the text following with bullet has been set hyperlink.
939 //now,the bullet color should be set original hyperlink text's color
940 //so "mbHardHylinkOrigColor" hold the original hyperlink text's color.
941 sal_uInt32 mnHylinkOrigColor
;
942 //the bullet text weather has a hyperlink.
944 //the hyperlink text weather has a custom color.
945 bool mbHardHylinkOrigColor
;
947 sal_uInt32 mnOriginalTextPos
;
948 sal_uInt32 mnParagraph
;
950 std::unique_ptr
<SvxFieldItem
>
952 LanguageType mnLanguage
[ 3 ];
954 void SetFont( sal_uInt16 nFont
);
955 void SetColor( sal_uInt32 nColor
);
957 explicit PPTCharPropSet( sal_uInt32 nParagraph
);
958 PPTCharPropSet( const PPTCharPropSet
& rCharPropSet
);
959 PPTCharPropSet( const PPTCharPropSet
& rCharPropSet
, sal_uInt32 nParagraph
);
962 PPTCharPropSet
& operator=( const PPTCharPropSet
& rCharPropSet
);
964 friend class PPTTextObj
;
965 friend class PPTParagraphObj
;
966 friend class PPTPortionObj
;
967 friend struct PPTStyleTextPropReader
;
970 o3tl::cow_wrapper
< ImplPPTCharPropSet
> mpImplPPTCharPropSet
;
979 struct PPTRuler
: public salhelper::SimpleReferenceObject
982 sal_uInt16 nDefaultTab
;
983 sal_uInt16 nTextOfs
[nMaxPPTLevels
];
984 sal_uInt16 nBulletOfs
[nMaxPPTLevels
];
985 std::unique_ptr
<PPTTabEntry
[]>
987 sal_uInt16 nTabCount
;
990 virtual ~PPTRuler() override
;
993 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=( 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
,
1079 sal_uInt32
& nCharCount
,
1082 static void ReadCharProps(
1084 PPTCharPropSet
& aCharPropSet
,
1085 const OUString
& aString
,
1086 sal_uInt32
& nCharCount
,
1087 sal_uInt32 nCharReadCnt
,
1088 bool& bTextPropAtom
,
1089 sal_uInt32 nExtParaPos
,
1090 const std::vector
< StyleTextProp9
>& aStyleTextProp9
,
1091 sal_uInt32
& nExtParaFlags
,
1092 sal_uInt16
& nBuBlip
,
1093 sal_uInt16
& nHasAnm
,
1094 sal_uInt32
& nAnmScheme
1098 class MSFILTER_DLLPUBLIC PPTPortionObj
: public PPTCharPropSet
1101 friend class PPTParagraphObj
;
1103 const PPTStyleSheet
& mrStyleSheet
;
1104 TSS_Type mnInstance
;
1109 bool GetAttrib( sal_uInt32 nAttr
, sal_uInt32
& nVal
, TSS_Type nInstanceInSheet
) const;
1110 SvxFieldItem
* GetTextField();
1112 PPTPortionObj( const PPTStyleSheet
&, TSS_Type nInstance
, sal_uInt32 nDepth
);
1114 const PPTCharPropSet
&,
1115 const PPTStyleSheet
&,
1119 PPTPortionObj( const PPTPortionObj
& );
1122 // the following function should be removed during next full update
1125 SdrPowerPointImport
& rManager
,
1126 TSS_Type nInstanceInSheet
1130 SdrPowerPointImport
& rManager
,
1131 TSS_Type nInstanceInSheet
,
1132 const PPTTextObj
* pTextObj
1134 sal_uInt32
Count() const { return mpFieldItem
? 1 : maString
.getLength(); };
1135 bool HasTabulator();
1138 class MSFILTER_DLLPUBLIC PPTParagraphObj
1139 : public PPTParaPropSet
,
1140 public PPTNumberFormatCreator
,
1141 public PPTTextRulerInterpreter
1143 friend class PPTTextObj
;
1144 friend class PPTNumberFormatCreator
;
1146 const PPTStyleSheet
& mrStyleSheet
;
1147 TSS_Type mnInstance
;
1149 PPTParagraphObj(PPTParagraphObj
const&) = delete;
1150 void operator=(PPTParagraphObj
const&) = delete;
1154 bool mbTab
; // if true, this paragraph has tabulators in text
1156 sal_uInt32 mnCurrentObject
;
1157 ::std::vector
<std::unique_ptr
<PPTPortionObj
>> m_PortionList
;
1159 void UpdateBulletRelSize( sal_uInt32
& nBulletRelSize
) const;
1160 bool GetAttrib( sal_uInt32 nAttr
, sal_uInt32
& nVal
, TSS_Type nInstanceInSheet
);
1163 const PPTStyleSheet
&,
1168 PPTStyleTextPropReader
&,
1170 size_t& rnCurCharPos
,
1171 const PPTStyleSheet
&,
1173 PPTTextRulerInterpreter
const & rRuler
1177 sal_uInt32
GetTextSize();
1178 PPTPortionObj
* First();
1179 PPTPortionObj
* Next();
1181 void AppendPortion( PPTPortionObj
& rPortion
);
1184 boost::optional
< sal_Int16
>& rStartNumbering
,
1185 SdrPowerPointImport
const & rManager
,
1186 TSS_Type nInstanceInSheet
1190 #define PPT_TEXTOBJ_FLAGS_PARA_ALIGNMENT_USED_LEFT 1
1191 #define PPT_TEXTOBJ_FLAGS_PARA_ALIGNMENT_USED_CENTER 2
1192 #define PPT_TEXTOBJ_FLAGS_PARA_ALIGNMENT_USED_RIGHT 4
1193 #define PPT_TEXTOBJ_FLAGS_PARA_ALIGNMENT_USED_BLOCK 8
1194 #define PPT_TEXTOBJ_FLAGS_VERTICAL 16
1196 struct ImplPPTTextObj
: public salhelper::SimpleReferenceObject
1198 sal_uInt32 mnShapeId
;
1199 sal_uInt32 mnShapeMaster
;
1200 std::unique_ptr
<PptOEPlaceholderAtom
> mpPlaceHolderAtom
;
1201 TSS_Type mnInstance
;
1202 TSS_Type mnDestinationInstance
;
1203 MSO_SPT meShapeType
;
1205 sal_uInt32 mnCurrentObject
;
1206 sal_uInt32 mnParagraphCount
;
1207 std::vector
<std::unique_ptr
<PPTParagraphObj
>>
1209 PptSlidePersistEntry
& mrPersistEntry
;
1211 sal_uInt32 mnTextFlags
;
1213 explicit ImplPPTTextObj( PptSlidePersistEntry
& rPersistEntry
)
1216 , mnInstance(TSS_Type::PageTitle
)
1217 , mnDestinationInstance(TSS_Type::PageTitle
)
1218 , meShapeType(mso_sptMin
)
1219 , mnCurrentObject(0)
1220 , mnParagraphCount(0)
1221 , mrPersistEntry ( rPersistEntry
)
1222 , mnTextFlags(0) {};
1225 class MSFILTER_DLLPUBLIC PPTTextObj
1227 rtl::Reference
<ImplPPTTextObj
> mxImplTextObj
;
1232 SdrPowerPointImport
&,
1233 PptSlidePersistEntry
&,
1236 PPTTextObj( PPTTextObj
const & rTextObj
);
1239 sal_uInt32
GetCurrentIndex() const { return mxImplTextObj
->mnCurrentObject
; };
1240 sal_uInt32
Count() const { return mxImplTextObj
->mnParagraphCount
; };
1241 PPTParagraphObj
* First();
1242 PPTParagraphObj
* Next();
1243 MSO_SPT
GetShapeType() const { return mxImplTextObj
->meShapeType
; };
1244 TSS_Type
GetInstance() const { return mxImplTextObj
->mnInstance
; };
1245 void SetInstance( TSS_Type nInstance
)
1246 { mxImplTextObj
->mnInstance
= nInstance
; }
1248 TSS_Type
GetDestinationInstance() const
1249 { return mxImplTextObj
->mnDestinationInstance
; }
1251 void SetDestinationInstance( TSS_Type nInstance
)
1252 { mxImplTextObj
->mnDestinationInstance
= nInstance
; }
1254 PptOEPlaceholderAtom
* GetOEPlaceHolderAtom() const { return mxImplTextObj
->mpPlaceHolderAtom
.get(); }
1255 sal_uInt32
GetTextFlags() const { return mxImplTextObj
->mnTextFlags
; }
1256 void SetVertical( bool bVertical
)
1259 mxImplTextObj
->mnTextFlags
|= PPT_TEXTOBJ_FLAGS_VERTICAL
;
1261 mxImplTextObj
->mnTextFlags
&= ~PPT_TEXTOBJ_FLAGS_VERTICAL
;
1263 bool GetVertical() const
1264 { return ( mxImplTextObj
->mnTextFlags
& PPT_TEXTOBJ_FLAGS_VERTICAL
) != 0; }
1266 const SfxItemSet
* GetBackground() const;
1268 PPTTextObj
& operator=( PPTTextObj
& rTextObj
);
1271 class PPTConvertOCXControls
: public SvxMSConvertOCXControls
1273 virtual void GetDrawPage() override
;
1274 PptPageKind ePageKind
;
1275 const SdrPowerPointImport
* mpPPTImporter
;
1278 PPTConvertOCXControls( const SdrPowerPointImport
* pPPTImporter
, const css::uno::Reference
< css::frame::XModel
>& rxModel
, PptPageKind ePKind
) :
1279 SvxMSConvertOCXControls ( rxModel
),
1280 ePageKind ( ePKind
),
1281 mpPPTImporter ( pPPTImporter
)
1283 bool ReadOCXStream( tools::SvRef
<SotStorage
>& rSrc1
,
1284 css::uno::Reference
<css::drawing::XShape
> *pShapeRef
);
1285 virtual bool InsertControl(
1286 const css::uno::Reference
< css::form::XFormComponent
> &rFComp
,
1287 const css::awt::Size
& rSize
,
1288 css::uno::Reference
< css::drawing::XShape
> *pShape
,
1293 // PowerPoint record types
1294 #define PPT_PST_Document 1000
1295 #define PPT_PST_DocumentAtom 1001
1296 #define PPT_PST_SlideAtom 1007
1297 #define PPT_PST_NotesAtom 1009
1298 #define PPT_PST_Environment 1010
1299 #define PPT_PST_SlidePersistAtom 1011
1300 #define PPT_PST_SSSlideInfoAtom 1017
1301 #define PPT_PST_VBAInfo 1023
1302 #define PPT_PST_VBAInfoAtom 1024
1303 #define PPT_PST_SSDocInfoAtom 1025
1304 #define PPT_PST_ExObjList 1033
1305 #define PPT_PST_PPDrawingGroup 1035
1306 #define PPT_PST_PPDrawing 1036
1307 #define PPT_PST_GridSpacing10Atom 1037
1308 #define PPT_PST_NamedShows 1040
1309 #define PPT_PST_NamedShow 1041
1310 #define PPT_PST_NamedShowSlides 1042
1311 #define PPT_PST_List 2000
1312 #define PPT_PST_FontCollection 2005
1313 #define PPT_PST_SoundCollection 2020
1314 #define PPT_PST_Sound 2022
1315 #define PPT_PST_SoundData 2023
1316 #define PPT_PST_ColorSchemeAtom 2032
1318 // these atoms first was seen in ppt2000 in a private Tag atom
1319 #define PPT_PST_ExtendedBuGraContainer 2040 // consist of 4041
1320 #define PPT_PST_ExtendedBuGraAtom 2041 // the instance of this atom indices the current graphic
1322 #define PPT_PST_ExObjRefAtom 3009
1323 #define PPT_PST_OEPlaceholderAtom 3011
1324 #define PPT_PST_OutlineTextRefAtom 3998
1325 #define PPT_PST_TextHeaderAtom 3999
1326 #define PPT_PST_TextCharsAtom 4000
1327 #define PPT_PST_StyleTextPropAtom 4001
1328 #define PPT_PST_TxMasterStyleAtom 4003
1329 #define PPT_PST_TxPFStyleAtom 4005
1330 #define PPT_PST_TextRulerAtom 4006
1331 #define PPT_PST_TextBytesAtom 4008
1332 #define PPT_PST_TxSIStyleAtom 4009
1333 #define PPT_PST_TextSpecInfoAtom 4010
1335 // these atoms first was seen in ppt2000 in a private Tag atom
1336 #define PPT_PST_ExtendedParagraphAtom 4012
1337 #define PPT_PST_ExtendedParagraphMasterAtom 4013
1338 #define PPT_PST_ExtendedPresRuleContainer 4014 // consist of 4012, 4015,
1339 #define PPT_PST_ExtendedParagraphHeaderAtom 4015 // the instance of this atom indices the current presobj
1340 // the first sal_uInt32 in this atom indices the current slideId
1341 #define PPT_PST_TextDefaults9Atom 4016
1343 #define PPT_PST_FontEntityAtom 4023
1344 #define PPT_PST_CString 4026
1345 #define PPT_PST_ExOleObjAtom 4035
1346 #define PPT_PST_SrKinsoku 4040
1347 #define PPT_PST_ExEmbed 4044
1348 #define PPT_PST_ExHyperlinkAtom 4051
1349 #define PPT_PST_ExHyperlink 4055
1350 #define PPT_PST_SlideNumberMCAtom 4056
1351 #define PPT_PST_HeadersFooters 4057
1352 #define PPT_PST_HeadersFootersAtom 4058
1353 #define PPT_PST_TxInteractiveInfoAtom 4063
1354 #define PPT_PST_MasterText 4068
1355 #define PPT_PST_RecolorInfoAtom 4071
1356 #define PPT_PST_ExControl 4078
1357 #define PPT_PST_SlideListWithText 4080
1358 #define PPT_PST_AnimationInfoAtom 4081
1359 #define PPT_PST_InteractiveInfo 4082
1360 #define PPT_PST_InteractiveInfoAtom 4083
1361 #define PPT_PST_UserEditAtom 4085
1362 #define PPT_PST_CurrentUserAtom 4086
1363 #define PPT_PST_DateTimeMCAtom 4087
1364 #define PPT_PST_GenericDateMCAtom 4088
1365 #define PPT_PST_HeaderMCAtom 4089
1366 #define PPT_PST_FooterMCAtom 4090
1367 #define PPT_PST_ExMediaAtom 4100
1368 #define PPT_PST_ExVideo 4101
1369 #define PPT_PST_ExAviMovie 4102
1370 #define PPT_PST_ExMCIMovie 4103
1371 #define PPT_PST_AnimationInfo 4116
1372 #define PPT_PST_RTFDateTimeMCAtom 4117
1373 #define PPT_PST_ProgTags 5000
1374 #define PPT_PST_ProgBinaryTag 5002
1375 #define PPT_PST_BinaryTagData 5003
1376 #define PPT_PST_PersistPtrIncrementalBlock 6002
1378 // these atoms first was seen in ppt2000 in a private Tag atom
1379 #define PPT_PST_PresentationAdvisorFlags9Atom 6010
1380 #define PPT_PST_HtmlDocInfo9Atom 6011
1383 #define PPT_PST_HashCodeAtom 11008
1384 #define PPT_PST_BuildList 11010
1385 #define PPT_PST_Comment10 12000
1386 #define PPT_PST_CommentAtom10 12001
1387 #define PPT_PST_CommentIndex10 12004
1388 #define PPT_PST_SlideFlags10Atom 12010
1389 #define PPT_PST_SlideTime10Atom 12011
1390 #define PPT_PST_DocToolbarStates10Atom 14001
1392 // attributes for PptTextStyleSheet
1393 #define PPT_ParaAttr_BulletOn 0 //00000001
1394 #define PPT_ParaAttr_BuHardFont 1 //00000002
1395 #define PPT_ParaAttr_BuHardColor 2 //00000004
1396 #define PPT_ParaAttr_BuHardHeight 3 //00000008
1397 #define PPT_ParaAttr_BulletFont 4 //00000010
1398 #define PPT_ParaAttr_BulletColor 5 //00000020
1399 #define PPT_ParaAttr_BulletHeight 6 //00000040
1400 #define PPT_ParaAttr_BulletChar 7 //00000080
1401 #define PPT_ParaAttr_Adjust 11 //00000800 0000=Left, 0001=Center, 0002=Right, 0003=Block
1402 #define PPT_ParaAttr_LineFeed 12 //00001000
1403 #define PPT_ParaAttr_UpperDist 13 //00002000 is set to 0032 for TextFrames by default
1404 #define PPT_ParaAttr_LowerDist 14 //00004000
1405 #define PPT_ParaAttr_TextOfs 15 //00008000
1406 #define PPT_ParaAttr_BulletOfs 16 //00010000
1407 #define PPT_ParaAttr_DefaultTab 17 //00020000
1408 #define PPT_ParaAttr_AsianLB_1 18
1409 #define PPT_ParaAttr_AsianLB_2 19
1410 #define PPT_ParaAttr_AsianLB_3 20
1411 #define PPT_ParaAttr_BiDi 21 //00200000
1413 #define PPT_CharAttr_Bold 0 //00000001
1414 #define PPT_CharAttr_Italic 1 //00000002
1415 #define PPT_CharAttr_Underline 2 //00000004
1416 #define PPT_CharAttr_Shadow 4 //00000010
1417 #define PPT_CharAttr_Strikeout 8 //00000100
1418 #define PPT_CharAttr_Embossed 9 //00000200
1419 #define PPT_CharAttr_Font 16 //00010000
1420 #define PPT_CharAttr_AsianOrComplexFont 21 //00200000
1421 #define PPT_CharAttr_ANSITypeface 22 //00400000
1422 #define PPT_CharAttr_Symbol 23 //00800000
1423 #define PPT_CharAttr_FontHeight 17 //00020000
1424 #define PPT_CharAttr_FontColor 18 //00040000
1425 #define PPT_CharAttr_Escapement 19 //00080000
1427 // values for PptSlideLayoutAtom.eLayout
1428 enum class PptSlideLayout
1430 TITLESLIDE
= 0, // The slide is a title slide
1431 TITLEANDBODYSLIDE
= 1, // Title and body slide
1432 TITLEMASTERSLIDE
= 2, // Title master slide
1433 MASTERSLIDE
= 3, // Master slide layout
1434 MASTERNOTES
= 4, // Master notes layout
1435 NOTESTITLEBODY
= 5, // Notes title/body layout
1436 HANDOUTLAYOUT
= 6, // Handout layout, therefore it doesn't have placeholders except header, footer, and date
1437 ONLYTITLE
= 7, // Only title placeholder
1438 TWOCOLUMNSANDTITLE
= 8, // Body of the slide has 2 columns and a title
1439 TWOROWSANDTITLE
= 9, // Slide's body has 2 rows and a title
1440 RIGHTCOLUMN2ROWS
= 10, // Body contains 2 columns, right column has 2 rows
1441 LEFTCOLUMN2ROWS
= 11, // Body contains 2 columns, left column has 2 rows
1442 BOTTOMROW2COLUMNS
= 12, // Body contains 2 rows, bottom row has 2 columns
1443 TOPROW2COLUMN
= 13, // Body contains 2 rows, top row has 2 columns
1444 FOUROBJECTS
= 14, // 4 objects
1445 BIGOBJECT
= 15, // Big object
1446 BLANKSLIDE
= 16, // Blank slide
1447 TITLERIGHTBODYLEFT
= 17, // Vertical title on the right, body on the left
1448 TITLERIGHT2BODIESLEFT
= 18 // Vertical title on the right, body on the left split into 2 rows
1451 // the following table describes the placeholder id's (values from reality followed by values taken from the documentation)
1452 enum class PptPlaceholder
: sal_uInt8
1455 MASTERTITLE
= 1, // 1 Master title
1456 MASTERBODY
= 2, // 2 Master body
1457 MASTERCENTEREDTITLE
= 3, // 3 Master centered title
1458 MASTERSUBTITLE
= 4, // 10 Master subtitle
1459 MASTERNOTESSLIDEIMAGE
= 5, // 4 Master notes slide image
1460 MASTERNOTESBODYIMAGE
= 6, // 5 Master notes body image
1461 MASTERDATE
= 7, // 6 Master date
1462 MASTERSLIDENUMBER
= 8, // 7 Master slide number
1463 MASTERFOOTER
= 9, // 8 Master footer
1464 MASTERHEADER
= 10, // 9 Master header
1465 // 11 Generic text object
1466 TITLE
= 13, // 12 Title
1467 BODY
= 14, // 13 Body
1468 NOTESBODY
= 12, // 14 Notes body
1469 CENTEREDTITLE
= 15, // 15 Centered title
1470 SUBTITLE
= 16, // 16 Subtitle
1471 VERTICALTEXTTITLE
= 17, // 17 Vertical text title
1472 VERTICALTEXTBODY
= 18, // 18 Vertical text body
1473 NOTESSLIDEIMAGE
= 11, // 19 Notes slide image
1474 OBJECT
= 19, // 20 Object (no matter the size)
1475 GRAPH
= 20, // 21 Graph
1476 TABLE
= 21, // 22 Table
1477 CLIPART
= 22, // 23 Clip Art
1478 ORGANISZATIONCHART
= 23, // 24 Organization Chart
1479 MEDIACLIP
= 24 // 25 Media Clip
1482 #endif // INCLUDED_FILTER_MSFILTER_SVDFPPT_HXX
1484 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */