diff options
author | Noel Grandin <noel@peralex.com> | 2015-05-26 09:30:27 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-05-27 11:14:25 +0200 |
commit | 5ad3886ec8d3d465c956d99fab42fffda656392c (patch) | |
tree | 254005df19d464031ece341354107850df42970d /vcl | |
parent | c6dfe0545cca8dc5e40864fd90e0ffe0b6182578 (diff) |
convert EXTTEXTINPUT constants to scoped enum
Change-Id: I1bb4ff2c13eaa2a9da3e32963ac0802e947e18d9
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/headless/svpframe.cxx | 2 | ||||
-rw-r--r-- | vcl/inc/headless/svpframe.hxx | 2 | ||||
-rw-r--r-- | vcl/inc/osx/salframe.h | 2 | ||||
-rw-r--r-- | vcl/inc/salframe.hxx | 2 | ||||
-rw-r--r-- | vcl/inc/unx/gtk/gtkframe.hxx | 4 | ||||
-rw-r--r-- | vcl/inc/unx/i18n_ic.hxx | 4 | ||||
-rw-r--r-- | vcl/inc/unx/salframe.h | 2 | ||||
-rw-r--r-- | vcl/inc/win/salframe.h | 2 | ||||
-rw-r--r-- | vcl/osx/salframe.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/mouse.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/window.cxx | 4 | ||||
-rw-r--r-- | vcl/source/window/winproc.cxx | 4 | ||||
-rw-r--r-- | vcl/unx/generic/app/i18n_ic.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/generic/window/salframe.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/gtk/window/gtksalframe.cxx | 6 | ||||
-rw-r--r-- | vcl/win/source/window/salframe.cxx | 8 |
16 files changed, 26 insertions, 24 deletions
diff --git a/vcl/headless/svpframe.cxx b/vcl/headless/svpframe.cxx index e1218d7ab3e6..362a91cbb8f6 100644 --- a/vcl/headless/svpframe.cxx +++ b/vcl/headless/svpframe.cxx @@ -419,7 +419,7 @@ void SvpSalFrame::SetInputContext( SalInputContext* ) { } -void SvpSalFrame::EndExtTextInput( sal_uInt16 ) +void SvpSalFrame::EndExtTextInput( EndExtTextInputFlags ) { } diff --git a/vcl/inc/headless/svpframe.hxx b/vcl/inc/headless/svpframe.hxx index b07c2163794f..0598bf00158c 100644 --- a/vcl/inc/headless/svpframe.hxx +++ b/vcl/inc/headless/svpframe.hxx @@ -109,7 +109,7 @@ public: virtual void Flush() SAL_OVERRIDE; virtual void Sync() SAL_OVERRIDE; virtual void SetInputContext( SalInputContext* pContext ) SAL_OVERRIDE; - virtual void EndExtTextInput( sal_uInt16 nFlags ) SAL_OVERRIDE; + virtual void EndExtTextInput( EndExtTextInputFlags nFlags ) SAL_OVERRIDE; virtual OUString GetKeyName( sal_uInt16 nKeyCode ) SAL_OVERRIDE; virtual bool MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, vcl::KeyCode& rKeyCode ) SAL_OVERRIDE; virtual LanguageType GetInputLanguage() SAL_OVERRIDE; diff --git a/vcl/inc/osx/salframe.h b/vcl/inc/osx/salframe.h index b030d3934ee5..69ff3a1bfc48 100644 --- a/vcl/inc/osx/salframe.h +++ b/vcl/inc/osx/salframe.h @@ -134,7 +134,7 @@ public: virtual void Flush( const Rectangle& ) SAL_OVERRIDE; virtual void Sync() SAL_OVERRIDE; virtual void SetInputContext( SalInputContext* pContext ) SAL_OVERRIDE; - virtual void EndExtTextInput( sal_uInt16 nFlags ) SAL_OVERRIDE; + virtual void EndExtTextInput( EndExtTextInputFlags nFlags ) SAL_OVERRIDE; virtual OUString GetKeyName( sal_uInt16 nKeyCode ) SAL_OVERRIDE; virtual bool MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, vcl::KeyCode& rKeyCode ) SAL_OVERRIDE; virtual LanguageType GetInputLanguage() SAL_OVERRIDE; diff --git a/vcl/inc/salframe.hxx b/vcl/inc/salframe.hxx index 84cd1f53567c..acdb9b4b2d5e 100644 --- a/vcl/inc/salframe.hxx +++ b/vcl/inc/salframe.hxx @@ -174,7 +174,7 @@ public: virtual void Sync() = 0; virtual void SetInputContext( SalInputContext* pContext ) = 0; - virtual void EndExtTextInput( sal_uInt16 nFlags ) = 0; + virtual void EndExtTextInput( EndExtTextInputFlags nFlags ) = 0; virtual OUString GetKeyName( sal_uInt16 nKeyCode ) = 0; diff --git a/vcl/inc/unx/gtk/gtkframe.hxx b/vcl/inc/unx/gtk/gtkframe.hxx index de8903e729c8..194a20dc9e4c 100644 --- a/vcl/inc/unx/gtk/gtkframe.hxx +++ b/vcl/inc/unx/gtk/gtkframe.hxx @@ -155,7 +155,7 @@ class GtkSalFrame : public SalFrame, public X11WindowProvider void createIMContext(); void deleteIMContext(); void updateIMSpotLocation(); - void endExtTextInput( sal_uInt16 nFlags ); + void endExtTextInput( EndExtTextInputFlags nFlags ); bool handleKeyEvent( GdkEventKey* pEvent ); void focusChanged( bool bFocusIn ); @@ -405,7 +405,7 @@ public: virtual void Sync() SAL_OVERRIDE; virtual void SetInputContext( SalInputContext* pContext ) SAL_OVERRIDE; - virtual void EndExtTextInput( sal_uInt16 nFlags ) SAL_OVERRIDE; + virtual void EndExtTextInput( EndExtTextInputFlags nFlags ) SAL_OVERRIDE; virtual OUString GetKeyName( sal_uInt16 nKeyCode ) SAL_OVERRIDE; virtual bool MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, vcl::KeyCode& rKeyCode ) SAL_OVERRIDE; diff --git a/vcl/inc/unx/i18n_ic.hxx b/vcl/inc/unx/i18n_ic.hxx index 656a3f0d4c14..b76ce3e3d0de 100644 --- a/vcl/inc/unx/i18n_ic.hxx +++ b/vcl/inc/unx/i18n_ic.hxx @@ -23,6 +23,8 @@ #include <i18nlangtag/lang.h> #include "i18n_cb.hxx" +enum class EndExtTextInputFlags; + class SalI18N_InputContext { @@ -65,7 +67,7 @@ public: void HandleDestroyIM(); int HandleKeyEvent( XKeyEvent *pEvent, SalFrame *pFrame ); // unused - void EndExtTextInput( sal_uInt16 nFlags ); // unused + void EndExtTextInput( EndExtTextInputFlags nFlags ); // unused int CommitStringCallback( sal_Unicode* pText, sal_Size nLength ); int CommitKeyEvent( sal_Unicode* pText, sal_Size nLength ); int UpdateSpotLocation(); diff --git a/vcl/inc/unx/salframe.h b/vcl/inc/unx/salframe.h index 9ead2aed89e1..cb5c2f26d139 100644 --- a/vcl/inc/unx/salframe.h +++ b/vcl/inc/unx/salframe.h @@ -243,7 +243,7 @@ public: virtual void Flush() SAL_OVERRIDE; virtual void Sync() SAL_OVERRIDE; virtual void SetInputContext( SalInputContext* pContext ) SAL_OVERRIDE; - virtual void EndExtTextInput( sal_uInt16 nFlags ) SAL_OVERRIDE; + virtual void EndExtTextInput( EndExtTextInputFlags nFlags ) SAL_OVERRIDE; virtual OUString GetKeyName( sal_uInt16 nKeyCode ) SAL_OVERRIDE; virtual bool MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, vcl::KeyCode& rKeyCode ) SAL_OVERRIDE; virtual LanguageType GetInputLanguage() SAL_OVERRIDE; diff --git a/vcl/inc/win/salframe.h b/vcl/inc/win/salframe.h index 73f9e7010551..1fc3be065fee 100644 --- a/vcl/inc/win/salframe.h +++ b/vcl/inc/win/salframe.h @@ -115,7 +115,7 @@ public: virtual void Flush() SAL_OVERRIDE; virtual void Sync() SAL_OVERRIDE; virtual void SetInputContext( SalInputContext* pContext ) SAL_OVERRIDE; - virtual void EndExtTextInput( sal_uInt16 nFlags ) SAL_OVERRIDE; + virtual void EndExtTextInput( EndExtTextInputFlags nFlags ) SAL_OVERRIDE; virtual OUString GetKeyName( sal_uInt16 nKeyCode ) SAL_OVERRIDE; virtual bool MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, vcl::KeyCode& rKeyCode ) SAL_OVERRIDE; virtual LanguageType GetInputLanguage() SAL_OVERRIDE; diff --git a/vcl/osx/salframe.cxx b/vcl/osx/salframe.cxx index 251f5c3d08ab..58fdbf9f4e9b 100644 --- a/vcl/osx/salframe.cxx +++ b/vcl/osx/salframe.cxx @@ -929,7 +929,7 @@ void AquaSalFrame::SetInputContext( SalInputContext* pContext ) return; } -void AquaSalFrame::EndExtTextInput( sal_uInt16 ) +void AquaSalFrame::EndExtTextInput( EndExtTextInputFlags ) { } diff --git a/vcl/source/window/mouse.cxx b/vcl/source/window/mouse.cxx index 782196fd4cc8..e250c6b38f3e 100644 --- a/vcl/source/window/mouse.cxx +++ b/vcl/source/window/mouse.cxx @@ -290,7 +290,7 @@ void Window::ImplGrabFocus( sal_uInt16 nFlags ) // EndExtTextInput if it is not the same window if ( pSVData->maWinData.mpExtTextInputWin && (pSVData->maWinData.mpExtTextInputWin.get() != this) ) - pSVData->maWinData.mpExtTextInputWin->EndExtTextInput( EXTTEXTINPUT_END_COMPLETE ); + pSVData->maWinData.mpExtTextInputWin->EndExtTextInput( EndExtTextInputFlags::Complete ); // mark this windows as the last FocusWindow vcl::Window* pOverlapWindow = ImplGetFirstOverlapWindow(); diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index a51e2d65a10a..c2d8bd9f4c7f 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -404,7 +404,7 @@ void Window::dispose() // EndExtTextInputMode if ( pSVData->maWinData.mpExtTextInputWin == this ) { - EndExtTextInput( EXTTEXTINPUT_END_COMPLETE ); + EndExtTextInput( EndExtTextInputFlags::Complete ); if ( pSVData->maWinData.mpExtTextInputWin == this ) pSVData->maWinData.mpExtTextInputWin = NULL; } @@ -2178,7 +2178,7 @@ void Window::SetInputContext( const InputContext& rInputContext ) ImplNewInputContext(); } -void Window::EndExtTextInput( sal_uInt16 nFlags ) +void Window::EndExtTextInput( EndExtTextInputFlags nFlags ) { if ( mpWindowImpl->mbExtTextInput ) diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx index 493147f3281a..d447ea5bd067 100644 --- a/vcl/source/window/winproc.cxx +++ b/vcl/source/window/winproc.cxx @@ -415,7 +415,7 @@ bool ImplHandleMouseEvent( vcl::Window* pWindow, MouseNotifyEvent nSVEvent, bool if ( pSVData->maWinData.mpExtTextInputWin && ((nSVEvent == MouseNotifyEvent::MOUSEBUTTONDOWN) || (nSVEvent == MouseNotifyEvent::MOUSEBUTTONUP)) ) - pSVData->maWinData.mpExtTextInputWin->EndExtTextInput( EXTTEXTINPUT_END_COMPLETE ); + pSVData->maWinData.mpExtTextInputWin->EndExtTextInput( EndExtTextInputFlags::Complete ); } // determine mouse event data @@ -1856,7 +1856,7 @@ IMPL_LINK_NOARG(vcl::Window, ImplAsyncFocusHdl) // TrackingMode is ended in ImplHandleLoseFocus #ifdef _WIN32 // To avoid problems with the Unix IME - pFocusWin->EndExtTextInput( EXTTEXTINPUT_END_COMPLETE ); + pFocusWin->EndExtTextInput( EndExtTextInput::Complete ); #endif // XXX #102010# hack for accessibility: do not close the menu, diff --git a/vcl/unx/generic/app/i18n_ic.cxx b/vcl/unx/generic/app/i18n_ic.cxx index 3daeb2b2c861..2bd02caa5b84 100644 --- a/vcl/unx/generic/app/i18n_ic.cxx +++ b/vcl/unx/generic/app/i18n_ic.cxx @@ -625,7 +625,7 @@ SalI18N_InputContext::UnsetICFocus( SalFrame* pFrame ) // multi byte input method only void -SalI18N_InputContext::EndExtTextInput( sal_uInt16 /*nFlags*/ ) +SalI18N_InputContext::EndExtTextInput( EndExtTextInputFlags /*nFlags*/ ) { if ( mbUseable && (maContext != NULL) && maClientData.pFrame ) { diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx index 14e11d5be9ef..3ad0f9a70eaf 100644 --- a/vcl/unx/generic/window/salframe.cxx +++ b/vcl/unx/generic/window/salframe.cxx @@ -2496,7 +2496,7 @@ void X11SalFrame::SetInputContext( SalInputContext* pContext ) return; } -void X11SalFrame::EndExtTextInput( sal_uInt16 nFlags ) +void X11SalFrame::EndExtTextInput( EndExtTextInputFlags nFlags ) { if (mpInputContext != NULL) mpInputContext->EndExtTextInput( nFlags ); diff --git a/vcl/unx/gtk/window/gtksalframe.cxx b/vcl/unx/gtk/window/gtksalframe.cxx index 3286267b8686..239514e537c6 100644 --- a/vcl/unx/gtk/window/gtksalframe.cxx +++ b/vcl/unx/gtk/window/gtksalframe.cxx @@ -1878,7 +1878,7 @@ void GtkSalFrame::Show( bool bVisible, bool bNoActivate ) } // #i44068# reset parent's IM context if( m_pParent ) - m_pParent->EndExtTextInput(0); + m_pParent->EndExtTextInput(EndExtTextInputFlags::NONE); } if( m_bWindowIsGtkPlug ) askForXEmbedFocus( 0 ); @@ -2931,7 +2931,7 @@ void GtkSalFrame::SetInputContext( SalInputContext* pContext ) m_pIMHandler = new IMHandler( this ); } -void GtkSalFrame::EndExtTextInput( sal_uInt16 nFlags ) +void GtkSalFrame::EndExtTextInput( EndExtTextInputFlags nFlags ) { if( m_pIMHandler ) m_pIMHandler->endExtTextInput( nFlags ); @@ -4075,7 +4075,7 @@ void GtkSalFrame::IMHandler::sendEmptyCommit() m_pFrame->CallCallback( SALEVENT_ENDEXTTEXTINPUT, NULL ); } -void GtkSalFrame::IMHandler::endExtTextInput( sal_uInt16 /*nFlags*/ ) +void GtkSalFrame::IMHandler::endExtTextInput( EndExtTextInputFlags /*nFlags*/ ) { gtk_im_context_reset ( m_pIMContext ); diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx index f8e0b69623e6..42f12b215285 100644 --- a/vcl/win/source/window/salframe.cxx +++ b/vcl/win/source/window/salframe.cxx @@ -2279,13 +2279,13 @@ void WinSalFrame::SetInputContext( SalInputContext* pContext ) SendMessageW( mhWnd, SAL_MSG_SETINPUTCONTEXT, 0, (LPARAM)(void*)pContext ); } -static void ImplSalFrameEndExtTextInput( HWND hWnd, sal_uInt16 nFlags ) +static void ImplSalFrameEndExtTextInput( HWND hWnd, EndExtTextInputFlags nFlags ) { HIMC hIMC = ImmGetContext( hWnd ); if ( hIMC ) { DWORD nIndex; - if ( nFlags & EXTTEXTINPUT_END_COMPLETE ) + if ( nFlags & EndExtTextInput::Complete ) nIndex = CPS_COMPLETE; else nIndex = CPS_CANCEL; @@ -2295,7 +2295,7 @@ static void ImplSalFrameEndExtTextInput( HWND hWnd, sal_uInt16 nFlags ) } } -void WinSalFrame::EndExtTextInput( sal_uInt16 nFlags ) +void WinSalFrame::EndExtTextInput( EndExtTextInputFlags nFlags ) { // Must be called in the main thread! SendMessageW( mhWnd, SAL_MSG_ENDEXTTEXTINPUT, (WPARAM)nFlags, 0 ); @@ -5809,7 +5809,7 @@ LRESULT CALLBACK SalFrameWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lP rDef = FALSE; break; case SAL_MSG_ENDEXTTEXTINPUT: - ImplSalFrameEndExtTextInput( hWnd, (sal_uInt16)(sal_uLong)(void*)wParam ); + ImplSalFrameEndExtTextInput( hWnd, (EndExtTextInputFlags)(sal_uLong)(void*)wParam ); rDef = FALSE; break; |