diff options
Diffstat (limited to 'sw/source/core/doc/doc.cxx')
-rwxr-xr-x | sw/source/core/doc/doc.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index 4d428b4987..d25e4bd169 100755 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -477,6 +477,16 @@ void SwDoc::setPrinter(/*[in]*/ SfxPrinter *pP,/*[in]*/ bool bDeleteOld,/*[in]*/ delete pPrt; pPrt = pP; + // our printer should always use TWIP. Don't rely on this being set in ViewShell::InitPrt, there + // are situations where this isn't called. + // #i108712# / 2010-02-26 / frank.schoenheit@sun.com + if ( pPrt ) + { + MapMode aMapMode( pPrt->GetMapMode() ); + aMapMode.SetMapUnit( MAP_TWIP ); + pPrt->SetMapMode( aMapMode ); + } + if ( pDrawModel && !get( IDocumentSettingAccess::USE_VIRTUAL_DEVICE ) ) pDrawModel->SetRefDevice( pPrt ); } |