diff options
author | hg <hg@oosvn01.> | 2009-10-08 15:56:43 +0000 |
---|---|---|
committer | hg <hg@oosvn01.> | 2009-10-08 15:56:43 +0000 |
commit | 98fa30855ac5b597ac1f4542f4995c07887f632f (patch) | |
tree | 35e3337d755dc240cb01e51269696663df0c9952 /toolkit | |
parent | 6d16b13150863dc7506506863e73e28d5ff569ad (diff) | |
parent | 7ad0431b233f8e37a45f60583a7e77e349ed171e (diff) |
merge with m53
Diffstat (limited to 'toolkit')
-rw-r--r-- | toolkit/inc/toolkit/helper/property.hxx | 3 | ||||
-rw-r--r-- | toolkit/source/awt/vclxwindow.cxx | 84 | ||||
-rw-r--r-- | toolkit/source/awt/vclxwindows.cxx | 27 | ||||
-rw-r--r-- | toolkit/source/controls/formattedcontrol.cxx | 2 | ||||
-rw-r--r-- | toolkit/source/controls/tkspinbutton.cxx | 1 | ||||
-rw-r--r-- | toolkit/source/controls/tree/treecontrol.cxx | 1 | ||||
-rw-r--r-- | toolkit/source/controls/unocontrol.cxx | 7 | ||||
-rw-r--r-- | toolkit/source/controls/unocontrolmodel.cxx | 4 | ||||
-rw-r--r-- | toolkit/source/controls/unocontrols.cxx | 4 | ||||
-rw-r--r-- | toolkit/source/helper/property.cxx | 5 |
10 files changed, 119 insertions, 19 deletions
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/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 ); |