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 /basctl/source/dlged/dlged.cxx | |
parent | 7d47700972d267fe7c5270c5dadd45a523a2baec (diff) |
use Any constructor instead of temporaries
Change-Id: Iffb82a2cee1a28d89eeea2b905aaa14086ee475a
Diffstat (limited to 'basctl/source/dlged/dlged.cxx')
-rw-r--r-- | basctl/source/dlged/dlged.cxx | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx index af966403ff6b..a5f254257514 100644 --- a/basctl/source/dlged/dlged.cxx +++ b/basctl/source/dlged/dlged.cxx @@ -794,9 +794,7 @@ void DlgEditor::Copy() memcpy( pCombinedData + 4, DialogModelBytes.getConstArray(), nDialogDataLen ); memcpy( pCombinedData + nResOffset, aResData.getConstArray(), nResDataLen ); - Any aCombinedDataAny; - aCombinedDataAny <<= aCombinedData; - aSeqData[1] = aCombinedDataAny; + aSeqData[1] = Any(aCombinedData); pTrans = new DlgEdTransferableImpl( m_ClipboardDataFlavorsResource, aSeqData ); } @@ -936,16 +934,12 @@ void DlgEditor::Paste() // set new name OUString aOUniqueName( pCtrlObj->GetUniqueName() ); Reference< beans::XPropertySet > xPSet( xCtrlModel , UNO_QUERY ); - Any aUniqueName; - aUniqueName <<= aOUniqueName; - xPSet->setPropertyValue( DLGED_PROP_NAME, aUniqueName ); + xPSet->setPropertyValue( DLGED_PROP_NAME, Any(aOUniqueName) ); // set tabindex Reference< container::XNameAccess > xNA( m_xUnoControlDialogModel , UNO_QUERY ); Sequence< OUString > aNames_ = xNA->getElementNames(); - Any aTabIndex; - aTabIndex <<= (sal_Int16) aNames_.getLength(); - xPSet->setPropertyValue( DLGED_PROP_TABINDEX, aTabIndex ); + xPSet->setPropertyValue( DLGED_PROP_TABINDEX, Any((sal_Int16) aNames_.getLength()) ); if( bLocalized ) { |