sw/source/uibase/docvw/AnnotationWin2.cxx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
New commits: commit e269146b14b53e380c3cde79ec323c461e97fe23 Author: Caolán McNamara <[email protected]> AuthorDate: Mon Nov 8 13:53:15 2021 +0000 Commit: Caolán McNamara <[email protected]> CommitDate: Mon Nov 8 16:54:07 2021 +0100 use label preferred heights to calc required size drop the "classic" height calculation for 7.3 Change-Id: I514470d32fab4d2afc1999181ac313809e782752 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124868 Tested-by: Jenkins Reviewed-by: Caolán McNamara <[email protected]> diff --git a/sw/source/uibase/docvw/AnnotationWin2.cxx b/sw/source/uibase/docvw/AnnotationWin2.cxx index d42304fa6b0c..47d0cdd7bb6f 100644 --- a/sw/source/uibase/docvw/AnnotationWin2.cxx +++ b/sw/source/uibase/docvw/AnnotationWin2.cxx @@ -100,7 +100,6 @@ namespace sw::annotation { #define METABUTTON_WIDTH 16 #define METABUTTON_HEIGHT 18 -#define POSTIT_META_FIELD_HEIGHT sal_Int32(15) #define POSTIT_MINIMUMSIZE_WITHOUT_META 50 void SwAnnotationWin::PaintTile(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) @@ -1224,15 +1223,12 @@ sal_Int32 SwAnnotationWin::GetMetaHeight() const { const int fields = GetNumFields(); - 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); + return nRequiredHeight; } sal_Int32 SwAnnotationWin::GetNumFields() const
