LibreOffice Module filter (master) 1
msdffimp.hxx
Go to the documentation of this file.
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_MSDFFIMP_HXX
21#define INCLUDED_FILTER_MSFILTER_MSDFFIMP_HXX
22
23#include <cstring>
24#include <map>
25#include <memory>
26#include <optional>
27#include <set>
28#include <utility>
29#include <vector>
30#include <unordered_map>
31
32#include <com/sun/star/uno/Any.hxx>
33#include <com/sun/star/uno/Reference.hxx>
39#include <rtl/ustring.hxx>
40#include <rtl/ref.hxx>
41#include <sal/types.h>
42#include <svx/msdffdef.hxx>
44#include <tools/degree.hxx>
45#include <tools/gen.hxx>
46#include <tools/ref.hxx>
47#include <tools/solar.h>
48#include <tools/poly.hxx>
49#include <vcl/graph.hxx>
50
51class Color;
52class GDIMetaFile;
53class SotStorage;
54class SvStream;
55class SdrObject;
56class SdrOle2Obj;
57class SdrModel;
59
63
64class SvxMSDffManager;
65class SfxItemSet;
66struct DffObjData;
67class SvGlobalName;
68
69namespace com::sun::star {
70 namespace beans { class XPropertySet; }
71 namespace embed { class XEmbeddedObject; }
72 namespace embed { class XStorage; }
73}
74
76{
77public:
78 virtual void NotifyFreeObj(SdrObject* pObj) = 0;
80};
81
83{
85 std::unique_ptr<DffPropSet> pDefaultPropSet;
86
87 void ApplyCustomShapeTextAttributes( SfxItemSet& rSet ) const;
88 void CheckAndCorrectExcelTextRotation( SvStream& rIn, SfxItemSet& rSet, DffObjData const & rObjData ) const;
89 void ApplyCustomShapeGeometryAttributes( SvStream& rIn,
90 SfxItemSet& rSet,
91 const DffObjData& rObjData ) const;
92 void ApplyLineAttributes( SfxItemSet& rSet, const MSO_SPT eShapeType ) const; // #i28269#
93 void ApplyFillAttributes( SvStream& rIn, SfxItemSet& rSet, const DffObjData& rObjData ) const;
94
95public:
98
99 explicit DffPropertyReader( const SvxMSDffManager& rManager );
101
102 DffPropertyReader& operator=( DffPropertyReader const & ) = delete; // MSVC2015 workaround
103 DffPropertyReader( DffPropertyReader const & ) = delete; // MSVC2015 workaround
104
105 static Degree100 Fix16ToAngle( sal_Int32 nAngle );
106
107#ifdef DBG_CUSTOMSHAPE
108 void ReadPropSet( SvStream& rIn, SvxMSDffClientData* pClientData, sal_uInt32 nShapeType = 0 ) const;
109#else
110 void ReadPropSet( SvStream& rIn, SvxMSDffClientData* pClientData ) const;
111#endif
112
113 void SetDefaultPropSet( SvStream& rIn, sal_uInt32 nOffDgg ) const;
114 void ApplyAttributes( SvStream& rIn, SfxItemSet& rSet ) const;
115 void ApplyAttributes( SvStream& rIn, SfxItemSet& rSet, DffObjData const & rObjData ) const;
116 void ImportGradientColor( SfxItemSet& aSet, sal_uInt32 eMSO_FillType, double dTrans, double dBackTrans ) const;
117};
118
119#define COL_DEFAULT ::Color( 0xFA, 0xFB, 0xFC )
120
121typedef ::std::map< sal_Int32, SdrObject* > SvxMSDffShapeIdContainer;
122
123inline constexpr OUStringLiteral SVEXT_PERSIST_STREAM = u"\002OlePres000";
124
126typedef std::vector<std::unique_ptr<SvxMSDffShapeOrder>> SvxMSDffShapeOrders;
127
129{
130 bool operator()(std::shared_ptr<SvxMSDffShapeInfo> const& lhs,
131 std::shared_ptr<SvxMSDffShapeInfo> const& rhs) const;
132};
134{
135 bool operator()(std::shared_ptr<SvxMSDffShapeInfo> const& lhs,
136 std::shared_ptr<SvxMSDffShapeInfo> const& rhs) const;
137};
138
139// the following will be sorted explicitly:
140typedef ::std::set< std::shared_ptr<SvxMSDffShapeInfo>,
142typedef ::std::multiset< std::shared_ptr<SvxMSDffShapeInfo>,
144
145#define SVXMSDFF_SETTINGS_CROP_BITMAPS 1
146#define SVXMSDFF_SETTINGS_IMPORT_PPT 2
147#define SVXMSDFF_SETTINGS_IMPORT_EXCEL 4
148
149// for the CreateSdrOLEFromStorage we need the information, how we handle
150// convert able OLE-Objects - this is stored in
151#define OLE_MATHTYPE_2_STARMATH 0x0001
152#define OLE_WINWORD_2_STARWRITER 0x0002
153#define OLE_EXCEL_2_STARCALC 0x0004
154#define OLE_POWERPOINT_2_STARIMPRESS 0x0008
155
157{
158 sal_uInt32 nShapeA;
159 sal_uInt32 nShapeB;
160 sal_uInt32 nShapeC;
161 sal_uInt32 ncptiA;
162 sal_uInt32 ncptiB;
166
170
172 : nShapeA(0)
173 , nShapeB(0)
174 , nShapeC(0)
175 , ncptiA(0)
176 , ncptiB(0)
179 , pAObj( nullptr )
180 , pBObj( nullptr )
181 , pCObj( nullptr )
182 {};
183
184};
185
187{
188 ::std::vector< std::unique_ptr<SvxMSDffConnectorRule> > aCList;
189
192
193 SvxMSDffSolverContainer& operator=( SvxMSDffSolverContainer const & ) = delete; // MSVC2015 workaround
194 SvxMSDffSolverContainer( SvxMSDffSolverContainer const & ) = delete; // MSVC2015 workaround
195
197};
198
199struct FIDCL
200{
201 sal_uInt32 dgid;
202};
203
206{
207 sal_uInt16 nTxBxS;
208 sal_uInt16 nSequence;
210 : nTxBxS( 0 ), nSequence( 0 ) {}
211 MSDffTxId( const MSDffTxId& rCopy )
212 : nTxBxS( rCopy.nTxBxS ), nSequence( rCopy.nSequence ) {}
213};
214
216{
217 static const int RELTO_DEFAULT = 2;
218
220 std::optional<tools::Polygon>
222 std::unique_ptr<char[]>
225 std::unique_ptr<char[]>
227 sal_uInt32 nClientDataLen;
228 sal_uInt32 nXAlign;
229 std::optional<sal_uInt32> nXRelTo;
230 sal_uInt32 nYAlign;
231 std::optional<sal_uInt32> nYRelTo;
234 sal_Int32 nDxTextLeft;
235 sal_Int32 nDyTextTop;
236 sal_Int32 nDxTextRight;
237 sal_Int32 nDyTextBottom;
239 sal_Int32 nDyWrapDistTop;
242 sal_Int32 nCropFromTop;
244 sal_Int32 nCropFromLeft;
245 sal_Int32 nCropFromRight;
252 bool bDrawHell :1;
253 bool bHidden :1;
255 bool bVFlip :1;
256 bool bHFlip :1;
257 bool bAutoWidth :1;
260
264
265 bool operator<( const SvxMSDffImportRec& rEntry ) const
266 { return nShapeId < rEntry.nShapeId; }
267
268private:
270};
271
275{
276private:
278 typedef std::set<std::unique_ptr<SvxMSDffImportRec>,
281 std::map<const SdrObject*, SvxMSDffImportRec*> m_ObjToRecMap;
282public:
285
286 explicit SvxMSDffImportData(const tools::Rectangle& rParentRect);
287 SvxMSDffImportData& operator=( SvxMSDffImportData const & ) = delete; // MSVC2015 workaround
288 SvxMSDffImportData( SvxMSDffImportData const & ) = delete; // MSVC2015 workaround
289 virtual ~SvxMSDffImportData() override;
290 bool empty() const { return m_Records.empty(); }
291 void insert(std::unique_ptr<SvxMSDffImportRec> pImpRec);
292 size_t size() const { return m_Records.size(); }
293 SvxMSDffImportRec* find(const SdrObject* pObj);
294 MSDffImportRecords::const_iterator begin() const { return m_Records.begin(); }
295 MSDffImportRecords::const_iterator end() const { return m_Records.end(); }
296 virtual void NotifyFreeObj(SdrObject* pObj) override;
297};
298
300{
302
305
306 sal_uInt32 nShapeId;
309
310 bool bShapeType : 1;
312 bool bClientData : 1;
313 bool bChildAnchor : 1;
314 bool bOpt : 1;
315 bool bOpt2 : 1;
319
321 const tools::Rectangle& rBoundRect,
322 int nClByGroup ) :
323 rSpHd( rObjHd ),
324 aBoundRect( rBoundRect ),
325 nShapeId( 0 ),
328 bShapeType( false ),
329 bClientAnchor( false ),
330 bClientData( false ),
331 bChildAnchor( false ),
332 bOpt( false ),
333 bOpt2( false ),
334 bRotateTextWithShape( true ),
335 bPageAnchor( true ),
336 nCalledByGroup( nClByGroup ){}
337
338 // Clone a DffObjData _o_ by replacing its rSpHd with a shared_ptr to another one
339 DffObjData( const std::shared_ptr<DffRecordHeader>& rObjHd, const DffObjData& o) :
340 rSpHd( *rObjHd ),
342 nShapeId( o.nShapeId ),
343 nSpFlags( o.nSpFlags ),
349 bOpt( o.bOpt ),
350 bOpt2( o.bOpt2 ),
354};
355
356#define DFF_RECORD_MANAGER_BUF_SIZE 64
357
359{
360 sal_uInt32 nCount;
361 sal_uInt32 nCurrent;
363 std::unique_ptr<DffRecordList>
365
367
368 explicit DffRecordList( DffRecordList* pList );
370};
371
373{
378
380{
381public:
383
384 void Clear();
385 void Consume( SvStream& rIn,
386 sal_uInt32 nStOfs = 0 );
387
388 bool SeekToContent( SvStream& rIn,
389 sal_uInt16 nRecType,
391 DffRecordHeader* GetRecordHeader( sal_uInt16 nRecType,
393
395 explicit DffRecordManager( SvStream& rIn );
396
397 DffRecordHeader* Current();
402};
403
415{
416 std::unique_ptr<SvxMSDffBLIPInfos> m_pBLIPInfos;
417 std::unique_ptr<SvxMSDffShapeInfos_ByTxBxComp> m_xShapeInfosByTxBxComp;
418 std::unique_ptr<SvxMSDffShapeInfos_ById> m_xShapeInfosById;
420 sal_uInt32 nOffsDgg;
421 sal_uInt16 nBLIPCount;
423
424 void CheckTxBxStoryChain();
425 void GetFidclData(sal_uInt32 nOffsDgg);
426
427protected:
428 typedef std::map<sal_uInt32, sal_uInt64> OffsetMap;
429
430 OUString maBaseURL;
431 sal_uInt32 mnIdClusters; // while only knowing the shapeid
432 std::vector<FIDCL> maFidcls;
434
440 std::vector< std::pair<DffObjData, std::shared_ptr<DffRecordHeader> > > maPendingGroupData;
441
442 friend class DffPropertyReader;
443
448
458 sal_Int32 nMinAllowedVal;
459 sal_Int32 nMaxAllowedVal;
462
466
467 void GetCtrlData(sal_uInt32 nOffsDgg);
468 void GetDrawingGroupContainerData( SvStream& rSt,
469 sal_uInt32 nLenDgg );
470 // Add internal drawing container id as parameter to the sub methods of
471 // reading the control information about the drawing objects.
472 // The drawing container id is used to distinguish the text ids of drawing
473 // objects in different drawing containers.
474 void GetDrawingContainerData( SvStream& rSt,
475 sal_uInt32 nLenDg,
476 sal_uInt16 nDrawingContainerId );
477 bool GetShapeGroupContainerData( SvStream& rSt,
478 sal_uInt32 nLenShapeGroupCont,
479 bool bPatriarch,
480 sal_uInt16 nDrawingContainerId );
481 bool GetShapeContainerData( SvStream& rSt,
482 sal_uInt32 nLenShapeCont,
483 sal_uInt64 nPosGroup,
484 sal_uInt16 nDrawingContainerId );
485
486 rtl::Reference<SdrObject> ImportGraphic( SvStream&, SfxItemSet&, const DffObjData& );
487 // #i32596# - pass <nCalledByGroup> to method
488 // Needed in Writer's Microsoft Word import to avoid import of OLE objects
489 // inside groups. Instead a graphic object is created.
490 virtual rtl::Reference<SdrObject> ImportOLE( sal_uInt32 nOLEId,
491 const Graphic& rGraf,
492 const tools::Rectangle& rBoundRect,
493 const tools::Rectangle& rVisArea,
494 const int _nCalledByGroup ) const;
495 static css::uno::Reference < css::embed::XEmbeddedObject > CheckForConvertToSOObj(
496 sal_uInt32 nConvertFlags, SotStorage& rSrcStg,
497 const css::uno::Reference < css::embed::XStorage >& xDestStg,
498 const Graphic& rGrf,
499 const tools::Rectangle& rVisArea,
500 OUString const& rBaseURL);
501
502// the following methods need to be overridden for Excel imports
503 static void ProcessClientAnchor( SvStream& rStData,
504 sal_uInt32 nDatLen,
505 std::unique_ptr<char[]>& rpBuff,
506 sal_uInt32& rBuffLen );
507 virtual void ProcessClientAnchor2( SvStream& rStData,
508 DffRecordHeader& rHd,
509 DffObjData& );
510 static void ProcessClientData( SvStream& rStData,
511 sal_uInt32 nDatLen,
512 std::unique_ptr<char[]>& rpBuff,
513 sal_uInt32& rBuffLen );
514 virtual rtl::Reference<SdrObject> ProcessObj( SvStream& rSt,
515 DffObjData& rData,
516 SvxMSDffClientData& rClientData,
517 tools::Rectangle& rTextRect,
518 SdrObject* pObj);
519 void NotifyFreeObj(SvxMSDffClientData& rData, SdrObject* pObj);
520 void FreeObj(SvxMSDffClientData& rData, SdrObject* pObj);
521
522
526 virtual SdrObject* FinalizeObj(DffObjData& rData,
527 SdrObject* pObj);
528
529 virtual bool GetColorFromPalette(sal_uInt16 nNum, Color& rColor) const;
530
531 // Fontwork objects use a new implementation of ReadObjText because the old
532 // one does not properly import multiple paragraphs.
533 static void ReadObjText( const OUString& rText, SdrObject* pObj );
534
535// the following method needs to be overridden for the import of OLE objects
536 virtual bool GetOLEStorageName( sal_uInt32 nOLEId,
537 OUString& rStorageName,
538 tools::SvRef<SotStorage>& rSrcStorage,
539 css::uno::Reference < css::embed::XStorage >& xDestStg
540 ) const;
541
547 virtual bool ShapeHasText(sal_uLong nShapeId, sal_uLong nFilePos) const;
548
549public:
550 std::unique_ptr<DffPropertyReader> pSecPropSet;
551 std::unordered_map<sal_uInt32, Graphic> aEscherBlipCache;
552
555
557
558 Color MSO_TEXT_CLR_ToColor( sal_uInt32 nColorCode ) const;
559 Color MSO_CLR_ToColor( sal_uInt32 nColorCode,
560 sal_uInt16 nContextProperty = DFF_Prop_lineColor ) const;
561 virtual bool SeekToShape( SvStream& rSt,
562 SvxMSDffClientData* pClientData,
563 sal_uInt32 nId ) const;
564 static bool SeekToRec( SvStream& rSt,
565 sal_uInt16 nRecId,
566 sal_uLong nMaxFilePos,
567 DffRecordHeader* pRecHd = nullptr,
568 sal_uLong nSkipCount = 0 );
569 bool SeekToRec2( sal_uInt16 nRecId1,
570 sal_uInt16 nRecId2,
571 sal_uLong nMaxFilePos ) const;
572
573 static OUString MSDFFReadZString( SvStream& rIn,
574 sal_uInt32 nMaxLen,
575 bool bUniCode);
576
577 [[nodiscard]] static bool ReadCommonRecordHeader( SvStream& rSt,
578 sal_uInt8& rVer,
579 sal_uInt16& rInst,
580 sal_uInt16& rFbt,
581 sal_uInt32& rLength);
582
583// TODO: provide proper documentation here
605 SvxMSDffManager( SvStream& rStCtrl,
606 OUString aBaseURL,
607 sal_uInt32 nOffsDgg,
608 SvStream* pStData,
609 SdrModel* pSdrModel_,
610 tools::Long nApplicationScale,
611 Color mnDefaultColor_,
612 SvStream* pStData2_ = nullptr,
613 bool bSkipImages = false );
614
615 // in PPT the parameters DGGContainerOffset and PicStream are provided by an
616 // init method
617 SvxMSDffManager( SvStream& rStCtrl, OUString aBaseURL );
618 void InitSvxMSDffManager( sal_uInt32 nOffsDgg_,
619 SvStream* pStData_,
620 sal_uInt32 nSvxMSDffOLEConvFlags);
621 void SetDgContainer( SvStream& rSt );
622
623 virtual ~SvxMSDffManager();
624
625 sal_uInt32 GetSvxMSDffSettings() const { return nSvxMSDffSettings; };
626 void SetSvxMSDffSettings( sal_uInt32 nSettings ) { nSvxMSDffSettings = nSettings; };
627
628 static bool MakeContentStream( SotStorage * pStor, const GDIMetaFile & );
629 static void ReadObjText( SvStream& rStream, SdrObject* pObj );
630 static bool ConvertToOle2( SvStream& rStm,
631 sal_uInt32 nLen,
632 const GDIMetaFile*,
633 const tools::SvRef<SotStorage> & rDest );
634
635 void SetModel(SdrModel* pModel, tools::Long nApplicationScale);
636 SdrModel* GetModel() const { return pSdrModel; }
637 void Scale(sal_Int32& rVal) const;
638 void Scale(Point& rPos) const;
639 void Scale(Size& rSiz) const;
640 void ScaleEmu(sal_Int32& rVal) const;
641 sal_uInt32 ScalePt( sal_uInt32 nPt ) const;
642 sal_Int32 ScalePoint( sal_Int32 nVal ) const;
643
644// TODO: provide proper documentation here
654 bool GetBLIP( sal_uLong nIdx, Graphic& rData, tools::Rectangle* pVisArea = nullptr );
655
656// TODO: provide proper documentation here
666 static bool GetBLIPDirect(SvStream& rBLIPStream, Graphic& rData, tools::Rectangle* pVisArea = nullptr );
667
668 bool GetShape(sal_uLong nId, rtl::Reference<SdrObject>& rpData, SvxMSDffImportData& rData);
669
670 rtl::Reference<SdrObject> ImportObj( SvStream& rSt,
671 SvxMSDffClientData& rData,
672 tools::Rectangle& rClientRect,
673 const tools::Rectangle& rGlobalChildRect,
674 int nCalledByGroup,
675 sal_Int32* pShapeId);
676 rtl::Reference<SdrObject> ImportGroup( const DffRecordHeader& rHd,
677 SvStream& rSt,
678 SvxMSDffClientData& rData,
679 tools::Rectangle& rClientRect,
680 const tools::Rectangle& rGlobalChildRect,
681 int nCalledByGroup,
682 sal_Int32* pShapeId );
683 rtl::Reference<SdrObject> ImportShape( const DffRecordHeader& rHd,
684 SvStream& rSt,
685 SvxMSDffClientData& rData,
686 tools::Rectangle& rClientRect,
687 const tools::Rectangle& rGlobalChildRect,
688 int nCalledByGroup,
689 sal_Int32* pShapeId);
690
691 tools::Rectangle GetGlobalChildAnchor( const DffRecordHeader& rHd,
692 SvStream& rSt,
693 tools::Rectangle& aClientRect );
694 void GetGroupAnchors( const DffRecordHeader& rHd,
695 SvStream& rSt,
696 tools::Rectangle& rGroupClientAnchor,
697 tools::Rectangle& rGroupChildAnchor,
698 const tools::Rectangle& rClientRect,
699 const tools::Rectangle& rGlobalChildRect );
700
702 { return m_xShapeInfosById.get(); }
703
705 { return &m_aShapeOrders; }
706
707 void StoreShapeOrder(sal_uLong nId,
708 sal_uLong nTxBx,
709 SdrObject* pObject,
710 SwFlyFrameFormat* pFly = nullptr) const;
711
712 void ExchangeInShapeOrder(SdrObject const * pOldObject,
713 sal_uLong nTxBx,
714 SdrObject* pObject) const;
715
716 void RemoveFromShapeOrder( SdrObject const * pObject ) const;
717
718 static rtl::Reference<SdrOle2Obj> CreateSdrOLEFromStorage(
719 SdrModel& rSdrModel,
720 const OUString& rStorageName,
721 tools::SvRef<SotStorage> const & rSrcStorage,
722 const css::uno::Reference < css::embed::XStorage >& xDestStg,
723 const Graphic& rGraf,
724 const tools::Rectangle& rBoundRect,
725 const tools::Rectangle& rVisArea,
726 SvStream* pDataStrrm,
727 ErrCode& rError,
728 sal_uInt32 nConvertFlags,
729 sal_Int64 nAspect,
730 OUString const& rBaseURL);
731
738 static void SolveSolver( const SvxMSDffSolverContainer& rSolver );
739
740 static bool SetPropValue(
741 const css::uno::Any& rAny,
742 const css::uno::Reference< css::beans::XPropertySet > & rXPropSet,
743 const OUString& rPropertyName
744 );
745
747 static OUString GetFilterNameFromClassID(const SvGlobalName& aGlobName);
749 static void ExtractOwnStream(SotStorage& rSrcStg, SvMemoryStream& rMemStream);
750
751 void insertShapeId( sal_Int32 nShapeId, SdrObject* pShape );
752 void removeShapeId( SdrObject const * pShape );
753 SdrObject* getShapeForId( sal_Int32 nShapeId );
754};
755
757{
758 sal_uInt32 nShapeId;
759 sal_uInt64 nFilePos;
761 sal_uInt32 nTxBxComp;
762
764
765 explicit SvxMSDffShapeInfo(sal_uInt64 nFPos, sal_uInt32 nId=0, // sal_uLong nBIdx=0,
766 sal_uInt16 nSeqId=0, sal_uInt16 nBoxId=0):
767 nShapeId( nId ),
768 nFilePos( nFPos ),
769 nTxBxComp( (nSeqId << 16) + nBoxId )
770 {
771 bReplaceByFly = false;
772 }
774 nShapeId( rInfo.nShapeId ),
775 nFilePos( rInfo.nFilePos ),
776 nTxBxComp( rInfo.nTxBxComp ),
778 {
779 }
780};
781
782
784{
791
792 // Approach: In the Ctor of SvxMSDffManager only the shape ids are stored in
793 // the shape order array. The Text-Box number and the object
794 // pointer are only stored if the shape is really imported.
796 nShapeId( nId ), nTxBxComp( 0 ), pFly( nullptr ), pObj( nullptr ){}
797
798 bool operator<( const SvxMSDffShapeOrder& rEntry ) const
799 { return (nTxBxComp < rEntry.nTxBxComp); }
800};
801
802// the following will be sorted explicitly:
804{
805 bool operator()( SvxMSDffShapeOrder* const& lhs, SvxMSDffShapeOrder* const& rhs ) const { return (*lhs)<(*rhs); }
806};
807class MSFILTER_DLLPUBLIC SvxMSDffShapeTxBxSort : public std::set<SvxMSDffShapeOrder*,CompareSvxMSDffShapeTxBxSort> {};
808
809
810#endif
811
812/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::unique_ptr< DffPropSet > pDefaultPropSet
Definition: msdffimp.hxx:85
const SvxMSDffManager & rManager
Definition: msdffimp.hxx:84
DffPropertyReader & operator=(DffPropertyReader const &)=delete
Degree100 mnFix16Angle
Definition: msdffimp.hxx:96
bool mbRotateGranientFillWithAngle
Definition: msdffimp.hxx:97
DffPropertyReader(DffPropertyReader const &)=delete
DffRecordList * pCList
Definition: msdffimp.hxx:382
virtual ~SvxMSDffClientData()
Definition: msdffimp.hxx:79
virtual void NotifyFreeObj(SdrObject *pObj)=0
block of parameters for import/export for a single call of ImportObjAtCurrentStreamPos()
Definition: msdffimp.hxx:275
SvxMSDffImportData & operator=(SvxMSDffImportData const &)=delete
MSDffImportRecords::const_iterator end() const
Definition: msdffimp.hxx:295
MSDffImportRecords m_Records
Shape pointer, Shape ids and private data.
Definition: msdffimp.hxx:280
tools::Rectangle aParentRect
Rectangle of the surrounding groups, which might have been provided externally.
Definition: msdffimp.hxx:283
std::map< const SdrObject *, SvxMSDffImportRec * > m_ObjToRecMap
Definition: msdffimp.hxx:281
MSDffImportRecords::const_iterator begin() const
Definition: msdffimp.hxx:294
std::set< std::unique_ptr< SvxMSDffImportRec >, comphelper::UniquePtrValueLess< SvxMSDffImportRec > > MSDffImportRecords
list of all SvxMSDffImportRec instances of/for a group
Definition: msdffimp.hxx:279
SvxMSDffImportData(SvxMSDffImportData const &)=delete
bool empty() const
Definition: msdffimp.hxx:290
size_t size() const
Definition: msdffimp.hxx:292
abstract base class for Escher imports
Definition: msdffimp.hxx:415
DffRecordManager maShapeRecords
Definition: msdffimp.hxx:553
SvStream & rStCtrl
Definition: msdffimp.hxx:444
sal_uInt32 nSvxMSDffOLEConvFlags
Definition: msdffimp.hxx:461
tools::Long nPntMul
Definition: msdffimp.hxx:455
const SvxMSDffShapeOrders * GetShapeOrders() const
Definition: msdffimp.hxx:704
sal_uInt32 nSvxMSDffSettings
Definition: msdffimp.hxx:460
std::unique_ptr< SvxMSDffBLIPInfos > m_pBLIPInfos
Definition: msdffimp.hxx:416
SdrModel * pSdrModel
Definition: msdffimp.hxx:447
tools::Long nMapYOfs
Definition: msdffimp.hxx:452
tools::Long nEmuMul
Definition: msdffimp.hxx:453
tools::Long nPntDiv
Definition: msdffimp.hxx:456
tools::Long nMapXOfs
Definition: msdffimp.hxx:451
sal_Int32 nMinAllowedVal
Definition: msdffimp.hxx:458
void SetSvxMSDffSettings(sal_uInt32 nSettings)
Definition: msdffimp.hxx:626
const SvxMSDffShapeInfos_ById * GetShapeInfos() const
Definition: msdffimp.hxx:701
sal_Int32 nMaxAllowedVal
Definition: msdffimp.hxx:459
tools::Long nMapMul
Definition: msdffimp.hxx:449
Color mnDefaultColor
Definition: msdffimp.hxx:554
OUString maBaseURL
Definition: msdffimp.hxx:430
sal_uInt32 mnIdClusters
Definition: msdffimp.hxx:431
std::unique_ptr< SvxMSDffShapeInfos_ById > m_xShapeInfosById
Definition: msdffimp.hxx:418
std::vector< FIDCL > maFidcls
Definition: msdffimp.hxx:432
sal_uInt16 nBLIPCount
Definition: msdffimp.hxx:421
std::map< sal_uInt32, sal_uInt64 > OffsetMap
Definition: msdffimp.hxx:428
tools::Long nEmuDiv
Definition: msdffimp.hxx:454
tools::Long nMapDiv
Definition: msdffimp.hxx:450
SvStream * pStData
Definition: msdffimp.hxx:445
sal_uInt32 GetSvxMSDffSettings() const
Definition: msdffimp.hxx:625
SvxMSDffShapeIdContainer maShapeIdContainer
stores a reference to an imported SdrObject with its shape id if it has one
Definition: msdffimp.hxx:465
SdrModel * GetModel() const
Definition: msdffimp.hxx:636
SvStream * pStData2
Definition: msdffimp.hxx:446
sal_uInt32 nOffsDgg
Definition: msdffimp.hxx:420
SvxMSDffShapeOrders m_aShapeOrders
Definition: msdffimp.hxx:419
std::unique_ptr< DffPropertyReader > pSecPropSet
Definition: msdffimp.hxx:550
ShapeFlag nGroupShapeFlags
Definition: msdffimp.hxx:422
OffsetMap maDgOffsetTable
array of fileoffsets
Definition: msdffimp.hxx:433
std::unique_ptr< SvxMSDffShapeInfos_ByTxBxComp > m_xShapeInfosByTxBxComp
Definition: msdffimp.hxx:417
std::unordered_map< sal_uInt32, Graphic > aEscherBlipCache
Definition: msdffimp.hxx:551
std::vector< std::pair< DffObjData, std::shared_ptr< DffRecordHeader > > > maPendingGroupData
When importing Excel files, cell anchor computations for non-page-anchored groups must be done after ...
Definition: msdffimp.hxx:440
float u
ShapeFlag
Definition: escherex.hxx:85
MSO_LineStyle
MSO_LineDashing
MSO_SPT
mso_sptNil
SvStream & ReadSvxMSDffSolverContainer(SvStream &rIn, SvxMSDffSolverContainer &rContainer)
Definition: msdffimp.cxx:436
constexpr OUStringLiteral SVEXT_PERSIST_STREAM
Definition: msdffimp.hxx:123
DffSeekToContentMode
Definition: msdffimp.hxx:373
@ SEEK_FROM_CURRENT
Definition: msdffimp.hxx:375
@ SEEK_FROM_CURRENT_AND_RESTART
Definition: msdffimp.hxx:376
@ SEEK_FROM_BEGINNING
Definition: msdffimp.hxx:374
::std::multiset< std::shared_ptr< SvxMSDffShapeInfo >, CompareSvxMSDffShapeInfoByTxBxComp > SvxMSDffShapeInfos_ByTxBxComp
Definition: msdffimp.hxx:143
#define DFF_RECORD_MANAGER_BUF_SIZE
Definition: msdffimp.hxx:356
::std::map< sal_Int32, SdrObject * > SvxMSDffShapeIdContainer
Definition: msdffimp.hxx:121
std::vector< std::unique_ptr< SvxMSDffShapeOrder > > SvxMSDffShapeOrders
the following will be sorted by the order of their appearance:
Definition: msdffimp.hxx:126
::std::set< std::shared_ptr< SvxMSDffShapeInfo >, CompareSvxMSDffShapeInfoById > SvxMSDffShapeInfos_ById
Definition: msdffimp.hxx:141
#define MSFILTER_DLLPUBLIC
void Clear(EHistoryType eHistory)
NONE
class SAL_NO_VTABLE XPropertySet
Shape IDs per cluster in DGG atom.
OSQLColumns::const_iterator find(const OSQLColumns::const_iterator &first, const OSQLColumns::const_iterator &last, std::u16string_view _rVal, const ::comphelper::UStringMixEqual &_rCase)
long Long
sal_Int16 nId
sal_uIntPtr sal_uLong
bool operator()(std::shared_ptr< SvxMSDffShapeInfo > const &lhs, std::shared_ptr< SvxMSDffShapeInfo > const &rhs) const
Definition: msdffimp.cxx:3150
bool operator()(SvxMSDffShapeOrder *const &lhs, SvxMSDffShapeOrder *const &rhs) const
Definition: msdffimp.hxx:805
bool bClientAnchor
Definition: msdffimp.hxx:311
const DffRecordHeader & rSpHd
Definition: msdffimp.hxx:301
int nCalledByGroup
Definition: msdffimp.hxx:318
sal_uInt32 nShapeId
Definition: msdffimp.hxx:306
tools::Rectangle aChildAnchor
Definition: msdffimp.hxx:304
DffObjData(const DffRecordHeader &rObjHd, const tools::Rectangle &rBoundRect, int nClByGroup)
Definition: msdffimp.hxx:320
ShapeFlag nSpFlags
Definition: msdffimp.hxx:307
MSO_SPT eShapeType
Definition: msdffimp.hxx:308
bool bPageAnchor
Definition: msdffimp.hxx:317
tools::Rectangle aBoundRect
Definition: msdffimp.hxx:303
bool bRotateTextWithShape
Definition: msdffimp.hxx:316
DffObjData(const std::shared_ptr< DffRecordHeader > &rObjHd, const DffObjData &o)
Definition: msdffimp.hxx:339
bool bClientData
Definition: msdffimp.hxx:312
bool bOpt2
Definition: msdffimp.hxx:315
bool bShapeType
Definition: msdffimp.hxx:310
bool bChildAnchor
Definition: msdffimp.hxx:313
std::unique_ptr< DffRecordList > pNext
Definition: msdffimp.hxx:364
DffRecordList * pPrev
Definition: msdffimp.hxx:362
DffRecordHeader mHd[DFF_RECORD_MANAGER_BUF_SIZE]
Definition: msdffimp.hxx:366
DffRecordList(DffRecordList *pList)
Definition: msdffimp.cxx:2953
sal_uInt32 nCurrent
Definition: msdffimp.hxx:361
sal_uInt32 nCount
Definition: msdffimp.hxx:360
sal_uInt32 dgid
DG owning the SPIDs in this cluster.
Definition: msdffimp.hxx:201
provided by SvxMSDffManager for each shape in a group
Definition: msdffimp.hxx:206
sal_uInt16 nTxBxS
Definition: msdffimp.hxx:207
MSDffTxId(const MSDffTxId &rCopy)
Definition: msdffimp.hxx:211
sal_uInt16 nSequence
Definition: msdffimp.hxx:208
the following will be sorted by the order of their appearance:
Definition: msdffimp.cxx:201
SdrObject * pAObj
pPtr of object (corresponding to shape A)
Definition: msdffimp.hxx:167
ShapeFlag nSpFlagsA
SpFlags of shape A (the original mirror flags must be known when solving the Solver Container)
Definition: msdffimp.hxx:163
sal_uInt32 nShapeC
SPID of connector shape.
Definition: msdffimp.hxx:160
SdrObject * pBObj
pPtr of object (corresponding to shape B)
Definition: msdffimp.hxx:168
ShapeFlag nSpFlagsB
SpFlags of shape B.
Definition: msdffimp.hxx:165
sal_uInt32 ncptiB
Connection site Index of shape B.
Definition: msdffimp.hxx:162
sal_uInt32 nShapeA
SPID of shape A.
Definition: msdffimp.hxx:158
sal_uInt32 ncptiA
Connection site Index of shape A.
Definition: msdffimp.hxx:161
SdrObject * pCObj
pPtr of connector object
Definition: msdffimp.hxx:169
sal_uInt32 nShapeB
SPID of shape B.
Definition: msdffimp.hxx:159
sal_uInt32 nGroupShapeBooleanProperties
Definition: msdffimp.hxx:232
std::optional< sal_uInt32 > nXRelTo
Definition: msdffimp.hxx:229
sal_Int32 nCropFromRight
Definition: msdffimp.hxx:245
sal_Int32 nDxWrapDistLeft
Definition: msdffimp.hxx:238
bool operator<(const SvxMSDffImportRec &rEntry) const
Definition: msdffimp.hxx:265
sal_Int32 nCropFromBottom
Definition: msdffimp.hxx:243
std::optional< tools::Polygon > pWrapPolygon
Definition: msdffimp.hxx:221
sal_Int32 nDxTextLeft
distance of text box from surrounding shape
Definition: msdffimp.hxx:234
sal_uInt32 nClientAnchorLen
Definition: msdffimp.hxx:224
ShapeFlag nFlags
Definition: msdffimp.hxx:233
sal_uInt32 nXAlign
Definition: msdffimp.hxx:228
int relativeHorizontalWidth
in 0.1% or -1 for none
Definition: msdffimp.hxx:258
SvxMSDffImportRec & operator=(const SvxMSDffImportRec &)=delete
MSO_SPT eShapeType
Definition: msdffimp.hxx:249
sal_uInt32 nClientDataLen
Definition: msdffimp.hxx:227
std::unique_ptr< char[]> pClientDataBuffer
Definition: msdffimp.hxx:226
sal_uLong nShapeId
Definition: msdffimp.hxx:248
sal_Int32 nDxTextRight
Definition: msdffimp.hxx:236
sal_uLong nNextShapeId
for linked text boxes
Definition: msdffimp.hxx:247
rtl::Reference< SdrObject > pObj
Definition: msdffimp.hxx:219
sal_Int32 nCropFromTop
Definition: msdffimp.hxx:242
sal_Int32 nDyTextBottom
Definition: msdffimp.hxx:237
sal_Int32 nCropFromLeft
Definition: msdffimp.hxx:244
sal_Int32 nDyWrapDistTop
Definition: msdffimp.hxx:239
sal_Int32 nDyTextTop
Definition: msdffimp.hxx:235
std::unique_ptr< char[]> pClientAnchorBuffer
Definition: msdffimp.hxx:223
std::optional< sal_uInt32 > nYRelTo
Definition: msdffimp.hxx:231
MSO_LineDashing eLineDashing
Definition: msdffimp.hxx:251
sal_uInt32 nYAlign
Definition: msdffimp.hxx:230
sal_Int32 nDxWrapDistRight
Definition: msdffimp.hxx:240
sal_Int32 nDyWrapDistBottom
Definition: msdffimp.hxx:241
MSO_LineStyle eLineStyle
border types
Definition: msdffimp.hxx:250
MSDffTxId aTextId
identifier for text boxes
Definition: msdffimp.hxx:246
sal_uInt32 nTxBxComp
Definition: msdffimp.hxx:761
SvxMSDffShapeInfo(const SvxMSDffShapeInfo &rInfo)
Definition: msdffimp.hxx:773
bool bReplaceByFly
shape can be replaced by a frame in Writer
Definition: msdffimp.hxx:763
sal_uInt64 nFilePos
offset of the shape in control stream for
Definition: msdffimp.hxx:759
sal_uInt32 nShapeId
shape id, used in PLCF SPA and in mso_fbtSp (FSP)
Definition: msdffimp.hxx:758
SvxMSDffShapeInfo(sal_uInt64 nFPos, sal_uInt32 nId=0, sal_uInt16 nSeqId=0, sal_uInt16 nBoxId=0)
Definition: msdffimp.hxx:765
SvxMSDffShapeOrder(sal_uLong nId)
Definition: msdffimp.hxx:795
SdrObject * pObj
pointer to the draw object (or NULL if not used)
Definition: msdffimp.hxx:790
sal_uLong nTxBxComp
chain or box number in the Text-Box-Story (or NULL)
Definition: msdffimp.hxx:786
sal_uLong nShapeId
shape id used in PLCF SPA and in mso_fbtSp (FSP)
Definition: msdffimp.hxx:785
bool operator<(const SvxMSDffShapeOrder &rEntry) const
Definition: msdffimp.hxx:798
SwFlyFrameFormat * pFly
format of frame that was inserted as a replacement
Definition: msdffimp.hxx:787
SvxMSDffSolverContainer & operator=(SvxMSDffSolverContainer const &)=delete
::std::vector< std::unique_ptr< SvxMSDffConnectorRule > > aCList
Definition: msdffimp.hxx:188
SvxMSDffSolverContainer(SvxMSDffSolverContainer const &)=delete
unsigned char sal_uInt8