1*2d785d7eSAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*2d785d7eSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*2d785d7eSAndrew Rist * or more contributor license agreements. See the NOTICE file 5*2d785d7eSAndrew Rist * distributed with this work for additional information 6*2d785d7eSAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*2d785d7eSAndrew Rist * to you under the Apache License, Version 2.0 (the 8*2d785d7eSAndrew Rist * "License"); you may not use this file except in compliance 9*2d785d7eSAndrew Rist * with the License. You may obtain a copy of the License at 10cdf0e10cSrcweir * 11*2d785d7eSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12cdf0e10cSrcweir * 13*2d785d7eSAndrew Rist * Unless required by applicable law or agreed to in writing, 14*2d785d7eSAndrew Rist * software distributed under the License is distributed on an 15*2d785d7eSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*2d785d7eSAndrew Rist * KIND, either express or implied. See the License for the 17*2d785d7eSAndrew Rist * specific language governing permissions and limitations 18*2d785d7eSAndrew Rist * under the License. 19cdf0e10cSrcweir * 20*2d785d7eSAndrew Rist *************************************************************/ 21*2d785d7eSAndrew Rist 22*2d785d7eSAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #ifndef FORMS_FORMOPERATIONS_HXX 25cdf0e10cSrcweir #define FORMS_FORMOPERATIONS_HXX 26cdf0e10cSrcweir 27cdf0e10cSrcweir /** === begin UNO includes === **/ 28cdf0e10cSrcweir #include <com/sun/star/form/runtime/XFormOperations.hpp> 29cdf0e10cSrcweir #include <com/sun/star/lang/XServiceInfo.hpp> 30cdf0e10cSrcweir #include <com/sun/star/form/XForm.hpp> 31cdf0e10cSrcweir #include <com/sun/star/beans/XPropertySet.hpp> 32cdf0e10cSrcweir #include <com/sun/star/form/XLoadable.hpp> 33cdf0e10cSrcweir #include <com/sun/star/sdb/XSingleSelectQueryComposer.hpp> 34cdf0e10cSrcweir #include <com/sun/star/util/XModifyListener.hpp> 35cdf0e10cSrcweir #include <com/sun/star/container/XIndexAccess.hpp> 36cdf0e10cSrcweir #include <com/sun/star/lang/XInitialization.hpp> 37cdf0e10cSrcweir /** === end UNO includes === **/ 38cdf0e10cSrcweir 39cdf0e10cSrcweir #include <comphelper/componentcontext.hxx> 40cdf0e10cSrcweir 41cdf0e10cSrcweir #include <cppuhelper/basemutex.hxx> 42cdf0e10cSrcweir #include <cppuhelper/compbase6.hxx> 43cdf0e10cSrcweir 44cdf0e10cSrcweir //........................................................................ 45cdf0e10cSrcweir namespace frm 46cdf0e10cSrcweir { 47cdf0e10cSrcweir //........................................................................ 48cdf0e10cSrcweir 49cdf0e10cSrcweir //==================================================================== 50cdf0e10cSrcweir //= FormOperations 51cdf0e10cSrcweir //==================================================================== 52cdf0e10cSrcweir typedef ::cppu::WeakComponentImplHelper6 < ::com::sun::star::form::runtime::XFormOperations 53cdf0e10cSrcweir , ::com::sun::star::lang::XInitialization 54cdf0e10cSrcweir , ::com::sun::star::lang::XServiceInfo 55cdf0e10cSrcweir , ::com::sun::star::beans::XPropertyChangeListener 56cdf0e10cSrcweir , ::com::sun::star::util::XModifyListener 57cdf0e10cSrcweir , ::com::sun::star::sdbc::XRowSetListener 58cdf0e10cSrcweir > FormOperations_Base; 59cdf0e10cSrcweir 60cdf0e10cSrcweir class FormOperations :public ::cppu::BaseMutex 61cdf0e10cSrcweir ,public FormOperations_Base 62cdf0e10cSrcweir { 63cdf0e10cSrcweir public: 64cdf0e10cSrcweir class MethodGuard; 65cdf0e10cSrcweir 66cdf0e10cSrcweir private: 67cdf0e10cSrcweir ::comphelper::ComponentContext m_aContext; 68cdf0e10cSrcweir ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormController > m_xController; 69cdf0e10cSrcweir ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > m_xCursor; 70cdf0e10cSrcweir ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetUpdate > m_xUpdateCursor; 71cdf0e10cSrcweir ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xCursorProperties; 72cdf0e10cSrcweir ::com::sun::star::uno::Reference< ::com::sun::star::form::XLoadable > m_xLoadableForm; 73cdf0e10cSrcweir ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFeatureInvalidation > 74cdf0e10cSrcweir m_xFeatureInvalidation; 75cdf0e10cSrcweir mutable ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSingleSelectQueryComposer > 76cdf0e10cSrcweir m_xParser; 77cdf0e10cSrcweir 78cdf0e10cSrcweir bool m_bInitializedParser; 79cdf0e10cSrcweir bool m_bActiveControlModified; 80cdf0e10cSrcweir bool m_bConstructed; 81cdf0e10cSrcweir #ifdef DBG_UTIL 82cdf0e10cSrcweir mutable long 83cdf0e10cSrcweir m_nMethodNestingLevel; 84cdf0e10cSrcweir #endif 85cdf0e10cSrcweir 86cdf0e10cSrcweir public: 87cdf0e10cSrcweir FormOperations( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxContext ); 88cdf0e10cSrcweir 89cdf0e10cSrcweir // XServiceInfo - static versions 90cdf0e10cSrcweir static ::rtl::OUString getImplementationName_Static( ) throw(::com::sun::star::uno::RuntimeException); 91cdf0e10cSrcweir static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static( ) throw(::com::sun::star::uno::RuntimeException); 92cdf0e10cSrcweir static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL 93cdf0e10cSrcweir Create(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >&); 94cdf0e10cSrcweir MethodAccessfrm::FormOperations::MethodAccess95cdf0e10cSrcweir struct MethodAccess { friend class MethodGuard; private: MethodAccess() { } }; 96cdf0e10cSrcweir enterMethod(MethodAccess) const97cdf0e10cSrcweir inline void enterMethod( MethodAccess ) const 98cdf0e10cSrcweir { 99cdf0e10cSrcweir m_aMutex.acquire(); 100cdf0e10cSrcweir impl_checkDisposed_throw(); 101cdf0e10cSrcweir #ifdef DBG_UTIL 102cdf0e10cSrcweir ++m_nMethodNestingLevel; 103cdf0e10cSrcweir #endif 104cdf0e10cSrcweir } 105cdf0e10cSrcweir leaveMethod(MethodAccess) const106cdf0e10cSrcweir inline void leaveMethod( MethodAccess ) const 107cdf0e10cSrcweir { 108cdf0e10cSrcweir m_aMutex.release(); 109cdf0e10cSrcweir #ifdef DBG_UTIL 110cdf0e10cSrcweir --m_nMethodNestingLevel; 111cdf0e10cSrcweir #endif 112cdf0e10cSrcweir } 113cdf0e10cSrcweir 114cdf0e10cSrcweir protected: 115cdf0e10cSrcweir virtual ~FormOperations(); 116cdf0e10cSrcweir 117cdf0e10cSrcweir // XInitialization 118cdf0e10cSrcweir virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException); 119cdf0e10cSrcweir 120cdf0e10cSrcweir // XServiceInfo 121cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException); 122cdf0e10cSrcweir virtual ::sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException); 123cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException); 124cdf0e10cSrcweir 125cdf0e10cSrcweir // XFormOperations 126cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > SAL_CALL getCursor() throw (::com::sun::star::uno::RuntimeException); 127cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetUpdate > SAL_CALL getUpdateCursor() throw (::com::sun::star::uno::RuntimeException); 128cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormController > SAL_CALL getController() throw (::com::sun::star::uno::RuntimeException); 129cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFeatureInvalidation > SAL_CALL getFeatureInvalidation() throw (::com::sun::star::uno::RuntimeException); 130cdf0e10cSrcweir virtual void SAL_CALL setFeatureInvalidation(const ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFeatureInvalidation > & the_value) throw (::com::sun::star::uno::RuntimeException); 131cdf0e10cSrcweir virtual ::com::sun::star::form::runtime::FeatureState SAL_CALL getState(::sal_Int16 Feature) throw (::com::sun::star::uno::RuntimeException); 132cdf0e10cSrcweir virtual ::sal_Bool SAL_CALL isEnabled(::sal_Int16 Feature) throw (::com::sun::star::uno::RuntimeException); 133cdf0e10cSrcweir virtual void SAL_CALL execute(::sal_Int16 Feature) throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::sdbc::SQLException, ::com::sun::star::lang::WrappedTargetException); 134cdf0e10cSrcweir virtual void SAL_CALL executeWithArguments(::sal_Int16 Feature, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& Arguments) throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::sdbc::SQLException, ::com::sun::star::lang::WrappedTargetException); 135cdf0e10cSrcweir virtual ::sal_Bool SAL_CALL commitCurrentRecord(::sal_Bool & RecordInserted) throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::sdbc::SQLException); 136cdf0e10cSrcweir virtual ::sal_Bool SAL_CALL commitCurrentControl() throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::sdbc::SQLException); 137cdf0e10cSrcweir virtual ::sal_Bool SAL_CALL isInsertionRow() throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::WrappedTargetException); 138cdf0e10cSrcweir virtual ::sal_Bool SAL_CALL isModifiedRow() throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::WrappedTargetException); 139cdf0e10cSrcweir 140cdf0e10cSrcweir // XRowSetListener 141cdf0e10cSrcweir virtual void SAL_CALL cursorMoved( const ::com::sun::star::lang::EventObject& event ) throw (::com::sun::star::uno::RuntimeException); 142cdf0e10cSrcweir virtual void SAL_CALL rowChanged( const ::com::sun::star::lang::EventObject& event ) throw (::com::sun::star::uno::RuntimeException); 143cdf0e10cSrcweir virtual void SAL_CALL rowSetChanged( const ::com::sun::star::lang::EventObject& event ) throw (::com::sun::star::uno::RuntimeException); 144cdf0e10cSrcweir 145cdf0e10cSrcweir // XModifyListener 146cdf0e10cSrcweir virtual void SAL_CALL modified( const ::com::sun::star::lang::EventObject& _rSource ) throw( ::com::sun::star::uno::RuntimeException ); 147cdf0e10cSrcweir 148cdf0e10cSrcweir // XPropertyChangeListener 149cdf0e10cSrcweir virtual void SAL_CALL propertyChange( const ::com::sun::star::beans::PropertyChangeEvent& evt ) throw (::com::sun::star::uno::RuntimeException); 150cdf0e10cSrcweir 151cdf0e10cSrcweir // XEventListener 152cdf0e10cSrcweir virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException); 153cdf0e10cSrcweir 154cdf0e10cSrcweir // XComponent/OComponentHelper 155cdf0e10cSrcweir virtual void SAL_CALL disposing(); 156cdf0e10cSrcweir 157cdf0e10cSrcweir private: 158cdf0e10cSrcweir // service constructors 159cdf0e10cSrcweir void createWithFormController( const ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormController >& _rxController ); 160cdf0e10cSrcweir void createWithForm( const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm >& _rxForm ); 161cdf0e10cSrcweir 162cdf0e10cSrcweir /** determines whether or not we're already disposed 163cdf0e10cSrcweir */ impl_isDisposed_nothrow() const164cdf0e10cSrcweir inline bool impl_isDisposed_nothrow() const { return !m_xCursor.is(); } 165cdf0e10cSrcweir 166cdf0e10cSrcweir /** checks whether the instance is already disposed, and throws an exception if so 167cdf0e10cSrcweir */ 168cdf0e10cSrcweir void impl_checkDisposed_throw() const; 169cdf0e10cSrcweir 170cdf0e10cSrcweir /** initializes the instance after m_xController has been set 171cdf0e10cSrcweir @precond 172cdf0e10cSrcweir m_xController is not <NULL/> 173cdf0e10cSrcweir */ 174cdf0e10cSrcweir void impl_initFromController_throw(); 175cdf0e10cSrcweir 176cdf0e10cSrcweir /** initializes the instance after m_xCursor has been set 177cdf0e10cSrcweir @precond 178cdf0e10cSrcweir m_xCursor is not <NULL/> 179cdf0e10cSrcweir */ 180cdf0e10cSrcweir void impl_initFromForm_throw(); 181cdf0e10cSrcweir 182cdf0e10cSrcweir /// invalidate the full palette of features which we know 183cdf0e10cSrcweir void impl_invalidateAllSupportedFeatures_nothrow( MethodGuard& _rClearForCallback ) const; 184cdf0e10cSrcweir 185cdf0e10cSrcweir /** invalidate the features which depend on the "modified" state of the current control 186cdf0e10cSrcweir of our controller 187cdf0e10cSrcweir */ 188cdf0e10cSrcweir void impl_invalidateModifyDependentFeatures_nothrow( MethodGuard& _rClearForCallback ) const; 189cdf0e10cSrcweir 190cdf0e10cSrcweir /** ensures that our parse is initialized, or at least that we attempted to do so 191cdf0e10cSrcweir @precond 192cdf0e10cSrcweir we're not disposed 193cdf0e10cSrcweir */ 194cdf0e10cSrcweir void impl_ensureInitializedParser_nothrow(); 195cdf0e10cSrcweir 196cdf0e10cSrcweir /// disposes our parser, if we have one 197cdf0e10cSrcweir void impl_disposeParser_nothrow(); 198cdf0e10cSrcweir 199cdf0e10cSrcweir /** determines whether our cursor can be moved left 200cdf0e10cSrcweir @precond hasCursor() 201cdf0e10cSrcweir */ 202cdf0e10cSrcweir bool impl_canMoveLeft_throw() const; 203cdf0e10cSrcweir 204cdf0e10cSrcweir /** determines whether our cursor can be moved right 205cdf0e10cSrcweir @precond hasCursor() 206cdf0e10cSrcweir */ 207cdf0e10cSrcweir bool impl_canMoveRight_throw() const; 208cdf0e10cSrcweir 209cdf0e10cSrcweir /// determines whether we're positioned on the insertion row 210cdf0e10cSrcweir bool impl_isInsertionRow_throw() const; 211cdf0e10cSrcweir 212cdf0e10cSrcweir /// retrieves the RowCount property of the form 213cdf0e10cSrcweir sal_Int32 impl_getRowCount_throw() const; 214cdf0e10cSrcweir 215cdf0e10cSrcweir /// retrieves the RowCountFinal property of the form 216cdf0e10cSrcweir bool impl_isRowCountFinal_throw() const; 217cdf0e10cSrcweir 218cdf0e10cSrcweir /// retrieves the IsModified property of the form 219cdf0e10cSrcweir bool impl_isModifiedRow_throw() const; 220cdf0e10cSrcweir 221cdf0e10cSrcweir /// determines whether we can parse the query of our form 222cdf0e10cSrcweir bool impl_isParseable_throw() const; 223cdf0e10cSrcweir 224cdf0e10cSrcweir /// determines if we have an active filter or order condition 225cdf0e10cSrcweir bool impl_hasFilterOrOrder_throw() const; 226cdf0e10cSrcweir 227cdf0e10cSrcweir /// determines whether our form is in "insert-only" mode 228cdf0e10cSrcweir bool impl_isInsertOnlyForm_throw() const; 229cdf0e10cSrcweir 230cdf0e10cSrcweir /** retrieces the column to which the current control of our controller is bound 231cdf0e10cSrcweir @precond 232cdf0e10cSrcweir m_xController.is() 233cdf0e10cSrcweir */ 234cdf0e10cSrcweir ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > 235cdf0e10cSrcweir impl_getCurrentBoundField_nothrow( ) const; 236cdf0e10cSrcweir 237cdf0e10cSrcweir /** returns the control model of the current control 238cdf0e10cSrcweir 239cdf0e10cSrcweir If the current control is a grid control, then the returned model is the 240cdf0e10cSrcweir model of the current <em>column</em> in the grid. 241cdf0e10cSrcweir 242cdf0e10cSrcweir @precond 243cdf0e10cSrcweir m_xController.is() 244cdf0e10cSrcweir */ 245cdf0e10cSrcweir ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > 246cdf0e10cSrcweir impl_getCurrentControlModel_throw() const; 247cdf0e10cSrcweir 248cdf0e10cSrcweir /// determines if we have a valid cursor impl_hasCursor_nothrow() const249cdf0e10cSrcweir inline bool impl_hasCursor_nothrow() const { return m_xCursorProperties.is(); } 250cdf0e10cSrcweir 251cdf0e10cSrcweir /** determines the model position from a grid control column's view position 252cdf0e10cSrcweir 253cdf0e10cSrcweir A grid control can have columns which are currently hidden, so the index of a 254cdf0e10cSrcweir column in the view is not necessarily the same as its index in the model. 255cdf0e10cSrcweir */ 256cdf0e10cSrcweir sal_Int16 impl_gridView2ModelPos_nothrow( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess >& _rxColumns, sal_Int16 _nViewPos ) const; 257cdf0e10cSrcweir 258cdf0e10cSrcweir /** moves our cursor one position to the left, caring for different possible 259cdf0e10cSrcweir cursor states. 260cdf0e10cSrcweir 261cdf0e10cSrcweir Before the movement is done, the current row is saved, if necessary. 262cdf0e10cSrcweir 263cdf0e10cSrcweir @precond 264cdf0e10cSrcweir canMoveLeft() 265cdf0e10cSrcweir */ 266cdf0e10cSrcweir bool impl_moveLeft_throw() const; 267cdf0e10cSrcweir 268cdf0e10cSrcweir /** moves our cursor one position to the right, caring for different possible 269cdf0e10cSrcweir cursor states. 270cdf0e10cSrcweir 271cdf0e10cSrcweir Before the movement is done, the current row is saved, if necessary. 272cdf0e10cSrcweir 273cdf0e10cSrcweir @precond 274cdf0e10cSrcweir canMoveRight() 275cdf0e10cSrcweir */ 276cdf0e10cSrcweir bool impl_moveRight_throw( ) const; 277cdf0e10cSrcweir 278cdf0e10cSrcweir /** impl-version of commitCurrentRecord, which can be called without caring for 279cdf0e10cSrcweir an output parameter, and within const-contexts 280cdf0e10cSrcweir 281cdf0e10cSrcweir @precond 282cdf0e10cSrcweir our mutex is locked 283cdf0e10cSrcweir */ 284cdf0e10cSrcweir bool impl_commitCurrentRecord_throw( sal_Bool* _pRecordInserted = NULL ) const; 285cdf0e10cSrcweir 286cdf0e10cSrcweir /** impl-version of commitCurrentControl, which can be called in const-contexts 287cdf0e10cSrcweir 288cdf0e10cSrcweir @precond 289cdf0e10cSrcweir our mutex is locked 290cdf0e10cSrcweir */ 291cdf0e10cSrcweir bool impl_commitCurrentControl_throw() const; 292cdf0e10cSrcweir 293cdf0e10cSrcweir /// resets all control models in our own form 294cdf0e10cSrcweir void impl_resetAllControls_nothrow() const; 295cdf0e10cSrcweir 296cdf0e10cSrcweir /// executes the "auto sort ascending" and "auto sort descending" features 297cdf0e10cSrcweir void impl_executeAutoSort_throw( bool _bUp ) const; 298cdf0e10cSrcweir 299cdf0e10cSrcweir /// executes the "auto filter" feature 300cdf0e10cSrcweir void impl_executeAutoFilter_throw( ) const; 301cdf0e10cSrcweir 302cdf0e10cSrcweir /// executes the interactive sort resp. filter feature 303cdf0e10cSrcweir void impl_executeFilterOrSort_throw( bool _bFilter ) const; 304cdf0e10cSrcweir 305cdf0e10cSrcweir private: 306cdf0e10cSrcweir /// typedef for member method of this class 307cdf0e10cSrcweir typedef void (FormOperations::*Action)( const void* ) const; 308cdf0e10cSrcweir 309cdf0e10cSrcweir /** calls a member function, catches SQLExceptions, extends them with additional context information, 310cdf0e10cSrcweir and rethrows them 311cdf0e10cSrcweir 312cdf0e10cSrcweir @param _pAction 313cdf0e10cSrcweir the member function to call 314cdf0e10cSrcweir @param _pParam 315cdf0e10cSrcweir the parameters to pass to the member function 316cdf0e10cSrcweir @param _nErrorResourceId 317cdf0e10cSrcweir the id of the resources string to use as error message 318cdf0e10cSrcweir */ 319cdf0e10cSrcweir void impl_doActionInSQLContext_throw( Action _pAction, const void* _pParam, sal_uInt16 _nErrorResourceId ) const; 320cdf0e10cSrcweir 321cdf0e10cSrcweir // parameter structure for appendOrderByColumn 322cdf0e10cSrcweir struct param_appendOrderByColumn 323cdf0e10cSrcweir { 324cdf0e10cSrcweir ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > 325cdf0e10cSrcweir xField; 326cdf0e10cSrcweir bool bUp; 327cdf0e10cSrcweir }; 328cdf0e10cSrcweir void impl_appendOrderByColumn_throw( const void* _pActionParam ) const; 329cdf0e10cSrcweir 330cdf0e10cSrcweir // parameter structure for appendFilterByColumn 331cdf0e10cSrcweir struct param_appendFilterByColumn 332cdf0e10cSrcweir { 333cdf0e10cSrcweir ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > 334cdf0e10cSrcweir xField; 335cdf0e10cSrcweir }; 336cdf0e10cSrcweir void impl_appendFilterByColumn_throw( const void* _pActionParam ) const; 337cdf0e10cSrcweir 338cdf0e10cSrcweir private: 339cdf0e10cSrcweir FormOperations(); // never implemented 340cdf0e10cSrcweir FormOperations( const FormOperations& ); // never implemented 341cdf0e10cSrcweir FormOperations& operator=( const FormOperations& ); // never implemented 342cdf0e10cSrcweir 343cdf0e10cSrcweir public: 344cdf0e10cSrcweir class MethodGuard 345cdf0e10cSrcweir { 346cdf0e10cSrcweir FormOperations& m_rOwner; 347cdf0e10cSrcweir bool m_bCleared; 348cdf0e10cSrcweir 349cdf0e10cSrcweir public: MethodGuard(FormOperations & _rOwner)350cdf0e10cSrcweir inline MethodGuard( FormOperations& _rOwner ) 351cdf0e10cSrcweir :m_rOwner( _rOwner ) 352cdf0e10cSrcweir ,m_bCleared( false ) 353cdf0e10cSrcweir { 354cdf0e10cSrcweir m_rOwner.enterMethod( FormOperations::MethodAccess() ); 355cdf0e10cSrcweir } 356cdf0e10cSrcweir ~MethodGuard()357cdf0e10cSrcweir inline ~MethodGuard() 358cdf0e10cSrcweir { 359cdf0e10cSrcweir clear(); 360cdf0e10cSrcweir } 361cdf0e10cSrcweir clear()362cdf0e10cSrcweir inline void clear() 363cdf0e10cSrcweir { 364cdf0e10cSrcweir if ( !m_bCleared ) 365cdf0e10cSrcweir m_rOwner.leaveMethod( FormOperations::MethodAccess() ); 366cdf0e10cSrcweir m_bCleared = true; 367cdf0e10cSrcweir } 368cdf0e10cSrcweir }; 369cdf0e10cSrcweir }; 370cdf0e10cSrcweir 371cdf0e10cSrcweir //........................................................................ 372cdf0e10cSrcweir } // namespace frm 373cdf0e10cSrcweir //........................................................................ 374cdf0e10cSrcweir 375cdf0e10cSrcweir #endif // FORMS_FORMOPERATIONS_HXX 376