summaryrefslogtreecommitdiff
path: root/cui/source/dialogs/insdlg.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'cui/source/dialogs/insdlg.cxx')
-rw-r--r--cui/source/dialogs/insdlg.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/cui/source/dialogs/insdlg.cxx b/cui/source/dialogs/insdlg.cxx
index 1df80452d056..4f34b461eba5 100644
--- a/cui/source/dialogs/insdlg.cxx
+++ b/cui/source/dialogs/insdlg.cxx
@@ -185,22 +185,22 @@ short SvInsertOleDlg::run()
if ( xDialogCreator.is() )
{
aName = aCnt.CreateUniqueObjectName();
- embed::InsertedObjectInfo aNewInf = xDialogCreator->createInstanceByDialog(
+ const embed::InsertedObjectInfo aNewInf = xDialogCreator->createInstanceByDialog(
m_xStorage,
aName,
uno::Sequence < beans::PropertyValue >() );
OSL_ENSURE( aNewInf.Object.is(), "The object must be created or an exception must be thrown!" );
m_xObj = aNewInf.Object;
- for ( sal_Int32 nInd = 0; nInd < aNewInf.Options.getLength(); nInd++ )
- if ( aNewInf.Options[nInd].Name == "Icon" )
+ for ( const auto& opt : aNewInf.Options )
+ if ( opt.Name == "Icon" )
{
- aNewInf.Options[nInd].Value >>= m_aIconMetaFile;
+ opt.Value >>= m_aIconMetaFile;
}
- else if ( aNewInf.Options[nInd].Name == "IconFormat" )
+ else if ( opt.Name == "IconFormat" )
{
datatransfer::DataFlavor aFlavor;
- if ( aNewInf.Options[nInd].Value >>= aFlavor )
+ if ( opt.Value >>= aFlavor )
m_aIconMediaType = aFlavor.MimeType;
}