diff options
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/doc/Metadatable.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/doc/objmisc.cxx | 3 | ||||
-rw-r--r-- | sfx2/source/doc/objxtor.cxx | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/sfx2/source/doc/Metadatable.cxx b/sfx2/source/doc/Metadatable.cxx index 65b386640845..d25b16cf7261 100644 --- a/sfx2/source/doc/Metadatable.cxx +++ b/sfx2/source/doc/Metadatable.cxx @@ -1385,7 +1385,7 @@ Metadatable::RegisterAsCopyOf(Metadatable const & i_rSource, // may happen if src got its id via UNO call if (!pLink) return; // only register copy if clipboard content is from this SwDoc! - if (pLink && (&GetRegistryConst(*pLink) == pRegDoc)) + if (&GetRegistryConst(*pLink) == pRegDoc) { // this is a copy _from_ the clipboard; check if the // element is still in the same stream diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx index 4e1ae9b99327..62027f98cec8 100644 --- a/sfx2/source/doc/objmisc.cxx +++ b/sfx2/source/doc/objmisc.cxx @@ -755,12 +755,13 @@ OUString SfxObjectShell::GetTitle( sal_uInt16 nMaxLength ) const // Document called "Untitled" for the time being return aNoName; } + assert(pMed); const INetURLObject aURL( IsDocShared() ? GetSharedFileURL() : GetMedium()->GetName() ); if ( nMaxLength > SFX_TITLE_CAPTION && nMaxLength <= SFX_TITLE_HISTORY ) { sal_uInt16 nRemote; - if( !pMed || aURL.GetProtocol() == INetProtocol::File ) + if (aURL.GetProtocol() == INetProtocol::File) nRemote = 0; else nRemote = 1; diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx index 8c0e1643a0fc..0a7325fd79e5 100644 --- a/sfx2/source/doc/objxtor.cxx +++ b/sfx2/source/doc/objxtor.cxx @@ -343,7 +343,7 @@ SfxObjectShell::~SfxObjectShell() pMedium->CloseAndReleaseStreams_Impl(); #if HAVE_FEATURE_MULTIUSER_ENVIRONMENT - if ( IsDocShared() && pMedium ) + if (IsDocShared()) FreeSharedFile( pMedium->GetURLObject().GetMainURL( INetURLObject::DecodeMechanism::NONE ) ); #endif DELETEZ( pMedium ); |