diff options
Diffstat (limited to 'starmath/source/unomodel.cxx')
-rw-r--r-- | starmath/source/unomodel.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx index 73f1c4b17715..829c57de820f 100644 --- a/starmath/source/unomodel.cxx +++ b/starmath/source/unomodel.cxx @@ -960,12 +960,16 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SmModel::getRenderer( SmPrinterAccess aPrinterAccess( *pDocSh ); Size aPrtPaperSize; if (Printer *pPrinter = aPrinterAccess.GetPrinter()) + { + // tdf#157965: UNO methods are expected to return sizes in mm/100 + pPrinter->SetMapMode(MapMode(MapUnit::Map100thMM)); // reset in SmPrinterAccess dtor aPrtPaperSize = pPrinter->GetPaperSize(); + } // if paper size is 0 (usually if no 'real' printer is found), // guess the paper size if (aPrtPaperSize.IsEmpty()) - aPrtPaperSize = SvxPaperInfo::GetDefaultPaperSize(SmMapUnit()); + aPrtPaperSize = SvxPaperInfo::GetDefaultPaperSize(MapUnit::Map100thMM); awt::Size aPageSize( aPrtPaperSize.Width(), aPrtPaperSize.Height() ); uno::Sequence< beans::PropertyValue > aRenderer(1); |