[Libreoffice-commits] core.git: sfx2/source
Michael Weghorn (via logerrit)
logerrit at kemper.freedesktop.org
Fri Apr 3 13:25:17 UTC 2020
sfx2/source/view/viewprn.cxx | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
New commits:
commit aa191f35978ea48bbacc0e613ae8f0e6536ebcfc
Author: Michael Weghorn <m.weghorn at posteo.de>
AuthorDate: Fri Apr 3 13:38:46 2020 +0200
Commit: Michael Weghorn <m.weghorn at posteo.de>
CommitDate: Fri Apr 3 15:24:35 2020 +0200
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 at posteo.de>
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()) )
More information about the Libreoffice-commits
mailing list