diff options
author | Noel Grandin <noel@peralex.com> | 2014-09-28 15:49:26 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2014-10-01 07:34:23 +0000 |
commit | fc04f76336fdf8c96e35382cdeb497e2f939705c (patch) | |
tree | 70c9bbd054a34a9bca9d22bb7afbb9c4349beff0 /vcl/unx | |
parent | eb4811590c85895ce531674596bdd6afb3397725 (diff) |
fdo#82577: Handle Time
Put the TOOLS Time class in the tools namespace. Avoids clash with the X11
Time typedef.
Change-Id: Iac57d5aef35e81ace1ee0d5e6d76cb278f8ad866
Reviewed-on: https://gerrit.libreoffice.org/11684
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'vcl/unx')
-rw-r--r-- | vcl/unx/generic/app/saldisp.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/generic/dtrans/X11_dndcontext.cxx | 6 | ||||
-rw-r--r-- | vcl/unx/generic/dtrans/X11_dndcontext.hxx | 12 | ||||
-rw-r--r-- | vcl/unx/generic/dtrans/X11_selection.cxx | 14 | ||||
-rw-r--r-- | vcl/unx/generic/dtrans/X11_selection.hxx | 28 | ||||
-rw-r--r-- | vcl/unx/generic/window/salframe.cxx | 4 |
6 files changed, 33 insertions, 33 deletions
diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx index 325062954cdb..cd556c6b1b81 100644 --- a/vcl/unx/generic/app/saldisp.cxx +++ b/vcl/unx/generic/app/saldisp.cxx @@ -2292,7 +2292,7 @@ extern "C" } } -XLIB_Time SalDisplay::GetLastUserEventTime( bool i_bAlwaysReget ) const +Time SalDisplay::GetLastUserEventTime( bool i_bAlwaysReget ) const { if( m_nLastUserEventTime == CurrentTime || i_bAlwaysReget ) { diff --git a/vcl/unx/generic/dtrans/X11_dndcontext.cxx b/vcl/unx/generic/dtrans/X11_dndcontext.cxx index 3a8f67a0d037..bbdd86a0e3cd 100644 --- a/vcl/unx/generic/dtrans/X11_dndcontext.cxx +++ b/vcl/unx/generic/dtrans/X11_dndcontext.cxx @@ -29,7 +29,7 @@ using namespace x11; DropTargetDropContext::DropTargetDropContext( ::Window aDropWindow, - XLIB_Time aTimestamp, + Time aTimestamp, SelectionManager& rManager ) : m_aDropWindow( aDropWindow ), m_nTimestamp( aTimestamp ), @@ -63,7 +63,7 @@ void DropTargetDropContext::dropComplete( sal_Bool success ) throw(std::exceptio DropTargetDragContext::DropTargetDragContext( ::Window aDropWindow, - XLIB_Time aTimestamp, + Time aTimestamp, SelectionManager& rManager ) : m_aDropWindow( aDropWindow ), m_nTimestamp( aTimestamp ), @@ -92,7 +92,7 @@ void DropTargetDragContext::rejectDrag() throw(std::exception) DragSourceContext::DragSourceContext( ::Window aDropWindow, - XLIB_Time aTimestamp, + Time aTimestamp, SelectionManager& rManager ) : m_aDropWindow( aDropWindow ), m_nTimestamp( aTimestamp ), diff --git a/vcl/unx/generic/dtrans/X11_dndcontext.hxx b/vcl/unx/generic/dtrans/X11_dndcontext.hxx index bf162092024d..9fac72f058b0 100644 --- a/vcl/unx/generic/dtrans/X11_dndcontext.hxx +++ b/vcl/unx/generic/dtrans/X11_dndcontext.hxx @@ -39,11 +39,11 @@ namespace x11 { > { ::Window m_aDropWindow; - XLIB_Time m_nTimestamp; + Time m_nTimestamp; SelectionManager& m_rManager; com::sun::star::uno::Reference< XInterface > m_xManagerRef; public: - DropTargetDropContext( ::Window, XLIB_Time, SelectionManager& ); + DropTargetDropContext( ::Window, Time, SelectionManager& ); virtual ~DropTargetDropContext(); // XDropTargetDropContext @@ -58,11 +58,11 @@ namespace x11 { > { ::Window m_aDropWindow; - XLIB_Time m_nTimestamp; + Time m_nTimestamp; SelectionManager& m_rManager; com::sun::star::uno::Reference< XInterface > m_xManagerRef; public: - DropTargetDragContext( ::Window, XLIB_Time, SelectionManager& ); + DropTargetDragContext( ::Window, Time, SelectionManager& ); virtual ~DropTargetDragContext(); // XDropTargetDragContext @@ -76,11 +76,11 @@ namespace x11 { > { ::Window m_aDropWindow; - XLIB_Time m_nTimestamp; + Time m_nTimestamp; SelectionManager& m_rManager; com::sun::star::uno::Reference< XInterface > m_xManagerRef; public: - DragSourceContext( ::Window, XLIB_Time, SelectionManager& ); + DragSourceContext( ::Window, Time, SelectionManager& ); virtual ~DragSourceContext(); // XDragSourceContext diff --git a/vcl/unx/generic/dtrans/X11_selection.cxx b/vcl/unx/generic/dtrans/X11_selection.cxx index 4082bab94404..22dbdb7d38d4 100644 --- a/vcl/unx/generic/dtrans/X11_selection.cxx +++ b/vcl/unx/generic/dtrans/X11_selection.cxx @@ -2259,7 +2259,7 @@ bool SelectionManager::handleDropEvent( XClientMessageEvent& rMessage ) * methods for XDropTargetDropContext */ -void SelectionManager::dropComplete( bool bSuccess, ::Window aDropWindow, XLIB_Time ) +void SelectionManager::dropComplete( bool bSuccess, ::Window aDropWindow, Time ) { osl::ClearableMutexGuard aGuard(m_aMutex); @@ -2448,7 +2448,7 @@ bool SelectionManager::updateDragAction( int modifierState ) return bRet; } -void SelectionManager::sendDropPosition( bool bForce, XLIB_Time eventTime ) +void SelectionManager::sendDropPosition( bool bForce, Time eventTime ) { osl::ClearableMutexGuard aGuard(m_aMutex); @@ -2825,7 +2825,7 @@ bool SelectionManager::handleDragEvent( XEvent& rMessage ) return bHandled; } -void SelectionManager::accept( sal_Int8 dragOperation, ::Window aDropWindow, XLIB_Time ) +void SelectionManager::accept( sal_Int8 dragOperation, ::Window aDropWindow, Time ) { if( aDropWindow == m_aCurrentDropWindow ) { @@ -2845,7 +2845,7 @@ void SelectionManager::accept( sal_Int8 dragOperation, ::Window aDropWindow, XLI } } -void SelectionManager::reject( ::Window aDropWindow, XLIB_Time ) +void SelectionManager::reject( ::Window aDropWindow, Time ) { if( aDropWindow == m_aCurrentDropWindow ) { @@ -3457,7 +3457,7 @@ void SelectionManager::dragDoDispatch() */ -void SelectionManager::setCursor( sal_Int32 cursor, ::Window aDropWindow, XLIB_Time ) +void SelectionManager::setCursor( sal_Int32 cursor, ::Window aDropWindow, Time ) { osl::MutexGuard aGuard( m_aMutex ); if( aDropWindow == m_aDropWindow && Cursor(cursor) != m_aCurrentCursor ) @@ -3471,7 +3471,7 @@ void SelectionManager::setCursor( sal_Int32 cursor, ::Window aDropWindow, XLIB_T } } -void SelectionManager::setImage( sal_Int32, ::Window, XLIB_Time ) +void SelectionManager::setImage( sal_Int32, ::Window, Time ) { } @@ -3780,7 +3780,7 @@ sal_Bool SelectionManager::handleEvent(const Any& event) if( (event >>= aSeq) ) { XEvent* pEvent = (XEvent*)aSeq.getArray(); - XLIB_Time nTimestamp = CurrentTime; + Time nTimestamp = CurrentTime; if( pEvent->type == ButtonPress || pEvent->type == ButtonRelease ) nTimestamp = pEvent->xbutton.time; else if( pEvent->type == XLIB_KeyPress || pEvent->type == KeyRelease ) diff --git a/vcl/unx/generic/dtrans/X11_selection.hxx b/vcl/unx/generic/dtrans/X11_selection.hxx index 489a915a62ad..4e7d71f3400e 100644 --- a/vcl/unx/generic/dtrans/X11_selection.hxx +++ b/vcl/unx/generic/dtrans/X11_selection.hxx @@ -201,9 +201,9 @@ namespace x11 { bool m_bOwner; ::Window m_aLastOwner; PixmapHolder* m_pPixmap; - // m_nOrigXLIB_Timestamp contains the XLIB_Timestamp at which the seclection - // was acquired; needed for XLIB_TimeSTAMP target - XLIB_Time m_nOrigTimestamp; + // m_nOrigTimestamp contains the Timestamp at which the seclection + // was acquired; needed for TimeSTAMP target + Time m_nOrigTimestamp; Selection() : m_eState( Inactive ), m_pAdaptor( NULL ), @@ -253,7 +253,7 @@ namespace x11 { css::uno::Reference< css::awt::XDisplayConnection > m_xDisplayConnection; sal_Int32 m_nSelectionTimeout; - XLIB_Time m_nSelectionTimestamp; + Time m_nSelectionTimestamp; // members used for Xdnd @@ -268,14 +268,14 @@ namespace x11 { // set to true on first XdndPosition or XdndLeave bool m_bDropEnterSent; ::Window m_aCurrentDropWindow; - // XLIB_Time code of XdndDrop - XLIB_Time m_nDropTime; + // Time code of XdndDrop + Time m_nDropTime; sal_Int8 m_nLastDropAction; // XTransferable for Xdnd with foreign drag source css::uno::Reference< css::datatransfer::XTransferable > m_xDropTransferable; int m_nLastX, m_nLastY; - XLIB_Time m_nDropTimestamp; + Time m_nDropTimestamp; // set to true when calling drop() // if another XdndEnter is received this shows that // someone forgot to call dropComplete - we should reset @@ -310,7 +310,7 @@ namespace x11 { bool m_bDropSent; time_t m_nDropTimeout; bool m_bWaitingForPrimaryConversion; - XLIB_Time m_nDragTimestamp; + Time m_nDragTimestamp; // drag cursors Cursor m_aMoveCursor; @@ -386,7 +386,7 @@ namespace x11 { // dnd helpers void sendDragStatus( Atom nDropAction ); - void sendDropPosition( bool bForce, XLIB_Time eventXLIB_Time ); + void sendDropPosition( bool bForce, Time eventTime ); bool updateDragAction( int modifierState ); int getXdndVersion( ::Window aXLIB_Window, ::Window& rProxy ); Cursor createCursor( const unsigned char* pPointerData, const unsigned char* pMaskData, int width, int height, int hotX, int hotY ); @@ -454,14 +454,14 @@ namespace x11 { void deregisterDropTarget( ::Window aXLIB_Window ); // for XDropTarget{Drag|Drop}Context - void accept( sal_Int8 dragOperation, ::Window aDropXLIB_Window, XLIB_Time aXLIB_Timestamp ); - void reject( ::Window aDropXLIB_Window, XLIB_Time aXLIB_Timestamp ); - void dropComplete( bool success, ::Window aDropXLIB_Window, XLIB_Time aXLIB_Timestamp ); + void accept( sal_Int8 dragOperation, ::Window aDropXLIB_Window, Time aTimestamp ); + void reject( ::Window aDropXLIB_Window, Time aTimestamp ); + void dropComplete( bool success, ::Window aDropXLIB_Window, Time aTimestamp ); // for XDragSourceContext sal_Int32 getCurrentCursor() { return m_aCurrentCursor;} - void setCursor( sal_Int32 cursor, ::Window aDropXLIB_Window, XLIB_Time aXLIB_Timestamp ); - void setImage( sal_Int32 image, ::Window aDropXLIB_Window, XLIB_Time aXLIB_Timestamp ); + void setCursor( sal_Int32 cursor, ::Window aDropXLIB_Window, Time aTimestamp ); + void setImage( sal_Int32 image, ::Window aDropXLIB_Window, Time aTimestamp ); void transferablesFlavorsChanged(); void shutdown() throw(); diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx index 0c072ce36913..0e11e9a227c6 100644 --- a/vcl/unx/generic/window/salframe.cxx +++ b/vcl/unx/generic/window/salframe.cxx @@ -622,7 +622,7 @@ void X11SalFrame::Init( sal_uLong nSalFrameStyle, SalX11Screen nXScreen, SystemP XSync( GetXDisplay(), False ); setXEmbedInfo(); - XLIB_Time nUserTime = (nStyle_ & (SAL_FRAME_STYLE_OWNERDRAWDECORATION | SAL_FRAME_STYLE_TOOLWINDOW) ) == 0 ? + Time nUserTime = (nStyle_ & (SAL_FRAME_STYLE_OWNERDRAWDECORATION | SAL_FRAME_STYLE_TOOLWINDOW) ) == 0 ? pDisplay_->GetLastUserEventTime() : 0; pDisplay_->getWMAdaptor()->setUserTime( this, nUserTime ); @@ -1225,7 +1225,7 @@ void X11SalFrame::Show( bool bVisible, bool bNoActivate ) ); } - XLIB_Time nUserTime = 0; + Time nUserTime = 0; if( ! bNoActivate && (nStyle_ & (SAL_FRAME_STYLE_OWNERDRAWDECORATION)) == 0 ) nUserTime = pDisplay_->GetLastUserEventTime( true ); GetDisplay()->getWMAdaptor()->setUserTime( this, nUserTime ); |