summaryrefslogtreecommitdiff
path: root/vcl
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 /vcl
parent9c7cae1561cfe16226b1f16dce59f08a38da3ce0 (diff)
use Any constructor instead of temporaries
(cherry picked from commit 58a32075ca4f457f570af75aef368dd6c389aca7) Change-Id: Iffb82a2cee1a28d89eeea2b905aaa14086ee475a
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/filter/FilterConfigItem.cxx18
-rw-r--r--vcl/unx/gtk/a11y/atkvalue.cxx4
2 files changed, 6 insertions, 16 deletions
diff --git a/vcl/source/filter/FilterConfigItem.cxx b/vcl/source/filter/FilterConfigItem.cxx
index 4a7302f3998b..0d1f6b87e1ce 100644
--- a/vcl/source/filter/FilterConfigItem.cxx
+++ b/vcl/source/filter/FilterConfigItem.cxx
@@ -54,13 +54,10 @@ static bool ImpIsTreeAvailable( Reference< XMultiServiceFactory >& rXCfgProv, co
if ( rTree.endsWith("/") )
--nTokenCount;
- Any aAny;
- aAny <<= rTree.getToken(i++, '/');
-
// creation arguments: nodepath
PropertyValue aPathArgument;
aPathArgument.Name = "nodepath";
- aPathArgument.Value = aAny;
+ aPathArgument.Value = Any(rTree.getToken(i++, '/'));
Sequence< Any > aArguments( 1 );
aArguments[ 0 ] <<= aPathArgument;
@@ -113,19 +110,16 @@ void FilterConfigItem::ImpInitTree( const OUString& rSubTree )
OUString sTree = "/org.openoffice." + rSubTree;
if ( ImpIsTreeAvailable(xCfgProv, sTree) )
{
- Any aAny;
// creation arguments: nodepath
PropertyValue aPathArgument;
- aAny <<= sTree;
aPathArgument.Name = "nodepath";
- aPathArgument.Value = aAny;
+ aPathArgument.Value = Any(sTree);
// creation arguments: commit mode
PropertyValue aModeArgument;
bool bAsynchron = true;
- aAny <<= bAsynchron;
aModeArgument.Name = "lazywrite";
- aModeArgument.Value = aAny;
+ aModeArgument.Value = Any(bAsynchron);
Sequence< Any > aArguments( 2 );
aArguments[ 0 ] <<= aPathArgument;
@@ -355,10 +349,9 @@ void FilterConfigItem::WriteBool( const OUString& rKey, bool bNewValue )
{
if ( bOldValue != bNewValue )
{
- aAny <<= bNewValue;
try
{
- xPropSet->setPropertyValue( rKey, aAny );
+ xPropSet->setPropertyValue( rKey, Any(bNewValue) );
bModified = true;
}
catch ( css::uno::Exception& )
@@ -389,10 +382,9 @@ void FilterConfigItem::WriteInt32( const OUString& rKey, sal_Int32 nNewValue )
{
if ( nOldValue != nNewValue )
{
- aAny <<= nNewValue;
try
{
- xPropSet->setPropertyValue( rKey, aAny );
+ xPropSet->setPropertyValue( rKey, Any(nNewValue) );
bModified = true;
}
catch ( css::uno::Exception& )
diff --git a/vcl/unx/gtk/a11y/atkvalue.cxx b/vcl/unx/gtk/a11y/atkvalue.cxx
index 5e4b943886a3..3e6d0c15aec1 100644
--- a/vcl/unx/gtk/a11y/atkvalue.cxx
+++ b/vcl/unx/gtk/a11y/atkvalue.cxx
@@ -111,9 +111,7 @@ value_wrapper_set_current_value( AtkValue *value,
{
// FIXME - this needs expanding
double aDouble = g_value_get_double( gval );
- uno::Any aAny;
- aAny <<= aDouble;
- return pValue->setCurrentValue( aAny );
+ return pValue->setCurrentValue( uno::Any(aDouble) );
}
}
catch(const uno::Exception&) {