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...
 
SdrObjectUniquePtr 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. More...
 
void ProcessControl (const XclImpDrawObjBase &rDrawObj) const
 Sets additional properties to the form control model, calls virtual DoProcessControl(). More...
 

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 458 of file xiescher.hxx.

Constructor & Destructor Documentation

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

Definition at line 1860 of file xiescher.cxx.

XclImpControlHelper::~XclImpControlHelper ( )
virtual

Definition at line 1866 of file xiescher.cxx.

Member Function Documentation

void XclImpControlHelper::ApplySheetLinkProps ( ) const
protected
SdrObjectUniquePtr 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 1870 of file xiescher.cxx.

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

Referenced by XclImpDffConverter::CreateSdrObject().

void XclImpControlHelper::DoProcessControl ( ScfPropertySet rPropSet) const
protectedvirtual

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

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

Definition at line 2001 of file xiescher.cxx.

Referenced by ProcessControl().

bool XclImpControlHelper::HasCellLink ( ) const
inline

Returns true, if a linked cell address is present.

Definition at line 465 of file xiescher.hxx.

References mxCellLink.

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

void XclImpControlHelper::ProcessControl ( const XclImpDrawObjBase rDrawObj) const
void XclImpControlHelper::ReadCellLinkFormula ( XclImpStream rStrm,
bool  bWithBoundSize 
)
protected
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 2005 of file xiescher.cxx.

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

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

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 2014 of file xiescher.cxx.

References XclImpStream::Ignore(), XclImpStream::PopPosition(), XclImpStream::PushPosition(), ReadRangeList(), and XclImpStream::ReaduInt16().

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 1989 of file xiescher.cxx.

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

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

Member Data Documentation

XclCtrlBindMode XclImpControlHelper::meBindMode
private

Source data range in the Calc document.

Definition at line 497 of file xiescher.hxx.

Referenced by ApplySheetLinkProps().

const XclImpRoot& XclImpControlHelper::mrRoot
private

Definition at line 495 of file xiescher.hxx.

Referenced by ApplySheetLinkProps(), and ReadRangeList().

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

The UNO wrapper of the control shape.

Definition at line 487 of file xiescher.hxx.

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

css::uno::Reference< css::drawing::XShape > XclImpControlHelper::mxShape
mutableprotected
std::shared_ptr< ScRange > XclImpControlHelper::mxSrcRange
private

Not derived from XclImpRoot to allow multiple inheritance.

Definition at line 496 of file xiescher.hxx.

Referenced by ApplySheetLinkProps(), and ReadSourceRangeFormula().


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