diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2015-01-16 13:50:00 +0000 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-01-19 06:17:58 +0000 |
commit | a1fb4ac1991a8da2e527b64a0a01a88a8f2959e3 (patch) | |
tree | 3afabf8fb5bb88d77f72f095e32ff23d38d3f42c /sw/source/core/view/vprint.cxx | |
parent | d1aecd4353bd6ac3961a30df67de78f4b8f0a66b (diff) |
fdo#39440 sw: reduce scope of local variables
This addresses some cppcheck warnings.
Change-Id: I7cbc1908d0e3c84f5864db34984d0740db891aef
Reviewed-on: https://gerrit.libreoffice.org/13962
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sw/source/core/view/vprint.cxx')
-rw-r--r-- | sw/source/core/view/vprint.cxx | 6 |
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! |