[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - svx/source

Stephan Bergmann sbergman at redhat.com
Tue Jun 24 08:26:46 PDT 2014


 svx/source/form/formcontroller.cxx |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit a07f2fbc482c2644c4a80287b9139585150b30d1
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Jun 24 11:40:23 2014 +0200

    fdo#75339: Substituting XInterface* eq. for object eq. requires queryInterface
    
    Regression introduced with 6a043e9c0acff20e1618ca8ec15c21d5d0fd0d37 "Use the new
    type-checking Reference constructor to reduce code noise" which should have left
    (at least some) "querying upcasts" to XInterface alone.  Closer inspection of
    that commit will probably turn up further regressions that need to be reverted.
    
    Change-Id: Ib81afc12d9df205b5b0fe6cec6ce85d012e9629f
    (cherry picked from commit f8115ce72dad45b82b044d9c8f5c253d0514574d)
    Reviewed-on: https://gerrit.libreoffice.org/9875
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx
index 109e77a..69cd855 100644
--- a/svx/source/form/formcontroller.cxx
+++ b/svx/source/form/formcontroller.cxx
@@ -353,6 +353,8 @@ void ColumnInfoCache::initializeControls( const Sequence< Reference< XControl >
 
             lcl_resetColumnControlInfo( *col );
 
+            Reference< XInterface > xNormColumn( col->xColumn, UNO_QUERY_THROW );
+
             const Reference< XControl >* pControl( _rControls.getConstArray() );
             const Reference< XControl >* pControlEnd( pControl + _rControls.getLength() );
             for ( ; pControl != pControlEnd; ++pControl )
@@ -374,7 +376,7 @@ void ColumnInfoCache::initializeControls( const Sequence< Reference< XControl >
                     {
                         Reference< XPropertySet > xGridColumnModel( xGridColAccess->getByIndex( gridCol ), UNO_QUERY_THROW );
 
-                        if  (   !lcl_isBoundTo( xGridColumnModel, col->xColumn )
+                        if  (   !lcl_isBoundTo( xGridColumnModel, xNormColumn )
                             ||  !lcl_isInputRequired( xGridColumnModel )
                             )
                             continue;   // with next grid column
@@ -394,7 +396,7 @@ void ColumnInfoCache::initializeControls( const Sequence< Reference< XControl >
                 }
 
                 if  (   !xModelPSI->hasPropertyByName( FM_PROP_BOUNDFIELD )
-                    ||  !lcl_isBoundTo( xModel, col->xColumn )
+                    ||  !lcl_isBoundTo( xModel, xNormColumn )
                     ||  !lcl_isInputRequired( xModel )
                     )
                     continue;   // with next control


More information about the Libreoffice-commits mailing list