summaryrefslogtreecommitdiff
path: root/sw/source/core/view/vprint.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/view/vprint.cxx')
-rw-r--r--sw/source/core/view/vprint.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/sw/source/core/view/vprint.cxx b/sw/source/core/view/vprint.cxx
index 70eb9c32afda..ef1d4569f5b4 100644
--- a/sw/source/core/view/vprint.cxx
+++ b/sw/source/core/view/vprint.cxx
@@ -333,11 +333,13 @@ SwDoc * SwViewShell::FillPrtDoc( SwDoc *pPrtDoc, const SfxPrinter* pPrt)
if (pPrt)
pPrtDoc->getIDocumentDeviceAccess().setPrinter( new SfxPrinter(*pPrt), true, true );
- const SfxPoolItem* pCpyItem;
const SfxItemPool& rPool = GetAttrPool();
for( sal_uInt16 nWh = POOLATTR_BEGIN; nWh < POOLATTR_END; ++nWh )
- if( 0 != ( pCpyItem = rPool.GetPoolDefaultItem( nWh ) ) )
+ {
+ const SfxPoolItem* pCpyItem = rPool.GetPoolDefaultItem( nWh );
+ if( 0 != pCpyItem )
pPrtDoc->GetAttrPool().SetPoolDefaultItem( *pCpyItem );
+ }
// JP 29.07.99 - Bug 67951 - set all Styles from the SourceDoc into
// the PrintDoc - will be replaced!