summaryrefslogtreecommitdiff
path: root/xmlhelp
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-05-03 08:39:03 +0200
committerAshod Nakashian <ashod.nakashian@collabora.co.uk>2016-07-20 01:26:04 -0400
commita0e8e05008e143ee5e3bbc281d1c253c7e5ed136 (patch)
treeeaf5f70a067fd48704addd9f2b582624a2fb44ae /xmlhelp
parent9c7cae1561cfe16226b1f16dce59f08a38da3ce0 (diff)
use Any constructor instead of temporaries
(cherry picked from commit 58a32075ca4f457f570af75aef368dd6c389aca7) Change-Id: Iffb82a2cee1a28d89eeea2b905aaa14086ee475a
Diffstat (limited to 'xmlhelp')
-rw-r--r--xmlhelp/source/cxxhelp/provider/content.cxx4
-rw-r--r--xmlhelp/source/cxxhelp/provider/resultsetbase.cxx8
-rw-r--r--xmlhelp/source/treeview/tvfactory.cxx4
-rw-r--r--xmlhelp/source/treeview/tvread.cxx4
4 files changed, 5 insertions, 15 deletions
diff --git a/xmlhelp/source/cxxhelp/provider/content.cxx b/xmlhelp/source/cxxhelp/provider/content.cxx
index a1411b11752a..5efc82bccf45 100644
--- a/xmlhelp/source/cxxhelp/provider/content.cxx
+++ b/xmlhelp/source/cxxhelp/provider/content.cxx
@@ -473,9 +473,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 5786b20b9c07..e7d5477e321a 100644
--- a/xmlhelp/source/cxxhelp/provider/resultsetbase.cxx
+++ b/xmlhelp/source/cxxhelp/provider/resultsetbase.cxx
@@ -524,16 +524,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 beab51903bd0..da3360a58860 100644
--- a/xmlhelp/source/treeview/tvread.cxx
+++ b/xmlhelp/source/treeview/tvread.cxx
@@ -536,10 +536,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