connectivity/source/commontools/dbtools.cxx            |    8 ++------
 dbaccess/source/core/api/SingleSelectQueryComposer.cxx |    3 +--
 dbaccess/source/ui/uno/unosqlmessage.cxx               |    5 ++---
 filter/source/pdf/impdialog.cxx                        |    2 +-
 filter/source/pdf/pdfexport.cxx                        |    2 +-
 forms/source/richtext/richtextmodel.cxx                |    2 +-
 sd/source/ui/animations/CustomAnimationDialog.cxx      |    2 +-
 sdext/source/minimizer/optimizationstats.cxx           |    2 +-
 svtools/source/graphic/renderer.cxx                    |    2 +-
 svtools/source/uno/unoiface.cxx                        |    2 --
 svx/source/accessibility/AccessibleControlShape.cxx    |    2 +-
 unotools/source/config/historyoptions.cxx              |    8 ++++----
 vbahelper/source/vbahelper/vbahelper.cxx               |    6 ++----
 13 files changed, 18 insertions(+), 28 deletions(-)

New commits:
commit 7567a4c230625bbf922c52c861363f1cc4d6a1c7
Author: Jochen Nitschke <j.nitschke+loger...@ok.de>
Date:   Tue Oct 18 12:56:25 2016 +0200

    '>>=' with rhs Any is a copy assignment
    
    replace '>>=' operator with '=' where return value is not checked
    and simplify. (note: switches lhs with rhs)
    
    Change-Id: I0d283e8786ea996ed80d7aa9d8a4ea930a3d52f8
    Reviewed-on: https://gerrit.libreoffice.org/30004
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/connectivity/source/commontools/dbtools.cxx 
b/connectivity/source/commontools/dbtools.cxx
index 7352946..0f4b0ad 100644
--- a/connectivity/source/commontools/dbtools.cxx
+++ b/connectivity/source/commontools/dbtools.cxx
@@ -1438,9 +1438,7 @@ bool implUpdateObject(const Reference< XRowUpdate >& 
_rxUpdatedObject,
     {
         case TypeClass_ANY:
         {
-            Any aInnerValue;
-            _rValue >>= aInnerValue;
-            bSuccessfullyReRouted = implUpdateObject(_rxUpdatedObject, 
_nColumnIndex, aInnerValue);
+            bSuccessfullyReRouted = implUpdateObject(_rxUpdatedObject, 
_nColumnIndex, _rValue);
         }
         break;
 
@@ -1546,9 +1544,7 @@ bool implSetObject( const Reference< XParameters >& 
_rxParameters,
 
         case TypeClass_ANY:
         {
-            Any aInnerValue;
-            _rValue >>= aInnerValue;
-            bSuccessfullyReRouted = implSetObject(_rxParameters, 
_nColumnIndex, aInnerValue);
+            bSuccessfullyReRouted = implSetObject(_rxParameters, 
_nColumnIndex, _rValue);
         }
         break;
 
diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx 
b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
index 4bd1fe4..468b1c9 100644
--- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
+++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
@@ -1552,8 +1552,7 @@ void OSingleSelectQueryComposer::setConditionByColumn( 
const Reference< XPropert
         OUString aName;
         column->getPropertyValue(PROPERTY_NAME) >>= aName;
 
-        Any aValue;
-        column->getPropertyValue(PROPERTY_VALUE) >>= aValue;
+        const Any aValue = column->getPropertyValue(PROPERTY_VALUE);
 
         OUStringBuffer aSQL;
         const OUString aQuote    = m_xMetaData->getIdentifierQuoteString();
diff --git a/dbaccess/source/ui/uno/unosqlmessage.cxx 
b/dbaccess/source/ui/uno/unosqlmessage.cxx
index a2d01a7..6638c82 100644
--- a/dbaccess/source/ui/uno/unosqlmessage.cxx
+++ b/dbaccess/source/ui/uno/unosqlmessage.cxx
@@ -88,13 +88,12 @@ void OSQLMessageDialog::initialize(Sequence<Any> const & 
args) throw (css::uno::
 {
     OUString title;
     Reference< css::awt::XWindow > parentWindow;
-    css::uno::Any sqlException;
 
-    if ((args.getLength() == 3) && (args[0] >>= title) && (args[1] >>= 
parentWindow) && (args[2] >>= sqlException)) {
+    if ((args.getLength() == 3) && (args[0] >>= title) && (args[1] >>= 
parentWindow)) {
         Sequence<Any> s(3);
         s[0] <<= PropertyValue( "Title", -1, makeAny(title), 
PropertyState_DIRECT_VALUE);
         s[1] <<= PropertyValue( "ParentWindow", -1, makeAny(parentWindow), 
PropertyState_DIRECT_VALUE);
-        s[2] <<= PropertyValue( "SQLException", -1, sqlException, 
PropertyState_DIRECT_VALUE);
+        s[2] <<= PropertyValue( "SQLException", -1, args[2], 
PropertyState_DIRECT_VALUE);
         OGenericUnoDialog::initialize(s);
     } else {
         OGenericUnoDialog::initialize(args);
diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx
index 671a9f6..65657b1 100644
--- a/filter/source/pdf/impdialog.cxx
+++ b/filter/source/pdf/impdialog.cxx
@@ -133,7 +133,7 @@ ImpPDFTabDialog::ImpPDFTabDialog(vcl::Window* pParent, 
Sequence< PropertyValue >
         {
             Reference< view::XSelectionSupplier > xView( xController, 
UNO_QUERY );
             if( xView.is() )
-                xView->getSelection() >>= maSelection;
+                maSelection = xView->getSelection();
         }
     }
     catch(const RuntimeException &)
diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx
index c36be38..307d39e 100644
--- a/filter/source/pdf/pdfexport.cxx
+++ b/filter/source/pdf/pdfexport.cxx
@@ -445,7 +445,7 @@ bool PDFExport::Export( const OUString& rFile, const 
Sequence< PropertyValue >&
                 if ( rFilterData[ nData ].Name == "PageRange" )
                     rFilterData[ nData ].Value >>= aPageRange;
                 else if ( rFilterData[ nData ].Name == "Selection" )
-                    rFilterData[ nData ].Value >>= aSelection;
+                    aSelection = rFilterData[ nData ].Value;
                 else if ( rFilterData[ nData ].Name == 
"UseLosslessCompression" )
                     rFilterData[ nData ].Value >>= mbUseLosslessCompression;
                 else if ( rFilterData[ nData ].Name == "Quality" )
diff --git a/forms/source/richtext/richtextmodel.cxx 
b/forms/source/richtext/richtextmodel.cxx
index 9f63b605..7949880 100644
--- a/forms/source/richtext/richtextmodel.cxx
+++ b/forms/source/richtext/richtextmodel.cxx
@@ -65,7 +65,7 @@ namespace frm
         getPropertyDefaultByHandle( PROPERTY_ID_VSCROLL                 ) >>= 
m_bVScroll;
         getPropertyDefaultByHandle( PROPERTY_ID_READONLY                ) >>= 
m_bReadonly;
         getPropertyDefaultByHandle( PROPERTY_ID_PRINTABLE               ) >>= 
m_bPrintable;
-        getPropertyDefaultByHandle( PROPERTY_ID_ALIGN                   ) >>= 
m_aAlign;
+        m_aAlign = getPropertyDefaultByHandle( PROPERTY_ID_ALIGN );
         getPropertyDefaultByHandle( PROPERTY_ID_ECHO_CHAR               ) >>= 
m_nEchoChar;
         getPropertyDefaultByHandle( PROPERTY_ID_MAXTEXTLEN              ) >>= 
m_nMaxTextLength;
         getPropertyDefaultByHandle( PROPERTY_ID_MULTILINE               ) >>= 
m_bMultiLine;
diff --git a/sd/source/ui/animations/CustomAnimationDialog.cxx 
b/sd/source/ui/animations/CustomAnimationDialog.cxx
index a0b826d..2ba3459 100644
--- a/sd/source/ui/animations/CustomAnimationDialog.cxx
+++ b/sd/source/ui/animations/CustomAnimationDialog.cxx
@@ -1495,7 +1495,7 @@ void CustomAnimationEffectTabPage::update( 
STLPropertySet* pSet )
         }
 
         if( mpSet->getPropertyState( nHandleSoundURL ) != 
STLPropertyState::Ambiguous )
-            mpSet->getPropertyValue( nHandleSoundURL  ) >>= aOldSoundURL;
+            aOldSoundURL = mpSet->getPropertyValue( nHandleSoundURL  );
 
         if( aNewSoundURL != aOldSoundURL )
             pSet->setPropertyValue( nHandleSoundURL, aNewSoundURL );
diff --git a/sdext/source/minimizer/optimizationstats.cxx 
b/sdext/source/minimizer/optimizationstats.cxx
index 6801cf0..04567a1 100644
--- a/sdext/source/minimizer/optimizationstats.cxx
+++ b/sdext/source/minimizer/optimizationstats.cxx
@@ -67,7 +67,7 @@ css::beans::PropertyValues 
OptimizationStats::GetStatusSequence()
 void OptimizationStats::InitializeStatusValues( const uno::Sequence< 
PropertyValue >& rOptimizationStats )
 {
     for( int i = 0; i < rOptimizationStats.getLength(); i++ )
-        rOptimizationStats[ i ].Value >>= maStats[ TKGet( rOptimizationStats[ 
i ].Name ) ];
+        maStats[ TKGet( rOptimizationStats[ i ].Name ) ] = rOptimizationStats[ 
i ].Value;
 }
 
 
diff --git a/svtools/source/graphic/renderer.cxx 
b/svtools/source/graphic/renderer.cxx
index d7134e7..19c32bd 100644
--- a/svtools/source/graphic/renderer.cxx
+++ b/svtools/source/graphic/renderer.cxx
@@ -208,7 +208,7 @@ void GraphicRendererVCL::_setPropertyValues( const 
comphelper::PropertyMapEntry*
 
             case UNOGRAPHIC_RENDERDATA:
             {
-                *pValues >>= maRenderData;
+                 maRenderData = *pValues;
             }
             break;
         }
diff --git a/svtools/source/uno/unoiface.cxx b/svtools/source/uno/unoiface.cxx
index b286fa1..d250fa1 100644
--- a/svtools/source/uno/unoiface.cxx
+++ b/svtools/source/uno/unoiface.cxx
@@ -1439,8 +1439,6 @@ void SVTXRoadmap::propertyChange( const 
css::beans::PropertyChangeEvent& evt ) t
         css::uno::Any aValue = xPropertySet->getPropertyValue("ID");
         aValue >>= nID;
 
-        css::uno::Any rVal = evt.NewValue;
-        evt.NewValue >>= rVal;
         OUString sPropertyName = evt.PropertyName;
         if ( sPropertyName == "Enabled" )
         {
diff --git a/svx/source/accessibility/AccessibleControlShape.cxx 
b/svx/source/accessibility/AccessibleControlShape.cxx
index b6bb5de..cec0225 100644
--- a/svx/source/accessibility/AccessibleControlShape.cxx
+++ b/svx/source/accessibility/AccessibleControlShape.cxx
@@ -888,7 +888,7 @@ AccessibleControlShape* SAL_CALL 
AccessibleControlShape::GetLabeledByControlShap
         // get the "label by" property value of the control
         if (::comphelper::hasProperty(rAccLabelControlProperty, 
m_xControlModel))
         {
-            m_xControlModel->getPropertyValue( rAccLabelControlProperty ) >>= 
sCtlLabelBy;
+            sCtlLabelBy = 
m_xControlModel->getPropertyValue(rAccLabelControlProperty);
             if( sCtlLabelBy.hasValue() )
             {
                 Reference< XPropertySet >  xAsSet (sCtlLabelBy, UNO_QUERY);
diff --git a/unotools/source/config/historyoptions.cxx 
b/unotools/source/config/historyoptions.cxx
index 6dd8441..28de4cc 100644
--- a/unotools/source/config/historyoptions.cxx
+++ b/unotools/source/config/historyoptions.cxx
@@ -306,10 +306,10 @@ Sequence< Sequence<PropertyValue> > 
SvtHistoryOptions_Impl::GetList(EHistoryType
             xItemList->getByName(sUrl) >>= xSet;
             seqProperties[s_nOffsetURL  ].Value <<= sUrl;
 
-            xSet->getPropertyValue(s_sFilter)   >>= 
seqProperties[s_nOffsetFilter   ].Value;
-            xSet->getPropertyValue(s_sTitle)    >>= 
seqProperties[s_nOffsetTitle    ].Value;
-            xSet->getPropertyValue(s_sPassword) >>= 
seqProperties[s_nOffsetPassword ].Value;
-            xSet->getPropertyValue(s_sThumbnail)>>= 
seqProperties[s_nOffsetThumbnail].Value;
+            seqProperties[s_nOffsetFilter   ].Value = 
xSet->getPropertyValue(s_sFilter);
+            seqProperties[s_nOffsetTitle    ].Value = 
xSet->getPropertyValue(s_sTitle);
+            seqProperties[s_nOffsetPassword ].Value = 
xSet->getPropertyValue(s_sPassword);
+            seqProperties[s_nOffsetThumbnail].Value = 
xSet->getPropertyValue(s_sThumbnail);
             aRet[nCount++] = seqProperties;
         }
         catch(const uno::Exception& ex)
diff --git a/vbahelper/source/vbahelper/vbahelper.cxx 
b/vbahelper/source/vbahelper/vbahelper.cxx
index 2c6249b..406cc84 100644
--- a/vbahelper/source/vbahelper/vbahelper.cxx
+++ b/vbahelper/source/vbahelper/vbahelper.cxx
@@ -753,16 +753,14 @@ void setDefaultPropByIntrospection( const uno::Any& aObj, 
const uno::Any& aValue
 
 uno::Any getPropertyValue( const uno::Sequence< beans::PropertyValue >& aProp, 
const OUString& aName )
 {
-    uno::Any result;
     for ( sal_Int32 i = 0; i < aProp.getLength(); i++ )
     {
         if ( aProp[i].Name.equals(aName) )
         {
-            aProp[i].Value >>= result;
-            return result;
+            return aProp[i].Value;
         }
     }
-    return result;
+    return uno::Any();
 }
 
 bool setPropertyValue( uno::Sequence< beans::PropertyValue >& aProp, const 
OUString& aName, const uno::Any& aValue )
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to