sw/source/uibase/docvw/AnnotationWin2.cxx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)
New commits: commit 7558ef949898e8f41a715ff335871450e3bb1a08 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Sun Nov 7 20:37:45 2021 +0000 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Thu Nov 11 16:46:15 2021 +0100 tdf#145258 comments cut-off in writer under windows with 125% scaling Change-Id: Ic255681075e3ff2d80723071d78bdcc64a8d9bb5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124852 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/sw/source/uibase/docvw/AnnotationWin2.cxx b/sw/source/uibase/docvw/AnnotationWin2.cxx index 71a78d6fae0e..2ae806b5316b 100644 --- a/sw/source/uibase/docvw/AnnotationWin2.cxx +++ b/sw/source/uibase/docvw/AnnotationWin2.cxx @@ -1217,9 +1217,17 @@ int SwAnnotationWin::GetPrefScrollbarWidth() const sal_Int32 SwAnnotationWin::GetMetaHeight() const { - const Fraction& f(mrView.GetWrtShellPtr()->GetOut()->GetMapMode().GetScaleY()); const int fields = GetNumFields(); - return tools::Long(fields*POSTIT_META_FIELD_HEIGHT * f); + + const Fraction& f(mrView.GetWrtShellPtr()->GetOut()->GetMapMode().GetScaleY()); + sal_Int32 nClassicHeight(fields * POSTIT_META_FIELD_HEIGHT * f); + + sal_Int32 nRequiredHeight = 0; + weld::Label* aLabels[3] = { mxMetadataAuthor.get(), mxMetadataDate.get(), mxMetadataResolved.get() }; + for (int i = 0; i < fields; ++i) + nRequiredHeight += aLabels[i]->get_preferred_size().Height(); + + return std::max(nClassicHeight, nRequiredHeight); } sal_Int32 SwAnnotationWin::GetNumFields() const