sw/inc/AnnotationWin.hxx | 3 - sw/source/uibase/docvw/AnnotationWin2.cxx | 23 +++----------- vcl/source/bitmap/BitmapSimpleColorQuantizationFilter.cxx | 2 - 3 files changed, 7 insertions(+), 21 deletions(-)
New commits: commit 60f001962122a77863231e9cf5dc445c136aac43 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Thu Nov 16 10:28:50 2023 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Thu Nov 16 11:52:03 2023 +0100 tdf#157789 Comment size wrong behavior when zooming document Revert commit 8d18b5af883bb6b56e758801ee730a08bb88a8f5 Author: Noel Grandin <noel.gran...@collabora.co.uk> Date: Tue Jun 13 10:11:08 2023 +0200 speed up rendering annotatins, cache meta height Change-Id: Ib0bae3fd9020200d09c5b37baf5ae882c8532e58 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159496 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sw/inc/AnnotationWin.hxx b/sw/inc/AnnotationWin.hxx index 07f3ed8e83f9..cbeaf7ceca44 100644 --- a/sw/inc/AnnotationWin.hxx +++ b/sw/inc/AnnotationWin.hxx @@ -29,7 +29,6 @@ #include "postithelper.hxx" #include "swrect.hxx" #include "SidebarWindowsTypes.hxx" -#include <optional> #include <annotationmark.hxx> class EditView; @@ -211,7 +210,6 @@ class SAL_DLLPUBLIC_RTTI SwAnnotationWin final : public InterimItemWindow virtual void LoseFocus() override; virtual void GetFocus() override; - virtual void DataChanged( const DataChangedEvent& rDCEvt ) override; void SetSizePixel( const Size& rNewSize ) override; @@ -277,7 +275,6 @@ class SAL_DLLPUBLIC_RTTI SwAnnotationWin final : public InterimItemWindow SwPostItField* mpField; rtl::Reference<sw::sidebarwindows::SidebarWinAccessible> mxSidebarWinAccessible; - mutable std::optional<sal_Int32> moMetaHeight; }; } // end of namespace sw::annotation diff --git a/sw/source/uibase/docvw/AnnotationWin2.cxx b/sw/source/uibase/docvw/AnnotationWin2.cxx index 4864cba499c4..a1780f9132c8 100644 --- a/sw/source/uibase/docvw/AnnotationWin2.cxx +++ b/sw/source/uibase/docvw/AnnotationWin2.cxx @@ -1215,25 +1215,14 @@ int SwAnnotationWin::GetPrefScrollbarWidth() const sal_Int32 SwAnnotationWin::GetMetaHeight() const { - if (!moMetaHeight) - { - const int fields = GetNumFields(); + const int fields = GetNumFields(); - 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(); - moMetaHeight = nRequiredHeight; - } - return *moMetaHeight; -} + 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(); -void SwAnnotationWin::DataChanged(const DataChangedEvent& rDCEvt) -{ - if ((rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & AllSettingsFlags::STYLE)) - { - moMetaHeight.reset(); - } + return nRequiredHeight; } sal_Int32 SwAnnotationWin::GetNumFields() const commit b0c68499ab36d2a1bdf6f1bc7d4cd259b99700e7 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Thu Nov 16 10:24:42 2023 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Thu Nov 16 11:51:48 2023 +0100 tdf#158224 Cannot convert bitmap to polygons regression from commit a76a135c9e9bdecd38970e293e72eeeeca000d27 Author: Noel Grandin <noelgran...@gmail.com> Date: Tue Jan 3 20:14:21 2023 +0200 flatten some vcl code Change-Id: Ibb2a059b283dc2e3bf3fecbf24ff71332a204d5d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159495 Tested-by: Noel Grandin <noel.gran...@collabora.co.uk> Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/vcl/source/bitmap/BitmapSimpleColorQuantizationFilter.cxx b/vcl/source/bitmap/BitmapSimpleColorQuantizationFilter.cxx index 38e2c76794b0..ec4004879651 100644 --- a/vcl/source/bitmap/BitmapSimpleColorQuantizationFilter.cxx +++ b/vcl/source/bitmap/BitmapSimpleColorQuantizationFilter.cxx @@ -19,7 +19,7 @@ BitmapEx BitmapSimpleColorQuantizationFilter::execute(BitmapEx const& aBitmapEx) { Bitmap aBitmap = aBitmapEx.GetBitmap(); - if (vcl::numberOfColors(aBitmap.getPixelFormat()) > sal_Int64(mnNewColorCount)) + if (vcl::numberOfColors(aBitmap.getPixelFormat()) <= sal_Int64(mnNewColorCount)) return BitmapEx(aBitmap); Bitmap aNewBmp;