diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-12-05 10:39:01 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-12-05 11:10:05 +0000 |
commit | 42d68eada6a745bdccb210efffcde8668061e3ef (patch) | |
tree | abb1509bf86b23ff038a5829c0f83dc3a4d78b36 /sw/source/uibase/uno/unotxdoc.cxx | |
parent | dae92e11061a718a0c74384b086bca14aa2213ac (diff) |
unroll IMG_NAVI_ENTRYBMP ImageList
Change-Id: Icb00102f064b845b33a072880c60a9aae5dc4a55
Diffstat (limited to 'sw/source/uibase/uno/unotxdoc.cxx')
-rw-r--r-- | sw/source/uibase/uno/unotxdoc.cxx | 29 |
1 files changed, 12 insertions, 17 deletions
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx index 3aa6ec2c597e..531bec7d7a7b 100644 --- a/sw/source/uibase/uno/unotxdoc.cxx +++ b/sw/source/uibase/uno/unotxdoc.cxx @@ -4033,31 +4033,26 @@ static Any lcl_GetDisplayBitmap(const OUString& _sLinkSuffix) OUString sLinkSuffix = _sLinkSuffix; if(!sLinkSuffix.isEmpty()) sLinkSuffix = sLinkSuffix.copy(1); - ContentTypeId nImgId(ContentTypeId::UNKNOWN); - bool bNotFound = false; + sal_uInt16 nImgId(0); if(sLinkSuffix == "outline") - nImgId = ContentTypeId::OUTLINE; + nImgId = RID_BMP_NAVI_OUTLINE; else if(sLinkSuffix == "table") - nImgId = ContentTypeId::TABLE; + nImgId = RID_BMP_NAVI_TABLE; else if(sLinkSuffix == "frame") - nImgId = ContentTypeId::FRAME; + nImgId = RID_BMP_NAVI_FRAME; else if(sLinkSuffix == "graphic") - nImgId = ContentTypeId::GRAPHIC; - else if(sLinkSuffix == "region") - nImgId = ContentTypeId::REGION; + nImgId = RID_BMP_NAVI_GRAPHIC; else if(sLinkSuffix == "ole") - nImgId = ContentTypeId::OLE; + nImgId = RID_BMP_NAVI_OLE; else if(sLinkSuffix.isEmpty()) - nImgId = ContentTypeId::BOOKMARK; - else - bNotFound = true; - if(!bNotFound) + nImgId = RID_BMP_NAVI_BOOKMARK; + else if(sLinkSuffix == "region") + nImgId = RID_BMP_NAVI_REGION; + + if (nImgId) { - ImageList aEntryImages( SW_RES(IMG_NAVI_ENTRYBMP) ); - const Image& rImage = aEntryImages.GetImage( (int)nImgId + 2000 ); - Bitmap aBitmap( rImage.GetBitmapEx().GetBitmap() ); - aRet <<= VCLUnoHelper::CreateBitmap( aBitmap ); + aRet <<= VCLUnoHelper::CreateBitmap(BitmapEx(SW_RES(nImgId)).GetBitmap()); } return aRet; } |