22#include <com/sun/star/frame/XModel.hpp>
23#include <com/sun/star/beans/XPropertySet.hpp>
24#include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
25#include <com/sun/star/table/CellAddress.hpp>
26#include <com/sun/star/table/CellRangeAddress.hpp>
27#include <com/sun/star/form/binding/XValueBinding.hpp>
28#include <com/sun/star/form/binding/XListEntrySource.hpp>
29#include <com/sun/star/sheet/XSpreadsheet.hpp>
39 css::uno::Reference< css::beans::XPropertySet >
41 css::uno::Reference< css::sheet::XSpreadsheetDocument >
50 const css::uno::Reference< css::beans::XPropertySet >& _rxControlModel,
51 const css::uno::Reference< css::frame::XModel >& _rxContextDocument
60 const css::uno::Reference< css::frame::XModel >& _rxContextDocument
67 css::uno::Reference< css::form::binding::XValueBinding >
69 const OUString& _rAddress,
70 bool _bSupportIntegerExchange
76 css::uno::Reference< css::form::binding::XValueBinding >
78 const css::table::CellAddress& _rAddress,
79 bool _bSupportIntegerExchange
84 css::uno::Reference< css::form::binding::XListEntrySource >
97 const css::uno::Reference< css::form::binding::XValueBinding >& _rxBinding
109 const css::uno::Reference< css::form::binding::XValueBinding >& _rxBinding,
110 css::table::CellAddress& _rAddress
124 const css::uno::Reference< css::form::binding::XListEntrySource >& _rxSource
129 css::uno::Reference< css::form::binding::XValueBinding >
134 css::uno::Reference< css::form::binding::XListEntrySource >
143 const css::uno::Reference< css::form::binding::XValueBinding >& _rxBinding
152 const css::uno::Reference< css::form::binding::XListEntrySource >& _rxSource
172 const css::uno::Reference< css::form::binding::XValueBinding >& _rxBinding
179 const css::uno::Reference< css::form::binding::XValueBinding >& _rxBinding
185 const css::uno::Reference< css::form::binding::XListEntrySource >& _rxSource
192 css::uno::Reference< css::sheet::XSpreadsheet >& _out_rxSheet
199 const OUString& _rAddressDescription,
200 css::table::CellAddress& _rAddress
206 const OUString& _rAddressDescription,
207 css::table::CellRangeAddress& _rAddress
218 const css::uno::Reference< css::uno::XInterface >& _rxComponent,
219 const OUString& _rService
232 css::uno::Reference< css::uno::XInterface >
234 const OUString& _rService,
235 const OUString& _rArgumentName,
236 const css::uno::Any& _rArgumentValue
260 const OUString& _rInputProperty,
261 const css::uno::Any& _rInputValue,
262 const OUString& _rOutputProperty,
263 css::uno::Any& _rOutputValue,
encapsulates functionality related to binding a form control to a spreadsheet cell
sal_Int16 getControlSheetIndex(css::uno::Reference< css::sheet::XSpreadsheet > &_out_rxSheet) const
retrieves the index of the sheet which our control belongs to
static bool isCellIntegerBinding(const css::uno::Reference< css::form::binding::XValueBinding > &_rxBinding)
checks whether a given binding is a spreadsheet cell binding, exchanging integer values
static bool isCellRangeListSource(const css::uno::Reference< css::form::binding::XListEntrySource > &_rxSource)
checks whether a given list source is a spreadsheet cell list source
OUString getStringAddressFromCellBinding(const css::uno::Reference< css::form::binding::XValueBinding > &_rxBinding) const
creates a string representation for the given value binding's address
css::uno::Reference< css::form::binding::XValueBinding > createCellBindingFromStringAddress(const OUString &_rAddress, bool _bSupportIntegerExchange) const
gets a cell binding for the given address @precond isCellBindingAllowed returns <TRUE>
css::uno::Reference< css::form::binding::XValueBinding > getCurrentBinding() const
returns the current binding of our control model, if any.
bool isCellIntegerBindingAllowed() const
checks whether it's possible to bind the control model to a spreadsheet cell, with exchanging integer...
static bool isCellBinding(const css::uno::Reference< css::form::binding::XValueBinding > &_rxBinding)
checks whether a given binding is a spreadsheet cell binding
bool getAddressFromCellBinding(const css::uno::Reference< css::form::binding::XValueBinding > &_rxBinding, css::table::CellAddress &_rAddress) const
creates an address object for the given value binding's address
bool doConvertAddressRepresentations(const OUString &_rInputProperty, const css::uno::Any &_rInputValue, const OUString &_rOutputProperty, css::uno::Any &_rOutputValue, bool _bIsRange) const
converts an address representation into another one
bool isCellBindingAllowed() const
checks whether it's possible to bind the control model to a spreadsheet cell
static bool doesComponentSupport(const css::uno::Reference< css::uno::XInterface > &_rxComponent, const OUString &_rService)
checks whether a given component supports a given service
static bool isSpreadsheetDocument(const css::uno::Reference< css::frame::XModel > &_rxContextDocument)
determines whether the given model is a spreadsheet document model
bool isSpreadsheetDocumentWhichSupplies(const OUString &_rService) const
determines if our document is a spreadsheet document, and can supply the given service
bool convertStringAddress(const OUString &_rAddressDescription, css::table::CellRangeAddress &_rAddress) const
creates an address range object from a string representation of a cell range address
void setListSource(const css::uno::Reference< css::form::binding::XListEntrySource > &_rxSource)
sets a list source for our control model @precond the control model is a list sink (which is implied ...
css::uno::Reference< css::form::binding::XValueBinding > createCellBindingFromAddress(const css::table::CellAddress &_rAddress, bool _bSupportIntegerExchange) const
creates a cell binding (supporting integer exchange, if requested) for the given address object
css::uno::Reference< css::uno::XInterface > createDocumentDependentInstance(const OUString &_rService, const OUString &_rArgumentName, const css::uno::Any &_rArgumentValue) const
uses the document (it's factory interface, respectively) to create a component instance
css::uno::Reference< css::form::binding::XListEntrySource > getCurrentListSource() const
returns the current external list source of the control model, if any
CellBindingHelper(const css::uno::Reference< css::beans::XPropertySet > &_rxControlModel, const css::uno::Reference< css::frame::XModel > &_rxContextDocument)
ctor
css::uno::Reference< css::sheet::XSpreadsheetDocument > m_xDocument
void setBinding(const css::uno::Reference< css::form::binding::XValueBinding > &_rxBinding)
sets a new binding for our control model @precond the control model is bindable (which is implied by ...
OUString getStringAddressFromCellListSource(const css::uno::Reference< css::form::binding::XListEntrySource > &_rxSource) const
creates a string representation for the given list source's range address
bool convertStringAddress(const OUString &_rAddressDescription, css::table::CellAddress &_rAddress) const
creates an address object from a string representation of a cell address
bool isListCellRangeAllowed() const
checks whether it's possible to bind the control model to range of spreadsheet cells supplying the li...
css::uno::Reference< css::beans::XPropertySet > m_xControlModel
css::uno::Reference< css::form::binding::XListEntrySource > createCellListSourceFromStringAddress(const OUString &_rAddress) const
gets a cell range list source binding for the given address
a property handler for any virtual string properties