diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2020-04-03 13:38:46 +0200 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2020-04-03 15:24:35 +0200 |
commit | aa191f35978ea48bbacc0e613ae8f0e6536ebcfc (patch) | |
tree | bc298831151631dd766b57e84cfdb94a5a40d4eb /sfx2 | |
parent | 21fc54777d5dedc33d6bfa23b9f1072a6667eebe (diff) |
Drop extra "temporary of class String"
It's unclear to me why it was necessary
> For the MAC to have its "temporary of class String" in next if()
but that comment (or the German successor) was there
since fd069bee7e57ad529c3c0974559fd2d84ec3151a
("initial import", 2000-09-18) and that's
presumably no longer necessary.
Comparing two 'const OUString&'s should be just fine.
Change-Id: I85c3be050ff7120aa354e6cf3726f166eb7e364a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91627
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/view/viewprn.cxx | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx index 871ed0104556..4db985c961d9 100644 --- a/sfx2/source/view/viewprn.cxx +++ b/sfx2/source/view/viewprn.cxx @@ -536,13 +536,10 @@ void SfxViewShell::SetPrinter_Impl( VclPtr<SfxPrinter>& pNewPrinter ) } } - // For the MAC to have its "temporary of class String" in next if() - OUString aTempPrtName = pNewPrinter->GetName(); - OUString aDocPrtName = pDocPrinter->GetName(); - // Was the printer selection changed from Default to Specific // or the other way around? - if ( (aTempPrtName != aDocPrtName) || (pDocPrinter->IsDefPrinter() != pNewPrinter->IsDefPrinter()) ) + if ( (pNewPrinter->GetName() != pDocPrinter->GetName()) + || (pDocPrinter->IsDefPrinter() != pNewPrinter->IsDefPrinter()) ) { nChangedFlags |= SfxPrinterChangeFlags::PRINTER|SfxPrinterChangeFlags::JOBSETUP; if ( ! (pNewPrinter->GetOptions() == pDocPrinter->GetOptions()) ) |