[Libreoffice-commits] core.git: extensions/source

Stephan Bergmann sbergman at redhat.com
Tue May 21 07:32:39 PDT 2013


 extensions/source/update/check/updatehdl.cxx |   27 +++++++++++++--------------
 extensions/source/update/check/updatehdl.hxx |    2 +-
 2 files changed, 14 insertions(+), 15 deletions(-)

New commits:
commit cb4b6dde8fda2a5848e11063028bf44d72f85431
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue May 21 16:29:31 2013 +0200

    -Werror,-Wuninitialized
    
    Bogus
    
      uno::Reference< awt::XControlModel > xControlModel = xControlModel;
    
    introduced with 6c61b20a8d4a6dcac28801cde82a211fb7e30654 "fdo#46808, Convert
    awt::UnoControlDialogModel to new style."  Correct fix involves adding missing
    "const" in declaration of UpdateHandler::insertControlModel, so implicit
    Reference up-cast works.
    
    Change-Id: I8f6d679a38d99188eb893366e9b552974b3c1bf2

diff --git a/extensions/source/update/check/updatehdl.cxx b/extensions/source/update/check/updatehdl.cxx
index 1852581..6c96e6e 100644
--- a/extensions/source/update/check/updatehdl.cxx
+++ b/extensions/source/update/check/updatehdl.cxx
@@ -819,7 +819,7 @@ void UpdateHandler::focusControl( DialogControls eID )
 }
 
 //--------------------------------------------------------------------
-void UpdateHandler::insertControlModel( uno::Reference< awt::XControlModel > & rxDialogModel,
+void UpdateHandler::insertControlModel( uno::Reference< awt::XControlModel > const & rxDialogModel,
                                         OUString const & rServiceName,
                                         OUString const & rControlName,
                                         awt::Rectangle const & rPosSize,
@@ -1093,23 +1093,22 @@ void UpdateHandler::createDialog()
 
     loadStrings();
 
-    uno::Reference< awt::XUnoControlDialogModel > xControlDialogModel = awt::UnoControlDialogModel::create( mxContext );
+    uno::Reference< awt::XUnoControlDialogModel > xControlModel = awt::UnoControlDialogModel::create( mxContext );
     {
         // @see awt/UnoControlDialogModel.idl
-        xControlDialogModel->setTitle( msDlgTitle);
-        xControlDialogModel->setCloseable( true );
-        xControlDialogModel->setEnabled( true );
-        xControlDialogModel->setMoveable( true );
-        xControlDialogModel->setSizeable( true );
-        xControlDialogModel->setDesktopAsParent( true );
-        xControlDialogModel->setPositionX( 100 );
-        xControlDialogModel->setPositionY( 100 );
-        xControlDialogModel->setWidth( DIALOG_WIDTH );
-        xControlDialogModel->setHeight( DIALOG_HEIGHT );
-        xControlDialogModel->setHelpURL( INET_HID_SCHEME + OUString::createFromAscii( HID_CHECK_FOR_UPD_DLG ) );
+        xControlModel->setTitle( msDlgTitle);
+        xControlModel->setCloseable( true );
+        xControlModel->setEnabled( true );
+        xControlModel->setMoveable( true );
+        xControlModel->setSizeable( true );
+        xControlModel->setDesktopAsParent( true );
+        xControlModel->setPositionX( 100 );
+        xControlModel->setPositionY( 100 );
+        xControlModel->setWidth( DIALOG_WIDTH );
+        xControlModel->setHeight( DIALOG_HEIGHT );
+        xControlModel->setHelpURL( INET_HID_SCHEME + OUString::createFromAscii( HID_CHECK_FOR_UPD_DLG ) );
     }
 
-    uno::Reference< awt::XControlModel > xControlModel = xControlModel;
     {   // Label (fixed text) <status>
         uno::Sequence< beans::NamedValue > aProps(1);
 
diff --git a/extensions/source/update/check/updatehdl.hxx b/extensions/source/update/check/updatehdl.hxx
index 39804a7..661b6a8 100644
--- a/extensions/source/update/check/updatehdl.hxx
+++ b/extensions/source/update/check/updatehdl.hxx
@@ -149,7 +149,7 @@ private:
     static void             setProperty( com::sun::star::uno::Sequence< com::sun::star::beans::NamedValue > &rProps,
                                          const int nIndex, const OUString &rPropName, const com::sun::star::uno::Any &rPropValue )
                                          { rProps[ nIndex ].Name = rPropName; rProps[ nIndex ].Value = rPropValue; }
-    static void             insertControlModel( com::sun::star::uno::Reference< com::sun::star::awt::XControlModel > & rxDialogModel,
+    static void             insertControlModel( com::sun::star::uno::Reference< com::sun::star::awt::XControlModel > const & rxDialogModel,
                                                 OUString const & rServiceName,
                                                 OUString const & rControlName,
                                                 com::sun::star::awt::Rectangle const & rPosSize,


More information about the Libreoffice-commits mailing list