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 const tools::Rectangle& GetDffRect() const;
102
104 bool IsHidden() const { return mbHidden; }
106 bool IsVisible() const { return mbVisible; }
108 bool IsPrintable() const { return mbPrintable; }
109
111 const XclObjAnchor* GetAnchor() const;
113 bool IsValidSize( const tools::Rectangle& rAnchorRect ) const;
115 ScRange GetUsedArea( SCTAB nScTab ) const;
116
118 bool IsProcessSdrObj() const { return mbProcessSdr && !mbHidden; }
120 bool IsInsertSdrObj() const { return mbInsertSdr; }
121
123 std::size_t GetProgressSize() const;
125 rtl::Reference<SdrObject> CreateSdrObject( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect, bool bIsDff ) const;
128 void PreProcessSdrObject( XclImpDffConverter& rDffConv, SdrObject& rSdrObj );
131 void PostProcessSdrObject( XclImpDffConverter& rDffConv, SdrObject& rSdrObj ) const;
132 SCTAB GetTab() const { return mnTab; }
133
134protected:
136 void ReadName5( XclImpStream& rStrm, sal_uInt16 nNameLen );
138 void ReadMacro3( XclImpStream& rStrm, sal_uInt16 nMacroSize );
140 void ReadMacro4( XclImpStream& rStrm, sal_uInt16 nMacroSize );
142 void ReadMacro5( XclImpStream& rStrm, sal_uInt16 nMacroSize );
144 void ReadMacro8( XclImpStream& rStrm );
145
147 void ConvertLineStyle( SdrObject& rSdrObj, const XclObjLineData& rLineData ) const;
149 void ConvertFillStyle( SdrObject& rSdrObj, const XclObjFillData& rFillData ) const;
151 void ConvertFrameStyle( SdrObject& rSdrObj, sal_uInt16 nFrameFlags ) const;
152
154 Color GetSolidLineColor( const XclObjLineData& rLineData ) const;
156 Color GetSolidFillColor( const XclObjFillData& rFillData ) const;
157
159 virtual void DoReadObj3( XclImpStream& rStrm, sal_uInt16 nMacroSize );
161 virtual void DoReadObj4( XclImpStream& rStrm, sal_uInt16 nMacroSize );
163 virtual void DoReadObj5( XclImpStream& rStrm, sal_uInt16 nNameLen, sal_uInt16 nMacroSize );
165 virtual void DoReadObj8SubRec( XclImpStream& rStrm, sal_uInt16 nSubRecId, sal_uInt16 nSubRecSize );
166
168 virtual std::size_t DoGetProgressSize() const;
170 virtual rtl::Reference<SdrObject> DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const;
172 virtual void DoPreProcessSdrObj( XclImpDffConverter& rDffConv, SdrObject& rSdrObj ) const;
174 virtual void DoPostProcessSdrObj( XclImpDffConverter& rDffConv, SdrObject& rSdrObj ) const;
175
178private:
180 void ImplReadObj3( XclImpStream& rStrm );
182 void ImplReadObj4( XclImpStream& rStrm );
184 void ImplReadObj5( XclImpStream& rStrm );
186 void ImplReadObj8( XclImpStream& rStrm );
187
188private:
190 sal_uInt16 mnObjId;
192 sal_uInt16 mnObjType;
193 sal_uInt32 mnDffShapeId;
196 OUString maObjName;
197 OUString maMacroName;
198 OUString maHyperlink;
200 bool mbHidden;
210};
211
213{
214private:
215 std::vector< XclImpDrawObjRef > mObjs;
216
217public:
218 explicit XclImpDrawObjVector() : mObjs() {}
219
220 std::vector< XclImpDrawObjRef >::const_iterator begin() const { return mObjs.begin(); }
221 std::vector< XclImpDrawObjRef >::const_iterator end() const { return mObjs.end(); }
222 void push_back(const XclImpDrawObjRef& rObj) { mObjs.push_back(rObj); }
223
225 void InsertGrouped( XclImpDrawObjRef const & xDrawObj );
226
228 std::size_t GetProgressSize() const;
229};
230
233{
234public:
235 explicit XclImpPhObj( const XclImpRoot& rRoot );
236};
237
240{
241public:
242 explicit XclImpGroupObj( const XclImpRoot& rRoot );
243
245 bool TryInsert( XclImpDrawObjRef const & xDrawObj );
246
247private:
249 virtual void DoReadObj3( XclImpStream& rStrm, sal_uInt16 nMacroSize ) override;
251 virtual void DoReadObj4( XclImpStream& rStrm, sal_uInt16 nMacroSize ) override;
253 virtual void DoReadObj5( XclImpStream& rStrm, sal_uInt16 nNameLen, sal_uInt16 nMacroSize ) override;
255 virtual std::size_t DoGetProgressSize() const override;
257 virtual rtl::Reference<SdrObject> DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const override;
258
260 sal_uInt16 mnFirstUngrouped;
261};
262
265{
266public:
267 explicit XclImpLineObj( const XclImpRoot& rRoot );
268
269private:
271 virtual void DoReadObj3( XclImpStream& rStrm, sal_uInt16 nMacroSize ) override;
273 virtual void DoReadObj4( XclImpStream& rStrm, sal_uInt16 nMacroSize ) override;
275 virtual void DoReadObj5( XclImpStream& rStrm, sal_uInt16 nNameLen, sal_uInt16 nMacroSize ) override;
277 virtual rtl::Reference<SdrObject> DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const override;
278
280 sal_uInt16 mnArrows;
282};
283
286{
287public:
288 explicit XclImpRectObj( const XclImpRoot& rRoot );
289
290protected:
293
295 void ConvertRectStyle( SdrObject& rSdrObj ) const;
296
298 virtual void DoReadObj3( XclImpStream& rStrm, sal_uInt16 nMacroSize ) override;
300 virtual void DoReadObj4( XclImpStream& rStrm, sal_uInt16 nMacroSize ) override;
302 virtual void DoReadObj5( XclImpStream& rStrm, sal_uInt16 nNameLen, sal_uInt16 nMacroSize ) override;
304 virtual rtl::Reference<SdrObject> DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const override;
305
306protected:
309 sal_uInt16 mnFrameFlags;
310};
311
314{
315public:
316 explicit XclImpOvalObj( const XclImpRoot& rRoot );
317
318protected:
320 virtual rtl::Reference<SdrObject> DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const override;
321};
322
324class XclImpArcObj final : public XclImpDrawObjBase
325{
326public:
327 explicit XclImpArcObj( const XclImpRoot& rRoot );
328
329private:
331 virtual void DoReadObj3( XclImpStream& rStrm, sal_uInt16 nMacroSize ) override;
333 virtual void DoReadObj4( XclImpStream& rStrm, sal_uInt16 nMacroSize ) override;
335 virtual void DoReadObj5( XclImpStream& rStrm, sal_uInt16 nNameLen, sal_uInt16 nMacroSize ) override;
337 virtual rtl::Reference<SdrObject> DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const override;
338
342};
343
345class XclImpPolygonObj final : public XclImpRectObj
346{
347public:
348 explicit XclImpPolygonObj( const XclImpRoot& rRoot );
349
350private:
353
355 virtual void DoReadObj4( XclImpStream& rStrm, sal_uInt16 nMacroSize ) override;
357 virtual void DoReadObj5( XclImpStream& rStrm, sal_uInt16 nNameLen, sal_uInt16 nMacroSize ) override;
359 virtual rtl::Reference<SdrObject> DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const override;
360
361 typedef std::vector< Point > PointVector;
363 sal_uInt16 mnPolyFlags;
364 sal_uInt16 mnPointCount;
365};
366
368{
371
373 void ReadByteString( XclImpStream& rStrm );
375 void ReadFormats( XclImpStream& rStrm );
376};
377
380{
381public:
382 explicit XclImpTextObj( const XclImpRoot& rRoot );
383
385 void SetTextData( const XclImpObjTextData& rTextData ) { maTextData = rTextData; }
386
387protected:
389 virtual void DoReadObj3( XclImpStream& rStrm, sal_uInt16 nMacroSize ) override;
391 virtual void DoReadObj4( XclImpStream& rStrm, sal_uInt16 nMacroSize ) override;
393 virtual void DoReadObj5( XclImpStream& rStrm, sal_uInt16 nNameLen, sal_uInt16 nMacroSize ) override;
395 virtual rtl::Reference<SdrObject> DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const override;
397 virtual void DoPreProcessSdrObj( XclImpDffConverter& rDffConv, SdrObject& rSdrObj ) const override;
398
399protected:
401};
402
405{
406public:
408 explicit XclImpChartObj( const XclImpRoot& rRoot, bool bOwnTab = false );
409
412
413protected:
415 virtual void DoReadObj3( XclImpStream& rStrm, sal_uInt16 nMacroSize ) override;
417 virtual void DoReadObj4( XclImpStream& rStrm, sal_uInt16 nMacroSize ) override;
419 virtual void DoReadObj5( XclImpStream& rStrm, sal_uInt16 nNameLen, sal_uInt16 nMacroSize ) override;
421 virtual void DoReadObj8SubRec( XclImpStream& rStrm, sal_uInt16 nSubRecId, sal_uInt16 nSubRecSize ) override;
423 virtual std::size_t DoGetProgressSize() const override;
425 virtual rtl::Reference<SdrObject> DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const override;
427 virtual void DoPostProcessSdrObj( XclImpDffConverter& rDffConv, SdrObject& rSdrObj ) const override;
428
429private:
431 void FinalizeTabChart();
432
433private:
434 typedef std::shared_ptr< XclImpChart > XclImpChartRef;
435
437 bool mbOwnTab;
438};
439
442{
443public:
444 explicit XclImpNoteObj( const XclImpRoot& rRoot );
445
447 void SetNoteData( const ScAddress& rScPos, sal_uInt16 nNoteFlags );
448
449protected:
451 virtual void DoPreProcessSdrObj( XclImpDffConverter& rDffConv, SdrObject& rSdrObj ) const override;
452
453private:
455 sal_uInt16 mnNoteFlags;
456};
457
460{
461public:
462 explicit XclImpControlHelper( const XclImpRoot& rRoot, XclCtrlBindMode eBindMode );
463 virtual ~XclImpControlHelper();
464
466 bool HasCellLink() const { return mxCellLink != nullptr; }
467
470 const css::uno::Reference< css::drawing::XShape >& rxShape,
471 const tools::Rectangle& rAnchorRect ) const;
472
474 void ProcessControl( const XclImpDrawObjBase& rDrawObj ) const;
475 void SetStringProperty(const OUString& sName, const OUString& sVal);
476
477protected:
479 void ReadCellLinkFormula( XclImpStream& rStrm, bool bWithBoundSize );
481 void ReadSourceRangeFormula( XclImpStream& rStrm, bool bWithBoundSize );
482
484 virtual void DoProcessControl( ScfPropertySet& rPropSet ) const;
485
486 void ApplySheetLinkProps() const;
487 mutable css::uno::Reference< css::drawing::XShape >
489 std::shared_ptr< ScAddress > mxCellLink;
490private:
492 void ReadRangeList( ScRangeList& rScRanges, XclImpStream& rStrm );
494 void ReadRangeList( ScRangeList& rScRanges, XclImpStream& rStrm, bool bWithBoundSize );
495
496private:
498 std::shared_ptr< ScRange > mxSrcRange;
500};
501
504{
505public:
506 explicit XclImpTbxObjBase( const XclImpRoot& rRoot );
507
509 void SetDffProperties( const DffPropSet& rDffPropSet );
510
512 OUString GetServiceName() const { return DoGetServiceName(); }
515 css::script::ScriptEventDescriptor& rDescriptor ) const;
516
517protected:
519 void ConvertFont( ScfPropertySet& rPropSet ) const;
521 void ConvertLabel( ScfPropertySet& rPropSet ) const;
522
524 virtual rtl::Reference<SdrObject> DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const override;
526 virtual void DoPreProcessSdrObj( XclImpDffConverter& rDffConv, SdrObject& rSdrObj ) const override;
527
529 virtual OUString DoGetServiceName() const = 0;
531 virtual XclTbxEventType DoGetEventType() const = 0;
532};
533
536{
537public:
538 explicit XclImpButtonObj( const XclImpRoot& rRoot );
539
540protected:
542 virtual void DoProcessControl( ScfPropertySet& rPropSet ) const override;
544 virtual OUString DoGetServiceName() const override;
546 virtual XclTbxEventType DoGetEventType() const override;
547};
548
551{
552public:
553 explicit XclImpCheckBoxObj( const XclImpRoot& rRoot );
554
555protected:
557 virtual void DoReadObj5( XclImpStream& rStrm, sal_uInt16 nNameLen, sal_uInt16 nMacroSize ) override;
559 virtual void DoReadObj8SubRec( XclImpStream& rStrm, sal_uInt16 nSubRecId, sal_uInt16 nSubRecSize ) override;
561 virtual void DoProcessControl( ScfPropertySet& rPropSet ) const override;
563 virtual OUString DoGetServiceName() const override;
565 virtual XclTbxEventType DoGetEventType() const override;
566
567protected:
568 sal_uInt16 mnState;
569 sal_uInt16 mnCheckBoxFlags;
570};
571
574{
575public:
576 explicit XclImpOptionButtonObj( const XclImpRoot& rRoot );
577 bool IsInGroup() const;
578
579private:
581 virtual void DoReadObj5( XclImpStream& rStrm, sal_uInt16 nNameLen, sal_uInt16 nMacroSize ) override;
583 virtual void DoReadObj8SubRec( XclImpStream& rStrm, sal_uInt16 nSubRecId, sal_uInt16 nSubRecSize ) override;
585 virtual void DoProcessControl( ScfPropertySet& rPropSet ) const override;
587 virtual OUString DoGetServiceName() const override;
589 virtual XclTbxEventType DoGetEventType() const override;
590
591 sal_uInt16 mnNextInGroup;
592 sal_uInt16 mnFirstInGroup;
593};
594
597{
598public:
599 explicit XclImpLabelObj( const XclImpRoot& rRoot );
600
601protected:
603 virtual void DoProcessControl( ScfPropertySet& rPropSet ) const override;
605 virtual OUString DoGetServiceName() const override;
607 virtual XclTbxEventType DoGetEventType() const override;
608};
609
612{
613public:
614 explicit XclImpGroupBoxObj( const XclImpRoot& rRoot );
615
616private:
618 virtual void DoReadObj5( XclImpStream& rStrm, sal_uInt16 nNameLen, sal_uInt16 nMacroSize ) override;
620 virtual void DoReadObj8SubRec( XclImpStream& rStrm, sal_uInt16 nSubRecId, sal_uInt16 nSubRecSize ) override;
622 virtual void DoProcessControl( ScfPropertySet& rPropSet ) const override;
624 virtual OUString DoGetServiceName() const override;
626 virtual XclTbxEventType DoGetEventType() const override;
627
628 sal_uInt16 mnGroupBoxFlags;
629};
630
633{
634public:
635 explicit XclImpDialogObj( const XclImpRoot& rRoot );
636
637protected:
639 virtual void DoProcessControl( ScfPropertySet& rPropSet ) const override;
641 virtual OUString DoGetServiceName() const override;
643 virtual XclTbxEventType DoGetEventType() const override;
644};
645
647class XclImpEditObj final : public XclImpTbxObjBase
648{
649public:
650 explicit XclImpEditObj( const XclImpRoot& rRoot );
651
652private:
654 bool IsNumeric() const;
655
657 virtual void DoReadObj5( XclImpStream& rStrm, sal_uInt16 nNameLen, sal_uInt16 nMacroSize ) override;
659 virtual void DoReadObj8SubRec( XclImpStream& rStrm, sal_uInt16 nSubRecId, sal_uInt16 nSubRecSize ) override;
661 virtual void DoProcessControl( ScfPropertySet& rPropSet ) const override;
663 virtual OUString DoGetServiceName() const override;
665 virtual XclTbxEventType DoGetEventType() const override;
666
667 sal_uInt16 mnContentType;
668 sal_uInt16 mnMultiLine;
669 sal_uInt16 mnScrollBar;
670 sal_uInt16 mnListBoxObjId;
671};
672
675{
676public:
677 explicit XclImpTbxObjScrollableBase( const XclImpRoot& rRoot );
678
679protected:
681 void ReadSbs( XclImpStream& rStrm );
682
684 virtual void DoReadObj8SubRec( XclImpStream& rStrm, sal_uInt16 nSubRecId, sal_uInt16 nSubRecSize ) override;
685
686protected:
687 sal_uInt16 mnValue;
688 sal_uInt16 mnMin;
689 sal_uInt16 mnMax;
690 sal_uInt16 mnStep;
691 sal_uInt16 mnPageStep;
692 sal_uInt16 mnOrient;
693 sal_uInt16 mnThumbWidth;
694 sal_uInt16 mnScrollFlags;
695};
696
699{
700public:
701 explicit XclImpSpinButtonObj( const XclImpRoot& rRoot );
702
703protected:
705 virtual void DoReadObj5( XclImpStream& rStrm, sal_uInt16 nNameLen, sal_uInt16 nMacroSize ) override;
707 virtual void DoProcessControl( ScfPropertySet& rPropSet ) const override;
709 virtual OUString DoGetServiceName() const override;
711 virtual XclTbxEventType DoGetEventType() const override;
712};
713
716{
717public:
718 explicit XclImpScrollBarObj( const XclImpRoot& rRoot );
719
720protected:
722 virtual void DoReadObj5( XclImpStream& rStrm, sal_uInt16 nNameLen, sal_uInt16 nMacroSize ) override;
724 virtual void DoProcessControl( ScfPropertySet& rPropSet ) const override;
726 virtual OUString DoGetServiceName() const override;
728 virtual XclTbxEventType DoGetEventType() const override;
729};
730
733{
734public:
735 explicit XclImpTbxObjListBase( const XclImpRoot& rRoot );
736
737protected:
741 void SetBoxFormatting( ScfPropertySet& rPropSet ) const;
742
743protected:
744 sal_uInt16 mnEntryCount;
745 sal_uInt16 mnSelEntry;
746 sal_uInt16 mnListFlags;
747 sal_uInt16 mnEditObjId;
749};
750
753{
754public:
755 explicit XclImpListBoxObj( const XclImpRoot& rRoot );
756
757private:
759 void ReadFullLbsData( XclImpStream& rStrm, std::size_t nRecLeft );
760
762 virtual void DoReadObj5( XclImpStream& rStrm, sal_uInt16 nNameLen, sal_uInt16 nMacroSize ) override;
764 virtual void DoReadObj8SubRec( XclImpStream& rStrm, sal_uInt16 nSubRecId, sal_uInt16 nSubRecSize ) override;
766 virtual void DoProcessControl( ScfPropertySet& rPropSet ) const override;
768 virtual OUString DoGetServiceName() const override;
770 virtual XclTbxEventType DoGetEventType() const override;
771
773};
774
777{
778public:
779 explicit XclImpDropDownObj( const XclImpRoot& rRoot );
780
781private:
783 sal_uInt16 GetDropDownType() const;
784
787
789 virtual void DoReadObj5( XclImpStream& rStrm, sal_uInt16 nNameLen, sal_uInt16 nMacroSize ) override;
791 virtual void DoReadObj8SubRec( XclImpStream& rStrm, sal_uInt16 nSubRecId, sal_uInt16 nSubRecSize ) override;
793 virtual void DoProcessControl( ScfPropertySet& rPropSet ) const override;
795 virtual OUString DoGetServiceName() const override;
797 virtual XclTbxEventType DoGetEventType() const override;
798
799 sal_uInt16 mnLeft;
800 sal_uInt16 mnTop;
801 sal_uInt16 mnRight;
802 sal_uInt16 mnBottom;
803 sal_uInt16 mnDropDownFlags;
804 sal_uInt16 mnLineCount;
805 sal_uInt16 mnMinWidth;
806};
807
810{
811public:
812 explicit XclImpPictureObj( const XclImpRoot& rRoot );
814 virtual OUString GetObjName() const override;
816 const Graphic& GetGraphic() const { return maGraphic; }
817
819 bool IsSymbol() const { return mbSymbol; }
821 OUString GetOleStorageName() const;
822
824 bool IsOcxControl() const { return mbEmbedded && mbControl && mbUseCtlsStrm; }
826 std::size_t GetCtlsStreamPos() const { return mnCtlsStrmPos; }
828 std::size_t GetCtlsStreamSize() const { return mnCtlsStrmSize; }
829
830protected:
832 virtual void DoReadObj3( XclImpStream& rStrm, sal_uInt16 nMacroSize ) override;
834 virtual void DoReadObj4( XclImpStream& rStrm, sal_uInt16 nMacroSize ) override;
836 virtual void DoReadObj5( XclImpStream& rStrm, sal_uInt16 nNameLen, sal_uInt16 nMacroSize ) override;
838 virtual void DoReadObj8SubRec( XclImpStream& rStrm, sal_uInt16 nSubRecId, sal_uInt16 nSubRecSize ) override;
840 virtual rtl::Reference<SdrObject> DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const override;
842 virtual void DoPreProcessSdrObj( XclImpDffConverter& rDffConv, SdrObject& rSdrObj ) const override;
843
844private:
846 void ReadFlags3( XclImpStream& rStrm );
848 void ReadFlags8( XclImpStream& rStrm );
850 void ReadPictFmla( XclImpStream& rStrm, sal_uInt16 nLinkSize );
851
852private:
854 OUString maClassName;
855 sal_uInt32 mnStorageId;
856 std::size_t mnCtlsStrmPos;
857 std::size_t mnCtlsStrmSize;
859 bool mbLinked;
860 bool mbSymbol;
863};
864
865// DFF stream conversion ======================================================
866
869{
870public:
871
873 void InsertSdrObjectInfo( SdrObject& rSdrObj, sal_uInt32 nDffShapeId, ShapeFlag nDffFlags );
875 void RemoveSdrObjectInfo( SdrObject& rSdrObj );
876
881
882private:
884 void UpdateConnection( sal_uInt32 nDffShapeId, SdrObject*& rpSdrObj, ShapeFlag* pnDffFlags = nullptr );
885
886private:
889 {
892 explicit XclImpSdrInfo() : mpSdrObj( nullptr ), mnDffFlags( ShapeFlag::NONE ) {}
893 void Set( SdrObject* pSdrObj, ShapeFlag nDffFlags )
894 { mpSdrObj = pSdrObj; mnDffFlags = nDffFlags; }
895 };
896 typedef std::map< sal_uInt32, XclImpSdrInfo > XclImpSdrInfoMap;
897 typedef std::map< SdrObject*, sal_uInt32 > XclImpSdrObjMap;
898
901};
902
907{
908public:
909 explicit XclImpSimpleDffConverter( const XclImpRoot& rRoot, SvStream& rDffStrm );
910 virtual ~XclImpSimpleDffConverter() override;
911
912protected:
914 virtual bool GetColorFromPalette( sal_uInt16 nIndex, Color& rColor ) const override;
915};
916
925{
926public:
927 explicit XclImpDffConverter( const XclImpRoot& rRoot, SvStream& rDffStrm );
928 virtual ~XclImpDffConverter() override;
929
931 void StartProgressBar( std::size_t nProgressSize );
933 void Progress( std::size_t nDelta = 1 );
934
936 void InitializeDrawing( XclImpDrawing& rDrawing, SdrModel& rSdrModel, SdrPage& rSdrPage );
938 void ProcessObject( SdrObjList& rObjList, XclImpDrawObjBase& rDrawObj );
940 void ProcessDrawing( const XclImpDrawObjVector& rDrawObjs );
942 void ProcessDrawing( SvStream& rDffStrm );
944 void FinalizeDrawing();
945
950
952 bool SupportsOleObjects() const;
954 sal_Int32 GetDefaultTextMargin() const { return mnDefTextMargin; }
955
956private:
957 // virtual functions of SvxMSDffManager
958
960 virtual void ProcessClientAnchor2(
961 SvStream& rDffStrm,
962 DffRecordHeader& rHeader,
963 DffObjData& rObjData ) override;
966 SvStream& rDffStrm,
967 DffObjData& rDffObjData,
968 SvxMSDffClientData& rClientData,
969 tools::Rectangle& rTextRect,
970 SdrObject* pOldSdrObj ) override;
971
973 virtual SdrObject* FinalizeObj(
974 DffObjData& rDffObjData,
975 SdrObject* pOldSdrObj ) override;
976
977 // virtual functions of SvxMSConvertOCXControls
978
980 virtual bool InsertControl(
981 const css::uno::Reference<
982 css::form::XFormComponent >& rxFormComp,
983 const css::awt::Size& rSize,
984 css::uno::Reference<
985 css::drawing::XShape >* pxShape,
986 bool bFloatingCtrl ) override;
987
988private:
991 {
996 css::uno::Reference< css::form::XForm >
998 sal_Int32 mnLastCtrlIndex;
1000
1001 explicit XclImpDffConvData( XclImpDrawing& rDrawing,
1002 SdrModel& rSdrModel, SdrPage& rSdrPage );
1003 };
1004
1008 const XclImpDffConvData& GetConvData() const;
1009
1011 OUString ReadHlinkProperty( SvStream& rDffStrm ) const;
1012
1014 bool ProcessDgContainer( SvStream& rDffStrm, const DffRecordHeader& rDgHeader );
1016 bool ProcessShGrContainer( SvStream& rDffStrm, const DffRecordHeader& rShGrHeader );
1018 bool ProcessSolverContainer( SvStream& rDffStrm, const DffRecordHeader& rSolverHeader );
1020 bool ProcessShContainer( SvStream& rDffStrm, const DffRecordHeader& rShHeader );
1021
1023 void InsertSdrObject( SdrObjList& rObjList, const XclImpDrawObjBase& rDrawObj, SdrObject* pSdrObj );
1025 void InitControlForm();
1027 void NotifyMacroEventRead();
1028
1029private:
1030 typedef std::shared_ptr< ScfProgressBar > ScfProgressBarRef;
1031 typedef std::shared_ptr< XclImpDffConvData > XclImpDffConvDataRef;
1032
1035 std::vector< XclImpDffConvDataRef >
1037 sal_uInt32 mnOleImpFlags;
1040};
1041
1042// Drawing manager ============================================================
1043
1046class XclImpDrawing : protected XclImpRoot
1047{
1048public:
1049 explicit XclImpDrawing( const XclImpRoot& rRoot, bool bOleObjects );
1050 virtual ~XclImpDrawing() override;
1051
1053 static Graphic ReadImgData( const XclImpRoot& rRoot, XclImpStream& rStrm );
1054
1056 void ReadObj( XclImpStream& rStrm );
1059
1061 bool SupportsOleObjects() const { return mbOleObjs; }
1063 XclImpDrawObjRef FindDrawObj( const DffRecordHeader& rHeader ) const;
1065 XclImpDrawObjRef FindDrawObj( sal_uInt16 nObjId ) const;
1067 const XclImpObjTextData* FindTextData( const DffRecordHeader& rHeader ) const;
1068
1069 void ApplyGroupBoxes();
1070
1072 void SetSkipObj( sal_uInt16 nObjId );
1074 std::size_t GetProgressSize() const;
1075
1077 virtual tools::Rectangle CalcAnchorRect( const XclObjAnchor& rAnchor, bool bDffAnchor ) const = 0;
1079 virtual void OnObjectInserted( const XclImpDrawObjBase& rDrawObj ) = 0;
1080
1081protected:
1083 void AppendRawObject( const XclImpDrawObjRef& rxDrawObj );
1085 void ImplConvertObjects( XclImpDffConverter& rDffConv, SdrModel& rSdrModel, SdrPage& rSdrPage );
1086
1087private:
1089 static void ReadWmf( Graphic& rGraphic, XclImpStream& rStrm );
1091 static void ReadBmp( Graphic& rGraphic, const XclImpRoot& rRoot, XclImpStream& rStrm );
1092
1094 void ReadDffRecord( XclImpStream& rStrm );
1096 void ReadObj8( XclImpStream& rStrm );
1098 void ReadTxo( XclImpStream& rStrm );
1099
1100private:
1101 typedef std::map< std::size_t, XclImpDrawObjRef > XclImpObjMap;
1102 typedef std::map< sal_uInt16, XclImpDrawObjRef > XclImpObjMapById;
1103 typedef std::shared_ptr< XclImpObjTextData > XclImpObjTextRef;
1104 typedef std::map< std::size_t, XclImpObjTextRef > XclImpObjTextMap;
1105
1113};
1114
1117{
1118public:
1119 explicit XclImpSheetDrawing( const XclImpRoot& rRoot, SCTAB nScTab );
1120
1122 void ReadNote( XclImpStream& rStrm );
1126
1128 const ScRange& GetUsedArea() const { return maScUsedArea; }
1130 void ConvertObjects( XclImpDffConverter& rDffConv );
1131
1133 virtual tools::Rectangle CalcAnchorRect( const XclObjAnchor& rAnchor, bool bDffAnchor ) const override;
1135 virtual void OnObjectInserted( const XclImpDrawObjBase& rDrawObj ) override;
1136
1137private:
1139 void ReadNote3( XclImpStream& rStrm );
1141 void ReadNote8( XclImpStream& rStrm );
1142
1143private:
1145};
1146
1147// The object manager =========================================================
1148
1151{
1152public:
1153 explicit XclImpObjectManager( const XclImpRoot& rRoot );
1154 virtual ~XclImpObjectManager() override;
1155
1158
1162 void ConvertObjects();
1163
1165 OUString GetDefaultObjName( const XclImpDrawObjBase& rDrawObj ) const;
1167 ScRange GetUsedArea( SCTAB nScTab ) const;
1170 void SetOleNameOverrideInfo( const css::uno::Reference< css::container::XNameContainer >& rxOverrideInfo ) { mxOleCtrlNameOverride = rxOverrideInfo; }
1173 OUString GetOleNameOverride( SCTAB nTab, sal_uInt16 nObjId );
1174
1175private:
1176 typedef std::map< sal_uInt16, OUString > DefObjNameMap;
1177 typedef std::shared_ptr< XclImpSheetDrawing > XclImpSheetDrawingRef;
1178 typedef std::map< SCTAB, XclImpSheetDrawingRef > XclImpSheetDrawingMap;
1179
1180 css::uno::Reference< css::container::XNameContainer > mxOleCtrlNameOverride;
1184};
1185
1186// DFF property set helper ====================================================
1187
1194{
1195public:
1196 explicit XclImpDffPropSet( const XclImpRoot& rRoot );
1197
1200 void Read( XclImpStream& rStrm );
1201
1203 sal_uInt32 GetPropertyValue( sal_uInt16 nPropId ) const;
1204
1206 void FillToItemSet( SfxItemSet& rItemSet ) const;
1207
1208private:
1209 typedef std::unique_ptr<SvMemoryStream> SvMemoryStreamPtr;
1210
1214};
1215
1217
1218/* 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:325
XclObjFillData maFillData
Definition: xiescher.hxx:339
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:1279
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:1295
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:1304
XclImpArcObj(const XclImpRoot &rRoot)
Definition: xiescher.cxx:1272
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:1287
XclObjLineData maLineData
BIFF5 fill formatting.
Definition: xiescher.hxx:340
sal_uInt8 mnQuadrant
BIFF5 line formatting.
Definition: xiescher.hxx:341
A button control.
Definition: xiescher.hxx:536
virtual XclTbxEventType DoGetEventType() const override
Returns the type of the macro event to be created.
Definition: xiescher.cxx:2222
virtual void DoProcessControl(ScfPropertySet &rPropSet) const override
Sets additional properties for the current form control.
Definition: xiescher.cxx:2170
XclImpButtonObj(const XclImpRoot &rRoot)
Definition: xiescher.cxx:2165
virtual OUString DoGetServiceName() const override
Returns the service name of the control component to be created.
Definition: xiescher.cxx:2217
A chart object.
Definition: xiescher.hxx:405
XclImpChartRef mxChart
Definition: xiescher.hxx:436
XclImpChartObj(const XclImpRoot &rRoot, bool bOwnTab=false)
Definition: xiescher.cxx:1661
void FinalizeTabChart()
Calculates the object anchor of a sheet chart (chart fills one page).
Definition: xiescher.cxx:1818
void ReadChartSubStream(XclImpStream &rStrm)
Reads the complete chart substream (BOF/EOF block).
Definition: xiescher.cxx:1669
virtual std::size_t DoGetProgressSize() const override
Returns the needed size on the progress bar.
Definition: xiescher.cxx:1755
virtual void DoPostProcessSdrObj(XclImpDffConverter &rDffConv, SdrObject &rSdrObj) const override
Converts the chart document.
Definition: xiescher.cxx:1800
std::shared_ptr< XclImpChart > XclImpChartRef
Definition: xiescher.hxx:434
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:1760
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:1728
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:1717
bool mbOwnTab
The chart itself (BOF/EOF substream data).
Definition: xiescher.hxx:437
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:1741
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:1706
Represents the entire chart substream (all records in BOF/EOF block).
Definition: xichart.hxx:1394
A checkbox control.
Definition: xiescher.hxx:551
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:2234
virtual OUString DoGetServiceName() const override
Returns the service name of the control component to be created.
Definition: xiescher.cxx:2309
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:2251
virtual void DoProcessControl(ScfPropertySet &rPropSet) const override
Sets additional properties for the current form control.
Definition: xiescher.cxx:2271
sal_uInt16 mnState
Definition: xiescher.hxx:568
sal_uInt16 mnCheckBoxFlags
Definition: xiescher.hxx:569
XclImpCheckBoxObj(const XclImpRoot &rRoot)
Definition: xiescher.cxx:2227
virtual XclTbxEventType DoGetEventType() const override
Returns the type of the macro event to be created.
Definition: xiescher.cxx:2314
Helper base class for TBX and OCX form controls to manage spreadsheet links.
Definition: xiescher.hxx:460
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:1895
virtual ~XclImpControlHelper()
Definition: xiescher.cxx:1891
void ReadRangeList(ScRangeList &rScRanges, XclImpStream &rStrm)
Linked cell in the Calc document.
Definition: xiescher.cxx:2032
XclImpControlHelper(const XclImpRoot &rRoot, XclCtrlBindMode eBindMode)
Definition: xiescher.cxx:1885
css::uno::Reference< css::drawing::XShape > mxShape
Definition: xiescher.hxx:488
std::shared_ptr< ScAddress > mxCellLink
The UNO wrapper of the control shape.
Definition: xiescher.hxx:489
const XclImpRoot & mrRoot
Definition: xiescher.hxx:497
void ReadSourceRangeFormula(XclImpStream &rStrm, bool bWithBoundSize)
Reads the formula for the source range from the current position of the stream.
Definition: xiescher.cxx:2016
void ReadCellLinkFormula(XclImpStream &rStrm, bool bWithBoundSize)
Reads the formula for the linked cell from the current position of the stream.
Definition: xiescher.cxx:2004
virtual void DoProcessControl(ScfPropertySet &rPropSet) const
Derived classes will set additional properties for the current form control.
Definition: xiescher.cxx:2028
bool HasCellLink() const
Returns true, if a linked cell address is present.
Definition: xiescher.hxx:466
std::shared_ptr< ScRange > mxSrcRange
Not derived from XclImpRoot to allow multiple inheritance.
Definition: xiescher.hxx:498
void ApplySheetLinkProps() const
Definition: xiescher.cxx:1909
void SetStringProperty(const OUString &sName, const OUString &sVal)
Definition: xiescher.cxx:2095
XclCtrlBindMode meBindMode
Source data range in the Calc document.
Definition: xiescher.hxx:499
void ProcessControl(const XclImpDrawObjBase &rDrawObj) const
Sets additional properties to the form control model, calls virtual DoProcessControl().
Definition: xiescher.cxx:1983
This is the central instance for converting binary DFF data into shape objects.
Definition: xiescher.hxx:925
sal_Int32 GetDefaultTextMargin() const
Returns the default text margin in drawing layer units.
Definition: xiescher.hxx:954
ScfProgressBarRef mxProgress
The 'Ctls' stream for OCX form controls.
Definition: xiescher.hxx:1034
virtual ~XclImpDffConverter() override
Definition: xiescher.cxx:3367
void Progress(std::size_t nDelta=1)
Increase the progress bar by the passed value.
Definition: xiescher.cxx:3393
bool mbNotifyMacroEventRead
Default margin in text boxes.
Definition: xiescher.hxx:1039
virtual SdrObject * FinalizeObj(DffObjData &rDffObjData, SdrObject *pOldSdrObj) override
Finalize a DFF object, sets anchor after nested objs have been loaded.
Definition: xiescher.cxx:3729
void StartProgressBar(std::size_t nProgressSize)
Initializes the internal progress bar with the passed size and starts it.
Definition: xiescher.cxx:3386
OUString ReadHlinkProperty(SvStream &rDffStrm) const
Reads contents of a hyperlink property and returns the extracted URL.
Definition: xiescher.cxx:3798
sal_Int32 mnDefTextMargin
Application OLE import settings.
Definition: xiescher.hxx:1038
std::shared_ptr< XclImpDffConvData > XclImpDffConvDataRef
Definition: xiescher.hxx:1031
XclImpDffConvData & GetConvData()
Returns the current drawing manager data struct from top of the stack.
Definition: xiescher.cxx:3786
void NotifyMacroEventRead()
Notify that this document contains a macro event handler.
Definition: xiescher.cxx:3456
std::shared_ptr< ScfProgressBar > ScfProgressBarRef
Definition: xiescher.hxx:1030
void FinalizeDrawing()
Finally called after the objects of the passed drawing manager have been converted.
Definition: xiescher.cxx:3447
XclImpDffConverter(const XclImpRoot &rRoot, SvStream &rDffStrm)
Standard name of control forms.
Definition: xiescher.cxx:3345
void ProcessObject(SdrObjList &rObjList, XclImpDrawObjBase &rDrawObj)
Processes BIFF5 drawing objects without DFF data, inserts into the passed object list.
Definition: xiescher.cxx:3406
void InitControlForm()
Initializes the mxCtrlForm referring to the standard controls form.
Definition: xiescher.cxx:3929
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:3629
tools::SvRef< SotStorageStream > mxCtlsStrm
Definition: xiescher.hxx:1033
bool ProcessSolverContainer(SvStream &rDffStrm, const DffRecordHeader &rSolverHeader)
Processes the solver container (connectors of a sheet).
Definition: xiescher.cxx:3882
bool ProcessShContainer(SvStream &rDffStrm, const DffRecordHeader &rShHeader)
Processes a shape or shape group container (one top-level shape).
Definition: xiescher.cxx:3892
void InsertSdrObject(SdrObjList &rObjList, const XclImpDrawObjBase &rDrawObj, SdrObject *pSdrObj)
Inserts the passed SdrObject into the document.
Definition: xiescher.cxx:3909
void ProcessDrawing(const XclImpDrawObjVector &rDrawObjs)
Processes all objects in the passed list.
Definition: xiescher.cxx:3427
bool ProcessDgContainer(SvStream &rDffStrm, const DffRecordHeader &rDgHeader)
Processes a drawing container (all drawing data of a sheet).
Definition: xiescher.cxx:3829
void InitializeDrawing(XclImpDrawing &rDrawing, SdrModel &rSdrModel, SdrPage &rSdrPage)
Initially called before the objects of the passed drawing manager are converted.
Definition: xiescher.cxx:3399
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:3751
std::vector< XclImpDffConvDataRef > maDataStack
The progress bar used in ProcessObj().
Definition: xiescher.hxx:1036
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:3583
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:3464
sal_uInt32 mnOleImpFlags
Stack for registered drawing managers.
Definition: xiescher.hxx:1037
bool ProcessShGrContainer(SvStream &rDffStrm, const DffRecordHeader &rShGrHeader)
Processes the global shape group container (all shapes of a sheet).
Definition: xiescher.cxx:3860
bool SupportsOleObjects() const
Returns true, if the conversion of OLE objects is supported.
Definition: xiescher.cxx:3576
This class reads a DFF property set (msofbtOPT record).
Definition: xiescher.hxx:1194
sal_uInt32 GetPropertyValue(sal_uInt16 nPropId) const
Returns the specified property or zero, if not extant.
Definition: xiescher.cxx:4496
SvMemoryStream maDummyStrm
Definition: xiescher.hxx:1211
void Read(XclImpStream &rStrm)
Reads a DFF property set from the stream.
Definition: xiescher.cxx:4481
void FillToItemSet(SfxItemSet &rItemSet) const
Translates the properties and fills the item set.
Definition: xiescher.cxx:4501
std::unique_ptr< SvMemoryStream > SvMemoryStreamPtr
Definition: xiescher.hxx:1209
XclImpSimpleDffConverter maDffConv
Dummy DGG stream for DFF manager.
Definition: xiescher.hxx:1212
SvMemoryStreamPtr mxMemStrm
DFF converter used to resolve palette colors.
Definition: xiescher.hxx:1213
XclImpDffPropSet(const XclImpRoot &rRoot)
Definition: xiescher.cxx:4475
A dialog control.
Definition: xiescher.hxx:633
virtual OUString DoGetServiceName() const override
Returns the service name of the control component to be created.
Definition: xiescher.cxx:2508
XclImpDialogObj(const XclImpRoot &rRoot)
Definition: xiescher.cxx:2497
virtual XclTbxEventType DoGetEventType() const override
Returns the type of the macro event to be created.
Definition: xiescher.cxx:2514
virtual void DoProcessControl(ScfPropertySet &rPropSet) const override
Sets additional properties for the current form control.
Definition: xiescher.cxx:2502
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:206
const XclObjAnchor * GetAnchor() const
Returns the object anchor if existing, null otherwise.
Definition: xiescher.cxx:408
sal_uInt32 mnDffShapeId
The Excel object type from OBJ record.
Definition: xiescher.hxx:193
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:825
bool mbAreaObj
true = Object is printable.
Definition: xiescher.hxx:203
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:201
void PreProcessSdrObject(XclImpDffConverter &rDffConv, SdrObject &rSdrObj)
Additional processing for the passed SdrObject before insertion into the drawing page (calls virtual ...
Definition: xiescher.cxx:533
std::size_t GetProgressSize() const
Returns the needed size on the progress bar (calls virtual DoGetProgressSize() function).
Definition: xiescher.cxx:436
bool IsVisible() const
Returns true, if the object is visible.
Definition: xiescher.hxx:106
bool IsValidSize(const tools::Rectangle &rAnchorRect) const
Returns true, if the passed size is valid for this object.
Definition: xiescher.cxx:413
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:573
ShapeFlag mnDffFlags
Shape ID from DFF stream.
Definition: xiescher.hxx:194
bool IsHidden() const
Returns true, if the object is hidden.
Definition: xiescher.hxx:104
sal_uInt16 mnObjId
The position of the object in its parent.
Definition: xiescher.hxx:190
bool mbSimpleMacro
true = Set automatic text margin.
Definition: xiescher.hxx:205
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:813
XclObjAnchor maAnchor
Definition: xiescher.hxx:189
bool mbHidden
true = maAnchor is initialized.
Definition: xiescher.hxx:200
virtual OUString GetObjName() const
Returns the name of this object, may generate a default name.
Definition: xiescher.cxx:399
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:607
OUString maObjName
Definition: xiescher.hxx:196
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:132
bool IsPrintable() const
Returns true, if the object is printable.
Definition: xiescher.hxx:108
bool mbAutoMargin
true = Width and height must be greater than 0.
Definition: xiescher.hxx:204
bool IsProcessSdrObj() const
Returns true, if the object is valid and will be processed.
Definition: xiescher.hxx:118
SCTAB mnTab
The object identifier (unique per drawing).
Definition: xiescher.hxx:191
void ImplReadObj5(XclImpStream &rStrm)
Reads the contents of a BIFF5 OBJ record.
Definition: xiescher.cxx:890
void ReadMacro3(XclImpStream &rStrm, sal_uInt16 nMacroSize)
Reads the macro link in a BIFF3 OBJ record.
Definition: xiescher.cxx:593
void ReadMacro4(XclImpStream &rStrm, sal_uInt16 nMacroSize)
Reads the macro link in a BIFF4 OBJ record.
Definition: xiescher.cxx:601
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:441
bool IsInsertSdrObj() const
Returns true, if the SdrObject will be created or processed, but not be inserted into the draw page.
Definition: xiescher.hxx:120
sal_uInt16 mnObjType
Location of object.
Definition: xiescher.hxx:192
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:834
void SetDffData(const DffObjData &rDffObjData, const OUString &rObjName, const OUString &rHyperlink, bool bVisible, bool bAutoMargin)
Sets shape data from DFF stream.
Definition: xiescher.cxx:386
void ReadMacro8(XclImpStream &rStrm)
Reads the contents of the ftMacro sub structure in an OBJ record.
Definition: xiescher.cxx:613
OUString maHyperlink
Name of an attached macro.
Definition: xiescher.hxx:198
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:817
bool mbInsertSdr
true = Object is valid, do processing and insertion.
Definition: xiescher.hxx:207
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:870
Color GetSolidFillColor(const XclObjFillData &rFillData) const
Returns a solid fill color from the passed fill data struct.
Definition: xiescher.cxx:795
void ConvertFrameStyle(SdrObject &rSdrObj, sal_uInt16 nFrameFlags) const
Converts the passed frame flags to the passed SdrObject.
Definition: xiescher.cxx:768
ScRange GetUsedArea(SCTAB nScTab) const
Returns the range in the sheet covered by this object.
Definition: xiescher.cxx:421
void ConvertFillStyle(SdrObject &rSdrObj, const XclObjFillData &rFillData) const
Converts the passed fill formatting to the passed SdrObject.
Definition: xiescher.cxx:698
void NotifyMacroEventRead()
Notify that the document contains a macro event handler.
Definition: xiescher.cxx:522
void ImplReadObj8(XclImpStream &rStrm)
Reads the contents of a BIFF8 OBJ record.
Definition: xiescher.cxx:912
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:821
virtual void DoPreProcessSdrObj(XclImpDffConverter &rDffConv, SdrObject &rSdrObj) const
Derived classes may perform additional processing for the passed SdrObject before insertion.
Definition: xiescher.cxx:840
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:779
bool mbHasAnchor
On-click hyperlink URL.
Definition: xiescher.hxx:199
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:638
OUString maMacroName
Name of the object.
Definition: xiescher.hxx:197
tools::Rectangle maDffRect
Shape flags from DFF stream.
Definition: xiescher.hxx:195
virtual std::size_t DoGetProgressSize() const
Derived classes may return a progress bar size different from 1.
Definition: xiescher.cxx:829
virtual void DoPostProcessSdrObj(XclImpDffConverter &rDffConv, SdrObject &rSdrObj) const
Derived classes may perform additional processing for the passed SdrObject after insertion.
Definition: xiescher.cxx:847
bool mbNotifyMacroEventRead
true = Recreate SdrObject in DFF import.
Definition: xiescher.hxx:209
const tools::Rectangle & GetDffRect() const
Definition: xiescher.cxx:381
bool mbCustomDff
true = Insert the SdrObject into draw page.
Definition: xiescher.hxx:208
void ReadName5(XclImpStream &rStrm, sal_uInt16 nNameLen)
Reads the object name in a BIFF5 OBJ record.
Definition: xiescher.cxx:581
bool mbPrintable
true = Object is visible.
Definition: xiescher.hxx:202
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:851
void push_back(const XclImpDrawObjRef &rObj)
Definition: xiescher.hxx:222
std::vector< XclImpDrawObjRef >::const_iterator begin() const
Definition: xiescher.hxx:220
std::vector< XclImpDrawObjRef > mObjs
Definition: xiescher.hxx:215
void InsertGrouped(XclImpDrawObjRef const &xDrawObj)
Tries to insert the passed object into the last group or appends it.
Definition: xiescher.cxx:989
std::size_t GetProgressSize() const
Returns the needed size on the progress bar for all contained objects.
Definition: xiescher.cxx:998
std::vector< XclImpDrawObjRef >::const_iterator end() const
Definition: xiescher.hxx:221
Base class for a container for all objects on a drawing (spreadsheet or embedded chart object).
Definition: xiescher.hxx:1047
void ReadDffRecord(XclImpStream &rStrm)
Reads contents of a DFF record and append data to internal DFF stream.
Definition: xiescher.cxx:4229
void SetSkipObj(sal_uInt16 nObjId)
Sets the object with the passed identification to be skipped on import.
Definition: xiescher.cxx:4131
std::size_t GetProgressSize() const
Returns the size of the progress bar shown while processing all objects.
Definition: xiescher.cxx:4136
std::shared_ptr< XclImpObjTextData > XclImpObjTextRef
Definition: xiescher.hxx:1103
bool mbOleObjs
IDs of all objects to be skipped.
Definition: xiescher.hxx:1112
XclImpDrawing(const XclImpRoot &rRoot, bool bOleObjects)
Definition: xiescher.cxx:3961
void ReadObj8(XclImpStream &rStrm)
Reads a BIFF8 OBJ record following an MSODRAWING record.
Definition: xiescher.cxx:4235
static void ReadBmp(Graphic &rGraphic, const XclImpRoot &rRoot, XclImpStream &rStrm)
Reads and returns a bitmap from BMP format.
Definition: xiescher.cxx:4188
XclImpDrawObjRef FindDrawObj(const DffRecordHeader &rHeader) const
Finds the OBJ record data related to the DFF shape at the passed position.
Definition: xiescher.cxx:4056
bool SupportsOleObjects() const
Returns true, if the conversion of OLE objects is supported.
Definition: xiescher.hxx:1061
XclImpObjMap maObjMap
Copy of the DFF page stream in memory.
Definition: xiescher.hxx:1108
void AppendRawObject(const XclImpDrawObjRef &rxDrawObj)
Appends a new drawing object to the list of raw objects (without DFF data).
Definition: xiescher.cxx:4167
void ReadTxo(XclImpStream &rStrm)
Reads the TXO record and following CONTINUE records containing string and formatting.
Definition: xiescher.cxx:4243
XclImpObjMapById maObjMapId
Maps BIFF8 drawing objects to DFF stream position.
Definition: xiescher.hxx:1109
ScfUInt16Vec maSkipObjs
Maps BIFF8 TXO textbox data to DFF stream position.
Definition: xiescher.hxx:1111
XclImpDrawObjVector maRawObjs
Definition: xiescher.hxx:1106
XclImpObjTextMap maTextMap
Maps BIFF8 drawing objects to object ID.
Definition: xiescher.hxx:1110
void ApplyGroupBoxes()
Definition: xiescher.cxx:4094
void ReadObj(XclImpStream &rStrm)
Reads a plain OBJ record (without leading DFF data).
Definition: xiescher.cxx:3989
std::map< sal_uInt16, XclImpDrawObjRef > XclImpObjMapById
Definition: xiescher.hxx:1102
SvMemoryStream maDffStrm
BIFF5 objects without DFF data.
Definition: xiescher.hxx:1107
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:4142
static void ReadWmf(Graphic &rGraphic, XclImpStream &rStrm)
Reads and returns a bitmap from WMF/PICT format.
Definition: xiescher.cxx:4175
std::map< std::size_t, XclImpDrawObjRef > XclImpObjMap
Definition: xiescher.hxx:1101
virtual ~XclImpDrawing() override
Definition: xiescher.cxx:3967
const XclImpObjTextData * FindTextData(const DffRecordHeader &rHeader) const
Finds the textbox data related to the DFF shape at the passed position.
Definition: xiescher.cxx:4080
void ReadMsoDrawing(XclImpStream &rStrm)
Reads the MSODRAWING or MSODRAWINGSELECTION record.
Definition: xiescher.cxx:4022
std::map< std::size_t, XclImpObjTextRef > XclImpObjTextMap
Definition: xiescher.hxx:1104
static Graphic ReadImgData(const XclImpRoot &rRoot, XclImpStream &rStrm)
Reads and returns a bitmap from the IMGDATA record.
Definition: xiescher.cxx:3971
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:777
XclImpDropDownObj(const XclImpRoot &rRoot)
Definition: xiescher.cxx:2841
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:2890
sal_uInt16 mnMinWidth
Definition: xiescher.hxx:805
sal_uInt16 mnTop
Definition: xiescher.hxx:800
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:2871
sal_uInt16 mnLeft
Definition: xiescher.hxx:799
virtual void DoProcessControl(ScfPropertySet &rPropSet) const override
Sets additional properties for the current form control.
Definition: xiescher.cxx:2902
sal_uInt16 GetDropDownType() const
Returns the type of the dropdown control.
Definition: xiescher.cxx:2853
virtual XclTbxEventType DoGetEventType() const override
Returns the type of the macro event to be created.
Definition: xiescher.cxx:2935
sal_uInt16 mnBottom
Definition: xiescher.hxx:802
void ReadFullLbsData(XclImpStream &rStrm)
Reads dropdown box settings.
Definition: xiescher.cxx:2858
virtual OUString DoGetServiceName() const override
Returns the service name of the control component to be created.
Definition: xiescher.cxx:2928
sal_uInt16 mnLineCount
Definition: xiescher.hxx:804
sal_uInt16 mnRight
Definition: xiescher.hxx:801
sal_uInt16 mnDropDownFlags
Definition: xiescher.hxx:803
An edit control.
Definition: xiescher.hxx:648
sal_uInt16 mnMultiLine
Definition: xiescher.hxx:668
virtual OUString DoGetServiceName() const override
Returns the service name of the control component to be created.
Definition: xiescher.cxx:2585
sal_uInt16 mnContentType
Definition: xiescher.hxx:667
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:2533
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:2549
virtual void DoProcessControl(ScfPropertySet &rPropSet) const override
Sets additional properties for the current form control.
Definition: xiescher.cxx:2564
sal_uInt16 mnListBoxObjId
Definition: xiescher.hxx:670
bool IsNumeric() const
REturns true, if the field type is numeric.
Definition: xiescher.cxx:2528
virtual XclTbxEventType DoGetEventType() const override
Returns the type of the macro event to be created.
Definition: xiescher.cxx:2592
XclImpEditObj(const XclImpRoot &rRoot)
Definition: xiescher.cxx:2519
sal_uInt16 mnScrollBar
Definition: xiescher.hxx:669
A groupbox control.
Definition: xiescher.hxx:612
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:2467
virtual XclTbxEventType DoGetEventType() const override
Returns the type of the macro event to be created.
Definition: xiescher.cxx:2492
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:2452
sal_uInt16 mnGroupBoxFlags
Definition: xiescher.hxx:628
virtual void DoProcessControl(ScfPropertySet &rPropSet) const override
Sets additional properties for the current form control.
Definition: xiescher.cxx:2481
XclImpGroupBoxObj(const XclImpRoot &rRoot)
Definition: xiescher.cxx:2446
virtual OUString DoGetServiceName() const override
Returns the service name of the control component to be created.
Definition: xiescher.cxx:2487
A group object.
Definition: xiescher.hxx:240
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:1041
bool TryInsert(XclImpDrawObjRef const &xDrawObj)
Tries to insert the drawing object into this or a nested group.
Definition: xiescher.cxx:1016
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:1033
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:1055
sal_uInt16 mnFirstUngrouped
Grouped objects.
Definition: xiescher.hxx:260
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:1025
virtual std::size_t DoGetProgressSize() const override
Returns a progress bar size that takes all group children into account.
Definition: xiescher.cxx:1050
XclImpGroupObj(const XclImpRoot &rRoot)
Definition: xiescher.cxx:1010
XclImpDrawObjVector maChildren
Definition: xiescher.hxx:259
A label control.
Definition: xiescher.hxx:597
virtual void DoProcessControl(ScfPropertySet &rPropSet) const override
Sets additional properties for the current form control.
Definition: xiescher.cxx:2422
virtual XclTbxEventType DoGetEventType() const override
Returns the type of the macro event to be created.
Definition: xiescher.cxx:2441
virtual OUString DoGetServiceName() const override
Returns the service name of the control component to be created.
Definition: xiescher.cxx:2436
XclImpLabelObj(const XclImpRoot &rRoot)
Definition: xiescher.cxx:2417
A line object.
Definition: xiescher.hxx:265
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:1104
XclImpLineObj(const XclImpRoot &rRoot)
Definition: xiescher.cxx:1068
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:1085
XclObjLineData maLineData
Definition: xiescher.hxx:279
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:1076
sal_uInt8 mnStartPoint
Line arrows.
Definition: xiescher.hxx:281
sal_uInt16 mnArrows
BIFF5 line formatting.
Definition: xiescher.hxx:280
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:1094
A listbox control.
Definition: xiescher.hxx:753
virtual XclTbxEventType DoGetEventType() const override
Returns the type of the macro event to be created.
Definition: xiescher.cxx:2836
ScfUInt8Vec maSelection
Definition: xiescher.hxx:772
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:2767
virtual OUString DoGetServiceName() const override
Returns the service name of the control component to be created.
Definition: xiescher.cxx:2831
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:2781
XclImpListBoxObj(const XclImpRoot &rRoot)
Definition: xiescher.cxx:2748
virtual void DoProcessControl(ScfPropertySet &rPropSet) const override
Sets additional properties for the current form control.
Definition: xiescher.cxx:2793
void ReadFullLbsData(XclImpStream &rStrm, std::size_t nRecLeft)
Reads listbox settings and selection.
Definition: xiescher.cxx:2753
A note object, which is a specialized text box object.
Definition: xiescher.hxx:442
sal_uInt16 mnNoteFlags
Cell position of the note object.
Definition: xiescher.hxx:455
void SetNoteData(const ScAddress &rScPos, sal_uInt16 nNoteFlags)
Sets note flags and the note position in the Calc sheet.
Definition: xiescher.cxx:1862
XclImpNoteObj(const XclImpRoot &rRoot)
Definition: xiescher.cxx:1852
virtual void DoPreProcessSdrObj(XclImpDffConverter &rDffConv, SdrObject &rSdrObj) const override
Inserts the note into the document, sets visibility.
Definition: xiescher.cxx:1868
ScAddress maScPos
Definition: xiescher.hxx:454
Stores all drawing and OLE objects and additional data related to these objects.
Definition: xiescher.hxx:1151
css::uno::Reference< css::container::XNameContainer > mxOleCtrlNameOverride
Definition: xiescher.hxx:1180
OUString GetDefaultObjName(const XclImpDrawObjBase &rDrawObj) const
Returns the default name for the passed object.
Definition: xiescher.cxx:4456
std::map< sal_uInt16, OUString > DefObjNameMap
Definition: xiescher.hxx:1176
OUString GetOleNameOverride(SCTAB nTab, sal_uInt16 nObjId)
Returns the name of overridden name ( or zero length string ) for associated object id.
Definition: xiescher.cxx:3371
XclImpObjectManager(const XclImpRoot &rRoot)
Definition: xiescher.cxx:4386
XclImpSheetDrawing & GetSheetDrawing(SCTAB nScTab)
Returns (initially creates) the drawing manager of the specified sheet.
Definition: xiescher.cxx:4426
void ReadMsoDrawingGroup(XclImpStream &rStrm)
Reads the MSODRAWINGGROUP record.
Definition: xiescher.cxx:4417
std::map< SCTAB, XclImpSheetDrawingRef > XclImpSheetDrawingMap
Definition: xiescher.hxx:1178
virtual ~XclImpObjectManager() override
Definition: xiescher.cxx:4413
ScRange GetUsedArea(SCTAB nScTab) const
Returns the used area in the sheet with the passed index.
Definition: xiescher.cxx:4465
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:1170
std::shared_ptr< XclImpSheetDrawing > XclImpSheetDrawingRef
Definition: xiescher.hxx:1177
DefObjNameMap maDefObjNames
Definition: xiescher.hxx:1181
XclImpSheetDrawingMap maSheetDrawings
Copy of global DFF data (DGG container) in memory.
Definition: xiescher.hxx:1183
SvMemoryStream maDggStrm
Default base names for all object types.
Definition: xiescher.hxx:1182
void ConvertObjects()
Inserts all objects into the Calc document.
Definition: xiescher.cxx:4434
An option button control.
Definition: xiescher.hxx:574
sal_uInt16 mnNextInGroup
Definition: xiescher.hxx:591
virtual void DoProcessControl(ScfPropertySet &rPropSet) const override
Sets additional properties for the current form control.
Definition: xiescher.cxx:2358
XclImpOptionButtonObj(const XclImpRoot &rRoot)
Definition: xiescher.cxx:2319
virtual OUString DoGetServiceName() const override
Returns the service name of the control component to be created.
Definition: xiescher.cxx:2402
sal_uInt16 mnFirstInGroup
Next option button in a group.
Definition: xiescher.hxx:592
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:2345
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:2326
bool IsInGroup() const
Definition: xiescher.cxx:2412
virtual XclTbxEventType DoGetEventType() const override
Returns the type of the macro event to be created.
Definition: xiescher.cxx:2407
An oval object.
Definition: xiescher.hxx:314
XclImpOvalObj(const XclImpRoot &rRoot)
Definition: xiescher.cxx:1255
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:1260
A placeholder object for unknown object types.
Definition: xiescher.hxx:233
XclImpPhObj(const XclImpRoot &rRoot)
Definition: xiescher.cxx:1004
A picture, an embedded or linked OLE object, or an OCX form control.
Definition: xiescher.hxx:810
std::size_t mnCtlsStrmSize
Position in 'Ctls' stream for this control.
Definition: xiescher.hxx:857
OUString GetOleStorageName() const
Returns the storage name for the OLE object.
Definition: xiescher.cxx:2957
std::size_t GetCtlsStreamSize() const
Returns the size in the 'Ctls' stream for additional form control data.
Definition: xiescher.hxx:828
Graphic maGraphic
Definition: xiescher.hxx:853
std::size_t mnCtlsStrmPos
Identifier of the storage for this object.
Definition: xiescher.hxx:856
bool mbControl
true = Show as symbol.
Definition: xiescher.hxx:861
std::size_t GetCtlsStreamPos() const
Returns the position in the 'Ctls' stream for additional form control data.
Definition: xiescher.hxx:826
bool mbEmbedded
Size in 'Ctls' stream for this control.
Definition: xiescher.hxx:858
OUString maClassName
Picture or OLE placeholder graphic.
Definition: xiescher.hxx:854
bool mbLinked
true = Embedded OLE object.
Definition: xiescher.hxx:859
bool mbSymbol
true = Linked OLE object.
Definition: xiescher.hxx:860
sal_uInt32 mnStorageId
Class name of embedded OLE object.
Definition: xiescher.hxx:855
virtual OUString GetObjName() const override
Returns the ObjectName - can use non-obvious lookup for override in the associated vba document modul...
Definition: xiescher.cxx:3071
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:2970
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:3000
bool IsOcxControl() const
Returns true, if this object is an OCX form control.
Definition: xiescher.hxx:824
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:2985
void ReadFlags3(XclImpStream &rStrm)
Reads and sets the picture flags from a BIFF3-BIFF5 OBJ picture record.
Definition: xiescher.cxx:3124
void ReadFlags8(XclImpStream &rStrm)
Reads the contents of the OBJFLAGS subrecord.
Definition: xiescher.cxx:3131
bool IsSymbol() const
Returns true, if the OLE object will be shown as symbol.
Definition: xiescher.hxx:819
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:3023
const Graphic & GetGraphic() const
Returns the graphic imported from the IMGDATA record.
Definition: xiescher.hxx:816
bool mbUseCtlsStrm
true = Form control, false = OLE object.
Definition: xiescher.hxx:862
void ReadPictFmla(XclImpStream &rStrm, sal_uInt16 nLinkSize)
Reads the contents of the OBJPICTFMLA subrecord.
Definition: xiescher.cxx:3142
XclImpPictureObj(const XclImpRoot &rRoot)
Definition: xiescher.cxx:2940
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:3038
virtual void DoPreProcessSdrObj(XclImpDffConverter &rDffConv, SdrObject &rSdrObj) const override
Override to do additional processing on the SdrObject.
Definition: xiescher.cxx:3082
A polygon object.
Definition: xiescher.hxx:346
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:1386
sal_uInt16 mnPolyFlags
Coordinates relative to bounding rectangle.
Definition: xiescher.hxx:363
std::vector< Point > PointVector
Definition: xiescher.hxx:361
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:1409
XclImpPolygonObj(const XclImpRoot &rRoot)
Definition: xiescher.cxx:1351
void ReadCoordList(XclImpStream &rStrm)
Reads the COORDLIST record following the OBJ record.
Definition: xiescher.cxx:1359
PointVector maCoords
Definition: xiescher.hxx:362
sal_uInt16 mnPointCount
Additional flags.
Definition: xiescher.hxx:364
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:1375
A rectangle or oval object.
Definition: xiescher.hxx:286
XclImpRectObj(const XclImpRoot &rRoot)
Definition: xiescher.cxx:1205
XclObjLineData maLineData
BIFF5 fill formatting.
Definition: xiescher.hxx:308
sal_uInt16 mnFrameFlags
BIFF5 line formatting.
Definition: xiescher.hxx:309
void ReadFrameData(XclImpStream &rStrm)
Reads fil data, line data, and frame flags.
Definition: xiescher.cxx:1212
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:1225
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:1237
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:1244
void ConvertRectStyle(SdrObject &rSdrObj) const
Converts fill formatting, line formatting, and frame style.
Definition: xiescher.cxx:1218
XclObjFillData maFillData
Definition: xiescher.hxx:307
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:1231
Access to global data from other classes.
Definition: xiroot.hxx:129
A scrollbar control.
Definition: xiescher.hxx:716
virtual XclTbxEventType DoGetEventType() const override
Returns the type of the macro event to be created.
Definition: xiescher.cxx:2710
XclImpScrollBarObj(const XclImpRoot &rRoot)
Definition: xiescher.cxx:2675
virtual OUString DoGetServiceName() const override
Returns the service name of the control component to be created.
Definition: xiescher.cxx:2705
virtual void DoProcessControl(ScfPropertySet &rPropSet) const override
Sets additional properties for the current form control.
Definition: xiescher.cxx:2689
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:2680
Drawing manager of a single sheet.
Definition: xiescher.hxx:1117
void ConvertObjects(XclImpDffConverter &rDffConv)
Converts all objects and inserts them into the sheet drawing page.
Definition: xiescher.cxx:4307
virtual tools::Rectangle CalcAnchorRect(const XclObjAnchor &rAnchor, bool bDffAnchor) const override
Calculate the resulting rectangle of the passed anchor.
Definition: xiescher.cxx:4314
virtual void OnObjectInserted(const XclImpDrawObjBase &rDrawObj) override
On call, updates the used area of the sheet.
Definition: xiescher.cxx:4319
const ScRange & GetUsedArea() const
Returns the total cell range covered by any shapes in the sheet.
Definition: xiescher.hxx:1128
void ReadNote(XclImpStream &rStrm)
Reads the NOTE record.
Definition: xiescher.cxx:4280
void ReadNote3(XclImpStream &rStrm)
Reads a BIFF3-BIFF5 NOTE record.
Definition: xiescher.cxx:4328
void ReadNote8(XclImpStream &rStrm)
Reads a BIFF8 NOTE record.
Definition: xiescher.cxx:4369
XclImpSheetDrawing(const XclImpRoot &rRoot, SCTAB nScTab)
Definition: xiescher.cxx:4272
void ReadTabChart(XclImpStream &rStrm)
Inserts a new chart object and reads the chart substream (BOF/EOF block).
Definition: xiescher.cxx:4298
Simple implementation of the SVX DFF manager.
Definition: xiescher.hxx:907
XclImpSimpleDffConverter(const XclImpRoot &rRoot, SvStream &rDffStrm)
Definition: xiescher.cxx:3311
virtual ~XclImpSimpleDffConverter() override
Definition: xiescher.cxx:3318
virtual bool GetColorFromPalette(sal_uInt16 nIndex, Color &rColor) const override
Returns a color from the Excel color palette.
Definition: xiescher.cxx:3322
The solver container collects all connector rules for connected objects.
Definition: xiescher.hxx:869
std::map< sal_uInt32, XclImpSdrInfo > XclImpSdrInfoMap
Definition: xiescher.hxx:896
XclImpSdrObjMap maSdrObjMap
Maps shape IDs to SdrObjects and flags.
Definition: xiescher.hxx:900
void RemoveSdrObjectInfo(SdrObject &rSdrObj)
Removes information of an SdrObject (and all child objects if it is a group).
Definition: xiescher.cxx:3260
std::map< SdrObject *, sal_uInt32 > XclImpSdrObjMap
Definition: xiescher.hxx:897
void RemoveConnectorRules()
Removes all contained connector rules.
Definition: xiescher.cxx:3293
XclImpSdrInfoMap maSdrInfoMap
Definition: xiescher.hxx:899
void UpdateConnectorRules()
Inserts the SdrObject pointers into all connector rules.
Definition: xiescher.cxx:3283
void UpdateConnection(sal_uInt32 nDffShapeId, SdrObject *&rpSdrObj, ShapeFlag *pnDffFlags=nullptr)
Updates the data of a connected shape in a connector rule.
Definition: xiescher.cxx:3300
void InsertSdrObjectInfo(SdrObject &rSdrObj, sal_uInt32 nDffShapeId, ShapeFlag nDffFlags)
Inserts information about a new SdrObject.
Definition: xiescher.cxx:3251
A spinbutton control.
Definition: xiescher.hxx:699
virtual void DoProcessControl(ScfPropertySet &rPropSet) const override
Sets additional properties for the current form control.
Definition: xiescher.cxx:2652
XclImpSpinButtonObj(const XclImpRoot &rRoot)
Definition: xiescher.cxx:2638
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:2643
virtual XclTbxEventType DoGetEventType() const override
Returns the type of the macro event to be created.
Definition: xiescher.cxx:2670
virtual OUString DoGetServiceName() const override
Returns the service name of the control component to be created.
Definition: xiescher.cxx:2665
This class is used to import record oriented streams.
Definition: xistream.hxx:278
Base class for textbox based form controls.
Definition: xiescher.hxx:504
bool FillMacroDescriptor(css::script::ScriptEventDescriptor &rDescriptor) const
Fills the passed macro event descriptor.
Definition: xiescher.cxx:2105
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:2159
void ConvertLabel(ScfPropertySet &rPropSet) const
Sets control label and text formatting.
Definition: xiescher.cxx:2122
OUString GetServiceName() const
Returns the service name of the control component to be created.
Definition: xiescher.hxx:512
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:2152
void ConvertFont(ScfPropertySet &rPropSet) const
Sets control text formatting.
Definition: xiescher.cxx:2110
XclImpTbxObjBase(const XclImpRoot &rRoot)
Definition: xiescher.cxx:2061
void SetDffProperties(const DffPropSet &rDffPropSet)
Sets line and fill formatting from the passed DFF property set.
Definition: xiescher.cxx:2083
Base class for list controls (listbox, dropdown).
Definition: xiescher.hxx:733
sal_uInt16 mnEditObjId
Definition: xiescher.hxx:747
void ReadLbsData(XclImpStream &rStrm)
Reads common listbox settings.
Definition: xiescher.cxx:2725
sal_uInt16 mnEntryCount
Definition: xiescher.hxx:744
void SetBoxFormatting(ScfPropertySet &rPropSet) const
Sets common listbox/dropdown formatting attributes.
Definition: xiescher.cxx:2734
sal_uInt16 mnSelEntry
Definition: xiescher.hxx:745
XclImpTbxObjListBase(const XclImpRoot &rRoot)
Definition: xiescher.cxx:2715
sal_uInt16 mnListFlags
Definition: xiescher.hxx:746
Base class of scrollable form controls (spin button, scrollbar, listbox, dropdown).
Definition: xiescher.hxx:675
XclImpTbxObjScrollableBase(const XclImpRoot &rRoot)
Definition: xiescher.cxx:2597
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:2623
void ReadSbs(XclImpStream &rStrm)
Reads scrollbar data.
Definition: xiescher.cxx:2610
A drawing object supporting text contents.
Definition: xiescher.hxx:380
XclImpObjTextData maTextData
Definition: xiescher.hxx:400
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:1487
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:1476
XclImpTextObj(const XclImpRoot &rRoot)
Definition: xiescher.cxx:1453
void SetTextData(const XclImpObjTextData &rTextData)
Stores the passed textbox data.
Definition: xiescher.hxx:385
virtual void DoPreProcessSdrObj(XclImpDffConverter &rDffConv, SdrObject &rSdrObj) const override
Inserts the contained text data at the passed object.
Definition: xiescher.cxx:1504
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:1458
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:1467
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:991
XclImpDffConvData(XclImpDrawing &rDrawing, SdrModel &rSdrModel, SdrPage &rSdrPage)
True = mxCtrlForm is initialized (but maybe still null).
Definition: xiescher.cxx:3333
bool mbHasCtrlForm
Last insertion index of a form control (for macro events).
Definition: xiescher.hxx:999
SdrModel & mrSdrModel
Current drawing container with all drawing objects.
Definition: xiescher.hxx:993
XclImpSolverContainer maSolverCont
The SdrPage of the drawing manager.
Definition: xiescher.hxx:995
css::uno::Reference< css::form::XForm > mxCtrlForm
The solver container for connector rules.
Definition: xiescher.hxx:997
sal_Int32 mnLastCtrlIndex
Controls form of current drawing page.
Definition: xiescher.hxx:998
SdrPage & mrSdrPage
The SdrModel of the drawing manager.
Definition: xiescher.hxx:994
XclObjTextData maData
Definition: xiescher.hxx:369
void ReadByteString(XclImpStream &rStrm)
Plain or rich string.
Definition: xiescher.cxx:1434
void ReadFormats(XclImpStream &rStrm)
Reads text formatting from the passed stream.
Definition: xiescher.cxx:1445
XclImpStringRef mxString
BIFF5 text data.
Definition: xiescher.hxx:370
Stores data about an SdrObject processed during import.
Definition: xiescher.hxx:889
ShapeFlag mnDffFlags
Pointer to an SdrObject.
Definition: xiescher.hxx:891
XclImpSdrInfo()
Shape flags from DFF stream.
Definition: xiescher.hxx:892
void Set(SdrObject *pSdrObj, ShapeFlag nDffFlags)
Definition: xiescher.hxx:893
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:4507
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