[PATCH] Fix for bug fdo#41997, cleanup vcl enumeration
Olivier Hallot
olivier.hallot at alta.org.br
Fri Oct 21 11:54:35 PDT 2011
---
editeng/source/editeng/editeng.cxx | 2 +-
editeng/source/editeng/impedit3.cxx | 2 +-
formula/source/ui/dlg/formula.cxx | 4 ++--
sc/source/core/tool/chartlis.cxx | 2 +-
sc/source/ui/app/scmod.cxx | 2 +-
sd/source/ui/tools/IdleDetection.cxx | 2 +-
svtools/source/control/inettbc.cxx | 2 +-
svtools/source/edit/textview.cxx | 2 +-
sw/source/core/layout/paintfrm.cxx | 2 +-
sw/source/core/view/viewsh.cxx | 2 +-
sw/source/ui/docvw/edtwin.cxx | 2 +-
vcl/aqua/source/app/salinst.cxx | 4 ++--
vcl/inc/vcl/apptypes.hxx | 6 +++---
vcl/unx/generic/app/salinst.cxx | 4 ++--
vcl/win/source/app/salinst.cxx | 2 +-
15 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx
index 5d745c0..573b30b 100644
--- a/editeng/source/editeng/editeng.cxx
+++ b/editeng/source/editeng/editeng.cxx
@@ -1195,7 +1195,7 @@ sal_Bool EditEngine::PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pEditVie
DBG_ASSERT( !bReadOnly, "ReadOnly but modified???" );
// Idle-Formatter only when AnyInput.
if ( bAllowIdle && pImpEditEngine->GetStatus().UseIdleFormatter()
- && Application::AnyInput( INPUT_KEYBOARD) )
+ && Application::AnyInput( VCL_INPUT_KEYBOARD) )
pImpEditEngine->IdleFormatAndUpdate( pEditView );
else
pImpEditEngine->FormatAndUpdate( pEditView );
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index b4efe14..8f059a3 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -327,7 +327,7 @@ void ImpEditEngine::UpdateViews( EditView* pCurView )
IMPL_LINK( ImpEditEngine, OnlineSpellHdl, Timer *, EMPTYARG )
{
- if ( !Application::AnyInput( INPUT_KEYBOARD ) && GetUpdateMode() && IsFormatted() )
+ if ( !Application::AnyInput( VCL_INPUT_KEYBOARD ) && GetUpdateMode() && IsFormatted() )
DoOnlineSpelling();
else
aOnlineSpellTimer.Start();
diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx
index 97ef663..3b7c2ec 100644
--- a/formula/source/ui/dlg/formula.cxx
+++ b/formula/source/ui/dlg/formula.cxx
@@ -592,7 +592,7 @@ sal_Bool FormulaDlg_Impl::CalcValue( const String& rStrExp, String& rStrResult )
{
// Only calculate the value when there isn't any more keyboard input:
- if ( !Application::AnyInput( INPUT_KEYBOARD ) )
+ if ( !Application::AnyInput( VCL_INPUT_KEYBOARD ) )
{
bResult = m_pHelper->calculateValue(rStrExp,rStrResult);
}
@@ -630,7 +630,7 @@ sal_Bool FormulaDlg_Impl::CalcStruct( const String& rStrExp)
{
// Only calculate the value when there isn't any more keyboard input:
- if ( !Application::AnyInput( INPUT_KEYBOARD ) )
+ if ( !Application::AnyInput( VCL_INPUT_KEYBOARD ) )
{
pStructPage->ClearStruct();
diff --git a/sc/source/core/tool/chartlis.cxx b/sc/source/core/tool/chartlis.cxx
index 8c52fe4..6f9129d 100644
--- a/sc/source/core/tool/chartlis.cxx
+++ b/sc/source/core/tool/chartlis.cxx
@@ -567,7 +567,7 @@ void ScChartListenerCollection::StartTimer()
IMPL_LINK( ScChartListenerCollection, TimerHdl, Timer*, EMPTYARG )
{
- if ( Application::AnyInput( INPUT_KEYBOARD ) )
+ if ( Application::AnyInput( VCL_INPUT_KEYBOARD ) )
{
aTimer.Start();
return 0;
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index 7932fca..b4284e7 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -1877,7 +1877,7 @@ IMPL_LINK( ScModule, IdleHandler, Timer*, EMPTYARG )
IMPL_LINK( ScModule, SpellTimerHdl, Timer*, EMPTYARG )
{
- if ( Application::AnyInput( INPUT_KEYBOARD ) )
+ if ( Application::AnyInput( VCL_INPUT_KEYBOARD ) )
{
aSpellTimer.Start();
return 0; // dann spaeter wieder...
diff --git a/sd/source/ui/tools/IdleDetection.cxx b/sd/source/ui/tools/IdleDetection.cxx
index 4ba6163..e0fba1a 100644
--- a/sd/source/ui/tools/IdleDetection.cxx
+++ b/sd/source/ui/tools/IdleDetection.cxx
@@ -59,7 +59,7 @@ sal_Int32 IdleDetection::GetIdleState (const ::Window* pWindow)
sal_Int32 IdleDetection::CheckInputPending (void)
{
- if (GetpApp()->AnyInput(INPUT_MOUSE | INPUT_KEYBOARD | INPUT_PAINT))
+ if (GetpApp()->AnyInput(VCL_INPUT_MOUSE | VCL_INPUT_KEYBOARD | INPUT_PAINT))
return IDET_SYSTEM_EVENT_PENDING;
else
return IDET_IDLE;
diff --git a/svtools/source/control/inettbc.cxx b/svtools/source/control/inettbc.cxx
index 50739d8..097a8ad 100644
--- a/svtools/source/control/inettbc.cxx
+++ b/svtools/source/control/inettbc.cxx
@@ -770,7 +770,7 @@ void SvtMatchContext_Impl::run()
//-------------------------------------------------------------------------
void SvtURLBox::TryAutoComplete( sal_Bool bForce )
{
- if( Application::AnyInput( INPUT_KEYBOARD ) ) return;
+ if( Application::AnyInput( VCL_INPUT_KEYBOARD ) ) return;
String aMatchString;
String aCurText = GetText();
diff --git a/svtools/source/edit/textview.cxx b/svtools/source/edit/textview.cxx
index 1ee5000..44d9f4e 100644
--- a/svtools/source/edit/textview.cxx
+++ b/svtools/source/edit/textview.cxx
@@ -791,7 +791,7 @@ sal_Bool TextView::KeyInput( const KeyEvent& rKeyEvent )
if ( bModified )
{
// Idle-Formatter nur, wenn AnyInput.
- if ( bAllowIdle && Application::AnyInput( INPUT_KEYBOARD) )
+ if ( bAllowIdle && Application::AnyInput( VCL_INPUT_KEYBOARD) )
mpImpl->mpTextEngine->IdleFormatAndUpdate( this );
else
mpImpl->mpTextEngine->FormatAndUpdate( this);
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 32a4365..0a452e4 100755
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -3203,7 +3203,7 @@ void SwLayoutFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
if ( rRect.IsOver( aPaintRect ) )
{
if ( bCnt && pFrm->IsCompletePaint() &&
- !rRect.IsInside( aPaintRect ) && GetpApp()->AnyInput( INPUT_KEYBOARD ) )
+ !rRect.IsInside( aPaintRect ) && GetpApp()->AnyInput( VCL_INPUT_KEYBOARD ) )
{
//fix(8104): Es kann vorkommen, dass die Verarbeitung nicht
//vollstaendig war, aber trotzdem Teile des Absatzes gepaintet
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index c831abb..4db0144 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -227,7 +227,7 @@ void ViewShell::ImplEndAction( const sal_Bool bIdleEnd )
aAction.SetComplete( sal_False );
if ( nLockPaint )
aAction.SetPaint( sal_False );
- aAction.SetInputType( INPUT_KEYBOARD );
+ aAction.SetInputType( VCL_INPUT_KEYBOARD );
aAction.Action();
}
diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx
index bc1e4b8..0599176 100644
--- a/sw/source/ui/docvw/edtwin.cxx
+++ b/sw/source/ui/docvw/edtwin.cxx
@@ -2348,7 +2348,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
else
{
aInBuffer.Expand( aInBuffer.Len() + aKeyEvent.GetRepeat() + 1,aCh );
- bFlushCharBuffer = Application::AnyInput( INPUT_KEYBOARD );
+ bFlushCharBuffer = Application::AnyInput( VCL_INPUT_KEYBOARD );
bFlushBuffer = !bFlushCharBuffer;
if( bFlushCharBuffer )
aKeyInputFlushTimer.Start();
diff --git a/vcl/aqua/source/app/salinst.cxx b/vcl/aqua/source/app/salinst.cxx
index 489b1dd..63d657c 100644
--- a/vcl/aqua/source/app/salinst.cxx
+++ b/vcl/aqua/source/app/salinst.cxx
@@ -875,7 +875,7 @@ bool AquaSalInstance::AnyInput( sal_uInt16 nType )
}
unsigned/*NSUInteger*/ nEventMask = 0;
- if( nType & INPUT_MOUSE)
+ if( nType & VCL_INPUT_MOUSE)
nEventMask |=
NSLeftMouseDownMask | NSRightMouseDownMask | NSOtherMouseDownMask |
NSLeftMouseUpMask | NSRightMouseUpMask | NSOtherMouseUpMask |
@@ -883,7 +883,7 @@ bool AquaSalInstance::AnyInput( sal_uInt16 nType )
NSScrollWheelMask |
// NSMouseMovedMask |
NSMouseEnteredMask | NSMouseExitedMask;
- if( nType & INPUT_KEYBOARD)
+ if( nType & VCL_INPUT_KEYBOARD)
nEventMask |= NSKeyDownMask | NSKeyUpMask | NSFlagsChangedMask;
if( nType & INPUT_OTHER)
nEventMask |= NSTabletPoint;
diff --git a/vcl/inc/vcl/apptypes.hxx b/vcl/inc/vcl/apptypes.hxx
index 42273f6..a52b2e9 100644
--- a/vcl/inc/vcl/apptypes.hxx
+++ b/vcl/inc/vcl/apptypes.hxx
@@ -55,13 +55,13 @@ public:
TYPEINFO();
};
-#define INPUT_MOUSE 0x0001
-#define INPUT_KEYBOARD 0x0002
+#define VCL_INPUT_MOUSE 0x0001
+#define VCL_INPUT_KEYBOARD 0x0002
#define INPUT_PAINT 0x0004
#define INPUT_TIMER 0x0008
#define INPUT_OTHER 0x0010
#define INPUT_APPEVENT 0x0020
-#define INPUT_MOUSEANDKEYBOARD (INPUT_MOUSE | INPUT_KEYBOARD)
+#define INPUT_MOUSEANDKEYBOARD (VCL_INPUT_MOUSE | VCL_INPUT_KEYBOARD)
#define INPUT_ANY (INPUT_MOUSEANDKEYBOARD | INPUT_PAINT | INPUT_TIMER | INPUT_OTHER | INPUT_APPEVENT)
#define DISPATCH_OPEN 0x0001
diff --git a/vcl/unx/generic/app/salinst.cxx b/vcl/unx/generic/app/salinst.cxx
index 83a9e07..dfddcd9 100644
--- a/vcl/unx/generic/app/salinst.cxx
+++ b/vcl/unx/generic/app/salinst.cxx
@@ -170,12 +170,12 @@ Bool ImplPredicateEvent( Display *, XEvent *pEvent, char *pData )
case MotionNotify:
case EnterNotify:
case LeaveNotify:
- nType = INPUT_MOUSE;
+ nType = VCL_INPUT_MOUSE;
break;
case XLIB_KeyPress:
//case KeyRelease:
- nType = INPUT_KEYBOARD;
+ nType = VCL_INPUT_KEYBOARD;
break;
case Expose:
case GraphicsExpose:
diff --git a/vcl/win/source/app/salinst.cxx b/vcl/win/source/app/salinst.cxx
index a0d41a6..10655ef 100644
--- a/vcl/win/source/app/salinst.cxx
+++ b/vcl/win/source/app/salinst.cxx
@@ -921,7 +921,7 @@ bool WinSalInstance::AnyInput( sal_uInt16 nType )
return true;
}
- if ( nType & INPUT_KEYBOARD )
+ if ( nType & VCL_INPUT_KEYBOARD )
{
// Test for key input
if ( ImplPeekMessage( &aMsg, 0, WM_KEYDOWN, WM_KEYDOWN,
--
1.7.5.4
--------------000808050303060407050800--
More information about the LibreOffice
mailing list