LibreOffice Module sc (master) 1
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
XclImpControlHelper Class Reference

Helper base class for TBX and OCX form controls to manage spreadsheet links. More...

#include <xiescher.hxx>

Inheritance diagram for XclImpControlHelper:
[legend]
Collaboration diagram for XclImpControlHelper:
[legend]

Public Member Functions

 XclImpControlHelper (const XclImpRoot &rRoot, XclCtrlBindMode eBindMode)
 
virtual ~XclImpControlHelper ()
 
bool HasCellLink () const
 Returns true, if a linked cell address is present. More...
 
rtl::Reference< SdrObjectCreateSdrObjectFromShape (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. More...
 
void ProcessControl (const XclImpDrawObjBase &rDrawObj) const
 Sets additional properties to the form control model, calls virtual DoProcessControl(). More...
 
void SetStringProperty (const OUString &sName, const OUString &sVal)
 

Protected Member Functions

void ReadCellLinkFormula (XclImpStream &rStrm, bool bWithBoundSize)
 Reads the formula for the linked cell from the current position of the stream. More...
 
void ReadSourceRangeFormula (XclImpStream &rStrm, bool bWithBoundSize)
 Reads the formula for the source range from the current position of the stream. More...
 
virtual void DoProcessControl (ScfPropertySet &rPropSet) const
 Derived classes will set additional properties for the current form control. More...
 
void ApplySheetLinkProps () const
 

Protected Attributes

css::uno::Reference< css::drawing::XShape > mxShape
 
std::shared_ptr< ScAddressmxCellLink
 The UNO wrapper of the control shape. More...
 

Private Member Functions

void ReadRangeList (ScRangeList &rScRanges, XclImpStream &rStrm)
 Linked cell in the Calc document. More...
 
void ReadRangeList (ScRangeList &rScRanges, XclImpStream &rStrm, bool bWithBoundSize)
 Reads leading formula size and a list of cell ranges from a formula if the leading size is not zero. More...
 

Private Attributes

const XclImpRootmrRoot
 
std::shared_ptr< ScRangemxSrcRange
 Not derived from XclImpRoot to allow multiple inheritance. More...
 
XclCtrlBindMode meBindMode
 Source data range in the Calc document. More...
 

Detailed Description

Helper base class for TBX and OCX form controls to manage spreadsheet links.

Definition at line 459 of file xiescher.hxx.

Constructor & Destructor Documentation

◆ XclImpControlHelper()

XclImpControlHelper::XclImpControlHelper ( const XclImpRoot rRoot,
XclCtrlBindMode  eBindMode 
)
explicit

Definition at line 1885 of file xiescher.cxx.

◆ ~XclImpControlHelper()

XclImpControlHelper::~XclImpControlHelper ( )
virtual

Definition at line 1891 of file xiescher.cxx.

Member Function Documentation

◆ ApplySheetLinkProps()

void XclImpControlHelper::ApplySheetLinkProps ( ) const
protected

◆ CreateSdrObjectFromShape()

rtl::Reference< SdrObject > XclImpControlHelper::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 at line 1895 of file xiescher.cxx.

References SdrObject::getSdrObjectFromXShape(), mxShape, and SC_LAYER_CONTROLS().

Referenced by XclImpDffConverter::CreateSdrObject().

◆ DoProcessControl()

void XclImpControlHelper::DoProcessControl ( ScfPropertySet rPropSet) const
protectedvirtual

Derived classes will set additional properties for the current form control.

Reimplemented in XclImpButtonObj, XclImpCheckBoxObj, XclImpOptionButtonObj, XclImpLabelObj, XclImpGroupBoxObj, XclImpDialogObj, XclImpEditObj, XclImpSpinButtonObj, XclImpScrollBarObj, XclImpListBoxObj, and XclImpDropDownObj.

Definition at line 2028 of file xiescher.cxx.

Referenced by ProcessControl().

◆ HasCellLink()

bool XclImpControlHelper::HasCellLink ( ) const
inline

Returns true, if a linked cell address is present.

Definition at line 466 of file xiescher.hxx.

References mxCellLink.

Referenced by XclImpOptionButtonObj::DoProcessControl(), XclImpListBoxObj::DoProcessControl(), and XclImpDropDownObj::DoProcessControl().

◆ ProcessControl()

void XclImpControlHelper::ProcessControl ( const XclImpDrawObjBase rDrawObj) const

◆ ReadCellLinkFormula()

void XclImpControlHelper::ReadCellLinkFormula ( XclImpStream rStrm,
bool  bWithBoundSize 
)
protected

◆ ReadRangeList() [1/2]

void XclImpControlHelper::ReadRangeList ( ScRangeList rScRanges,
XclImpStream rStrm 
)
private

Linked cell in the Calc document.

Reads a list of cell ranges from a formula at the current stream position.

Definition at line 2032 of file xiescher.cxx.

References XclImpFormulaCompiler::CreateRangeList(), EXC_FMLATYPE_CONTROL, XclImpRoot::GetFormulaCompiler(), mrRoot, XclTokenArray::ReadArray(), XclTokenArray::ReadSize(), and rStrm.

Referenced by ReadCellLinkFormula(), ReadRangeList(), and ReadSourceRangeFormula().

◆ ReadRangeList() [2/2]

void XclImpControlHelper::ReadRangeList ( ScRangeList rScRanges,
XclImpStream rStrm,
bool  bWithBoundSize 
)
private

Reads leading formula size and a list of cell ranges from a formula if the leading size is not zero.

Definition at line 2041 of file xiescher.cxx.

References ReadRangeList(), and rStrm.

◆ ReadSourceRangeFormula()

void XclImpControlHelper::ReadSourceRangeFormula ( XclImpStream rStrm,
bool  bWithBoundSize 
)
protected

Reads the formula for the source range from the current position of the stream.

Definition at line 2016 of file xiescher.cxx.

References ScRangeList::empty(), ScRangeList::front(), mxSrcRange, ReadRangeList(), and rStrm.

Referenced by XclImpTbxObjListBase::ReadLbsData(), and XclImpPictureObj::ReadPictFmla().

◆ SetStringProperty()

void XclImpControlHelper::SetStringProperty ( const OUString &  sName,
const OUString &  sVal 
)

Member Data Documentation

◆ meBindMode

XclCtrlBindMode XclImpControlHelper::meBindMode
private

Source data range in the Calc document.

Definition at line 499 of file xiescher.hxx.

Referenced by ApplySheetLinkProps().

◆ mrRoot

const XclImpRoot& XclImpControlHelper::mrRoot
private

Definition at line 497 of file xiescher.hxx.

Referenced by ApplySheetLinkProps(), and ReadRangeList().

◆ mxCellLink

std::shared_ptr< ScAddress > XclImpControlHelper::mxCellLink
protected

The UNO wrapper of the control shape.

Definition at line 489 of file xiescher.hxx.

Referenced by ApplySheetLinkProps(), XclImpOptionButtonObj::DoProcessControl(), HasCellLink(), and ReadCellLinkFormula().

◆ mxShape

css::uno::Reference< css::drawing::XShape > XclImpControlHelper::mxShape
mutableprotected

◆ mxSrcRange

std::shared_ptr< ScRange > XclImpControlHelper::mxSrcRange
private

Not derived from XclImpRoot to allow multiple inheritance.

Definition at line 498 of file xiescher.hxx.

Referenced by ApplySheetLinkProps(), and ReadSourceRangeFormula().


The documentation for this class was generated from the following files: