diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-12-27 16:00:56 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-12-30 15:00:49 +0000 |
commit | b8e27d5da6b14241e80526d67d68dfd1132a288e (patch) | |
tree | 619bb79e6bd3c6f10513f2327b26ba065c3ca7e1 /svtools/source | |
parent | 0b21f2964a057412304cf06da4c78fda07647011 (diff) |
unwind this ImageList
after discovering one of the referenced images was missing
Change-Id: I25321ee436976415313fb004e798fad897673ee5
Reviewed-on: https://gerrit.libreoffice.org/32511
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svtools/source')
-rw-r--r-- | svtools/source/misc/imagemgr.cxx | 126 | ||||
-rw-r--r-- | svtools/source/misc/imagemgr.src | 569 |
2 files changed, 584 insertions, 111 deletions
diff --git a/svtools/source/misc/imagemgr.cxx b/svtools/source/misc/imagemgr.cxx index 78d674e515c2..1a8a91cee587 100644 --- a/svtools/source/misc/imagemgr.cxx +++ b/svtools/source/misc/imagemgr.cxx @@ -489,36 +489,108 @@ static Image GetImageFromList_Impl( sal_uInt16 nImageId, bool bBig ) // return our new small folder image (256 colors) return Image( SvtResId( IMG_SVT_FOLDER ) ); - ImageList* pList = nullptr; - - static vcl::DeleteOnDeinit< ImageList > xSmallImageList( nullptr ); - static vcl::DeleteOnDeinit< ImageList > xBigImageList( nullptr ); - static OUString style = Application::GetSettings().GetStyleSettings().DetermineIconTheme(); - - // If the style has been changed, throw away our cache of the older images - OUString currentStyle = Application::GetSettings().GetStyleSettings().DetermineIconTheme(); - if ( style != currentStyle) - { - xSmallImageList.reset(); - xBigImageList.reset(); - style = currentStyle; - } - - if ( bBig ) - { - if ( !xBigImageList.get() ) - xBigImageList.reset(new ImageList(SvtResId(RID_SVTOOLS_IMAGELIST_BIG))); - pList = xBigImageList.get(); - } - else + switch (nImageId) { - if ( !xSmallImageList.get() ) - xSmallImageList.reset(new ImageList(SvtResId(RID_SVTOOLS_IMAGELIST_SMALL))); - pList = xSmallImageList.get(); + case IMG_IMPRESS: + return Image(BitmapEx(SvtResId(bBig ? BMP_IMPRESS_LC : BMP_IMPRESS_SC))); + case IMG_BITMAP: + return Image(BitmapEx(SvtResId(bBig ? BMP_BITMAP_LC : BMP_BITMAP_SC))); + case IMG_CALC: + return Image(BitmapEx(SvtResId(bBig ? BMP_CALC_LC : BMP_CALC_SC))); + case IMG_CALCTEMPLATE: + return Image(BitmapEx(SvtResId(bBig ? BMP_CALCTEMPLATE_LC : BMP_CALCTEMPLATE_SC))); + case IMG_DATABASE: + return Image(BitmapEx(SvtResId(bBig ? BMP_DATABASE_LC : BMP_DATABASE_SC))); + case IMG_IMPRESSTEMPLATE: + return Image(BitmapEx(SvtResId(bBig ? BMP_IMPRESSTEMPLATE_LC : BMP_IMPRESSTEMPLATE_SC))); + case IMG_GIF: + return Image(BitmapEx(SvtResId(bBig ? BMP_GIF_LC : BMP_GIF_SC))); + case IMG_HTML: + return Image(BitmapEx(SvtResId(bBig ? BMP_HTML_LC : BMP_HTML_SC))); + case IMG_JPG: + return Image(BitmapEx(SvtResId(bBig ? BMP_JPG_LC : BMP_JPG_SC))); + case IMG_MATH: + return Image(BitmapEx(SvtResId(bBig ? BMP_MATH_LC : BMP_MATH_SC))); + case IMG_MATHTEMPLATE: + return Image(BitmapEx(SvtResId(bBig ? BMP_MATHTEMPLATE_LC : BMP_MATHTEMPLATE_SC))); + case IMG_FILE: + return Image(BitmapEx(SvtResId(bBig ? BMP_FILE_LC : BMP_FILE_SC))); + case IMG_PCD: + return Image(BitmapEx(SvtResId(bBig ? BMP_PCD_LC : BMP_PCD_SC))); + case IMG_PCT: + return Image(BitmapEx(SvtResId(bBig ? BMP_PCT_LC : BMP_PCT_SC))); + case IMG_PCX: + return Image(BitmapEx(SvtResId(bBig ? BMP_PCX_LC : BMP_PCX_SC))); + case IMG_SIM: + return Image(BitmapEx(SvtResId(bBig ? BMP_SIM_LC : BMP_SIM_SC))); + case IMG_TEXTFILE: + return Image(BitmapEx(SvtResId(bBig ? BMP_TEXTFILE_LC : BMP_TEXTFILE_SC))); + case IMG_TIFF: + return Image(BitmapEx(SvtResId(bBig ? BMP_TIFF_LC : BMP_TIFF_SC))); + case IMG_WMF: + return Image(BitmapEx(SvtResId(bBig ? BMP_WMF_LC : BMP_WMF_SC))); + case IMG_WRITER: + return Image(BitmapEx(SvtResId(bBig ? BMP_WRITER_LC : BMP_WRITER_SC))); + case IMG_WRITERTEMPLATE: + return Image(BitmapEx(SvtResId(bBig ? BMP_WRITERTEMPLATE_LC : BMP_WRITERTEMPLATE_SC))); + case IMG_FIXEDDEV: + return Image(BitmapEx(SvtResId(bBig ? BMP_FIXEDDEV_LC : BMP_FIXEDDEV_SC))); + case IMG_REMOVABLEDEV: + return Image(BitmapEx(SvtResId(bBig ? BMP_REMOVABLEDEV_LC : BMP_REMOVABLEDEV_SC))); + case IMG_CDROMDEV: + return Image(BitmapEx(SvtResId(bBig ? BMP_CDROMDEV_LC : BMP_CDROMDEV_SC))); + case IMG_NETWORKDEV: + return Image(BitmapEx(SvtResId(bBig ? BMP_NETWORKDEV_LC : BMP_NETWORKDEV_SC))); + case IMG_TABLE: + return Image(BitmapEx(SvtResId(bBig ? BMP_TABLE_LC : BMP_TABLE_SC))); + case IMG_FOLDER: + return Image(BitmapEx(SvtResId(bBig ? BMP_FOLDER_LC : BMP_FOLDER_SC))); + case IMG_DXF: + return Image(BitmapEx(SvtResId(bBig ? BMP_DXF_LC : BMP_DXF_SC))); + case IMG_MET: + return Image(BitmapEx(SvtResId(bBig ? BMP_MET_LC : BMP_MET_SC))); + case IMG_PNG: + return Image(BitmapEx(SvtResId(bBig ? BMP_PNG_LC : BMP_PNG_SC))); + case IMG_SGF: + return Image(BitmapEx(SvtResId(bBig ? BMP_SGF_LC : BMP_SGF_SC))); + case IMG_SGV: + return Image(BitmapEx(SvtResId(bBig ? BMP_SGV_LC : BMP_SGV_SC))); + case IMG_SVM: + return Image(BitmapEx(SvtResId(bBig ? BMP_SVM_LC : BMP_SVM_SC))); + case IMG_GLOBAL_DOC: + return Image(BitmapEx(SvtResId(bBig ? BMP_GLOBAL_DOC_LC : BMP_GLOBAL_DOC_SC))); + case IMG_DRAW: + return Image(BitmapEx(SvtResId(bBig ? BMP_DRAW_LC : BMP_DRAW_SC))); + case IMG_DRAWTEMPLATE: + return Image(BitmapEx(SvtResId(bBig ? BMP_DRAWTEMPLATE_LC : BMP_DRAWTEMPLATE_SC))); + case IMG_TEMPLATE: + return Image(BitmapEx(SvtResId(bBig ? BMP_TEMPLATE_LC : BMP_TEMPLATE_SC))); + case IMG_OO_DATABASE_DOC: + return Image(BitmapEx(SvtResId(bBig ? BMP_OO_DATABASE_DOC_LC : BMP_OO_DATABASE_DOC_SC))); + case IMG_OO_DRAW_DOC: + return Image(BitmapEx(SvtResId(bBig ? BMP_OO_DRAW_DOC_LC : BMP_OO_DRAW_DOC_SC))); + case IMG_OO_MATH_DOC: + return Image(BitmapEx(SvtResId(bBig ? BMP_OO_MATH_DOC_LC : BMP_OO_MATH_DOC_SC))); + case IMG_OO_GLOBAL_DOC: + return Image(BitmapEx(SvtResId(bBig ? BMP_OO_GLOBAL_DOC_LC : BMP_OO_GLOBAL_DOC_SC))); + case IMG_OO_IMPRESS_DOC: + return Image(BitmapEx(SvtResId(bBig ? BMP_OO_IMPRESS_DOC_LC : BMP_OO_IMPRESS_DOC_SC))); + case IMG_OO_CALC_DOC: + return Image(BitmapEx(SvtResId(bBig ? BMP_OO_CALC_DOC_LC : BMP_OO_CALC_DOC_SC))); + case IMG_OO_WRITER_DOC: + return Image(BitmapEx(SvtResId(bBig ? BMP_OO_WRITER_DOC_LC : BMP_OO_WRITER_DOC_SC))); + case IMG_OO_DRAW_TEMPLATE: + return Image(BitmapEx(SvtResId(bBig ? BMP_OO_DRAW_TEMPLATE_LC : BMP_OO_DRAW_TEMPLATE_SC))); + case IMG_OO_IMPRESS_TEMPLATE: + return Image(BitmapEx(SvtResId(bBig ? BMP_OO_IMPRESS_TEMPLATE_LC : BMP_OO_IMPRESS_TEMPLATE_SC))); + case IMG_OO_CALC_TEMPLATE: + return Image(BitmapEx(SvtResId(bBig ? BMP_OO_CALC_TEMPLATE_LC : BMP_OO_CALC_TEMPLATE_SC))); + case IMG_OO_WRITER_TEMPLATE: + return Image(BitmapEx(SvtResId(bBig ? BMP_OO_WRITER_TEMPLATE_LC : BMP_OO_WRITER_TEMPLATE_SC))); + case IMG_EXTENSION: + return Image(BitmapEx(SvtResId(bBig ? BMP_EXTENSION_LC : BMP_EXTENSION_SC))); } - if ( pList->HasImageForId( nImageId ) ) - return pList->GetImage( nImageId ); return Image(); } diff --git a/svtools/source/misc/imagemgr.src b/svtools/source/misc/imagemgr.src index ee442fb90a17..971edb9814a9 100644 --- a/svtools/source/misc/imagemgr.src +++ b/svtools/source/misc/imagemgr.src @@ -22,93 +22,494 @@ // images ******************************************************************** -#define X_IMAGE_LIST \ - IMG_IMPRESS ; \ - IMG_CALC ; \ - IMG_CALCTEMPLATE ; \ - IMG_IMPRESSTEMPLATE ; \ - IMG_HTML ; \ - IMG_MATH ; \ - IMG_WRITER ; \ - IMG_WRITERTEMPLATE ; \ - IMG_GLOBAL_DOC ; \ - IMG_DRAW ; \ - IMG_DRAWTEMPLATE ; \ - IMG_DATABASE; \ - IMG_BITMAP ; \ - IMG_CALC ; \ - IMG_CALCTEMPLATE ; \ - IMG_CDROMDEV ; \ - IMG_DATABASE ; \ - IMG_DRAW ; \ - IMG_DRAWTEMPLATE ; \ - IMG_DXF ; \ - IMG_EXTENSION ; \ - IMG_FILE ; \ - IMG_FIXEDDEV ; \ - IMG_FOLDER ; \ - IMG_GIF ; \ - IMG_GLOBAL_DOC ; \ - IMG_HTML ; \ - IMG_IMPRESS ; \ - IMG_IMPRESSTEMPLATE ; \ - IMG_JPG ; \ - IMG_MATH ; \ - IMG_MATHTEMPLATE ; \ - IMG_MET ; \ - IMG_NETWORKDEV ; \ - IMG_OO_CALC_DOC ; \ - IMG_OO_CALC_TEMPLATE ; \ - IMG_OO_DATABASE_DOC ; \ - IMG_OO_DRAW_DOC ; \ - IMG_OO_GLOBAL_DOC ; \ - IMG_OO_IMPRESS_DOC ; \ - IMG_OO_IMPRESS_TEMPLATE ; \ - IMG_OO_MATH_DOC ; \ - IMG_OO_WRITER_DOC ; \ - IMG_OO_WRITER_TEMPLATE ; \ - IMG_PCD ; \ - IMG_PCT ; \ - IMG_PCX ; \ - IMG_PNG ; \ - IMG_REMOVABLEDEV ; \ - IMG_SGF ; \ - IMG_SGV ; \ - IMG_SIM ; \ - IMG_SVM ; \ - IMG_TABLE ; \ - IMG_TEXTFILE ; \ - IMG_TEMPLATE ; \ - IMG_TIFF ; \ - IMG_WMF ; \ - IMG_WRITER ; \ - IMG_WRITERTEMPLATE ; \ - /* svx */ \ - -ImageList RID_SVTOOLS_IMAGELIST_BIG -{ - Prefix = "lx"; - IdList = - { - X_IMAGE_LIST - }; - IdCount = - { - 67 ; - }; +Bitmap BMP_IMPRESS_SC +{ + File = "sx03123.png"; }; -ImageList RID_SVTOOLS_IMAGELIST_SMALL +Bitmap BMP_BITMAP_SC { - Prefix = "sx"; - IdList = - { - X_IMAGE_LIST - }; - IdCount = - { - 67; - }; + File = "sx03125.png"; +}; + +Bitmap BMP_CALC_SC +{ + File = "sx03126.png"; +}; + +Bitmap BMP_CALCTEMPLATE_SC +{ + File = "sx03127.png"; +}; + +Bitmap BMP_DATABASE_SC +{ + File = "sx03129.png"; +}; + +Bitmap BMP_IMPRESSTEMPLATE_SC +{ + File = "sx03130.png"; +}; + +Bitmap BMP_GIF_SC +{ + File = "sx03137.png"; +}; + +Bitmap BMP_HTML_SC +{ + File = "sx03139.png"; +}; + +Bitmap BMP_JPG_SC +{ + File = "sx03140.png"; +}; + +Bitmap BMP_MATH_SC +{ + File = "sx03144.png"; +}; + +Bitmap BMP_MATHTEMPLATE_SC +{ + File = "sx03145.png"; +}; + +Bitmap BMP_FILE_SC +{ + File = "sx03150.png"; +}; + +Bitmap BMP_PCD_SC +{ + File = "sx03152.png"; +}; + +Bitmap BMP_PCT_SC +{ + File = "sx03153.png"; +}; + +Bitmap BMP_PCX_SC +{ + File = "sx03154.png"; +}; + +Bitmap BMP_SIM_SC +{ + File = "sx03155.png"; +}; + +Bitmap BMP_TEXTFILE_SC +{ + File = "sx03156.png"; +}; + +Bitmap BMP_TIFF_SC +{ + File = "sx03158.png"; +}; + +Bitmap BMP_WMF_SC +{ + File = "sx03160.png"; +}; + +Bitmap BMP_WRITER_SC +{ + File = "sx03162.png"; +}; + +Bitmap BMP_WRITERTEMPLATE_SC +{ + File = "sx03163.png"; +}; + +Bitmap BMP_FIXEDDEV_SC +{ + File = "sx03164.png"; +}; + +Bitmap BMP_REMOVABLEDEV_SC +{ + File = "sx03165.png"; +}; + +Bitmap BMP_CDROMDEV_SC +{ + File = "sx03166.png"; +}; + +Bitmap BMP_NETWORKDEV_SC +{ + File = "sx03167.png"; +}; + +Bitmap BMP_TABLE_SC +{ + File = "sx03188.png"; +}; + +Bitmap BMP_FOLDER_SC +{ + File = "sx03189.png"; +}; + +Bitmap BMP_DXF_SC +{ + File = "sx03217.png"; +}; + +Bitmap BMP_MET_SC +{ + File = "sx03218.png"; +}; + +Bitmap BMP_PNG_SC +{ + File = "sx03219.png"; +}; + +Bitmap BMP_SGF_SC +{ + File = "sx03220.png"; +}; + +Bitmap BMP_SGV_SC +{ + File = "sx03221.png"; +}; + +Bitmap BMP_SVM_SC +{ + File = "sx03222.png"; +}; + +Bitmap BMP_GLOBAL_DOC_SC +{ + File = "sx03226.png"; +}; + +Bitmap BMP_DRAW_SC +{ + File = "sx03227.png"; +}; + +Bitmap BMP_DRAWTEMPLATE_SC +{ + File = "sx03228.png"; +}; + +Bitmap BMP_TEMPLATE_SC +{ + File = "sx03242.png"; +}; + +Bitmap BMP_OO_DATABASE_DOC_SC +{ + File = "sx03245.png"; +}; + +Bitmap BMP_OO_DRAW_DOC_SC +{ + File = "sx03246.png"; +}; + +Bitmap BMP_OO_MATH_DOC_SC +{ + File = "sx03247.png"; +}; + +Bitmap BMP_OO_GLOBAL_DOC_SC +{ + File = "sx03248.png"; +}; + +Bitmap BMP_OO_IMPRESS_DOC_SC +{ + File = "sx03249.png"; +}; + +Bitmap BMP_OO_CALC_DOC_SC +{ + File = "sx03250.png"; +}; + +Bitmap BMP_OO_WRITER_DOC_SC +{ + File = "sx03251.png"; +}; + +Bitmap BMP_OO_DRAW_TEMPLATE_SC +{ + File = "sx03252.png"; +}; + +Bitmap BMP_OO_IMPRESS_TEMPLATE_SC +{ + File = "sx03253.png"; +}; + +Bitmap BMP_OO_CALC_TEMPLATE_SC +{ + File = "sx03254.png"; +}; + +Bitmap BMP_OO_WRITER_TEMPLATE_SC +{ + File = "sx03255.png"; +}; + +Bitmap BMP_EXTENSION_SC +{ + File = "sx03256.png"; +}; + +Bitmap BMP_IMPRESS_LC +{ + File = "lx03123.png"; +}; + +Bitmap BMP_BITMAP_LC +{ + File = "lx03125.png"; +}; + +Bitmap BMP_CALC_LC +{ + File = "lx03126.png"; +}; + +Bitmap BMP_CALCTEMPLATE_LC +{ + File = "lx03127.png"; +}; + +Bitmap BMP_DATABASE_LC +{ + File = "lx03129.png"; +}; + +Bitmap BMP_IMPRESSTEMPLATE_LC +{ + File = "lx03130.png"; +}; + +Bitmap BMP_GIF_LC +{ + File = "lx03137.png"; +}; + +Bitmap BMP_HTML_LC +{ + File = "lx03139.png"; +}; + +Bitmap BMP_JPG_LC +{ + File = "lx03140.png"; +}; + +Bitmap BMP_MATH_LC +{ + File = "lx03144.png"; +}; + +Bitmap BMP_MATHTEMPLATE_LC +{ + File = "lx03145.png"; +}; + +Bitmap BMP_FILE_LC +{ + File = "lx03150.png"; +}; + +Bitmap BMP_PCD_LC +{ + File = "lx03152.png"; +}; + +Bitmap BMP_PCT_LC +{ + File = "lx03153.png"; +}; + +Bitmap BMP_PCX_LC +{ + File = "lx03154.png"; +}; + +Bitmap BMP_SIM_LC +{ + File = "lx03155.png"; +}; + +Bitmap BMP_TEXTFILE_LC +{ + File = "lx03156.png"; +}; + +Bitmap BMP_TIFF_LC +{ + File = "lx03158.png"; +}; + +Bitmap BMP_WMF_LC +{ + File = "lx03160.png"; +}; + +Bitmap BMP_WRITER_LC +{ + File = "lx03162.png"; +}; + +Bitmap BMP_WRITERTEMPLATE_LC +{ + File = "lx03163.png"; +}; + +Bitmap BMP_FIXEDDEV_LC +{ + File = "lx03164.png"; +}; + +Bitmap BMP_REMOVABLEDEV_LC +{ + File = "lx03165.png"; +}; + +Bitmap BMP_CDROMDEV_LC +{ + File = "lx03166.png"; +}; + +Bitmap BMP_NETWORKDEV_LC +{ + File = "lx03167.png"; +}; + +Bitmap BMP_TABLE_LC +{ + File = "lx03188.png"; +}; + +Bitmap BMP_FOLDER_LC +{ + File = "lx03189.png"; +}; + +Bitmap BMP_DXF_LC +{ + File = "lx03217.png"; +}; + +Bitmap BMP_MET_LC +{ + File = "lx03218.png"; +}; + +Bitmap BMP_PNG_LC +{ + File = "lx03219.png"; +}; + +Bitmap BMP_SGF_LC +{ + File = "lx03220.png"; +}; + +Bitmap BMP_SGV_LC +{ + File = "lx03221.png"; +}; + +Bitmap BMP_SVM_LC +{ + File = "lx03222.png"; +}; + +Bitmap BMP_GLOBAL_DOC_LC +{ + File = "lx03226.png"; +}; + +Bitmap BMP_DRAW_LC +{ + File = "lx03227.png"; +}; + +Bitmap BMP_DRAWTEMPLATE_LC +{ + File = "lx03228.png"; +}; + +Bitmap BMP_TEMPLATE_LC +{ + File = "lx03242.png"; +}; + +Bitmap BMP_OO_DATABASE_DOC_LC +{ + File = "lx03245.png"; +}; + +Bitmap BMP_OO_DRAW_DOC_LC +{ + File = "lx03246.png"; +}; + +Bitmap BMP_OO_MATH_DOC_LC +{ + File = "lx03247.png"; +}; + +Bitmap BMP_OO_GLOBAL_DOC_LC +{ + File = "lx03248.png"; +}; + +Bitmap BMP_OO_IMPRESS_DOC_LC +{ + File = "lx03249.png"; +}; + +Bitmap BMP_OO_CALC_DOC_LC +{ + File = "lx03250.png"; +}; + +Bitmap BMP_OO_WRITER_DOC_LC +{ + File = "lx03251.png"; +}; + +Bitmap BMP_OO_DRAW_TEMPLATE_LC +{ + File = "lx03252.png"; +}; + +Bitmap BMP_OO_IMPRESS_TEMPLATE_LC +{ + File = "lx03253.png"; +}; + +Bitmap BMP_OO_CALC_TEMPLATE_LC +{ + File = "lx03254.png"; +}; + +Bitmap BMP_OO_WRITER_TEMPLATE_LC +{ + File = "lx03255.png"; +}; + +Bitmap BMP_EXTENSION_LC +{ + File = "lx03256.png"; }; Bitmap BMP_PLUGIN |