summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZolnai Tamás <zolnaitamas2000@gmail.com>2015-03-08 14:00:26 +0100
committerZolnai Tamás <zolnaitamas2000@gmail.com>2015-03-11 07:04:59 +0100
commitd4a1e2a491cb50c8fee072458aa2c676c2f1a0fd (patch)
tree05115c111f7d3341adca675019dd59a19f2cd065
parentffe060e954d172f8603a4e9f625445e49132c7bf (diff)
Avoid casting SvxBrushItem:nShadingValue
Change-Id: Ida97950286bc69154d10cbc9b5ac699e7ad608ad
-rw-r--r--editeng/source/items/frmitems.cxx6
-rw-r--r--include/editeng/brushitem.hxx4
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx6
3 files changed, 8 insertions, 8 deletions
diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx
index 2c0adcc47017..0621746e2f78 100644
--- a/editeng/source/items/frmitems.cxx
+++ b/editeng/source/items/frmitems.cxx
@@ -3636,7 +3636,7 @@ bool SvxBrushItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
case MID_SHADING_VALUE:
{
- rVal <<= (sal_Int32)(nShadingValue);
+ rVal <<= nShadingValue;
}
break;
}
@@ -3753,7 +3753,7 @@ bool SvxBrushItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
case MID_SHADING_VALUE:
{
- sal_uInt32 nVal = 0;
+ sal_Int32 nVal = 0;
if (!(rVal >>= nVal))
return false;
@@ -4068,7 +4068,7 @@ void SvxBrushItem::SetGraphicFilter( const OUString& rNew )
maStrFilter = rNew;
}
-void SvxBrushItem::SetShadingValue( const sal_uInt32 nNew )
+void SvxBrushItem::SetShadingValue( const sal_Int32 nNew )
{
nShadingValue = nNew;
}
diff --git a/include/editeng/brushitem.hxx b/include/editeng/brushitem.hxx
index 9a7bb0f6bedd..fee7628e32f3 100644
--- a/include/editeng/brushitem.hxx
+++ b/include/editeng/brushitem.hxx
@@ -104,13 +104,13 @@ public:
void PurgeMedium() const;
- sal_uInt32 GetShadingValue() const { return nShadingValue; }
+ sal_Int32 GetShadingValue() const { return nShadingValue; }
const Graphic* GetGraphic(OUString const & referer = OUString()/*TODO*/) const;
const GraphicObject* GetGraphicObject(OUString const & referer = OUString()/*TODO*/) const;
OUString GetGraphicLink() const { return maStrLink; }
OUString GetGraphicFilter() const { return maStrFilter; }
- void SetShadingValue( const sal_uInt32 nNew );
+ void SetShadingValue( const sal_Int32 nNew );
//UUUU get graphic transparency in percent
sal_Int8 getGraphicTransparency() const;
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 6033c9af2774..f7af823524fb 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -3818,7 +3818,7 @@ void DocxAttributeOutput::OutputDefaultItem(const SfxPoolItem& rHt)
{
const SvxBrushItem& rBrushItem = static_cast< const SvxBrushItem& >(rHt);
bMustWrite = (rBrushItem.GetColor() != COL_AUTO ||
- rBrushItem.GetShadingValue() != sal_uInt32(ShadingPattern::CLEAR) ||
+ rBrushItem.GetShadingValue() != ShadingPattern::CLEAR ||
rBrushItem.GetGraphic() != NULL ||
rBrushItem.GetGraphicObject() != NULL);
}
@@ -3886,7 +3886,7 @@ void DocxAttributeOutput::OutputDefaultItem(const SfxPoolItem& rHt)
{
const SvxBrushItem& rBrushItem = static_cast< const SvxBrushItem& >(rHt);
bMustWrite = (rBrushItem.GetColor() != COL_AUTO ||
- rBrushItem.GetShadingValue() != sal_uInt32(ShadingPattern::CLEAR) ||
+ rBrushItem.GetShadingValue() != ShadingPattern::CLEAR ||
rBrushItem.GetGraphic() != NULL ||
rBrushItem.GetGraphicObject() != NULL);
}
@@ -6242,7 +6242,7 @@ void DocxAttributeOutput::CharAnimatedText( const SvxBlinkItem& rBlink )
void DocxAttributeOutput::CharBackground( const SvxBrushItem& rBrush )
{
// Check if the brush shading pattern is 'PCT15'. If so - write it back to the DOCX
- if (rBrush.GetShadingValue() == +ShadingPattern::PCT15)
+ if (rBrush.GetShadingValue() == ShadingPattern::PCT15)
{
m_pSerializer->singleElementNS( XML_w, XML_shd,
FSNS( XML_w, XML_val ), MSWORD_CH_SHADING_VAL,