12e2212a7SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 32e2212a7SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 42e2212a7SAndrew Rist * or more contributor license agreements. See the NOTICE file 52e2212a7SAndrew Rist * distributed with this work for additional information 62e2212a7SAndrew Rist * regarding copyright ownership. The ASF licenses this file 72e2212a7SAndrew Rist * to you under the Apache License, Version 2.0 (the 82e2212a7SAndrew Rist * "License"); you may not use this file except in compliance 92e2212a7SAndrew Rist * with the License. You may obtain a copy of the License at 10cdf0e10cSrcweir * 112e2212a7SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12cdf0e10cSrcweir * 132e2212a7SAndrew Rist * Unless required by applicable law or agreed to in writing, 142e2212a7SAndrew Rist * software distributed under the License is distributed on an 152e2212a7SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 162e2212a7SAndrew Rist * KIND, either express or implied. See the License for the 172e2212a7SAndrew Rist * specific language governing permissions and limitations 182e2212a7SAndrew Rist * under the License. 19cdf0e10cSrcweir * 202e2212a7SAndrew Rist *************************************************************/ 212e2212a7SAndrew Rist 22cdf0e10cSrcweir #ifndef _SBA_GRID_HXX 23cdf0e10cSrcweir #define _SBA_GRID_HXX 24cdf0e10cSrcweir 25cdf0e10cSrcweir //#include <sdb/tools.hxx> 26cdf0e10cSrcweir 27cdf0e10cSrcweir #ifndef _SVX_FMGRIDCL_HXX 28cdf0e10cSrcweir #include <svx/fmgridcl.hxx> 29cdf0e10cSrcweir #endif 30cdf0e10cSrcweir 31cdf0e10cSrcweir #ifndef _SVX_FMGRIDIF_HXX 32cdf0e10cSrcweir #include <svx/fmgridif.hxx> 33cdf0e10cSrcweir #endif 34cdf0e10cSrcweir 35cdf0e10cSrcweir #ifndef _COM_SUN_STAR_SDB_XSQLQUERYCOMPOSER_HPP_ 36cdf0e10cSrcweir #include <com/sun/star/sdb/XSQLQueryComposer.hpp> 37cdf0e10cSrcweir #endif 38cdf0e10cSrcweir #ifndef _COM_SUN_STAR_FRAME_XDISPATCH_HPP_ 39cdf0e10cSrcweir #include <com/sun/star/frame/XDispatch.hpp> 40cdf0e10cSrcweir #endif 41cdf0e10cSrcweir #ifndef _COM_SUN_STAR_UTIL_URL_HPP_ 42cdf0e10cSrcweir #include <com/sun/star/util/URL.hpp> 43cdf0e10cSrcweir #endif 44cdf0e10cSrcweir #ifndef _COMPHELPER_UNO3_HXX_ 45cdf0e10cSrcweir #include <comphelper/uno3.hxx> 46cdf0e10cSrcweir #endif 47cdf0e10cSrcweir #ifndef _COMPHELPER_STLTYPES_HXX_ 48cdf0e10cSrcweir #include <comphelper/stl_types.hxx> 49cdf0e10cSrcweir #endif 50cdf0e10cSrcweir #ifndef _SBA_MULTIPLEX_HXX 51cdf0e10cSrcweir #include "sbamultiplex.hxx" 52cdf0e10cSrcweir #endif 53cdf0e10cSrcweir #ifndef _SVX_DATACCESSDESCRIPTOR_HXX_ 54cdf0e10cSrcweir #include <svx/dataaccessdescriptor.hxx> 55cdf0e10cSrcweir #endif 56cdf0e10cSrcweir #include <queue> 57cdf0e10cSrcweir 58cdf0e10cSrcweir class SvNumberFormatter; 59cdf0e10cSrcweir 60cdf0e10cSrcweir namespace dbaui 61cdf0e10cSrcweir { 62cdf0e10cSrcweir //------------------------------------------------------------------ 63cdf0e10cSrcweir struct SbaURLCompare : public ::std::binary_function< ::com::sun::star::util::URL, ::com::sun::star::util::URL, bool> 64cdf0e10cSrcweir { operator ()dbaui::SbaURLCompare65cdf0e10cSrcweir bool operator() (const ::com::sun::star::util::URL& x, const ::com::sun::star::util::URL& y) const {return x.Complete == y.Complete ? true : false;} 66cdf0e10cSrcweir }; 67cdf0e10cSrcweir 68cdf0e10cSrcweir struct SbaURLHash 69cdf0e10cSrcweir { operator ()dbaui::SbaURLHash70cdf0e10cSrcweir sal_Int32 operator() (const ::com::sun::star::util::URL& x) const {return x.Complete.hashCode();} 71cdf0e10cSrcweir }; 72cdf0e10cSrcweir //================================================================== 73cdf0e10cSrcweir // SbaXGridControl 74cdf0e10cSrcweir //================================================================== 75cdf0e10cSrcweir 76cdf0e10cSrcweir // class ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > ; 77cdf0e10cSrcweir FORWARD_DECLARE_INTERFACE(lang,XMultiServiceFactory) 78cdf0e10cSrcweir 79cdf0e10cSrcweir class SbaXStatusMultiplexer; 80cdf0e10cSrcweir class SbaXGridControl 81cdf0e10cSrcweir :public FmXGridControl 82cdf0e10cSrcweir ,public ::com::sun::star::frame::XDispatch 83cdf0e10cSrcweir { 84cdf0e10cSrcweir DECLARE_STL_MAP(::com::sun::star::util::URL, SbaXStatusMultiplexer*, SbaURLCompare,StatusMultiplexerArray); 85cdf0e10cSrcweir StatusMultiplexerArray m_aStatusMultiplexer; 86cdf0e10cSrcweir 87cdf0e10cSrcweir public: 88cdf0e10cSrcweir SbaXGridControl(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >&); 89cdf0e10cSrcweir virtual ~SbaXGridControl(); 90cdf0e10cSrcweir 91cdf0e10cSrcweir // UNO 92cdf0e10cSrcweir DECLARE_UNO3_DEFAULTS(SbaXGridControl, FmXGridControl); 93cdf0e10cSrcweir virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(const ::com::sun::star::uno::Type& _rType) throw (::com::sun::star::uno::RuntimeException); 94cdf0e10cSrcweir 95cdf0e10cSrcweir // XTypeProvider 96cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw (::com::sun::star::uno::RuntimeException); 97cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw (::com::sun::star::uno::RuntimeException); 98cdf0e10cSrcweir 99cdf0e10cSrcweir // ::com::sun::star::lang::XServiceInfo 100cdf0e10cSrcweir ::rtl::OUString SAL_CALL getImplementationName() throw(); 101cdf0e10cSrcweir virtual ::comphelper::StringSequence SAL_CALL getSupportedServiceNames() throw(); 102cdf0e10cSrcweir // need by registration 103cdf0e10cSrcweir static ::rtl::OUString getImplementationName_Static() throw( ::com::sun::star::uno::RuntimeException ); 104cdf0e10cSrcweir static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static(void) throw( ::com::sun::star::uno::RuntimeException ); 105cdf0e10cSrcweir static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > 106cdf0e10cSrcweir SAL_CALL Create(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >&); 107cdf0e10cSrcweir 108cdf0e10cSrcweir // ::com::sun::star::frame::XDispatch 109cdf0e10cSrcweir virtual void SAL_CALL dispatch(const ::com::sun::star::util::URL& aURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArgs) throw( ::com::sun::star::uno::RuntimeException ); 110cdf0e10cSrcweir virtual void SAL_CALL addStatusListener(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > & xControl, const ::com::sun::star::util::URL& aURL) throw( ::com::sun::star::uno::RuntimeException ); 111cdf0e10cSrcweir virtual void SAL_CALL removeStatusListener(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > & xControl, const ::com::sun::star::util::URL& aURL) throw( ::com::sun::star::uno::RuntimeException ); 112cdf0e10cSrcweir 113cdf0e10cSrcweir // ::com::sun::star::lang::XComponent 114cdf0e10cSrcweir virtual void SAL_CALL dispose(void) throw( ::com::sun::star::uno::RuntimeException ); 115cdf0e10cSrcweir 116cdf0e10cSrcweir virtual void SAL_CALL createPeer(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit > & rToolkit, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > & rParentPeer) throw( ::com::sun::star::uno::RuntimeException ); 117cdf0e10cSrcweir 118cdf0e10cSrcweir protected: 119cdf0e10cSrcweir virtual FmXGridPeer* imp_CreatePeer(Window* pParent); 120cdf0e10cSrcweir }; 121cdf0e10cSrcweir 122cdf0e10cSrcweir //================================================================== 123cdf0e10cSrcweir // SbaXGridPeer 124cdf0e10cSrcweir //================================================================== 125cdf0e10cSrcweir 126cdf0e10cSrcweir class SbaXGridPeer 127cdf0e10cSrcweir :public FmXGridPeer 128cdf0e10cSrcweir ,public ::com::sun::star::frame::XDispatch 129cdf0e10cSrcweir { 130cdf0e10cSrcweir ::cppu::OMultiTypeInterfaceContainerHelperVar< ::com::sun::star::util::URL,SbaURLHash , SbaURLCompare> m_aStatusListeners; 131cdf0e10cSrcweir 132cdf0e10cSrcweir public: 133cdf0e10cSrcweir SbaXGridPeer(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >&); 134cdf0e10cSrcweir virtual ~SbaXGridPeer(); 135cdf0e10cSrcweir 136cdf0e10cSrcweir // UNO acquire()137cdf0e10cSrcweir virtual void SAL_CALL acquire() throw() { FmXGridPeer::acquire(); } release()138cdf0e10cSrcweir virtual void SAL_CALL release() throw() { FmXGridPeer::release(); } 139cdf0e10cSrcweir virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(const ::com::sun::star::uno::Type& _rType) throw (::com::sun::star::uno::RuntimeException); 140cdf0e10cSrcweir 141cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException); 142cdf0e10cSrcweir 143cdf0e10cSrcweir static const ::com::sun::star::uno::Sequence< sal_Int8 >& getUnoTunnelId(); 144cdf0e10cSrcweir sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 > & rId ) throw (::com::sun::star::uno::RuntimeException); 145cdf0e10cSrcweir static SbaXGridPeer* getImplementation(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& _rxIFace); 146cdf0e10cSrcweir 147cdf0e10cSrcweir // ::com::sun::star::frame::XDispatch 148cdf0e10cSrcweir virtual void SAL_CALL dispatch(const ::com::sun::star::util::URL& aURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArgs) throw( ::com::sun::star::uno::RuntimeException ); 149cdf0e10cSrcweir virtual void SAL_CALL addStatusListener(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > & xControl, const ::com::sun::star::util::URL& aURL) throw( ::com::sun::star::uno::RuntimeException ); 150cdf0e10cSrcweir virtual void SAL_CALL removeStatusListener(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > & xControl, const ::com::sun::star::util::URL& aURL) throw( ::com::sun::star::uno::RuntimeException ); 151cdf0e10cSrcweir 152cdf0e10cSrcweir // ::com::sun::star::frame::XDispatchProvider 153cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > SAL_CALL queryDispatch(const ::com::sun::star::util::URL& aURL, const ::rtl::OUString& aTargetFrameName, sal_Int32 nSearchFlags) throw( ::com::sun::star::uno::RuntimeException ); 154cdf0e10cSrcweir 155cdf0e10cSrcweir // ::com::sun::star::lang::XComponent 156cdf0e10cSrcweir virtual void SAL_CALL dispose(void) throw( ::com::sun::star::uno::RuntimeException ); 157cdf0e10cSrcweir 158cdf0e10cSrcweir protected: 159cdf0e10cSrcweir virtual FmGridControl* imp_CreateControl(Window* pParent, WinBits nStyle); 160cdf0e10cSrcweir #if defined(_MSC_VER) && (_MSC_VER >= 1310 ) 161cdf0e10cSrcweir typedef ::com::sun::star::frame::XStatusListener xstlist_type; 162cdf0e10cSrcweir typedef ::com::sun::star::uno::Reference< xstlist_type > xlistener_type; 163cdf0e10cSrcweir void NotifyStatusChanged(const ::com::sun::star::util::URL& aUrl, const xlistener_type & xControl = xlistener_type() ); 164cdf0e10cSrcweir #else 165cdf0e10cSrcweir void NotifyStatusChanged(const ::com::sun::star::util::URL& aUrl, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > & xControl = ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > ()); 166cdf0e10cSrcweir #endif // # _MSC_VER>=1310 167cdf0e10cSrcweir 168cdf0e10cSrcweir private: 169*8654bc52Smseidel // for any execution of XDispatch::dispatch 170cdf0e10cSrcweir struct DispatchArgs 171cdf0e10cSrcweir { 172cdf0e10cSrcweir ::com::sun::star::util::URL aURL; 173cdf0e10cSrcweir ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > aArgs; 174cdf0e10cSrcweir }; 175cdf0e10cSrcweir ::std::queue< DispatchArgs > m_aDispatchArgs; 176cdf0e10cSrcweir DECL_LINK( OnDispatchEvent, void* ); 177cdf0e10cSrcweir 178cdf0e10cSrcweir // for dynamic states of our 4 dispatchable URLs 179cdf0e10cSrcweir enum DispatchType 180cdf0e10cSrcweir { 181cdf0e10cSrcweir dtBrowserAttribs, 182cdf0e10cSrcweir dtRowHeight, 183cdf0e10cSrcweir dtColumnAttribs, 184cdf0e10cSrcweir dtColumnWidth, 185cdf0e10cSrcweir 186cdf0e10cSrcweir dtUnknown 187cdf0e10cSrcweir }; 188cdf0e10cSrcweir DispatchType classifyDispatchURL( const ::com::sun::star::util::URL& _rURL ); 189cdf0e10cSrcweir 190cdf0e10cSrcweir DECLARE_STL_STDKEY_MAP( DispatchType, sal_Bool, MapDispatchToBool ); 191cdf0e10cSrcweir MapDispatchToBool m_aDispatchStates; 192cdf0e10cSrcweir }; 193cdf0e10cSrcweir 194cdf0e10cSrcweir //================================================================== 195cdf0e10cSrcweir // SbaGridHeader 196cdf0e10cSrcweir //================================================================== 197cdf0e10cSrcweir 198cdf0e10cSrcweir class SbaGridHeader 199cdf0e10cSrcweir :public FmGridHeader 200cdf0e10cSrcweir ,public DragSourceHelper 201cdf0e10cSrcweir { 202cdf0e10cSrcweir public: 203cdf0e10cSrcweir SbaGridHeader(BrowseBox* pParent, WinBits nWinBits = WB_STDHEADERBAR | WB_DRAG); 204cdf0e10cSrcweir 205cdf0e10cSrcweir protected: 206cdf0e10cSrcweir 207cdf0e10cSrcweir // FmGridHeader overridables 208cdf0e10cSrcweir virtual void PreExecuteColumnContextMenu(sal_uInt16 nColId, PopupMenu& rMenu); 209cdf0e10cSrcweir virtual void PostExecuteColumnContextMenu(sal_uInt16 nColId, const PopupMenu& rMenu, sal_uInt16 nExecutionResult); 210cdf0e10cSrcweir 211cdf0e10cSrcweir private: 212cdf0e10cSrcweir // DragSourceHelper overridables 213cdf0e10cSrcweir virtual void StartDrag( sal_Int8 _nAction, const Point& _rPosPixel ); 214cdf0e10cSrcweir 215cdf0e10cSrcweir // Window overridables 216cdf0e10cSrcweir virtual void MouseButtonDown( const MouseEvent& rMEvt ); 217cdf0e10cSrcweir 218cdf0e10cSrcweir sal_Bool ImplStartColumnDrag(sal_Int8 _nAction, const Point& _rMousePos); 219cdf0e10cSrcweir 220cdf0e10cSrcweir private: 221cdf0e10cSrcweir using FmGridHeader::StartDrag; 222cdf0e10cSrcweir }; 223cdf0e10cSrcweir 224cdf0e10cSrcweir // ========================================================================= 225cdf0e10cSrcweir // interfaces for communication between the vcl grid control and a controller 226cdf0e10cSrcweir // ------------------------------------------------------------------------- 227cdf0e10cSrcweir class SbaGridListener 228cdf0e10cSrcweir { 229cdf0e10cSrcweir public: 230cdf0e10cSrcweir virtual void RowChanged() = 0; 231cdf0e10cSrcweir virtual void ColumnChanged() = 0; 232cdf0e10cSrcweir virtual void SelectionChanged() = 0; 233cdf0e10cSrcweir virtual void CellActivated() = 0; 234cdf0e10cSrcweir virtual void CellDeactivated() = 0; 235cdf0e10cSrcweir virtual void BeforeDrop() = 0; 236cdf0e10cSrcweir virtual void AfterDrop() = 0; 237cdf0e10cSrcweir }; 238cdf0e10cSrcweir 239cdf0e10cSrcweir //================================================================== 240cdf0e10cSrcweir // SbaGridControl 241cdf0e10cSrcweir //================================================================== 242cdf0e10cSrcweir //------------------------------------------------------------------ 243cdf0e10cSrcweir class UnoDataBrowserController; 244cdf0e10cSrcweir class SbaGridControl : public FmGridControl 245cdf0e10cSrcweir { 246cdf0e10cSrcweir friend class SbaGridHeader; 247cdf0e10cSrcweir friend class SbaXGridPeer; 248cdf0e10cSrcweir 249cdf0e10cSrcweir // Attributes 250cdf0e10cSrcweir protected: 251cdf0e10cSrcweir ::svx::ODataAccessDescriptor m_aDataDescriptor; 252cdf0e10cSrcweir SbaGridListener* m_pMasterListener; 253cdf0e10cSrcweir 254cdf0e10cSrcweir sal_Int32 m_nAsyncDropEvent; 255cdf0e10cSrcweir 256cdf0e10cSrcweir sal_uInt16 m_nCurrentActionColId; 257*8654bc52Smseidel // UI actions (e.g. a context menu) may be performed on columns which aren't the current one 258cdf0e10cSrcweir // and aren't selected, so we have to track this column id 259cdf0e10cSrcweir 260cdf0e10cSrcweir sal_Bool m_bActivatingForDrop; 261cdf0e10cSrcweir // Attribute Access 262cdf0e10cSrcweir public: GetCurrentActionColumn() const263cdf0e10cSrcweir sal_uInt16 GetCurrentActionColumn() const { return m_nCurrentActionColId; } 264cdf0e10cSrcweir 265cdf0e10cSrcweir public: 266cdf0e10cSrcweir SbaGridControl(::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >,Window* pParent, FmXGridPeer* _pPeer, WinBits nBits = WB_TABSTOP); 267cdf0e10cSrcweir virtual ~SbaGridControl(); 268cdf0e10cSrcweir 269cdf0e10cSrcweir virtual void Command( const CommandEvent& rCEvt ); 270cdf0e10cSrcweir virtual void Select(); 271cdf0e10cSrcweir SetMasterListener(SbaGridListener * pListener)272cdf0e10cSrcweir void SetMasterListener(SbaGridListener* pListener) { m_pMasterListener = pListener; } 273cdf0e10cSrcweir 274cdf0e10cSrcweir virtual void ActivateCell(long nRow, sal_uInt16 nCol, sal_Bool bSetCellFocus = sal_True); 275cdf0e10cSrcweir virtual void DeactivateCell(sal_Bool bUpdate = sal_True); ActivateCell()276cdf0e10cSrcweir void ActivateCell() { FmGridControl::ActivateCell(); } 277cdf0e10cSrcweir IsAllSelected() const278cdf0e10cSrcweir sal_Bool IsAllSelected() const { return (GetSelectRowCount() == GetRowCount()) && (GetRowCount() > 0); } 279cdf0e10cSrcweir GetHeaderBar() const280cdf0e10cSrcweir HeaderBar* GetHeaderBar() const { return FmGridControl::GetHeaderBar(); } 281cdf0e10cSrcweir 282cdf0e10cSrcweir /** return the description of the specified object. 283cdf0e10cSrcweir @param eObjType 284cdf0e10cSrcweir The type to ask for 285cdf0e10cSrcweir @param _nPosition 28607a3d7f1SPedro Giffuni The position of a tablecell (index position), header bar column/row cell 287cdf0e10cSrcweir @return 288cdf0e10cSrcweir The description of the specified object. 289cdf0e10cSrcweir */ 290cdf0e10cSrcweir virtual ::rtl::OUString GetAccessibleObjectDescription( ::svt::AccessibleBrowseBoxObjType eObjType,sal_Int32 _nPosition = -1) const; 291cdf0e10cSrcweir 292cdf0e10cSrcweir virtual void DeleteSelectedRows(); 293cdf0e10cSrcweir /** copies the currently selected rows to the clipboard 294cdf0e10cSrcweir @precond 295cdf0e10cSrcweir at least one row is selected 296cdf0e10cSrcweir */ 297cdf0e10cSrcweir void CopySelectedRowsToClipboard(); 298cdf0e10cSrcweir 299cdf0e10cSrcweir 300cdf0e10cSrcweir protected: 301cdf0e10cSrcweir // DragSourceHelper overridables 302cdf0e10cSrcweir virtual void StartDrag( sal_Int8 _nAction, const Point& _rPosPixel ); 303cdf0e10cSrcweir 304cdf0e10cSrcweir // BrowseBox overridables 305cdf0e10cSrcweir virtual void CursorMoved(); 306cdf0e10cSrcweir virtual sal_Int8 AcceptDrop( const BrowserAcceptDropEvent& rEvt ); 307cdf0e10cSrcweir virtual sal_Int8 ExecuteDrop( const BrowserExecuteDropEvent& rEvt ); 308cdf0e10cSrcweir virtual void MouseButtonDown( const BrowserMouseEvent& rMEvt); 309cdf0e10cSrcweir 310cdf0e10cSrcweir // EditBrowseBox overridables 311cdf0e10cSrcweir virtual BrowserHeader* imp_CreateHeaderBar(BrowseBox* pParent); 312cdf0e10cSrcweir virtual ::svt::CellController* GetController(long nRow, sal_uInt16 nCol); 313cdf0e10cSrcweir 314cdf0e10cSrcweir // DbGridControl overridables 315cdf0e10cSrcweir virtual void PreExecuteRowContextMenu(sal_uInt16 nRow, PopupMenu& rMenu); 316cdf0e10cSrcweir virtual void PostExecuteRowContextMenu(sal_uInt16 nRow, const PopupMenu& rMenu, sal_uInt16 nExecutionResult); 317cdf0e10cSrcweir 318cdf0e10cSrcweir // DbGridControl overridables 319cdf0e10cSrcweir virtual void onRowChange(); 320cdf0e10cSrcweir virtual void onColumnChange(); 321cdf0e10cSrcweir 322cdf0e10cSrcweir // my own overridables 323cdf0e10cSrcweir virtual void BeforeDrop(); 324cdf0e10cSrcweir virtual void AfterDrop(); 325cdf0e10cSrcweir 326cdf0e10cSrcweir // get a fields property set from a model pos 327cdf0e10cSrcweir ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > getField(sal_uInt16 nModelPos); 328cdf0e10cSrcweir 329cdf0e10cSrcweir // get my data source 330cdf0e10cSrcweir ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > getDataSource() const; 331cdf0e10cSrcweir 332cdf0e10cSrcweir // drag events 333cdf0e10cSrcweir virtual void DoColumnDrag(sal_uInt16 nColumnPos); 334cdf0e10cSrcweir virtual void DoRowDrag(sal_Int16 nRowPos); 335cdf0e10cSrcweir virtual void DoFieldDrag(sal_uInt16 nColumnPos, sal_Int16 nRowPos); 336cdf0e10cSrcweir 337cdf0e10cSrcweir void SetBrowserAttrs(); 338cdf0e10cSrcweir void SetColWidth(sal_uInt16 nColId); 339cdf0e10cSrcweir void SetRowHeight(); 340cdf0e10cSrcweir void SetColAttrs(sal_uInt16 nColId); 341cdf0e10cSrcweir 342cdf0e10cSrcweir SvNumberFormatter* GetDatasourceFormatter(); 343cdf0e10cSrcweir 344cdf0e10cSrcweir DECL_LINK(AsynchDropEvent, void*); 345cdf0e10cSrcweir 346cdf0e10cSrcweir private: 347cdf0e10cSrcweir sal_Bool IsReadOnlyDB() const; 348cdf0e10cSrcweir void implTransferSelectedRows( sal_Int16 nRowPos, bool _bTrueIfClipboardFalseIfDrag ); 349cdf0e10cSrcweir 350cdf0e10cSrcweir private: 351cdf0e10cSrcweir using FmGridControl::AcceptDrop; 352cdf0e10cSrcweir using FmGridControl::ExecuteDrop; 353cdf0e10cSrcweir using FmGridControl::MouseButtonDown; 354cdf0e10cSrcweir }; 355cdf0e10cSrcweir } 356cdf0e10cSrcweir #endif // _SBA_GRID_HXX 357*8654bc52Smseidel 358*8654bc52Smseidel /* vim: set noet sw=4 ts=4: */ 359