summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2006-08-01 08:55:33 +0000
committerIvo Hinkelmann <ihi@openoffice.org>2006-08-01 08:55:33 +0000
commit7386ee60c13408a6a216f8fdf5a566b49d06bd58 (patch)
tree2675a6c92df060f4c9e5136032dc3c2c1a703969 /sfx2
parent9998d9f2fd7e420906b7e8c1e7912173e5c2f589 (diff)
INTEGRATION: CWS mba204crashfixes (1.112.30); FILE MERGED
2006/07/26 09:09:39 mba 1.112.30.2: RESYNC: (1.112-1.113); FILE MERGED 2006/07/17 15:01:56 mba 1.112.30.1: #i64991#: only forward changed attributes in setPrinter call
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/doc/sfxbasemodel.cxx25
1 files changed, 17 insertions, 8 deletions
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index fb10a487eae6..e7f4b3509cbc 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: sfxbasemodel.cxx,v $
*
- * $Revision: 1.113 $
+ * $Revision: 1.114 $
*
- * last change: $Author: kz $ $Date: 2006-07-19 17:18:52 $
+ * last change: $Author: ihi $ $Date: 2006-08-01 09:55:33 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -1727,8 +1727,11 @@ void SfxBaseModel::impl_setPrinter(const SEQUENCE< PROPERTYVALUE >& rPrinter,Sfx
throw ILLEGALARGUMENTEXCEPTION();
String aPrinterName( sTemp ) ;
- pPrinter = new SfxPrinter( pPrinter->GetOptions().Clone(), aPrinterName );
- nChangeFlags = SFX_PRINTER_PRINTER;
+ if ( aPrinterName != pPrinter->GetName() )
+ {
+ pPrinter = new SfxPrinter( pPrinter->GetOptions().Clone(), aPrinterName );
+ nChangeFlags = SFX_PRINTER_PRINTER;
+ }
break;
}
}
@@ -1752,8 +1755,11 @@ void SfxBaseModel::impl_setPrinter(const SEQUENCE< PROPERTYVALUE >& rPrinter,Sfx
eOrient = ( PAPERORIENTATION ) lDummy;
}
- pPrinter->SetOrientation( (Orientation) eOrient );
- nChangeFlags |= SFX_PRINTER_CHG_ORIENTATION;
+ if ( (Orientation) eOrient != pPrinter->GetOrientation() )
+ {
+ pPrinter->SetOrientation( (Orientation) eOrient );
+ nChangeFlags |= SFX_PRINTER_CHG_ORIENTATION;
+ }
}
// PaperFormat-Property?
@@ -1766,8 +1772,11 @@ void SfxBaseModel::impl_setPrinter(const SEQUENCE< PROPERTYVALUE >& rPrinter,Sfx
nPaperFormat = ( PAPERFORMAT ) lDummy;
}
- pPrinter->SetPaper( (Paper) nPaperFormat );
- nChangeFlags |= SFX_PRINTER_CHG_SIZE;
+ if ( (Paper) nPaperFormat != pPrinter->GetPaper() )
+ {
+ pPrinter->SetPaper( (Paper) nPaperFormat );
+ nChangeFlags |= SFX_PRINTER_CHG_SIZE;
+ }
}
// PaperSize-Property?