diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2019-03-29 22:08:34 +0900 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2019-03-29 15:30:26 +0100 |
commit | 92990b12f900ac0a12ce006f63b8c3d0f09b6b2f (patch) | |
tree | 35e225f1587d67b1fe0514dabc19bb641800f3c3 /cui/source | |
parent | 75e152a7e8f384921d4417d0fb5d2db6a6f357cb (diff) |
tdf#124149 add bigger 32px icons for border line and shadow
Change-Id: I7ea382f3ba648657d2a6d009bf90dcc3be879c63
Reviewed-on: https://gerrit.libreoffice.org/69925
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'cui/source')
-rw-r--r-- | cui/source/tabpages/border.cxx | 106 |
1 files changed, 72 insertions, 34 deletions
diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx index eefb6a6a50d0..b6c177f04e75 100644 --- a/cui/source/tabpages/border.cxx +++ b/cui/source/tabpages/border.cxx @@ -44,6 +44,7 @@ #include <svl/int64item.hxx> #include <sal/macros.h> #include <com/sun/star/lang/XServiceInfo.hpp> +#include <comphelper/lok.hxx> using namespace ::editeng; using ::com::sun::star::uno::Reference; @@ -269,45 +270,82 @@ SvxBorderTabPage::SvxBorderTabPage(TabPageParent pParent, const SfxItemSet& rCor , m_xRemoveAdjcentCellBordersCB(m_xBuilder->weld_check_button("rmadjcellborders")) , m_xRemoveAdjcentCellBordersFT(m_xBuilder->weld_label("rmadjcellbordersft")) { - static const OUStringLiteral pnBorderImgIds[] = + static std::vector<OUStringLiteral> aBorderImageIds; + + if (aBorderImageIds.empty()) { - RID_SVXBMP_CELL_NONE, - RID_SVXBMP_CELL_ALL, - RID_SVXBMP_CELL_LR, - RID_SVXBMP_CELL_TB, - RID_SVXBMP_CELL_L, - RID_SVXBMP_CELL_DIAG, - RID_SVXBMP_HOR_NONE, - RID_SVXBMP_HOR_OUTER, - RID_SVXBMP_HOR_HOR, - RID_SVXBMP_HOR_ALL, - RID_SVXBMP_HOR_OUTER2, - RID_SVXBMP_VER_NONE, - RID_SVXBMP_VER_OUTER, - RID_SVXBMP_VER_VER, - RID_SVXBMP_VER_ALL, - RID_SVXBMP_VER_OUTER2, - RID_SVXBMP_TABLE_NONE, - RID_SVXBMP_TABLE_OUTER, - RID_SVXBMP_TABLE_OUTERH, - RID_SVXBMP_TABLE_ALL, - RID_SVXBMP_TABLE_OUTER2 - }; + if (comphelper::LibreOfficeKit::isActive()) + { + aBorderImageIds.insert(aBorderImageIds.end(), { + RID_SVXBMP_CELL_NONE_32, + RID_SVXBMP_CELL_ALL_32, + RID_SVXBMP_CELL_LR_32, + RID_SVXBMP_CELL_TB_32, + RID_SVXBMP_CELL_L_32, + RID_SVXBMP_CELL_DIAG_32 + }); + } + else + { + aBorderImageIds.insert(aBorderImageIds.end(), { + RID_SVXBMP_CELL_NONE, + RID_SVXBMP_CELL_ALL, + RID_SVXBMP_CELL_LR, + RID_SVXBMP_CELL_TB, + RID_SVXBMP_CELL_L, + RID_SVXBMP_CELL_DIAG + }); + } + aBorderImageIds.insert(aBorderImageIds.end(), { + RID_SVXBMP_HOR_NONE, + RID_SVXBMP_HOR_OUTER, + RID_SVXBMP_HOR_HOR, + RID_SVXBMP_HOR_ALL, + RID_SVXBMP_HOR_OUTER2, + RID_SVXBMP_VER_NONE, + RID_SVXBMP_VER_OUTER, + RID_SVXBMP_VER_VER, + RID_SVXBMP_VER_ALL, + RID_SVXBMP_VER_OUTER2, + RID_SVXBMP_TABLE_NONE, + RID_SVXBMP_TABLE_OUTER, + RID_SVXBMP_TABLE_OUTERH, + RID_SVXBMP_TABLE_ALL, + RID_SVXBMP_TABLE_OUTER2 + }); + } - for (size_t i = 0; i < SAL_N_ELEMENTS(pnBorderImgIds); ++i) - m_aBorderImgVec.emplace_back(StockImage::Yes, pnBorderImgIds[i]); + for (auto const & rImageId : aBorderImageIds) + m_aBorderImgVec.emplace_back(StockImage::Yes, rImageId); - static const OUStringLiteral pnShadowImgIds[SVX_BORDER_SHADOW_COUNT] = + static std::vector<OUStringLiteral> aShadowImageIds; + if (aShadowImageIds.empty()) { - RID_SVXBMP_SHADOWNONE, - RID_SVXBMP_SHADOW_BOT_RIGHT, - RID_SVXBMP_SHADOW_TOP_RIGHT, - RID_SVXBMP_SHADOW_BOT_LEFT, - RID_SVXBMP_SHADOW_TOP_LEFT - }; + if (comphelper::LibreOfficeKit::isActive()) + { + aShadowImageIds.insert(aShadowImageIds.end(), { + RID_SVXBMP_SHADOWNONE_32, + RID_SVXBMP_SHADOW_BOT_RIGHT_32, + RID_SVXBMP_SHADOW_TOP_RIGHT_32, + RID_SVXBMP_SHADOW_BOT_LEFT_32, + RID_SVXBMP_SHADOW_TOP_LEFT_32 + }); + } + else + { + aShadowImageIds.insert(aShadowImageIds.end(), { + RID_SVXBMP_SHADOWNONE, + RID_SVXBMP_SHADOW_BOT_RIGHT, + RID_SVXBMP_SHADOW_TOP_RIGHT, + RID_SVXBMP_SHADOW_BOT_LEFT, + RID_SVXBMP_SHADOW_TOP_LEFT + }); + } + } + + for (auto const & rImageId : aShadowImageIds) + m_aShadowImgVec.emplace_back(StockImage::Yes, rImageId); - for (size_t i = 0; i < SAL_N_ELEMENTS(pnShadowImgIds); ++i) - m_aShadowImgVec.emplace_back(StockImage::Yes, pnShadowImgIds[i]); assert(m_aShadowImgVec.size() == SVX_BORDER_SHADOW_COUNT); // this page needs ExchangeSupport |