diff options
author | Noel Grandin <noel@peralex.com> | 2016-05-03 08:39:03 +0200 |
---|---|---|
committer | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2016-07-20 01:26:04 -0400 |
commit | a0e8e05008e143ee5e3bbc281d1c253c7e5ed136 (patch) | |
tree | eaf5f70a067fd48704addd9f2b582624a2fb44ae /starmath | |
parent | 9c7cae1561cfe16226b1f16dce59f08a38da3ce0 (diff) |
use Any constructor instead of temporaries
(cherry picked from commit 58a32075ca4f457f570af75aef368dd6c389aca7)
Change-Id: Iffb82a2cee1a28d89eeea2b905aaa14086ee475a
Diffstat (limited to 'starmath')
-rw-r--r-- | starmath/source/mathmlexport.cxx | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/starmath/source/mathmlexport.cxx b/starmath/source/mathmlexport.cxx index 83f6b2996c5b..63a031e2e1c2 100644 --- a/starmath/source/mathmlexport.cxx +++ b/starmath/source/mathmlexport.cxx @@ -162,10 +162,8 @@ bool SmXMLExportWrapper::Export(SfxMedium &rMedium) SvtSaveOptions aSaveOpt; OUString sUsePrettyPrinting("UsePrettyPrinting"); - sal_Bool bUsePrettyPrinting( bFlat || aSaveOpt.IsPrettyPrinting() ); - Any aAny; - aAny.setValue( &bUsePrettyPrinting, cppu::UnoType<bool>::get() ); - xInfoSet->setPropertyValue( sUsePrettyPrinting, aAny ); + bool bUsePrettyPrinting( bFlat || aSaveOpt.IsPrettyPrinting() ); + xInfoSet->setPropertyValue( sUsePrettyPrinting, Any(bUsePrettyPrinting) ); // Set base URI OUString sPropName( "BaseURI" ); @@ -330,17 +328,13 @@ bool SmXMLExportWrapper::WriteThroughComponent( OUString aPropName( "MediaType" ); OUString aMime( "text/xml" ); - uno::Any aAny; - aAny <<= aMime; uno::Reference < beans::XPropertySet > xSet( xStream, uno::UNO_QUERY ); - xSet->setPropertyValue( aPropName, aAny ); + xSet->setPropertyValue( aPropName, Any(aMime) ); // all streams must be encrypted in encrypted document OUString aTmpPropName( "UseCommonStoragePasswordEncryption" ); - sal_Bool bTrue = sal_True; - aAny.setValue( &bTrue, cppu::UnoType<bool>::get() ); - xSet->setPropertyValue( aTmpPropName, aAny ); + xSet->setPropertyValue( aTmpPropName, Any(true) ); // set Base URL if ( rPropSet.is() ) |