summaryrefslogtreecommitdiffstats
path: root/vcl/source/app
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/app')
-rw-r--r--vcl/source/app/help.cxx28
-rw-r--r--vcl/source/app/settings.cxx40
-rw-r--r--vcl/source/app/svapp.cxx147
-rw-r--r--vcl/source/app/svdata.cxx17
-rw-r--r--vcl/source/app/svmainhook.cxx78
5 files changed, 6 insertions, 304 deletions
diff --git a/vcl/source/app/help.cxx b/vcl/source/app/help.cxx
index 75bab1a29694..3db6bcc841bf 100644
--- a/vcl/source/app/help.cxx
+++ b/vcl/source/app/help.cxx
@@ -112,27 +112,6 @@ sal_Bool Help::IsContextHelpEnabled()
// -----------------------------------------------------------------------
-sal_Bool Help::StartContextHelp()
-{
- ImplSVData* pSVData = ImplGetSVData();
-
- if ( pSVData->maHelpData.mbContextHelp )
- {
- Window* pWindow = pSVData->maWinData.mpFocusWin;
- if ( pWindow )
- {
- Point aMousePos = pWindow->OutputToScreenPixel( pWindow->GetPointerPosPixel() );
- HelpEvent aHelpEvent( aMousePos, HELPMODE_CONTEXT );
- pWindow->RequestHelp( aHelpEvent );
- return sal_True;
- }
- }
-
- return sal_False;
-}
-
-// -----------------------------------------------------------------------
-
void Help::EnableExtHelp()
{
ImplGetSVData()->maHelpData.mbExtHelp = sal_True;
@@ -191,13 +170,6 @@ sal_Bool Help::EndExtHelp()
// -----------------------------------------------------------------------
-sal_Bool Help::IsExtHelpActive()
-{
- return ImplGetSVData()->maHelpData.mbExtHelpMode;
-}
-
-// -----------------------------------------------------------------------
-
void Help::EnableBalloonHelp()
{
ImplGetSVData()->maHelpData.mbBalloonHelp = sal_True;
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index 9ffb8bc373da..1683faf1613a 100644
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -964,46 +964,6 @@ inline sal_Bool ImplIsBackOrWhite( const Color& rColor )
return ( nLuminance < 8 ) || ( nLuminance > 250 );
}
-sal_Bool StyleSettings::IsHighContrastBlackAndWhite() const
-{
- sal_Bool bBWOnly = sal_True;
-
- // Only use B&W if fully B&W, like on GNOME.
- // Some colors like CheckedColor and HighlightColor are not B&W in Windows Standard HC Black,
- // and we don't want to be B&W then, so check these color first, very probably not B&W.
-
- // Unfortunately, GNOME uses a very very dark color (0x000033) instead of BLACK (0x000000)
-
- if ( !ImplIsBackOrWhite( GetFaceColor() ) )
- bBWOnly = sal_False;
- else if ( !ImplIsBackOrWhite( GetHighlightTextColor() ) )
- bBWOnly = sal_False;
- else if ( !ImplIsBackOrWhite( GetWindowColor() ) )
- bBWOnly = sal_False;
- else if ( !ImplIsBackOrWhite( GetWindowTextColor() ) )
- bBWOnly = sal_False;
- else if ( !ImplIsBackOrWhite( GetButtonTextColor() ) )
- bBWOnly = sal_False;
- else if ( !ImplIsBackOrWhite( GetButtonTextColor() ) )
- bBWOnly = sal_False;
- else if ( !ImplIsBackOrWhite( GetGroupTextColor() ) )
- bBWOnly = sal_False;
- else if ( !ImplIsBackOrWhite( GetLabelTextColor() ) )
- bBWOnly = sal_False;
- else if ( !ImplIsBackOrWhite( GetDialogColor() ) )
- bBWOnly = sal_False;
- else if ( !ImplIsBackOrWhite( GetFieldColor() ) )
- bBWOnly = sal_False;
- else if ( !ImplIsBackOrWhite( GetMenuColor() ) )
- bBWOnly = sal_False;
- else if ( !ImplIsBackOrWhite( GetMenuBarColor() ) )
- bBWOnly = sal_False;
- else if ( !ImplIsBackOrWhite( GetMenuHighlightColor() ) )
- bBWOnly = sal_False;
-
- return bBWOnly;
-}
-
// -----------------------------------------------------------------------
sal_Bool StyleSettings::operator ==( const StyleSettings& rSet ) const
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index fe536addac98..9d54803f7f3b 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -241,12 +241,6 @@ Application::~Application()
// -----------------------------------------------------------------------
-void Application::InitAppRes( const ResId& )
-{
-}
-
-// -----------------------------------------------------------------------
-
sal_Bool Application::QueryExit()
{
WorkWindow* pAppWin = ImplGetSVData()->maWinData.mpAppWin;
@@ -417,18 +411,6 @@ const KeyCode* Application::GetReservedKeyCode( sal_uLong i )
return &ImplReservedKeys::get()->first[i].mKeyCode;
}
-String Application::GetReservedKeyCodeDescription( sal_uLong i )
-{
- ResMgr* pResMgr = ImplGetResMgr();
- if( ! pResMgr )
- return String();
- ImplReservedKey *pImplReservedKeys = ImplReservedKeys::get()->first;
- if( i >= GetReservedKeyCodeCount() || ! pImplReservedKeys[i].mnResId )
- return String();
- else
- return String( ResId( pImplReservedKeys[i].mnResId, *pResMgr ) );
-}
-
// -----------------------------------------------------------------------
void Application::Execute()
@@ -561,13 +543,6 @@ sal_Bool Application::IsInExecute()
// -----------------------------------------------------------------------
-sal_Bool Application::IsShutDown()
-{
- return ImplGetSVData()->maAppData.mbAppQuit;
-}
-
-// -----------------------------------------------------------------------
-
sal_Bool Application::IsInModalMode()
{
return (ImplGetSVData()->maAppData.mnModalMode != 0);
@@ -621,34 +596,6 @@ sal_Bool Application::IsUICaptured()
// -----------------------------------------------------------------------
-sal_Bool Application::IsUserActive( sal_uInt16 nTest )
-{
- if ( nTest & (USERACTIVE_MOUSEDRAG | USERACTIVE_INPUT) )
- {
- if ( IsUICaptured() )
- return sal_True;
- }
-
- if ( nTest & USERACTIVE_INPUT )
- {
- if ( GetLastInputInterval() < 500 )
- return sal_True;
-
- if ( AnyInput( INPUT_KEYBOARD ) )
- return sal_True;
- }
-
- if ( nTest & USERACTIVE_MODALDIALOG )
- {
- if ( ImplGetSVData()->maAppData.mnModalDialog )
- return sal_True;
- }
-
- return sal_False;
-}
-
-// -----------------------------------------------------------------------
-
void Application::SystemSettingsChanging( AllSettings& /*rSettings*/,
Window* /*pFrame*/ )
{
@@ -1465,16 +1412,6 @@ void Application::RemoveAccel( Accelerator* pAccel )
// -----------------------------------------------------------------------
-void Application::FlushAccel()
-{
- ImplSVData* pSVData = ImplGetSVData();
-
- if ( pSVData->maAppData.mpAccelMgr )
- pSVData->maAppData.mpAccelMgr->FlushAccel();
-}
-
-// -----------------------------------------------------------------------
-
sal_Bool Application::CallAccel( const KeyCode& rKeyCode, sal_uInt16 nRepeat )
{
ImplSVData* pSVData = ImplGetSVData();
@@ -1547,13 +1484,6 @@ void Application::SetDialogScaleX( short nScale )
// -----------------------------------------------------------------------
-short Application::GetDialogScaleX()
-{
- return ImplGetSVData()->maAppData.mnDialogScaleX;
-}
-
-// -----------------------------------------------------------------------
-
void Application::SetDefDialogParent( Window* pWindow )
{
ImplGetSVData()->maWinData.mpDefDialogParent = pWindow;
@@ -1675,19 +1605,6 @@ const String& Application::GetFontPath()
// -----------------------------------------------------------------------
-void Application::SetFontPath( const String& rPath )
-{
- ImplSVData* pSVData = ImplGetSVData();
-
- // if it doesn't exist create a new one
- if( !pSVData->maAppData.mpFontPath )
- pSVData->maAppData.mpFontPath = new String( rPath );
- else
- *(pSVData->maAppData.mpFontPath) = rPath;
-}
-
-// -----------------------------------------------------------------------
-
UniqueItemId Application::CreateUniqueId()
{
ImplSVData* pSVData = ImplGetSVData();
@@ -1813,47 +1730,6 @@ void ImplFreeHotKeyData()
// -----------------------------------------------------------------------
-sal_uIntPtr Application::AddHotKey( const KeyCode& rKeyCode, const Link& rLink, void* pData )
-{
- ImplSVData* pSVData = ImplGetSVData();
- ImplHotKey* pHotKeyData = new ImplHotKey;
- pHotKeyData->mpUserData = pData;
- pHotKeyData->maKeyCode = rKeyCode;
- pHotKeyData->maLink = rLink;
- pHotKeyData->mpNext = pSVData->maAppData.mpFirstHotKey;
- pSVData->maAppData.mpFirstHotKey = pHotKeyData;
- return (sal_uIntPtr)pHotKeyData;
-}
-
-// -----------------------------------------------------------------------
-
-void Application::RemoveHotKey( sal_uIntPtr nId )
-{
- ImplSVData* pSVData = ImplGetSVData();
- ImplHotKey* pFindHotKeyData = (ImplHotKey*)nId;
- ImplHotKey* pPrevHotKeyData = NULL;
- ImplHotKey* pHotKeyData = pSVData->maAppData.mpFirstHotKey;
- while ( pHotKeyData )
- {
- if ( pHotKeyData == pFindHotKeyData )
- {
- if ( pPrevHotKeyData )
- pPrevHotKeyData->mpNext = pFindHotKeyData->mpNext;
- else
- pSVData->maAppData.mpFirstHotKey = pFindHotKeyData->mpNext;
- delete pFindHotKeyData;
- break;
- }
-
- pPrevHotKeyData = pHotKeyData;
- pHotKeyData = pHotKeyData->mpNext;
- }
-
- DBG_ASSERT( pHotKeyData, "Application::RemoveHotKey() - HotKey is not added" );
-}
-
-// -----------------------------------------------------------------------
-
void ImplFreeEventHookData()
{
ImplSVData* pSVData = ImplGetSVData();
@@ -1931,20 +1807,6 @@ long Application::CallEventHooks( NotifyEvent& rEvt )
// -----------------------------------------------------------------------
-long Application::CallPreNotify( NotifyEvent& rEvt )
-{
- return ImplCallPreNotify( rEvt );
-}
-
-// -----------------------------------------------------------------------
-
-long Application::CallEvent( NotifyEvent& rEvt )
-{
- return ImplCallEvent( rEvt );
-}
-
-// -----------------------------------------------------------------------
-
const LocaleDataWrapper& Application::GetAppLocaleDataWrapper()
{
return GetSettings().GetLocaleDataWrapper();
@@ -2020,11 +1882,6 @@ void Application::AddToRecentDocumentList(const rtl::OUString& rFileUrl, const r
pSVData->mpDefInst->AddToRecentDocumentList(rFileUrl, rMimeType);
}
-sal_Bool Application::IsAccessibilityEnabled()
-{
- return sal_False;
-}
-
sal_Bool InitAccessBridge( sal_Bool bShowCancel, sal_Bool &rCancelled )
{
sal_Bool bRet = true;
@@ -2067,13 +1924,9 @@ void Application::Property( ApplicationProperty& rProp )
void Application::SetPropertyHandler( PropertyHandler* p )
{
- if ( pHandler )
- delete pHandler;
pHandler = p;
}
-
-
void Application::AppEvent( const ApplicationEvent& /*rAppEvent*/ )
{
}
diff --git a/vcl/source/app/svdata.cxx b/vcl/source/app/svdata.cxx
index 7648dbbae75c..10f7e50d9aad 100644
--- a/vcl/source/app/svdata.cxx
+++ b/vcl/source/app/svdata.cxx
@@ -410,8 +410,7 @@ bool ImplInitAccessBridge(sal_Bool bAllowCancel, sal_Bool &rCancelled)
return bSuccess;
}
-
- catch(::com::sun::star::java::JavaNotConfiguredException e)
+ catch (const ::com::sun::star::java::JavaNotConfiguredException&)
{
ResMgr *pResMgr = ImplGetResMgr();
if( bErrorMessage && bAllowCancel && pResMgr )
@@ -435,8 +434,7 @@ bool ImplInitAccessBridge(sal_Bool bAllowCancel, sal_Bool &rCancelled)
return false;
}
-
- catch(::com::sun::star::java::JavaVMCreationFailureException e)
+ catch (const ::com::sun::star::java::JavaVMCreationFailureException&)
{
ResMgr *pResMgr = ImplGetResMgr();
if( bErrorMessage && bAllowCancel && pResMgr )
@@ -460,8 +458,7 @@ bool ImplInitAccessBridge(sal_Bool bAllowCancel, sal_Bool &rCancelled)
return false;
}
-
- catch(::com::sun::star::java::MissingJavaRuntimeException e)
+ catch (const ::com::sun::star::java::MissingJavaRuntimeException&)
{
ResMgr *pResMgr = ImplGetResMgr();
if( bErrorMessage && bAllowCancel && pResMgr )
@@ -485,8 +482,7 @@ bool ImplInitAccessBridge(sal_Bool bAllowCancel, sal_Bool &rCancelled)
return false;
}
-
- catch(::com::sun::star::java::JavaDisabledException e)
+ catch (const ::com::sun::star::java::JavaDisabledException&)
{
ResMgr *pResMgr = ImplGetResMgr();
if( bErrorMessage && bAllowCancel && pResMgr )
@@ -510,9 +506,7 @@ bool ImplInitAccessBridge(sal_Bool bAllowCancel, sal_Bool &rCancelled)
return false;
}
-
-
- catch(::com::sun::star::uno::RuntimeException e)
+ catch (const ::com::sun::star::uno::RuntimeException& e)
{
ResMgr *pResMgr = ImplGetResMgr();
if( bErrorMessage && pResMgr )
@@ -564,7 +558,6 @@ bool ImplInitAccessBridge(sal_Bool bAllowCancel, sal_Bool &rCancelled)
return false;
}
-
catch (...)
{
return false;
diff --git a/vcl/source/app/svmainhook.cxx b/vcl/source/app/svmainhook.cxx
index dd446125a7aa..47c3854a2987 100644
--- a/vcl/source/app/svmainhook.cxx
+++ b/vcl/source/app/svmainhook.cxx
@@ -31,89 +31,13 @@
#include <tools/tools.h>
#ifndef MACOSX
+// MacOSX implementation of ImplSVMainHook is in aqua/source/app/salinst.cxx
sal_Bool ImplSVMainHook( int * )
{
return sal_False; // indicate that ImplSVMainHook is not implemented
}
-#else
-// MACOSX cocoa implementation of ImplSVMainHook is in aqua/source/app/salinst.cxx
-#ifndef QUARTZ // MACOSX (X11) needs the CFRunLoop()
-#include <osl/thread.h>
-#include <premac.h>
-#include <CoreFoundation/CoreFoundation.h>
-#include <postmac.h>
-#include <unistd.h>
-
-extern sal_Bool ImplSVMain();
-
-// ============================================================================
-
-
-static void SourceContextCallBack( void *pInfo )
-{
-}
-
-struct ThreadContext
-{
- int* pRet;
- CFRunLoopRef* pRunLoopRef;
-};
-
-static void RunSVMain(void *pData)
-{
- ThreadContext* tcx = reinterpret_cast<ThreadContext*>(pData);
-
- // busy waiting (ok in this case) until the run loop is
- // running
- while (!CFRunLoopIsWaiting(*tcx->pRunLoopRef))
- usleep(100);
-
- *tcx->pRet = ImplSVMain();
-
- // Force exit since some JVMs won't shutdown when only exit() is invoked
- _exit( 0 );
-}
-
-sal_Bool ImplSVMainHook( int *pnInit )
-{
- // Mac OS X requires that any Cocoa code have a CFRunLoop started in the
- // primordial thread. Since all of the AWT classes in Java 1.4 and higher
- // are written in Cocoa, we need to start the CFRunLoop here and run
- // ImplSVMain() in a secondary thread.
- // See http://developer.apple.com/samplecode/simpleJavaLauncher/listing3.html
- // for further details and an example
-
- CFRunLoopRef runLoopRef = CFRunLoopGetCurrent();
- ThreadContext tcx;
- tcx.pRet = pnInit; // the return value
- tcx.pRunLoopRef = &runLoopRef;
- oslThread hThreadID = osl_createThread(RunSVMain, &tcx);
-
- // Start the CFRunLoop
- CFRunLoopSourceContext aSourceContext;
- aSourceContext.version = 0;
- aSourceContext.info = NULL;
- aSourceContext.retain = NULL;
- aSourceContext.release = NULL;
- aSourceContext.copyDescription = NULL;
- aSourceContext.equal = NULL;
- aSourceContext.hash = NULL;
- aSourceContext.schedule = NULL;
- aSourceContext.cancel = NULL;
- aSourceContext.perform = &SourceContextCallBack;
- CFRunLoopSourceRef aSourceRef = CFRunLoopSourceCreate(NULL, 0, &aSourceContext);
- CFRunLoopAddSource(runLoopRef, aSourceRef, kCFRunLoopCommonModes);
- CFRunLoopRun();
-
- osl_joinWithThread( hThreadID );
- osl_destroyThread( hThreadID );
-
- return sal_True; // indicate that ImplSVMainHook is implemented
-}
-
-#endif // MACOSX
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */