summaryrefslogtreecommitdiff
path: root/sfx2/source/view/viewprn.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source/view/viewprn.cxx')
-rw-r--r--sfx2/source/view/viewprn.cxx15
1 files changed, 5 insertions, 10 deletions
diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx
index 267ab28c4e1f..7ef21f9582cc 100644
--- a/sfx2/source/view/viewprn.cxx
+++ b/sfx2/source/view/viewprn.cxx
@@ -478,16 +478,11 @@ SfxPrinter* SfxViewShell::SetPrinter_Impl( SfxPrinter *pNewPrinter )
SfxPrinter *pDocPrinter = GetPrinter();
// Evaluate Printer Options
- bool bOriToDoc = false;
- bool bSizeToDoc = false;
- if ( &pDocPrinter->GetOptions() )
- {
- sal_uInt16 nWhich = GetPool().GetWhich(SID_PRINTER_CHANGESTODOC);
- const SfxFlagItem *pFlagItem = 0;
- pDocPrinter->GetOptions().GetItemState( nWhich, false, (const SfxPoolItem**) &pFlagItem );
- bOriToDoc = pFlagItem ? (pFlagItem->GetValue() & SFX_PRINTER_CHG_ORIENTATION) : sal_False;
- bSizeToDoc = pFlagItem ? (pFlagItem->GetValue() & SFX_PRINTER_CHG_SIZE) : sal_False;
- }
+ sal_uInt16 nWhich = GetPool().GetWhich(SID_PRINTER_CHANGESTODOC);
+ const SfxFlagItem *pFlagItem = 0;
+ pDocPrinter->GetOptions().GetItemState( nWhich, false, (const SfxPoolItem**) &pFlagItem );
+ bool bOriToDoc = pFlagItem && (pFlagItem->GetValue() & SFX_PRINTER_CHG_ORIENTATION);
+ bool bSizeToDoc = pFlagItem && (pFlagItem->GetValue() & SFX_PRINTER_CHG_SIZE);
// Determine the previous format and size
Orientation eOldOri = pDocPrinter->GetOrientation();