sd: load BitmapEx resources instead of Image ones
Change-Id: Ic3f416300194d8fa9dfebc2b7a700396ba5641a5
This commit is contained in:
parent
81516167e3
commit
aa347e360c
@ -32,16 +32,16 @@
|
||||
#define RID_CUSTOMANIMATION_SCALE_POPUP RID_CUSTOMANIMATION_START+11
|
||||
#define RID_CUSTOMANIMATION_FONTSTYLE_POPUP RID_CUSTOMANIMATION_START+12
|
||||
|
||||
#define IMG_CUSTOMANIMATION_ON_CLICK RID_CUSTOMANIMATION_START+0
|
||||
#define IMG_CUSTOMANIMATION_AFTER_PREVIOUS RID_CUSTOMANIMATION_START+1
|
||||
#define IMG_CUSTOMANIMATION_ENTRANCE_EFFECT RID_CUSTOMANIMATION_START+2
|
||||
#define IMG_CUSTOMANIMATION_EMPHASIS_EFFECT RID_CUSTOMANIMATION_START+3
|
||||
#define IMG_CUSTOMANIMATION_EXIT_EFFECT RID_CUSTOMANIMATION_START+4
|
||||
#define IMG_CUSTOMANIMATION_MOTION_PATH RID_CUSTOMANIMATION_START+5
|
||||
#define IMG_CUSTOMANIMATION_OLE RID_CUSTOMANIMATION_START+6
|
||||
#define IMG_CUSTOMANIMATION_MEDIA_PLAY RID_CUSTOMANIMATION_START+7
|
||||
#define IMG_CUSTOMANIMATION_MEDIA_PAUSE RID_CUSTOMANIMATION_START+8
|
||||
#define IMG_CUSTOMANIMATION_MEDIA_STOP RID_CUSTOMANIMATION_START+9
|
||||
#define BMP_CUSTOMANIMATION_ON_CLICK RID_CUSTOMANIMATION_START+0
|
||||
#define BMP_CUSTOMANIMATION_AFTER_PREVIOUS RID_CUSTOMANIMATION_START+1
|
||||
#define BMP_CUSTOMANIMATION_ENTRANCE_EFFECT RID_CUSTOMANIMATION_START+2
|
||||
#define BMP_CUSTOMANIMATION_EMPHASIS_EFFECT RID_CUSTOMANIMATION_START+3
|
||||
#define BMP_CUSTOMANIMATION_EXIT_EFFECT RID_CUSTOMANIMATION_START+4
|
||||
#define BMP_CUSTOMANIMATION_MOTION_PATH RID_CUSTOMANIMATION_START+5
|
||||
#define BMP_CUSTOMANIMATION_OLE RID_CUSTOMANIMATION_START+6
|
||||
#define BMP_CUSTOMANIMATION_MEDIA_PLAY RID_CUSTOMANIMATION_START+7
|
||||
#define BMP_CUSTOMANIMATION_MEDIA_PAUSE RID_CUSTOMANIMATION_START+8
|
||||
#define BMP_CUSTOMANIMATION_MEDIA_STOP RID_CUSTOMANIMATION_START+9
|
||||
|
||||
#define STR_CUSTOMANIMATION_REPEAT_NONE RID_CUSTOMANIMATION_START+5
|
||||
#define STR_CUSTOMANIMATION_REPEAT_UNTIL_NEXT_CLICK RID_CUSTOMANIMATION_START+6
|
||||
|
@ -384,60 +384,59 @@ String STR_CUSTOMANIMATION_MOTION_PATHS
|
||||
Text [ en-US ] = "Motion Paths: %1";
|
||||
};
|
||||
|
||||
|
||||
String STR_SLIDETRANSITION_NONE
|
||||
{
|
||||
Text [ en-US ] = "None";
|
||||
};
|
||||
|
||||
Image IMG_CUSTOMANIMATION_ON_CLICK
|
||||
Bitmap BMP_CUSTOMANIMATION_ON_CLICK
|
||||
{
|
||||
ImageBitmap = Bitmap { File = "click_16.png" ; };
|
||||
File = "click_16.png";
|
||||
};
|
||||
|
||||
Image IMG_CUSTOMANIMATION_AFTER_PREVIOUS
|
||||
Bitmap BMP_CUSTOMANIMATION_AFTER_PREVIOUS
|
||||
{
|
||||
ImageBitmap = Bitmap { File = "time_16.png" ; };
|
||||
File = "time_16.png";
|
||||
};
|
||||
|
||||
Image IMG_CUSTOMANIMATION_ENTRANCE_EFFECT
|
||||
Bitmap BMP_CUSTOMANIMATION_ENTRANCE_EFFECT
|
||||
{
|
||||
ImageBitmap = Bitmap { File = "effect_16.png" ; };
|
||||
File = "effect_16.png";
|
||||
};
|
||||
|
||||
Image IMG_CUSTOMANIMATION_EMPHASIS_EFFECT
|
||||
Bitmap BMP_CUSTOMANIMATION_EMPHASIS_EFFECT
|
||||
{
|
||||
ImageBitmap = Bitmap { File = "effectshape_16.png" ; };
|
||||
File = "effectshape_16.png";
|
||||
};
|
||||
|
||||
Image IMG_CUSTOMANIMATION_EXIT_EFFECT
|
||||
Bitmap BMP_CUSTOMANIMATION_EXIT_EFFECT
|
||||
{
|
||||
ImageBitmap = Bitmap { File = "effectfade_16.png" ; };
|
||||
File = "effectfade_16.png";
|
||||
};
|
||||
|
||||
Image IMG_CUSTOMANIMATION_MOTION_PATH
|
||||
Bitmap BMP_CUSTOMANIMATION_MOTION_PATH
|
||||
{
|
||||
ImageBitmap = Bitmap { File = "effectpath_16.png" ; };
|
||||
File = "effectpath_16.png";
|
||||
};
|
||||
|
||||
Image IMG_CUSTOMANIMATION_OLE
|
||||
Bitmap BMP_CUSTOMANIMATION_OLE
|
||||
{
|
||||
ImageBitmap = Bitmap { File = "effectole_16.png"; } ;
|
||||
File = "effectole_16.png";
|
||||
};
|
||||
|
||||
Image IMG_CUSTOMANIMATION_MEDIA_PLAY
|
||||
Bitmap BMP_CUSTOMANIMATION_MEDIA_PLAY
|
||||
{
|
||||
ImageBitmap = Bitmap { File = "playblue_16.png"; } ;
|
||||
File = "playblue_16.png";
|
||||
};
|
||||
|
||||
Image IMG_CUSTOMANIMATION_MEDIA_PAUSE
|
||||
Bitmap BMP_CUSTOMANIMATION_MEDIA_PAUSE
|
||||
{
|
||||
ImageBitmap = Bitmap { File = "breakplayingblue_16.png"; } ;
|
||||
File = "breakplayingblue_16.png";
|
||||
};
|
||||
|
||||
Image IMG_CUSTOMANIMATION_MEDIA_STOP
|
||||
Bitmap BMP_CUSTOMANIMATION_MEDIA_STOP
|
||||
{
|
||||
ImageBitmap = Bitmap { File = "stopplayingblue_16.png"; } ;
|
||||
File = "stopplayingblue_16.png";
|
||||
};
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
@ -268,11 +268,11 @@ void CustomAnimationListEntryItem::Paint(const Point& rPos, SvTreeListBox& rDev,
|
||||
sal_Int16 nNodeType = mpEffect->getNodeType();
|
||||
if (nNodeType == EffectNodeType::ON_CLICK )
|
||||
{
|
||||
rRenderContext.DrawImage( aPos, mpParent->getImage(IMG_CUSTOMANIMATION_ON_CLICK));
|
||||
rRenderContext.DrawImage( aPos, mpParent->getImage(BMP_CUSTOMANIMATION_ON_CLICK));
|
||||
}
|
||||
else if (nNodeType == EffectNodeType::AFTER_PREVIOUS)
|
||||
{
|
||||
rRenderContext.DrawImage(aPos, mpParent->getImage(IMG_CUSTOMANIMATION_AFTER_PREVIOUS));
|
||||
rRenderContext.DrawImage(aPos, mpParent->getImage(BMP_CUSTOMANIMATION_AFTER_PREVIOUS));
|
||||
}
|
||||
else if (nNodeType == EffectNodeType::WITH_PREVIOUS)
|
||||
{
|
||||
@ -290,25 +290,25 @@ void CustomAnimationListEntryItem::Paint(const Point& rPos, SvTreeListBox& rDev,
|
||||
switch (mpEffect->getPresetClass())
|
||||
{
|
||||
case EffectPresetClass::ENTRANCE:
|
||||
nImage = IMG_CUSTOMANIMATION_ENTRANCE_EFFECT; break;
|
||||
nImage = BMP_CUSTOMANIMATION_ENTRANCE_EFFECT; break;
|
||||
case EffectPresetClass::EXIT:
|
||||
nImage = IMG_CUSTOMANIMATION_EXIT_EFFECT; break;
|
||||
nImage = BMP_CUSTOMANIMATION_EXIT_EFFECT; break;
|
||||
case EffectPresetClass::EMPHASIS:
|
||||
nImage = IMG_CUSTOMANIMATION_EMPHASIS_EFFECT; break;
|
||||
nImage = BMP_CUSTOMANIMATION_EMPHASIS_EFFECT; break;
|
||||
case EffectPresetClass::MOTIONPATH:
|
||||
nImage = IMG_CUSTOMANIMATION_MOTION_PATH; break;
|
||||
nImage = BMP_CUSTOMANIMATION_MOTION_PATH; break;
|
||||
case EffectPresetClass::OLEACTION:
|
||||
nImage = IMG_CUSTOMANIMATION_OLE; break;
|
||||
nImage = BMP_CUSTOMANIMATION_OLE; break;
|
||||
case EffectPresetClass::MEDIACALL:
|
||||
switch (mpEffect->getCommand())
|
||||
{
|
||||
case EffectCommands::TOGGLEPAUSE:
|
||||
nImage = IMG_CUSTOMANIMATION_MEDIA_PAUSE; break;
|
||||
nImage = BMP_CUSTOMANIMATION_MEDIA_PAUSE; break;
|
||||
case EffectCommands::STOP:
|
||||
nImage = IMG_CUSTOMANIMATION_MEDIA_STOP; break;
|
||||
nImage = BMP_CUSTOMANIMATION_MEDIA_STOP; break;
|
||||
case EffectCommands::PLAY:
|
||||
default:
|
||||
nImage = IMG_CUSTOMANIMATION_MEDIA_PLAY; break;
|
||||
nImage = BMP_CUSTOMANIMATION_MEDIA_PLAY; break;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
@ -456,13 +456,13 @@ VCL_BUILDER_FACTORY(CustomAnimationList)
|
||||
|
||||
const Image& CustomAnimationList::getImage( sal_uInt16 nId )
|
||||
{
|
||||
DBG_ASSERT( (nId >= IMG_CUSTOMANIMATION_ON_CLICK) && (nId <= IMG_CUSTOMANIMATION_MEDIA_STOP), "sd::CustomAnimationList::getImage(), illegal index!" );
|
||||
DBG_ASSERT( (nId >= BMP_CUSTOMANIMATION_ON_CLICK) && (nId <= BMP_CUSTOMANIMATION_MEDIA_STOP), "sd::CustomAnimationList::getImage(), illegal index!" );
|
||||
|
||||
Image& rImage = maImages[nId - IMG_CUSTOMANIMATION_ON_CLICK];
|
||||
Image& rImage = maImages[nId - BMP_CUSTOMANIMATION_ON_CLICK];
|
||||
|
||||
// load on demand
|
||||
if( rImage.GetSizePixel().Width() == 0 )
|
||||
rImage = Image(SdResId( nId ) );
|
||||
rImage = Image(BitmapEx(SdResId(nId)));
|
||||
|
||||
return rImage;
|
||||
}
|
||||
|
@ -105,7 +105,7 @@ private:
|
||||
|
||||
MainSequencePtr mpMainSequence;
|
||||
|
||||
Image maImages[ IMG_CUSTOMANIMATION_MEDIA_STOP - IMG_CUSTOMANIMATION_ON_CLICK + 1];
|
||||
Image maImages[ BMP_CUSTOMANIMATION_MEDIA_STOP - BMP_CUSTOMANIMATION_ON_CLICK + 1];
|
||||
|
||||
css::uno::Reference< css::drawing::XShape > mxLastTargetShape;
|
||||
sal_Int32 mnLastGroupId;
|
||||
|
@ -845,28 +845,19 @@ Bitmap BMP_PRESENTATION_MINIMIZER
|
||||
File = "minimize_presi_80.png";
|
||||
};
|
||||
|
||||
Image IMG_EMBEDDED
|
||||
Bitmap BMP_EMBEDDED
|
||||
{
|
||||
ImageBitmap = Bitmap
|
||||
{
|
||||
File = "nv08.png" ;
|
||||
};
|
||||
File = "nv08.png" ;
|
||||
};
|
||||
|
||||
Image IMG_LINK
|
||||
Bitmap BMP_LINK
|
||||
{
|
||||
ImageBitmap = Bitmap
|
||||
{
|
||||
File = "nv09.png" ;
|
||||
};
|
||||
File = "nv09.png" ;
|
||||
};
|
||||
|
||||
Image IMG_HYPERLINK
|
||||
Bitmap BMP_HYPERLINK
|
||||
{
|
||||
ImageBitmap = Bitmap
|
||||
{
|
||||
File = "nv010.png" ;
|
||||
};
|
||||
File = "nv010.png" ;
|
||||
};
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
@ -619,11 +619,11 @@ sal_uInt16 SdNavigatorWin::GetDragTypeSdResId( NavigatorDragType eDT, bool bImag
|
||||
case NAVIGATOR_DRAGTYPE_NONE:
|
||||
return( bImage ? 0 : STR_NONE );
|
||||
case NAVIGATOR_DRAGTYPE_URL:
|
||||
return( bImage ? IMG_HYPERLINK : STR_DRAGTYPE_URL );
|
||||
return( bImage ? BMP_HYPERLINK : STR_DRAGTYPE_URL );
|
||||
case NAVIGATOR_DRAGTYPE_EMBEDDED:
|
||||
return( bImage ? IMG_EMBEDDED : STR_DRAGTYPE_EMBEDDED );
|
||||
return( bImage ? BMP_EMBEDDED : STR_DRAGTYPE_EMBEDDED );
|
||||
case NAVIGATOR_DRAGTYPE_LINK:
|
||||
return( bImage ? IMG_LINK : STR_DRAGTYPE_LINK );
|
||||
return( bImage ? BMP_LINK : STR_DRAGTYPE_LINK );
|
||||
default: OSL_FAIL( "No resource for DragType available!" );
|
||||
}
|
||||
return 0;
|
||||
@ -717,7 +717,7 @@ void SdNavigatorWin::KeyInput( const KeyEvent& rKEvt )
|
||||
void SdNavigatorWin::SetDragImage()
|
||||
{
|
||||
const sal_uInt16 nDragTypeId = maToolbox->GetItemId("dragmode");
|
||||
maToolbox->SetItemImage(nDragTypeId, Image(SdResId(GetDragTypeSdResId(meDragType, true))));
|
||||
maToolbox->SetItemImage(nDragTypeId, Image(BitmapEx(SdResId(GetDragTypeSdResId(meDragType, true)))));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -211,8 +211,8 @@
|
||||
#define BMP_STYLES_FAMILY_GRAPHICS RID_APP_START+397
|
||||
#define BMP_STYLES_FAMILY_PRESENTATIONS RID_APP_START+398
|
||||
|
||||
#define IMG_EMBEDDED RID_APP_START+399
|
||||
#define IMG_LINK RID_APP_START+400
|
||||
#define IMG_HYPERLINK RID_APP_START+401
|
||||
#define BMP_EMBEDDED RID_APP_START+399
|
||||
#define BMP_LINK RID_APP_START+400
|
||||
#define BMP_HYPERLINK RID_APP_START+401
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
Loading…
x
Reference in New Issue
Block a user