LibreOffice Module sc (master) 1
xiescher.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#pragma once
21
23#include <vcl/graph.hxx>
24#include "xlescher.hxx"
25#include "xiroot.hxx"
26#include <oox/ole/olehelper.hxx>
27#include <rtl/ustring.hxx>
28#include <svx/svdobj.hxx>
29#include <map>
30#include <memory>
31#include <vector>
32
33namespace com::sun::star {
34 namespace drawing { class XShape; }
35 namespace form { class XForm; }
36}
37
38namespace com::sun::star::container { class XNameContainer; }
39
40class SdrObjList;
41class ScfProgressBar;
42class ScfPropertySet;
43class ScRangeList;
44class XclImpChart;
46class XclImpDrawing;
47
48// Drawing objects ============================================================
49
51typedef std::shared_ptr< XclImpDrawObjBase > XclImpDrawObjRef;
52
55{
56public:
57 explicit XclImpDrawObjBase( const XclImpRoot& rRoot );
58 virtual ~XclImpDrawObjBase() override;
59
61 static XclImpDrawObjRef ReadObj3( const XclImpRoot& rRoot, XclImpStream& rStrm );
63 static XclImpDrawObjRef ReadObj4( const XclImpRoot& rRoot, XclImpStream& rStrm );
65 static XclImpDrawObjRef ReadObj5( const XclImpRoot& rRoot, XclImpStream& rStrm );
67 static XclImpDrawObjRef ReadObj8( const XclImpRoot& rRoot, XclImpStream& rStrm );
68
70 void SetAreaObj( bool bAreaObj ) { mbAreaObj = bAreaObj; }
72 void SetSimpleMacro( bool bMacro ) { mbSimpleMacro = bMacro; }
73
75 void SetAnchor( const XclObjAnchor& rAnchor );
77 void SetDffData(
78 const DffObjData& rDffObjData, const OUString& rObjName, const OUString& rHyperlink,
79 bool bVisible, bool bAutoMargin );
80
82 void SetProcessSdrObj( bool bProcess ) { mbProcessSdr = bProcess; }
84 void SetInsertSdrObj( bool bInsert ) { mbInsertSdr = bInsert; }
86 void SetCustomDffObj( bool bCustom ) { mbCustomDff = bCustom; }
87
89 sal_uInt16 GetObjId() const { return mnObjId; }
91 sal_uInt16 GetObjType() const { return mnObjType; }
93 virtual OUString GetObjName() const;
95 const OUString& GetMacroName() const { return maMacroName; }
96
98 sal_uInt32 GetDffShapeId() const { return mnDffShapeId; }
100 ShapeFlag GetDffFlags() const { return mnDffFlags; }
101
103 bool IsHidden() const { return mbHidden; }
105 bool IsVisible() const { return mbVisible; }
107 bool IsPrintable() const { return mbPrintable; }
108
110 const XclObjAnchor* GetAnchor() const;
112 bool IsValidSize( const tools::Rectangle& rAnchorRect ) const;
114 ScRange GetUsedArea( SCTAB nScTab ) const;
115
117 bool IsProcessSdrObj() const { return mbProcessSdr && !mbHidden; }
119 bool IsInsertSdrObj() const { return mbInsertSdr; }
120
122 std::size_t GetProgressSize() const;
124 rtl::Reference<SdrObject> CreateSdrObject( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect, bool bIsDff ) const;
127 void PreProcessSdrObject( XclImpDffConverter& rDffConv, SdrObject& rSdrObj );
130 void PostProcessSdrObject( XclImpDffConverter& rDffConv, SdrObject& rSdrObj ) const;
131 SCTAB GetTab() const { return mnTab; }
132
133protected:
135 void ReadName5( XclImpStream& rStrm, sal_uInt16 nNameLen );
137 void ReadMacro3( XclImpStream& rStrm, sal_uInt16 nMacroSize );
139 void ReadMacro4( XclImpStream& rStrm, sal_uInt16 nMacroSize );
141 void ReadMacro5( XclImpStream& rStrm, sal_uInt16 nMacroSize );
143 void ReadMacro8( XclImpStream& rStrm );
144
146 void ConvertLineStyle( SdrObject& rSdrObj, const XclObjLineData& rLineData ) const;
148 void ConvertFillStyle( SdrObject& rSdrObj, const XclObjFillData& rFillData ) const;
150 void ConvertFrameStyle( SdrObject& rSdrObj, sal_uInt16 nFrameFlags ) const;
151
153 Color GetSolidLineColor( const XclObjLineData& rLineData ) const;
155 Color GetSolidFillColor( const XclObjFillData& rFillData ) const;
156
158 virtual void DoReadObj3( XclImpStream& rStrm, sal_uInt16 nMacroSize );
160 virtual void DoReadObj4( XclImpStream& rStrm, sal_uInt16 nMacroSize );
162 virtual void DoReadObj5( XclImpStream& rStrm, sal_uInt16 nNameLen, sal_uInt16 nMacroSize );
164 virtual void DoReadObj8SubRec( XclImpStream& rStrm, sal_uInt16 nSubRecId, sal_uInt16 nSubRecSize );
165
167 virtual std::size_t DoGetProgressSize() const;
169 virtual rtl::Reference<SdrObject> DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const;
171 virtual void DoPreProcessSdrObj( XclImpDffConverter& rDffConv, SdrObject& rSdrObj ) const;
173 virtual void DoPostProcessSdrObj( XclImpDffConverter& rDffConv, SdrObject& rSdrObj ) const;
174
177private:
179 void ImplReadObj3( XclImpStream& rStrm );
181 void ImplReadObj4( XclImpStream& rStrm );
183 void ImplReadObj5( XclImpStream& rStrm );
185 void ImplReadObj8( XclImpStream& rStrm );
186
187private:
189 sal_uInt16 mnObjId;
191 sal_uInt16 mnObjType;
192 sal_uInt32 mnDffShapeId;
194 OUString maObjName;
195 OUString maMacroName;
196 OUString maHyperlink;
198 bool mbHidden;
208};
209
211{
212private:
213 std::vector< XclImpDrawObjRef > mObjs;
214
215public:
216 explicit XclImpDrawObjVector() : mObjs() {}
217
218 std::vector< XclImpDrawObjRef >::const_iterator begin() const { return mObjs.begin(); }
219 std::vector< XclImpDrawObjRef >::const_iterator end() const { return mObjs.end(); }
220 void push_back(const XclImpDrawObjRef& rObj) { mObjs.push_back(rObj); }
221
223 void InsertGrouped( XclImpDrawObjRef const & xDrawObj );
224
226 std::size_t GetProgressSize() const;
227};
228
231{
232public:
233 explicit XclImpPhObj( const XclImpRoot& rRoot );
234};
235
238{
239public:
240 explicit XclImpGroupObj( const XclImpRoot& rRoot );
241
243 bool TryInsert( XclImpDrawObjRef const & xDrawObj );
244
245private:
247 virtual void DoReadObj3( XclImpStream& rStrm, sal_uInt16 nMacroSize ) override;
249 virtual void DoReadObj4( XclImpStream& rStrm, sal_uInt16 nMacroSize ) override;
251 virtual void DoReadObj5( XclImpStream& rStrm, sal_uInt16 nNameLen, sal_uInt16 nMacroSize ) override;
253 virtual std::size_t DoGetProgressSize() const override;
255 virtual rtl::Reference<SdrObject> DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const override;
256
258 sal_uInt16 mnFirstUngrouped;
259};
260
263{
264public:
265 explicit XclImpLineObj( const XclImpRoot& rRoot );
266
267private:
269 virtual void DoReadObj3( XclImpStream& rStrm, sal_uInt16 nMacroSize ) override;
271 virtual void DoReadObj4( XclImpStream& rStrm, sal_uInt16 nMacroSize ) override;
273 virtual void DoReadObj5( XclImpStream& rStrm, sal_uInt16 nNameLen, sal_uInt16 nMacroSize ) override;
275 virtual rtl::Reference<SdrObject> DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const override;
276
278 sal_uInt16 mnArrows;
280};
281
284{
285public:
286 explicit XclImpRectObj( const XclImpRoot& rRoot );
287
288protected:
291
293 void ConvertRectStyle( SdrObject& rSdrObj ) const;
294
296 virtual void DoReadObj3( XclImpStream& rStrm, sal_uInt16 nMacroSize ) override;
298 virtual void DoReadObj4( XclImpStream& rStrm, sal_uInt16 nMacroSize ) override;
300 virtual void DoReadObj5( XclImpStream& rStrm, sal_uInt16 nNameLen, sal_uInt16 nMacroSize ) override;
302 virtual rtl::Reference<SdrObject> DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const override;
303
304protected:
307 sal_uInt16 mnFrameFlags;
308};
309
312{
313public:
314 explicit XclImpOvalObj( const XclImpRoot& rRoot );
315
316protected:
318 virtual rtl::Reference<SdrObject> DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const override;
319};
320
322class XclImpArcObj final : public XclImpDrawObjBase
323{
324public:
325 explicit XclImpArcObj( const XclImpRoot& rRoot );
326
327private:
329 virtual void DoReadObj3( XclImpStream& rStrm, sal_uInt16 nMacroSize ) override;
331 virtual void DoReadObj4( XclImpStream& rStrm, sal_uInt16 nMacroSize ) override;
333 virtual void DoReadObj5( XclImpStream& rStrm, sal_uInt16 nNameLen, sal_uInt16 nMacroSize ) override;
335 virtual rtl::Reference<SdrObject> DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const override;
336
340};
341
343class XclImpPolygonObj final : public XclImpRectObj
344{
345public:
346 explicit XclImpPolygonObj( const XclImpRoot& rRoot );
347
348private:
351
353 virtual void DoReadObj4( XclImpStream& rStrm, sal_uInt16 nMacroSize ) override;
355 virtual void DoReadObj5( XclImpStream& rStrm, sal_uInt16 nNameLen, sal_uInt16 nMacroSize ) override;
357 virtual rtl::Reference<SdrObject> DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const override;
358
359 typedef std::vector< Point > PointVector;
361 sal_uInt16 mnPolyFlags;
362 sal_uInt16 mnPointCount;
363};
364
366{
369
371 void ReadByteString( XclImpStream& rStrm );
373 void ReadFormats( XclImpStream& rStrm );
374};
375
378{
379public:
380 explicit XclImpTextObj( const XclImpRoot& rRoot );
381
383 void SetTextData( const XclImpObjTextData& rTextData ) { maTextData = rTextData; }
384
385protected:
387 virtual void DoReadObj3( XclImpStream& rStrm, sal_uInt16 nMacroSize ) override;
389 virtual void DoReadObj4( XclImpStream& rStrm, sal_uInt16 nMacroSize ) override;
391 virtual void DoReadObj5( XclImpStream& rStrm, sal_uInt16 nNameLen, sal_uInt16 nMacroSize ) override;
393 virtual rtl::Reference<SdrObject> DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const override;
395 virtual void DoPreProcessSdrObj( XclImpDffConverter& rDffConv, SdrObject& rSdrObj ) const override;
396
397protected:
399};
400
403{
404public:
406 explicit XclImpChartObj( const XclImpRoot& rRoot, bool bOwnTab = false );
407
410
411protected:
413 virtual void DoReadObj3( XclImpStream& rStrm, sal_uInt16 nMacroSize ) override;
415 virtual void DoReadObj4( XclImpStream& rStrm, sal_uInt16 nMacroSize ) override;
417 virtual void DoReadObj5( XclImpStream& rStrm, sal_uInt16 nNameLen, sal_uInt16 nMacroSize ) override;
419 virtual void DoReadObj8SubRec( XclImpStream& rStrm, sal_uInt16 nSubRecId, sal_uInt16 nSubRecSize ) override;
421 virtual std::size_t DoGetProgressSize() const override;
423 virtual rtl::Reference<SdrObject> DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const override;
425 virtual void DoPostProcessSdrObj( XclImpDffConverter& rDffConv, SdrObject& rSdrObj ) const override;
426
427private:
429 void FinalizeTabChart();
430
431private:
432 typedef std::shared_ptr< XclImpChart > XclImpChartRef;
433
435 bool mbOwnTab;
436};
437
440{
441public:
442 explicit XclImpNoteObj( const XclImpRoot& rRoot );
443
445 void SetNoteData( const ScAddress& rScPos, sal_uInt16 nNoteFlags );
446
447protected:
449 virtual void DoPreProcessSdrObj( XclImpDffConverter& rDffConv, SdrObject& rSdrObj ) const override;
450
451private:
453 sal_uInt16 mnNoteFlags;
454};
455
458{
459public:
460 explicit XclImpControlHelper( const XclImpRoot& rRoot, XclCtrlBindMode eBindMode );
461 virtual ~XclImpControlHelper();
462
464 bool HasCellLink() const { return mxCellLink != nullptr; }
465
468 const css::uno::Reference< css::drawing::XShape >& rxShape,
469 const tools::Rectangle& rAnchorRect ) const;
470
472 void ProcessControl( const XclImpDrawObjBase& rDrawObj ) const;
473
474protected:
476 void ReadCellLinkFormula( XclImpStream& rStrm, bool bWithBoundSize );
478 void ReadSourceRangeFormula( XclImpStream& rStrm, bool bWithBoundSize );
479
481 virtual void DoProcessControl( ScfPropertySet& rPropSet ) const;
482
483 void ApplySheetLinkProps() const;
484 mutable css::uno::Reference< css::drawing::XShape >
486 std::shared_ptr< ScAddress > mxCellLink;
487private:
489 void ReadRangeList( ScRangeList& rScRanges, XclImpStream& rStrm );
491 void ReadRangeList( ScRangeList& rScRanges, XclImpStream& rStrm, bool bWithBoundSize );
492
493private:
495 std::shared_ptr< ScRange > mxSrcRange;
497};
498
501{
502public:
503 explicit XclImpTbxObjBase( const XclImpRoot& rRoot );
504
506 void SetDffProperties( const DffPropSet& rDffPropSet );
507
509 OUString GetServiceName() const { return DoGetServiceName(); }
512 css::script::ScriptEventDescriptor& rDescriptor ) const;
513
514protected:
516 void ConvertFont( ScfPropertySet& rPropSet ) const;
518 void ConvertLabel( ScfPropertySet& rPropSet ) const;
519
521 virtual rtl::Reference<SdrObject> DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const override;
523 virtual void DoPreProcessSdrObj( XclImpDffConverter& rDffConv, SdrObject& rSdrObj ) const override;
524
526 virtual OUString DoGetServiceName() const = 0;
528 virtual XclTbxEventType DoGetEventType() const = 0;
529};
530
533{
534public:
535 explicit XclImpButtonObj( const XclImpRoot& rRoot );
536
537protected:
539 virtual void DoProcessControl( ScfPropertySet& rPropSet ) const override;
541 virtual OUString DoGetServiceName() const override;
543 virtual XclTbxEventType DoGetEventType() const override;
544};
545
548{
549public:
550 explicit XclImpCheckBoxObj( const XclImpRoot& rRoot );
551
552protected:
554 virtual void DoReadObj5( XclImpStream& rStrm, sal_uInt16 nNameLen, sal_uInt16 nMacroSize ) override;
556 virtual void DoReadObj8SubRec( XclImpStream& rStrm, sal_uInt16 nSubRecId, sal_uInt16 nSubRecSize ) override;
558 virtual void DoProcessControl( ScfPropertySet& rPropSet ) const override;
560 virtual OUString DoGetServiceName() const override;
562 virtual XclTbxEventType DoGetEventType() const override;
563
564protected:
565 sal_uInt16 mnState;
566 sal_uInt16 mnCheckBoxFlags;
567};
568
571{
572public:
573 explicit XclImpOptionButtonObj( const XclImpRoot& rRoot );
574
575private:
577 virtual void DoReadObj5( XclImpStream& rStrm, sal_uInt16 nNameLen, sal_uInt16 nMacroSize ) override;
579 virtual void DoReadObj8SubRec( XclImpStream& rStrm, sal_uInt16 nSubRecId, sal_uInt16 nSubRecSize ) override;
581 virtual void DoProcessControl( ScfPropertySet& rPropSet ) const override;
583 virtual OUString DoGetServiceName() const override;
585 virtual XclTbxEventType DoGetEventType() const override;
586
587 sal_uInt16 mnNextInGroup;
588 sal_uInt16 mnFirstInGroup;
589};
590
593{
594public:
595 explicit XclImpLabelObj( const XclImpRoot& rRoot );
596
597protected:
599 virtual void DoProcessControl( ScfPropertySet& rPropSet ) const override;
601 virtual OUString DoGetServiceName() const override;
603 virtual XclTbxEventType DoGetEventType() const override;
604};
605
608{
609public:
610 explicit XclImpGroupBoxObj( const XclImpRoot& rRoot );
611
612private:
614 virtual void DoReadObj5( XclImpStream& rStrm, sal_uInt16 nNameLen, sal_uInt16 nMacroSize ) override;
616 virtual void DoReadObj8SubRec( XclImpStream& rStrm, sal_uInt16 nSubRecId, sal_uInt16 nSubRecSize ) override;
618 virtual void DoProcessControl( ScfPropertySet& rPropSet ) const override;
620 virtual OUString DoGetServiceName() const override;
622 virtual XclTbxEventType DoGetEventType() const override;
623
624 sal_uInt16 mnGroupBoxFlags;
625};
626
629{
630public:
631 explicit XclImpDialogObj( const XclImpRoot& rRoot );
632
633protected:
635 virtual void DoProcessControl( ScfPropertySet& rPropSet ) const override;
637 virtual OUString DoGetServiceName() const override;
639 virtual XclTbxEventType DoGetEventType() const override;
640};
641
643class XclImpEditObj final : public XclImpTbxObjBase
644{
645public:
646 explicit XclImpEditObj( const XclImpRoot& rRoot );
647
648private:
650 bool IsNumeric() const;
651
653 virtual void DoReadObj5( XclImpStream& rStrm, sal_uInt16 nNameLen, sal_uInt16 nMacroSize ) override;
655 virtual void DoReadObj8SubRec( XclImpStream& rStrm, sal_uInt16 nSubRecId, sal_uInt16 nSubRecSize ) override;
657 virtual void DoProcessControl( ScfPropertySet& rPropSet ) const override;
659 virtual OUString DoGetServiceName() const override;
661 virtual XclTbxEventType DoGetEventType() const override;
662
663 sal_uInt16 mnContentType;
664 sal_uInt16 mnMultiLine;
665 sal_uInt16 mnScrollBar;
666 sal_uInt16 mnListBoxObjId;
667};
668
671{
672public:
673 explicit XclImpTbxObjScrollableBase( const XclImpRoot& rRoot );
674
675protected:
677 void ReadSbs( XclImpStream& rStrm );
678
680 virtual void DoReadObj8SubRec( XclImpStream& rStrm, sal_uInt16 nSubRecId, sal_uInt16 nSubRecSize ) override;
681
682protected:
683 sal_uInt16 mnValue;
684 sal_uInt16 mnMin;
685 sal_uInt16 mnMax;
686 sal_uInt16 mnStep;
687 sal_uInt16 mnPageStep;
688 sal_uInt16 mnOrient;
689 sal_uInt16 mnThumbWidth;
690 sal_uInt16 mnScrollFlags;
691};
692
695{
696public:
697 explicit XclImpSpinButtonObj( const XclImpRoot& rRoot );
698
699protected:
701 virtual void DoReadObj5( XclImpStream& rStrm, sal_uInt16 nNameLen, sal_uInt16 nMacroSize ) override;
703 virtual void DoProcessControl( ScfPropertySet& rPropSet ) const override;
705 virtual OUString DoGetServiceName() const override;
707 virtual XclTbxEventType DoGetEventType() const override;
708};
709
712{
713public:
714 explicit XclImpScrollBarObj( const XclImpRoot& rRoot );
715
716protected:
718 virtual void DoReadObj5( XclImpStream& rStrm, sal_uInt16 nNameLen, sal_uInt16 nMacroSize ) override;
720 virtual void DoProcessControl( ScfPropertySet& rPropSet ) const override;
722 virtual OUString DoGetServiceName() const override;
724 virtual XclTbxEventType DoGetEventType() const override;
725};
726
729{
730public:
731 explicit XclImpTbxObjListBase( const XclImpRoot& rRoot );
732
733protected:
737 void SetBoxFormatting( ScfPropertySet& rPropSet ) const;
738
739protected:
740 sal_uInt16 mnEntryCount;
741 sal_uInt16 mnSelEntry;
742 sal_uInt16 mnListFlags;
743 sal_uInt16 mnEditObjId;
745};
746
749{
750public:
751 explicit XclImpListBoxObj( const XclImpRoot& rRoot );
752
753private:
755 void ReadFullLbsData( XclImpStream& rStrm, std::size_t nRecLeft );
756
758 virtual void DoReadObj5( XclImpStream& rStrm, sal_uInt16 nNameLen, sal_uInt16 nMacroSize ) override;
760 virtual void DoReadObj8SubRec( XclImpStream& rStrm, sal_uInt16 nSubRecId, sal_uInt16 nSubRecSize ) override;
762 virtual void DoProcessControl( ScfPropertySet& rPropSet ) const override;
764 virtual OUString DoGetServiceName() const override;
766 virtual XclTbxEventType DoGetEventType() const override;
767
769};
770
773{
774public:
775 explicit XclImpDropDownObj( const XclImpRoot& rRoot );
776
777private:
779 sal_uInt16 GetDropDownType() const;
780
783
785 virtual void DoReadObj5( XclImpStream& rStrm, sal_uInt16 nNameLen, sal_uInt16 nMacroSize ) override;
787 virtual void DoReadObj8SubRec( XclImpStream& rStrm, sal_uInt16 nSubRecId, sal_uInt16 nSubRecSize ) override;
789 virtual void DoProcessControl( ScfPropertySet& rPropSet ) const override;
791 virtual OUString DoGetServiceName() const override;
793 virtual XclTbxEventType DoGetEventType() const override;
794
795 sal_uInt16 mnLeft;
796 sal_uInt16 mnTop;
797 sal_uInt16 mnRight;
798 sal_uInt16 mnBottom;
799 sal_uInt16 mnDropDownFlags;
800 sal_uInt16 mnLineCount;
801 sal_uInt16 mnMinWidth;
802};
803
806{
807public:
808 explicit XclImpPictureObj( const XclImpRoot& rRoot );
810 virtual OUString GetObjName() const override;
812 const Graphic& GetGraphic() const { return maGraphic; }
813
815 bool IsSymbol() const { return mbSymbol; }
817 OUString GetOleStorageName() const;
818
820 bool IsOcxControl() const { return mbEmbedded && mbControl && mbUseCtlsStrm; }
822 std::size_t GetCtlsStreamPos() const { return mnCtlsStrmPos; }
824 std::size_t GetCtlsStreamSize() const { return mnCtlsStrmSize; }
825
826protected:
828 virtual void DoReadObj3( XclImpStream& rStrm, sal_uInt16 nMacroSize ) override;
830 virtual void DoReadObj4( XclImpStream& rStrm, sal_uInt16 nMacroSize ) override;
832 virtual void DoReadObj5( XclImpStream& rStrm, sal_uInt16 nNameLen, sal_uInt16 nMacroSize ) override;
834 virtual void DoReadObj8SubRec( XclImpStream& rStrm, sal_uInt16 nSubRecId, sal_uInt16 nSubRecSize ) override;
836 virtual rtl::Reference<SdrObject> DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const override;
838 virtual void DoPreProcessSdrObj( XclImpDffConverter& rDffConv, SdrObject& rSdrObj ) const override;
839
840private:
842 void ReadFlags3( XclImpStream& rStrm );
844 void ReadFlags8( XclImpStream& rStrm );
846 void ReadPictFmla( XclImpStream& rStrm, sal_uInt16 nLinkSize );
847
848private:
850 OUString maClassName;
851 sal_uInt32 mnStorageId;
852 std::size_t mnCtlsStrmPos;
853 std::size_t mnCtlsStrmSize;
855 bool mbLinked;
856 bool mbSymbol;
859};
860
861// DFF stream conversion ======================================================
862
865{
866public:
867
869 void InsertSdrObjectInfo( SdrObject& rSdrObj, sal_uInt32 nDffShapeId, ShapeFlag nDffFlags );
871 void RemoveSdrObjectInfo( SdrObject& rSdrObj );
872
877
878private:
880 void UpdateConnection( sal_uInt32 nDffShapeId, SdrObject*& rpSdrObj, ShapeFlag* pnDffFlags = nullptr );
881
882private:
885 {
888 explicit XclImpSdrInfo() : mpSdrObj( nullptr ), mnDffFlags( ShapeFlag::NONE ) {}
889 void Set( SdrObject* pSdrObj, ShapeFlag nDffFlags )
890 { mpSdrObj = pSdrObj; mnDffFlags = nDffFlags; }
891 };
892 typedef std::map< sal_uInt32, XclImpSdrInfo > XclImpSdrInfoMap;
893 typedef std::map< SdrObject*, sal_uInt32 > XclImpSdrObjMap;
894
897};
898
903{
904public:
905 explicit XclImpSimpleDffConverter( const XclImpRoot& rRoot, SvStream& rDffStrm );
906 virtual ~XclImpSimpleDffConverter() override;
907
908protected:
910 virtual bool GetColorFromPalette( sal_uInt16 nIndex, Color& rColor ) const override;
911};
912
921{
922public:
923 explicit XclImpDffConverter( const XclImpRoot& rRoot, SvStream& rDffStrm );
924 virtual ~XclImpDffConverter() override;
925
927 void StartProgressBar( std::size_t nProgressSize );
929 void Progress( std::size_t nDelta = 1 );
930
932 void InitializeDrawing( XclImpDrawing& rDrawing, SdrModel& rSdrModel, SdrPage& rSdrPage );
934 void ProcessObject( SdrObjList& rObjList, XclImpDrawObjBase& rDrawObj );
936 void ProcessDrawing( const XclImpDrawObjVector& rDrawObjs );
938 void ProcessDrawing( SvStream& rDffStrm );
940 void FinalizeDrawing();
941
946
948 bool SupportsOleObjects() const;
950 sal_Int32 GetDefaultTextMargin() const { return mnDefTextMargin; }
951
952private:
953 // virtual functions of SvxMSDffManager
954
956 virtual void ProcessClientAnchor2(
957 SvStream& rDffStrm,
958 DffRecordHeader& rHeader,
959 DffObjData& rObjData ) override;
962 SvStream& rDffStrm,
963 DffObjData& rDffObjData,
964 SvxMSDffClientData& rClientData,
965 tools::Rectangle& rTextRect,
966 SdrObject* pOldSdrObj ) override;
967
969 virtual SdrObject* FinalizeObj(
970 DffObjData& rDffObjData,
971 SdrObject* pOldSdrObj ) override;
972
973 // virtual functions of SvxMSConvertOCXControls
974
976 virtual bool InsertControl(
977 const css::uno::Reference<
978 css::form::XFormComponent >& rxFormComp,
979 const css::awt::Size& rSize,
980 css::uno::Reference<
981 css::drawing::XShape >* pxShape,
982 bool bFloatingCtrl ) override;
983
984private:
987 {
992 css::uno::Reference< css::form::XForm >
994 sal_Int32 mnLastCtrlIndex;
996
997 explicit XclImpDffConvData( XclImpDrawing& rDrawing,
998 SdrModel& rSdrModel, SdrPage& rSdrPage );
999 };
1000
1004 const XclImpDffConvData& GetConvData() const;
1005
1007 OUString ReadHlinkProperty( SvStream& rDffStrm ) const;
1008
1010 bool ProcessDgContainer( SvStream& rDffStrm, const DffRecordHeader& rDgHeader );
1012 bool ProcessShGrContainer( SvStream& rDffStrm, const DffRecordHeader& rShGrHeader );
1014 bool ProcessSolverContainer( SvStream& rDffStrm, const DffRecordHeader& rSolverHeader );
1016 bool ProcessShContainer( SvStream& rDffStrm, const DffRecordHeader& rShHeader );
1017
1019 void InsertSdrObject( SdrObjList& rObjList, const XclImpDrawObjBase& rDrawObj, SdrObject* pSdrObj );
1021 void InitControlForm();
1023 void NotifyMacroEventRead();
1024
1025private:
1026 typedef std::shared_ptr< ScfProgressBar > ScfProgressBarRef;
1027 typedef std::shared_ptr< XclImpDffConvData > XclImpDffConvDataRef;
1028
1031 std::vector< XclImpDffConvDataRef >
1033 sal_uInt32 mnOleImpFlags;
1036};
1037
1038// Drawing manager ============================================================
1039
1042class XclImpDrawing : protected XclImpRoot
1043{
1044public:
1045 explicit XclImpDrawing( const XclImpRoot& rRoot, bool bOleObjects );
1046 virtual ~XclImpDrawing() override;
1047
1049 static Graphic ReadImgData( const XclImpRoot& rRoot, XclImpStream& rStrm );
1050
1052 void ReadObj( XclImpStream& rStrm );
1055
1057 bool SupportsOleObjects() const { return mbOleObjs; }
1059 XclImpDrawObjRef FindDrawObj( const DffRecordHeader& rHeader ) const;
1061 XclImpDrawObjRef FindDrawObj( sal_uInt16 nObjId ) const;
1063 const XclImpObjTextData* FindTextData( const DffRecordHeader& rHeader ) const;
1064
1066 void SetSkipObj( sal_uInt16 nObjId );
1068 std::size_t GetProgressSize() const;
1069
1071 virtual tools::Rectangle CalcAnchorRect( const XclObjAnchor& rAnchor, bool bDffAnchor ) const = 0;
1073 virtual void OnObjectInserted( const XclImpDrawObjBase& rDrawObj ) = 0;
1074
1075protected:
1077 void AppendRawObject( const XclImpDrawObjRef& rxDrawObj );
1079 void ImplConvertObjects( XclImpDffConverter& rDffConv, SdrModel& rSdrModel, SdrPage& rSdrPage );
1080
1081private:
1083 static void ReadWmf( Graphic& rGraphic, XclImpStream& rStrm );
1085 static void ReadBmp( Graphic& rGraphic, const XclImpRoot& rRoot, XclImpStream& rStrm );
1086
1088 void ReadDffRecord( XclImpStream& rStrm );
1090 void ReadObj8( XclImpStream& rStrm );
1092 void ReadTxo( XclImpStream& rStrm );
1093
1094private:
1095 typedef std::map< std::size_t, XclImpDrawObjRef > XclImpObjMap;
1096 typedef std::map< sal_uInt16, XclImpDrawObjRef > XclImpObjMapById;
1097 typedef std::shared_ptr< XclImpObjTextData > XclImpObjTextRef;
1098 typedef std::map< std::size_t, XclImpObjTextRef > XclImpObjTextMap;
1099
1107};
1108
1111{
1112public:
1113 explicit XclImpSheetDrawing( const XclImpRoot& rRoot, SCTAB nScTab );
1114
1116 void ReadNote( XclImpStream& rStrm );
1120
1122 const ScRange& GetUsedArea() const { return maScUsedArea; }
1124 void ConvertObjects( XclImpDffConverter& rDffConv );
1125
1127 virtual tools::Rectangle CalcAnchorRect( const XclObjAnchor& rAnchor, bool bDffAnchor ) const override;
1129 virtual void OnObjectInserted( const XclImpDrawObjBase& rDrawObj ) override;
1130
1131private:
1133 void ReadNote3( XclImpStream& rStrm );
1135 void ReadNote8( XclImpStream& rStrm );
1136
1137private:
1139};
1140
1141// The object manager =========================================================
1142
1145{
1146public:
1147 explicit XclImpObjectManager( const XclImpRoot& rRoot );
1148 virtual ~XclImpObjectManager() override;
1149
1152
1156 void ConvertObjects();
1157
1159 OUString GetDefaultObjName( const XclImpDrawObjBase& rDrawObj ) const;
1161 ScRange GetUsedArea( SCTAB nScTab ) const;
1164 void SetOleNameOverrideInfo( const css::uno::Reference< css::container::XNameContainer >& rxOverrideInfo ) { mxOleCtrlNameOverride = rxOverrideInfo; }
1167 OUString GetOleNameOverride( SCTAB nTab, sal_uInt16 nObjId );
1168
1169private:
1170 typedef std::map< sal_uInt16, OUString > DefObjNameMap;
1171 typedef std::shared_ptr< XclImpSheetDrawing > XclImpSheetDrawingRef;
1172 typedef std::map< SCTAB, XclImpSheetDrawingRef > XclImpSheetDrawingMap;
1173
1174 css::uno::Reference< css::container::XNameContainer > mxOleCtrlNameOverride;
1178};
1179
1180// DFF property set helper ====================================================
1181
1188{
1189public:
1190 explicit XclImpDffPropSet( const XclImpRoot& rRoot );
1191
1194 void Read( XclImpStream& rStrm );
1195
1197 sal_uInt32 GetPropertyValue( sal_uInt16 nPropId ) const;
1198
1200 void FillToItemSet( SfxItemSet& rItemSet ) const;
1201
1202private:
1203 typedef std::unique_ptr<SvMemoryStream> SvMemoryStreamPtr;
1204
1208};
1209
1211
1212/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Progress bar for complex progress representation.
A wrapper for a UNO property set.
Definition: fapihelper.hxx:104
An arc object.
Definition: xiescher.hxx:323
XclObjFillData maFillData
Definition: xiescher.hxx:337
virtual void DoReadObj3(XclImpStream &rStrm, sal_uInt16 nMacroSize) override
Reads the contents of the a BIFF3 OBJ record from the passed stream.
Definition: xiescher.cxx:1273
virtual void DoReadObj5(XclImpStream &rStrm, sal_uInt16 nNameLen, sal_uInt16 nMacroSize) override
Reads the contents of the a BIFF5 OBJ record from the passed stream.
Definition: xiescher.cxx:1289
virtual rtl::Reference< SdrObject > DoCreateSdrObj(XclImpDffConverter &rDffConv, const tools::Rectangle &rAnchorRect) const override
Creates and returns a new SdrObject from the contained data.
Definition: xiescher.cxx:1298
XclImpArcObj(const XclImpRoot &rRoot)
Definition: xiescher.cxx:1266
virtual void DoReadObj4(XclImpStream &rStrm, sal_uInt16 nMacroSize) override
Reads the contents of the a BIFF4 OBJ record from the passed stream.
Definition: xiescher.cxx:1281
XclObjLineData maLineData
BIFF5 fill formatting.
Definition: xiescher.hxx:338
sal_uInt8 mnQuadrant
BIFF5 line formatting.
Definition: xiescher.hxx:339
A button control.
Definition: xiescher.hxx:533
virtual XclTbxEventType DoGetEventType() const override
Returns the type of the macro event to be created.
Definition: xiescher.cxx:2203
virtual void DoProcessControl(ScfPropertySet &rPropSet) const override
Sets additional properties for the current form control.
Definition: xiescher.cxx:2151
XclImpButtonObj(const XclImpRoot &rRoot)
Definition: xiescher.cxx:2146
virtual OUString DoGetServiceName() const override
Returns the service name of the control component to be created.
Definition: xiescher.cxx:2198
A chart object.
Definition: xiescher.hxx:403
XclImpChartRef mxChart
Definition: xiescher.hxx:434
XclImpChartObj(const XclImpRoot &rRoot, bool bOwnTab=false)
Definition: xiescher.cxx:1655
void FinalizeTabChart()
Calculates the object anchor of a sheet chart (chart fills one page).
Definition: xiescher.cxx:1809
void ReadChartSubStream(XclImpStream &rStrm)
Reads the complete chart substream (BOF/EOF block).
Definition: xiescher.cxx:1663
virtual std::size_t DoGetProgressSize() const override
Returns the needed size on the progress bar.
Definition: xiescher.cxx:1749
virtual void DoPostProcessSdrObj(XclImpDffConverter &rDffConv, SdrObject &rSdrObj) const override
Converts the chart document.
Definition: xiescher.cxx:1791
std::shared_ptr< XclImpChart > XclImpChartRef
Definition: xiescher.hxx:432
virtual rtl::Reference< SdrObject > DoCreateSdrObj(XclImpDffConverter &rDffConv, const tools::Rectangle &rAnchorRect) const override
Creates and returns a new SdrObject from the contained data.
Definition: xiescher.cxx:1754
virtual void DoReadObj5(XclImpStream &rStrm, sal_uInt16 nNameLen, sal_uInt16 nMacroSize) override
Reads the contents of the a BIFF5 OBJ record from the passed stream.
Definition: xiescher.cxx:1722
virtual void DoReadObj4(XclImpStream &rStrm, sal_uInt16 nMacroSize) override
Reads the contents of the a BIFF4 OBJ record from the passed stream.
Definition: xiescher.cxx:1711
bool mbOwnTab
The chart itself (BOF/EOF substream data).
Definition: xiescher.hxx:435
virtual void DoReadObj8SubRec(XclImpStream &rStrm, sal_uInt16 nSubRecId, sal_uInt16 nSubRecSize) override
Reads the contents of the specified subrecord of a BIFF8 OBJ record from stream.
Definition: xiescher.cxx:1735
virtual void DoReadObj3(XclImpStream &rStrm, sal_uInt16 nMacroSize) override
Reads the contents of the a BIFF3 OBJ record from the passed stream.
Definition: xiescher.cxx:1700
Represents the entire chart substream (all records in BOF/EOF block).
Definition: xichart.hxx:1394
A checkbox control.
Definition: xiescher.hxx:548
virtual void DoReadObj5(XclImpStream &rStrm, sal_uInt16 nNameLen, sal_uInt16 nMacroSize) override
Reads the contents of the a BIFF5 OBJ record from the passed stream.
Definition: xiescher.cxx:2215
virtual OUString DoGetServiceName() const override
Returns the service name of the control component to be created.
Definition: xiescher.cxx:2290
virtual void DoReadObj8SubRec(XclImpStream &rStrm, sal_uInt16 nSubRecId, sal_uInt16 nSubRecSize) override
Reads the contents of the specified subrecord of a BIFF8 OBJ record from stream.
Definition: xiescher.cxx:2232
virtual void DoProcessControl(ScfPropertySet &rPropSet) const override
Sets additional properties for the current form control.
Definition: xiescher.cxx:2252
sal_uInt16 mnState
Definition: xiescher.hxx:565
sal_uInt16 mnCheckBoxFlags
Definition: xiescher.hxx:566
XclImpCheckBoxObj(const XclImpRoot &rRoot)
Definition: xiescher.cxx:2208
virtual XclTbxEventType DoGetEventType() const override
Returns the type of the macro event to be created.
Definition: xiescher.cxx:2295
Helper base class for TBX and OCX form controls to manage spreadsheet links.
Definition: xiescher.hxx:458
rtl::Reference< SdrObject > CreateSdrObjectFromShape(const css::uno::Reference< css::drawing::XShape > &rxShape, const tools::Rectangle &rAnchorRect) const
Returns the SdrObject from the passed control shape and sets the bounding rectangle.
Definition: xiescher.cxx:1886
virtual ~XclImpControlHelper()
Definition: xiescher.cxx:1882
void ReadRangeList(ScRangeList &rScRanges, XclImpStream &rStrm)
Linked cell in the Calc document.
Definition: xiescher.cxx:2023
XclImpControlHelper(const XclImpRoot &rRoot, XclCtrlBindMode eBindMode)
Definition: xiescher.cxx:1876
css::uno::Reference< css::drawing::XShape > mxShape
Definition: xiescher.hxx:485
std::shared_ptr< ScAddress > mxCellLink
The UNO wrapper of the control shape.
Definition: xiescher.hxx:486
const XclImpRoot & mrRoot
Definition: xiescher.hxx:494
void ReadSourceRangeFormula(XclImpStream &rStrm, bool bWithBoundSize)
Reads the formula for the source range from the current position of the stream.
Definition: xiescher.cxx:2007
void ReadCellLinkFormula(XclImpStream &rStrm, bool bWithBoundSize)
Reads the formula for the linked cell from the current position of the stream.
Definition: xiescher.cxx:1995
virtual void DoProcessControl(ScfPropertySet &rPropSet) const
Derived classes will set additional properties for the current form control.
Definition: xiescher.cxx:2019
bool HasCellLink() const
Returns true, if a linked cell address is present.
Definition: xiescher.hxx:464
std::shared_ptr< ScRange > mxSrcRange
Not derived from XclImpRoot to allow multiple inheritance.
Definition: xiescher.hxx:495
void ApplySheetLinkProps() const
Definition: xiescher.cxx:1900
XclCtrlBindMode meBindMode
Source data range in the Calc document.
Definition: xiescher.hxx:496
void ProcessControl(const XclImpDrawObjBase &rDrawObj) const
Sets additional properties to the form control model, calls virtual DoProcessControl().
Definition: xiescher.cxx:1974
This is the central instance for converting binary DFF data into shape objects.
Definition: xiescher.hxx:921
sal_Int32 GetDefaultTextMargin() const
Returns the default text margin in drawing layer units.
Definition: xiescher.hxx:950
ScfProgressBarRef mxProgress
The 'Ctls' stream for OCX form controls.
Definition: xiescher.hxx:1030
virtual ~XclImpDffConverter() override
Definition: xiescher.cxx:3343
void Progress(std::size_t nDelta=1)
Increase the progress bar by the passed value.
Definition: xiescher.cxx:3369
bool mbNotifyMacroEventRead
Default margin in text boxes.
Definition: xiescher.hxx:1035
virtual SdrObject * FinalizeObj(DffObjData &rDffObjData, SdrObject *pOldSdrObj) override
Finalize a DFF object, sets anchor after nested objs have been loaded.
Definition: xiescher.cxx:3705
void StartProgressBar(std::size_t nProgressSize)
Initializes the internal progress bar with the passed size and starts it.
Definition: xiescher.cxx:3362
OUString ReadHlinkProperty(SvStream &rDffStrm) const
Reads contents of a hyperlink property and returns the extracted URL.
Definition: xiescher.cxx:3774
sal_Int32 mnDefTextMargin
Application OLE import settings.
Definition: xiescher.hxx:1034
std::shared_ptr< XclImpDffConvData > XclImpDffConvDataRef
Definition: xiescher.hxx:1027
XclImpDffConvData & GetConvData()
Returns the current drawing manager data struct from top of the stack.
Definition: xiescher.cxx:3762
void NotifyMacroEventRead()
Notify that this document contains a macro event handler.
Definition: xiescher.cxx:3432
std::shared_ptr< ScfProgressBar > ScfProgressBarRef
Definition: xiescher.hxx:1026
void FinalizeDrawing()
Finally called after the objects of the passed drawing manager have been converted.
Definition: xiescher.cxx:3423
XclImpDffConverter(const XclImpRoot &rRoot, SvStream &rDffStrm)
Standard name of control forms.
Definition: xiescher.cxx:3321
void ProcessObject(SdrObjList &rObjList, XclImpDrawObjBase &rDrawObj)
Processes BIFF5 drawing objects without DFF data, inserts into the passed object list.
Definition: xiescher.cxx:3382
void InitControlForm()
Initializes the mxCtrlForm referring to the standard controls form.
Definition: xiescher.cxx:3905
virtual rtl::Reference< SdrObject > ProcessObj(SvStream &rDffStrm, DffObjData &rDffObjData, SvxMSDffClientData &rClientData, tools::Rectangle &rTextRect, SdrObject *pOldSdrObj) override
Processes a DFF object, reads properties from DFF stream.
Definition: xiescher.cxx:3605
tools::SvRef< SotStorageStream > mxCtlsStrm
Definition: xiescher.hxx:1029
bool ProcessSolverContainer(SvStream &rDffStrm, const DffRecordHeader &rSolverHeader)
Processes the solver container (connectors of a sheet).
Definition: xiescher.cxx:3858
bool ProcessShContainer(SvStream &rDffStrm, const DffRecordHeader &rShHeader)
Processes a shape or shape group container (one top-level shape).
Definition: xiescher.cxx:3868
void InsertSdrObject(SdrObjList &rObjList, const XclImpDrawObjBase &rDrawObj, SdrObject *pSdrObj)
Inserts the passed SdrObject into the document.
Definition: xiescher.cxx:3885
void ProcessDrawing(const XclImpDrawObjVector &rDrawObjs)
Processes all objects in the passed list.
Definition: xiescher.cxx:3403
bool ProcessDgContainer(SvStream &rDffStrm, const DffRecordHeader &rDgHeader)
Processes a drawing container (all drawing data of a sheet).
Definition: xiescher.cxx:3805
void InitializeDrawing(XclImpDrawing &rDrawing, SdrModel &rSdrModel, SdrPage &rSdrPage)
Initially called before the objects of the passed drawing manager are converted.
Definition: xiescher.cxx:3375
virtual bool InsertControl(const css::uno::Reference< css::form::XFormComponent > &rxFormComp, const css::awt::Size &rSize, css::uno::Reference< css::drawing::XShape > *pxShape, bool bFloatingCtrl) override
Inserts the passed control rxFComp into the form.
Definition: xiescher.cxx:3727
std::vector< XclImpDffConvDataRef > maDataStack
The progress bar used in ProcessObj().
Definition: xiescher.hxx:1032
virtual void ProcessClientAnchor2(SvStream &rDffStrm, DffRecordHeader &rHeader, DffObjData &rObjData) override
Reads the client anchor from the DFF stream and sets it at the correct object.
Definition: xiescher.cxx:3559
rtl::Reference< SdrObject > CreateSdrObject(const XclImpTbxObjBase &rTbxObj, const tools::Rectangle &rAnchorRect)
Creates the SdrObject for the passed Excel TBX form control object.
Definition: xiescher.cxx:3440
sal_uInt32 mnOleImpFlags
Stack for registered drawing managers.
Definition: xiescher.hxx:1033
bool ProcessShGrContainer(SvStream &rDffStrm, const DffRecordHeader &rShGrHeader)
Processes the global shape group container (all shapes of a sheet).
Definition: xiescher.cxx:3836
bool SupportsOleObjects() const
Returns true, if the conversion of OLE objects is supported.
Definition: xiescher.cxx:3552
This class reads a DFF property set (msofbtOPT record).
Definition: xiescher.hxx:1188
sal_uInt32 GetPropertyValue(sal_uInt16 nPropId) const
Returns the specified property or zero, if not extant.
Definition: xiescher.cxx:4433
SvMemoryStream maDummyStrm
Definition: xiescher.hxx:1205
void Read(XclImpStream &rStrm)
Reads a DFF property set from the stream.
Definition: xiescher.cxx:4418
void FillToItemSet(SfxItemSet &rItemSet) const
Translates the properties and fills the item set.
Definition: xiescher.cxx:4438
std::unique_ptr< SvMemoryStream > SvMemoryStreamPtr
Definition: xiescher.hxx:1203
XclImpSimpleDffConverter maDffConv
Dummy DGG stream for DFF manager.
Definition: xiescher.hxx:1206
SvMemoryStreamPtr mxMemStrm
DFF converter used to resolve palette colors.
Definition: xiescher.hxx:1207
XclImpDffPropSet(const XclImpRoot &rRoot)
Definition: xiescher.cxx:4412
A dialog control.
Definition: xiescher.hxx:629
virtual OUString DoGetServiceName() const override
Returns the service name of the control component to be created.
Definition: xiescher.cxx:2484
XclImpDialogObj(const XclImpRoot &rRoot)
Definition: xiescher.cxx:2473
virtual XclTbxEventType DoGetEventType() const override
Returns the type of the macro event to be created.
Definition: xiescher.cxx:2490
virtual void DoProcessControl(ScfPropertySet &rPropSet) const override
Sets additional properties for the current form control.
Definition: xiescher.cxx:2478
Base class for drawing objects (OBJ records).
Definition: xiescher.hxx:55
void SetInsertSdrObj(bool bInsert)
If set to false, the SdrObject will be created or processed, but not be inserted into the draw page.
Definition: xiescher.hxx:84
static XclImpDrawObjRef ReadObj4(const XclImpRoot &rRoot, XclImpStream &rStrm)
Reads the BIFF4 OBJ record, returns a new drawing object.
Definition: xiescher.cxx:224
static XclImpDrawObjRef ReadObj3(const XclImpRoot &rRoot, XclImpStream &rStrm)
Reads the BIFF3 OBJ record, returns a new drawing object.
Definition: xiescher.cxx:188
bool mbProcessSdr
true = Create simple macro link and hyperlink.
Definition: xiescher.hxx:204
const XclObjAnchor * GetAnchor() const
Returns the object anchor if existing, null otherwise.
Definition: xiescher.cxx:402
sal_uInt32 mnDffShapeId
The Excel object type from OBJ record.
Definition: xiescher.hxx:192
void SetProcessSdrObj(bool bProcess)
If set to false, the SdrObject will not be created, processed, or inserted into the draw page.
Definition: xiescher.hxx:82
virtual void DoReadObj8SubRec(XclImpStream &rStrm, sal_uInt16 nSubRecId, sal_uInt16 nSubRecSize)
Derived classes read the contents of the specified subrecord of a BIFF8 OBJ record from stream.
Definition: xiescher.cxx:819
bool mbAreaObj
true = Object is printable.
Definition: xiescher.hxx:201
static XclImpDrawObjRef ReadObj5(const XclImpRoot &rRoot, XclImpStream &rStrm)
Reads the BIFF5 OBJ record, returns a new drawing object.
Definition: xiescher.cxx:261
bool mbVisible
true = Object is hidden.
Definition: xiescher.hxx:199
void PreProcessSdrObject(XclImpDffConverter &rDffConv, SdrObject &rSdrObj)
Additional processing for the passed SdrObject before insertion into the drawing page (calls virtual ...
Definition: xiescher.cxx:527
std::size_t GetProgressSize() const
Returns the needed size on the progress bar (calls virtual DoGetProgressSize() function).
Definition: xiescher.cxx:430
bool IsVisible() const
Returns true, if the object is visible.
Definition: xiescher.hxx:105
bool IsValidSize(const tools::Rectangle &rAnchorRect) const
Returns true, if the passed size is valid for this object.
Definition: xiescher.cxx:407
void PostProcessSdrObject(XclImpDffConverter &rDffConv, SdrObject &rSdrObj) const
Additional processing for the passed SdrObject after insertion into the drawing page (calls virtual D...
Definition: xiescher.cxx:567
ShapeFlag mnDffFlags
Shape ID from DFF stream.
Definition: xiescher.hxx:193
bool IsHidden() const
Returns true, if the object is hidden.
Definition: xiescher.hxx:103
sal_uInt16 mnObjId
The position of the object in its parent.
Definition: xiescher.hxx:189
bool mbSimpleMacro
true = Set automatic text margin.
Definition: xiescher.hxx:203
virtual void DoReadObj3(XclImpStream &rStrm, sal_uInt16 nMacroSize)
Derived classes read the contents of the a BIFF3 OBJ record from the passed stream.
Definition: xiescher.cxx:807
XclObjAnchor maAnchor
Definition: xiescher.hxx:188
bool mbHidden
true = maAnchor is initialized.
Definition: xiescher.hxx:198
virtual OUString GetObjName() const
Returns the name of this object, may generate a default name.
Definition: xiescher.cxx:393
void SetAnchor(const XclObjAnchor &rAnchor)
Sets the object anchor explicitly.
Definition: xiescher.cxx:375
void ReadMacro5(XclImpStream &rStrm, sal_uInt16 nMacroSize)
Reads the macro link in a BIFF5 OBJ record.
Definition: xiescher.cxx:601
OUString maObjName
Shape flags from DFF stream.
Definition: xiescher.hxx:194
void SetSimpleMacro(bool bMacro)
If set to true, a new SdrObject will be created while in DFF import.
Definition: xiescher.hxx:72
SCTAB GetTab() const
Definition: xiescher.hxx:131
bool IsPrintable() const
Returns true, if the object is printable.
Definition: xiescher.hxx:107
bool mbAutoMargin
true = Width and height must be greater than 0.
Definition: xiescher.hxx:202
bool IsProcessSdrObj() const
Returns true, if the object is valid and will be processed.
Definition: xiescher.hxx:117
SCTAB mnTab
The object identifier (unique per drawing).
Definition: xiescher.hxx:190
void ImplReadObj5(XclImpStream &rStrm)
Reads the contents of a BIFF5 OBJ record.
Definition: xiescher.cxx:884
void ReadMacro3(XclImpStream &rStrm, sal_uInt16 nMacroSize)
Reads the macro link in a BIFF3 OBJ record.
Definition: xiescher.cxx:587
void ReadMacro4(XclImpStream &rStrm, sal_uInt16 nMacroSize)
Reads the macro link in a BIFF4 OBJ record.
Definition: xiescher.cxx:595
rtl::Reference< SdrObject > CreateSdrObject(XclImpDffConverter &rDffConv, const tools::Rectangle &rAnchorRect, bool bIsDff) const
Creates and returns an SdrObject from the contained data.
Definition: xiescher.cxx:435
bool IsInsertSdrObj() const
Returns true, if the SdrObject will be created or processed, but not be inserted into the draw page.
Definition: xiescher.hxx:119
sal_uInt16 mnObjType
Location of object.
Definition: xiescher.hxx:191
virtual ~XclImpDrawObjBase() override
Definition: xiescher.cxx:184
virtual rtl::Reference< SdrObject > DoCreateSdrObj(XclImpDffConverter &rDffConv, const tools::Rectangle &rAnchorRect) const
Derived classes create and return a new SdrObject from the contained data.
Definition: xiescher.cxx:828
void SetDffData(const DffObjData &rDffObjData, const OUString &rObjName, const OUString &rHyperlink, bool bVisible, bool bAutoMargin)
Sets shape data from DFF stream.
Definition: xiescher.cxx:381
void ReadMacro8(XclImpStream &rStrm)
Reads the contents of the ftMacro sub structure in an OBJ record.
Definition: xiescher.cxx:607
OUString maHyperlink
Name of an attached macro.
Definition: xiescher.hxx:196
sal_uInt16 GetObjId() const
Returns the sheet index and Excel object identifier from OBJ record.
Definition: xiescher.hxx:89
XclImpDrawObjBase(const XclImpRoot &rRoot)
Definition: xiescher.cxx:163
virtual void DoReadObj4(XclImpStream &rStrm, sal_uInt16 nMacroSize)
Derived classes read the contents of the a BIFF4 OBJ record from the passed stream.
Definition: xiescher.cxx:811
bool mbInsertSdr
true = Object is valid, do processing and insertion.
Definition: xiescher.hxx:205
const OUString & GetMacroName() const
Returns associated macro name, if set, otherwise zero length string.
Definition: xiescher.hxx:95
void SetAreaObj(bool bAreaObj)
Sets whether this is an area object (then its width and height must be greater than 0).
Definition: xiescher.hxx:70
sal_uInt32 GetDffShapeId() const
Returns the shape identifier used in the DFF stream.
Definition: xiescher.hxx:98
void ImplReadObj4(XclImpStream &rStrm)
Reads the contents of a BIFF4 OBJ record.
Definition: xiescher.cxx:864
Color GetSolidFillColor(const XclObjFillData &rFillData) const
Returns a solid fill color from the passed fill data struct.
Definition: xiescher.cxx:789
void ConvertFrameStyle(SdrObject &rSdrObj, sal_uInt16 nFrameFlags) const
Converts the passed frame flags to the passed SdrObject.
Definition: xiescher.cxx:762
ScRange GetUsedArea(SCTAB nScTab) const
Returns the range in the sheet covered by this object.
Definition: xiescher.cxx:415
void ConvertFillStyle(SdrObject &rSdrObj, const XclObjFillData &rFillData) const
Converts the passed fill formatting to the passed SdrObject.
Definition: xiescher.cxx:692
void NotifyMacroEventRead()
Notify that the document contains a macro event handler.
Definition: xiescher.cxx:516
void ImplReadObj8(XclImpStream &rStrm)
Reads the contents of a BIFF8 OBJ record.
Definition: xiescher.cxx:906
virtual void DoReadObj5(XclImpStream &rStrm, sal_uInt16 nNameLen, sal_uInt16 nMacroSize)
Derived classes read the contents of the a BIFF5 OBJ record from the passed stream.
Definition: xiescher.cxx:815
virtual void DoPreProcessSdrObj(XclImpDffConverter &rDffConv, SdrObject &rSdrObj) const
Derived classes may perform additional processing for the passed SdrObject before insertion.
Definition: xiescher.cxx:834
static XclImpDrawObjRef ReadObj8(const XclImpRoot &rRoot, XclImpStream &rStrm)
Reads the BIFF8 OBJ record, returns a new drawing object.
Definition: xiescher.cxx:309
Color GetSolidLineColor(const XclObjLineData &rLineData) const
Returns a solid line color from the passed line data struct.
Definition: xiescher.cxx:773
bool mbHasAnchor
On-click hyperlink URL.
Definition: xiescher.hxx:197
void SetCustomDffObj(bool bCustom)
If set to true, a new SdrObject will be created while in DFF import.
Definition: xiescher.hxx:86
sal_uInt16 GetObjType() const
Returns the Excel object type from OBJ record.
Definition: xiescher.hxx:91
void ConvertLineStyle(SdrObject &rSdrObj, const XclObjLineData &rLineData) const
Converts the passed line formatting to the passed SdrObject.
Definition: xiescher.cxx:632
OUString maMacroName
Name of the object.
Definition: xiescher.hxx:195
virtual std::size_t DoGetProgressSize() const
Derived classes may return a progress bar size different from 1.
Definition: xiescher.cxx:823
virtual void DoPostProcessSdrObj(XclImpDffConverter &rDffConv, SdrObject &rSdrObj) const
Derived classes may perform additional processing for the passed SdrObject after insertion.
Definition: xiescher.cxx:841
bool mbNotifyMacroEventRead
true = Recreate SdrObject in DFF import.
Definition: xiescher.hxx:207
bool mbCustomDff
true = Insert the SdrObject into draw page.
Definition: xiescher.hxx:206
void ReadName5(XclImpStream &rStrm, sal_uInt16 nNameLen)
Reads the object name in a BIFF5 OBJ record.
Definition: xiescher.cxx:575
bool mbPrintable
true = Object is visible.
Definition: xiescher.hxx:200
ShapeFlag GetDffFlags() const
Returns the shape flags from the DFF stream.
Definition: xiescher.hxx:100
void ImplReadObj3(XclImpStream &rStrm)
Reads the contents of a BIFF3 OBJ record.
Definition: xiescher.cxx:845
void push_back(const XclImpDrawObjRef &rObj)
Definition: xiescher.hxx:220
std::vector< XclImpDrawObjRef >::const_iterator begin() const
Definition: xiescher.hxx:218
std::vector< XclImpDrawObjRef > mObjs
Definition: xiescher.hxx:213
void InsertGrouped(XclImpDrawObjRef const &xDrawObj)
Tries to insert the passed object into the last group or appends it.
Definition: xiescher.cxx:983
std::size_t GetProgressSize() const
Returns the needed size on the progress bar for all contained objects.
Definition: xiescher.cxx:992
std::vector< XclImpDrawObjRef >::const_iterator end() const
Definition: xiescher.hxx:219
Base class for a container for all objects on a drawing (spreadsheet or embedded chart object).
Definition: xiescher.hxx:1043
void ReadDffRecord(XclImpStream &rStrm)
Reads contents of a DFF record and append data to internal DFF stream.
Definition: xiescher.cxx:4166
void SetSkipObj(sal_uInt16 nObjId)
Sets the object with the passed identification to be skipped on import.
Definition: xiescher.cxx:4070
std::size_t GetProgressSize() const
Returns the size of the progress bar shown while processing all objects.
Definition: xiescher.cxx:4075
std::shared_ptr< XclImpObjTextData > XclImpObjTextRef
Definition: xiescher.hxx:1097
bool mbOleObjs
IDs of all objects to be skipped.
Definition: xiescher.hxx:1106
XclImpDrawing(const XclImpRoot &rRoot, bool bOleObjects)
Definition: xiescher.cxx:3937
void ReadObj8(XclImpStream &rStrm)
Reads a BIFF8 OBJ record following an MSODRAWING record.
Definition: xiescher.cxx:4172
static void ReadBmp(Graphic &rGraphic, const XclImpRoot &rRoot, XclImpStream &rStrm)
Reads and returns a bitmap from BMP format.
Definition: xiescher.cxx:4125
XclImpDrawObjRef FindDrawObj(const DffRecordHeader &rHeader) const
Finds the OBJ record data related to the DFF shape at the passed position.
Definition: xiescher.cxx:4032
bool SupportsOleObjects() const
Returns true, if the conversion of OLE objects is supported.
Definition: xiescher.hxx:1057
XclImpObjMap maObjMap
Copy of the DFF page stream in memory.
Definition: xiescher.hxx:1102
void AppendRawObject(const XclImpDrawObjRef &rxDrawObj)
Appends a new drawing object to the list of raw objects (without DFF data).
Definition: xiescher.cxx:4104
void ReadTxo(XclImpStream &rStrm)
Reads the TXO record and following CONTINUE records containing string and formatting.
Definition: xiescher.cxx:4180
XclImpObjMapById maObjMapId
Maps BIFF8 drawing objects to DFF stream position.
Definition: xiescher.hxx:1103
ScfUInt16Vec maSkipObjs
Maps BIFF8 TXO textbox data to DFF stream position.
Definition: xiescher.hxx:1105
XclImpDrawObjVector maRawObjs
Definition: xiescher.hxx:1100
XclImpObjTextMap maTextMap
Maps BIFF8 drawing objects to object ID.
Definition: xiescher.hxx:1104
void ReadObj(XclImpStream &rStrm)
Reads a plain OBJ record (without leading DFF data).
Definition: xiescher.cxx:3965
std::map< sal_uInt16, XclImpDrawObjRef > XclImpObjMapById
Definition: xiescher.hxx:1096
SvMemoryStream maDffStrm
BIFF5 objects without DFF data.
Definition: xiescher.hxx:1101
virtual void OnObjectInserted(const XclImpDrawObjBase &rDrawObj)=0
Called whenever an object has been inserted into the draw page.
void ImplConvertObjects(XclImpDffConverter &rDffConv, SdrModel &rSdrModel, SdrPage &rSdrPage)
Converts all objects and inserts them into the current drawing page.
Definition: xiescher.cxx:4081
static void ReadWmf(Graphic &rGraphic, XclImpStream &rStrm)
Reads and returns a bitmap from WMF/PICT format.
Definition: xiescher.cxx:4112
std::map< std::size_t, XclImpDrawObjRef > XclImpObjMap
Definition: xiescher.hxx:1095
virtual ~XclImpDrawing() override
Definition: xiescher.cxx:3943
const XclImpObjTextData * FindTextData(const DffRecordHeader &rHeader) const
Finds the textbox data related to the DFF shape at the passed position.
Definition: xiescher.cxx:4056
void ReadMsoDrawing(XclImpStream &rStrm)
Reads the MSODRAWING or MSODRAWINGSELECTION record.
Definition: xiescher.cxx:3998
std::map< std::size_t, XclImpObjTextRef > XclImpObjTextMap
Definition: xiescher.hxx:1098
static Graphic ReadImgData(const XclImpRoot &rRoot, XclImpStream &rStrm)
Reads and returns a bitmap from the IMGDATA record.
Definition: xiescher.cxx:3947
virtual tools::Rectangle CalcAnchorRect(const XclObjAnchor &rAnchor, bool bDffAnchor) const =0
Derived classes calculate the resulting rectangle of the passed anchor.
A dropdown listbox control.
Definition: xiescher.hxx:773
XclImpDropDownObj(const XclImpRoot &rRoot)
Definition: xiescher.cxx:2817
virtual void DoReadObj8SubRec(XclImpStream &rStrm, sal_uInt16 nSubRecId, sal_uInt16 nSubRecSize) override
Reads the contents of the specified subrecord of a BIFF8 OBJ record from stream.
Definition: xiescher.cxx:2866
sal_uInt16 mnMinWidth
Definition: xiescher.hxx:801
sal_uInt16 mnTop
Definition: xiescher.hxx:796
virtual void DoReadObj5(XclImpStream &rStrm, sal_uInt16 nNameLen, sal_uInt16 nMacroSize) override
Reads the contents of the a BIFF5 OBJ record from the passed stream.
Definition: xiescher.cxx:2847
sal_uInt16 mnLeft
Definition: xiescher.hxx:795
virtual void DoProcessControl(ScfPropertySet &rPropSet) const override
Sets additional properties for the current form control.
Definition: xiescher.cxx:2878
sal_uInt16 GetDropDownType() const
Returns the type of the dropdown control.
Definition: xiescher.cxx:2829
virtual XclTbxEventType DoGetEventType() const override
Returns the type of the macro event to be created.
Definition: xiescher.cxx:2911
sal_uInt16 mnBottom
Definition: xiescher.hxx:798
void ReadFullLbsData(XclImpStream &rStrm)
Reads dropdown box settings.
Definition: xiescher.cxx:2834
virtual OUString DoGetServiceName() const override
Returns the service name of the control component to be created.
Definition: xiescher.cxx:2904
sal_uInt16 mnLineCount
Definition: xiescher.hxx:800
sal_uInt16 mnRight
Definition: xiescher.hxx:797
sal_uInt16 mnDropDownFlags
Definition: xiescher.hxx:799
An edit control.
Definition: xiescher.hxx:644
sal_uInt16 mnMultiLine
Definition: xiescher.hxx:664
virtual OUString DoGetServiceName() const override
Returns the service name of the control component to be created.
Definition: xiescher.cxx:2561
sal_uInt16 mnContentType
Definition: xiescher.hxx:663
virtual void DoReadObj5(XclImpStream &rStrm, sal_uInt16 nNameLen, sal_uInt16 nMacroSize) override
Reads the contents of the a BIFF5 OBJ record from the passed stream.
Definition: xiescher.cxx:2509
virtual void DoReadObj8SubRec(XclImpStream &rStrm, sal_uInt16 nSubRecId, sal_uInt16 nSubRecSize) override
Reads the contents of the specified subrecord of a BIFF8 OBJ record from stream.
Definition: xiescher.cxx:2525
virtual void DoProcessControl(ScfPropertySet &rPropSet) const override
Sets additional properties for the current form control.
Definition: xiescher.cxx:2540
sal_uInt16 mnListBoxObjId
Definition: xiescher.hxx:666
bool IsNumeric() const
REturns true, if the field type is numeric.
Definition: xiescher.cxx:2504
virtual XclTbxEventType DoGetEventType() const override
Returns the type of the macro event to be created.
Definition: xiescher.cxx:2568
XclImpEditObj(const XclImpRoot &rRoot)
Definition: xiescher.cxx:2495
sal_uInt16 mnScrollBar
Definition: xiescher.hxx:665
A groupbox control.
Definition: xiescher.hxx:608
virtual void DoReadObj8SubRec(XclImpStream &rStrm, sal_uInt16 nSubRecId, sal_uInt16 nSubRecSize) override
Reads the contents of the specified subrecord of a BIFF8 OBJ record from stream.
Definition: xiescher.cxx:2443
virtual XclTbxEventType DoGetEventType() const override
Returns the type of the macro event to be created.
Definition: xiescher.cxx:2468
virtual void DoReadObj5(XclImpStream &rStrm, sal_uInt16 nNameLen, sal_uInt16 nMacroSize) override
Reads the contents of the a BIFF5 OBJ record from the passed stream.
Definition: xiescher.cxx:2428
sal_uInt16 mnGroupBoxFlags
Definition: xiescher.hxx:624
virtual void DoProcessControl(ScfPropertySet &rPropSet) const override
Sets additional properties for the current form control.
Definition: xiescher.cxx:2457
XclImpGroupBoxObj(const XclImpRoot &rRoot)
Definition: xiescher.cxx:2422
virtual OUString DoGetServiceName() const override
Returns the service name of the control component to be created.
Definition: xiescher.cxx:2463
A group object.
Definition: xiescher.hxx:238
virtual void DoReadObj5(XclImpStream &rStrm, sal_uInt16 nNameLen, sal_uInt16 nMacroSize) override
Reads the contents of the a BIFF5 OBJ record from the passed stream.
Definition: xiescher.cxx:1035
bool TryInsert(XclImpDrawObjRef const &xDrawObj)
Tries to insert the drawing object into this or a nested group.
Definition: xiescher.cxx:1010
virtual void DoReadObj4(XclImpStream &rStrm, sal_uInt16 nMacroSize) override
Reads the contents of the a BIFF4 OBJ record from the passed stream.
Definition: xiescher.cxx:1027
virtual rtl::Reference< SdrObject > DoCreateSdrObj(XclImpDffConverter &rDffConv, const tools::Rectangle &rAnchorRect) const override
Creates and returns a new SdrObject from the contained data.
Definition: xiescher.cxx:1049
sal_uInt16 mnFirstUngrouped
Grouped objects.
Definition: xiescher.hxx:258
virtual void DoReadObj3(XclImpStream &rStrm, sal_uInt16 nMacroSize) override
Reads the contents of the a BIFF3 OBJ record from the passed stream.
Definition: xiescher.cxx:1019
virtual std::size_t DoGetProgressSize() const override
Returns a progress bar size that takes all group children into account.
Definition: xiescher.cxx:1044
XclImpGroupObj(const XclImpRoot &rRoot)
Definition: xiescher.cxx:1004
XclImpDrawObjVector maChildren
Definition: xiescher.hxx:257
A label control.
Definition: xiescher.hxx:593
virtual void DoProcessControl(ScfPropertySet &rPropSet) const override
Sets additional properties for the current form control.
Definition: xiescher.cxx:2398
virtual XclTbxEventType DoGetEventType() const override
Returns the type of the macro event to be created.
Definition: xiescher.cxx:2417
virtual OUString DoGetServiceName() const override
Returns the service name of the control component to be created.
Definition: xiescher.cxx:2412
XclImpLabelObj(const XclImpRoot &rRoot)
Definition: xiescher.cxx:2393
A line object.
Definition: xiescher.hxx:263
virtual rtl::Reference< SdrObject > DoCreateSdrObj(XclImpDffConverter &rDffConv, const tools::Rectangle &rAnchorRect) const override
Creates and returns a new SdrObject from the contained data.
Definition: xiescher.cxx:1098
XclImpLineObj(const XclImpRoot &rRoot)
Definition: xiescher.cxx:1062
virtual void DoReadObj4(XclImpStream &rStrm, sal_uInt16 nMacroSize) override
Reads the contents of the a BIFF4 OBJ record from the passed stream.
Definition: xiescher.cxx:1079
XclObjLineData maLineData
Definition: xiescher.hxx:277
virtual void DoReadObj3(XclImpStream &rStrm, sal_uInt16 nMacroSize) override
Reads the contents of the a BIFF3 OBJ record from the passed stream.
Definition: xiescher.cxx:1070
sal_uInt8 mnStartPoint
Line arrows.
Definition: xiescher.hxx:279
sal_uInt16 mnArrows
BIFF5 line formatting.
Definition: xiescher.hxx:278
virtual void DoReadObj5(XclImpStream &rStrm, sal_uInt16 nNameLen, sal_uInt16 nMacroSize) override
Reads the contents of the a BIFF5 OBJ record from the passed stream.
Definition: xiescher.cxx:1088
A listbox control.
Definition: xiescher.hxx:749
virtual XclTbxEventType DoGetEventType() const override
Returns the type of the macro event to be created.
Definition: xiescher.cxx:2812
ScfUInt8Vec maSelection
Definition: xiescher.hxx:768
virtual void DoReadObj5(XclImpStream &rStrm, sal_uInt16 nNameLen, sal_uInt16 nMacroSize) override
Reads the contents of the a BIFF5 OBJ record from the passed stream.
Definition: xiescher.cxx:2743
virtual OUString DoGetServiceName() const override
Returns the service name of the control component to be created.
Definition: xiescher.cxx:2807
virtual void DoReadObj8SubRec(XclImpStream &rStrm, sal_uInt16 nSubRecId, sal_uInt16 nSubRecSize) override
Reads the contents of the specified subrecord of a BIFF8 OBJ record from stream.
Definition: xiescher.cxx:2757
XclImpListBoxObj(const XclImpRoot &rRoot)
Definition: xiescher.cxx:2724
virtual void DoProcessControl(ScfPropertySet &rPropSet) const override
Sets additional properties for the current form control.
Definition: xiescher.cxx:2769
void ReadFullLbsData(XclImpStream &rStrm, std::size_t nRecLeft)
Reads listbox settings and selection.
Definition: xiescher.cxx:2729
A note object, which is a specialized text box object.
Definition: xiescher.hxx:440
sal_uInt16 mnNoteFlags
Cell position of the note object.
Definition: xiescher.hxx:453
void SetNoteData(const ScAddress &rScPos, sal_uInt16 nNoteFlags)
Sets note flags and the note position in the Calc sheet.
Definition: xiescher.cxx:1853
XclImpNoteObj(const XclImpRoot &rRoot)
Definition: xiescher.cxx:1843
virtual void DoPreProcessSdrObj(XclImpDffConverter &rDffConv, SdrObject &rSdrObj) const override
Inserts the note into the document, sets visibility.
Definition: xiescher.cxx:1859
ScAddress maScPos
Definition: xiescher.hxx:452
Stores all drawing and OLE objects and additional data related to these objects.
Definition: xiescher.hxx:1145
css::uno::Reference< css::container::XNameContainer > mxOleCtrlNameOverride
Definition: xiescher.hxx:1174
OUString GetDefaultObjName(const XclImpDrawObjBase &rDrawObj) const
Returns the default name for the passed object.
Definition: xiescher.cxx:4393
std::map< sal_uInt16, OUString > DefObjNameMap
Definition: xiescher.hxx:1170
OUString GetOleNameOverride(SCTAB nTab, sal_uInt16 nObjId)
Returns the name of overridden name ( or zero length string ) for associated object id.
Definition: xiescher.cxx:3347
XclImpObjectManager(const XclImpRoot &rRoot)
Definition: xiescher.cxx:4323
XclImpSheetDrawing & GetSheetDrawing(SCTAB nScTab)
Returns (initially creates) the drawing manager of the specified sheet.
Definition: xiescher.cxx:4363
void ReadMsoDrawingGroup(XclImpStream &rStrm)
Reads the MSODRAWINGGROUP record.
Definition: xiescher.cxx:4354
std::map< SCTAB, XclImpSheetDrawingRef > XclImpSheetDrawingMap
Definition: xiescher.hxx:1172
virtual ~XclImpObjectManager() override
Definition: xiescher.cxx:4350
ScRange GetUsedArea(SCTAB nScTab) const
Returns the used area in the sheet with the passed index.
Definition: xiescher.cxx:4402
void SetOleNameOverrideInfo(const css::uno::Reference< css::container::XNameContainer > &rxOverrideInfo)
Sets the container to receive overridden shape/ctrl names from the filter.
Definition: xiescher.hxx:1164
std::shared_ptr< XclImpSheetDrawing > XclImpSheetDrawingRef
Definition: xiescher.hxx:1171
DefObjNameMap maDefObjNames
Definition: xiescher.hxx:1175
XclImpSheetDrawingMap maSheetDrawings
Copy of global DFF data (DGG container) in memory.
Definition: xiescher.hxx:1177
SvMemoryStream maDggStrm
Default base names for all object types.
Definition: xiescher.hxx:1176
void ConvertObjects()
Inserts all objects into the Calc document.
Definition: xiescher.cxx:4371
An option button control.
Definition: xiescher.hxx:571
sal_uInt16 mnNextInGroup
Definition: xiescher.hxx:587
virtual void DoProcessControl(ScfPropertySet &rPropSet) const override
Sets additional properties for the current form control.
Definition: xiescher.cxx:2339
XclImpOptionButtonObj(const XclImpRoot &rRoot)
Definition: xiescher.cxx:2300
virtual OUString DoGetServiceName() const override
Returns the service name of the control component to be created.
Definition: xiescher.cxx:2383
sal_uInt16 mnFirstInGroup
Next option button in a group.
Definition: xiescher.hxx:588
virtual void DoReadObj8SubRec(XclImpStream &rStrm, sal_uInt16 nSubRecId, sal_uInt16 nSubRecSize) override
Reads the contents of the specified subrecord of a BIFF8 OBJ record from stream.
Definition: xiescher.cxx:2326
virtual void DoReadObj5(XclImpStream &rStrm, sal_uInt16 nNameLen, sal_uInt16 nMacroSize) override
Reads the contents of the a BIFF5 OBJ record from the passed stream.
Definition: xiescher.cxx:2307
virtual XclTbxEventType DoGetEventType() const override
Returns the type of the macro event to be created.
Definition: xiescher.cxx:2388
An oval object.
Definition: xiescher.hxx:312
XclImpOvalObj(const XclImpRoot &rRoot)
Definition: xiescher.cxx:1249
virtual rtl::Reference< SdrObject > DoCreateSdrObj(XclImpDffConverter &rDffConv, const tools::Rectangle &rAnchorRect) const override
Creates and returns a new SdrObject from the contained data.
Definition: xiescher.cxx:1254
A placeholder object for unknown object types.
Definition: xiescher.hxx:231
XclImpPhObj(const XclImpRoot &rRoot)
Definition: xiescher.cxx:998
A picture, an embedded or linked OLE object, or an OCX form control.
Definition: xiescher.hxx:806
std::size_t mnCtlsStrmSize
Position in 'Ctls' stream for this control.
Definition: xiescher.hxx:853
OUString GetOleStorageName() const
Returns the storage name for the OLE object.
Definition: xiescher.cxx:2933
std::size_t GetCtlsStreamSize() const
Returns the size in the 'Ctls' stream for additional form control data.
Definition: xiescher.hxx:824
Graphic maGraphic
Definition: xiescher.hxx:849
std::size_t mnCtlsStrmPos
Identifier of the storage for this object.
Definition: xiescher.hxx:852
bool mbControl
true = Show as symbol.
Definition: xiescher.hxx:857
std::size_t GetCtlsStreamPos() const
Returns the position in the 'Ctls' stream for additional form control data.
Definition: xiescher.hxx:822
bool mbEmbedded
Size in 'Ctls' stream for this control.
Definition: xiescher.hxx:854
OUString maClassName
Picture or OLE placeholder graphic.
Definition: xiescher.hxx:850
bool mbLinked
true = Embedded OLE object.
Definition: xiescher.hxx:855
bool mbSymbol
true = Linked OLE object.
Definition: xiescher.hxx:856
sal_uInt32 mnStorageId
Class name of embedded OLE object.
Definition: xiescher.hxx:851
virtual OUString GetObjName() const override
Returns the ObjectName - can use non-obvious lookup for override in the associated vba document modul...
Definition: xiescher.cxx:3047
virtual void DoReadObj3(XclImpStream &rStrm, sal_uInt16 nMacroSize) override
Reads the contents of the a BIFF3 OBJ record from the passed stream.
Definition: xiescher.cxx:2946
virtual void DoReadObj5(XclImpStream &rStrm, sal_uInt16 nNameLen, sal_uInt16 nMacroSize) override
Reads the contents of the a BIFF5 OBJ record from the passed stream.
Definition: xiescher.cxx:2976
bool IsOcxControl() const
Returns true, if this object is an OCX form control.
Definition: xiescher.hxx:820
virtual void DoReadObj4(XclImpStream &rStrm, sal_uInt16 nMacroSize) override
Reads the contents of the a BIFF4 OBJ record from the passed stream.
Definition: xiescher.cxx:2961
void ReadFlags3(XclImpStream &rStrm)
Reads and sets the picture flags from a BIFF3-BIFF5 OBJ picture record.
Definition: xiescher.cxx:3100
void ReadFlags8(XclImpStream &rStrm)
Reads the contents of the OBJFLAGS subrecord.
Definition: xiescher.cxx:3107
bool IsSymbol() const
Returns true, if the OLE object will be shown as symbol.
Definition: xiescher.hxx:815
virtual void DoReadObj8SubRec(XclImpStream &rStrm, sal_uInt16 nSubRecId, sal_uInt16 nSubRecSize) override
Reads the contents of the specified subrecord of a BIFF8 OBJ record from stream.
Definition: xiescher.cxx:2999
const Graphic & GetGraphic() const
Returns the graphic imported from the IMGDATA record.
Definition: xiescher.hxx:812
bool mbUseCtlsStrm
true = Form control, false = OLE object.
Definition: xiescher.hxx:858
void ReadPictFmla(XclImpStream &rStrm, sal_uInt16 nLinkSize)
Reads the contents of the OBJPICTFMLA subrecord.
Definition: xiescher.cxx:3118
XclImpPictureObj(const XclImpRoot &rRoot)
Definition: xiescher.cxx:2916
virtual rtl::Reference< SdrObject > DoCreateSdrObj(XclImpDffConverter &rDffConv, const tools::Rectangle &rAnchorRect) const override
Creates and returns a new SdrObject from the contained data.
Definition: xiescher.cxx:3014
virtual void DoPreProcessSdrObj(XclImpDffConverter &rDffConv, SdrObject &rSdrObj) const override
Override to do additional processing on the SdrObject.
Definition: xiescher.cxx:3058
A polygon object.
Definition: xiescher.hxx:344
virtual void DoReadObj5(XclImpStream &rStrm, sal_uInt16 nNameLen, sal_uInt16 nMacroSize) override
Reads the contents of the a BIFF5 OBJ record from the passed stream.
Definition: xiescher.cxx:1380
sal_uInt16 mnPolyFlags
Coordinates relative to bounding rectangle.
Definition: xiescher.hxx:361
std::vector< Point > PointVector
Definition: xiescher.hxx:359
virtual rtl::Reference< SdrObject > DoCreateSdrObj(XclImpDffConverter &rDffConv, const tools::Rectangle &rAnchorRect) const override
Creates and returns a new SdrObject from the contained data.
Definition: xiescher.cxx:1403
XclImpPolygonObj(const XclImpRoot &rRoot)
Definition: xiescher.cxx:1345
void ReadCoordList(XclImpStream &rStrm)
Reads the COORDLIST record following the OBJ record.
Definition: xiescher.cxx:1353
PointVector maCoords
Definition: xiescher.hxx:360
sal_uInt16 mnPointCount
Additional flags.
Definition: xiescher.hxx:362
virtual void DoReadObj4(XclImpStream &rStrm, sal_uInt16 nMacroSize) override
Reads the contents of the a BIFF4 OBJ record from the passed stream.
Definition: xiescher.cxx:1369
A rectangle or oval object.
Definition: xiescher.hxx:284
XclImpRectObj(const XclImpRoot &rRoot)
Definition: xiescher.cxx:1199
XclObjLineData maLineData
BIFF5 fill formatting.
Definition: xiescher.hxx:306
sal_uInt16 mnFrameFlags
BIFF5 line formatting.
Definition: xiescher.hxx:307
void ReadFrameData(XclImpStream &rStrm)
Reads fil data, line data, and frame flags.
Definition: xiescher.cxx:1206
virtual void DoReadObj3(XclImpStream &rStrm, sal_uInt16 nMacroSize) override
Reads the contents of the a BIFF3 OBJ record from the passed stream.
Definition: xiescher.cxx:1219
virtual void DoReadObj5(XclImpStream &rStrm, sal_uInt16 nNameLen, sal_uInt16 nMacroSize) override
Reads the contents of the a BIFF5 OBJ record from the passed stream.
Definition: xiescher.cxx:1231
virtual rtl::Reference< SdrObject > DoCreateSdrObj(XclImpDffConverter &rDffConv, const tools::Rectangle &rAnchorRect) const override
Creates and returns a new SdrObject from the contained data.
Definition: xiescher.cxx:1238
void ConvertRectStyle(SdrObject &rSdrObj) const
Converts fill formatting, line formatting, and frame style.
Definition: xiescher.cxx:1212
XclObjFillData maFillData
Definition: xiescher.hxx:305
virtual void DoReadObj4(XclImpStream &rStrm, sal_uInt16 nMacroSize) override
Reads the contents of the a BIFF4 OBJ record from the passed stream.
Definition: xiescher.cxx:1225
Access to global data from other classes.
Definition: xiroot.hxx:129
A scrollbar control.
Definition: xiescher.hxx:712
virtual XclTbxEventType DoGetEventType() const override
Returns the type of the macro event to be created.
Definition: xiescher.cxx:2686
XclImpScrollBarObj(const XclImpRoot &rRoot)
Definition: xiescher.cxx:2651
virtual OUString DoGetServiceName() const override
Returns the service name of the control component to be created.
Definition: xiescher.cxx:2681
virtual void DoProcessControl(ScfPropertySet &rPropSet) const override
Sets additional properties for the current form control.
Definition: xiescher.cxx:2665
virtual void DoReadObj5(XclImpStream &rStrm, sal_uInt16 nNameLen, sal_uInt16 nMacroSize) override
Reads the contents of the a BIFF5 OBJ record from the passed stream.
Definition: xiescher.cxx:2656
Drawing manager of a single sheet.
Definition: xiescher.hxx:1111
void ConvertObjects(XclImpDffConverter &rDffConv)
Converts all objects and inserts them into the sheet drawing page.
Definition: xiescher.cxx:4244
virtual tools::Rectangle CalcAnchorRect(const XclObjAnchor &rAnchor, bool bDffAnchor) const override
Calculate the resulting rectangle of the passed anchor.
Definition: xiescher.cxx:4251
virtual void OnObjectInserted(const XclImpDrawObjBase &rDrawObj) override
On call, updates the used area of the sheet.
Definition: xiescher.cxx:4256
const ScRange & GetUsedArea() const
Returns the total cell range covered by any shapes in the sheet.
Definition: xiescher.hxx:1122
void ReadNote(XclImpStream &rStrm)
Reads the NOTE record.
Definition: xiescher.cxx:4217
void ReadNote3(XclImpStream &rStrm)
Reads a BIFF3-BIFF5 NOTE record.
Definition: xiescher.cxx:4265
void ReadNote8(XclImpStream &rStrm)
Reads a BIFF8 NOTE record.
Definition: xiescher.cxx:4306
XclImpSheetDrawing(const XclImpRoot &rRoot, SCTAB nScTab)
Definition: xiescher.cxx:4209
void ReadTabChart(XclImpStream &rStrm)
Inserts a new chart object and reads the chart substream (BOF/EOF block).
Definition: xiescher.cxx:4235
Simple implementation of the SVX DFF manager.
Definition: xiescher.hxx:903
XclImpSimpleDffConverter(const XclImpRoot &rRoot, SvStream &rDffStrm)
Definition: xiescher.cxx:3287
virtual ~XclImpSimpleDffConverter() override
Definition: xiescher.cxx:3294
virtual bool GetColorFromPalette(sal_uInt16 nIndex, Color &rColor) const override
Returns a color from the Excel color palette.
Definition: xiescher.cxx:3298
The solver container collects all connector rules for connected objects.
Definition: xiescher.hxx:865
std::map< sal_uInt32, XclImpSdrInfo > XclImpSdrInfoMap
Definition: xiescher.hxx:892
XclImpSdrObjMap maSdrObjMap
Maps shape IDs to SdrObjects and flags.
Definition: xiescher.hxx:896
void RemoveSdrObjectInfo(SdrObject &rSdrObj)
Removes information of an SdrObject (and all child objects if it is a group).
Definition: xiescher.cxx:3236
std::map< SdrObject *, sal_uInt32 > XclImpSdrObjMap
Definition: xiescher.hxx:893
void RemoveConnectorRules()
Removes all contained connector rules.
Definition: xiescher.cxx:3269
XclImpSdrInfoMap maSdrInfoMap
Definition: xiescher.hxx:895
void UpdateConnectorRules()
Inserts the SdrObject pointers into all connector rules.
Definition: xiescher.cxx:3259
void UpdateConnection(sal_uInt32 nDffShapeId, SdrObject *&rpSdrObj, ShapeFlag *pnDffFlags=nullptr)
Updates the data of a connected shape in a connector rule.
Definition: xiescher.cxx:3276
void InsertSdrObjectInfo(SdrObject &rSdrObj, sal_uInt32 nDffShapeId, ShapeFlag nDffFlags)
Inserts information about a new SdrObject.
Definition: xiescher.cxx:3227
A spinbutton control.
Definition: xiescher.hxx:695
virtual void DoProcessControl(ScfPropertySet &rPropSet) const override
Sets additional properties for the current form control.
Definition: xiescher.cxx:2628
XclImpSpinButtonObj(const XclImpRoot &rRoot)
Definition: xiescher.cxx:2614
virtual void DoReadObj5(XclImpStream &rStrm, sal_uInt16 nNameLen, sal_uInt16 nMacroSize) override
Reads the contents of the a BIFF5 OBJ record from the passed stream.
Definition: xiescher.cxx:2619
virtual XclTbxEventType DoGetEventType() const override
Returns the type of the macro event to be created.
Definition: xiescher.cxx:2646
virtual OUString DoGetServiceName() const override
Returns the service name of the control component to be created.
Definition: xiescher.cxx:2641
This class is used to import record oriented streams.
Definition: xistream.hxx:278
Base class for textbox based form controls.
Definition: xiescher.hxx:501
bool FillMacroDescriptor(css::script::ScriptEventDescriptor &rDescriptor) const
Fills the passed macro event descriptor.
Definition: xiescher.cxx:2086
virtual OUString DoGetServiceName() const =0
Derived classes return the service name of the control component to be created.
virtual XclTbxEventType DoGetEventType() const =0
Derived classes return the type of the macro event to be created.
virtual void DoPreProcessSdrObj(XclImpDffConverter &rDffConv, SdrObject &rSdrObj) const override
Additional processing on the SdrObject, calls new virtual function DoProcessControl().
Definition: xiescher.cxx:2140
void ConvertLabel(ScfPropertySet &rPropSet) const
Sets control label and text formatting.
Definition: xiescher.cxx:2103
OUString GetServiceName() const
Returns the service name of the control component to be created.
Definition: xiescher.hxx:509
virtual rtl::Reference< SdrObject > DoCreateSdrObj(XclImpDffConverter &rDffConv, const tools::Rectangle &rAnchorRect) const override
Creates and returns a new SdrObject from the contained data.
Definition: xiescher.cxx:2133
void ConvertFont(ScfPropertySet &rPropSet) const
Sets control text formatting.
Definition: xiescher.cxx:2091
XclImpTbxObjBase(const XclImpRoot &rRoot)
Definition: xiescher.cxx:2052
void SetDffProperties(const DffPropSet &rDffPropSet)
Sets line and fill formatting from the passed DFF property set.
Definition: xiescher.cxx:2074
Base class for list controls (listbox, dropdown).
Definition: xiescher.hxx:729
sal_uInt16 mnEditObjId
Definition: xiescher.hxx:743
void ReadLbsData(XclImpStream &rStrm)
Reads common listbox settings.
Definition: xiescher.cxx:2701
sal_uInt16 mnEntryCount
Definition: xiescher.hxx:740
void SetBoxFormatting(ScfPropertySet &rPropSet) const
Sets common listbox/dropdown formatting attributes.
Definition: xiescher.cxx:2710
sal_uInt16 mnSelEntry
Definition: xiescher.hxx:741
XclImpTbxObjListBase(const XclImpRoot &rRoot)
Definition: xiescher.cxx:2691
sal_uInt16 mnListFlags
Definition: xiescher.hxx:742
Base class of scrollable form controls (spin button, scrollbar, listbox, dropdown).
Definition: xiescher.hxx:671
XclImpTbxObjScrollableBase(const XclImpRoot &rRoot)
Definition: xiescher.cxx:2573
virtual void DoReadObj8SubRec(XclImpStream &rStrm, sal_uInt16 nSubRecId, sal_uInt16 nSubRecSize) override
Reads the contents of the specified subrecord of a BIFF8 OBJ record from stream.
Definition: xiescher.cxx:2599
void ReadSbs(XclImpStream &rStrm)
Reads scrollbar data.
Definition: xiescher.cxx:2586
A drawing object supporting text contents.
Definition: xiescher.hxx:378
XclImpObjTextData maTextData
Definition: xiescher.hxx:398
virtual rtl::Reference< SdrObject > DoCreateSdrObj(XclImpDffConverter &rDffConv, const tools::Rectangle &rAnchorRect) const override
Creates and returns a new SdrObject from the contained data.
Definition: xiescher.cxx:1481
virtual void DoReadObj5(XclImpStream &rStrm, sal_uInt16 nNameLen, sal_uInt16 nMacroSize) override
Reads the contents of the a BIFF5 OBJ record from the passed stream.
Definition: xiescher.cxx:1470
XclImpTextObj(const XclImpRoot &rRoot)
Definition: xiescher.cxx:1447
void SetTextData(const XclImpObjTextData &rTextData)
Stores the passed textbox data.
Definition: xiescher.hxx:383
virtual void DoPreProcessSdrObj(XclImpDffConverter &rDffConv, SdrObject &rSdrObj) const override
Inserts the contained text data at the passed object.
Definition: xiescher.cxx:1498
virtual void DoReadObj3(XclImpStream &rStrm, sal_uInt16 nMacroSize) override
Reads the contents of the a BIFF3 OBJ record from the passed stream.
Definition: xiescher.cxx:1452
virtual void DoReadObj4(XclImpStream &rStrm, sal_uInt16 nMacroSize) override
Reads the contents of the a BIFF4 OBJ record from the passed stream.
Definition: xiescher.cxx:1461
ShapeFlag
::std::vector< sal_uInt8 > ScfUInt8Vec
Definition: ftools.hxx:253
::std::vector< sal_uInt16 > ScfUInt16Vec
Definition: ftools.hxx:255
sal_Int32 nIndex
NONE
void SvStream & rStrm
Data per registered drawing manager, will be stacked for recursive calls.
Definition: xiescher.hxx:987
XclImpDffConvData(XclImpDrawing &rDrawing, SdrModel &rSdrModel, SdrPage &rSdrPage)
True = mxCtrlForm is initialized (but maybe still null).
Definition: xiescher.cxx:3309
bool mbHasCtrlForm
Last insertion index of a form control (for macro events).
Definition: xiescher.hxx:995
SdrModel & mrSdrModel
Current drawing container with all drawing objects.
Definition: xiescher.hxx:989
XclImpSolverContainer maSolverCont
The SdrPage of the drawing manager.
Definition: xiescher.hxx:991
css::uno::Reference< css::form::XForm > mxCtrlForm
The solver container for connector rules.
Definition: xiescher.hxx:993
sal_Int32 mnLastCtrlIndex
Controls form of current drawing page.
Definition: xiescher.hxx:994
SdrPage & mrSdrPage
The SdrModel of the drawing manager.
Definition: xiescher.hxx:990
XclObjTextData maData
Definition: xiescher.hxx:367
void ReadByteString(XclImpStream &rStrm)
Plain or rich string.
Definition: xiescher.cxx:1428
void ReadFormats(XclImpStream &rStrm)
Reads text formatting from the passed stream.
Definition: xiescher.cxx:1439
XclImpStringRef mxString
BIFF5 text data.
Definition: xiescher.hxx:368
Stores data about an SdrObject processed during import.
Definition: xiescher.hxx:885
ShapeFlag mnDffFlags
Pointer to an SdrObject.
Definition: xiescher.hxx:887
XclImpSdrInfo()
Shape flags from DFF stream.
Definition: xiescher.hxx:888
void Set(SdrObject *pSdrObj, ShapeFlag nDffFlags)
Definition: xiescher.hxx:889
Represents the position (anchor) of an object in a Calc document.
Definition: xlescher.hxx:284
unsigned char sal_uInt8
sal_Int16 SCTAB
Definition: types.hxx:22
XclImpStream & operator>>(XclImpStream &rStrm, XclImpDffPropSet &rPropSet)
Definition: xiescher.cxx:4444
std::shared_ptr< XclImpDrawObjBase > XclImpDrawObjRef
Definition: xiescher.hxx:50
std::shared_ptr< XclImpString > XclImpStringRef
Definition: xiroot.hxx:28
XclCtrlBindMode
Automatic fill formatting.
Definition: xlescher.hxx:234
XclTbxEventType
Definition: xlescher.hxx:406