summaryrefslogtreecommitdiff
path: root/svx/source/xoutdev/xattr.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-08-19 09:31:35 +0100
committerCaolán McNamara <caolanm@redhat.com>2016-08-19 11:25:18 +0000
commit396138a6bc7192abe0837b419283860d3331f607 (patch)
treef80818ba86220abb8db205b402429e3d45aa62d1 /svx/source/xoutdev/xattr.cxx
parent8b4705e0e0c76503b1ca61cb567d222f49466fc5 (diff)
Resolves: coverity#705366 Mixing enum types
and coverity#705367 Mixing enum types coverity#705371 Mixing enum types coverity#982694 Mixing enum types coverity#1027717 Mixing enum types coverity#1371228 Mixing enum types coverity#1371242 Mixing enum types coverity#1371280 Mixing enum types coverity#1371310 Mixing enum types MapUnit and SfxMapUnit share the same values and are freely cast from one to the other. Now that commit d30a4298bdb5ba53cd1fe659f2b742f218a2e527 Date: Thu Aug 11 15:02:19 2016 +0200 loplugin:unusedenumconstants in package..svtools removed the SfxMapUnit entries that were directly unused, they don't match anymore and casting from one to the other is dangerous. Why there was two of these anyway escapes me, get rid of SfxMapUnit and just use MapUnit universally Change-Id: I4db5dcd04b59be2f85b62b728f96c90afe00c57e Reviewed-on: https://gerrit.libreoffice.org/28234 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 'svx/source/xoutdev/xattr.cxx')
-rw-r--r--svx/source/xoutdev/xattr.cxx65
1 files changed, 32 insertions, 33 deletions
diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx
index 8d1472d02845..b917ec23c331 100644
--- a/svx/source/xoutdev/xattr.cxx
+++ b/svx/source/xoutdev/xattr.cxx
@@ -380,8 +380,8 @@ SfxPoolItem* XLineStyleItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
bool XLineStyleItem::GetPresentation
(
SfxItemPresentation /*ePres*/,
- SfxMapUnit /*eCoreUnit*/,
- SfxMapUnit /*ePresUnit*/,
+ MapUnit /*eCoreUnit*/,
+ MapUnit /*ePresUnit*/,
OUString& rText, const IntlWrapper *
) const
{
@@ -721,8 +721,8 @@ SvStream& XLineDashItem::Store( SvStream& rOut, sal_uInt16 nItemVersion ) const
bool XLineDashItem::GetPresentation
(
SfxItemPresentation /*ePres*/,
- SfxMapUnit /*eCoreUnit*/,
- SfxMapUnit /*ePresUnit*/,
+ MapUnit /*eCoreUnit*/,
+ MapUnit /*ePresUnit*/,
OUString& rText, const IntlWrapper *
) const
{
@@ -1036,8 +1036,8 @@ SfxPoolItem* XLineWidthItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
bool XLineWidthItem::GetPresentation
(
SfxItemPresentation /*ePres*/,
- SfxMapUnit eCoreUnit,
- SfxMapUnit ePresUnit,
+ MapUnit eCoreUnit,
+ MapUnit ePresUnit,
OUString& rText, const IntlWrapper * pIntl
) const
{
@@ -1098,8 +1098,8 @@ SfxPoolItem* XLineColorItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
bool XLineColorItem::GetPresentation
(
SfxItemPresentation /*ePres*/,
- SfxMapUnit /*eCoreUnit*/,
- SfxMapUnit /*ePresUnit*/,
+ MapUnit /*eCoreUnit*/,
+ MapUnit /*ePresUnit*/,
OUString& rText, const IntlWrapper *
) const
{
@@ -1284,8 +1284,8 @@ SvStream& XLineStartItem::Store( SvStream& rOut, sal_uInt16 nItemVersion ) const
bool XLineStartItem::GetPresentation
(
SfxItemPresentation /*ePres*/,
- SfxMapUnit /*eCoreUnit*/,
- SfxMapUnit /*ePresUnit*/,
+ MapUnit /*eCoreUnit*/,
+ MapUnit /*ePresUnit*/,
OUString& rText, const IntlWrapper *
) const
{
@@ -1848,8 +1848,8 @@ XLineEndItem* XLineEndItem::checkForUniqueItem( SdrModel* pModel ) const
bool XLineEndItem::GetPresentation
(
SfxItemPresentation /*ePres*/,
- SfxMapUnit /*eCoreUnit*/,
- SfxMapUnit /*ePresUnit*/,
+ MapUnit /*eCoreUnit*/,
+ MapUnit /*ePresUnit*/,
OUString& rText, const IntlWrapper *
) const
{
@@ -1929,8 +1929,8 @@ SfxPoolItem* XLineStartWidthItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) con
bool XLineStartWidthItem::GetPresentation
(
SfxItemPresentation /*ePres*/,
- SfxMapUnit eCoreUnit,
- SfxMapUnit ePresUnit,
+ MapUnit eCoreUnit,
+ MapUnit ePresUnit,
OUString& rText, const IntlWrapper * pIntl
) const
{
@@ -1979,8 +1979,8 @@ SfxPoolItem* XLineEndWidthItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
bool XLineEndWidthItem::GetPresentation
(
SfxItemPresentation /*ePres*/,
- SfxMapUnit eCoreUnit,
- SfxMapUnit ePresUnit,
+ MapUnit eCoreUnit,
+ MapUnit ePresUnit,
OUString& rText, const IntlWrapper *pIntl
) const
{
@@ -2029,8 +2029,8 @@ SfxPoolItem* XLineStartCenterItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) co
bool XLineStartCenterItem::GetPresentation
(
SfxItemPresentation /*ePres*/,
- SfxMapUnit /*eCoreUnit*/,
- SfxMapUnit /*ePresUnit*/,
+ MapUnit /*eCoreUnit*/,
+ MapUnit /*ePresUnit*/,
OUString& rText, const IntlWrapper *
) const
{
@@ -2081,8 +2081,8 @@ SfxPoolItem* XLineEndCenterItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) cons
bool XLineEndCenterItem::GetPresentation
(
SfxItemPresentation /*ePres*/,
- SfxMapUnit /*eCoreUnit*/,
- SfxMapUnit /*ePresUnit*/,
+ MapUnit /*eCoreUnit*/,
+ MapUnit /*ePresUnit*/,
OUString& rText, const IntlWrapper *
) const
{
@@ -2136,8 +2136,8 @@ SfxPoolItem* XFillStyleItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
bool XFillStyleItem::GetPresentation
(
SfxItemPresentation /*ePres*/,
- SfxMapUnit /*eCoreUnit*/,
- SfxMapUnit /*ePresUnit*/,
+ MapUnit /*eCoreUnit*/,
+ MapUnit /*ePresUnit*/,
OUString& rText, const IntlWrapper *
) const
{
@@ -2207,7 +2207,7 @@ void XFillStyleItem::dumpAsXml(xmlTextWriterPtr pWriter) const
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("value"), BAD_CAST(OString::number(GetValue()).getStr()));
OUString aPresentation;
- GetPresentation(SFX_ITEM_PRESENTATION_NAMELESS, SFX_MAPUNIT_100TH_MM, SFX_MAPUNIT_100TH_MM, aPresentation);
+ GetPresentation(SFX_ITEM_PRESENTATION_NAMELESS, MAP_100TH_MM, MAP_100TH_MM, aPresentation);
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("presentation"), BAD_CAST(aPresentation.toUtf8().getStr()));
xmlTextWriterEndElement(pWriter);
@@ -2244,8 +2244,8 @@ SfxPoolItem* XFillColorItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
bool XFillColorItem::GetPresentation
(
SfxItemPresentation /*ePres*/,
- SfxMapUnit /*eCoreUnit*/,
- SfxMapUnit /*ePresUnit*/,
+ MapUnit /*eCoreUnit*/,
+ MapUnit /*ePresUnit*/,
OUString& rText, const IntlWrapper *
) const
{
@@ -2310,8 +2310,8 @@ sal_uInt16 XSecondaryFillColorItem::GetVersion( sal_uInt16 /*nFileFormatVersion*
bool XSecondaryFillColorItem::GetPresentation
(
SfxItemPresentation /*ePres*/,
- SfxMapUnit /*eCoreUnit*/,
- SfxMapUnit /*ePresUnit*/,
+ MapUnit /*eCoreUnit*/,
+ MapUnit /*ePresUnit*/,
OUString& rText, const IntlWrapper *
) const
{
@@ -2500,8 +2500,8 @@ sal_uInt16 XFillGradientItem::GetVersion( sal_uInt16 /*nFileFormatVersion*/) con
bool XFillGradientItem::GetPresentation
(
SfxItemPresentation /*ePres*/,
- SfxMapUnit /*eCoreUnit*/,
- SfxMapUnit /*ePresUnit*/,
+ MapUnit /*eCoreUnit*/,
+ MapUnit /*ePresUnit*/,
OUString& rText, const IntlWrapper *
) const
{
@@ -2811,7 +2811,7 @@ bool XFillFloatTransparenceItem::PutValue( const css::uno::Any& rVal, sal_uInt8
}
bool XFillFloatTransparenceItem::GetPresentation( SfxItemPresentation ePres,
- SfxMapUnit eCoreUnit, SfxMapUnit ePresUnit,
+ MapUnit eCoreUnit, MapUnit ePresUnit,
OUString& rText,
const IntlWrapper * pIntlWrapper ) const
{
@@ -2958,12 +2958,11 @@ SvStream& XFillHatchItem::Store( SvStream& rOut, sal_uInt16 nItemVersion ) const
return rOut;
}
-
bool XFillHatchItem::GetPresentation
(
SfxItemPresentation /*ePres*/,
- SfxMapUnit /*eCoreUnit*/,
- SfxMapUnit /*ePresUnit*/,
+ MapUnit /*eCoreUnit*/,
+ MapUnit /*ePresUnit*/,
OUString& rText, const IntlWrapper *
) const
{