summaryrefslogtreecommitdiff
path: root/oox/source/ole/axcontrolfragment.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2022-08-01 22:38:28 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-08-02 10:41:57 +0200
commit4a99111c4216fcd56d8bccb71c32fa7969448d27 (patch)
tree3c849903aa38da32fb54ddc1def99c0711a363ca /oox/source/ole/axcontrolfragment.cxx
parent1abb82c0bc8c46acac8b2644e645725ff92dd538 (diff)
use more getStringDefaulted
rather than repeatedly constructing an empty OUString parameter Change-Id: I9ed2826f260f1f551c77e03b26f13a98e277f42f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137685 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'oox/source/ole/axcontrolfragment.cxx')
-rw-r--r--oox/source/ole/axcontrolfragment.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/oox/source/ole/axcontrolfragment.cxx b/oox/source/ole/axcontrolfragment.cxx
index a0f0b109669a..5091af660713 100644
--- a/oox/source/ole/axcontrolfragment.cxx
+++ b/oox/source/ole/axcontrolfragment.cxx
@@ -64,7 +64,7 @@ ContextHandlerRef AxControlPropertyContext::onCreateContext( sal_Int32 nElement,
case XML_MouseIcon:
return this; // import picture path from ax:picture child element
default:
- mrModel.importProperty( mnPropId, rAttribs.getString( AX_TOKEN( value ), OUString() ) );
+ mrModel.importProperty( mnPropId, rAttribs.getStringDefaulted( AX_TOKEN( value )) );
}
}
break;
@@ -72,7 +72,7 @@ ContextHandlerRef AxControlPropertyContext::onCreateContext( sal_Int32 nElement,
case AX_TOKEN( ocxPr ):
if( nElement == AX_TOKEN( picture ) )
{
- OUString aPicturePath = getFragmentPathFromRelId( rAttribs.getString( R_TOKEN( id ), OUString() ) );
+ OUString aPicturePath = getFragmentPathFromRelId( rAttribs.getStringDefaulted( R_TOKEN( id )) );
if( !aPicturePath.isEmpty() )
{
BinaryXInputStream aInStrm( getFilter().openInputStream( aPicturePath ), true );
@@ -94,7 +94,7 @@ ContextHandlerRef AxControlFragment::onCreateContext( sal_Int32 nElement, const
{
if( isRootElement() && (nElement == AX_TOKEN( ocx )) )
{
- OUString aClassId = rAttribs.getString( AX_TOKEN( classid ), OUString() );
+ OUString aClassId = rAttribs.getStringDefaulted( AX_TOKEN( classid ));
switch( rAttribs.getToken( AX_TOKEN( persistence ), XML_TOKEN_INVALID ) )
{
case XML_persistPropertyBag:
@@ -104,7 +104,7 @@ ContextHandlerRef AxControlFragment::onCreateContext( sal_Int32 nElement, const
case XML_persistStreamInit:
{
- OUString aFragmentPath = getFragmentPathFromRelId( rAttribs.getString( R_TOKEN( id ), OUString() ) );
+ OUString aFragmentPath = getFragmentPathFromRelId( rAttribs.getStringDefaulted( R_TOKEN( id )) );
if( !aFragmentPath.isEmpty() )
{
BinaryXInputStream aInStrm( getFilter().openInputStream( aFragmentPath ), true );
@@ -123,7 +123,7 @@ ContextHandlerRef AxControlFragment::onCreateContext( sal_Int32 nElement, const
case XML_persistStorage:
{
- OUString aFragmentPath = getFragmentPathFromRelId( rAttribs.getString( R_TOKEN( id ), OUString() ) );
+ OUString aFragmentPath = getFragmentPathFromRelId( rAttribs.getStringDefaulted( R_TOKEN( id )) );
if( !aFragmentPath.isEmpty() )
{
Reference< XInputStream > xStrgStrm = getFilter().openInputStream( aFragmentPath );