diff options
author | Maxim Monastirsky <momonasmon@gmail.com> | 2020-08-19 21:39:44 +0300 |
---|---|---|
committer | Maxim Monastirsky <momonasmon@gmail.com> | 2020-08-20 00:19:54 +0200 |
commit | c87da6596334866499e1aff3959abc025d05f75f (patch) | |
tree | 91e5235734d098d3bd556e24c135391d40db82c1 /framework | |
parent | d622b7c73acac5a8c9dd34818aad1b0d80c00c44 (diff) |
tdf#107548 Use ImageSmallURL for small icons
Started as a copy-paste error introduced in commit
a2f4aed32257e183339a3513339bc59009c88527 ("fdo#66524 - defer
loading and scaling AddOns images until necessary."), which
was removed later in 9a65df25138750915f9c6e1e1fa09988a2d11434
("coverity#1078526 Logically dead code").
Also, the high contrast properties are no longer supported,
but they still read and were overwriting the big image property.
Change-Id: I005bf5873fe821896c143d8fb513b2f73f05bba1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101028
Tested-by: Jenkins
Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
Diffstat (limited to 'framework')
-rw-r--r-- | framework/source/fwe/classes/addonsoptions.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/framework/source/fwe/classes/addonsoptions.cxx b/framework/source/fwe/classes/addonsoptions.cxx index faa8ffdc5713..4201a6a5f4f7 100644 --- a/framework/source/fwe/classes/addonsoptions.cxx +++ b/framework/source/fwe/classes/addonsoptions.cxx @@ -129,7 +129,7 @@ using namespace ::com::sun::star; // The following order is mandatory. Please add properties at the end! #define PROPERTYCOUNT_IMAGES 8 -#define PROPERTYCOUNT_EMBEDDED_IMAGES 4 +#define PROPERTYCOUNT_EMBEDDED_IMAGES 2 #define OFFSET_IMAGES_SMALL 0 #define OFFSET_IMAGES_BIG 1 #define OFFSET_IMAGES_SMALLHC 2 @@ -1642,7 +1642,7 @@ std::unique_ptr<AddonsOptions_Impl::ImageEntry> AddonsOptions_Impl::ReadImageDat pEntry->addImage(i == OFFSET_IMAGES_SMALL ? IMGSIZE_SMALL : IMGSIZE_BIG, aImage, ""); } } - else + else if ( i == OFFSET_IMAGES_SMALL_URL || i == OFFSET_IMAGES_BIG_URL ) { if(!pEntry) pEntry.reset(new ImageEntry()); @@ -1653,7 +1653,7 @@ std::unique_ptr<AddonsOptions_Impl::ImageEntry> AddonsOptions_Impl::ReadImageDat SubstituteVariables( aImageURL ); - pEntry->addImage(IMGSIZE_BIG, BitmapEx(), aImageURL); + pEntry->addImage(i == OFFSET_IMAGES_SMALL_URL ? IMGSIZE_SMALL : IMGSIZE_BIG, BitmapEx(), aImageURL); } } |