Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
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/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
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 .
18 : */
19 :
20 : #ifndef INCLUDED_FILTER_MSFILTER_SVDFPPT_HXX
21 : #define INCLUDED_FILTER_MSFILTER_SVDFPPT_HXX
22 :
23 : #include <rtl/ustring.hxx>
24 : #include <tools/solar.h>
25 : #include <tools/gen.hxx>
26 : #include <tools/color.hxx>
27 : #include <svx/svdobj.hxx>
28 : #include <editeng/numitem.hxx>
29 : #include <editeng/editdata.hxx>
30 : #include <filter/msfilter/msdffimp.hxx>
31 : #include <filter/msfilter/msocximex.hxx>
32 : #include <editeng/eeitem.hxx>
33 : #define ITEMID_FIELD EE_FEATURE_FIELD
34 : #include <editeng/flditem.hxx>
35 : #undef ITEMID_FIELD
36 : #include <filter/msfilter/msfilterdllapi.h>
37 : #include <vcl/font.hxx>
38 : #include <vector>
39 : #include <boost/noncopyable.hpp>
40 : #include <boost/optional.hpp>
41 : #include <boost/ptr_container/ptr_vector.hpp>
42 :
43 : class SdrModel;
44 : class SdPage;
45 : class SdrPage;
46 : class SdrObject;
47 : class SvStream;
48 : class Polygon;
49 : namespace tools { class PolyPolygon; }
50 : class SfxItemSet;
51 : class Outliner;
52 : class Graphic;
53 : class SvxMSDffManager;
54 : class PPTTextObj;
55 : class DffRecordHeader;
56 : class SvxBulletItem;
57 :
58 : #define PPT_IMPORTFLAGS_NO_TEXT_ASSERT 1
59 :
60 20 : struct MSFILTER_DLLPUBLIC PptCurrentUserAtom
61 : {
62 : sal_uInt32 nMagic;
63 : sal_uInt32 nCurrentUserEdit;
64 : sal_uInt16 nDocFileVersion;
65 : sal_uInt8 nMajorVersion;
66 : sal_uInt8 nMinorVersion;
67 : OUString aCurrentUser;
68 :
69 : public:
70 :
71 20 : PptCurrentUserAtom() : nMagic ( 0 ),
72 : nCurrentUserEdit ( 0 ),
73 : nDocFileVersion ( 0 ),
74 : nMajorVersion ( 0 ),
75 20 : nMinorVersion ( 0 ) {}
76 :
77 : MSFILTER_DLLPUBLIC friend SvStream& ReadPptCurrentUserAtom( SvStream& rIn, PptCurrentUserAtom& rAtom );
78 : };
79 :
80 20 : struct MSFILTER_DLLPUBLIC PowerPointImportParam
81 : {
82 : SvStream& rDocStream;
83 : sal_uInt32 nImportFlags;
84 : PptCurrentUserAtom aCurrentUserAtom;
85 :
86 : PowerPointImportParam( SvStream& rDocStream, sal_uInt32 nImportFlags );
87 : };
88 :
89 0 : struct SdHyperlinkEntry
90 : {
91 : sal_uInt32 nIndex;
92 : sal_Int32 nPrivate1;
93 : sal_Int32 nPrivate2;
94 : sal_Int32 nPrivate3;
95 : sal_Int32 nInfo;
96 : OUString aTarget;
97 : OUString aSubAdress;
98 :
99 : sal_Int32 nStartPos;
100 : sal_Int32 nEndPos;
101 :
102 : OUString aConvSubString;
103 : ESelection aESelection;
104 : bool bSelection;
105 : };
106 :
107 : // Helper class for reading the PPT InteractiveInfoAtom
108 : struct MSFILTER_DLLPUBLIC PptInteractiveInfoAtom
109 : {
110 : sal_uInt32 nSoundRef;
111 : sal_uInt32 nExHyperlinkId;
112 : sal_uInt8 nAction;
113 : sal_uInt8 nOleVerb;
114 : sal_uInt8 nJump;
115 : sal_uInt8 nFlags;
116 : sal_uInt8 nHyperlinkType;
117 :
118 : // unknown, because total size is 16
119 : sal_uInt8 nUnknown1;
120 : sal_uInt8 nUnknown2;
121 : sal_uInt8 nUnknown3;
122 :
123 : public:
124 :
125 : MSFILTER_DLLPUBLIC friend SvStream& ReadPptInteractiveInfoAtom( SvStream& rIn, PptInteractiveInfoAtom& rAtom );
126 : };
127 :
128 : enum PptPageKind { PPT_MASTERPAGE, PPT_SLIDEPAGE, PPT_NOTEPAGE };
129 :
130 : enum PptPageFormat
131 : { PPTPF_SCREEN,
132 : PPTPF_USLETTER, // 8.5x11"
133 : PPTPF_A4, // 210x297mm
134 : PPTPF_35MMDIA, // DIA
135 : PPTPF_OVERHEAD,
136 : PPTPF_CUSTOM
137 : };
138 :
139 : // values for PPT_PST_TextHeaderAtom's sal_uLong
140 : enum PPT_TextHeader
141 : {
142 : PPTTH_TITLE,
143 : PPTTH_BODY,
144 : PPTTH_NOTES,
145 : PPTTH_NOTUSED,
146 : PPTTH_OTHER, // Text in a Shape
147 : PPTTH_CENTERBODY, // Subtitle in Title-Slide
148 : PPTTH_CENTERTITLE, // Title in Title-Slide
149 : PPTTH_HALFBODY, // Body in two-column slide
150 : PPTTH_QUARTERBODY // Body in four-body slide
151 : };
152 :
153 : #define TSS_TYPE_PAGETITLE (0)
154 : #define TSS_TYPE_BODY (1)
155 : #define TSS_TYPE_NOTES (2)
156 : #define TSS_TYPE_UNUSED (3)
157 : #define TSS_TYPE_TEXT_IN_SHAPE (4)
158 : #define TSS_TYPE_SUBTITLE (5)
159 : #define TSS_TYPE_TITLE (6)
160 : #define TSS_TYPE_HALFBODY (7)
161 : #define TSS_TYPE_QUARTERBODY (8)
162 :
163 : // Inventor-Id for PPT UserData
164 : const sal_uInt32 PPTInventor = sal_uInt32('P') * 0x00000001
165 : + sal_uInt32('P') * 0x00000100
166 : + sal_uInt32('T') * 0x00010000
167 : + sal_uInt32('0') * 0x01000000;
168 :
169 : // Object IDs for StarDraw UserData
170 : #define PPT_OBJECTINFO_ID (1)
171 :
172 20 : struct MSFILTER_DLLPUBLIC PptDocumentAtom
173 : {
174 : Size aSlidesPageSize; // page size of the slides in 576DPI
175 : Size aNotesPageSize; // page size of the notes in 576DPI
176 : // avoid RatioAtom for the time being
177 : sal_uInt32 nNotesMasterPersist; // 0=non-existent
178 : sal_uInt32 nHandoutMasterPersist; // 0=non-existent
179 : sal_uInt16 n1stPageNumber; // page number of the first slide
180 : PptPageFormat eSlidesPageFormat; // page format of the slides
181 : bool bEmbeddedTrueType : 1; // TrueType direcly within the File?
182 : bool bTitlePlaceholdersOmitted : 1;
183 : bool bRightToLeft : 1;
184 : bool bShowComments : 1;
185 :
186 : public:
187 :
188 : Size GetPageSize( const Size& rSiz ) const;
189 112 : Size GetSlidesPageSize() const { return GetPageSize( aSlidesPageSize ); }
190 130 : Size GetNotesPageSize() const { return GetPageSize( aNotesPageSize ); }
191 :
192 : friend SvStream& ReadPptDocumentAtom( SvStream& rIn, PptDocumentAtom& rAtom );
193 : };
194 :
195 : struct PptSlideLayoutAtom
196 : {
197 : sal_Int32 eLayout; // 0..18
198 : sal_uInt8 aPlaceholderId[ 8 ];
199 :
200 : public:
201 176 : PptSlideLayoutAtom() { Clear(); }
202 : void Clear();
203 :
204 : // SlideLayoutAtom is read without header!
205 : friend SvStream& ReadPptSlideLayoutAtom( SvStream& rIn, PptSlideLayoutAtom& rAtom );
206 : };
207 :
208 : struct PptSlideAtom
209 : {
210 : PptSlideLayoutAtom aLayout;
211 : sal_uInt32 nMasterId;
212 : sal_uInt32 nNotesId;
213 : sal_uInt16 nFlags;
214 :
215 : public:
216 176 : PptSlideAtom() { Clear(); }
217 : void Clear();
218 :
219 : friend SvStream& ReadPptSlideAtom(SvStream& rIn, PptSlideAtom& rAtom);
220 : };
221 :
222 : struct PptSlidePersistAtom
223 : {
224 : sal_uInt32 nPsrReference;
225 : sal_uInt32 nFlags;
226 : sal_uInt32 nNumberTexts;
227 : sal_uInt32 nSlideId;
228 : sal_uInt32 nReserved; // we will use nReserved temporarly to set the offset to SSSlideInfoAtom ( if possible )
229 :
230 : public:
231 176 : PptSlidePersistAtom() { Clear(); }
232 : void Clear();
233 :
234 : friend SvStream& ReadPptSlidePersistAtom(SvStream& rIn, PptSlidePersistAtom& rAtom);
235 : };
236 :
237 : struct PptNotesAtom
238 : {
239 : sal_uInt32 nSlideId;
240 : sal_uInt16 nFlags;
241 :
242 : public:
243 176 : PptNotesAtom() { Clear(); }
244 : void Clear();
245 :
246 : friend SvStream& ReadPptNotesAtom(SvStream& rIn, PptNotesAtom& rAtom);
247 : };
248 :
249 : struct PptColorSchemeAtom
250 : {
251 : sal_uInt8 aData[32];
252 :
253 : public:
254 196 : PptColorSchemeAtom () { Clear(); }
255 : void Clear();
256 : Color GetColor( sal_uInt16 nNum ) const;
257 :
258 : friend SvStream& ReadPptColorSchemeAtom(SvStream& rIn, PptColorSchemeAtom& rAtom);
259 : };
260 :
261 136 : struct PptFontEntityAtom
262 : {
263 : OUString aName;
264 : double fScaling;
265 : sal_uInt8 lfClipPrecision;
266 : sal_uInt8 lfQuality;
267 :
268 : sal_uInt32 nUniqueFontId; // not used anymore
269 : rtl_TextEncoding eCharSet;
270 : FontFamily eFamily;
271 : FontPitch ePitch;
272 : bool bAvailable;
273 :
274 : friend SvStream& ReadPptFontEntityAtom(SvStream& rIn, PptFontEntityAtom& rAtom);
275 : };
276 :
277 : class PptFontCollection;
278 : struct PptUserEditAtom
279 : {
280 : DffRecordHeader aHd;
281 : sal_Int32 nLastSlideID; // ID of last visible slide
282 : sal_uInt32 nVersion; // This is major/minor/build which did the edit
283 : sal_uInt32 nOffsetLastEdit; // File offset of prev PptUserEditAtom
284 : sal_uInt32 nOffsetPersistDirectory; // Offset to PersistPtrs for this file version.
285 : sal_uInt32 nDocumentRef;
286 : sal_uInt32 nMaxPersistWritten; // total number of Persist entries up to this point
287 : sal_Int16 eLastViewType; // enum view type
288 :
289 : public:
290 20 : PptUserEditAtom()
291 : : nLastSlideID( 0 )
292 : , nVersion( 0 )
293 : , nOffsetLastEdit( 0 )
294 : , nOffsetPersistDirectory( 0 )
295 : , nDocumentRef( 0 )
296 : , nMaxPersistWritten( 0 )
297 20 : , eLastViewType( 0 )
298 20 : {}
299 :
300 : friend SvStream& ReadPptUserEditAtom( SvStream& rIn, PptUserEditAtom& rAtom );
301 : };
302 :
303 : struct PptOEPlaceholderAtom
304 : {
305 : sal_uInt32 nPlacementId;
306 : sal_uInt8 nPlaceholderId;
307 : sal_uInt8 nPlaceholderSize; // 0=Full size, 1=Half size, 2=Quarter of Slide
308 :
309 : public:
310 2874 : PptOEPlaceholderAtom() { Clear(); }
311 : void Clear();
312 :
313 : friend SvStream& ReadPptOEPlaceholderAtom( SvStream& rIn, PptOEPlaceholderAtom& rAtom );
314 : };
315 :
316 : struct ProcessData;
317 : struct PPTStyleSheet;
318 : struct HeaderFooterEntry;
319 : struct PptSlidePersistEntry : private boost::noncopyable
320 : {
321 : PptSlidePersistAtom aPersistAtom;
322 : PptSlideAtom aSlideAtom;
323 : PptNotesAtom aNotesAtom;
324 : PptColorSchemeAtom aColorScheme; // each slide includes this colorscheme atom
325 : PPTStyleSheet* pStyleSheet; // stylesheet of this page (only in masterpages), since XP supports more than one masterpage
326 :
327 : sal_uInt32 HeaderFooterOfs[ 4 ]; // containing the ofs to the placeholder (only masterpage)
328 : HeaderFooterEntry* pHeaderFooterEntry;
329 : SvxMSDffSolverContainer* pSolverContainer;
330 : sal_uInt32 nSlidePersistStartOffset;// is an array to the end of the SlidePersistAtom of this page, TextHeaderAtom is following
331 : sal_uInt32 nSlidePersistEndOffset;
332 : sal_uInt32 nBackgroundOffset; // fileoffset
333 : sal_uInt32 nDrawingDgId; // valid, if not -1
334 : sal_uInt32* pPresentationObjects; // if valid, this is a pointer to an array that includes the offsets to the presentation objects
335 : // on this masterpage for each instance (0 - 8);
336 : SdrObject* pBObj;
337 : bool bBObjIsTemporary;
338 :
339 : PptPageKind ePageKind;
340 :
341 : bool bNotesMaster : 1; // for NotesMaster
342 : bool bHandoutMaster : 1; // for HandoutMaster
343 : bool bStarDrawFiller : 1; // special for StarDraw
344 : public:
345 : PptSlidePersistEntry();
346 : ~PptSlidePersistEntry();
347 1332 : sal_uInt32 GetSlideId() const { return aPersistAtom.nSlideId; }
348 : };
349 :
350 : #define PPTSLIDEPERSIST_ENTRY_NOTFOUND 0xFFFF
351 :
352 : class MSFILTER_DLLPUBLIC PptSlidePersistList: private boost::noncopyable
353 : {
354 : private:
355 : boost::ptr_vector<PptSlidePersistEntry> mvEntries;
356 :
357 : public:
358 : PptSlidePersistList();
359 : ~PptSlidePersistList();
360 :
361 3540 : size_t size() const { return mvEntries.size(); }
362 : bool is_null( size_t nIdx ) const { return mvEntries.is_null( nIdx ); }
363 : const PptSlidePersistEntry& operator[]( size_t nIdx ) const { return mvEntries[ nIdx ]; }
364 3672 : PptSlidePersistEntry& operator[]( size_t nIdx ) { return mvEntries[ nIdx ]; }
365 38 : boost::ptr_vector<PptSlidePersistEntry>::iterator begin() { return mvEntries.begin(); }
366 38 : void insert( boost::ptr_vector<PptSlidePersistEntry>::iterator it,
367 : PptSlidePersistEntry* pEntry )
368 : {
369 38 : mvEntries.insert(it, pEntry);
370 38 : }
371 138 : void push_back( PptSlidePersistEntry* pEntry ) { mvEntries.push_back(pEntry); }
372 :
373 : sal_uInt16 FindPage( sal_uInt32 nId ) const;
374 : };
375 :
376 : class SfxObjectShell;
377 : struct PPTOleEntry
378 : {
379 : sal_uInt32 nId; // OleId
380 : sal_uInt32 nPersistPtr; // PersistPtr
381 : sal_uInt32 nRecHdOfs; // points to the record header: ExObjListHd
382 : SfxObjectShell* pShell;
383 : sal_uInt16 nType; // maybe PPT_PST_ExEmbed or PPT_PST_ExControl
384 : sal_uInt32 nAspect; // the aspect of the OLE object
385 :
386 8 : PPTOleEntry( sal_uInt32 nid, sal_uInt32 nOfs, SfxObjectShell* pSh, sal_uInt16 nT, sal_uInt32 nAsp )
387 : : nId(nid)
388 : , nPersistPtr(0)
389 : , nRecHdOfs(nOfs)
390 : , pShell(pSh)
391 : , nType(nT)
392 8 : , nAspect(nAsp)
393 8 : {}
394 : };
395 :
396 : struct PptExOleObjAtom
397 : {
398 : sal_uInt32 nAspect;
399 : sal_uInt32 nId;
400 : sal_uInt32 nPersistPtr;
401 :
402 : public:
403 :
404 : friend SvStream& ReadPptExOleObjAtom( SvStream& rIn, PptExOleObjAtom& rAtom );
405 : };
406 :
407 : typedef ::std::vector< PPTOleEntry* > PPTOleEntryList;
408 : class PPTExtParaProv;
409 : class MSFILTER_DLLPUBLIC SdrEscherImport : public SvxMSDffManager
410 : {
411 : protected:
412 :
413 : friend class PPTTextObj;
414 : friend class PPTPortionObj;
415 : friend struct PPTStyleTextPropReader;
416 : friend class ImplSdPPTImport;
417 :
418 : PptDocumentAtom aDocAtom;
419 : DffRecordManager aDocRecManager; // contains all first level container and atoms of the document container
420 :
421 : PPTOleEntryList aOleObjectList; // contains PPTOleEntrys
422 :
423 : PptFontCollection* pFonts;
424 :
425 : sal_uInt32 nStreamLen;
426 : sal_uInt16 nTextStylesIndex;
427 :
428 : rtl_TextEncoding eCharSetSystem;
429 :
430 : bool bWingdingsChecked : 1;
431 : bool bWingdingsAvailable : 1;
432 : bool bMonotypeSortsChecked : 1;
433 : bool bMonotypeSortsAvailable : 1;
434 : bool bTimesNewRomanChecked : 1;
435 : bool bTimesNewRomanAvailable : 1;
436 :
437 : bool ReadString( OUString& rStr ) const;
438 : // only for PowerPoint filter:
439 : virtual const PptSlideLayoutAtom* GetSlideLayoutAtom() const;
440 :
441 : public:
442 : using SvxMSDffManager::ReadObjText;
443 :
444 : PowerPointImportParam& rImportParam;
445 :
446 : SdrEscherImport( PowerPointImportParam&, const OUString& rBaseURL );
447 : virtual ~SdrEscherImport();
448 : virtual bool GetColorFromPalette( sal_uInt16 nNum, Color& rColor ) const SAL_OVERRIDE;
449 : virtual bool SeekToShape( SvStream& rSt, void* pClientData, sal_uInt32 nId ) const SAL_OVERRIDE;
450 : PptFontEntityAtom* GetFontEnityAtom( sal_uInt32 nNum ) const;
451 : void RecolorGraphic( SvStream& rSt, sal_uInt32 nRecLen, Graphic& rGraph );
452 : virtual SdrObject* ReadObjText( PPTTextObj* pTextObj, SdrObject* pObj, SdPage* pPage ) const;
453 : virtual SdrObject* ProcessObj( SvStream& rSt, DffObjData& rData, void* pData, Rectangle& rTextRect, SdrObject* pObj ) SAL_OVERRIDE;
454 : virtual void ProcessClientAnchor2( SvStream& rSt, DffRecordHeader& rHd, void* pData, DffObjData& rObj ) SAL_OVERRIDE;
455 : void ImportHeaderFooterContainer( DffRecordHeader& rHeader, HeaderFooterEntry& rEntry );
456 : };
457 :
458 :
459 :
460 : #define SD_HEADERFOOTER_DATE 1
461 : #define SD_HEADERFOOTER_TODAYDATE 2
462 : #define SD_HEADERFOOTER_USERDATE 4
463 : #define SD_HEADERFOOTER_SLIDENUMBER 8
464 : #define SD_HEADERFOOTER_HEADER 16
465 : #define SD_HEADERFOOTER_FOOTER 32
466 :
467 : class SvxFieldItem;
468 : struct MSFILTER_DLLPUBLIC PPTFieldEntry
469 : {
470 : sal_uInt16 nPos;
471 : sal_uInt16 nTextRangeEnd;
472 : SvxFieldItem* pField1;
473 : SvxFieldItem* pField2;
474 : OUString* pString;
475 :
476 108 : PPTFieldEntry() : nPos( 0 ), nTextRangeEnd( 0 ), pField1( NULL ), pField2( NULL ), pString( NULL ) {};
477 : ~PPTFieldEntry();
478 :
479 : void SetDateTime( sal_uInt32 nType );
480 :
481 : // converting PPT date time format:
482 : static void GetDateTime(
483 : const sal_uInt32 nVal,
484 : SvxDateFormat& eDateFormat,
485 : SvxTimeFormat& eTimeFormat
486 : );
487 : };
488 :
489 58 : struct MSFILTER_DLLPUBLIC HeaderFooterEntry
490 : {
491 : const PptSlidePersistEntry* pMasterPersist;
492 : OUString pPlaceholder[ 4 ];
493 : sal_uInt32 nAtom;
494 :
495 : sal_uInt32 GetMaskForInstance( sal_uInt32 nInstance );
496 : sal_uInt32 IsToDisplay( sal_uInt32 nInstance );
497 : sal_uInt32 NeedToImportInstance(
498 : const sal_uInt32 nInstance,
499 : const PptSlidePersistEntry& rSlidePersist
500 : );
501 :
502 : explicit HeaderFooterEntry( const PptSlidePersistEntry* pMaster = NULL );
503 : ~HeaderFooterEntry();
504 : };
505 :
506 : struct ProcessData
507 : {
508 : PptSlidePersistEntry& rPersistEntry;
509 : SdPage* pPage;
510 : ::std::vector< SdrObject* > aBackgroundColoredObjects;
511 : sal_uInt32* pTableRowProperties;
512 :
513 162 : ProcessData( PptSlidePersistEntry& rP, SdPage* pP ) :
514 : rPersistEntry ( rP ),
515 : pPage ( pP ),
516 162 : pTableRowProperties ( NULL ) {};
517 162 : ~ProcessData() { delete[] pTableRowProperties; };
518 : };
519 :
520 :
521 :
522 : typedef ::std::vector< SdHyperlinkEntry* > SdHyperlinkEntryList;
523 : class SdrTextObj;
524 : class SfxObjectShell;
525 :
526 : class MSFILTER_DLLPUBLIC SdrPowerPointImport : public SdrEscherImport
527 : {
528 : protected:
529 :
530 : friend class PPTTextObj;
531 : friend class PPTExtParaProv;
532 : friend struct PPTStyleSheet;
533 : friend class PPTNumberFormatCreator;
534 :
535 : bool bOk;
536 : PptUserEditAtom aUserEditAtom;
537 : PptColorSchemeAtom aPageColors;
538 : SdHyperlinkEntryList aHyperList;
539 : sal_uInt32* pPersistPtr;
540 : sal_uLong nPersistPtrAnz;
541 :
542 : const PPTStyleSheet* pPPTStyleSheet; // this is the current stylesheet;
543 : const PPTStyleSheet* pDefaultSheet; // this is a sheet we are using if no masterpage can be found, but that should
544 : // never happen just preventing a crash
545 : PptSlidePersistList* pMasterPages;
546 : PptSlidePersistList* pSlidePages;
547 : PptSlidePersistList* pNotePages;
548 : sal_uInt16 nAktPageNum;
549 : sal_uLong nDocStreamPos;
550 : sal_uInt16 nPageColorsNum;
551 : PptPageKind ePageColorsKind;
552 : PptPageKind eAktPageKind;
553 :
554 : protected:
555 : using SdrEscherImport::ReadObjText;
556 :
557 : bool SeekToAktPage(DffRecordHeader* pRecHd=NULL) const;
558 : bool SeekToDocument(DffRecordHeader* pRecHd=NULL) const;
559 : bool SeekToContentOfProgTag(
560 : sal_Int32 nVersion,
561 : SvStream& rSt,
562 : const DffRecordHeader& rProgTagBinaryDataHd,
563 : DffRecordHeader& rContentHd
564 : );
565 : virtual SdrObject* ApplyTextObj(
566 : PPTTextObj* pTextObj,
567 : SdrTextObj* pText,
568 : SdPage* pPage,
569 : SfxStyleSheet*,
570 : SfxStyleSheet** )
571 : const;
572 : virtual SdrObject* ReadObjText( PPTTextObj* pTextObj, SdrObject* pObj, SdPage* pPage ) const SAL_OVERRIDE;
573 : // #i32596# - new parameter <_nCalledByGroup>, which
574 : // indicates, if the OLE object is imported inside a group object.
575 : virtual SdrObject* ImportOLE(
576 : long nOLEId,
577 : const Graphic& rGraf,
578 : const Rectangle& rBoundRect,
579 : const Rectangle& rVisArea,
580 : const int _nCalledByGroup,
581 : sal_Int64 nAspect
582 : ) const SAL_OVERRIDE;
583 : SvMemoryStream* ImportExOleObjStg( sal_uInt32 nPersistPtr, sal_uInt32& nOleId ) const;
584 : SdrPage* MakeBlancPage(bool bMaster) const;
585 : bool ReadFontCollection();
586 : bool ForceFontCollection() const
587 : { return pFonts!=NULL?sal_True:((SdrPowerPointImport*)this)->ReadFontCollection(); }
588 : PptSlidePersistList* GetPageList(PptPageKind ePageKind) const;
589 : sal_uInt32 GetAktPageId();
590 : sal_uInt32 GetMasterPageId(sal_uInt16 nPageNum, PptPageKind ePageKind) const;
591 : sal_uInt32 GetNotesPageId(sal_uInt16 nPageNum ) const;
592 : SdrOutliner* GetDrawOutliner( SdrTextObj* pSdrText ) const;
593 : void SeekOle( SfxObjectShell* pShell, sal_uInt32 nFilterOptions );
594 :
595 : void ApplyTextAnchorAttributes( PPTTextObj& rTextObj, SfxItemSet& rSet ) const;
596 : bool IsVerticalText() const;
597 :
598 : public:
599 : SdrPowerPointImport( PowerPointImportParam&, const OUString& rBaseURL );
600 : virtual ~SdrPowerPointImport();
601 : sal_uInt16 GetPageCount( PptPageKind eKind = PPT_SLIDEPAGE ) const;
602 : void SetPageNum( sal_uInt16 nPageNum, PptPageKind = PPT_SLIDEPAGE );
603 : sal_uInt16 GetPageNum() const { return nAktPageNum; }
604 : PptPageKind GetPageKind() const { return eAktPageKind; }
605 : Size GetPageSize() const;
606 : SdrObject* ImportPageBackgroundObject(
607 : const SdrPage& rPage,
608 : sal_uInt32& nBgFileOffset,
609 : bool bForce
610 : );
611 : bool IsNoteOrHandout( sal_uInt16 nPageNum, PptPageKind ePageKind ) const;
612 : bool HasMasterPage(
613 : sal_uInt16 nPageNum,
614 : PptPageKind ePageKind = PPT_SLIDEPAGE
615 : ) const;
616 : sal_uInt16 GetMasterPageIndex(
617 : sal_uInt16 nPageNum,
618 : PptPageKind ePageKind = PPT_SLIDEPAGE
619 : ) const;
620 :
621 : void ImportPage( SdrPage* pPage, const PptSlidePersistEntry* pMasterPersist = NULL );
622 : virtual bool GetColorFromPalette(sal_uInt16 nNum, Color& rColor) const SAL_OVERRIDE;
623 : virtual bool SeekToShape( SvStream& rSt, void* pClientData, sal_uInt32 nId ) const SAL_OVERRIDE;
624 : sal_Unicode PPTSubstitute(
625 : sal_uInt16 nFont,
626 : sal_Unicode nChar,
627 : sal_uInt32& nMappedFontId,
628 : vcl::Font& rFont,
629 : char nDefault
630 : ) const;
631 : const PptDocumentAtom& GetDocumentAtom() const { return aDocAtom; }
632 : virtual const PptSlideLayoutAtom* GetSlideLayoutAtom() const SAL_OVERRIDE;
633 : SdrObject* CreateTable(
634 : SdrObject* pGroupObject,
635 : sal_uInt32* pTableArry,
636 : SvxMSDffSolverContainer*
637 : );
638 : virtual bool ReadFormControl( SotStorageRef& rSrc1, com::sun::star::uno::Reference< com::sun::star::form::XFormComponent > & rFormComp ) const = 0;
639 : };
640 :
641 : struct PPTTextCharacterStyleAtomInterpreter
642 : {
643 : sal_uInt16 nFlags1;
644 : sal_uInt16 nFlags2;
645 : sal_uInt16 nFlags3;
646 : sal_Int32 n1;
647 : sal_uInt16 nFontHeight;
648 : sal_Int32 nFontColor;
649 :
650 : PPTTextCharacterStyleAtomInterpreter();
651 : ~PPTTextCharacterStyleAtomInterpreter();
652 :
653 : bool Read( SvStream& rIn, const DffRecordHeader& rRecHd );
654 :
655 : sal_uInt32 GetColor( sal_uInt32 nDefault );
656 : };
657 :
658 : struct PPTTextParagraphStyleAtomInterpreter
659 : {
660 : bool bValid;
661 : bool bForbiddenRules;
662 : bool bHangingPunctuation;
663 : bool bLatinTextWrap;
664 :
665 : PPTTextParagraphStyleAtomInterpreter();
666 : ~PPTTextParagraphStyleAtomInterpreter();
667 :
668 : bool Read( SvStream& rIn, const DffRecordHeader& rRecHd );
669 : };
670 :
671 : struct PPTTextSpecInfo
672 : {
673 : sal_uInt32 nCharIdx;
674 : sal_uInt16 nLanguage[ 3 ];
675 : sal_uInt16 nDontKnow;
676 :
677 : explicit PPTTextSpecInfo( sal_uInt32 nCharIdx );
678 : ~PPTTextSpecInfo();
679 : };
680 :
681 : typedef ::std::vector< PPTTextSpecInfo* > PPTTextSpecInfoList;
682 : struct PPTTextSpecInfoAtomInterpreter
683 : {
684 : bool bValid;
685 : PPTTextSpecInfoList aList;
686 :
687 : PPTTextSpecInfoAtomInterpreter();
688 : ~PPTTextSpecInfoAtomInterpreter();
689 :
690 : bool Read(
691 : SvStream& rIn,
692 : const DffRecordHeader& rRecHd,
693 : sal_uInt16 nRecordType,
694 : const PPTTextSpecInfo* pTextSpecDefault = NULL
695 : );
696 :
697 : };
698 :
699 : #define PPT_STYLESHEETENTRYS 9
700 :
701 : struct PPTExtParaLevel
702 : {
703 : sal_uInt32 mnExtParagraphMask;
704 : sal_uInt16 mnBuBlip;
705 : sal_uInt16 mnHasAnm;
706 : sal_uInt32 mnAnmScheme;
707 : sal_uInt32 mpfPP10Ext;
708 : sal_uInt32 mnExtCharacterMask;
709 : sal_uInt32 mcfPP10Ext;
710 : bool mbSet;
711 :
712 : PPTExtParaLevel();
713 : friend SvStream& ReadPPTExtParaLevel( SvStream& rIn, PPTExtParaLevel& rL );
714 : };
715 :
716 216 : struct PPTExtParaSheet
717 : {
718 : PPTExtParaLevel aExtParaLevel[ 5 ];
719 : };
720 :
721 0 : struct PPTBuGraEntry
722 : {
723 : sal_uInt32 nInstance;
724 : Graphic aBuGra;
725 :
726 : PPTBuGraEntry( Graphic& rGraphic, sal_uInt32 nInstance );
727 : };
728 :
729 : typedef ::std::vector< PPTBuGraEntry* > PPTBuGraEntryList;
730 :
731 : class PPTExtParaProv
732 : {
733 : PPTBuGraEntryList aBuGraList;
734 :
735 : public :
736 : bool bStyles;
737 : bool bGraphics;
738 : DffRecordManager aExtendedPresRules;
739 :
740 : PPTExtParaSheet aExtParaSheet[ PPT_STYLESHEETENTRYS ];
741 :
742 : bool GetGraphic( sal_uInt32 nInstance, Graphic& rGraphic ) const;
743 :
744 : PPTExtParaProv(
745 : SdrPowerPointImport& rManager,
746 : SvStream& rSt,
747 : const DffRecordHeader* pMainMasterHd
748 : );
749 : ~PPTExtParaProv();
750 : };
751 :
752 1080 : struct PPTCharLevel
753 : {
754 : Color mnFontColorInStyleSheet;
755 : sal_uInt32 mnFontColor;
756 : sal_uInt16 mnFlags;
757 : sal_uInt16 mnFont;
758 : sal_uInt16 mnAsianOrComplexFont;
759 : sal_uInt16 mnFontHeight;
760 : sal_uInt16 mnEscapement;
761 : };
762 :
763 : struct PPTCharSheet
764 : {
765 : PPTCharLevel maCharLevel[ 5 ];
766 :
767 : explicit PPTCharSheet( sal_uInt32 nInstance );
768 : PPTCharSheet( const PPTCharSheet& rCharSheet );
769 :
770 : void Read( SvStream& rIn, bool bMasterStyle, sal_uInt32 nLevel, bool bFirst );
771 : };
772 :
773 : struct PPTParaLevel
774 : {
775 : sal_uInt16 mnBuFlags;
776 : sal_uInt16 mnBulletChar;
777 : sal_uInt16 mnBulletFont;
778 : sal_uInt16 mnBulletHeight;
779 : sal_uInt32 mnBulletColor;
780 :
781 : sal_uInt16 mnAdjust;
782 : sal_uInt16 mnLineFeed;
783 : sal_uInt16 mnUpperDist;
784 : sal_uInt16 mnLowerDist;
785 : sal_uInt16 mnTextOfs;
786 : sal_uInt16 mnBulletOfs;
787 : sal_uInt16 mnDefaultTab;
788 : sal_uInt16 mnAsianLineBreak; // bit0: use asian rules for first and last character
789 : // 1: do not wrap latin text in the middle of the word
790 : // 2: allow hanging punctuation
791 : sal_uInt16 mnBiDi;
792 : };
793 :
794 : struct PPTParaSheet
795 : {
796 : public:
797 :
798 : PPTParaLevel maParaLevel[ 5 ];
799 :
800 : explicit PPTParaSheet( sal_uInt32 nInstance );
801 : PPTParaSheet( const PPTParaSheet& rParaSheet );
802 :
803 : bool Read(
804 : SdrPowerPointImport& rMan,
805 : SvStream& rIn,
806 : bool bMasterStyle,
807 : sal_uInt32 nLevel,
808 : bool bFirst
809 : );
810 : void UpdateBulletRelSize( sal_uInt32 nLevel, sal_uInt16 nFontHeight );
811 : };
812 :
813 : class PPTParagraphObj;
814 : class PPTNumberFormatCreator
815 : {
816 : sal_uInt32 nIsBullet;
817 : sal_uInt32 nBulletChar;
818 : sal_uInt32 nBulletFont;
819 : sal_uInt32 nBulletHeight;
820 : sal_uInt32 nBulletColor;
821 : sal_uInt32 nTextOfs;
822 : sal_uInt32 nBulletOfs;
823 :
824 : void ImplGetNumberFormat(
825 : SdrPowerPointImport& rMan,
826 : SvxNumberFormat& rNumberFormat,
827 : sal_uInt32 nLevel
828 : );
829 : bool ImplGetExtNumberFormat(
830 : SdrPowerPointImport& rMan,
831 : SvxNumberFormat& rNumberFormat,
832 : sal_uInt32 nLevel,
833 : sal_uInt32 nInstance,
834 : sal_uInt32 nInstanceInSheet,
835 : boost::optional< sal_Int16 >& rStartNumbering,
836 : sal_uInt32 nFontHeight,
837 : PPTParagraphObj* pPara
838 : );
839 :
840 : protected:
841 :
842 : PPTNumberFormatCreator( PPTExtParaProv* );
843 : ~PPTNumberFormatCreator();
844 :
845 : public:
846 :
847 : PPTExtParaProv* pExtParaProv;
848 :
849 : void GetNumberFormat(
850 : SdrPowerPointImport& rMan,
851 : SvxNumberFormat& rNumberFormat,
852 : sal_uInt32 nLevel,
853 : const PPTParaLevel& rParaLevel,
854 : const PPTCharLevel& rCharLevel,
855 : sal_uInt32 nInstance
856 : );
857 :
858 : bool GetNumberFormat(
859 : SdrPowerPointImport& rMan,
860 : SvxNumberFormat& rNumberFormat,
861 : PPTParagraphObj* pPara,
862 : sal_uInt32 nInstanceInSheet,
863 : boost::optional< sal_Int16 >& rStartNumbering
864 : );
865 : };
866 :
867 : class SvxNumBulletItem;
868 : struct PPTStyleSheet : public PPTNumberFormatCreator
869 : {
870 : PPTTextSpecInfo maTxSI;
871 : PPTCharSheet* mpCharSheet[ PPT_STYLESHEETENTRYS ];
872 : PPTParaSheet* mpParaSheet[ PPT_STYLESHEETENTRYS ];
873 : SvxNumBulletItem* mpNumBulletItem[ PPT_STYLESHEETENTRYS ];
874 :
875 : PPTStyleSheet(
876 : const DffRecordHeader& rSlideHd,
877 : SvStream& rSt, SdrPowerPointImport&,
878 : const PPTTextCharacterStyleAtomInterpreter&,
879 : const PPTTextParagraphStyleAtomInterpreter&,
880 : const PPTTextSpecInfo&
881 : );
882 : ~PPTStyleSheet();
883 : };
884 :
885 : struct ImplPPTParaPropSet
886 : {
887 : sal_uInt32 mnRefCount;
888 :
889 : sal_uInt16 mnDepth;
890 : sal_uInt32 mnAttrSet;
891 : sal_uInt32 mnBulletColor;
892 : sal_uInt16 mpArry[ 22 ];
893 :
894 : sal_uInt32 mnExtParagraphMask;
895 : sal_uInt32 mnAnmScheme;
896 : sal_uInt16 mnHasAnm;
897 : sal_uInt16 mnBuBlip;
898 :
899 : sal_uInt32 nDontKnow1;
900 : sal_uInt32 nDontKnow2;
901 : sal_uInt16 nDontKnow2bit06;
902 :
903 1702 : ImplPPTParaPropSet()
904 : : mnRefCount( 1 )
905 : , mnDepth( 0 )
906 : , mnAttrSet( 0 )
907 : , mnBulletColor( 0 )
908 : , mnExtParagraphMask( 0 )
909 : , mnAnmScheme( 0 )
910 : , mnHasAnm( 0 )
911 : , mnBuBlip( 0 )
912 : , nDontKnow1( 0 )
913 : , nDontKnow2( 0 )
914 1702 : , nDontKnow2bit06( 0 )
915 1702 : { }
916 : };
917 :
918 : struct PPTParaPropSet
919 : {
920 : sal_uInt32 mnOriginalTextPos;
921 : ImplPPTParaPropSet* pParaSet;
922 :
923 : PPTParaPropSet();
924 : PPTParaPropSet( PPTParaPropSet& rParaPropSet );
925 : ~PPTParaPropSet();
926 :
927 : PPTParaPropSet& operator=( PPTParaPropSet& rParaPropSet );
928 : };
929 :
930 : struct ImplPPTCharPropSet
931 : {
932 : sal_uInt32 mnRefCount;
933 :
934 : sal_uInt32 mnAttrSet;
935 : sal_uInt16 mnFlags;
936 : sal_uInt32 mnColor;
937 : sal_uInt16 mnFont;
938 : sal_uInt16 mnAsianOrComplexFont;
939 : sal_uInt16 mnANSITypeface;
940 : sal_uInt16 mnFontHeight;
941 : sal_uInt16 mnEscapement;
942 : sal_uInt16 mnSymbolFont;
943 :
944 2462 : ImplPPTCharPropSet()
945 : : mnRefCount ( 1 )
946 : , mnAttrSet( 0 )
947 : , mnFlags( 0 )
948 : , mnColor( 0 )
949 : , mnFont( 0 )
950 : , mnAsianOrComplexFont( 0 )
951 : , mnANSITypeface( 0 )
952 : , mnFontHeight( 0 )
953 : , mnEscapement( 0 )
954 2462 : , mnSymbolFont( 0)
955 2462 : { }
956 : };
957 :
958 : struct PPTCharPropSet
959 : {
960 : //when the bullet text has more than two color,next the text following with bullet has been set hyperlink.
961 : //now,the bullet color should be set original hyperlink text's color
962 : //so "mbHardHylinkOrigColor" hold the original hyperlink text's color.
963 : sal_uInt32 mnHylinkOrigColor;
964 : //the bullet text weather has a hyperlink.
965 : bool mbIsHyperlink;
966 : //the hyperlink text weather has a custom color.
967 : bool mbHardHylinkOrigColor;
968 :
969 : sal_uInt32 mnOriginalTextPos;
970 : sal_uInt32 mnParagraph;
971 : OUString maString;
972 : SvxFieldItem* mpFieldItem;
973 : sal_uInt16 mnLanguage[ 3 ];
974 :
975 : ImplPPTCharPropSet* pCharSet;
976 :
977 : void SetFont( sal_uInt16 nFont );
978 : void SetColor( sal_uInt32 nColor );
979 :
980 : explicit PPTCharPropSet( sal_uInt32 nParagraph );
981 : PPTCharPropSet( const PPTCharPropSet& rCharPropSet );
982 : PPTCharPropSet( const PPTCharPropSet& rCharPropSet, sal_uInt32 nParagraph );
983 : ~PPTCharPropSet();
984 :
985 : PPTCharPropSet& operator=( const PPTCharPropSet& rCharPropSet );
986 :
987 : private:
988 : void ImplMakeUnique();
989 : };
990 :
991 : struct PPTTabEntry
992 : {
993 : sal_uInt16 nOffset;
994 : sal_uInt16 nStyle;
995 : };
996 :
997 : struct PPTRuler
998 : {
999 : sal_uInt32 nRefCount;
1000 :
1001 : sal_Int32 nFlags;
1002 : sal_uInt16 nDefaultTab;
1003 : sal_uInt16 nTextOfs[ 5 ];
1004 : sal_uInt16 nBulletOfs[ 5 ];
1005 : PPTTabEntry* pTab;
1006 : sal_uInt16 nTabCount;
1007 :
1008 : PPTRuler();
1009 : ~PPTRuler();
1010 : };
1011 :
1012 : struct PPTTextRulerInterpreter
1013 : {
1014 : PPTRuler *mpImplRuler;
1015 :
1016 : PPTTextRulerInterpreter();
1017 : PPTTextRulerInterpreter( PPTTextRulerInterpreter& rRuler );
1018 : PPTTextRulerInterpreter(
1019 : sal_uInt32 nFileOfs,
1020 : SdrPowerPointImport&,
1021 : DffRecordHeader& rHd,
1022 : SvStream& rIn
1023 : );
1024 : ~PPTTextRulerInterpreter();
1025 :
1026 0 : sal_uInt16 GetTabOffsetByIndex( sal_uInt16 nIndex ) const
1027 0 : { return mpImplRuler->pTab[ nIndex ].nOffset; };
1028 :
1029 0 : sal_uInt16 GetTabStyleByIndex( sal_uInt16 nIndex ) const
1030 0 : { return mpImplRuler->pTab[ nIndex ].nStyle; };
1031 :
1032 316 : sal_uInt16 GetTabCount() const { return mpImplRuler->nTabCount; };
1033 : bool GetDefaultTab( sal_uInt32 nLevel, sal_uInt16& nValue ) const;
1034 : bool GetTextOfs( sal_uInt32 nLevel, sal_uInt16& nValue ) const;
1035 : bool GetBulletOfs( sal_uInt32 nLevel, sal_uInt16& nValue ) const;
1036 :
1037 : PPTTextRulerInterpreter& operator=( PPTTextRulerInterpreter& rRuler );
1038 : };
1039 :
1040 : #define PPT_SPEC_NEWLINE 0x10000
1041 : #define PPT_SPEC_SYMBOL 0x20000
1042 : #define PPT_SPEC_USE_STARBATS 0x40000
1043 :
1044 : struct StyleTextProp9
1045 : {
1046 : sal_uInt32 mnExtParagraphMask;
1047 : sal_uInt16 mnBuBlip;
1048 : sal_uInt16 mnHasAnm;
1049 : sal_uInt32 mnAnmScheme;
1050 : sal_uInt32 mpfPP10Ext;
1051 : sal_uInt32 mnExtCharacterMask;
1052 : sal_uInt32 mncfPP10Ext;
1053 : sal_uInt32 mnSpecialInfoMask;
1054 : sal_uInt32 mnPP10Ext;
1055 : sal_uInt16 mfBidi;
1056 :
1057 10 : StyleTextProp9()
1058 : : mnExtParagraphMask( 0 )
1059 : , mnBuBlip( 0 )
1060 : , mnHasAnm( 0 )
1061 : , mnAnmScheme( 0 )
1062 : , mpfPP10Ext( 0 )
1063 : , mnExtCharacterMask( 0 )
1064 : , mncfPP10Ext( 0 )
1065 : , mnSpecialInfoMask( 0 )
1066 : , mnPP10Ext( 0 )
1067 10 : , mfBidi( 0 )
1068 : {
1069 10 : }
1070 : void Read( SvStream& rSt );
1071 : };
1072 :
1073 : typedef std::vector<PPTParaPropSet*> PPTParaPropSetList;
1074 : typedef std::vector<PPTCharPropSet*> PPTCharPropSetList;
1075 :
1076 : struct PPTStyleTextPropReader
1077 : {
1078 : std::vector< sal_uInt32 > aSpecMarkerList; // hiword -> Flags, loword -> Position
1079 : PPTParaPropSetList aParaPropList;
1080 : PPTCharPropSetList aCharPropList;
1081 :
1082 : PPTStyleTextPropReader(
1083 : SvStream& rIn,
1084 : SdrPowerPointImport&,
1085 : const DffRecordHeader& rClientTextBoxHd,
1086 : PPTTextRulerInterpreter& rInterpreter,
1087 : const DffRecordHeader& rExtParaHd,
1088 : sal_uInt32 nTextInstance
1089 : );
1090 : ~PPTStyleTextPropReader();
1091 :
1092 : void Init(
1093 : SvStream& rIn,
1094 : SdrPowerPointImport&,
1095 : const DffRecordHeader& rClientTextBoxHd,
1096 : PPTTextRulerInterpreter& rInterpreter,
1097 : const DffRecordHeader& rExtParaHd,
1098 : sal_uInt32 nTextInstance
1099 : );
1100 : void ReadParaProps(
1101 : SvStream& rIn,
1102 : SdrPowerPointImport& rMan,
1103 : const DffRecordHeader& rTextHeader,
1104 : const OUString& aString,
1105 : PPTTextRulerInterpreter& rRuler,
1106 : sal_uInt32& nCharCount,
1107 : bool& bTextPropAtom
1108 : );
1109 : void ReadCharProps(
1110 : SvStream& rIn,
1111 : PPTCharPropSet& aCharPropSet,
1112 : const OUString& aString,
1113 : sal_uInt32& nCharCount,
1114 : sal_uInt32 nCharAnzRead,
1115 : bool& bTextPropAtom,
1116 : sal_uInt32 nExtParaPos,
1117 : const std::vector< StyleTextProp9 >& aStyleTextProp9,
1118 : sal_uInt32& nExtParaFlags,
1119 : sal_uInt16& nBuBlip,
1120 : sal_uInt16& nHasAnm,
1121 : sal_uInt32& nAnmScheme
1122 : );
1123 : };
1124 :
1125 : class SvxFieldItem;
1126 : class MSFILTER_DLLPUBLIC PPTPortionObj : public PPTCharPropSet
1127 : {
1128 :
1129 : friend class PPTParagraphObj;
1130 :
1131 : const PPTStyleSheet& mrStyleSheet;
1132 : sal_uInt32 mnInstance;
1133 : sal_uInt32 mnDepth;
1134 :
1135 : public:
1136 :
1137 : bool GetAttrib( sal_uInt32 nAttr, sal_uInt32& nVal, sal_uInt32 nInstanceInSheet ) const;
1138 : SvxFieldItem* GetTextField();
1139 :
1140 : PPTPortionObj( const PPTStyleSheet&, sal_uInt32 nInstance, sal_uInt32 nDepth );
1141 : PPTPortionObj(
1142 : const PPTCharPropSet&,
1143 : const PPTStyleSheet&,
1144 : sal_uInt32 nInstance,
1145 : sal_uInt32 nDepth
1146 : );
1147 : PPTPortionObj( const PPTPortionObj& );
1148 : ~PPTPortionObj();
1149 :
1150 : // the following function should be removed during next full update
1151 : void ApplyTo(
1152 : SfxItemSet& rSet,
1153 : SdrPowerPointImport& rManager,
1154 : sal_uInt32 nInstanceInSheet
1155 : );
1156 : void ApplyTo(
1157 : SfxItemSet& rSet,
1158 : SdrPowerPointImport& rManager,
1159 : sal_uInt32 nInstanceInSheet,
1160 : const PPTTextObj* pTextObj
1161 : );
1162 5048 : sal_uInt32 Count() const { return ( mpFieldItem ) ? 1 : maString.getLength(); };
1163 : bool HasTabulator();
1164 : };
1165 :
1166 : class MSFILTER_DLLPUBLIC PPTParagraphObj
1167 : : public PPTParaPropSet,
1168 : public PPTNumberFormatCreator,
1169 : public PPTTextRulerInterpreter
1170 : {
1171 : friend class PPTTextObj;
1172 : friend class PPTNumberFormatCreator;
1173 :
1174 : const PPTStyleSheet& mrStyleSheet;
1175 : sal_uInt32 mnInstance;
1176 :
1177 : protected:
1178 :
1179 : void ImplClear();
1180 :
1181 : public:
1182 :
1183 : bool mbTab; // if true, this paragraph has tabulators in text
1184 :
1185 : sal_uInt32 mnCurrentObject;
1186 : ::boost::ptr_vector<PPTPortionObj> m_PortionList;
1187 :
1188 : void UpdateBulletRelSize( sal_uInt32& nBulletRelSize ) const;
1189 : bool GetAttrib( sal_uInt32 nAttr, sal_uInt32& nVal, sal_uInt32 nInstanceInSheet );
1190 :
1191 : PPTParagraphObj(
1192 : const PPTStyleSheet&,
1193 : sal_uInt32 nInstance,
1194 : sal_uInt16 nDepth
1195 : );
1196 : PPTParagraphObj(
1197 : PPTStyleTextPropReader&,
1198 : size_t nCurParaPos,
1199 : size_t& rnCurCharPos,
1200 : const PPTStyleSheet&,
1201 : sal_uInt32 nInstance,
1202 : PPTTextRulerInterpreter& rRuler
1203 : );
1204 : ~PPTParagraphObj();
1205 :
1206 : sal_uInt32 GetTextSize();
1207 : PPTPortionObj* First();
1208 : PPTPortionObj* Next();
1209 :
1210 : void AppendPortion( PPTPortionObj& rPortion );
1211 : void ApplyTo(
1212 : SfxItemSet& rSet,
1213 : boost::optional< sal_Int16 >& rStartNumbering,
1214 : SdrPowerPointImport& rManager,
1215 : sal_uInt32 nInstanceInSheet,
1216 : const PPTParagraphObj* pPrev
1217 : );
1218 : };
1219 :
1220 : #define PPT_TEXTOBJ_FLAGS_PARA_ALIGNMENT_USED_LEFT 1
1221 : #define PPT_TEXTOBJ_FLAGS_PARA_ALIGNMENT_USED_CENTER 2
1222 : #define PPT_TEXTOBJ_FLAGS_PARA_ALIGNMENT_USED_RIGHT 4
1223 : #define PPT_TEXTOBJ_FLAGS_PARA_ALIGNMENT_USED_BLOCK 8
1224 : #define PPT_TEXTOBJ_FLAGS_VERTICAL 16
1225 :
1226 : struct ImplPPTTextObj
1227 : {
1228 : sal_uInt32 mnRefCount;
1229 : sal_uInt32 mnShapeId;
1230 : sal_uInt32 mnShapeMaster;
1231 : PptOEPlaceholderAtom* mpPlaceHolderAtom;
1232 : sal_uInt16 mnInstance;
1233 : sal_uInt16 mnDestinationInstance;
1234 : MSO_SPT meShapeType;
1235 :
1236 : sal_uInt32 mnCurrentObject;
1237 : sal_uInt32 mnParagraphCount;
1238 : PPTParagraphObj** mpParagraphList;
1239 : PptSlidePersistEntry& mrPersistEntry;
1240 :
1241 : sal_uInt32 mnTextFlags;
1242 :
1243 2478 : explicit ImplPPTTextObj( PptSlidePersistEntry& rPersistEntry )
1244 : : mnRefCount(0)
1245 : , mnShapeId(0)
1246 : , mnShapeMaster(0)
1247 : , mpPlaceHolderAtom(NULL)
1248 : , mnInstance(0)
1249 : , mnDestinationInstance(0)
1250 : , meShapeType(mso_sptMin)
1251 : , mnCurrentObject(0)
1252 : , mnParagraphCount(0)
1253 : , mpParagraphList(NULL)
1254 : , mrPersistEntry ( rPersistEntry )
1255 2478 : , mnTextFlags(0) {};
1256 : };
1257 :
1258 : class MSFILTER_DLLPUBLIC PPTTextObj
1259 : {
1260 : ImplPPTTextObj* mpImplTextObj;
1261 : void ImplClear();
1262 :
1263 : PPTTextObj(){};
1264 : public:
1265 : PPTTextObj(
1266 : SvStream& rSt,
1267 : SdrPowerPointImport&,
1268 : PptSlidePersistEntry&,
1269 : DffObjData*
1270 : );
1271 : PPTTextObj( PPTTextObj& rTextObj );
1272 : ~PPTTextObj();
1273 :
1274 1694 : sal_uInt32 GetCurrentIndex() const { return mpImplTextObj->mnCurrentObject; };
1275 4054 : sal_uInt32 Count() const { return mpImplTextObj->mnParagraphCount; };
1276 : PPTParagraphObj* First();
1277 : PPTParagraphObj* Next();
1278 144 : MSO_SPT GetShapeType() const { return mpImplTextObj->meShapeType; };
1279 7414 : sal_uInt32 GetInstance() const { return mpImplTextObj->mnInstance; };
1280 66 : void SetInstance( sal_uInt16 nInstance )
1281 66 : { mpImplTextObj->mnInstance = nInstance; }
1282 :
1283 3872 : sal_uInt32 GetDestinationInstance() const
1284 3872 : { return mpImplTextObj->mnDestinationInstance; }
1285 :
1286 2112 : void SetDestinationInstance( sal_uInt16 nInstance )
1287 2112 : { mpImplTextObj->mnDestinationInstance = nInstance; }
1288 :
1289 5098 : PptOEPlaceholderAtom* GetOEPlaceHolderAtom() const { return mpImplTextObj->mpPlaceHolderAtom; }
1290 1324 : sal_uInt32 GetTextFlags() const { return mpImplTextObj->mnTextFlags; }
1291 1304 : void SetVertical( bool bVertical )
1292 : {
1293 1304 : if ( bVertical )
1294 0 : mpImplTextObj->mnTextFlags |= PPT_TEXTOBJ_FLAGS_VERTICAL;
1295 : else
1296 1304 : mpImplTextObj->mnTextFlags &= ~PPT_TEXTOBJ_FLAGS_VERTICAL;
1297 1304 : }
1298 1256 : bool GetVertical() const
1299 1256 : { return ( mpImplTextObj->mnTextFlags & PPT_TEXTOBJ_FLAGS_VERTICAL ) != 0; }
1300 :
1301 : const SfxItemSet* GetBackground() const;
1302 :
1303 : PPTTextObj& operator=( PPTTextObj& rTextObj );
1304 : };
1305 :
1306 0 : class PPTConvertOCXControls : public SvxMSConvertOCXControls
1307 : {
1308 : virtual const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage > & GetDrawPage() SAL_OVERRIDE;
1309 : PptPageKind ePageKind;
1310 : const SdrPowerPointImport* mpPPTImporter;
1311 : com::sun::star::uno::Reference< com::sun::star::io::XInputStream > mxInStrm;
1312 : public :
1313 :
1314 0 : PPTConvertOCXControls( const SdrPowerPointImport* pPPTImporter, com::sun::star::uno::Reference< com::sun::star::io::XInputStream >& rxInStrm, const com::sun::star::uno::Reference< com::sun::star::frame::XModel >& rxModel, PptPageKind ePKind ) :
1315 : SvxMSConvertOCXControls ( rxModel ),
1316 : ePageKind ( ePKind ),
1317 : mpPPTImporter ( pPPTImporter ),
1318 0 : mxInStrm ( rxInStrm )
1319 0 : {};
1320 : virtual bool ReadOCXStream( SotStorageRef& rSrc1,
1321 : com::sun::star::uno::Reference<
1322 : com::sun::star::drawing::XShape > *pShapeRef=0,
1323 : bool bFloatingCtrl=false );
1324 : virtual bool InsertControl(
1325 : const com::sun::star::uno::Reference< com::sun::star::form::XFormComponent > &rFComp,
1326 : const com::sun::star::awt::Size& rSize,
1327 : com::sun::star::uno::Reference< com::sun::star::drawing::XShape > *pShape,
1328 : bool bFloatingCtrl
1329 : ) SAL_OVERRIDE;
1330 : };
1331 :
1332 : // PowerPoint record types
1333 : #define PPT_PST_Unknown 0
1334 : #define PPT_PST_SubContainerCompleted 1
1335 : #define PPT_PST_IRRAtom 2
1336 : #define PPT_PST_PSS 3
1337 : #define PPT_PST_SubContainerException 4
1338 : #define PPT_PST_ClientSignal1 6
1339 : #define PPT_PST_ClientSignal2 7
1340 : #define PPT_PST_PowerPointStateInfoAtom 10
1341 : #define PPT_PST_Document 1000
1342 : #define PPT_PST_DocumentAtom 1001
1343 : #define PPT_PST_EndDocument 1002
1344 : #define PPT_PST_SlidePersist 1003
1345 : #define PPT_PST_SlideBase 1004
1346 : #define PPT_PST_SlideBaseAtom 1005
1347 : #define PPT_PST_Slide 1006
1348 : #define PPT_PST_SlideAtom 1007
1349 : #define PPT_PST_Notes 1008
1350 : #define PPT_PST_NotesAtom 1009
1351 : #define PPT_PST_Environment 1010
1352 : #define PPT_PST_SlidePersistAtom 1011
1353 : #define PPT_PST_Scheme 1012
1354 : #define PPT_PST_SchemeAtom 1013
1355 : #define PPT_PST_DocViewInfo 1014
1356 : #define PPT_PST_SslideLayoutAtom 1015
1357 : #define PPT_PST_MainMaster 1016
1358 : #define PPT_PST_SSSlideInfoAtom 1017
1359 : #define PPT_PST_SlideViewInfo 1018
1360 : #define PPT_PST_GuideAtom 1019
1361 : #define PPT_PST_ViewInfo 1020
1362 : #define PPT_PST_ViewInfoAtom 1021
1363 : #define PPT_PST_SlideViewInfoAtom 1022
1364 : #define PPT_PST_VBAInfo 1023
1365 : #define PPT_PST_VBAInfoAtom 1024
1366 : #define PPT_PST_SSDocInfoAtom 1025
1367 : #define PPT_PST_Summary 1026
1368 : #define PPT_PST_Texture 1027
1369 : #define PPT_PST_VBASlideInfo 1028
1370 : #define PPT_PST_VBASlideInfoAtom 1029
1371 : #define PPT_PST_DocRoutingSlip 1030
1372 : #define PPT_PST_OutlineViewInfo 1031
1373 : #define PPT_PST_SorterViewInfo 1032
1374 : #define PPT_PST_ExObjList 1033
1375 : #define PPT_PST_ExObjListAtom 1034
1376 : #define PPT_PST_PPDrawingGroup 1035
1377 : #define PPT_PST_PPDrawing 1036
1378 : #define PPT_PST_GridSpacing10Atom 1037
1379 : #define PPT_PST_NamedShows 1040
1380 : #define PPT_PST_NamedShow 1041
1381 : #define PPT_PST_NamedShowSlides 1042
1382 : #define PPT_PST_List 2000
1383 : #define PPT_PST_FontCollection 2005
1384 : #define PPT_PST_ListPlaceholder 2017
1385 : #define PPT_PST_BookmarkCollection 2019
1386 : #define PPT_PST_SoundCollection 2020
1387 : #define PPT_PST_SoundCollAtom 2021
1388 : #define PPT_PST_Sound 2022
1389 : #define PPT_PST_SoundData 2023
1390 : #define PPT_PST_BookmarkSeedAtom 2025
1391 : #define PPT_PST_GuideList 2026
1392 : #define PPT_PST_RunArray 2028
1393 : #define PPT_PST_RunArrayAtom 2029
1394 : #define PPT_PST_ArrayElementAtom 2030
1395 : #define PPT_PST_Int4ArrayAtom 2031
1396 : #define PPT_PST_ColorSchemeAtom 2032
1397 :
1398 : // these atoms first was seen in ppt2000 in a private Tag atom
1399 : #define PPT_PST_ExtendedBuGraContainer 2040 // consist of 4041
1400 : #define PPT_PST_ExtendedBuGraAtom 2041 // the instance of this atom indices the current graphic
1401 :
1402 : #define PPT_PST_OEShape 3008
1403 : #define PPT_PST_ExObjRefAtom 3009
1404 : #define PPT_PST_OEPlaceholderAtom 3011
1405 : #define PPT_PST_GrColor 3020
1406 : #define PPT_PST_GrectAtom 3025
1407 : #define PPT_PST_GratioAtom 3031
1408 : #define PPT_PST_Gscaling 3032
1409 : #define PPT_PST_GpointAtom 3034
1410 : #define PPT_PST_OEShapeAtom 3035
1411 : #define PPT_PST_OutlineTextRefAtom 3998
1412 : #define PPT_PST_TextHeaderAtom 3999
1413 : #define PPT_PST_TextCharsAtom 4000
1414 : #define PPT_PST_StyleTextPropAtom 4001
1415 : #define PPT_PST_BaseTextPropAtom 4002
1416 : #define PPT_PST_TxMasterStyleAtom 4003
1417 : #define PPT_PST_TxCFStyleAtom 4004
1418 : #define PPT_PST_TxPFStyleAtom 4005
1419 : #define PPT_PST_TextRulerAtom 4006
1420 : #define PPT_PST_TextBookmarkAtom 4007
1421 : #define PPT_PST_TextBytesAtom 4008
1422 : #define PPT_PST_TxSIStyleAtom 4009
1423 : #define PPT_PST_TextSpecInfoAtom 4010
1424 : #define PPT_PST_DefaultRulerAtom 4011
1425 :
1426 : // these atoms first was seen in ppt2000 in a private Tag atom
1427 : #define PPT_PST_ExtendedParagraphAtom 4012
1428 : #define PPT_PST_ExtendedParagraphMasterAtom 4013
1429 : #define PPT_PST_ExtendedPresRuleContainer 4014 // consist of 4012, 4015,
1430 : #define PPT_PST_ExtendedParagraphHeaderAtom 4015 // the instance of this atom indices the current presobj
1431 : // the first sal_uInt32 in this atom indices the current slideId
1432 : #define PPT_PST_TextDefaults9Atom 4016
1433 :
1434 : #define PPT_PST_FontEntityAtom 4023
1435 : #define PPT_PST_FontEmbedData 4024
1436 : #define PPT_PST_TypeFace 4025
1437 : #define PPT_PST_CString 4026
1438 : #define PPT_PST_ExternalObject 4027
1439 : #define PPT_PST_MetaFile 4033
1440 : #define PPT_PST_ExOleObj 4034
1441 : #define PPT_PST_ExOleObjAtom 4035
1442 : #define PPT_PST_ExPlainLinkAtom 4036
1443 : #define PPT_PST_CorePict 4037
1444 : #define PPT_PST_CorePictAtom 4038
1445 : #define PPT_PST_ExPlainAtom 4039
1446 : #define PPT_PST_SrKinsoku 4040
1447 : #define PPT_PST_Handout 4041
1448 : #define PPT_PST_ExEmbed 4044
1449 : #define PPT_PST_ExEmbedAtom 4045
1450 : #define PPT_PST_ExLink 4046
1451 : #define PPT_PST_ExLinkAtom_old 4047
1452 : #define PPT_PST_BookmarkEntityAtom 4048
1453 : #define PPT_PST_ExLinkAtom 4049
1454 : #define PPT_PST_SrKinsokuAtom 4050
1455 : #define PPT_PST_ExHyperlinkAtom 4051
1456 : #define PPT_PST_ExPlain 4053
1457 : #define PPT_PST_ExPlainLink 4054
1458 : #define PPT_PST_ExHyperlink 4055
1459 : #define PPT_PST_SlideNumberMCAtom 4056
1460 : #define PPT_PST_HeadersFooters 4057
1461 : #define PPT_PST_HeadersFootersAtom 4058
1462 : #define PPT_PST_RecolorEntryAtom 4062
1463 : #define PPT_PST_TxInteractiveInfoAtom 4063
1464 : #define PPT_PST_EmFormatAtom 4065
1465 : #define PPT_PST_CharFormatAtom 4066
1466 : #define PPT_PST_ParaFormatAtom 4067
1467 : #define PPT_PST_MasterText 4068
1468 : #define PPT_PST_RecolorInfoAtom 4071
1469 : #define PPT_PST_ExQuickTime 4073
1470 : #define PPT_PST_ExQuickTimeMovie 4074
1471 : #define PPT_PST_ExQuickTimeMovieData 4075
1472 : #define PPT_PST_ExSubscription 4076
1473 : #define PPT_PST_ExSubscriptionSection 4077
1474 : #define PPT_PST_ExControl 4078
1475 : #define PPT_PST_ExControlAtom 4091
1476 : #define PPT_PST_SlideListWithText 4080
1477 : #define PPT_PST_AnimationInfoAtom 4081
1478 : #define PPT_PST_InteractiveInfo 4082
1479 : #define PPT_PST_InteractiveInfoAtom 4083
1480 : #define PPT_PST_SlideList 4084
1481 : #define PPT_PST_UserEditAtom 4085
1482 : #define PPT_PST_CurrentUserAtom 4086
1483 : #define PPT_PST_DateTimeMCAtom 4087
1484 : #define PPT_PST_GenericDateMCAtom 4088
1485 : #define PPT_PST_HeaderMCAtom 4089
1486 : #define PPT_PST_FooterMCAtom 4090
1487 : #define PPT_PST_ExMediaAtom 4100
1488 : #define PPT_PST_ExVideo 4101
1489 : #define PPT_PST_ExAviMovie 4102
1490 : #define PPT_PST_ExMCIMovie 4103
1491 : #define PPT_PST_ExMIDIAudio 4109
1492 : #define PPT_PST_ExCDAudio 4110
1493 : #define PPT_PST_ExWAVAudioEmbedded 4111
1494 : #define PPT_PST_ExWAVAudioLink 4112
1495 : #define PPT_PST_ExOleObjStg 4113
1496 : #define PPT_PST_ExCDAudioAtom 4114
1497 : #define PPT_PST_ExWAVAudioEmbeddedAtom 4115
1498 : #define PPT_PST_AnimationInfo 4116
1499 : #define PPT_PST_RTFDateTimeMCAtom 4117
1500 : #define PPT_PST_ProgTags 5000
1501 : #define PPT_PST_ProgStringTag 5001
1502 : #define PPT_PST_ProgBinaryTag 5002
1503 : #define PPT_PST_BinaryTagData 5003
1504 : #define PPT_PST_PrintOptions 6000
1505 : #define PPT_PST_PersistPtrFullBlock 6001
1506 : #define PPT_PST_PersistPtrIncrementalBlock 6002
1507 :
1508 : // these atoms first was seen in ppt2000 in a private Tag atom
1509 : #define PPT_PST_PresentationAdvisorFlags9Atom 6010
1510 : #define PPT_PST_HtmlDocInfo9Atom 6011
1511 :
1512 : #define PPT_PST_RulerIndentAtom 10000
1513 : #define PPT_PST_GscalingAtom 10001
1514 : #define PPT_PST_GrColorAtom 10002
1515 : #define PPT_PST_GLPointAtom 10003
1516 : #define PPT_PST_GlineAtom 10004
1517 :
1518 : #define PPT_PST_HashCodeAtom 11008
1519 : #define PPT_PST_BuildList 11010
1520 : #define PPT_PST_Comment10 12000
1521 : #define PPT_PST_CommentAtom10 12001
1522 : #define PPT_PST_CommentIndex10 12004
1523 : #define PPT_PST_SlideFlags10Atom 12010
1524 : #define PPT_PST_SlideTime10Atom 12011
1525 : #define PPT_PST_DocToolbarStates10Atom 14001
1526 :
1527 : // attributes for PptTextStyleSheet
1528 : #define PPT_ParaAttr_BulletOn 0 //00000001
1529 : #define PPT_ParaAttr_BuHardFont 1 //00000002
1530 : #define PPT_ParaAttr_BuHardColor 2 //00000004
1531 : #define PPT_ParaAttr_BuHardHeight 3 //00000008
1532 : #define PPT_ParaAttr_BulletFont 4 //00000010
1533 : #define PPT_ParaAttr_BulletColor 5 //00000020
1534 : #define PPT_ParaAttr_BulletHeight 6 //00000040
1535 : #define PPT_ParaAttr_BulletChar 7 //00000080
1536 : #define PPT_ParaAttr_DontKnow1 8 //00000100
1537 : #define PPT_ParaAttr_DontKnow2 9 //00000200
1538 : #define PPT_ParaAttr_DontKnow3 10 //00000400
1539 : #define PPT_ParaAttr_Adjust 11 //00000800 0000=Left, 0001=Center, 0002=Right, 0003=Block
1540 : #define PPT_ParaAttr_LineFeed 12 //00001000
1541 : #define PPT_ParaAttr_UpperDist 13 //00002000 is set to 0032 for TextFrames by default
1542 : #define PPT_ParaAttr_LowerDist 14 //00004000
1543 : #define PPT_ParaAttr_TextOfs 15 //00008000
1544 : #define PPT_ParaAttr_BulletOfs 16 //00010000
1545 : #define PPT_ParaAttr_DefaultTab 17 //00020000
1546 : #define PPT_ParaAttr_AsianLB_1 18
1547 : #define PPT_ParaAttr_AsianLB_2 19
1548 : #define PPT_ParaAttr_AsianLB_3 20
1549 : #define PPT_ParaAttr_BiDi 21 //00200000
1550 :
1551 : #define PPT_CharAttr_Bold 0 //00000001
1552 : #define PPT_CharAttr_Italic 1 //00000002
1553 : #define PPT_CharAttr_Underline 2 //00000004
1554 : #define PPT_CharAttr_Shadow 4 //00000010
1555 : #define PPT_CharAttr_Strikeout 8 //00000100
1556 : #define PPT_CharAttr_Embossed 9 //00000200
1557 : #define PPT_CharAttr_ResetNumbering 10 //00000400
1558 : #define PPT_CharAttr_EnableNumbering1 11 //00000800
1559 : #define PPT_CharAttr_EnableNumbering2 12 //00001000
1560 : #define PPT_CharAttr_Font 16 //00010000
1561 : #define PPT_CharAttr_AsianOrComplexFont 21 //00200000
1562 : #define PPT_CharAttr_ANSITypeface 22 //00400000
1563 : #define PPT_CharAttr_Symbol 23 //00800000
1564 : #define PPT_CharAttr_FontHeight 17 //00020000
1565 : #define PPT_CharAttr_FontColor 18 //00040000
1566 : #define PPT_CharAttr_Escapement 19 //00080000
1567 :
1568 : // values for PptSlideLayoutAtom.eLayout
1569 : #define PPT_LAYOUT_TITLESLIDE 0 // The slide is a title slide
1570 : #define PPT_LAYOUT_TITLEANDBODYSLIDE 1 // Title and body slide
1571 : #define PPT_LAYOUT_TITLEMASTERSLIDE 2 // Title master slide
1572 : #define PPT_LAYOUT_MASTERSLIDE 3 // Master slide layout
1573 : #define PPT_LAYOUT_MASTERNOTES 4 // Master notes layout
1574 : #define PPT_LAYOUT_NOTESTITLEBODY 5 // Notes title/body layout
1575 : #define PPT_LAYOUT_HANDOUTLAYOUT 6 // Handout layout, therefore it doesn't have placeholders except header, footer, and date
1576 : #define PPT_LAYOUT_ONLYTITLE 7 // Only title placeholder
1577 : #define PPT_LAYOUT_2COLUMNSANDTITLE 8 // Body of the slide has 2 columns and a title
1578 : #define PPT_LAYOUT_2ROWSANDTITLE 9 // Slide's body has 2 rows and a title
1579 : #define PPT_LAYOUT_RIGHTCOLUMN2ROWS 10 // Body contains 2 columns, right column has 2 rows
1580 : #define PPT_LAYOUT_LEFTCOLUMN2ROWS 11 // Body contains 2 columns, left column has 2 rows
1581 : #define PPT_LAYOUT_BOTTOMROW2COLUMNS 12 // Body contains 2 rows, bottom row has 2 columns
1582 : #define PPT_LAYOUT_TOPROW2COLUMN 13 // Body contains 2 rows, top row has 2 columns
1583 : #define PPT_LAYOUT_4OBJECTS 14 // 4 objects
1584 : #define PPT_LAYOUT_BIGOBJECT 15 // Big object
1585 : #define PPT_LAYOUT_BLANCSLIDE 16 // Blank slide
1586 : #define PPT_LAYOUT_TITLERIGHTBODYLEFT 17 // Vertical title on the right, body on the left
1587 : #define PPT_LAYOUT_TITLERIGHT2BODIESLEFT 18 // Vertical title on the right, body on the left split into 2 rows
1588 :
1589 : // the following table describes the placeholder id's (values from reality followed by values taken from the documentation)
1590 : #define PPT_PLACEHOLDER_NONE 0 // 0 None
1591 : #define PPT_PLACEHOLDER_MASTERTITLE 1 // 1 Master title
1592 : #define PPT_PLACEHOLDER_MASTERBODY 2 // 2 Master body
1593 : #define PPT_PLACEHOLDER_MASTERCENTEREDTITLE 3 // 3 Master centered title
1594 : #define PPT_PLACEHOLDER_MASTERSUBTITLE 4 // 10 Master subtitle
1595 : #define PPT_PLACEHOLDER_MASTERNOTESSLIDEIMAGE 5 // 4 Master notes slide image
1596 : #define PPT_PLACEHOLDER_MASTERNOTESBODYIMAGE 6 // 5 Master notes body image
1597 : #define PPT_PLACEHOLDER_MASTERDATE 7 // 6 Master date
1598 : #define PPT_PLACEHOLDER_MASTERSLIDENUMBER 8 // 7 Master slide number
1599 : #define PPT_PLACEHOLDER_MASTERFOOTER 9 // 8 Master footer
1600 : #define PPT_PLACEHOLDER_MASTERHEADER 10 // 9 Master header
1601 : #define PPT_PLACEHOLDER_GENERICTEXTOBJECT // 11 Generic text object
1602 : #define PPT_PLACEHOLDER_TITLE 13 // 12 Title
1603 : #define PPT_PLACEHOLDER_BODY 14 // 13 Body
1604 : #define PPT_PLACEHOLDER_NOTESBODY 12 // 14 Notes body
1605 : #define PPT_PLACEHOLDER_CENTEREDTITLE 15 // 15 Centered title
1606 : #define PPT_PLACEHOLDER_SUBTITLE 16 // 16 Subtitle
1607 : #define PPT_PLACEHOLDER_VERTICALTEXTTITLE 17 // 17 Vertical text title
1608 : #define PPT_PLACEHOLDER_VERTICALTEXTBODY 18 // 18 Vertical text body
1609 : #define PPT_PLACEHOLDER_NOTESSLIDEIMAGE 11 // 19 Notes slide image
1610 : #define PPT_PLACEHOLDER_OBJECT 19 // 20 Object (no matter the size)
1611 : #define PPT_PLACEHOLDER_GRAPH 20 // 21 Graph
1612 : #define PPT_PLACEHOLDER_TABLE 21 // 22 Table
1613 : #define PPT_PLACEHOLDER_CLIPART 22 // 23 Clip Art
1614 : #define PPT_PLACEHOLDER_ORGANISZATIONCHART 23 // 24 Organization Chart
1615 : #define PPT_PLACEHOLDER_MEDIACLIP 24 // 25 Media Clip
1616 :
1617 : #endif // INCLUDED_FILTER_MSFILTER_SVDFPPT_HXX
1618 :
1619 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|