extensions/source/propctrlr/formcomponenthandler.cxx |   27 -------------------
 vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx            |   12 ++++++--
 2 files changed, 10 insertions(+), 29 deletions(-)

New commits:
commit 6f0f2278662e29d054690a85bad6583b5c65f918
Author: Caolán McNamara <caol...@redhat.com>
Date:   Tue Apr 4 16:31:37 2017 +0100

    Resolves: tdf#106725 paint default window bg before spin button bg
    
    Change-Id: I0c7f982c3a47f45d022271eba69ebed896288d78

diff --git a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx 
b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
index fc0e94149545..6d0edca0c829 100644
--- a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
@@ -1124,11 +1124,17 @@ void GtkSalGraphics::PaintSpinButton(GtkStateFlags 
flags,
 
     if (nPart == ControlPart::Entire)
     {
+        gtk_style_context_set_state(mpWindowStyle, flags);
+
+        gtk_render_background(mpWindowStyle, cr,
+                              0, 0,
+                              rControlRectangle.GetWidth(), 
rControlRectangle.GetHeight());
+
         gtk_style_context_set_state(mpSpinStyle, flags);
 
         gtk_render_background(mpSpinStyle, cr,
                               0, 0,
-                              rControlRectangle.GetWidth(), 
rControlRectangle.GetHeight() );
+                              rControlRectangle.GetWidth(), 
rControlRectangle.GetHeight());
     }
 
     cairo_translate(cr, -rControlRectangle.Left(), -rControlRectangle.Top());
@@ -1511,11 +1517,11 @@ GtkStyleContext* 
GtkSalGraphics::createNewContext(GtkControlPart ePart, gtk_widg
         }
         case GtkControlPart::SpinButton:
         {
-            GtkWidgetPath *path = gtk_widget_path_new();
+            GtkWidgetPath *path = 
gtk_widget_path_copy(gtk_style_context_get_path(mpWindowStyle));
             gtk_widget_path_append_type(path, GTK_TYPE_SPIN_BUTTON);
             set_object_name(path, -1, "spinbutton");
             gtk_widget_path_iter_add_class(path, -1, 
GTK_STYLE_CLASS_HORIZONTAL);
-            return makeContext(path, nullptr);
+            return makeContext(path, mpWindowStyle);
         }
         case GtkControlPart::SpinButtonEntry:
         {
commit fb5cd5d734c56d30f26a5ab510457dc42be88674
Author: Caolán McNamara <caol...@redhat.com>
Date:   Tue Apr 4 15:55:41 2017 +0100

    forget the TODO
    
    Change-Id: I81c8b97e8cd958933caac475145e3b3bcee46d6a

diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx 
b/extensions/source/propctrlr/formcomponenthandler.cxx
index 4cdafc25a6b9..54aee775e94c 100644
--- a/extensions/source/propctrlr/formcomponenthandler.cxx
+++ b/extensions/source/propctrlr/formcomponenthandler.cxx
@@ -300,7 +300,6 @@ namespace pcr
         return aPropertyValue;
     }
 
-
     Any SAL_CALL FormComponentPropertyHandler::getPropertyValue( const 
OUString& _rPropertyName )
     {
         if( _rPropertyName == PROPERTY_ROWSET )
@@ -310,7 +309,6 @@ namespace pcr
         return impl_getPropertyValue_throw( _rPropertyName );
     }
 
-
     void SAL_CALL FormComponentPropertyHandler::setPropertyValue( const 
OUString& _rPropertyName, const Any& _rValue )
     {
         if( _rPropertyName == PROPERTY_ROWSET )
@@ -483,7 +481,6 @@ namespace pcr
         }
     }
 
-
     Any SAL_CALL FormComponentPropertyHandler::convertToPropertyValue( const 
OUString& _rPropertyName, const Any& _rControlValue )
     {
         ::osl::MutexGuard aGuard( m_aMutex );
@@ -617,7 +614,6 @@ namespace pcr
         return aPropertyValue;
     }
 
-
     Any SAL_CALL FormComponentPropertyHandler::convertToControlValue( const 
OUString& _rPropertyName, const Any& _rPropertyValue, const Type& 
_rControlValueType )
     {
         ::osl::MutexGuard aGuard( m_aMutex );
@@ -797,7 +793,6 @@ namespace pcr
         return aControlValue;
     }
 
-
     PropertyState SAL_CALL FormComponentPropertyHandler::getPropertyState( 
const OUString& _rPropertyName )
     {
         ::osl::MutexGuard aGuard( m_aMutex );
@@ -806,7 +801,6 @@ namespace pcr
         return PropertyState_DIRECT_VALUE;
     }
 
-
     void SAL_CALL FormComponentPropertyHandler::addPropertyChangeListener( 
const Reference< XPropertyChangeListener >& _rxListener )
     {
         ::osl::MutexGuard aGuard( m_aMutex );
@@ -815,7 +809,6 @@ namespace pcr
             m_xComponent->addPropertyChangeListener( OUString(), _rxListener );
     }
 
