Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


Hi Michael

Em 21-10-2011 17:51, Michael Meeks escreveu:
Hi Olivier,

On Fri, 2011-10-21 at 17:15 -0200, Olivier Hallot wrote:
If you had more time, cleaning up the whole enumeration to be VCL_ prefixed would be nice too,

Here is the patch to clean further, as requested.

Kind regards

--
Olivier Hallot
Founder, Steering Commitee Member - The Document Foundation
LibreOffice translation leader for Brazilian Portuguese
+55-21-8822-8812

From 68f5ca48f074471e9a12543a9576d3d668729d30 Mon Sep 17 00:00:00 2001
From: Olivier Hallot <olivier.hallot@alta.org.br>
Date: Sat, 22 Oct 2011 07:58:16 -0200
Subject: [PATCH] Fix for fdo41997 continuation of VCL cleanup

---
 basic/source/app/textedit.cxx        |    2 +-
 desktop/source/app/app.cxx           |    4 ++--
 sc/source/core/data/documen8.cxx     |    2 +-
 sc/source/ui/app/scmod.cxx           |    2 +-
 sd/source/ui/tools/IdleDetection.cxx |    2 +-
 sw/source/core/layout/layact.cxx     |   10 +++++-----
 sw/source/core/txtnode/txtedt.cxx    |    2 +-
 vcl/aqua/source/app/salinst.cxx      |   10 +++++-----
 vcl/inc/vcl/apptypes.hxx             |   12 ++++++------
 vcl/inc/vcl/svapp.hxx                |    2 +-
 vcl/ios/source/app/salinst.cxx       |    6 +++---
 vcl/unx/generic/app/salinst.cxx      |    6 +++---
 vcl/unx/headless/svpinst.cxx         |    2 +-
 vcl/win/source/app/salinst.cxx       |   10 +++++-----
 14 files changed, 36 insertions(+), 36 deletions(-)

diff --git a/basic/source/app/textedit.cxx b/basic/source/app/textedit.cxx
index 8c8ea68..a2226bd 100644
--- a/basic/source/app/textedit.cxx
+++ b/basic/source/app/textedit.cxx
@@ -370,7 +370,7 @@ IMPL_LINK( TextEditImp, SyntaxTimerHdl, Timer *, EMPTYARG )
 
     bHighlightning = sal_True;
     sal_uInt16 nLine;
