From 6d00110674452c66ca6192fbf46b41331b2c7066 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Tue, 17 Nov 2015 17:14:58 +0100 Subject: sw lok comments: fix meta author/data size with custom zoom Change-Id: I3310813c971aa7abffccc0b7f462e05caa83482e --- sw/source/uibase/docvw/SidebarWin.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sw') diff --git a/sw/source/uibase/docvw/SidebarWin.cxx b/sw/source/uibase/docvw/SidebarWin.cxx index 145033d91008..ba81a3e6f35a 100644 --- a/sw/source/uibase/docvw/SidebarWin.cxx +++ b/sw/source/uibase/docvw/SidebarWin.cxx @@ -668,11 +668,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 ); } @@ -680,7 +681,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 ); } -- cgit