diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2022-09-19 14:22:32 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-09-19 21:16:18 +0200 |
commit | 2c7052a76e5348981883ca95cf3c0b079ded5068 (patch) | |
tree | 8cbaacc4b614716765594f9a673f3ea7cdef9c6f | |
parent | Resolves: tdf#150312 Move base-cell-address to a valid sheet upon deletion (diff) | |
download | core-2c7052a76e5348981883ca95cf3c0b079ded5068.tar.gz core-2c7052a76e5348981883ca95cf3c0b079ded5068.zip |
tdf#150992: fix crash popart filter to an SVG image
part of bt:
6 0x00007f018c80186f in BitmapPalette::operator[](unsigned short) const (this=0x5576a198fe48, nIndex=176) at vcl/source/bitmap/bitmappalette.cxx:139
7 0x00007f018c3d1fce in BitmapInfoAccess::GetPaletteColor(unsigned short) const (this=0x5576a2bbc520, nColor=176) at include/vcl/BitmapInfoAccess.hxx:121
8 0x00007f018c85b63f in BitmapPopArtFilter::execute(BitmapEx const&) const (this=0x7fffb7394728, rBitmapEx=...) at vcl/source/bitmap/BitmapPopArtFilter.cxx:73
9 0x00007f018c83e66b in BitmapFilter::Filter(BitmapEx&, BitmapFilter const&) (rBmpEx=..., rFilter=...) at vcl/source/bitmap/bitmapfilter.cxx:22
10 0x00007f01905e5bd4 in SvxGraphicFilter::ExecuteGrfFilterSlot(SfxRequest const&, GraphicObject&) (rReq=..., rFilterObject=...) at svx/source/dialog/grfflt.cxx:202
some gdb info
(gdb) p nIndex
$1 = 176
(gdb) p mpImpl->GetBitmapData().size()
$2 = 34
full bt here:
https://bugs.documentfoundation.org/attachment.cgi?id=182499
See https://bugs.documentfoundation.org/show_bug.cgi?id=150992#c2 for some comments
the main thing that makes me think that the order is reversed is the "nLastEntry" treatment.
Indeed with the current sort, mnCount with 0 come first nLastEntry = nEntryCount - 1 (unless there's no color at all)
Change-Id: I3b89f2f4d6f115ea9f6752c49bad776a33f0b020
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140153
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
(cherry picked from commit 8dbbc1ca6dfe75affe13dda92bdf82b6b38f1a37)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140160
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | vcl/source/bitmap/BitmapPopArtFilter.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/source/bitmap/BitmapPopArtFilter.cxx b/vcl/source/bitmap/BitmapPopArtFilter.cxx index 5d5a6ee256ba..ce37c91fdd58 100644 --- a/vcl/source/bitmap/BitmapPopArtFilter.cxx +++ b/vcl/source/bitmap/BitmapPopArtFilter.cxx @@ -56,7 +56,7 @@ BitmapEx BitmapPopArtFilter::execute(BitmapEx const& rBitmapEx) const // sort table std::sort(aPopArtTable.begin(), aPopArtTable.end(), [](const PopArtEntry& lhs, const PopArtEntry& rhs) { - return lhs.mnCount < rhs.mnCount; + return lhs.mnCount > rhs.mnCount; }); // get last used entry |