diff options
author | Noel Grandin <noel@peralex.com> | 2016-05-03 08:39:03 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-05-04 12:39:40 +0200 |
commit | 58a32075ca4f457f570af75aef368dd6c389aca7 (patch) | |
tree | e437dcbdeb248b4316cb8a9281d1543419853f6d /xmlhelp | |
parent | 7d47700972d267fe7c5270c5dadd45a523a2baec (diff) |
use Any constructor instead of temporaries
Change-Id: Iffb82a2cee1a28d89eeea2b905aaa14086ee475a
Diffstat (limited to 'xmlhelp')
-rw-r--r-- | xmlhelp/source/cxxhelp/provider/content.cxx | 4 | ||||
-rw-r--r-- | xmlhelp/source/cxxhelp/provider/resultsetbase.cxx | 8 | ||||
-rw-r--r-- | xmlhelp/source/treeview/tvfactory.cxx | 4 | ||||
-rw-r--r-- | xmlhelp/source/treeview/tvread.cxx | 4 |
4 files changed, 5 insertions, 15 deletions
diff --git a/xmlhelp/source/cxxhelp/provider/content.cxx b/xmlhelp/source/cxxhelp/provider/content.cxx index 0826f439ab9c..9cf2280270f1 100644 --- a/xmlhelp/source/cxxhelp/provider/content.cxx +++ b/xmlhelp/source/cxxhelp/provider/content.cxx @@ -459,9 +459,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( uno::Sequence< OUString > seq( 2 ); seq[0] = "Heading"; seq[1] = "FullText"; - uno::Any aAny; - aAny <<= seq; - xRow->appendObject( rProp,aAny ); + xRow->appendObject( rProp, uno::Any(seq) ); } else if ( rProp.Name == "Order" ) { diff --git a/xmlhelp/source/cxxhelp/provider/resultsetbase.cxx b/xmlhelp/source/cxxhelp/provider/resultsetbase.cxx index 3ac086f461a6..c6d2ec669391 100644 --- a/xmlhelp/source/cxxhelp/provider/resultsetbase.cxx +++ b/xmlhelp/source/cxxhelp/provider/resultsetbase.cxx @@ -522,16 +522,12 @@ uno::Any SAL_CALL ResultSetBase::getPropertyValue( { if( PropertyName == "IsRowCountFinal" ) { - uno::Any aAny; - aAny <<= m_bRowCountFinal; - return aAny; + return uno::Any(m_bRowCountFinal); } else if ( PropertyName == "RowCount" ) { - uno::Any aAny; sal_Int32 count = m_aItems.size(); - aAny <<= count; - return aAny; + return uno::Any(count); } else throw beans::UnknownPropertyException(); diff --git a/xmlhelp/source/treeview/tvfactory.cxx b/xmlhelp/source/treeview/tvfactory.cxx index 56c789284172..f054d4f0e2c7 100644 --- a/xmlhelp/source/treeview/tvfactory.cxx +++ b/xmlhelp/source/treeview/tvfactory.cxx @@ -71,13 +71,11 @@ TVFactory::createInstance( throw( Exception, RuntimeException, std::exception ) { - Any aAny; - aAny <<= OUString(); Sequence< Any > seq( 1 ); seq[0] <<= PropertyValue( OUString( "nodepath" ), -1, - aAny, + Any( OUString() ), PropertyState_DIRECT_VALUE ); return createInstanceWithArguments( aServiceSpecifier, diff --git a/xmlhelp/source/treeview/tvread.cxx b/xmlhelp/source/treeview/tvread.cxx index 53b56c71d358..f9074fe91ed4 100644 --- a/xmlhelp/source/treeview/tvread.cxx +++ b/xmlhelp/source/treeview/tvread.cxx @@ -534,10 +534,8 @@ TVChildTarget::getByName( const OUString& aName ) if( idx < 0 || Elements.size() <= sal_uInt32( idx ) ) throw NoSuchElementException(); - Any aAny; cppu::OWeakObject* p = Elements[idx].get(); - aAny <<= Reference< XInterface >( p ); - return aAny; + return Any( Reference< XInterface >( p ) ); } Sequence< OUString > SAL_CALL |