sw/source/uibase/docvw/AnnotationWin2.cxx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)
New commits: commit 17224bb22dadb8c6fa1dad32e2d1028bf356f485 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Sun Nov 7 20:37:45 2021 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Mon Nov 8 14:45:37 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/+/124829 Tested-by: Caolán McNamara <caol...@redhat.com> Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/sw/source/uibase/docvw/AnnotationWin2.cxx b/sw/source/uibase/docvw/AnnotationWin2.cxx index d914e20d89cb..d42304fa6b0c 100644 --- a/sw/source/uibase/docvw/AnnotationWin2.cxx +++ b/sw/source/uibase/docvw/AnnotationWin2.cxx @@ -1222,9 +1222,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