[Libreoffice-commits] .: vcl/aqua vcl/source vcl/unx

Josh Heidenreich jheidenreich at kemper.freedesktop.org
Tue Feb 21 14:40:00 PST 2012


 vcl/aqua/source/app/salinst.cxx    |    3 ---
 vcl/aqua/source/window/salmenu.cxx |    2 +-
 vcl/source/app/svdata.cxx          |   14 --------------
 vcl/source/window/winproc.cxx      |   12 ++----------
 vcl/unx/gtk/window/gtkframe.cxx    |   11 -----------
 5 files changed, 3 insertions(+), 39 deletions(-)

New commits:
commit 936ebcfa4b44a90bdc8789ce7556f1ba3599375c
Author: Josh Heidenreich <josh.sickmate at gmail.com>
Date:   Tue Feb 21 13:06:11 2012 +1030

    EasyHack fdo#46258 Removal of VCL testtool support (-enableautomation option)

diff --git a/vcl/aqua/source/app/salinst.cxx b/vcl/aqua/source/app/salinst.cxx
index adae096..7a01b0b 100644
--- a/vcl/aqua/source/app/salinst.cxx
+++ b/vcl/aqua/source/app/salinst.cxx
@@ -206,9 +206,6 @@ static void initNSApp()
                                            selector: @selector(applicationWillResignActive:)
                                            name: @"AppleRemoteWillResignActive"
                                            object: nil ];
-
-    if( ImplGetSVData()->mbIsTestTool )
-        [NSApp activateIgnoringOtherApps: YES];
 }
 
 sal_Bool ImplSVMainHook( int * pnInit )
diff --git a/vcl/aqua/source/window/salmenu.cxx b/vcl/aqua/source/window/salmenu.cxx
index 23d0180..f358e47 100644
--- a/vcl/aqua/source/window/salmenu.cxx
+++ b/vcl/aqua/source/window/salmenu.cxx
@@ -542,7 +542,7 @@ sal_Bool AquaSalMenu::VisibleMenuBar()
 
     static const char *pExperimental = getenv ("AQUA_NATIVE_MENUS");
 
-    if ( ImplGetSVData()->mbIsTestTool || (pExperimental && !strcasecmp(pExperimental, "FALSE")) )
+    if ( pExperimental && !strcasecmp(pExperimental, "FALSE") )
         return sal_False;
 
     // End of experimental code enable/disable part
diff --git a/vcl/source/app/svdata.cxx b/vcl/source/app/svdata.cxx
index 84b2df0..3c2222d 100644
--- a/vcl/source/app/svdata.cxx
+++ b/vcl/source/app/svdata.cxx
@@ -121,20 +121,6 @@ void ImplInitSVData()
     pImplSVData->maHelpData.mbAutoHelpId = sal_True;
     pImplSVData->maNWFData.maMenuBarHighlightTextColor = Color( COL_TRANSPARENT );
 
-    // find out whether we are running in the testtool
-    // in this case we need some special workarounds
-    sal_uInt32 nArgs = osl_getCommandArgCount();
-    for( sal_uInt32 i = 0; i < nArgs; i++ )
-    {
-        rtl::OUString aArg;
-        osl_getCommandArg( i, &aArg.pData );
-        if( aArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-enableautomation" ) ) )
-        {
-            pImplSVData->mbIsTestTool = true;
-            break;
-        }
-    }
-
     // mark default layout border as unitialized
     pImplSVData->maAppData.mnDefaultLayoutBorder = -1;
 }
diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx
index a306fa5..504b753 100644
--- a/vcl/source/window/winproc.cxx
+++ b/vcl/source/window/winproc.cxx
@@ -1851,15 +1851,11 @@ static void ImplHandleGetFocus( Window* pWindow )
     // do not blink when they receive focus
     if ( !pWindow->ImplGetWindowImpl()->mpFrameData->mnFocusId )
     {
-        bool bCallDirect = ImplGetSVData()->mbIsTestTool;
         pWindow->ImplGetWindowImpl()->mpFrameData->mbStartFocusState = !pWindow->ImplGetWindowImpl()->mpFrameData->mbHasFocus;
-        if( ! bCallDirect )
-            Application::PostUserEvent( pWindow->ImplGetWindowImpl()->mpFrameData->mnFocusId, LINK( pWindow, Window, ImplAsyncFocusHdl ) );
+        Application::PostUserEvent( pWindow->ImplGetWindowImpl()->mpFrameData->mnFocusId, LINK( pWindow, Window, ImplAsyncFocusHdl ) );
         Window* pFocusWin = pWindow->ImplGetWindowImpl()->mpFrameData->mpFocusWin;
         if ( pFocusWin && pFocusWin->ImplGetWindowImpl()->mpCursor )
             pFocusWin->ImplGetWindowImpl()->mpCursor->ImplShow();
-        if( bCallDirect )
-            pWindow->ImplAsyncFocusHdl( NULL );
     }
 }
 
@@ -1892,19 +1888,15 @@ static void ImplHandleLoseFocus( Window* pWindow )
 
     // execute Focus-Events after a delay, such that SystemChildWindows
     // do not flicker when they receive focus
-    bool bCallDirect = ImplGetSVData()->mbIsTestTool;
     if ( !pWindow->ImplGetWindowImpl()->mpFrameData->mnFocusId )
     {
         pWindow->ImplGetWindowImpl()->mpFrameData->mbStartFocusState = !pWindow->ImplGetWindowImpl()->mpFrameData->mbHasFocus;
-        if( ! bCallDirect )
-            Application::PostUserEvent( pWindow->ImplGetWindowImpl()->mpFrameData->mnFocusId, LINK( pWindow, Window, ImplAsyncFocusHdl ) );
+        Application::PostUserEvent( pWindow->ImplGetWindowImpl()->mpFrameData->mnFocusId, LINK( pWindow, Window, ImplAsyncFocusHdl ) );
     }
 
     Window* pFocusWin = pWindow->ImplGetWindowImpl()->mpFrameData->mpFocusWin;
     if ( pFocusWin && pFocusWin->ImplGetWindowImpl()->mpCursor )
         pFocusWin->ImplGetWindowImpl()->mpCursor->ImplHide();
-    if( bCallDirect )
-        pWindow->ImplAsyncFocusHdl( NULL );
 }
 
 // -----------------------------------------------------------------------
diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx
index 7f4db68..7384a73 100644
--- a/vcl/unx/gtk/window/gtkframe.cxx
+++ b/vcl/unx/gtk/window/gtkframe.cxx
@@ -3228,17 +3228,6 @@ gboolean GtkSalFrame::signalMap( GtkWidget *pWidget, GdkEvent*, gpointer frame )
 
     bool bSetFocus = pThis->m_bSetFocusOnMap;
     pThis->m_bSetFocusOnMap = false;
-    if( ImplGetSVData()->mbIsTestTool )
-    {
-        /* #i76541# testtool needs the focus to be in a new document
-        *  however e.g. metacity does not necessarily put the focus into
-        *  a newly shown window. An extra little hint seems to help here.
-        *  however we don't want to interfere with the normal user experience
-        *  so this is done when running in testtool only
-        */
-        if( ! pThis->m_pParent && (pThis->m_nStyle & SAL_FRAME_STYLE_MOVEABLE) != 0 )
-            bSetFocus = true;
-    }
 
 #if !GTK_CHECK_VERSION(3,0,0)
     if( bSetFocus )


More information about the Libreoffice-commits mailing list