summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRelease Engineers <releng@openoffice.org>2009-07-03 14:21:50 +0000
committerRelease Engineers <releng@openoffice.org>2009-07-03 14:21:50 +0000
commitfe2fc695df1238e16110f542762d48bdf624e049 (patch)
treee5c3395a1881887bb9d3eb66e570852d4ba608f8
parent12b49d3e687f56553ed5859ccd296dadc9b49c92 (diff)
CWS-TOOLING: integrate CWS dba32c
2009-06-29 20:53:25 +0200 fs r273484 : #i103138# Rectangle conversion 2009-06-29 20:51:50 +0200 fs r273483 : #i103138# yet more refactoring, now also setting the proper zoom level at the proper point in time 2009-06-29 13:40:26 +0200 fs r273470 : added svn:ignore to ignore output paths 2009-06-29 10:08:54 +0200 fs r273455 : #i103138# refactored the code for positioning/zooming the control Basically, we now allow adjustControlGeometry_throw (formerly known as positionControl_throw and setControlZoom) to take an additional ViewTransformation parameter, describing the transformation to obtain the actual control position/size. Consequently, positionControl itself also allows for a ViewTransformation parameter. This has become necessary since during painting, the device which we created our control for might not necessarily have a proper MapMode set. In this case, if we would use this map mode for calculating the control's position/size, this would lead to wrong results. Note that this problem was introduced by the fix for #i101398#: During the fix, we postponed the control creation to a later time (when it is really needed). At this later time, the MapMode at the device is broken, at the earlier time where we formerly crearted the control (createPrimitive2DSequence), it is not yet broken. Whether or not the MapMode is defined as "broken" might depend on one's point of view, however ... I consider it broken, since: - we need the map mode to obtain the proper zoom level, which is to be forwarded to the control - there are scenarios where the MapMode is *not* set to MAP_PIXEL (in those scenarios, everything works fine), and there are scenarios where it *is* set to MAP_PIXEL (in those the bug 103138 appears). It somehow feels wrong that one cannot rely on the device's map mode this way, but on the other hand one has no possibility to obtain the current zoom by other means. Note that one issue (still to be submitted) is left: In the page pane of a Draw/Impress document, controls have a wrong text size. This is because in this pane, the above-mentioned "broken" map mode is used, which means the controls have a zoom of "1:1" set, which is wrong here. 2009-06-25 13:41:35 +0200 msc r273380 : #100000# the tabs changed die to new properties 2009-06-24 12:42:40 +0200 msc r273330 : #102082# remove issue warning 2009-06-22 10:43:14 +0200 fs r273201 : createPrimitive2DSequence: care for being disposed 2009-06-18 12:35:13 +0200 oj r273109 : #i102305# make nooptfiles for gcc 2009-06-17 12:14:37 +0200 oj r273056 : #i102305# fix for linux 2009-06-17 07:20:22 +0200 oj r273046 : #i102305# move ValueTransfer into the for loop to avoid a crash under Linux 2009-06-17 07:17:28 +0200 oj r273045 : #i102305# use varchar 2009-06-15 14:11:27 +0200 fs r272983 : added since tag 2009-06-15 12:11:39 +0200 oj r272973 : #i102305# SAL_DLLPUBLIC_EXPORT inserted 2009-06-15 11:08:53 +0200 fs r272969 : #i10000# 2009-06-15 09:25:13 +0200 fs r272963 : merging fix for P1 issue #i102701# 2009-06-11 11:31:24 +0200 fs r272858 : #i10000# copied the fix which before the rebase was done in ../dialog/macropg.src 2009-06-11 09:38:14 +0200 fs r272846 : CWS-TOOLING: rebase CWS dba32c to trunk@272827 (milestone: DEV300:m50) 2009-06-02 09:53:10 +0200 fs r272483 : #i10000# 2009-05-29 15:55:03 +0200 fs r272465 : #i100818# 2009-05-29 12:58:43 +0200 fs r272452 : don't apply comphelper::getString on possibly VOID any 2009-05-29 10:38:35 +0200 oj r272437 : #i101519# handle where condition 2009-05-29 09:53:39 +0200 fs r272434 : #i100818# call into releaseStubs /without/ locked GlobalMutex 2009-05-28 07:53:44 +0200 oj r272375 : #i101369# parse tree changed 2009-05-27 14:53:36 +0200 fs r272347 : #i10000# 2009-05-27 09:29:15 +0200 oj r272327 : #i101626# check for double before hard cast 2009-05-27 09:13:58 +0200 oj r272326 : #i101626# handle void correctly 2009-05-27 08:04:39 +0200 oj r272321 : #i102256# wrong method signature used 2009-05-27 07:55:52 +0200 oj r272320 : #i101519# look up parameter typ if used in function 2009-05-27 06:49:07 +0200 oj r272319 : #i101519# set parameter from rowset as well 2009-05-26 13:30:56 +0200 oj r272297 : #i101987# impl XBatchExecution 2009-05-26 12:44:34 +0200 oj r272293 : #i101700# check if group is not set 2009-05-26 12:16:53 +0200 oj r272290 : #i101369# resolved some reduce7reduce problems with boolean_term and search_condition 2009-05-26 12:12:42 +0200 oj r272289 : #i101369# fix for or on one line criteria 2009-05-25 16:02:25 +0200 fs r272257 : #i999704# +PROPERTY_MOUSE_WHEEL_BEHAVIOR 2009-05-25 16:01:55 +0200 fs r272256 : merging the changes from CWS dba32b herein 2009-05-25 15:49:57 +0200 fs r272254 : #i999704# 2009-05-25 15:32:57 +0200 fs r272252 : #i99704# grid columns also to respect the MouseWheelBehavior property 2009-05-25 15:23:43 +0200 fs r272251 : don't pass empty Anys to ::comphelper::getString 2009-05-25 14:48:43 +0200 fs r272248 : merged changes from CWS dba32b herein 2009-05-25 14:44:40 +0200 fs r272247 : #i99704# support new MouseWheelBehavior property 2009-05-25 14:43:18 +0200 fs r272246 : #i99704# WheelWithoutFocus (peer property) superseded by MouseWheelBehavior (model property) 2009-05-25 14:41:03 +0200 fs r272245 : #i99704# no need to set the mouse wheel behavior at the peer, this is now a model property, having the right default 2009-05-25 14:39:31 +0200 fs r272243 : removed dead import 2009-05-25 14:35:36 +0200 fs r272242 : the new EnableVisible doesn't make sense for grid columns 2009-05-25 14:34:33 +0200 fs r272241 : #i99704# +MouseWheelBehavior - allow to enable/disable the mouse wheel for the control, or make it focus-dependent 2009-05-25 14:26:11 +0200 fs r272240 : #i99704# change MouseSettings wheel flag (NoWheelActionWithoutFocus) to a three-state option, allowing to completely ignore the mouse wheel 2009-05-23 21:35:59 +0200 fs r272213 : localize 'sub component opened/closed' event 2009-05-22 21:42:47 +0200 fs r272211 : #i102003# 2009-05-22 21:42:20 +0200 fs r272210 : grammar 2009-05-22 21:36:10 +0200 fs r272209 : #i102140# load only once, not twice, and show error messages during loading (and during any form action, that is) asynchronously 2009-05-22 21:35:11 +0200 fs r272208 : #i102140# +clear 2009-05-22 14:50:30 +0200 fs r272194 : #i102139# for newly created DB docs, set the MacroExecutionMode to USE_CONFIG 2009-05-22 12:03:42 +0200 fs r272180 : #i88878# provided by noel.power@novell.com implement a visibility property (EnableVisible) for toolkit controls, and usage in forms and UNO dialogs 2009-05-15 15:37:31 +0200 fs r271942 : #i100671# corrected some @since tags, so autodoc has better chances of correctly reading them 2009-05-15 15:33:11 +0200 fs r271940 : don't call comphelper::getFOO for VOID values 2009-05-15 15:08:31 +0200 fs r271937 : includes 2009-05-15 13:39:22 +0200 fs r271934 : #i101398# createPrimitive2DSequence: when we already have a control, use the old code. In particular, call positionControlForPaint 2009-05-15 12:33:48 +0200 fs r271933 : make the geometry a part of the ControlPrimitive2D's identity 2009-05-15 10:15:44 +0200 fs r271928 : #i10000# 2009-05-14 20:55:38 +0200 fs r271921 : #i101398# don't reuse the name PRIMITIVE_ID_CONTROLPRIMITIVE2D, make the name of our own ControlPrimitive2D unique 2009-05-14 20:55:31 +0200 fs r271920 : #i101398# don't reuse the name PRIMITIVE_ID_CONTROLPRIMITIVE2D, make the name of our own ControlPrimitive2D unique 2009-05-14 20:23:23 +0200 fs r271919 : #i101622# 2009-05-14 16:04:38 +0200 fs r271898 : don't use comphelper::getInt32 on voids 2009-05-14 16:04:12 +0200 fs r271897 : merge fix for issue whose number just slipped my memory ... (originally fixed in CWS dba32b) 2009-05-14 15:36:55 +0200 fs r271895 : merging changes from DEV300:m48 2009-05-07 14:43:19 +0200 fs r271670 : #i101477# 2009-05-07 14:37:30 +0200 fs r271668 : #i101477# 2009-05-07 09:27:30 +0200 oj r271628 : #i101343# remove pch 2009-05-06 09:36:02 +0200 fs r271568 : getFoo: diagnostics 2009-05-04 09:23:06 +0200 oj r271438 : CWS-TOOLING: rebase CWS dba32c to trunk@271427 (milestone: DEV300:m47) 2009-04-29 23:18:13 +0200 fs r271394 : #i101398# use a dedicated 2DPrimitive for UNO Controls, which is able to provide the B2DRange *without* actually creating the control 2009-04-29 13:52:25 +0200 fs r271366 : #i101308#
-rw-r--r--comphelper/source/misc/types.cxx11
-rw-r--r--comphelper/source/streaming/memorystream.cxx3
-rw-r--r--toolkit/inc/toolkit/helper/property.hxx3
-rw-r--r--toolkit/inc/toolkit/helper/vclunohelper.hxx4
-rw-r--r--toolkit/source/awt/vclxwindow.cxx84
-rw-r--r--toolkit/source/awt/vclxwindows.cxx27
-rw-r--r--toolkit/source/controls/formattedcontrol.cxx2
-rw-r--r--toolkit/source/controls/tkspinbutton.cxx1
-rw-r--r--toolkit/source/controls/tree/treecontrol.cxx1
-rw-r--r--toolkit/source/controls/unocontrol.cxx7
-rw-r--r--toolkit/source/controls/unocontrolmodel.cxx4
-rw-r--r--toolkit/source/controls/unocontrols.cxx4
-rw-r--r--toolkit/source/helper/property.cxx5
-rw-r--r--toolkit/source/helper/vclunohelper.cxx8
-rw-r--r--vcl/inc/vcl/settings.hxx14
-rw-r--r--vcl/source/app/settings.cxx6
-rw-r--r--vcl/source/control/combobox.cxx11
-rw-r--r--vcl/source/control/lstbox.cxx11
-rw-r--r--vcl/source/control/spinfld.cxx7
-rw-r--r--vcl/source/window/window.cxx15
20 files changed, 183 insertions, 45 deletions
diff --git a/comphelper/source/misc/types.cxx b/comphelper/source/misc/types.cxx
index 2b20fd9acca3..2a9180c038b0 100644
--- a/comphelper/source/misc/types.cxx
+++ b/comphelper/source/misc/types.cxx
@@ -87,8 +87,7 @@ sal_Bool operator ==(const Time& _rLeft, const Time& _rRight)
sal_Int32 getINT32(const Any& _rAny)
{
sal_Int32 nReturn = 0;
- _rAny >>= nReturn;
-
+ OSL_VERIFY( _rAny >>= nReturn );
return nReturn;
}
@@ -96,7 +95,7 @@ sal_Int32 getINT32(const Any& _rAny)
sal_Int16 getINT16(const Any& _rAny)
{
sal_Int16 nReturn = 0;
- _rAny >>= nReturn;
+ OSL_VERIFY( _rAny >>= nReturn );
return nReturn;
}
@@ -104,7 +103,7 @@ sal_Int16 getINT16(const Any& _rAny)
double getDouble(const Any& _rAny)
{
double nReturn = 0.0;
- _rAny >>= nReturn;
+ OSL_VERIFY( _rAny >>= nReturn );
return nReturn;
}
@@ -112,7 +111,7 @@ double getDouble(const Any& _rAny)
float getFloat(const Any& _rAny)
{
float nReturn = 0.0;
- _rAny >>= nReturn;
+ OSL_VERIFY( _rAny >>= nReturn );
return nReturn;
}
@@ -120,7 +119,7 @@ float getFloat(const Any& _rAny)
::rtl::OUString getString(const Any& _rAny)
{
::rtl::OUString nReturn;
- _rAny >>= nReturn;
+ OSL_VERIFY( _rAny >>= nReturn );
return nReturn;
}
diff --git a/comphelper/source/streaming/memorystream.cxx b/comphelper/source/streaming/memorystream.cxx
index b999c0f8e6af..a2baef21010e 100644
--- a/comphelper/source/streaming/memorystream.cxx
+++ b/comphelper/source/streaming/memorystream.cxx
@@ -167,6 +167,9 @@ void SAL_CALL UNOMemoryStream::seek( sal_Int64 location ) throw (IllegalArgument
if ( location > static_cast< sal_Int64 >( maData.size() ) )
maData.resize( static_cast< sal_Int32 >( location ) );
+ if ( location > static_cast< sal_Int64 >( maData.size() ) )
+ maData.resize( static_cast< sal_Int32 >( location ) );
+
mnCursor = static_cast< sal_Int32 >( location );
}
diff --git a/toolkit/inc/toolkit/helper/property.hxx b/toolkit/inc/toolkit/helper/property.hxx
index da2de08c9544..f5e1b4ea3770 100644
--- a/toolkit/inc/toolkit/helper/property.hxx
+++ b/toolkit/inc/toolkit/helper/property.hxx
@@ -165,7 +165,7 @@ namespace rtl {
#define BASEPROPERTY_IMAGEPOSITION 113 // sal_Int16
#define BASEPROPERTY_NATIVE_WIDGET_LOOK 114 // sal_Bool
#define BASEPROPERTY_VERTICALALIGN 115 // VerticalAlignment
-#define BASEPROPERTY_WHEELWITHOUTFOCUS 116 // sal_Bool
+#define BASEPROPERTY_MOUSE_WHEEL_BEHAVIOUR 116 // sal_Int16
#define BASEPROPERTY_GRAPHIC 117 // css.graphic.XGraphic
#define BASEPROPERTY_STEP_TIME 118 // sal_Int32
#define BASEPROPERTY_DECORATION 119 // sal_Bool
@@ -191,6 +191,7 @@ namespace rtl {
#define BASEPROPERTY_IMAGE_SCALE_MODE 137
#define BASEPROPERTY_WRITING_MODE 138
#define BASEPROPERTY_CONTEXT_WRITING_MODE 139
+#define BASEPROPERTY_ENABLEVISIBLE 140 // sal_Bool
// Keine gebundenen Properties, werden immer aus der Property BASEPROPERTY_FONTDESCRIPTOR entnommen.
#define BASEPROPERTY_FONTDESCRIPTORPART_START 1000
diff --git a/toolkit/inc/toolkit/helper/vclunohelper.hxx b/toolkit/inc/toolkit/helper/vclunohelper.hxx
index 68583f99b447..1c5d89a3cc64 100644
--- a/toolkit/inc/toolkit/helper/vclunohelper.hxx
+++ b/toolkit/inc/toolkit/helper/vclunohelper.hxx
@@ -135,11 +135,15 @@ public:
static MapUnit /* MapModeUnit */ ConvertToMapModeUnit(sal_Int16 /* com.sun.star.util.MeasureUnit.* */ _nMeasureUnit) throw (::com::sun::star::lang::IllegalArgumentException);
static sal_Int16 /* com.sun.star.util.MeasureUnit.* */ ConvertToMeasurementUnit(MapUnit /* MapModeUnit */ _nMapModeUnit) throw (::com::sun::star::lang::IllegalArgumentException);
+
static ::Size /* VCLSize */ ConvertToVCLSize(::com::sun::star::awt::Size const& _aSize);
static ::com::sun::star::awt::Size ConvertToAWTSize(::Size /* VCLSize */ const& _aSize);
+
static ::Point /* VCLPoint */ ConvertToVCLPoint(::com::sun::star::awt::Point const& _aPoint);
static ::com::sun::star::awt::Point ConvertToAWTPoint(::Point /* VCLPoint */ const& _aPoint);
+ static ::Rectangle ConvertToVCLRect( ::com::sun::star::awt::Rectangle const & _rRect );
+ static ::com::sun::star::awt::Rectangle ConvertToAWTRect( ::Rectangle const & _rRect );
};
diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx
index 09e318800184..125d134cd3fd 100644
--- a/toolkit/source/awt/vclxwindow.cxx
+++ b/toolkit/source/awt/vclxwindow.cxx
@@ -35,6 +35,7 @@
#include <com/sun/star/awt/KeyModifier.hpp>
#include <com/sun/star/awt/MouseEvent.hpp>
#include <com/sun/star/awt/MouseButton.hpp>
+#include <com/sun/star/awt/MouseWheelBehavior.hpp>
#include <com/sun/star/awt/XTopWindow.hpp>
#include <com/sun/star/awt/Style.hpp>
#include <com/sun/star/accessibility/AccessibleRole.hpp>
@@ -82,6 +83,7 @@ using ::com::sun::star::style::VerticalAlignment_BOTTOM;
using ::com::sun::star::style::VerticalAlignment_MAKE_FIXED_SIZE;
namespace WritingMode2 = ::com::sun::star::text::WritingMode2;
+namespace MouseWheelBehavior = ::com::sun::star::awt::MouseWheelBehavior;
//====================================================================
@@ -226,6 +228,8 @@ private:
::toolkit::AccessibilityClient maAccFactory;
bool mbDisposed;
bool mbDrawingOntoParent; // no bit mask, is passed around by reference
+ sal_Bool mbEnableVisible;
+ sal_Bool mbDirectVisible;
::osl::Mutex maListenerContainerMutex;
::cppu::OInterfaceContainerHelper maWindow2Listeners;
@@ -273,6 +277,15 @@ public:
*/
VCLXWindowImpl( VCLXWindow& _rAntiImpl, ::vos::IMutex& _rMutex, bool _bWithDefaultProps );
+ /** synchronously mbEnableVisible
+ */
+ void setEnableVisible( sal_Bool bEnableVisible ) { mbEnableVisible = bEnableVisible; }
+ sal_Bool isEnableVisible() { return mbEnableVisible; }
+ /** synchronously mbDirectVisible;
+ */
+ void setDirectVisible( sal_Bool bDirectVisible ) { mbDirectVisible = bDirectVisible; }
+ sal_Bool isDirectVisible() { return mbDirectVisible; }
+
/** asynchronously notifies a mouse event to the VCLXWindow's XMouseListeners
*/
void notifyMouseEvent( const awt::MouseEvent& _rMouseEvent, MouseEventType _nType );
@@ -347,6 +360,8 @@ VCLXWindowImpl::VCLXWindowImpl( VCLXWindow& _rAntiImpl, ::vos::IMutex& _rMutex,
,mrMutex( _rMutex )
,mbDisposed( false )
,mbDrawingOntoParent( false )
+ ,mbEnableVisible(sal_True)
+ ,mbDirectVisible(sal_True)
,maListenerContainerMutex( )
,maWindow2Listeners( maListenerContainerMutex )
,maDockableWindowListeners( maListenerContainerMutex )
@@ -625,7 +640,12 @@ void VCLXWindow::SetWindow( Window* pWindow )
SetOutputDevice( pWindow );
if ( GetWindow() )
+ {
GetWindow()->AddEventListener( LINK( this, VCLXWindow, WindowEventListener ) );
+ sal_Bool bDirectVisible = pWindow ? pWindow->IsVisible() : false;
+ mpImpl->setDirectVisible( bDirectVisible );
+ }
+
}
void VCLXWindow::suspendVclEventListening( )
@@ -1226,7 +1246,8 @@ void VCLXWindow::setVisible( sal_Bool bVisible ) throw(::com::sun::star::uno::Ru
}
}
*/
- pWindow->Show( bVisible );
+ mpImpl->setDirectVisible( bVisible );
+ pWindow->Show( bVisible && mpImpl->isEnableVisible() );
}
}
@@ -1529,6 +1550,7 @@ void VCLXWindow::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds, bool bWithDe
BASEPROPERTY_HELPURL,
BASEPROPERTY_TEXT,
BASEPROPERTY_PRINTABLE,
+ BASEPROPERTY_ENABLEVISIBLE, // for visibility
BASEPROPERTY_TABSTOP,
0);
@@ -1634,19 +1656,27 @@ void VCLXWindow::setProperty( const ::rtl::OUString& PropertyName, const ::com::
}
break;
- case BASEPROPERTY_WHEELWITHOUTFOCUS:
+ case BASEPROPERTY_MOUSE_WHEEL_BEHAVIOUR:
{
- sal_Bool bWheelOnHover( sal_True );
- if ( Value >>= bWheelOnHover )
- {
- AllSettings aSettings = pWindow->GetSettings();
- MouseSettings aMouseSettings = aSettings.GetMouseSettings();
+ sal_uInt16 nWheelBehavior( MouseWheelBehavior::SCROLL_FOCUS_ONLY );
+ OSL_VERIFY( Value >>= nWheelBehavior );
- aMouseSettings.SetNoWheelActionWithoutFocus( !bWheelOnHover );
- aSettings.SetMouseSettings( aMouseSettings );
+ AllSettings aSettings = pWindow->GetSettings();
+ MouseSettings aMouseSettings = aSettings.GetMouseSettings();
- pWindow->SetSettings( aSettings, TRUE );
+ USHORT nVclBehavior( MOUSE_WHEEL_FOCUS_ONLY );
+ switch ( nWheelBehavior )
+ {
+ case MouseWheelBehavior::SCROLL_DISABLED: nVclBehavior = MOUSE_WHEEL_DISABLE; break;
+ case MouseWheelBehavior::SCROLL_FOCUS_ONLY: nVclBehavior = MOUSE_WHEEL_FOCUS_ONLY; break;
+ case MouseWheelBehavior::SCROLL_ALWAYS: nVclBehavior = MOUSE_WHEEL_ALWAYS; break;
+ default:
+ OSL_ENSURE( false, "VCLXWindow::setProperty( 'MouseWheelBehavior' ): illegal property value!" );
}
+
+ aMouseSettings.SetWheelBehavior( nWheelBehavior );
+ aSettings.SetMouseSettings( aMouseSettings );
+ pWindow->SetSettings( aSettings, TRUE );
}
break;
@@ -1672,6 +1702,19 @@ void VCLXWindow::setProperty( const ::rtl::OUString& PropertyName, const ::com::
setEnable( b );
}
break;
+ case BASEPROPERTY_ENABLEVISIBLE:
+ {
+ sal_Bool b = sal_False;
+ if ( Value >>= b )
+ {
+ if( b != mpImpl->isEnableVisible() )
+ {
+ mpImpl->setEnableVisible( b );
+ pWindow->Show( b && mpImpl->isDirectVisible() );
+ }
+ }
+ }
+ break;
case BASEPROPERTY_TEXT:
case BASEPROPERTY_LABEL:
case BASEPROPERTY_TITLE:
@@ -2122,10 +2165,19 @@ void VCLXWindow::setProperty( const ::rtl::OUString& PropertyName, const ::com::
aProp <<= mpImpl->mnWritingMode;
break;
- case BASEPROPERTY_WHEELWITHOUTFOCUS:
+ case BASEPROPERTY_MOUSE_WHEEL_BEHAVIOUR:
{
- sal_Bool bWheelOnHover = !GetWindow()->GetSettings().GetMouseSettings().GetNoWheelActionWithoutFocus();
- aProp <<= bWheelOnHover;
+ USHORT nVclBehavior = GetWindow()->GetSettings().GetMouseSettings().GetWheelBehavior();
+ sal_Int16 nBehavior = MouseWheelBehavior::SCROLL_FOCUS_ONLY;
+ switch ( nVclBehavior )
+ {
+ case MOUSE_WHEEL_DISABLE: nBehavior = MouseWheelBehavior::SCROLL_DISABLED; break;
+ case MOUSE_WHEEL_FOCUS_ONLY: nBehavior = MouseWheelBehavior::SCROLL_FOCUS_ONLY; break;
+ case MOUSE_WHEEL_ALWAYS: nBehavior = MouseWheelBehavior::SCROLL_ALWAYS; break;
+ default:
+ OSL_ENSURE( false, "VCLXWindow::getProperty( 'MouseWheelBehavior' ): illegal VCL value!" );
+ }
+ aProp <<= nBehavior;
}
break;
@@ -2137,6 +2189,10 @@ void VCLXWindow::setProperty( const ::rtl::OUString& PropertyName, const ::com::
aProp <<= (sal_Bool) GetWindow()->IsEnabled();
break;
+ case BASEPROPERTY_ENABLEVISIBLE:
+ aProp <<= (sal_Bool) mpImpl->isEnableVisible();
+ break;
+
case BASEPROPERTY_TEXT:
case BASEPROPERTY_LABEL:
case BASEPROPERTY_TITLE:
@@ -2411,7 +2467,7 @@ void VCLXWindow::draw( sal_Int32 nX, sal_Int32 nY ) throw(::com::sun::star::uno:
if ( !pWindow )
return;
- if ( pWindow )
+ if ( isDesignMode() || mpImpl->isEnableVisible() )
{
TabPage* pTabPage = dynamic_cast< TabPage* >( pWindow );
if ( pTabPage )
diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx
index 59cb9632b7e1..b49fa1a621d6 100644
--- a/toolkit/source/awt/vclxwindows.cxx
+++ b/toolkit/source/awt/vclxwindows.cxx
@@ -386,6 +386,7 @@ void VCLXButton::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds )
BASEPROPERTY_DEFAULTBUTTON,
BASEPROPERTY_DEFAULTCONTROL,
BASEPROPERTY_ENABLED,
+ BASEPROPERTY_ENABLEVISIBLE,
BASEPROPERTY_FONTDESCRIPTOR,
BASEPROPERTY_GRAPHIC,
BASEPROPERTY_HELPTEXT,
@@ -668,6 +669,7 @@ void VCLXImageControl::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds )
BASEPROPERTY_BORDERCOLOR,
BASEPROPERTY_DEFAULTCONTROL,
BASEPROPERTY_ENABLED,
+ BASEPROPERTY_ENABLEVISIBLE,
BASEPROPERTY_GRAPHIC,
BASEPROPERTY_HELPTEXT,
BASEPROPERTY_HELPURL,
@@ -796,6 +798,7 @@ void VCLXCheckBox::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds )
PushPropertyIds( rIds,
BASEPROPERTY_DEFAULTCONTROL,
BASEPROPERTY_ENABLED,
+ BASEPROPERTY_ENABLEVISIBLE,
BASEPROPERTY_FONTDESCRIPTOR,
BASEPROPERTY_GRAPHIC,
BASEPROPERTY_HELPTEXT,
@@ -1095,6 +1098,7 @@ void VCLXRadioButton::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds )
PushPropertyIds( rIds,
BASEPROPERTY_DEFAULTCONTROL,
BASEPROPERTY_ENABLED,
+ BASEPROPERTY_ENABLEVISIBLE,
BASEPROPERTY_FONTDESCRIPTOR,
BASEPROPERTY_GRAPHIC,
BASEPROPERTY_HELPTEXT,
@@ -1380,6 +1384,9 @@ void VCLXRadioButton::ImplClickedOrToggled( BOOL bToggled )
// ----------------------------------------------------
void VCLXSpinField::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds )
{
+ PushPropertyIds( rIds,
+ BASEPROPERTY_MOUSE_WHEEL_BEHAVIOUR,
+ 0 );
VCLXEdit::ImplGetPropertyIds( rIds );
}
@@ -1519,6 +1526,7 @@ void VCLXListBox::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds )
BASEPROPERTY_DEFAULTCONTROL,
BASEPROPERTY_DROPDOWN,
BASEPROPERTY_ENABLED,
+ BASEPROPERTY_ENABLEVISIBLE,
BASEPROPERTY_FONTDESCRIPTOR,
BASEPROPERTY_HELPTEXT,
BASEPROPERTY_HELPURL,
@@ -1532,6 +1540,7 @@ void VCLXListBox::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds )
BASEPROPERTY_ALIGN,
BASEPROPERTY_WRITING_MODE,
BASEPROPERTY_CONTEXT_WRITING_MODE,
+ BASEPROPERTY_MOUSE_WHEEL_BEHAVIOUR,
0);
VCLXWindow::ImplGetPropertyIds( rIds );
}
@@ -2709,6 +2718,7 @@ void VCLXFixedHyperlink::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds )
BASEPROPERTY_BORDERCOLOR,
BASEPROPERTY_DEFAULTCONTROL,
BASEPROPERTY_ENABLED,
+ BASEPROPERTY_ENABLEVISIBLE,
BASEPROPERTY_FONTDESCRIPTOR,
BASEPROPERTY_HELPTEXT,
BASEPROPERTY_HELPURL,
@@ -2737,6 +2747,7 @@ void VCLXFixedText::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds )
BASEPROPERTY_BORDERCOLOR,
BASEPROPERTY_DEFAULTCONTROL,
BASEPROPERTY_ENABLED,
+ BASEPROPERTY_ENABLEVISIBLE,
BASEPROPERTY_FONTDESCRIPTOR,
BASEPROPERTY_HELPTEXT,
BASEPROPERTY_HELPURL,
@@ -2879,6 +2890,7 @@ void VCLXScrollBar::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds )
BASEPROPERTY_BORDERCOLOR,
BASEPROPERTY_DEFAULTCONTROL,
BASEPROPERTY_ENABLED,
+ BASEPROPERTY_ENABLEVISIBLE,
BASEPROPERTY_HELPTEXT,
BASEPROPERTY_HELPURL,
BASEPROPERTY_LINEINCREMENT,
@@ -3358,6 +3370,7 @@ void VCLXEdit::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds )
BASEPROPERTY_DEFAULTCONTROL,
BASEPROPERTY_ECHOCHAR,
BASEPROPERTY_ENABLED,
+ BASEPROPERTY_ENABLEVISIBLE,
BASEPROPERTY_FONTDESCRIPTOR,
BASEPROPERTY_HARDLINEBREAKS,
BASEPROPERTY_HELPTEXT,
@@ -3734,6 +3747,7 @@ void VCLXComboBox::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds )
BASEPROPERTY_DEFAULTCONTROL,
BASEPROPERTY_DROPDOWN,
BASEPROPERTY_ENABLED,
+ BASEPROPERTY_ENABLEVISIBLE,
BASEPROPERTY_FONTDESCRIPTOR,
BASEPROPERTY_HELPTEXT,
BASEPROPERTY_HELPURL,
@@ -3748,6 +3762,7 @@ void VCLXComboBox::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds )
BASEPROPERTY_ALIGN,
BASEPROPERTY_WRITING_MODE,
BASEPROPERTY_CONTEXT_WRITING_MODE,
+ BASEPROPERTY_MOUSE_WHEEL_BEHAVIOUR,
0);
// no, don't call VCLXEdit here - it has properties which we do *not* want to have at at combo box
// #i92690# / 2008-08-12 / frank.schoenheit@sun.com
@@ -4250,6 +4265,7 @@ void VCLXDateField::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds )
BASEPROPERTY_DEFAULTCONTROL,
BASEPROPERTY_DROPDOWN,
BASEPROPERTY_ENABLED,
+ BASEPROPERTY_ENABLEVISIBLE,
BASEPROPERTY_EXTDATEFORMAT,
BASEPROPERTY_FONTDESCRIPTOR,
BASEPROPERTY_HELPTEXT,
@@ -4266,6 +4282,7 @@ void VCLXDateField::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds )
BASEPROPERTY_HIDEINACTIVESELECTION,
BASEPROPERTY_WRITING_MODE,
BASEPROPERTY_CONTEXT_WRITING_MODE,
+ BASEPROPERTY_MOUSE_WHEEL_BEHAVIOUR,
0);
VCLXFormattedSpinField::ImplGetPropertyIds( rIds );
}
@@ -4586,6 +4603,7 @@ void VCLXTimeField::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds )
BASEPROPERTY_BORDERCOLOR,
BASEPROPERTY_DEFAULTCONTROL,
BASEPROPERTY_ENABLED,
+ BASEPROPERTY_ENABLEVISIBLE,
BASEPROPERTY_EXTTIMEFORMAT,
BASEPROPERTY_FONTDESCRIPTOR,
BASEPROPERTY_HELPTEXT,
@@ -4605,6 +4623,7 @@ void VCLXTimeField::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds )
BASEPROPERTY_HIDEINACTIVESELECTION,
BASEPROPERTY_WRITING_MODE,
BASEPROPERTY_CONTEXT_WRITING_MODE,
+ BASEPROPERTY_MOUSE_WHEEL_BEHAVIOUR,
0);
VCLXFormattedSpinField::ImplGetPropertyIds( rIds );
}
@@ -4887,6 +4906,7 @@ void VCLXNumericField::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds )
BASEPROPERTY_DECIMALACCURACY,
BASEPROPERTY_DEFAULTCONTROL,
BASEPROPERTY_ENABLED,
+ BASEPROPERTY_ENABLEVISIBLE,
BASEPROPERTY_FONTDESCRIPTOR,
BASEPROPERTY_HELPTEXT,
BASEPROPERTY_HELPURL,
@@ -4906,6 +4926,7 @@ void VCLXNumericField::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds )
BASEPROPERTY_HIDEINACTIVESELECTION,
BASEPROPERTY_WRITING_MODE,
BASEPROPERTY_CONTEXT_WRITING_MODE,
+ BASEPROPERTY_MOUSE_WHEEL_BEHAVIOUR,
0);
VCLXFormattedSpinField::ImplGetPropertyIds( rIds );
}
@@ -5227,6 +5248,7 @@ void VCLXMetricField::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds )
BASEPROPERTY_DECIMALACCURACY,
BASEPROPERTY_DEFAULTCONTROL,
BASEPROPERTY_ENABLED,
+ BASEPROPERTY_ENABLEVISIBLE,
BASEPROPERTY_FONTDESCRIPTOR,
BASEPROPERTY_HELPTEXT,
BASEPROPERTY_HELPURL,
@@ -5244,6 +5266,7 @@ void VCLXMetricField::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds )
BASEPROPERTY_CUSTOMUNITTEXT,
BASEPROPERTY_WRITING_MODE,
BASEPROPERTY_CONTEXT_WRITING_MODE,
+ BASEPROPERTY_MOUSE_WHEEL_BEHAVIOUR,
0);
VCLXFormattedSpinField::ImplGetPropertyIds( rIds );
}
@@ -5477,6 +5500,7 @@ void VCLXCurrencyField::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds )
BASEPROPERTY_DECIMALACCURACY,
BASEPROPERTY_DEFAULTCONTROL,
BASEPROPERTY_ENABLED,
+ BASEPROPERTY_ENABLEVISIBLE,
BASEPROPERTY_FONTDESCRIPTOR,
BASEPROPERTY_HELPTEXT,
BASEPROPERTY_HELPURL,
@@ -5496,6 +5520,7 @@ void VCLXCurrencyField::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds )
BASEPROPERTY_HIDEINACTIVESELECTION,
BASEPROPERTY_WRITING_MODE,
BASEPROPERTY_CONTEXT_WRITING_MODE,
+ BASEPROPERTY_MOUSE_WHEEL_BEHAVIOUR,
0);
VCLXFormattedSpinField::ImplGetPropertyIds( rIds );
}
@@ -5828,6 +5853,7 @@ void VCLXPatternField::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds )
BASEPROPERTY_DEFAULTCONTROL,
BASEPROPERTY_EDITMASK,
BASEPROPERTY_ENABLED,
+ BASEPROPERTY_ENABLEVISIBLE,
BASEPROPERTY_FONTDESCRIPTOR,
BASEPROPERTY_HELPTEXT,
BASEPROPERTY_HELPURL,
@@ -5841,6 +5867,7 @@ void VCLXPatternField::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds )
BASEPROPERTY_HIDEINACTIVESELECTION,
BASEPROPERTY_WRITING_MODE,
BASEPROPERTY_CONTEXT_WRITING_MODE,
+ BASEPROPERTY_MOUSE_WHEEL_BEHAVIOUR,
0);
VCLXFormattedSpinField::ImplGetPropertyIds( rIds );
}
diff --git a/toolkit/source/controls/formattedcontrol.cxx b/toolkit/source/controls/formattedcontrol.cxx
index 19fb4c3609d0..6171067f1185 100644
--- a/toolkit/source/controls/formattedcontrol.cxx
+++ b/toolkit/source/controls/formattedcontrol.cxx
@@ -142,6 +142,7 @@ namespace toolkit
ImplRegisterProperty( BASEPROPERTY_EFFECTIVE_MAX );
ImplRegisterProperty( BASEPROPERTY_EFFECTIVE_MIN );
ImplRegisterProperty( BASEPROPERTY_ENABLED );
+ ImplRegisterProperty( BASEPROPERTY_ENABLEVISIBLE );
ImplRegisterProperty( BASEPROPERTY_FONTDESCRIPTOR );
ImplRegisterProperty( BASEPROPERTY_FORMATKEY );
ImplRegisterProperty( BASEPROPERTY_FORMATSSUPPLIER );
@@ -161,6 +162,7 @@ namespace toolkit
ImplRegisterProperty( BASEPROPERTY_ENFORCE_FORMAT );
ImplRegisterProperty( BASEPROPERTY_WRITING_MODE );
ImplRegisterProperty( BASEPROPERTY_CONTEXT_WRITING_MODE );
+ ImplRegisterProperty( BASEPROPERTY_MOUSE_WHEEL_BEHAVIOUR );
Any aTreatAsNumber;
aTreatAsNumber <<= (sal_Bool) sal_True;
diff --git a/toolkit/source/controls/tkspinbutton.cxx b/toolkit/source/controls/tkspinbutton.cxx
index 5c4e47e240dc..138b849a190c 100644
--- a/toolkit/source/controls/tkspinbutton.cxx
+++ b/toolkit/source/controls/tkspinbutton.cxx
@@ -60,6 +60,7 @@ namespace toolkit
ImplRegisterProperty( BASEPROPERTY_BORDERCOLOR );
ImplRegisterProperty( BASEPROPERTY_DEFAULTCONTROL );
ImplRegisterProperty( BASEPROPERTY_ENABLED );
+ ImplRegisterProperty( BASEPROPERTY_ENABLEVISIBLE );
ImplRegisterProperty( BASEPROPERTY_HELPTEXT );
ImplRegisterProperty( BASEPROPERTY_HELPURL );
ImplRegisterProperty( BASEPROPERTY_ORIENTATION );
diff --git a/toolkit/source/controls/tree/treecontrol.cxx b/toolkit/source/controls/tree/treecontrol.cxx
index 68c3212f5692..2949954bb13c 100644
--- a/toolkit/source/controls/tree/treecontrol.cxx
+++ b/toolkit/source/controls/tree/treecontrol.cxx
@@ -65,6 +65,7 @@ UnoTreeModel::UnoTreeModel()
ImplRegisterProperty( BASEPROPERTY_BORDERCOLOR );
ImplRegisterProperty( BASEPROPERTY_DEFAULTCONTROL );
ImplRegisterProperty( BASEPROPERTY_ENABLED );
+ ImplRegisterProperty( BASEPROPERTY_ENABLEVISIBLE );
ImplRegisterProperty( BASEPROPERTY_FILLCOLOR );
ImplRegisterProperty( BASEPROPERTY_HELPTEXT );
ImplRegisterProperty( BASEPROPERTY_HELPURL );
diff --git a/toolkit/source/controls/unocontrol.cxx b/toolkit/source/controls/unocontrol.cxx
index 92c27e33ead0..0775b6ee74f3 100644
--- a/toolkit/source/controls/unocontrol.cxx
+++ b/toolkit/source/controls/unocontrol.cxx
@@ -1049,7 +1049,13 @@ void UnoControl::draw( sal_Int32 x, sal_Int32 y ) throw(RuntimeException)
}
if ( xDrawPeerView.is() )
+ {
+ Reference< XVclWindowPeer > xWindowPeer;
+ xWindowPeer.set( xDrawPeer, UNO_QUERY );
+ if ( xWindowPeer.is() )
+ xWindowPeer->setDesignMode( mbDesignMode );
xDrawPeerView->draw( x, y );
+ }
if ( bDisposeDrawPeer )
xDrawPeer->dispose();
@@ -1420,7 +1426,6 @@ void UnoControl::setDesignMode( sal_Bool bOn ) throw(RuntimeException)
// remember this
mbDesignMode = bOn;
xWindow = xWindow.query( getPeer() );
-
// dispose our current AccessibleContext, if we have one
// (changing the design mode implies having a new implementation for this context,
// so the old one must be declared DEFUNC)
diff --git a/toolkit/source/controls/unocontrolmodel.cxx b/toolkit/source/controls/unocontrolmodel.cxx
index 0f54a204a010..cc5faa27eec8 100644
--- a/toolkit/source/controls/unocontrolmodel.cxx
+++ b/toolkit/source/controls/unocontrolmodel.cxx
@@ -36,6 +36,7 @@
#include <com/sun/star/awt/FontWidth.hpp>
#include <com/sun/star/awt/FontWeight.hpp>
#include <com/sun/star/awt/FontSlant.hpp>
+#include <com/sun/star/awt/MouseWheelBehavior.hpp>
#include <com/sun/star/graphic/XGraphicProvider.hpp>
#include <com/sun/star/text/WritingMode2.hpp>
#include <com/sun/star/io/XMarkableStream.hpp>
@@ -294,6 +295,7 @@ void UnoControlModel::ImplPropertyChanged( sal_uInt16 )
case BASEPROPERTY_IMAGEALIGN: aDefault <<= (sal_Int16) 1 /*ImageAlign::TOP*/; break;
case BASEPROPERTY_IMAGEPOSITION: aDefault <<= (sal_Int16) 12 /*ImagePosition::Centered*/; break;
case BASEPROPERTY_PUSHBUTTONTYPE: aDefault <<= (sal_Int16) 0 /*PushButtonType::STANDARD*/; break;
+ case BASEPROPERTY_MOUSE_WHEEL_BEHAVIOUR:aDefault <<= (sal_Int16) awt::MouseWheelBehavior::SCROLL_FOCUS_ONLY; break;
case BASEPROPERTY_DATEMAX: aDefault <<= (sal_Int32) Date( 31, 12, 2200 ).GetDate(); break;
case BASEPROPERTY_DATEMIN: aDefault <<= (sal_Int32) Date( 1, 1, 1900 ).GetDate(); break;
@@ -338,13 +340,13 @@ void UnoControlModel::ImplPropertyChanged( sal_uInt16 )
case BASEPROPERTY_HARDLINEBREAKS:
case BASEPROPERTY_NOLABEL: aDefault <<= (sal_Bool) sal_False; break;
- case BASEPROPERTY_WHEELWITHOUTFOCUS:
case BASEPROPERTY_HIDEINACTIVESELECTION:
case BASEPROPERTY_ENFORCE_FORMAT:
case BASEPROPERTY_AUTOCOMPLETE:
case BASEPROPERTY_SCALEIMAGE:
case BASEPROPERTY_ENABLED:
case BASEPROPERTY_PRINTABLE:
+ case BASEPROPERTY_ENABLEVISIBLE:
case BASEPROPERTY_DECORATION: aDefault <<= (sal_Bool) sal_True; break;
case BASEPROPERTY_HELPTEXT:
diff --git a/toolkit/source/controls/unocontrols.cxx b/toolkit/source/controls/unocontrols.cxx
index 771a69c532b9..3abacef7b67f 100644
--- a/toolkit/source/controls/unocontrols.cxx
+++ b/toolkit/source/controls/unocontrols.cxx
@@ -481,6 +481,7 @@ UnoControlFileControlModel::UnoControlFileControlModel()
ImplRegisterProperty( BASEPROPERTY_BORDERCOLOR );
ImplRegisterProperty( BASEPROPERTY_DEFAULTCONTROL );
ImplRegisterProperty( BASEPROPERTY_ENABLED );
+ ImplRegisterProperty( BASEPROPERTY_ENABLEVISIBLE );
ImplRegisterProperty( BASEPROPERTY_FONTDESCRIPTOR );
ImplRegisterProperty( BASEPROPERTY_HELPTEXT );
ImplRegisterProperty( BASEPROPERTY_HELPURL );
@@ -1778,6 +1779,7 @@ UnoControlGroupBoxModel::UnoControlGroupBoxModel()
{
ImplRegisterProperty( BASEPROPERTY_DEFAULTCONTROL );
ImplRegisterProperty( BASEPROPERTY_ENABLED );
+ ImplRegisterProperty( BASEPROPERTY_ENABLEVISIBLE );
ImplRegisterProperty( BASEPROPERTY_FONTDESCRIPTOR );
ImplRegisterProperty( BASEPROPERTY_HELPTEXT );
ImplRegisterProperty( BASEPROPERTY_HELPURL );
@@ -3594,6 +3596,7 @@ UnoControlProgressBarModel::UnoControlProgressBarModel()
ImplRegisterProperty( BASEPROPERTY_BORDERCOLOR );
ImplRegisterProperty( BASEPROPERTY_DEFAULTCONTROL );
ImplRegisterProperty( BASEPROPERTY_ENABLED );
+ ImplRegisterProperty( BASEPROPERTY_ENABLEVISIBLE );
ImplRegisterProperty( BASEPROPERTY_FILLCOLOR );
ImplRegisterProperty( BASEPROPERTY_HELPTEXT );
ImplRegisterProperty( BASEPROPERTY_HELPURL );
@@ -3723,6 +3726,7 @@ UnoControlFixedLineModel::UnoControlFixedLineModel()
ImplRegisterProperty( BASEPROPERTY_BACKGROUNDCOLOR );
ImplRegisterProperty( BASEPROPERTY_DEFAULTCONTROL );
ImplRegisterProperty( BASEPROPERTY_ENABLED );
+ ImplRegisterProperty( BASEPROPERTY_ENABLEVISIBLE );
ImplRegisterProperty( BASEPROPERTY_FONTDESCRIPTOR );
ImplRegisterProperty( BASEPROPERTY_HELPTEXT );
ImplRegisterProperty( BASEPROPERTY_HELPURL );
diff --git a/toolkit/source/helper/property.cxx b/toolkit/source/helper/property.cxx
index bace3ff94771..0560afbd835f 100644
--- a/toolkit/source/helper/property.cxx
+++ b/toolkit/source/helper/property.cxx
@@ -257,7 +257,7 @@ ImplPropertyInfo* ImplGetPropertyInfos( sal_uInt16& rElementCount )
DECL_PROP_2 ( "Complete", COMPLETE, sal_Bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "CurrentItemID", CURRENTITEMID, sal_Int16, BOUND, MAYBEDEFAULT ),
- DECL_PROP_2 ( "WheelWithoutFocus", WHEELWITHOUTFOCUS, sal_Bool, BOUND, MAYBEDEFAULT ),
+ DECL_PROP_2 ( "MouseWheelBehavior", MOUSE_WHEEL_BEHAVIOUR, sal_Int16, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "StepTime", STEP_TIME, sal_Int32, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "Decoration", DECORATION, sal_Bool, BOUND, MAYBEDEFAULT ),
@@ -272,7 +272,8 @@ ImplPropertyInfo* ImplGetPropertyInfos( sal_uInt16& rElementCount )
DECL_PROP_2 ( "DialogSourceURL", DIALOGSOURCEURL, ::rtl::OUString, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "URL", URL, ::rtl::OUString, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "WritingMode", WRITING_MODE, sal_Int16, BOUND, MAYBEDEFAULT ),
- DECL_PROP_3 ( "ContextWritingMode", CONTEXT_WRITING_MODE, sal_Int16, BOUND, MAYBEDEFAULT, TRANSIENT )
+ DECL_PROP_3 ( "ContextWritingMode", CONTEXT_WRITING_MODE, sal_Int16, BOUND, MAYBEDEFAULT, TRANSIENT ),
+ DECL_PROP_2 ( "EnableVisible", ENABLEVISIBLE, sal_Bool, BOUND, MAYBEDEFAULT )
};
pPropertyInfos = aImplPropertyInfos;
nElements = sizeof( aImplPropertyInfos ) / sizeof( ImplPropertyInfo );
diff --git a/toolkit/source/helper/vclunohelper.cxx b/toolkit/source/helper/vclunohelper.cxx
index d76b56a6a37d..029e520baca6 100644
--- a/toolkit/source/helper/vclunohelper.cxx
+++ b/toolkit/source/helper/vclunohelper.cxx
@@ -736,4 +736,12 @@ com::sun::star::awt::Point VCLUnoHelper::ConvertToAWTPoint(::Point /* VCLPoint *
return aAWTPoint;
}
+::Rectangle VCLUnoHelper::ConvertToVCLRect( ::com::sun::star::awt::Rectangle const & _rRect )
+{
+ return ::Rectangle( _rRect.X, _rRect.Y, _rRect.X + _rRect.Width - 1, _rRect.Y + _rRect.Height - 1 );
+}
+::com::sun::star::awt::Rectangle VCLUnoHelper::ConvertToAWTRect( ::Rectangle const & _rRect )
+{
+ return ::com::sun::star::awt::Rectangle( _rRect.Left(), _rRect.Top(), _rRect.GetWidth(), _rRect.GetHeight() );
+}
diff --git a/vcl/inc/vcl/settings.hxx b/vcl/inc/vcl/settings.hxx
index 5ee27e3aeb31..a7cd61477519 100644
--- a/vcl/inc/vcl/settings.hxx
+++ b/vcl/inc/vcl/settings.hxx
@@ -139,7 +139,7 @@ private:
ULONG mnMenuDelay;
ULONG mnFollow;
USHORT mnMiddleButtonAction;
- BOOL mbNoWheelActionWithoutFocus;
+ USHORT mnWheelBehavior;
BOOL mbAlign1;
};
@@ -158,6 +158,10 @@ private:
#define MOUSE_MIDDLE_AUTOSCROLL ((USHORT)1)
#define MOUSE_MIDDLE_PASTESELECTION ((USHORT)2)
+#define MOUSE_WHEEL_DISABLE ((USHORT)0)
+#define MOUSE_WHEEL_FOCUS_ONLY ((USHORT)1)
+#define MOUSE_WHEEL_ALWAYS ((USHORT)2)
+
class VCL_DLLPUBLIC MouseSettings
{
void CopyData();
@@ -257,10 +261,10 @@ public:
USHORT GetMiddleButtonAction() const
{ return mpData->mnMiddleButtonAction; }
- void SetNoWheelActionWithoutFocus( BOOL bAction )
- { CopyData(); mpData->mbNoWheelActionWithoutFocus = bAction; }
- BOOL GetNoWheelActionWithoutFocus() const
- { return mpData->mbNoWheelActionWithoutFocus; }
+ void SetWheelBehavior( USHORT nBehavior )
+ { CopyData(); mpData->mnWheelBehavior = nBehavior; }
+ USHORT GetWheelBehavior() const
+ { return mpData->mnWheelBehavior; }
const MouseSettings& operator =( const MouseSettings& rSet );
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index 12213c25a64f..444f1f58c8fb 100644
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -189,7 +189,7 @@ ImplMouseData::ImplMouseData()
mnActionDelay = 250;
mnMenuDelay = 150;
mnFollow = MOUSE_FOLLOW_MENU | MOUSE_FOLLOW_DDLIST;
- mbNoWheelActionWithoutFocus = FALSE;
+ mnWheelBehavior = MOUSE_WHEEL_FOCUS_ONLY;
}
// -----------------------------------------------------------------------
@@ -217,7 +217,7 @@ ImplMouseData::ImplMouseData( const ImplMouseData& rData )
mnActionDelay = rData.mnActionDelay;
mnMenuDelay = rData.mnMenuDelay;
mnFollow = rData.mnFollow;
- mbNoWheelActionWithoutFocus = rData.mbNoWheelActionWithoutFocus;
+ mnWheelBehavior = rData.mnWheelBehavior;
}
// -----------------------------------------------------------------------
@@ -308,7 +308,7 @@ BOOL MouseSettings::operator ==( const MouseSettings& rSet ) const
(mpData->mnActionDelay == rSet.mpData->mnActionDelay) &&
(mpData->mnMenuDelay == rSet.mpData->mnMenuDelay) &&
(mpData->mnFollow == rSet.mpData->mnFollow) &&
- (mpData->mbNoWheelActionWithoutFocus == rSet.mpData->mbNoWheelActionWithoutFocus) )
+ (mpData->mnWheelBehavior == rSet.mpData->mnWheelBehavior ) )
return TRUE;
else
return FALSE;
diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx
index 42abe3fd248a..309acb404750 100644
--- a/vcl/source/control/combobox.cxx
+++ b/vcl/source/control/combobox.cxx
@@ -876,10 +876,19 @@ long ComboBox::Notify( NotifyEvent& rNEvt )
(rNEvt.GetCommandEvent()->GetCommand() == COMMAND_WHEEL) &&
(rNEvt.GetWindow() == mpSubEdit) )
{
- if( ! GetSettings().GetMouseSettings().GetNoWheelActionWithoutFocus() || HasChildPathFocus() )
+ USHORT nWheelBehavior( GetSettings().GetMouseSettings().GetWheelBehavior() );
+ if ( ( nWheelBehavior == MOUSE_WHEEL_ALWAYS )
+ || ( ( nWheelBehavior == MOUSE_WHEEL_FOCUS_ONLY )
+ && HasChildPathFocus()
+ )
+ )
+ {
nDone = mpImplLB->HandleWheelAsCursorTravel( *rNEvt.GetCommandEvent() );
+ }
else
+ {
nDone = 0; // don't eat this event, let the default handling happen (i.e. scroll the context)
+ }
}
return nDone ? nDone : Edit::Notify( rNEvt );
diff --git a/vcl/source/control/lstbox.cxx b/vcl/source/control/lstbox.cxx
index 66722b70eef8..687352716ae8 100644
--- a/vcl/source/control/lstbox.cxx
+++ b/vcl/source/control/lstbox.cxx
@@ -959,10 +959,19 @@ long ListBox::PreNotify( NotifyEvent& rNEvt )
(rNEvt.GetCommandEvent()->GetCommand() == COMMAND_WHEEL) &&
(rNEvt.GetWindow() == mpImplWin) )
{
- if( ! GetSettings().GetMouseSettings().GetNoWheelActionWithoutFocus() || HasChildPathFocus() )
+ USHORT nWheelBehavior( GetSettings().GetMouseSettings().GetWheelBehavior() );
+ if ( ( nWheelBehavior == MOUSE_WHEEL_ALWAYS )
+ || ( ( nWheelBehavior == MOUSE_WHEEL_FOCUS_ONLY )
+ && HasChildPathFocus()
+ )
+ )
+ {
nDone = mpImplLB->HandleWheelAsCursorTravel( *rNEvt.GetCommandEvent() );
+ }
else
+ {
nDone = 0; // don't eat this event, let the default handling happen (i.e. scroll the context)
+ }
}
}
diff --git a/vcl/source/control/spinfld.cxx b/vcl/source/control/spinfld.cxx
index 3f8779dc2e90..0d656da40ba7 100644
--- a/vcl/source/control/spinfld.cxx
+++ b/vcl/source/control/spinfld.cxx
@@ -599,7 +599,12 @@ long SpinField::Notify( NotifyEvent& rNEvt )
{
if ( ( rNEvt.GetCommandEvent()->GetCommand() == COMMAND_WHEEL ) && !IsReadOnly() )
{
- if( ! GetSettings().GetMouseSettings().GetNoWheelActionWithoutFocus() || HasChildPathFocus() )
+ USHORT nWheelBehavior( GetSettings().GetMouseSettings().GetWheelBehavior() );
+ if ( ( nWheelBehavior == MOUSE_WHEEL_ALWAYS )
+ || ( ( nWheelBehavior == MOUSE_WHEEL_FOCUS_ONLY )
+ && HasChildPathFocus()
+ )
+ )
{
const CommandWheelData* pData = rNEvt.GetCommandEvent()->GetWheelData();
if ( pData->GetMode() == COMMAND_WHEEL_SCROLL )
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 279775d712e4..86d6347617b0 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -5844,18 +5844,15 @@ void Window::UpdateSettings( const AllSettings& rSettings, BOOL bChild )
ImplInitResolutionSettings();
/* #i73785#
- * do not overwrite a NoWheelActionWithoutFocus with false
- * this looks kind of a hack, but NoWheelActionWithoutFocus
+ * do not overwrite a WheelBehavior with false
+ * this looks kind of a hack, but WheelBehavior
* is always a local change, not a system property,
- * so we can spare all our users the hassel of reacting on
+ * so we can spare all our users the hassle of reacting on
* this in their respective DataChanged.
*/
- if( aOldSettings.GetMouseSettings().GetNoWheelActionWithoutFocus() )
- {
- MouseSettings aSet( maSettings.GetMouseSettings() );
- aSet.SetNoWheelActionWithoutFocus( TRUE );
- maSettings.SetMouseSettings( aSet );
- }
+ MouseSettings aSet( maSettings.GetMouseSettings() );
+ aSet.SetWheelBehavior( aOldSettings.GetMouseSettings().GetWheelBehavior() );
+ maSettings.SetMouseSettings( aSet );
if( (nChangeFlags & SETTINGS_STYLE) && IsBackground() )
{