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