LibreOffice Module forms (master) 1
|
#include <formoperations.hxx>
Classes | |
class | impl_appendFilterByColumn_throw |
class | impl_appendOrderByColumn_throw |
struct | MethodAccess |
class | MethodGuard |
Public Member Functions | |
FormOperations (const css::uno::Reference< css::uno::XComponentContext > &_rxContext) | |
void | enterMethod (MethodAccess) const |
void | leaveMethod (MethodAccess) const |
css::uno::Reference< css::awt::XWindow > | GetDialogParent () const |
Protected Member Functions | |
virtual | ~FormOperations () override |
virtual void SAL_CALL | initialize (const css::uno::Sequence< css::uno::Any > &aArguments) override |
virtual OUString SAL_CALL | getImplementationName () override |
virtual sal_Bool SAL_CALL | supportsService (const OUString &ServiceName) override |
virtual css::uno::Sequence< OUString > SAL_CALL | getSupportedServiceNames () override |
virtual css::uno::Reference< css::sdbc::XRowSet > SAL_CALL | getCursor () override |
virtual css::uno::Reference< css::sdbc::XResultSetUpdate > SAL_CALL | getUpdateCursor () override |
virtual css::uno::Reference< css::form::runtime::XFormController > SAL_CALL | getController () override |
virtual css::uno::Reference< css::form::runtime::XFeatureInvalidation > SAL_CALL | getFeatureInvalidation () override |
virtual void SAL_CALL | setFeatureInvalidation (const css::uno::Reference< css::form::runtime::XFeatureInvalidation > &the_value) override |
virtual css::form::runtime::FeatureState SAL_CALL | getState (::sal_Int16 Feature) override |
virtual sal_Bool SAL_CALL | isEnabled (::sal_Int16 Feature) override |
virtual void SAL_CALL | execute (::sal_Int16 Feature) override |
virtual void SAL_CALL | executeWithArguments (::sal_Int16 Feature, const css::uno::Sequence< css::beans::NamedValue > &Arguments) override |
virtual sal_Bool SAL_CALL | commitCurrentRecord (sal_Bool &RecordInserted) override |
virtual sal_Bool SAL_CALL | commitCurrentControl () override |
virtual sal_Bool SAL_CALL | isInsertionRow () override |
virtual sal_Bool SAL_CALL | isModifiedRow () override |
virtual void SAL_CALL | cursorMoved (const css::lang::EventObject &event) override |
virtual void SAL_CALL | rowChanged (const css::lang::EventObject &event) override |
virtual void SAL_CALL | rowSetChanged (const css::lang::EventObject &event) override |
virtual void SAL_CALL | modified (const css::lang::EventObject &_rSource) override |
virtual void SAL_CALL | propertyChange (const css::beans::PropertyChangeEvent &evt) override |
virtual void SAL_CALL | disposing (const css::lang::EventObject &Source) override |
virtual void SAL_CALL | disposing () override |
Private Member Functions | |
void | createWithFormController (const css::uno::Reference< css::form::runtime::XFormController > &_rxController) |
void | createWithForm (const css::uno::Reference< css::form::XForm > &_rxForm) |
void | impl_checkDisposed_throw () const |
checks whether the instance is already disposed, and throws an exception if so More... | |
void | impl_initFromController_throw () |
initializes the instance after m_xController has been set @precond m_xController is not <NULL> More... | |
void | impl_initFromForm_throw () |
initializes the instance after m_xCursor has been set @precond m_xCursor is not <NULL> More... | |
void | impl_invalidateAllSupportedFeatures_nothrow (MethodGuard &_rClearForCallback) const |
invalidate the full palette of features which we know More... | |
void | impl_invalidateModifyDependentFeatures_nothrow (MethodGuard &_rClearForCallback) const |
invalidate the features which depend on the "modified" state of the current control of our controller More... | |
void | impl_ensureInitializedParser_nothrow () |
ensures that our parse is initialized, or at least that we attempted to do so @precond we're not disposed More... | |
void | impl_disposeParser_nothrow () |
disposes our parser, if we have one More... | |
bool | impl_canMoveLeft_throw () const |
determines whether our cursor can be moved left @precond hasCursor() More... | |
bool | impl_canMoveRight_throw () const |
determines whether our cursor can be moved right @precond hasCursor() More... | |
bool | impl_isInsertionRow_throw () const |
determines whether we're positioned on the insertion row More... | |
sal_Int32 | impl_getRowCount_throw () const |
retrieves the RowCount property of the form More... | |
bool | impl_isRowCountFinal_throw () const |
retrieves the RowCountFinal property of the form More... | |
bool | impl_isModifiedRow_throw () const |
retrieves the IsModified property of the form More... | |
bool | impl_isParseable_throw () const |
determines whether we can parse the query of our form More... | |
bool | impl_hasFilterOrOrder_throw () const |
determines if we have an active filter or order condition More... | |
bool | impl_isInsertOnlyForm_throw () const |
determines whether our form is in "insert-only" mode More... | |
css::uno::Reference< css::beans::XPropertySet > | impl_getCurrentBoundField_nothrow () const |
retrieves the column to which the current control of our controller is bound @precond m_xController.is() More... | |
css::uno::Reference< css::awt::XControlModel > | impl_getCurrentControlModel_throw () const |
returns the control model of the current control More... | |
bool | impl_hasCursor_nothrow () const |
determines if we have a valid cursor More... | |
void | impl_moveLeft_throw () const |
moves our cursor one position to the left, caring for different possible cursor states. More... | |
void | impl_moveRight_throw () const |
moves our cursor one position to the right, caring for different possible cursor states. More... | |
bool | impl_commitCurrentRecord_throw (sal_Bool *_pRecordInserted=nullptr) const |
impl-version of commitCurrentRecord, which can be called without caring for an output parameter, and within const-contexts More... | |
bool | impl_commitCurrentControl_throw () const |
impl-version of commitCurrentControl, which can be called in const-contexts More... | |
void | impl_resetAllControls_nothrow () const |
resets all control models in our own form More... | |
void | impl_executeAutoSort_throw (bool _bUp) const |
executes the "auto sort ascending" and "auto sort descending" features More... | |
void | impl_executeAutoFilter_throw () const |
executes the "auto filter" feature More... | |
void | impl_executeFilterOrSort_throw (bool _bFilter) const |
executes the interactive sort resp. filter feature More... | |
template<typename FunctObj > | |
void | impl_doActionInSQLContext_throw (FunctObj f, TranslateId pErrorResourceId) const |
calls a (member) function, catches SQLExceptions, extends them with additional context information, and rethrows them More... | |
FormOperations (const FormOperations &)=delete | |
FormOperations & | operator= (const FormOperations &)=delete |
Static Private Member Functions | |
static sal_Int32 | impl_gridView2ModelPos_nothrow (const css::uno::Reference< css::container::XIndexAccess > &_rxColumns, sal_Int16 _nViewPos) |
determines the model position from a grid control column's view position More... | |
Private Attributes | |
css::uno::Reference< css::uno::XComponentContext > | m_xContext |
css::uno::Reference< css::form::runtime::XFormController > | m_xController |
css::uno::Reference< css::sdbc::XRowSet > | m_xCursor |
css::uno::Reference< css::sdbc::XResultSetUpdate > | m_xUpdateCursor |
css::uno::Reference< css::beans::XPropertySet > | m_xCursorProperties |
css::uno::Reference< css::form::XLoadable > | m_xLoadableForm |
css::uno::Reference< css::form::runtime::XFeatureInvalidation > | m_xFeatureInvalidation |
css::uno::Reference< css::sdb::XSingleSelectQueryComposer > | m_xParser |
bool | m_bInitializedParser |
bool | m_bActiveControlModified |
bool | m_bConstructed |
tools::Long | m_nMethodNestingLevel |
Additional Inherited Members | |
Protected Attributes inherited from cppu::BaseMutex | |
mutable::osl::Mutex | m_aMutex |
Definition at line 55 of file formoperations.hxx.
|
explicit |
|
overrideprotectedvirtual |
Definition at line 128 of file formoperations.cxx.
|
privatedelete |
|
overrideprotectedvirtual |
Definition at line 885 of file formoperations.cxx.
|
overrideprotectedvirtual |
Definition at line 848 of file formoperations.cxx.
|
private |
Definition at line 1147 of file formoperations.cxx.
|
private |
Definition at line 1135 of file formoperations.cxx.
|
overrideprotectedvirtual |
Definition at line 968 of file formoperations.cxx.
|
overrideprotectedvirtual |
Definition at line 1061 of file formoperations.cxx.
References DBG_UNHANDLED_EXCEPTION, Exception, m_aMutex, PROPERTY_ISMODIFIED, and PROPERTY_ISNEW.
|
overrideprotectedvirtual |
|
inline |
Definition at line 84 of file formoperations.hxx.
References impl_checkDisposed_throw(), cppu::BaseMutex::m_aMutex, and m_nMethodNestingLevel.
Referenced by frm::FormOperations::MethodGuard::MethodGuard().
|
overrideprotectedvirtual |
Definition at line 535 of file formoperations.cxx.
References aEvent, Any, Exception, Application::GetFrameWeld(), frm::ResourceManager::loadString(), nCount, comphelper::IndexAccessIterator::Next(), PROPERTY_APPLYFILTER, PROPERTY_FILTER, PROPERTY_HAVINGCLAUSE, PROPERTY_SORT, and SAL_WARN.
|
overrideprotectedvirtual |
Definition at line 791 of file formoperations.cxx.
References aArguments, Exception, frm::ResourceManager::loadString(), and nCount.
|
overrideprotectedvirtual |
Definition at line 181 of file formoperations.cxx.
|
overrideprotectedvirtual |
Definition at line 168 of file formoperations.cxx.
css::uno::Reference< css::awt::XWindow > frm::FormOperations::GetDialogParent | ( | ) | const |
Definition at line 1661 of file formoperations.cxx.
|
overrideprotectedvirtual |
Definition at line 188 of file formoperations.cxx.
|
overrideprotectedvirtual |
Definition at line 153 of file formoperations.cxx.
|
overrideprotectedvirtual |
Definition at line 202 of file formoperations.cxx.
References nCount, PROPERTY_ACTIVECOMMAND, PROPERTY_APPLYFILTER, PROPERTY_FILTER, PROPERTY_HAVINGCLAUSE, and PROPERTY_SEARCHABLE.
|
overrideprotectedvirtual |
Definition at line 163 of file formoperations.cxx.
|
overrideprotectedvirtual |
Definition at line 174 of file formoperations.cxx.
|
private |
determines whether our cursor can be moved left @precond hasCursor()
Definition at line 1277 of file formoperations.cxx.
|
private |
determines whether our cursor can be moved right @precond hasCursor()
Definition at line 1286 of file formoperations.cxx.
|
private |
checks whether the instance is already disposed, and throws an exception if so
Definition at line 1098 of file formoperations.cxx.
Referenced by enterMethod().
|
private |
impl-version of commitCurrentControl, which can be called in const-contexts
@precond our mutex is locked
Definition at line 892 of file formoperations.cxx.
References DBG_ASSERT, DBG_UNHANDLED_EXCEPTION, and Exception.
|
private |
impl-version of commitCurrentRecord, which can be called without caring for an output parameter, and within const-contexts
@precond our mutex is locked
Definition at line 857 of file formoperations.cxx.
References DBG_ASSERT.
|
private |
disposes our parser, if we have one
Definition at line 1249 of file formoperations.cxx.
References Exception, m_xParser, PROPERTY_ACTIVECOMMAND, PROPERTY_FILTER, PROPERTY_HAVINGCLAUSE, PROPERTY_SORT, and TOOLS_WARN_EXCEPTION.
|
private |
calls a (member) function, catches SQLExceptions, extends them with additional context information, and rethrows them
f | a functionoid with no arguments to do the work |
pErrorResourceId | the id of the resources string to use as error message |
Definition at line 1729 of file formoperations.cxx.
References Exception, and frm::ResourceManager::loadString().
|
private |
ensures that our parse is initialized, or at least that we attempted to do so @precond we're not disposed
Definition at line 1192 of file formoperations.cxx.
References Exception, m_xParser, PROPERTY_ACTIVECOMMAND, PROPERTY_ESCAPE_PROCESSING, PROPERTY_FILTER, PROPERTY_HAVINGCLAUSE, PROPERTY_SORT, TOOLS_WARN_EXCEPTION, and xFactory.
|
private |
executes the "auto filter" feature
Definition at line 1585 of file formoperations.cxx.
References Any, Exception, Application::GetFrameWeld(), m_xParser, PROPERTY_APPLYFILTER, PROPERTY_FILTER, PROPERTY_HAVINGCLAUSE, and TOOLS_WARN_EXCEPTION.
|
private |
executes the "auto sort ascending" and "auto sort descending" features
Definition at line 1522 of file formoperations.cxx.
References Any, Exception, Application::GetFrameWeld(), m_xParser, PROPERTY_SORT, and TOOLS_WARN_EXCEPTION.
|
private |
executes the interactive sort resp. filter feature
Definition at line 1679 of file formoperations.cxx.
References Any, Exception, Application::GetFrameWeld(), m_xContext, m_xParser, PROPERTY_FILTER, PROPERTY_HAVINGCLAUSE, PROPERTY_SORT, and RET_OK.
|
private |
retrieves the column to which the current control of our controller is bound @precond m_xController.is()
Definition at line 1375 of file formoperations.cxx.
References DBG_UNHANDLED_EXCEPTION, Exception, and PROPERTY_BOUNDFIELD.
|
private |
returns the control model of the current control
If the current control is a grid control, then the returned model is the model of the current column in the grid.
@precond m_xController.is()
Definition at line 1351 of file formoperations.cxx.
|
private |
retrieves the RowCount property of the form
Definition at line 1313 of file formoperations.cxx.
References PROPERTY_ROWCOUNT.
|
staticprivate |
determines the model position from a grid control column's view position
A grid control can have columns which are currently hidden, so the index of a column in the view is not necessarily the same as its index in the model.
Definition at line 1399 of file formoperations.cxx.
References col, DBG_UNHANDLED_EXCEPTION, Exception, and PROPERTY_HIDDEN.
|
inlineprivate |
determines if we have a valid cursor
Definition at line 232 of file formoperations.hxx.
References m_xCursorProperties.
|
private |
determines if we have an active filter or order condition
Definition at line 1337 of file formoperations.cxx.
References m_xParser.
|
private |
initializes the instance after m_xController has been set @precond m_xController is not <NULL>
Definition at line 1105 of file formoperations.cxx.
|
private |
initializes the instance after m_xCursor has been set @precond m_xCursor is not <NULL>
Definition at line 1119 of file formoperations.cxx.
References PROPERTY_ISMODIFIED, and PROPERTY_ISNEW.
|
private |
invalidate the full palette of features which we know
Definition at line 1159 of file formoperations.cxx.
References frm::FormOperations::MethodGuard::clear().
|
private |
invalidate the features which depend on the "modified" state of the current control of our controller
Definition at line 1171 of file formoperations.cxx.
References frm::FormOperations::MethodGuard::clear().
|
private |
determines whether we're positioned on the insertion row
Definition at line 1307 of file formoperations.cxx.
References PROPERTY_ISNEW.
|
private |
determines whether our form is in "insert-only" mode
Definition at line 1345 of file formoperations.cxx.
References PROPERTY_INSERTONLY.
|
private |
retrieves the IsModified property of the form
Definition at line 1324 of file formoperations.cxx.
References PROPERTY_ISMODIFIED.
|
private |
determines whether we can parse the query of our form
Definition at line 1330 of file formoperations.cxx.
References m_xParser.
|
private |
retrieves the RowCountFinal property of the form
Definition at line 1318 of file formoperations.cxx.
References PROPERTY_ROWCOUNTFINAL.
|
private |
moves our cursor one position to the left, caring for different possible cursor states.
Before the movement is done, the current row is saved, if necessary.
@precond canMoveLeft()
Definition at line 1433 of file formoperations.cxx.
|
private |
moves our cursor one position to the right, caring for different possible cursor states.
Before the movement is done, the current row is saved, if necessary.
@precond canMoveRight()
Definition at line 1467 of file formoperations.cxx.
|
private |
resets all control models in our own form
Definition at line 1494 of file formoperations.cxx.
References DBG_UNHANDLED_EXCEPTION, Exception, i, and nCount.
|
overrideprotectedvirtual |
Definition at line 132 of file formoperations.cxx.
References xController.
|
overrideprotectedvirtual |
Definition at line 386 of file formoperations.cxx.
|
overrideprotectedvirtual |
Definition at line 936 of file formoperations.cxx.
References Exception.
|
overrideprotectedvirtual |
Definition at line 952 of file formoperations.cxx.
References Exception.
|
inline |
Definition at line 93 of file formoperations.hxx.
References cppu::BaseMutex::m_aMutex, and m_nMethodNestingLevel.
Referenced by frm::FormOperations::MethodGuard::clear().
|
overrideprotectedvirtual |
Definition at line 989 of file formoperations.cxx.
|
privatedelete |
|
overrideprotectedvirtual |
Definition at line 1002 of file formoperations.cxx.
References Exception, m_xParser, PROPERTY_ACTIVECOMMAND, PROPERTY_FILTER, PROPERTY_HAVINGCLAUSE, PROPERTY_ISMODIFIED, PROPERTY_ISNEW, PROPERTY_SORT, and TOOLS_WARN_EXCEPTION.
|
overrideprotectedvirtual |
Definition at line 977 of file formoperations.cxx.
|
overrideprotectedvirtual |
Definition at line 983 of file formoperations.cxx.
|
overrideprotectedvirtual |
Definition at line 195 of file formoperations.cxx.
|
overrideprotectedvirtual |
Definition at line 158 of file formoperations.cxx.
References ServiceName, and cppu::supportsService().
|
private |
Definition at line 72 of file formoperations.hxx.
|
private |
Definition at line 73 of file formoperations.hxx.
|
private |
Definition at line 71 of file formoperations.hxx.
|
mutableprivate |
Definition at line 76 of file formoperations.hxx.
Referenced by enterMethod(), and leaveMethod().
|
private |
Definition at line 62 of file formoperations.hxx.
|
private |
Definition at line 63 of file formoperations.hxx.
|
private |
Definition at line 64 of file formoperations.hxx.
|
private |
Definition at line 66 of file formoperations.hxx.
Referenced by impl_hasCursor_nothrow().
|
private |
Definition at line 68 of file formoperations.hxx.
|
private |
Definition at line 67 of file formoperations.hxx.
|
mutableprivate |
Definition at line 69 of file formoperations.hxx.
Referenced by frm::FormOperations::impl_appendOrderByColumn_throw::operator()(), and frm::FormOperations::impl_appendFilterByColumn_throw::operator()().
|
private |
Definition at line 65 of file formoperations.hxx.