summaryrefslogtreecommitdiff
path: root/sc/source/ui
diff options
context:
space:
mode:
authorNiklas Nebel <nn@openoffice.org>2010-07-28 17:38:30 +0200
committerNiklas Nebel <nn@openoffice.org>2010-07-28 17:38:30 +0200
commitdcb62dab138731367c71614eeba3f3962cdf5325 (patch)
treed5db2574e0fcf2b1a6197985765d97decb1c2e29 /sc/source/ui
parentf7a8aabd4244980ddfa9fad71bc1f2892e391420 (diff)
calc57: #i110370# don't accidentally throw away print settings stored in the file (patch from cloph)
Diffstat (limited to 'sc/source/ui')
-rw-r--r--sc/source/ui/unoobj/confuno.cxx13
1 files changed, 8 insertions, 5 deletions
diff --git a/sc/source/ui/unoobj/confuno.cxx b/sc/source/ui/unoobj/confuno.cxx
index 75e415b8f018..a680185a1d1c 100644
--- a/sc/source/ui/unoobj/confuno.cxx
+++ b/sc/source/ui/unoobj/confuno.cxx
@@ -193,11 +193,14 @@ void SAL_CALL ScDocumentConfiguration::setPropertyValue(
if (pPrinter)
{
String aString(sPrinterName);
- SfxPrinter* pNewPrinter = new SfxPrinter( pPrinter->GetOptions().Clone(), aString );
- if (pNewPrinter->IsKnown())
- pDocShell->SetPrinter( pNewPrinter, SFX_PRINTER_PRINTER );
- else
- delete pNewPrinter;
+ if (pPrinter->GetName() != aString)
+ {
+ SfxPrinter* pNewPrinter = new SfxPrinter( pPrinter->GetOptions().Clone(), aString );
+ if (pNewPrinter->IsKnown())
+ pDocShell->SetPrinter( pNewPrinter, SFX_PRINTER_PRINTER );
+ else
+ delete pNewPrinter;
+ }
}
else
throw uno::RuntimeException();