diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-12-21 20:40:14 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-12-22 09:01:57 +0000 |
commit | 76dfd119dfcd5fbfe295a8883ac2860cbac280c5 (patch) | |
tree | 29a7f767f00a2a6009082bf0537de2d6db634941 /sc | |
parent | a0c1e7bc8e8836d4f47d9cdeabc8b2cdfdf2345b (diff) |
unwind RID_IMAGELIST_NAVCONT ImageList
Change-Id: I5e057ce9df205ca2431e7a7a455b00fcec6123db
Diffstat (limited to 'sc')
-rw-r--r-- | sc/inc/sc.hrc | 12 | ||||
-rw-r--r-- | sc/source/ui/inc/content.hxx | 1 | ||||
-rw-r--r-- | sc/source/ui/navipi/content.cxx | 7 | ||||
-rw-r--r-- | sc/source/ui/navipi/navipi.src | 52 | ||||
-rw-r--r-- | sc/source/ui/unoobj/targuno.cxx | 5 |
5 files changed, 53 insertions, 24 deletions
diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc index 3f3300eeacf4..98053e5ef4b7 100644 --- a/sc/inc/sc.hrc +++ b/sc/inc/sc.hrc @@ -692,7 +692,6 @@ #define RID_OBJECTBAR_TOOLS (SC_RESOURCE_START+35) #define RID_SC_FUNCTION_DESCRIPTIONS1 (SC_RESOURCE_START+43) #define RID_SC_FUNCTION_DESCRIPTIONS2 (SC_RESOURCE_START+44) -#define RID_IMAGELIST_NAVCONT (SC_RESOURCE_START+52) #define RID_DRAW_OBJECTBAR (SC_RESOURCE_START+53) #define RID_GRAPHIC_OBJECTBAR (SC_RESOURCE_START+54) #define RID_MEDIA_OBJECTBAR (SC_RESOURCE_START+60) @@ -1032,6 +1031,17 @@ #define RID_BMP_INPUT_CANCEL (BMP_START + 38) #define RID_BMP_INPUT_OK (BMP_START + 39) +// navigator - in the same order as SC_CONTENT_... +#define RID_BMP_CONTENT_ROOT (BMP_START + 40) +#define RID_BMP_CONTENT_TABLE (BMP_START + 41) +#define RID_BMP_CONTENT_RANGENAME (BMP_START + 42) +#define RID_BMP_CONTENT_DBAREA (BMP_START + 43) +#define RID_BMP_CONTENT_GRAPHIC (BMP_START + 44) +#define RID_BMP_CONTENT_OLEOBJECT (BMP_START + 45) +#define RID_BMP_CONTENT_NOTE (BMP_START + 46) +#define RID_BMP_CONTENT_AREALINK (BMP_START + 47) +#define RID_BMP_CONTENT_DRAWING (BMP_START + 48) + #define BMP_END (BMP_START + 100) #define SC_DIALOGS_START (BMP_END) diff --git a/sc/source/ui/inc/content.hxx b/sc/source/ui/inc/content.hxx index 4a673c79997a..20ac0b163259 100644 --- a/sc/source/ui/inc/content.hxx +++ b/sc/source/ui/inc/content.hxx @@ -43,7 +43,6 @@ const sal_uLong SC_CONTENT_NOCHILD = ~0UL; class ScContentTree : public SvTreeListBox { VclPtr<ScNavigatorDlg> pParentWindow; - ImageList aEntryImages; o3tl::enumarray<ScContentId, SvTreeListEntry*> pRootNodes; ScContentId nRootType; // set as Root OUString aManualDoc; // Switched in Navigator (Title) diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx index 5139c369dc80..9f96bd159c66 100644 --- a/sc/source/ui/navipi/content.cxx +++ b/sc/source/ui/navipi/content.cxx @@ -114,7 +114,6 @@ ScDocShell* ScContentTree::GetManualOrCurrent() ScContentTree::ScContentTree(vcl::Window* pParent, ScNavigatorDlg* pNavigatorDlg) : SvTreeListBox(pParent, WB_BORDER | WB_QUICK_SEARCH) , pParentWindow(pNavigatorDlg) - , aEntryImages(ScResId(RID_IMAGELIST_NAVCONT)) , nRootType(ScContentId::ROOT) , bHiddenDoc(false) , pHiddenDocument(nullptr) @@ -226,11 +225,11 @@ void ScContentTree::InitRoot( ScContentId nType ) return; } - const Image& rImage = aEntryImages.GetImage( (int) nType ); - OUString aName( ScResId( SCSTR_CONTENT_ROOT + (int)nType ) ); + Image aImage(BitmapEx(ScResId(RID_BMP_CONTENT_ROOT + (int)nType))); + OUString aName(ScResId(SCSTR_CONTENT_ROOT + (int)nType)); // wieder an die richtige Position: sal_uInt16 nPos = nRootType != ScContentId::ROOT ? 0 : pPosList[nType]-1; - SvTreeListEntry* pNew = InsertEntry( aName, rImage, rImage, nullptr, false, nPos ); + SvTreeListEntry* pNew = InsertEntry( aName, aImage, aImage, nullptr, false, nPos ); pRootNodes[nType] = pNew; } diff --git a/sc/source/ui/navipi/navipi.src b/sc/source/ui/navipi/navipi.src index 90e73f9ce094..58a9370d093e 100644 --- a/sc/source/ui/navipi/navipi.src +++ b/sc/source/ui/navipi/navipi.src @@ -19,22 +19,44 @@ #include "sc.hrc" -ImageList RID_IMAGELIST_NAVCONT +Bitmap RID_BMP_CONTENT_TABLE { - Prefix = "nc"; - // SC_CONTENT_... - IdList = - { - 1 ; - 2 ; - 3 ; - 4 ; - 5 ; - 6 ; - 7 ; - 8 ; - }; - IdCount = { 8 ; }; + File = "nc01.png"; +}; + +Bitmap RID_BMP_CONTENT_RANGENAME +{ + File = "nc02.png"; +}; + +Bitmap RID_BMP_CONTENT_DBAREA +{ + File = "nc03.png"; +}; + +Bitmap RID_BMP_CONTENT_GRAPHIC +{ + File = "nc04.png"; +}; + +Bitmap RID_BMP_CONTENT_OLEOBJECT +{ + File = "nc05.png"; +}; + +Bitmap RID_BMP_CONTENT_NOTE +{ + File = "nc06.png"; +}; + +Bitmap RID_BMP_CONTENT_AREALINK +{ + File = "nc07.png"; +}; + +Bitmap RID_BMP_CONTENT_DRAWING +{ + File = "nc08.png"; }; Image RID_IMG_DROP_URL diff --git a/sc/source/ui/unoobj/targuno.cxx b/sc/source/ui/unoobj/targuno.cxx index 0e080ad6d981..3180a137da08 100644 --- a/sc/source/ui/unoobj/targuno.cxx +++ b/sc/source/ui/unoobj/targuno.cxx @@ -222,9 +222,8 @@ void ScLinkTargetTypeObj::SetLinkTargetBitmap( uno::Any& rRet, sal_uInt16 nType } if (nImgId != ScContentId::ROOT) { - ImageList aEntryImages( ScResId( RID_IMAGELIST_NAVCONT ) ); - const Image& rImage = aEntryImages.GetImage( (sal_uInt16)nImgId ); - rRet <<= uno::Reference< awt::XBitmap > (VCLUnoHelper::CreateBitmap( rImage.GetBitmapEx() )); + BitmapEx aBitmapEx(ScResId(RID_BMP_CONTENT_ROOT + (int)nImgId)); + rRet <<= uno::Reference< awt::XBitmap > (VCLUnoHelper::CreateBitmap(aBitmapEx)); } } |