Kaydet (Commit) 079e5765 authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#982645 bMissingDefaultsToNormal is always true

Change-Id: Ica58be0b5512eb8f386e51ec6e84d0ec09c3027f
üst cc93bcf7
...@@ -334,15 +334,13 @@ PresenterBitmapContainer::BitmapDescriptor::BitmapDescriptor ( ...@@ -334,15 +334,13 @@ PresenterBitmapContainer::BitmapDescriptor::BitmapDescriptor (
} }
css::uno::Reference<css::rendering::XBitmap> css::uno::Reference<css::rendering::XBitmap>
PresenterBitmapContainer::BitmapDescriptor::GetNormalBitmap (void) const PresenterBitmapContainer::BitmapDescriptor::GetNormalBitmap() const
{ {
return mxNormalBitmap; return mxNormalBitmap;
} }
css::uno::Reference<css::rendering::XBitmap> css::uno::Reference<css::rendering::XBitmap>
PresenterBitmapContainer::BitmapDescriptor::GetBitmap ( PresenterBitmapContainer::BitmapDescriptor::GetBitmap(const Mode eMode) const
const Mode eMode,
const bool bMissingDefaultsToNormal) const
{ {
switch (eMode) switch (eMode)
{ {
...@@ -353,19 +351,19 @@ css::uno::Reference<css::rendering::XBitmap> ...@@ -353,19 +351,19 @@ css::uno::Reference<css::rendering::XBitmap>
case MouseOver: case MouseOver:
if (mxMouseOverBitmap.is()) if (mxMouseOverBitmap.is())
return mxMouseOverBitmap; return mxMouseOverBitmap;
else if (bMissingDefaultsToNormal) else
return mxNormalBitmap; return mxNormalBitmap;
case ButtonDown: case ButtonDown:
if (mxButtonDownBitmap.is()) if (mxButtonDownBitmap.is())
return mxButtonDownBitmap; return mxButtonDownBitmap;
else if (bMissingDefaultsToNormal) else
return mxNormalBitmap; return mxNormalBitmap;
case Disabled: case Disabled:
if (mxDisabledBitmap.is()) if (mxDisabledBitmap.is())
return mxDisabledBitmap; return mxDisabledBitmap;
else if (bMissingDefaultsToNormal) else
return mxNormalBitmap; return mxNormalBitmap;
case Mask: case Mask:
......
...@@ -53,10 +53,8 @@ public: ...@@ -53,10 +53,8 @@ public:
BitmapDescriptor (const ::boost::shared_ptr<BitmapDescriptor>& rpDefault); BitmapDescriptor (const ::boost::shared_ptr<BitmapDescriptor>& rpDefault);
enum Mode {Normal, MouseOver, ButtonDown, Disabled, Mask}; enum Mode {Normal, MouseOver, ButtonDown, Disabled, Mask};
css::uno::Reference<css::rendering::XBitmap> GetNormalBitmap (void) const; css::uno::Reference<css::rendering::XBitmap> GetNormalBitmap() const;
css::uno::Reference<css::rendering::XBitmap> GetBitmap ( css::uno::Reference<css::rendering::XBitmap> GetBitmap(const Mode eMode) const;
const Mode eMode,
const bool bMissingDefaultsToNormal = true) const;
void SetBitmap ( void SetBitmap (
const Mode eMode, const Mode eMode,
const css::uno::Reference<css::rendering::XBitmap>& rxBitmap); const css::uno::Reference<css::rendering::XBitmap>& rxBitmap);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment