//= FormCellBindingHelper /** encapsulates functionality related to binding a form control to a spreadsheet cell
*/ class FormCellBindingHelper
{
css::uno::Reference< css::beans::XPropertySet >
m_xControlModel; // the model we work for
css::uno::Reference< css::sheet::XSpreadsheetDocument >
m_xDocument; // the document where the model lives
public: /** determines whether the given control model lives in a spreadsheet document <p>Ifthismethodreturns<FALSE/>,youcannotinstantiateaCellBindingHelperwith thismodel,sincethennoofitsfunctionalitywillbeavailable.</p>
*/ staticbool livesInSpreadsheetDocument( const css::uno::Reference< css::beans::XPropertySet >& _rxControlModel
);
/** gets a cell binding for the given address @precond isCellBindingAllowedreturns<TRUE/>
*/
css::uno::Reference< css::form::binding::XValueBinding >
createCellBindingFromStringAddress( const OUString& _rAddress, bool _bUseIntegerBinding
) const;
/** gets a cell range list source binding for the given address
*/
css::uno::Reference< css::form::binding::XListEntrySource >
createCellListSourceFromStringAddress( const OUString& _rAddress ) const;
/** creates a string representation for the given value binding's address
/** returns the current binding of our control model, if any.
*/
css::uno::Reference< css::form::binding::XValueBinding >
getCurrentBinding( ) const;
/** returns the current external list source of the control model, if any
*/
css::uno::Reference< css::form::binding::XListEntrySource >
getCurrentListSource( ) const;
/** sets a new binding for our control model @precond thecontrolmodelisbindable(whichisimpliedby<member>isCellBindingAllowed</member> returning<TRUE/>)
*/ void setBinding( const css::uno::Reference< css::form::binding::XValueBinding >& _rxBinding
);
/** sets a list source for our control model @precond thecontrolmodelisalistsink(whichisimpliedby<member>isListCellRangeAllowed</member> returning<TRUE/>)
*/ void setListSource( const css::uno::Reference< css::form::binding::XListEntrySource >& _rxSource
);
/** checks whether it's possible to bind the control model to a spreadsheet cell
*/ bool isCellBindingAllowed( ) const;
/** checks whether within the given document, it's possible to bind control models to spreadsheet cells
*/ staticbool isCellBindingAllowed( const css::uno::Reference< css::frame::XModel >& _rxDocument
);
/** checks whether it's possible to bind the control model to a range of spreadsheet cells supplyingthelistentries
*/ bool isListCellRangeAllowed( ) const;
/** checks whether within the given document, it's possible to bind the control model to a range of spreadsheetcellssupplyingthelistentries
*/ staticbool isListCellRangeAllowed( const css::uno::Reference< css::frame::XModel >& _rxDocument
);
/** checks whether a given binding is a spreadsheet cell binding
*/ staticbool isCellBinding( const css::uno::Reference< css::form::binding::XValueBinding >& _rxBinding
);
/** checks whether a given binding is a spreadsheet cell binding, exchanging integervalues
*/ staticbool isCellIntegerBinding( const css::uno::Reference< css::form::binding::XValueBinding >& _rxBinding
);
/** checks whether a given list source is a spreadsheet cell list source
*/ staticbool isCellRangeListSource( const css::uno::Reference< css::form::binding::XListEntrySource >& _rxSource
);
private: /** creates an address object from a string representation of a cell address
*/ bool convertStringAddress( const OUString& _rAddressDescription,
css::table::CellAddress& /* [out] */ _rAddress
) const;
/** creates an address range object from a string representation of a cell range address
*/ bool convertStringAddress( const OUString& _rAddressDescription,
css::table::CellRangeAddress& /* [out] */ _rAddress
) const;
/** determines if our document is a spreadsheet document, *and* can supply thegivenservice
*/ bool isSpreadsheetDocumentWhichSupplies( const OUString& _rService ) const;
/** determines if our document is a spreadsheet document, *and* can supply thegivenservice
*/ staticbool isSpreadsheetDocumentWhichSupplies( const css::uno::Reference< css::sheet::XSpreadsheetDocument >& _rxDocument, const OUString& _rService
);
/** checks whether a given component supports a given service
*/ staticbool doesComponentSupport( const css::uno::Reference< css::uno::XInterface >& _rxComponent, const OUString& _rService
);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.