diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-03-23 20:43:05 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-03-24 08:50:56 +0100 |
commit | 6ed4be1257ef76db4d0ac858a27ea6bd12bd3de1 (patch) | |
tree | 004f04f780ee8db5f60c077d18e7a650a73d2b09 /sfx2 | |
parent | 7f4ecf3263db9f40fcb5f02e62fdb45c1fc355bc (diff) |
loplugin:constantparam
Change-Id: Ib65abd0546f1219387fe3fd7ad4f6ba0eb029bd1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131987
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/doc/objstor.cxx | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index 4c3dcf140b94..0000a9b4f6df 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -437,7 +437,7 @@ void SfxObjectShell::DoInitUnitTest() pMedium = new SfxMedium; } -bool SfxObjectShell::DoInitNew( SfxMedium* pMed ) +bool SfxObjectShell::DoInitNew() /* [Description] This from SvPersist inherited virtual method is called to initialize @@ -460,15 +460,11 @@ bool SfxObjectShell::DoInitNew( SfxMedium* pMed ) { ModifyBlocker_Impl aBlock( this ); - pMedium = pMed; - if ( !pMedium ) - { - pMedium = new SfxMedium; - } + pMedium = new SfxMedium; pMedium->CanDisposeStorage_Impl( true ); - if ( InitNew( pMed ? pMed->GetStorage() : uno::Reference < embed::XStorage >() ) ) + if ( InitNew( nullptr ) ) { // empty documents always get their macros from the user, so there is no reason to restrict access pImpl->aMacroMode.allowMacroExecution(); |