diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-12-08 15:16:49 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-12-08 16:57:59 +0100 |
commit | c92c0776829aaa04b924bf970396a312994af8d0 (patch) | |
tree | ae6311c14d4fe54401586aa4ca3c1c313a72f971 /sd/source/ui/controller | |
parent | loplugin:stringliteraldefine in sw (diff) | |
download | core-c92c0776829aaa04b924bf970396a312994af8d0.tar.gz core-c92c0776829aaa04b924bf970396a312994af8d0.zip |
use more OUStringLiteral in various
and remove some unused defines
Change-Id: Ie560fccb674568ba88175d2e68ca83b92cfcf312
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126544
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd/source/ui/controller')
-rw-r--r-- | sd/source/ui/controller/slidelayoutcontroller.cxx | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/sd/source/ui/controller/slidelayoutcontroller.cxx b/sd/source/ui/controller/slidelayoutcontroller.cxx index cbfd847204b8..06814feda90f 100644 --- a/sd/source/ui/controller/slidelayoutcontroller.cxx +++ b/sd/source/ui/controller/slidelayoutcontroller.cxx @@ -79,17 +79,19 @@ private: struct snewfoil_value_info_layout { - const char* msBmpResId; + rtl::OUStringConstExpr msBmpResId; TranslateId mpStrResId; AutoLayout maAutoLayout; }; } +constexpr OUStringLiteral EMPTY = u""; + const snewfoil_value_info_layout notes[] = { {BMP_FOILN_01, STR_AUTOLAYOUT_NOTES, AUTOLAYOUT_NOTES}, - {nullptr, {}, AUTOLAYOUT_NONE}, + {EMPTY, {}, AUTOLAYOUT_NONE}, }; const snewfoil_value_info_layout handout[] = @@ -100,7 +102,7 @@ const snewfoil_value_info_layout handout[] = {BMP_FOILH_04, STR_AUTOLAYOUT_HANDOUT4, AUTOLAYOUT_HANDOUT4}, {BMP_FOILH_06, STR_AUTOLAYOUT_HANDOUT6, AUTOLAYOUT_HANDOUT6}, {BMP_FOILH_09, STR_AUTOLAYOUT_HANDOUT9, AUTOLAYOUT_HANDOUT9}, - {nullptr, {}, AUTOLAYOUT_NONE}, + {EMPTY, {}, AUTOLAYOUT_NONE}, }; const snewfoil_value_info_layout standard[] = @@ -117,7 +119,7 @@ const snewfoil_value_info_layout standard[] = {BMP_LAYOUT_HEAD02B, STR_AUTOLAYOUT_CONTENT_OVER_CONTENT, AUTOLAYOUT_TITLE_CONTENT_OVER_CONTENT }, {BMP_LAYOUT_HEAD04, STR_AUTOLAYOUT_4CONTENT, AUTOLAYOUT_TITLE_4CONTENT }, {BMP_LAYOUT_HEAD06, STR_AUTOLAYOUT_6CONTENT, AUTOLAYOUT_TITLE_6CONTENT }, - {nullptr, {}, AUTOLAYOUT_NONE} + {EMPTY, {}, AUTOLAYOUT_NONE} }; const snewfoil_value_info_layout v_standard[] = @@ -127,7 +129,7 @@ const snewfoil_value_info_layout v_standard[] = {BMP_LAYOUT_VERTICAL01, STR_AL_VERT_TITLE_VERT_OUTLINE, AUTOLAYOUT_VTITLE_VCONTENT }, {BMP_LAYOUT_HEAD02, STR_AL_TITLE_VERT_OUTLINE, AUTOLAYOUT_TITLE_VCONTENT }, {BMP_LAYOUT_HEAD02A, STR_AL_TITLE_VERT_OUTLINE_CLIPART, AUTOLAYOUT_TITLE_2VTEXT }, - {nullptr, {}, AUTOLAYOUT_NONE} + {EMPTY, {}, AUTOLAYOUT_NONE} }; static void fillLayoutValueSet( ValueSet* pValue, const snewfoil_value_info_layout* pInfo ) @@ -136,7 +138,7 @@ static void fillLayoutValueSet( ValueSet* pValue, const snewfoil_value_info_layo for( ; pInfo->mpStrResId; pInfo++ ) { OUString aText(SdResId(pInfo->mpStrResId)); - Image aImg(StockImage::Yes, OUString::createFromAscii(pInfo->msBmpResId)); + Image aImg(StockImage::Yes, pInfo->msBmpResId); pValue->InsertItem(static_cast<sal_uInt16>(pInfo->maAutoLayout)+1, aImg, aText); aLayoutItemSize.setWidth( std::max( aLayoutItemSize.Width(), aImg.GetSizePixel().Width() ) ); aLayoutItemSize.setHeight( std::max( aLayoutItemSize.Height(), aImg.GetSizePixel().Height() ) ); |