-
     void SAL_CALL FormComponentPropertyHandler::removePropertyChangeListener( 
const Reference< XPropertyChangeListener >& _rxListener )
     {
         ::osl::MutexGuard aGuard( m_aMutex );
@@ -824,7 +817,6 @@ namespace pcr
         FormComponentPropertyHandler_Base::removePropertyChangeListener( 
_rxListener );
     }
 
-
     Sequence< Property > SAL_CALL 
FormComponentPropertyHandler::doDescribeSupportedProperties() const
     {
         if ( !m_xComponentPropertyInfo.is() )
@@ -897,13 +889,11 @@ namespace pcr
         return Sequence< Property >( &(*aProperties.begin()), 
aProperties.size() );
     }
 
-
     Sequence< OUString > SAL_CALL 
FormComponentPropertyHandler::getSupersededProperties( )
     {
         return Sequence< OUString >( );
     }
 
-
     Sequence< OUString > SAL_CALL 
FormComponentPropertyHandler::getActuatingProperties( )
     {
         ::osl::MutexGuard aGuard( m_aMutex );
@@ -933,7 +923,6 @@ namespace pcr
         return Sequence< OUString >( &(*aInterestingProperties.begin()), 
aInterestingProperties.size() );
     }
 
-
     LineDescriptor SAL_CALL 
FormComponentPropertyHandler::describePropertyLine( const OUString& 
_rPropertyName,
         const Reference< XPropertyControlFactory >& _rxControlFactory )
     {
@@ -1382,7 +1371,6 @@ namespace pcr
         return aDescriptor;
     }
 
-
     InteractiveSelectionResult SAL_CALL 
FormComponentPropertyHandler::onInteractivePropertySelection( const OUString& 
_rPropertyName, sal_Bool /*_bPrimary*/, Any& _rData, const Reference< 
XObjectInspectorUI >& _rxInspectorUI )
     {
         if ( !_rxInspectorUI.is() )
@@ -1473,7 +1461,6 @@ namespace pcr
         return eResult;
     }
 
-
     namespace
     {
         void lcl_rebuildAndResetCommand( const Reference< XObjectInspectorUI 
>& _rxInspectorUI, const Reference< XPropertyHandler >& _rxHandler )
@@ -1485,7 +1472,6 @@ namespace pcr
         }
     }
 
-
     void SAL_CALL FormComponentPropertyHandler::actuatingPropertyChanged( 
const OUString& _rActuatingPropertyName, const Any& _rNewValue, const Any& 
/*_rOldValue*/, const Reference< XObjectInspectorUI >& _rxInspectorUI, sal_Bool 
_bFirstTimeInit )
     {
         if ( !_rxInspectorUI.is() )
@@ -1774,7 +1760,6 @@ namespace pcr
         }
     }
 
-
     void FormComponentPropertyHandler::impl_updateDependentProperty_nothrow( 
PropertyId _nPropId, const Reference< XObjectInspectorUI >& _rxInspectorUI ) 
const
     {
         try
@@ -1987,7 +1972,6 @@ namespace pcr
         }
     }
 
-
     void SAL_CALL FormComponentPropertyHandler::disposing()
     {
         FormComponentPropertyHandler_Base::disposing();
@@ -1995,7 +1979,6 @@ namespace pcr
             m_xCommandDesigner->dispose();
     }
 
-
     sal_Bool SAL_CALL FormComponentPropertyHandler::suspend( sal_Bool 
_bSuspend )
     {
         ::osl::MutexGuard aGuard( m_aMutex );
@@ -2005,7 +1988,6 @@ namespace pcr
         return true;
     }
 
-
     void FormComponentPropertyHandler::onNewComponent()
     {
         FormComponentPropertyHandler_Base::onNewComponent();
@@ -2067,7 +2049,6 @@ namespace pcr
         }
     }
 
-
     void FormComponentPropertyHandler::impl_classifyControlModel_throw( )
     {
         if ( impl_componentHasProperty_throw( PROPERTY_CLASSID ) )
@@ -2151,7 +2132,6 @@ namespace pcr
         }
     }
 
-
     void FormComponentPropertyHandler::impl_normalizePropertyValue_nothrow( 
Any& _rValue, PropertyId _nPropId ) const
     {
         switch ( _nPropId )
@@ -2185,7 +2165,6 @@ namespace pcr
         }
     }
 
-
     bool FormComponentPropertyHandler::impl_shouldExcludeProperty_nothrow( 
const Property& _rProperty ) const
     {
         OSL_ENSURE( _rProperty.Handle == m_pInfoService->getPropertyId( 
_rProperty.Name ),
@@ -2263,10 +2242,7 @@ namespace pcr
 
         // don't show experimental properties unless allowed to do so
         if ( ( nPropertyUIFlags & PROP_FLAG_EXPERIMENTAL ) != 0 )
-        {
-            if ( true ) // TODO
-                return true;
-        }
+            return true;
 
         // no data properties if no Base is installed.
         if ( ( nPropertyUIFlags & PROP_FLAG_DATA_PROPERTY ) != 0 )
@@ -2276,7 +2252,6 @@ namespace pcr
         return false;
     }
 
-
     Reference< XRowSet > FormComponentPropertyHandler::impl_getRowSet_throw( ) 
const
     {
         Reference< XRowSet > xRowSet = m_xRowSet;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to