-    while ( aSyntaxLineTable.First() && !Application::AnyInput( INPUT_MOUSEANDKEYBOARD ) )
+    while ( aSyntaxLineTable.First() && !Application::AnyInput( VCL_INPUT_MOUSEANDKEYBOARD ) )
     {
         nLine = (sal_uInt16)aSyntaxLineTable.GetCurKey();
         DoSyntaxHighlight( nLine );
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index fb1da91..b63ee06 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -1784,7 +1784,7 @@ int Desktop::Main()
                 (SvtModuleOptions().IsModuleInstalled(SvtModuleOptions::E_SSTARTMODULE)) &&
                 (!bExistsRecoveryData                                                  ) &&
                 (!bExistsSessionData                                                   ) &&
-                (!Application::AnyInput( INPUT_APPEVENT )                              ))
+                (!Application::AnyInput( VCL_INPUT_APPEVENT )                          ))
             {
                  RTL_LOGFILE_CONTEXT_TRACE( aLog, "{ create BackingComponent" );
                  Reference< XFrame > xDesktopFrame( xDesktop, UNO_QUERY );
@@ -2875,7 +2875,7 @@ void Desktop::OpenClients()
     if ( xList->hasElements() || rArgs.IsServer() )
         return;
 
-    if ( rArgs.IsQuickstart() || rArgs.IsInvisible() || rArgs.IsBean() || Application::AnyInput( 
INPUT_APPEVENT ) )
+    if ( rArgs.IsQuickstart() || rArgs.IsInvisible() || rArgs.IsBean() || Application::AnyInput( 
VCL_INPUT_APPEVENT ) )
         // soffice was started as tray icon ...
         return;
     {
diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx
index 5f0ca06..61dc837 100644
--- a/sc/source/core/data/documen8.cxx
+++ b/sc/source/core/data/documen8.cxx
@@ -450,7 +450,7 @@ void ScDocument::InvalidateTextWidth( const ScAddress* pAdrFrom, const ScAddress
 //------------------------------------------------------------------------
 
 #define CALCMAX                 1000    // Berechnungen
-#define ABORT_EVENTS            (INPUT_ANY & ~INPUT_TIMER & ~INPUT_OTHER)
+#define ABORT_EVENTS            (VCL_INPUT_ANY & ~VCL_INPUT_TIMER & ~VCL_INPUT_OTHER)
 
 sal_Bool ScDocument::IdleCalcTextWidth()            // sal_True = demnaechst wieder versuchen
 {
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index b4284e7..fe71636 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -1822,7 +1822,7 @@ void lcl_CheckNeedsRepaint( ScDocShell* pDocShell )
 
 IMPL_LINK( ScModule, IdleHandler, Timer*, EMPTYARG )
 {
-    if ( Application::AnyInput( INPUT_MOUSEANDKEYBOARD ) )
+    if ( Application::AnyInput( VCL_INPUT_MOUSEANDKEYBOARD ) )
     {
         aIdleTimer.Start();         // Timeout unveraendert
         return 0;
diff --git a/sd/source/ui/tools/IdleDetection.cxx b/sd/source/ui/tools/IdleDetection.cxx
index e0fba1a..f7d3857 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(VCL_INPUT_MOUSE | VCL_INPUT_KEYBOARD | INPUT_PAINT))
+    if (GetpApp()->AnyInput(VCL_INPUT_MOUSE | VCL_INPUT_KEYBOARD | VCL_INPUT_PAINT))
         return IDET_SYSTEM_EVENT_PENDING;
     else
         return IDET_IDLE;
diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx
index 70bfd1a..f48061b 100644
--- a/sw/source/core/layout/layact.cxx
+++ b/sw/source/core/layout/layact.cxx
@@ -2127,13 +2127,13 @@ sal_Bool SwLayIdle::_DoIdleJob( const SwCntntFrm *pCnt, IdleJobType eJob )
                     bAllValid = sal_False;
                 if ( aRepaint.HasArea() )
                     pImp->GetShell()->InvalidateWindows( aRepaint );
-                if ( Application::AnyInput( INPUT_MOUSEANDKEYBOARD|INPUT_OTHER|INPUT_PAINT ) )
+                if ( Application::AnyInput( 
VCL_INPUT_MOUSEANDKEYBOARD|VCL_INPUT_OTHER|VCL_INPUT_PAINT ) )
                     return sal_True;
                 break;
             }
             case AUTOCOMPLETE_WORDS :
                 ((SwTxtFrm*)pCnt)->CollectAutoCmplWrds( pCntntNode, nTxtPos );
-                if ( Application::AnyInput( INPUT_ANY ) )
+                if ( Application::AnyInput( VCL_INPUT_ANY ) )
                     return sal_True;
                 break;
             case WORD_COUNT :
@@ -2141,7 +2141,7 @@ sal_Bool SwLayIdle::_DoIdleJob( const SwCntntFrm *pCnt, IdleJobType eJob )
                 const xub_StrLen nEnd = pTxtNode->GetTxt().Len();
                 SwDocStat aStat;
                 pTxtNode->CountWords( aStat, 0, nEnd );
-                if ( Application::AnyInput( INPUT_ANY ) )
+                if ( Application::AnyInput( VCL_INPUT_ANY ) )
                     return sal_True;
                 break;
             }
@@ -2153,7 +2153,7 @@ sal_Bool SwLayIdle::_DoIdleJob( const SwCntntFrm *pCnt, IdleJobType eJob )
                     bAllValid = sal_False;
                 if ( aRepaint.HasArea() )
                     pImp->GetShell()->InvalidateWindows( aRepaint );
-                if ( Application::AnyInput( INPUT_MOUSEANDKEYBOARD|INPUT_OTHER|INPUT_PAINT ) )
+                if ( Application::AnyInput( 
VCL_INPUT_MOUSEANDKEYBOARD|VCL_INPUT_OTHER|VCL_INPUT_PAINT ) )
                     return sal_True;
                 break;
             }
@@ -2360,7 +2360,7 @@ SwLayIdle::SwLayIdle( SwRootFrm *pRt, SwViewImp *pI ) :
         } while ( pSh != pImp->GetShell() );
 
         SwLayAction aAction( pRoot, pImp );
-        aAction.SetInputType( INPUT_ANY );
+        aAction.SetInputType( VCL_INPUT_ANY );
         aAction.SetIdle( sal_True );
         aAction.SetWaitAllowed( sal_False );
         aAction.Action();
diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx
index f63826c..0c70225 100644
--- a/sw/source/core/txtnode/txtedt.cxx
+++ b/sw/source/core/txtnode/txtedt.cxx
@@ -1436,7 +1436,7 @@ void SwTxtFrm::CollectAutoCmplWrds( SwCntntNode* pActNode, xub_StrLen nActPos 
)
             }
             if( !--nCnt )
             {
-                if ( Application::AnyInput( INPUT_ANY ) )
+                if ( Application::AnyInput( VCL_INPUT_ANY ) )
                     return;
                 nCnt = 100;
             }
