diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-05-24 14:29:48 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-05-25 08:12:17 +0200 |
commit | 4a340e36e8d3713806719351f455711c1254a178 (patch) | |
tree | 4be5ffdd176b2f45e4f549f7eb4d88da9225c18e /sfx2/source/doc | |
parent | 50fc62ce76bc51f18b16eae937761d0a8872df3e (diff) |
loplugin:constantparam
add the results files so I can just see the diff in future
Change-Id: Ia20a1aa6418be95ed620719cde340c00b7b053e1
Reviewed-on: https://gerrit.libreoffice.org/37988
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2/source/doc')
-rw-r--r-- | sfx2/source/doc/objmisc.cxx | 22 | ||||
-rw-r--r-- | sfx2/source/doc/objstor.cxx | 2 |
2 files changed, 4 insertions, 20 deletions
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx index 74a419b93c7f..f0f20c59ad9e 100644 --- a/sfx2/source/doc/objmisc.cxx +++ b/sfx2/source/doc/objmisc.cxx @@ -1045,7 +1045,7 @@ void SfxObjectShell::InitOwnModel_Impl() } } -void SfxObjectShell::FinishedLoading( SfxLoadedFlags nFlags ) +void SfxObjectShell::FinishedLoading() { std::shared_ptr<const SfxFilter> pFlt = pMedium->GetFilter(); if( pFlt ) @@ -1055,7 +1055,7 @@ void SfxObjectShell::FinishedLoading( SfxLoadedFlags nFlags ) bool bSetModifiedTRUE = false; const SfxStringItem* pSalvageItem = SfxItemSet::GetItem<SfxStringItem>(pMedium->GetItemSet(), SID_DOC_SALVAGE, false); - if( ( nFlags & SfxLoadedFlags::MAINDOCUMENT ) && !(pImpl->nLoadedFlags & SfxLoadedFlags::MAINDOCUMENT ) + if( !(pImpl->nLoadedFlags & SfxLoadedFlags::MAINDOCUMENT ) && !(pImpl->nFlagsInProgress & SfxLoadedFlags::MAINDOCUMENT )) { pImpl->nFlagsInProgress |= SfxLoadedFlags::MAINDOCUMENT; @@ -1083,23 +1083,7 @@ void SfxObjectShell::FinishedLoading( SfxLoadedFlags nFlags ) pImpl->nFlagsInProgress &= ~SfxLoadedFlags::MAINDOCUMENT; } - if( ( nFlags & SfxLoadedFlags::IMAGES ) && !(pImpl->nLoadedFlags & SfxLoadedFlags::IMAGES ) - && !(pImpl->nFlagsInProgress & SfxLoadedFlags::IMAGES )) - { - pImpl->nFlagsInProgress |= SfxLoadedFlags::IMAGES; - uno::Reference<document::XDocumentProperties> xDocProps( - getDocProperties()); - const OUString url(xDocProps->getAutoloadURL()); - sal_Int32 delay(xDocProps->getAutoloadSecs()); - SetAutoLoad( INetURLObject(url), delay * 1000, - (delay > 0) || !url.isEmpty() ); - if( !bSetModifiedTRUE && IsEnableSetModified() ) - SetModified( false ); - Invalidate( SID_SAVEASDOC ); - pImpl->nFlagsInProgress &= ~SfxLoadedFlags::IMAGES; - } - - pImpl->nLoadedFlags |= nFlags; + pImpl->nLoadedFlags |= SfxLoadedFlags::MAINDOCUMENT; if ( pImpl->nFlagsInProgress == SfxLoadedFlags::NONE ) { diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index 759cc16b987c..f4db742b728e 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -830,7 +830,7 @@ bool SfxObjectShell::DoLoad( SfxMedium *pMed ) if ( !( pImpl->nLoadedFlags & SfxLoadedFlags::MAINDOCUMENT ) && ( !pMedium->GetFilter() || pMedium->GetFilter()->UsesStorage() ) ) - FinishedLoading( SfxLoadedFlags::MAINDOCUMENT ); + FinishedLoading(); if( IsOwnStorageFormat(*pMed) && pMed->GetFilter() ) { |