summaryrefslogtreecommitdiff
path: root/sd/source/ui/dlg/navigatr.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-04-26 15:12:02 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-04-26 22:09:04 +0200
commitd6e8f22dd62a9414a5708cc086170a4ae86a0e0b (patch)
tree4ddad300fc34b3e19e47eb0bd77453668d1a1233 /sd/source/ui/dlg/navigatr.cxx
parent6d187d88829fc4cbf8400636f17c4e2a684e2117 (diff)
remove sd bitmaps from .src files
and recover referenced, but missing BMP_FOIL_NONE Change-Id: Ief35a3e2f2934cbbed86b2bca3bda4d998f54734 Reviewed-on: https://gerrit.libreoffice.org/36997 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sd/source/ui/dlg/navigatr.cxx')
-rw-r--r--sd/source/ui/dlg/navigatr.cxx32
1 files changed, 25 insertions, 7 deletions
diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx
index 4d22b91e365c..76fa5140872b 100644
--- a/sd/source/ui/dlg/navigatr.cxx
+++ b/sd/source/ui/dlg/navigatr.cxx
@@ -44,6 +44,7 @@
#include "app.hrc"
#include "strings.hrc"
#include "res_bmp.hrc"
+#include "bitmaps.hlst"
#include "drawdoc.hxx"
#include "DrawDocShell.hxx"
#include "sdresid.hxx"
@@ -266,7 +267,7 @@ IMPL_LINK( SdNavigatorWin, DropdownClickToolBoxHdl, ToolBox*, pBox, void )
for (sal_uInt16 nID = NAVIGATOR_DRAGTYPE_URL; nID < NAVIGATOR_DRAGTYPE_COUNT; ++nID)
{
- sal_uInt16 nRId = GetDragTypeSdResId( (NavigatorDragType)nID, false );
+ sal_uInt16 nRId = GetDragTypeSdStrId((NavigatorDragType)nID);
if( nRId > 0 )
{
DBG_ASSERT(aHIDs[nID-NAVIGATOR_DRAGTYPE_URL],"HelpId not added!");
@@ -616,23 +617,40 @@ void SdNavigatorWin::RefreshDocumentLB( const OUString* pDocName )
maLbDocs->SelectEntryPos( nPos );
}
-sal_uInt16 SdNavigatorWin::GetDragTypeSdResId( NavigatorDragType eDT, bool bImage )
+sal_uInt16 SdNavigatorWin::GetDragTypeSdStrId(NavigatorDragType eDT)
{
switch( eDT )
{
case NAVIGATOR_DRAGTYPE_NONE:
- return( bImage ? 0 : STR_NONE );
+ return STR_NONE;
case NAVIGATOR_DRAGTYPE_URL:
- return( bImage ? BMP_HYPERLINK : STR_DRAGTYPE_URL );
+ return STR_DRAGTYPE_URL;
case NAVIGATOR_DRAGTYPE_EMBEDDED:
- return( bImage ? BMP_EMBEDDED : STR_DRAGTYPE_EMBEDDED );
+ return STR_DRAGTYPE_EMBEDDED;
case NAVIGATOR_DRAGTYPE_LINK:
- return( bImage ? BMP_LINK : STR_DRAGTYPE_LINK );
+ return STR_DRAGTYPE_LINK;
default: OSL_FAIL( "No resource for DragType available!" );
}
return 0;
}
+OUString SdNavigatorWin::GetDragTypeSdBmpId(NavigatorDragType eDT)
+{
+ switch( eDT )
+ {
+ case NAVIGATOR_DRAGTYPE_NONE:
+ return OUString();
+ case NAVIGATOR_DRAGTYPE_URL:
+ return OUString(BMP_HYPERLINK);
+ case NAVIGATOR_DRAGTYPE_EMBEDDED:
+ return OUString(BMP_EMBEDDED);
+ case NAVIGATOR_DRAGTYPE_LINK:
+ return OUString(BMP_LINK);
+ default: OSL_FAIL( "No resource for DragType available!" );
+ }
+ return OUString();
+}
+
NavDocInfo* SdNavigatorWin::GetDocInfo()
{
sal_uInt32 nPos = maLbDocs->GetSelectEntryPos();
@@ -721,7 +739,7 @@ void SdNavigatorWin::KeyInput( const KeyEvent& rKEvt )
void SdNavigatorWin::SetDragImage()
{
const sal_uInt16 nDragTypeId = maToolbox->GetItemId("dragmode");
- maToolbox->SetItemImage(nDragTypeId, Image(BitmapEx(SdResId(GetDragTypeSdResId(meDragType, true)))));
+ maToolbox->SetItemImage(nDragTypeId, Image(BitmapEx(GetDragTypeSdBmpId(meDragType))));
}
/**