summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Heidenreich <josh.sickmate@gmail.com>2012-02-21 13:06:11 +1030
committerJosh Heidenreich <josh.sickmate@gmail.com>2012-02-22 09:09:57 +1030
commit936ebcfa4b44a90bdc8789ce7556f1ba3599375c (patch)
tree226f48b0eae7ba432d4cc564cd407074ecf94173
parentb1073d9fa264139333704f82553ade9979e2ca24 (diff)
EasyHack fdo#46258 Removal of VCL testtool support (-enableautomation option)
-rw-r--r--vcl/aqua/source/app/salinst.cxx3
-rw-r--r--vcl/aqua/source/window/salmenu.cxx2
-rw-r--r--vcl/source/app/svdata.cxx14
-rw-r--r--vcl/source/window/winproc.cxx12
-rw-r--r--vcl/unx/gtk/window/gtkframe.cxx11
5 files changed, 3 insertions, 39 deletions
diff --git a/vcl/aqua/source/app/salinst.cxx b/vcl/aqua/source/app/salinst.cxx
index adae096e3e0c..7a01b0b0c102 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 23d01805af24..f358e47c743e 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 84b2df098220..3c2222d316ed 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 a306fa5bdbd7..504b75347d2f 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 7f4db68dd037..7384a735569b 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 )