From 4a340e36e8d3713806719351f455711c1254a178 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 24 May 2017 14:29:48 +0200 Subject: 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 Reviewed-by: Noel Grandin --- sfx2/source/doc/objmisc.cxx | 22 +++------------------- sfx2/source/doc/objstor.cxx | 2 +- 2 files changed, 4 insertions(+), 20 deletions(-) (limited to 'sfx2/source/doc') 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 pFlt = pMedium->GetFilter(); if( pFlt ) @@ -1055,7 +1055,7 @@ void SfxObjectShell::FinishedLoading( SfxLoadedFlags nFlags ) bool bSetModifiedTRUE = false; const SfxStringItem* pSalvageItem = SfxItemSet::GetItem(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 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() ) { -- cgit