From 8e392047f43791e6876e21f4e4a9deccc92f734a Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Tue, 17 Nov 2015 17:14:58 +0100 Subject: [PATCH 340/398] sw lok comments: fix meta author/data size with custom zoom Change-Id: I3310813c971aa7abffccc0b7f462e05caa83482e (cherry picked from commit 6d00110674452c66ca6192fbf46b41331b2c7066) --- sw/source/uibase/docvw/SidebarWin.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sw/source/uibase/docvw/SidebarWin.cxx b/sw/source/uibase/docvw/SidebarWin.cxx index 693bcdf5b09a..9d12a12eae35 100644 --- a/sw/source/uibase/docvw/SidebarWin.cxx +++ b/sw/source/uibase/docvw/SidebarWin.cxx @@ -669,11 +669,12 @@ void SwSidebarWin::Rescale() mpOutliner->SetRefMapMode( aMode ); SetMapMode( aMode ); mpSidebarTextControl->SetMapMode( aMode ); + const Fraction& rFraction = mrView.GetWrtShellPtr()->GetOut()->GetMapMode().GetScaleY(); if ( mpMetadataAuthor ) { vcl::Font aFont( mpMetadataAuthor->GetSettings().GetStyleSettings().GetFieldFont() ); sal_Int32 nHeight = aFont.GetHeight(); - nHeight = nHeight * aMode.GetScaleY().GetNumerator() / aMode.GetScaleY().GetDenominator(); + nHeight = nHeight * rFraction.GetNumerator() / rFraction.GetDenominator(); aFont.SetHeight( nHeight ); mpMetadataAuthor->SetControlFont( aFont ); } @@ -681,7 +682,7 @@ void SwSidebarWin::Rescale() { vcl::Font aFont( mpMetadataDate->GetSettings().GetStyleSettings().GetFieldFont() ); sal_Int32 nHeight = aFont.GetHeight(); - nHeight = nHeight * aMode.GetScaleY().GetNumerator() / aMode.GetScaleY().GetDenominator(); + nHeight = nHeight * rFraction.GetNumerator() / rFraction.GetDenominator(); aFont.SetHeight( nHeight ); mpMetadataDate->SetControlFont( aFont ); } -- 2.12.0