diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2017-04-17 11:17:08 +0200 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2017-04-18 17:55:27 +0200 |
commit | af40888989dfc38b62f0ccd0161b2a28f28d6aca (patch) | |
tree | 85281f4b5a69e22f76b4f5f1453855a57d66f80c /sfx2 | |
parent | 50f548d55bac700cf026edb6b86d5b95b303243e (diff) |
Avoid temporary OUStrings
Change-Id: I0fb456874595814339a420b61fbf4cb957af095e
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/doc/docinsert.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sfx2/source/doc/docinsert.cxx b/sfx2/source/doc/docinsert.cxx index 29cd9ee68808..61954b8922aa 100644 --- a/sfx2/source/doc/docinsert.cxx +++ b/sfx2/source/doc/docinsert.cxx @@ -108,9 +108,8 @@ SfxMedium* DocumentInserter::CreateMedium(char const*const pFallbackHack) if (!m_nError && m_pItemSet && !m_pURLList.empty()) { DBG_ASSERT( m_pURLList.size() == 1, "DocumentInserter::CreateMedium(): invalid URL list count" ); - OUString sURL(m_pURLList[0]); pMedium.reset(new SfxMedium( - sURL, SFX_STREAM_READONLY, + m_pURLList[0], SFX_STREAM_READONLY, SfxGetpApp()->GetFilterMatcher().GetFilter4FilterName( m_sFilter ), m_pItemSet )); pMedium->UseInteractionHandler( true ); std::unique_ptr<SfxFilterMatcher> pMatcher; @@ -223,8 +222,7 @@ IMPL_LINK_NOARG(DocumentInserter, DialogClosedHdl, sfx2::FileDialogHelper*, void short nRet = aPasswordDlg->Execute(); if ( RET_OK == nRet ) { - OUString aPasswd = aPasswordDlg->GetPassword(); - m_pItemSet->Put( SfxStringItem( SID_PASSWORD, aPasswd ) ); + m_pItemSet->Put( SfxStringItem( SID_PASSWORD, aPasswordDlg->GetPassword() ) ); } else { |