summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/app/AppIconControl.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'dbaccess/source/ui/app/AppIconControl.cxx')
-rw-r--r--dbaccess/source/ui/app/AppIconControl.cxx13
1 files changed, 6 insertions, 7 deletions
diff --git a/dbaccess/source/ui/app/AppIconControl.cxx b/dbaccess/source/ui/app/AppIconControl.cxx
index ff9e35ab9cd3..0483ab38f4dd 100644
--- a/dbaccess/source/ui/app/AppIconControl.cxx
+++ b/dbaccess/source/ui/app/AppIconControl.cxx
@@ -69,27 +69,26 @@ OApplicationIconControl::OApplicationIconControl(std::unique_ptr<weld::ScrolledW
void OApplicationIconControl::Fill()
{
- static const struct CategoryDescriptor
+ static constexpr struct CategoryDescriptor
{
TranslateId pLabelResId;
ElementType eType;
- const char* aImageResId;
+ OUString aImageResId;
} aCategories[] = { { RID_STR_TABLES_CONTAINER, E_TABLE, BMP_TABLEFOLDER_TREE_L },
{ RID_STR_QUERIES_CONTAINER, E_QUERY, BMP_QUERYFOLDER_TREE_L },
{ RID_STR_FORMS_CONTAINER, E_FORM, BMP_FORMFOLDER_TREE_L },
{ RID_STR_REPORTS_CONTAINER, E_REPORT, BMP_REPORTFOLDER_TREE_L } };
- for (const CategoryDescriptor& aCategorie : aCategories)
+ for (const CategoryDescriptor& aCategory : aCategories)
{
// E_TABLE is 0, but 0 means void so use id of enum + 1
- std::unique_ptr<ThumbnailViewItem> xItem(
- new ThumbnailViewItem(*this, aCategorie.eType + 1));
+ std::unique_ptr<ThumbnailViewItem> xItem(new ThumbnailViewItem(*this, aCategory.eType + 1));
xItem->mbBorder = false;
- xItem->maPreview1 = BitmapEx(OUString::createFromAscii(aCategorie.aImageResId));
+ xItem->maPreview1 = BitmapEx(aCategory.aImageResId);
const Size& rSize = xItem->maPreview1.GetSizePixel();
m_nMaxWidth = std::max(m_nMaxWidth, rSize.Width());
m_nMaxHeight = std::max(m_nMaxHeight, rSize.Height());
- xItem->maTitle = DBA_RES(aCategorie.pLabelResId);
+ xItem->maTitle = DBA_RES(aCategory.pLabelResId);
m_nMaxWidth = std::max<tools::Long>(m_nMaxWidth, GetTextWidth(xItem->maTitle));
AppendItem(std::move(xItem));
}