27#include <rtl/ustring.hxx>
34 namespace drawing {
class XShape; }
35 namespace form {
class XForm; }
78 const DffObjData& rDffObjData,
const OUString& rObjName,
const OUString& rHyperlink,
79 bool bVisible,
bool bAutoMargin );
215 std::vector< XclImpDrawObjRef >
mObjs;
220 std::vector< XclImpDrawObjRef >::const_iterator
begin()
const {
return mObjs.begin(); }
221 std::vector< XclImpDrawObjRef >::const_iterator
end()
const {
return mObjs.end(); }
470 const css::uno::Reference< css::drawing::XShape >& rxShape,
487 mutable css::uno::Reference< css::drawing::XShape >
515 css::script::ScriptEventDescriptor& rDescriptor )
const;
933 void Progress( std::size_t nDelta = 1 );
981 const css::uno::Reference<
982 css::form::XFormComponent >& rxFormComp,
983 const css::awt::Size& rSize,
985 css::drawing::XShape >* pxShape,
986 bool bFloatingCtrl )
override;
996 css::uno::Reference< css::form::XForm >
1035 std::vector< XclImpDffConvDataRef >
Progress bar for complex progress representation.
A wrapper for a UNO property set.
XclObjFillData maFillData
virtual void DoReadObj3(XclImpStream &rStrm, sal_uInt16 nMacroSize) override
Reads the contents of the a BIFF3 OBJ record from the passed stream.
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.
virtual rtl::Reference< SdrObject > DoCreateSdrObj(XclImpDffConverter &rDffConv, const tools::Rectangle &rAnchorRect) const override
Creates and returns a new SdrObject from the contained data.
XclImpArcObj(const XclImpRoot &rRoot)
virtual void DoReadObj4(XclImpStream &rStrm, sal_uInt16 nMacroSize) override
Reads the contents of the a BIFF4 OBJ record from the passed stream.
XclObjLineData maLineData
BIFF5 fill formatting.
sal_uInt8 mnQuadrant
BIFF5 line formatting.
XclImpChartObj(const XclImpRoot &rRoot, bool bOwnTab=false)
void FinalizeTabChart()
Calculates the object anchor of a sheet chart (chart fills one page).
void ReadChartSubStream(XclImpStream &rStrm)
Reads the complete chart substream (BOF/EOF block).
virtual std::size_t DoGetProgressSize() const override
Returns the needed size on the progress bar.
virtual void DoPostProcessSdrObj(XclImpDffConverter &rDffConv, SdrObject &rSdrObj) const override
Converts the chart document.
std::shared_ptr< XclImpChart > XclImpChartRef
virtual rtl::Reference< SdrObject > DoCreateSdrObj(XclImpDffConverter &rDffConv, const tools::Rectangle &rAnchorRect) const override
Creates and returns a new SdrObject from the contained data.
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.
virtual void DoReadObj4(XclImpStream &rStrm, sal_uInt16 nMacroSize) override
Reads the contents of the a BIFF4 OBJ record from the passed stream.
bool mbOwnTab
The chart itself (BOF/EOF substream data).
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.
virtual void DoReadObj3(XclImpStream &rStrm, sal_uInt16 nMacroSize) override
Reads the contents of the a BIFF3 OBJ record from the passed stream.
Represents the entire chart substream (all records in BOF/EOF block).
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.
virtual OUString DoGetServiceName() const override
Returns the service name of the control component to be created.
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.
virtual void DoProcessControl(ScfPropertySet &rPropSet) const override
Sets additional properties for the current form control.
sal_uInt16 mnCheckBoxFlags
XclImpCheckBoxObj(const XclImpRoot &rRoot)
virtual XclTbxEventType DoGetEventType() const override
Returns the type of the macro event to be created.
Helper base class for TBX and OCX form controls to manage spreadsheet links.
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.
virtual ~XclImpControlHelper()
void ReadRangeList(ScRangeList &rScRanges, XclImpStream &rStrm)
Linked cell in the Calc document.
XclImpControlHelper(const XclImpRoot &rRoot, XclCtrlBindMode eBindMode)
css::uno::Reference< css::drawing::XShape > mxShape
std::shared_ptr< ScAddress > mxCellLink
The UNO wrapper of the control shape.
const XclImpRoot & mrRoot
void ReadSourceRangeFormula(XclImpStream &rStrm, bool bWithBoundSize)
Reads the formula for the source range from the current position of the stream.
void ReadCellLinkFormula(XclImpStream &rStrm, bool bWithBoundSize)
Reads the formula for the linked cell from the current position of the stream.
virtual void DoProcessControl(ScfPropertySet &rPropSet) const
Derived classes will set additional properties for the current form control.
bool HasCellLink() const
Returns true, if a linked cell address is present.
std::shared_ptr< ScRange > mxSrcRange
Not derived from XclImpRoot to allow multiple inheritance.
void ApplySheetLinkProps() const
void SetStringProperty(const OUString &sName, const OUString &sVal)
XclCtrlBindMode meBindMode
Source data range in the Calc document.
void ProcessControl(const XclImpDrawObjBase &rDrawObj) const
Sets additional properties to the form control model, calls virtual DoProcessControl().
This is the central instance for converting binary DFF data into shape objects.
sal_Int32 GetDefaultTextMargin() const
Returns the default text margin in drawing layer units.
ScfProgressBarRef mxProgress
The 'Ctls' stream for OCX form controls.
virtual ~XclImpDffConverter() override
void Progress(std::size_t nDelta=1)
Increase the progress bar by the passed value.
bool mbNotifyMacroEventRead
Default margin in text boxes.
virtual SdrObject * FinalizeObj(DffObjData &rDffObjData, SdrObject *pOldSdrObj) override
Finalize a DFF object, sets anchor after nested objs have been loaded.
void StartProgressBar(std::size_t nProgressSize)
Initializes the internal progress bar with the passed size and starts it.
OUString ReadHlinkProperty(SvStream &rDffStrm) const
Reads contents of a hyperlink property and returns the extracted URL.
sal_Int32 mnDefTextMargin
Application OLE import settings.
std::shared_ptr< XclImpDffConvData > XclImpDffConvDataRef
XclImpDffConvData & GetConvData()
Returns the current drawing manager data struct from top of the stack.
void NotifyMacroEventRead()
Notify that this document contains a macro event handler.
std::shared_ptr< ScfProgressBar > ScfProgressBarRef
void FinalizeDrawing()
Finally called after the objects of the passed drawing manager have been converted.
XclImpDffConverter(const XclImpRoot &rRoot, SvStream &rDffStrm)
Standard name of control forms.
void ProcessObject(SdrObjList &rObjList, XclImpDrawObjBase &rDrawObj)
Processes BIFF5 drawing objects without DFF data, inserts into the passed object list.
void InitControlForm()
Initializes the mxCtrlForm referring to the standard controls form.
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.
tools::SvRef< SotStorageStream > mxCtlsStrm
bool ProcessSolverContainer(SvStream &rDffStrm, const DffRecordHeader &rSolverHeader)
Processes the solver container (connectors of a sheet).
bool ProcessShContainer(SvStream &rDffStrm, const DffRecordHeader &rShHeader)
Processes a shape or shape group container (one top-level shape).
void InsertSdrObject(SdrObjList &rObjList, const XclImpDrawObjBase &rDrawObj, SdrObject *pSdrObj)
Inserts the passed SdrObject into the document.
void ProcessDrawing(const XclImpDrawObjVector &rDrawObjs)
Processes all objects in the passed list.
bool ProcessDgContainer(SvStream &rDffStrm, const DffRecordHeader &rDgHeader)
Processes a drawing container (all drawing data of a sheet).
void InitializeDrawing(XclImpDrawing &rDrawing, SdrModel &rSdrModel, SdrPage &rSdrPage)
Initially called before the objects of the passed drawing manager are converted.
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.
std::vector< XclImpDffConvDataRef > maDataStack
The progress bar used in ProcessObj().
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.
rtl::Reference< SdrObject > CreateSdrObject(const XclImpTbxObjBase &rTbxObj, const tools::Rectangle &rAnchorRect)
Creates the SdrObject for the passed Excel TBX form control object.
sal_uInt32 mnOleImpFlags
Stack for registered drawing managers.
bool ProcessShGrContainer(SvStream &rDffStrm, const DffRecordHeader &rShGrHeader)
Processes the global shape group container (all shapes of a sheet).
bool SupportsOleObjects() const
Returns true, if the conversion of OLE objects is supported.
This class reads a DFF property set (msofbtOPT record).
sal_uInt32 GetPropertyValue(sal_uInt16 nPropId) const
Returns the specified property or zero, if not extant.
SvMemoryStream maDummyStrm
void Read(XclImpStream &rStrm)
Reads a DFF property set from the stream.
void FillToItemSet(SfxItemSet &rItemSet) const
Translates the properties and fills the item set.
std::unique_ptr< SvMemoryStream > SvMemoryStreamPtr
XclImpSimpleDffConverter maDffConv
Dummy DGG stream for DFF manager.
SvMemoryStreamPtr mxMemStrm
DFF converter used to resolve palette colors.
XclImpDffPropSet(const XclImpRoot &rRoot)
virtual OUString DoGetServiceName() const override
Returns the service name of the control component to be created.
XclImpDialogObj(const XclImpRoot &rRoot)
virtual XclTbxEventType DoGetEventType() const override
Returns the type of the macro event to be created.
virtual void DoProcessControl(ScfPropertySet &rPropSet) const override
Sets additional properties for the current form control.
Base class for drawing objects (OBJ records).
void SetInsertSdrObj(bool bInsert)
If set to false, the SdrObject will be created or processed, but not be inserted into the draw page.
static XclImpDrawObjRef ReadObj4(const XclImpRoot &rRoot, XclImpStream &rStrm)
Reads the BIFF4 OBJ record, returns a new drawing object.
static XclImpDrawObjRef ReadObj3(const XclImpRoot &rRoot, XclImpStream &rStrm)
Reads the BIFF3 OBJ record, returns a new drawing object.
bool mbProcessSdr
true = Create simple macro link and hyperlink.
const XclObjAnchor * GetAnchor() const
Returns the object anchor if existing, null otherwise.
sal_uInt32 mnDffShapeId
The Excel object type from OBJ record.
void SetProcessSdrObj(bool bProcess)
If set to false, the SdrObject will not be created, processed, or inserted into the draw page.
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.
bool mbAreaObj
true = Object is printable.
static XclImpDrawObjRef ReadObj5(const XclImpRoot &rRoot, XclImpStream &rStrm)
Reads the BIFF5 OBJ record, returns a new drawing object.
bool mbVisible
true = Object is hidden.
void PreProcessSdrObject(XclImpDffConverter &rDffConv, SdrObject &rSdrObj)
Additional processing for the passed SdrObject before insertion into the drawing page (calls virtual ...
std::size_t GetProgressSize() const
Returns the needed size on the progress bar (calls virtual DoGetProgressSize() function).
bool IsVisible() const
Returns true, if the object is visible.
bool IsValidSize(const tools::Rectangle &rAnchorRect) const
Returns true, if the passed size is valid for this object.
void PostProcessSdrObject(XclImpDffConverter &rDffConv, SdrObject &rSdrObj) const
Additional processing for the passed SdrObject after insertion into the drawing page (calls virtual D...
ShapeFlag mnDffFlags
Shape ID from DFF stream.
bool IsHidden() const
Returns true, if the object is hidden.
sal_uInt16 mnObjId
The position of the object in its parent.
bool mbSimpleMacro
true = Set automatic text margin.
virtual void DoReadObj3(XclImpStream &rStrm, sal_uInt16 nMacroSize)
Derived classes read the contents of the a BIFF3 OBJ record from the passed stream.
bool mbHidden
true = maAnchor is initialized.
virtual OUString GetObjName() const
Returns the name of this object, may generate a default name.
void SetAnchor(const XclObjAnchor &rAnchor)
Sets the object anchor explicitly.
void ReadMacro5(XclImpStream &rStrm, sal_uInt16 nMacroSize)
Reads the macro link in a BIFF5 OBJ record.
void SetSimpleMacro(bool bMacro)
If set to true, a new SdrObject will be created while in DFF import.
bool IsPrintable() const
Returns true, if the object is printable.
bool mbAutoMargin
true = Width and height must be greater than 0.
bool IsProcessSdrObj() const
Returns true, if the object is valid and will be processed.
SCTAB mnTab
The object identifier (unique per drawing).
void ImplReadObj5(XclImpStream &rStrm)
Reads the contents of a BIFF5 OBJ record.
void ReadMacro3(XclImpStream &rStrm, sal_uInt16 nMacroSize)
Reads the macro link in a BIFF3 OBJ record.
void ReadMacro4(XclImpStream &rStrm, sal_uInt16 nMacroSize)
Reads the macro link in a BIFF4 OBJ record.
rtl::Reference< SdrObject > CreateSdrObject(XclImpDffConverter &rDffConv, const tools::Rectangle &rAnchorRect, bool bIsDff) const
Creates and returns an SdrObject from the contained data.
bool IsInsertSdrObj() const
Returns true, if the SdrObject will be created or processed, but not be inserted into the draw page.
sal_uInt16 mnObjType
Location of object.
virtual ~XclImpDrawObjBase() override
virtual rtl::Reference< SdrObject > DoCreateSdrObj(XclImpDffConverter &rDffConv, const tools::Rectangle &rAnchorRect) const
Derived classes create and return a new SdrObject from the contained data.
void SetDffData(const DffObjData &rDffObjData, const OUString &rObjName, const OUString &rHyperlink, bool bVisible, bool bAutoMargin)
Sets shape data from DFF stream.
void ReadMacro8(XclImpStream &rStrm)
Reads the contents of the ftMacro sub structure in an OBJ record.
OUString maHyperlink
Name of an attached macro.
sal_uInt16 GetObjId() const
Returns the sheet index and Excel object identifier from OBJ record.
XclImpDrawObjBase(const XclImpRoot &rRoot)
virtual void DoReadObj4(XclImpStream &rStrm, sal_uInt16 nMacroSize)
Derived classes read the contents of the a BIFF4 OBJ record from the passed stream.
bool mbInsertSdr
true = Object is valid, do processing and insertion.
const OUString & GetMacroName() const
Returns associated macro name, if set, otherwise zero length string.
void SetAreaObj(bool bAreaObj)
Sets whether this is an area object (then its width and height must be greater than 0).
sal_uInt32 GetDffShapeId() const
Returns the shape identifier used in the DFF stream.
void ImplReadObj4(XclImpStream &rStrm)
Reads the contents of a BIFF4 OBJ record.
Color GetSolidFillColor(const XclObjFillData &rFillData) const
Returns a solid fill color from the passed fill data struct.
void ConvertFrameStyle(SdrObject &rSdrObj, sal_uInt16 nFrameFlags) const
Converts the passed frame flags to the passed SdrObject.
ScRange GetUsedArea(SCTAB nScTab) const
Returns the range in the sheet covered by this object.
void ConvertFillStyle(SdrObject &rSdrObj, const XclObjFillData &rFillData) const
Converts the passed fill formatting to the passed SdrObject.
void NotifyMacroEventRead()
Notify that the document contains a macro event handler.
void ImplReadObj8(XclImpStream &rStrm)
Reads the contents of a BIFF8 OBJ record.
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.
virtual void DoPreProcessSdrObj(XclImpDffConverter &rDffConv, SdrObject &rSdrObj) const
Derived classes may perform additional processing for the passed SdrObject before insertion.
static XclImpDrawObjRef ReadObj8(const XclImpRoot &rRoot, XclImpStream &rStrm)
Reads the BIFF8 OBJ record, returns a new drawing object.
Color GetSolidLineColor(const XclObjLineData &rLineData) const
Returns a solid line color from the passed line data struct.
bool mbHasAnchor
On-click hyperlink URL.
void SetCustomDffObj(bool bCustom)
If set to true, a new SdrObject will be created while in DFF import.
sal_uInt16 GetObjType() const
Returns the Excel object type from OBJ record.
void ConvertLineStyle(SdrObject &rSdrObj, const XclObjLineData &rLineData) const
Converts the passed line formatting to the passed SdrObject.
OUString maMacroName
Name of the object.
tools::Rectangle maDffRect
Shape flags from DFF stream.
virtual std::size_t DoGetProgressSize() const
Derived classes may return a progress bar size different from 1.
virtual void DoPostProcessSdrObj(XclImpDffConverter &rDffConv, SdrObject &rSdrObj) const
Derived classes may perform additional processing for the passed SdrObject after insertion.
bool mbNotifyMacroEventRead
true = Recreate SdrObject in DFF import.
const tools::Rectangle & GetDffRect() const
bool mbCustomDff
true = Insert the SdrObject into draw page.
void ReadName5(XclImpStream &rStrm, sal_uInt16 nNameLen)
Reads the object name in a BIFF5 OBJ record.
bool mbPrintable
true = Object is visible.
ShapeFlag GetDffFlags() const
Returns the shape flags from the DFF stream.
void ImplReadObj3(XclImpStream &rStrm)
Reads the contents of a BIFF3 OBJ record.
void push_back(const XclImpDrawObjRef &rObj)
std::vector< XclImpDrawObjRef >::const_iterator begin() const
std::vector< XclImpDrawObjRef > mObjs
void InsertGrouped(XclImpDrawObjRef const &xDrawObj)
Tries to insert the passed object into the last group or appends it.
std::size_t GetProgressSize() const
Returns the needed size on the progress bar for all contained objects.
std::vector< XclImpDrawObjRef >::const_iterator end() const
Base class for a container for all objects on a drawing (spreadsheet or embedded chart object).
void ReadDffRecord(XclImpStream &rStrm)
Reads contents of a DFF record and append data to internal DFF stream.
void SetSkipObj(sal_uInt16 nObjId)
Sets the object with the passed identification to be skipped on import.
std::size_t GetProgressSize() const
Returns the size of the progress bar shown while processing all objects.
std::shared_ptr< XclImpObjTextData > XclImpObjTextRef
bool mbOleObjs
IDs of all objects to be skipped.
XclImpDrawing(const XclImpRoot &rRoot, bool bOleObjects)
void ReadObj8(XclImpStream &rStrm)
Reads a BIFF8 OBJ record following an MSODRAWING record.
static void ReadBmp(Graphic &rGraphic, const XclImpRoot &rRoot, XclImpStream &rStrm)
Reads and returns a bitmap from BMP format.
XclImpDrawObjRef FindDrawObj(const DffRecordHeader &rHeader) const
Finds the OBJ record data related to the DFF shape at the passed position.
bool SupportsOleObjects() const
Returns true, if the conversion of OLE objects is supported.
XclImpObjMap maObjMap
Copy of the DFF page stream in memory.
void AppendRawObject(const XclImpDrawObjRef &rxDrawObj)
Appends a new drawing object to the list of raw objects (without DFF data).
void ReadTxo(XclImpStream &rStrm)
Reads the TXO record and following CONTINUE records containing string and formatting.
XclImpObjMapById maObjMapId
Maps BIFF8 drawing objects to DFF stream position.
ScfUInt16Vec maSkipObjs
Maps BIFF8 TXO textbox data to DFF stream position.
XclImpDrawObjVector maRawObjs
XclImpObjTextMap maTextMap
Maps BIFF8 drawing objects to object ID.
void ReadObj(XclImpStream &rStrm)
Reads a plain OBJ record (without leading DFF data).
std::map< sal_uInt16, XclImpDrawObjRef > XclImpObjMapById
SvMemoryStream maDffStrm
BIFF5 objects without DFF data.
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.
static void ReadWmf(Graphic &rGraphic, XclImpStream &rStrm)
Reads and returns a bitmap from WMF/PICT format.
std::map< std::size_t, XclImpDrawObjRef > XclImpObjMap
virtual ~XclImpDrawing() override
const XclImpObjTextData * FindTextData(const DffRecordHeader &rHeader) const
Finds the textbox data related to the DFF shape at the passed position.
void ReadMsoDrawing(XclImpStream &rStrm)
Reads the MSODRAWING or MSODRAWINGSELECTION record.
std::map< std::size_t, XclImpObjTextRef > XclImpObjTextMap
static Graphic ReadImgData(const XclImpRoot &rRoot, XclImpStream &rStrm)
Reads and returns a bitmap from the IMGDATA record.
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.
XclImpDropDownObj(const XclImpRoot &rRoot)
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.
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.
virtual void DoProcessControl(ScfPropertySet &rPropSet) const override
Sets additional properties for the current form control.
sal_uInt16 GetDropDownType() const
Returns the type of the dropdown control.
virtual XclTbxEventType DoGetEventType() const override
Returns the type of the macro event to be created.
void ReadFullLbsData(XclImpStream &rStrm)
Reads dropdown box settings.
virtual OUString DoGetServiceName() const override
Returns the service name of the control component to be created.
sal_uInt16 mnDropDownFlags
virtual OUString DoGetServiceName() const override
Returns the service name of the control component to be created.
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.
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.
virtual void DoProcessControl(ScfPropertySet &rPropSet) const override
Sets additional properties for the current form control.
sal_uInt16 mnListBoxObjId
bool IsNumeric() const
REturns true, if the field type is numeric.
virtual XclTbxEventType DoGetEventType() const override
Returns the type of the macro event to be created.
XclImpEditObj(const XclImpRoot &rRoot)
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.
virtual XclTbxEventType DoGetEventType() const override
Returns the type of the macro event to be created.
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.
sal_uInt16 mnGroupBoxFlags
virtual void DoProcessControl(ScfPropertySet &rPropSet) const override
Sets additional properties for the current form control.
XclImpGroupBoxObj(const XclImpRoot &rRoot)
virtual OUString DoGetServiceName() const override
Returns the service name of the control component to be created.
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.
bool TryInsert(XclImpDrawObjRef const &xDrawObj)
Tries to insert the drawing object into this or a nested group.
virtual void DoReadObj4(XclImpStream &rStrm, sal_uInt16 nMacroSize) override
Reads the contents of the a BIFF4 OBJ record from the passed stream.
virtual rtl::Reference< SdrObject > DoCreateSdrObj(XclImpDffConverter &rDffConv, const tools::Rectangle &rAnchorRect) const override
Creates and returns a new SdrObject from the contained data.
sal_uInt16 mnFirstUngrouped
Grouped objects.
virtual void DoReadObj3(XclImpStream &rStrm, sal_uInt16 nMacroSize) override
Reads the contents of the a BIFF3 OBJ record from the passed stream.
virtual std::size_t DoGetProgressSize() const override
Returns a progress bar size that takes all group children into account.
XclImpGroupObj(const XclImpRoot &rRoot)
XclImpDrawObjVector maChildren
virtual void DoProcessControl(ScfPropertySet &rPropSet) const override
Sets additional properties for the current form control.
virtual XclTbxEventType DoGetEventType() const override
Returns the type of the macro event to be created.
virtual OUString DoGetServiceName() const override
Returns the service name of the control component to be created.
XclImpLabelObj(const XclImpRoot &rRoot)
virtual rtl::Reference< SdrObject > DoCreateSdrObj(XclImpDffConverter &rDffConv, const tools::Rectangle &rAnchorRect) const override
Creates and returns a new SdrObject from the contained data.
XclImpLineObj(const XclImpRoot &rRoot)
virtual void DoReadObj4(XclImpStream &rStrm, sal_uInt16 nMacroSize) override
Reads the contents of the a BIFF4 OBJ record from the passed stream.
XclObjLineData maLineData
virtual void DoReadObj3(XclImpStream &rStrm, sal_uInt16 nMacroSize) override
Reads the contents of the a BIFF3 OBJ record from the passed stream.
sal_uInt8 mnStartPoint
Line arrows.
sal_uInt16 mnArrows
BIFF5 line formatting.
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.
virtual XclTbxEventType DoGetEventType() const override
Returns the type of the macro event to be created.
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.
virtual OUString DoGetServiceName() const override
Returns the service name of the control component to be created.
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.
XclImpListBoxObj(const XclImpRoot &rRoot)
virtual void DoProcessControl(ScfPropertySet &rPropSet) const override
Sets additional properties for the current form control.
void ReadFullLbsData(XclImpStream &rStrm, std::size_t nRecLeft)
Reads listbox settings and selection.
A note object, which is a specialized text box object.
sal_uInt16 mnNoteFlags
Cell position of the note object.
void SetNoteData(const ScAddress &rScPos, sal_uInt16 nNoteFlags)
Sets note flags and the note position in the Calc sheet.
XclImpNoteObj(const XclImpRoot &rRoot)
virtual void DoPreProcessSdrObj(XclImpDffConverter &rDffConv, SdrObject &rSdrObj) const override
Inserts the note into the document, sets visibility.
Stores all drawing and OLE objects and additional data related to these objects.
css::uno::Reference< css::container::XNameContainer > mxOleCtrlNameOverride
OUString GetDefaultObjName(const XclImpDrawObjBase &rDrawObj) const
Returns the default name for the passed object.
std::map< sal_uInt16, OUString > DefObjNameMap
OUString GetOleNameOverride(SCTAB nTab, sal_uInt16 nObjId)
Returns the name of overridden name ( or zero length string ) for associated object id.
XclImpObjectManager(const XclImpRoot &rRoot)
XclImpSheetDrawing & GetSheetDrawing(SCTAB nScTab)
Returns (initially creates) the drawing manager of the specified sheet.
void ReadMsoDrawingGroup(XclImpStream &rStrm)
Reads the MSODRAWINGGROUP record.
std::map< SCTAB, XclImpSheetDrawingRef > XclImpSheetDrawingMap
virtual ~XclImpObjectManager() override
ScRange GetUsedArea(SCTAB nScTab) const
Returns the used area in the sheet with the passed index.
void SetOleNameOverrideInfo(const css::uno::Reference< css::container::XNameContainer > &rxOverrideInfo)
Sets the container to receive overridden shape/ctrl names from the filter.
std::shared_ptr< XclImpSheetDrawing > XclImpSheetDrawingRef
DefObjNameMap maDefObjNames
XclImpSheetDrawingMap maSheetDrawings
Copy of global DFF data (DGG container) in memory.
SvMemoryStream maDggStrm
Default base names for all object types.
void ConvertObjects()
Inserts all objects into the Calc document.
XclImpOvalObj(const XclImpRoot &rRoot)
virtual rtl::Reference< SdrObject > DoCreateSdrObj(XclImpDffConverter &rDffConv, const tools::Rectangle &rAnchorRect) const override
Creates and returns a new SdrObject from the contained data.
A placeholder object for unknown object types.
XclImpPhObj(const XclImpRoot &rRoot)
A picture, an embedded or linked OLE object, or an OCX form control.
std::size_t mnCtlsStrmSize
Position in 'Ctls' stream for this control.
OUString GetOleStorageName() const
Returns the storage name for the OLE object.
std::size_t GetCtlsStreamSize() const
Returns the size in the 'Ctls' stream for additional form control data.
std::size_t mnCtlsStrmPos
Identifier of the storage for this object.
bool mbControl
true = Show as symbol.
std::size_t GetCtlsStreamPos() const
Returns the position in the 'Ctls' stream for additional form control data.
bool mbEmbedded
Size in 'Ctls' stream for this control.
OUString maClassName
Picture or OLE placeholder graphic.
bool mbLinked
true = Embedded OLE object.
bool mbSymbol
true = Linked OLE object.
sal_uInt32 mnStorageId
Class name of embedded OLE object.
virtual OUString GetObjName() const override
Returns the ObjectName - can use non-obvious lookup for override in the associated vba document modul...
virtual void DoReadObj3(XclImpStream &rStrm, sal_uInt16 nMacroSize) override
Reads the contents of the a BIFF3 OBJ record from the passed stream.
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.
bool IsOcxControl() const
Returns true, if this object is an OCX form control.
virtual void DoReadObj4(XclImpStream &rStrm, sal_uInt16 nMacroSize) override
Reads the contents of the a BIFF4 OBJ record from the passed stream.
void ReadFlags3(XclImpStream &rStrm)
Reads and sets the picture flags from a BIFF3-BIFF5 OBJ picture record.
void ReadFlags8(XclImpStream &rStrm)
Reads the contents of the OBJFLAGS subrecord.
bool IsSymbol() const
Returns true, if the OLE object will be shown as symbol.
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.
const Graphic & GetGraphic() const
Returns the graphic imported from the IMGDATA record.
bool mbUseCtlsStrm
true = Form control, false = OLE object.
void ReadPictFmla(XclImpStream &rStrm, sal_uInt16 nLinkSize)
Reads the contents of the OBJPICTFMLA subrecord.
XclImpPictureObj(const XclImpRoot &rRoot)
virtual rtl::Reference< SdrObject > DoCreateSdrObj(XclImpDffConverter &rDffConv, const tools::Rectangle &rAnchorRect) const override
Creates and returns a new SdrObject from the contained data.
virtual void DoPreProcessSdrObj(XclImpDffConverter &rDffConv, SdrObject &rSdrObj) const override
Override to do additional processing on the SdrObject.
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.
sal_uInt16 mnPolyFlags
Coordinates relative to bounding rectangle.
std::vector< Point > PointVector
virtual rtl::Reference< SdrObject > DoCreateSdrObj(XclImpDffConverter &rDffConv, const tools::Rectangle &rAnchorRect) const override
Creates and returns a new SdrObject from the contained data.
XclImpPolygonObj(const XclImpRoot &rRoot)
void ReadCoordList(XclImpStream &rStrm)
Reads the COORDLIST record following the OBJ record.
sal_uInt16 mnPointCount
Additional flags.
virtual void DoReadObj4(XclImpStream &rStrm, sal_uInt16 nMacroSize) override
Reads the contents of the a BIFF4 OBJ record from the passed stream.
A rectangle or oval object.
XclImpRectObj(const XclImpRoot &rRoot)
XclObjLineData maLineData
BIFF5 fill formatting.
sal_uInt16 mnFrameFlags
BIFF5 line formatting.
void ReadFrameData(XclImpStream &rStrm)
Reads fil data, line data, and frame flags.
virtual void DoReadObj3(XclImpStream &rStrm, sal_uInt16 nMacroSize) override
Reads the contents of the a BIFF3 OBJ record from the passed stream.
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.
virtual rtl::Reference< SdrObject > DoCreateSdrObj(XclImpDffConverter &rDffConv, const tools::Rectangle &rAnchorRect) const override
Creates and returns a new SdrObject from the contained data.
void ConvertRectStyle(SdrObject &rSdrObj) const
Converts fill formatting, line formatting, and frame style.
XclObjFillData maFillData
virtual void DoReadObj4(XclImpStream &rStrm, sal_uInt16 nMacroSize) override
Reads the contents of the a BIFF4 OBJ record from the passed stream.
Access to global data from other classes.
Drawing manager of a single sheet.
void ConvertObjects(XclImpDffConverter &rDffConv)
Converts all objects and inserts them into the sheet drawing page.
virtual tools::Rectangle CalcAnchorRect(const XclObjAnchor &rAnchor, bool bDffAnchor) const override
Calculate the resulting rectangle of the passed anchor.
virtual void OnObjectInserted(const XclImpDrawObjBase &rDrawObj) override
On call, updates the used area of the sheet.
const ScRange & GetUsedArea() const
Returns the total cell range covered by any shapes in the sheet.
void ReadNote(XclImpStream &rStrm)
Reads the NOTE record.
void ReadNote3(XclImpStream &rStrm)
Reads a BIFF3-BIFF5 NOTE record.
void ReadNote8(XclImpStream &rStrm)
Reads a BIFF8 NOTE record.
XclImpSheetDrawing(const XclImpRoot &rRoot, SCTAB nScTab)
void ReadTabChart(XclImpStream &rStrm)
Inserts a new chart object and reads the chart substream (BOF/EOF block).
Simple implementation of the SVX DFF manager.
XclImpSimpleDffConverter(const XclImpRoot &rRoot, SvStream &rDffStrm)
virtual ~XclImpSimpleDffConverter() override
virtual bool GetColorFromPalette(sal_uInt16 nIndex, Color &rColor) const override
Returns a color from the Excel color palette.
The solver container collects all connector rules for connected objects.
std::map< sal_uInt32, XclImpSdrInfo > XclImpSdrInfoMap
XclImpSdrObjMap maSdrObjMap
Maps shape IDs to SdrObjects and flags.
void RemoveSdrObjectInfo(SdrObject &rSdrObj)
Removes information of an SdrObject (and all child objects if it is a group).
std::map< SdrObject *, sal_uInt32 > XclImpSdrObjMap
void RemoveConnectorRules()
Removes all contained connector rules.
XclImpSdrInfoMap maSdrInfoMap
void UpdateConnectorRules()
Inserts the SdrObject pointers into all connector rules.
void UpdateConnection(sal_uInt32 nDffShapeId, SdrObject *&rpSdrObj, ShapeFlag *pnDffFlags=nullptr)
Updates the data of a connected shape in a connector rule.
void InsertSdrObjectInfo(SdrObject &rSdrObj, sal_uInt32 nDffShapeId, ShapeFlag nDffFlags)
Inserts information about a new SdrObject.
This class is used to import record oriented streams.
Base class for textbox based form controls.
bool FillMacroDescriptor(css::script::ScriptEventDescriptor &rDescriptor) const
Fills the passed macro event descriptor.
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().
void ConvertLabel(ScfPropertySet &rPropSet) const
Sets control label and text formatting.
OUString GetServiceName() const
Returns the service name of the control component to be created.
virtual rtl::Reference< SdrObject > DoCreateSdrObj(XclImpDffConverter &rDffConv, const tools::Rectangle &rAnchorRect) const override
Creates and returns a new SdrObject from the contained data.
void ConvertFont(ScfPropertySet &rPropSet) const
Sets control text formatting.
XclImpTbxObjBase(const XclImpRoot &rRoot)
void SetDffProperties(const DffPropSet &rDffPropSet)
Sets line and fill formatting from the passed DFF property set.
Base class for list controls (listbox, dropdown).
void ReadLbsData(XclImpStream &rStrm)
Reads common listbox settings.
void SetBoxFormatting(ScfPropertySet &rPropSet) const
Sets common listbox/dropdown formatting attributes.
XclImpTbxObjListBase(const XclImpRoot &rRoot)
A drawing object supporting text contents.
XclImpObjTextData maTextData
virtual rtl::Reference< SdrObject > DoCreateSdrObj(XclImpDffConverter &rDffConv, const tools::Rectangle &rAnchorRect) const override
Creates and returns a new SdrObject from the contained data.
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.
XclImpTextObj(const XclImpRoot &rRoot)
void SetTextData(const XclImpObjTextData &rTextData)
Stores the passed textbox data.
virtual void DoPreProcessSdrObj(XclImpDffConverter &rDffConv, SdrObject &rSdrObj) const override
Inserts the contained text data at the passed object.
virtual void DoReadObj3(XclImpStream &rStrm, sal_uInt16 nMacroSize) override
Reads the contents of the a BIFF3 OBJ record from the passed stream.
virtual void DoReadObj4(XclImpStream &rStrm, sal_uInt16 nMacroSize) override
Reads the contents of the a BIFF4 OBJ record from the passed stream.
Data per registered drawing manager, will be stacked for recursive calls.
XclImpDffConvData(XclImpDrawing &rDrawing, SdrModel &rSdrModel, SdrPage &rSdrPage)
True = mxCtrlForm is initialized (but maybe still null).
bool mbHasCtrlForm
Last insertion index of a form control (for macro events).
SdrModel & mrSdrModel
Current drawing container with all drawing objects.
XclImpSolverContainer maSolverCont
The SdrPage of the drawing manager.
XclImpDrawing & mrDrawing
css::uno::Reference< css::form::XForm > mxCtrlForm
The solver container for connector rules.
sal_Int32 mnLastCtrlIndex
Controls form of current drawing page.
SdrPage & mrSdrPage
The SdrModel of the drawing manager.
void ReadByteString(XclImpStream &rStrm)
Plain or rich string.
void ReadFormats(XclImpStream &rStrm)
Reads text formatting from the passed stream.
XclImpStringRef mxString
BIFF5 text data.
Stores data about an SdrObject processed during import.
ShapeFlag mnDffFlags
Pointer to an SdrObject.
XclImpSdrInfo()
Shape flags from DFF stream.
void Set(SdrObject *pSdrObj, ShapeFlag nDffFlags)
Represents the position (anchor) of an object in a Calc document.
XclImpStream & operator>>(XclImpStream &rStrm, XclImpDffPropSet &rPropSet)
std::shared_ptr< XclImpDrawObjBase > XclImpDrawObjRef
std::shared_ptr< XclImpString > XclImpStringRef
XclCtrlBindMode
Automatic fill formatting.