summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2004-11-16 14:20:42 +0000
committerOliver Bolte <obo@openoffice.org>2004-11-16 14:20:42 +0000
commit46e12dcb5482cd70eedb25e6b678bad8578f22cc (patch)
tree8163c180ed062d74aa85add979f0f08476f1bcf2 /svtools
parent06fda387303570a3e712380dd3af3760aa690419 (diff)
INTEGRATION: CWS docking4 (1.2.78); FILE MERGED
2004/10/22 15:26:44 cd 1.2.78.3: #i34077# Support for toolbar button/sub-toolbar behavior 2004/09/20 13:13:35 cd 1.2.78.2: RESYNC: (1.2-1.3); FILE MERGED 2004/08/16 06:30:46 cd 1.2.78.1: #i32287# Provide key modifier information to dispatch
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/uno/toolboxcontroller.cxx33
1 files changed, 30 insertions, 3 deletions
diff --git a/svtools/source/uno/toolboxcontroller.cxx b/svtools/source/uno/toolboxcontroller.cxx
index 3810d4f30c9d..62a5e9b42211 100644
--- a/svtools/source/uno/toolboxcontroller.cxx
+++ b/svtools/source/uno/toolboxcontroller.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: toolboxcontroller.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: rt $ $Date: 2004-11-09 15:09:52 $
+ * last change: $Author: obo $ $Date: 2004-11-16 15:20:42 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -99,6 +99,13 @@
#include <miscopt.hxx>
#endif
+#ifndef _TOOLKIT_HELPER_VCLUNOHELPER_HXX_
+#include <toolkit/unohlp.hxx>
+#endif
+#ifndef _SV_TOOLBOX_HXX
+#include <vcl/toolbox.hxx>
+#endif
+
using namespace ::rtl;
using namespace ::cppu;
using namespace ::com::sun::star::awt;
@@ -404,7 +411,11 @@ throw (::com::sun::star::uno::RuntimeException)
try
{
com::sun::star::util::URL aTargetURL;
- Sequence<PropertyValue> aArgs;
+ Sequence<PropertyValue> aArgs( 1 );
+
+ // Provide key modifier information to dispatch function
+ aArgs[0].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "KeyModifier" ));
+ aArgs[0].Value = makeAny( KeyModifier );
aTargetURL.Complete = aCommandURL;
if ( m_pImpl->m_xUrlTransformer.is() )
@@ -697,6 +708,22 @@ sal_Bool ToolboxController::hasBigImages() const
return ( eOptSymbolSet == SFX_SYMBOLS_LARGE );
}
+sal_Bool ToolboxController::isHighContrast() const
+{
+ sal_Bool bHighContrast( sal_False );
+
+ Reference< XWindow > xWindow = m_pImpl->m_xParentWindow;
+ if ( xWindow.is() )
+ {
+ vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() );
+ Window* pWindow = VCLUnoHelper::GetWindow( xWindow );
+ if ( pWindow )
+ bHighContrast = ( ((ToolBox *)pWindow)->GetBackground().GetColor().IsDark() );
+ }
+
+ return bHighContrast;
+}
+
void ToolboxController::updateStatus()
{
bindListener();