diff --git a/vcl/aqua/source/app/salinst.cxx b/vcl/aqua/source/app/salinst.cxx
index 63d657c..4ef19f9 100644
--- a/vcl/aqua/source/app/salinst.cxx
+++ b/vcl/aqua/source/app/salinst.cxx
@@ -854,15 +854,15 @@ void AquaSalInstance::Yield( bool bWait, bool bHandleAllCurrentEvents )
 
 bool AquaSalInstance::AnyInput( sal_uInt16 nType )
 {
-    if( nType & INPUT_APPEVENT )
+    if( nType & VCL_INPUT_APPEVENT )
     {
         if( ! aAppEventList.empty() )
             return true;
-        if( nType == INPUT_APPEVENT )
+        if( nType == VCL_INPUT_APPEVENT )
             return false;
     }
 
-    if( nType & INPUT_TIMER )
+    if( nType & VCL_INPUT_TIMER )
     {
         if( AquaSalTimer::pRunningTimer )
         {
@@ -885,9 +885,9 @@ bool AquaSalInstance::AnyInput( sal_uInt16 nType )
             NSMouseEnteredMask | NSMouseExitedMask;
     if( nType & VCL_INPUT_KEYBOARD)
         nEventMask |= NSKeyDownMask | NSKeyUpMask | NSFlagsChangedMask;
-    if( nType & INPUT_OTHER)
+    if( nType & VCL_INPUT_OTHER)
         nEventMask |= NSTabletPoint;
-    // TODO: INPUT_PAINT / more INPUT_OTHER
+    // TODO: VCL_INPUT_PAINT / more VCL_INPUT_OTHER
     if( !nType)
         return false;
 
diff --git a/vcl/inc/vcl/apptypes.hxx b/vcl/inc/vcl/apptypes.hxx
index a52b2e9..e9f3dd7 100644
--- a/vcl/inc/vcl/apptypes.hxx
+++ b/vcl/inc/vcl/apptypes.hxx
@@ -57,12 +57,12 @@ public:
 
 #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      (VCL_INPUT_MOUSE | VCL_INPUT_KEYBOARD)
-#define INPUT_ANY                   (INPUT_MOUSEANDKEYBOARD | INPUT_PAINT | INPUT_TIMER | 
INPUT_OTHER | INPUT_APPEVENT)
+#define VCL_INPUT_PAINT                 0x0004
+#define VCL_INPUT_TIMER                 0x0008
+#define VCL_INPUT_OTHER                 0x0010
+#define VCL_INPUT_APPEVENT              0x0020
+#define VCL_INPUT_MOUSEANDKEYBOARD      (VCL_INPUT_MOUSE | VCL_INPUT_KEYBOARD)
+#define VCL_INPUT_ANY                   (VCL_INPUT_MOUSEANDKEYBOARD | VCL_INPUT_PAINT | 
VCL_INPUT_TIMER | VCL_INPUT_OTHER | VCL_INPUT_APPEVENT)
 
 #define DISPATCH_OPEN               0x0001
 #define DISPATCH_PRINT              0x0002
diff --git a/vcl/inc/vcl/svapp.hxx b/vcl/inc/vcl/svapp.hxx
index 07f75f5..1cc0a40 100644
--- a/vcl/inc/vcl/svapp.hxx
+++ b/vcl/inc/vcl/svapp.hxx
@@ -258,7 +258,7 @@ public:
     static sal_uInt16               GetModalModeCount();
 
     static sal_uInt16               GetDispatchLevel();
-    static sal_Bool                 AnyInput( sal_uInt16 nType = INPUT_ANY );
+    static sal_Bool                 AnyInput( sal_uInt16 nType = VCL_INPUT_ANY );
     static sal_uLong                GetLastInputInterval();
     static sal_Bool                 IsUICaptured();
 
diff --git a/vcl/ios/source/app/salinst.cxx b/vcl/ios/source/app/salinst.cxx
index f7c9685..e91e34f 100644
--- a/vcl/ios/source/app/salinst.cxx
+++ b/vcl/ios/source/app/salinst.cxx
@@ -521,15 +521,15 @@ void IosSalInstance::Yield( bool bWait, bool bHandleAllCurrentEvents )
 
 bool IosSalInstance::AnyInput( sal_uInt16 nType )
 {
-    if( nType & INPUT_APPEVENT )
+    if( nType & VCL_INPUT_APPEVENT )
     {
         if( ! aAppEventList.empty() )
             return true;
-        if( nType == INPUT_APPEVENT )
+        if( nType == VCL_INPUT_APPEVENT )
             return false;
     }
 
-    if( nType & INPUT_TIMER )
+    if( nType & VCL_INPUT_TIMER )
     {
         if( IosSalTimer::pRunningTimer )
         {
diff --git a/vcl/unx/generic/app/salinst.cxx b/vcl/unx/generic/app/salinst.cxx
index dfddcd9..7bbf29b 100644
--- a/vcl/unx/generic/app/salinst.cxx
+++ b/vcl/unx/generic/app/salinst.cxx
@@ -180,13 +180,13 @@ Bool ImplPredicateEvent( Display *, XEvent *pEvent, char *pData )
         case Expose:
         case GraphicsExpose:
         case NoExpose:
-            nType = INPUT_PAINT;
+            nType = VCL_INPUT_PAINT;
             break;
         default:
             nType = 0;
     }
 
-    if ( (nType & pPre->nType) || ( ! nType && (pPre->nType & INPUT_OTHER) ) )
+    if ( (nType & pPre->nType) || ( ! nType && (pPre->nType & VCL_INPUT_OTHER) ) )
         pPre->bRet = sal_True;
 
     return False;
@@ -199,7 +199,7 @@ bool X11SalInstance::AnyInput(sal_uInt16 nType)
     Display *pDisplay  = pSalData->GetDisplay()->GetDisplay();
     sal_Bool bRet = sal_False;
 
-    if( (nType & INPUT_TIMER) &&
+    if( (nType & VCL_INPUT_TIMER) &&
         pSalData->GetDisplay()->GetXLib()->CheckTimeout( false ) )
     {
         bRet = sal_True;
diff --git a/vcl/unx/headless/svpinst.cxx b/vcl/unx/headless/svpinst.cxx
index 41d268a..f038360 100644
--- a/vcl/unx/headless/svpinst.cxx
+++ b/vcl/unx/headless/svpinst.cxx
@@ -429,7 +429,7 @@ void SvpSalInstance::Yield( bool bWait, bool bHandleAllCurrentEvents )
 
 bool SvpSalInstance::AnyInput( sal_uInt16 nType )
 {
-    if( (nType & INPUT_TIMER) != 0 )
+    if( (nType & VCL_INPUT_TIMER) != 0 )
         return CheckTimeout( false );
     return false;
 }
diff --git a/vcl/win/source/app/salinst.cxx b/vcl/win/source/app/salinst.cxx
index 10655ef..caf0d27 100644
--- a/vcl/win/source/app/salinst.cxx
+++ b/vcl/win/source/app/salinst.cxx
@@ -904,7 +904,7 @@ bool WinSalInstance::AnyInput( sal_uInt16 nType )
 {
     MSG aMsg;
 
-    if ( (nType & (INPUT_ANY)) == (INPUT_ANY) )
+    if ( (nType & (VCL_INPUT_ANY)) == (VCL_INPUT_ANY) )
     {
         // revert bugfix for #108919# which never reported timeouts when called from the timer 
handler
         // which made the application completely unresponsive during background formatting
@@ -913,7 +913,7 @@ bool WinSalInstance::AnyInput( sal_uInt16 nType )
     }
     else
     {
-        if ( nType & INPUT_MOUSE )
+        if ( nType & VCL_INPUT_MOUSE )
         {
             // Test for mouse input
             if ( ImplPeekMessage( &aMsg, 0, WM_MOUSEFIRST, WM_MOUSELAST,
@@ -936,7 +936,7 @@ bool WinSalInstance::AnyInput( sal_uInt16 nType )
             }
         }
 
-        if ( nType & INPUT_PAINT )
+        if ( nType & VCL_INPUT_PAINT )
         {
             // Test for paint input
             if ( ImplPeekMessage( &aMsg, 0, WM_PAINT, WM_PAINT,
@@ -960,7 +960,7 @@ bool WinSalInstance::AnyInput( sal_uInt16 nType )
                 return true;
         }
 
-        if ( nType & INPUT_TIMER )
+        if ( nType & VCL_INPUT_TIMER )
         {
             // Test for timer input
             if ( ImplPeekMessage( &aMsg, 0, WM_TIMER, WM_TIMER,
@@ -969,7 +969,7 @@ bool WinSalInstance::AnyInput( sal_uInt16 nType )
 
         }
 
-        if ( nType & INPUT_OTHER )
+        if ( nType & VCL_INPUT_OTHER )
         {
             // Test for any input
             if ( ImplPeekMessage( &aMsg, 0, 0, 0, PM_NOREMOVE | PM_NOYIELD ) )
-- 
1.7.5.4


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.