LibreOffice Module sc (master) 1
|
Helper base class for TBX and OCX form controls to manage spreadsheet links. More...
#include <xiescher.hxx>
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< 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. 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< ScAddress > | mxCellLink |
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 XclImpRoot & | mrRoot |
std::shared_ptr< ScRange > | mxSrcRange |
Not derived from XclImpRoot to allow multiple inheritance. More... | |
XclCtrlBindMode | meBindMode |
Source data range in the Calc document. More... | |
Helper base class for TBX and OCX form controls to manage spreadsheet links.
Definition at line 459 of file xiescher.hxx.
|
explicit |
Definition at line 1885 of file xiescher.cxx.
|
virtual |
Definition at line 1891 of file xiescher.cxx.
|
protected |
Definition at line 1909 of file xiescher.cxx.
References Any, EXC_CTRL_BINDCONTENT, EXC_CTRL_BINDPOSITION, Exception, ScUnoConversion::FillApiAddress(), ScUnoConversion::FillApiRange(), XclControlHelper::GetControlModel(), XclRoot::GetDocShell(), SfxObjectShell::GetModel(), meBindMode, mrRoot, mxCellLink, mxShape, mxSrcRange, SC_SERVICENAME_LISTCELLBIND, SC_SERVICENAME_LISTSOURCE, SC_SERVICENAME_VALBIND, SC_UNONAME_BOUNDCELL, SC_UNONAME_CELLRANGE, and xFactory.
Referenced by XclImpOptionButtonObj::DoProcessControl(), and ProcessControl().
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().
|
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().
|
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().
void XclImpControlHelper::ProcessControl | ( | const XclImpDrawObjBase & | rDrawObj | ) | const |
Sets additional properties to the form control model, calls virtual DoProcessControl().
Definition at line 1983 of file xiescher.cxx.
References ApplySheetLinkProps(), DoProcessControl(), XclControlHelper::GetControlModel(), XclImpDrawObjBase::GetObjName(), XclImpDrawObjBase::IsPrintable(), XclImpDrawObjBase::IsVisible(), mxShape, ScfPropertySet::SetBoolProperty(), and ScfPropertySet::SetStringProperty().
Referenced by XclImpTbxObjBase::DoPreProcessSdrObj(), and XclImpPictureObj::DoPreProcessSdrObj().
|
protected |
Reads the formula for the linked cell from the current position of the stream.
Definition at line 2004 of file xiescher.cxx.
References ScRange::aStart, ScRangeList::empty(), ScRangeList::front(), mxCellLink, ReadRangeList(), and rStrm.
Referenced by XclImpCheckBoxObj::DoReadObj5(), XclImpOptionButtonObj::DoReadObj5(), XclImpSpinButtonObj::DoReadObj5(), XclImpScrollBarObj::DoReadObj5(), XclImpListBoxObj::DoReadObj5(), XclImpDropDownObj::DoReadObj5(), XclImpCheckBoxObj::DoReadObj8SubRec(), XclImpTbxObjScrollableBase::DoReadObj8SubRec(), and XclImpPictureObj::ReadPictFmla().
|
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().
|
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.
|
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().
void XclImpControlHelper::SetStringProperty | ( | const OUString & | sName, |
const OUString & | sVal | ||
) |
Definition at line 2095 of file xiescher.cxx.
References XclControlHelper::GetControlModel(), mxShape, ScfPropertySet::SetStringProperty(), and sName.
|
private |
Source data range in the Calc document.
Definition at line 499 of file xiescher.hxx.
Referenced by ApplySheetLinkProps().
|
private |
Definition at line 497 of file xiescher.hxx.
Referenced by ApplySheetLinkProps(), and ReadRangeList().
|
protected |
The UNO wrapper of the control shape.
Definition at line 489 of file xiescher.hxx.
Referenced by ApplySheetLinkProps(), XclImpOptionButtonObj::DoProcessControl(), HasCellLink(), and ReadCellLinkFormula().
|
mutableprotected |
Definition at line 488 of file xiescher.hxx.
Referenced by ApplySheetLinkProps(), XclImpTbxObjBase::ConvertLabel(), CreateSdrObjectFromShape(), XclImpOptionButtonObj::DoProcessControl(), ProcessControl(), and SetStringProperty().
|
private |
Not derived from XclImpRoot to allow multiple inheritance.
Definition at line 498 of file xiescher.hxx.
Referenced by ApplySheetLinkProps(), and ReadSourceRangeFormula().