summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRadu Ioan <ioan.radu.g@gmail.com>2014-12-11 23:45:38 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-12-12 20:22:15 +0000
commit3c77eba67b61b4f78f2c8ccec6c78622ee173b61 (patch)
tree2d369a54b91d7a7fed0bf9d51dc3c29e55a21620
parente570cd7a293ceee175949dcc9656cdf776ae3c37 (diff)
fdo#85486 - Clean up unnecessary enumerations from xenum.hxx
Removed XHatchStyle Change-Id: I89e7edadc4f408e5a50840aaa1a13965b8503afb Reviewed-on: https://gerrit.libreoffice.org/13442 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
-rw-r--r--cui/source/tabpages/tphatch.cxx8
-rw-r--r--include/svx/xenum.hxx1
-rw-r--r--include/svx/xhatch.hxx12
-rw-r--r--sd/source/ui/view/drviews9.cxx6
-rw-r--r--svx/source/sdr/primitive2d/sdrattributecreator.cxx8
-rw-r--r--svx/source/svdraw/svdfmtf.cxx8
-rw-r--r--svx/source/unodraw/XPropertyTable.cxx2
-rw-r--r--svx/source/xoutdev/xattr.cxx10
-rw-r--r--svx/source/xoutdev/xtabhtch.cxx12
9 files changed, 33 insertions, 34 deletions
diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx
index a08bcbf8db75..2f988e44a5f5 100644
--- a/cui/source/tabpages/tphatch.cxx
+++ b/cui/source/tabpages/tphatch.cxx
@@ -299,7 +299,7 @@ bool SvxHatchTabPage::FillItemSet( SfxItemSet* rSet )
else
{
pXHatch.reset(new XHatch( m_pLbLineColor->GetSelectEntryColor(),
- (XHatchStyle) m_pLbLineType->GetSelectEntryPos(),
+ (css::drawing::HatchStyle) m_pLbLineType->GetSelectEntryPos(),
GetCoreValue( *m_pMtrDistance, ePoolUnit ),
static_cast<long>(m_pMtrAngle->GetValue() * 10) ));
}
@@ -366,7 +366,7 @@ IMPL_LINK( SvxHatchTabPage, ModifiedHdl_Impl, void *, p )
}
XHatch aXHatch( m_pLbLineColor->GetSelectEntryColor(),
- (XHatchStyle) m_pLbLineType->GetSelectEntryPos(),
+ (css::drawing::HatchStyle) m_pLbLineType->GetSelectEntryPos(),
GetCoreValue( *m_pMtrDistance, ePoolUnit ),
static_cast<long>(m_pMtrAngle->GetValue() * 10) );
@@ -513,7 +513,7 @@ IMPL_LINK_NOARG(SvxHatchTabPage, ClickAddHdl_Impl)
if( !nError )
{
XHatch aXHatch( m_pLbLineColor->GetSelectEntryColor(),
- (XHatchStyle) m_pLbLineType->GetSelectEntryPos(),
+ (css::drawing::HatchStyle) m_pLbLineType->GetSelectEntryPos(),
GetCoreValue( *m_pMtrDistance, ePoolUnit ),
static_cast<long>(m_pMtrAngle->GetValue() * 10) );
XHatchEntry* pEntry = new XHatchEntry( aXHatch, aName );
@@ -583,7 +583,7 @@ IMPL_LINK_NOARG(SvxHatchTabPage, ClickModifyHdl_Impl)
{
bLoop = false;
XHatch aXHatch( m_pLbLineColor->GetSelectEntryColor(),
- (XHatchStyle) m_pLbLineType->GetSelectEntryPos(),
+ (css::drawing::HatchStyle) m_pLbLineType->GetSelectEntryPos(),
GetCoreValue( *m_pMtrDistance, ePoolUnit ),
static_cast<long>(m_pMtrAngle->GetValue() * 10) );
diff --git a/include/svx/xenum.hxx b/include/svx/xenum.hxx
index 52f7a4f59600..a849bc56df50 100644
--- a/include/svx/xenum.hxx
+++ b/include/svx/xenum.hxx
@@ -21,7 +21,6 @@
#define INCLUDED_SVX_XENUM_HXX
-enum XHatchStyle { XHATCH_SINGLE, XHATCH_DOUBLE, XHATCH_TRIPLE };
enum XFormTextStyle { XFT_ROTATE, XFT_UPRIGHT, XFT_SLANTX, XFT_SLANTY,
XFT_NONE };
enum XFormTextAdjust { XFT_LEFT, XFT_RIGHT, XFT_AUTOSIZE, XFT_CENTER };
diff --git a/include/svx/xhatch.hxx b/include/svx/xhatch.hxx
index 9dc725d84354..52010cd5f71f 100644
--- a/include/svx/xhatch.hxx
+++ b/include/svx/xhatch.hxx
@@ -20,9 +20,9 @@
#ifndef INCLUDED_SVX_XHATCH_HXX
#define INCLUDED_SVX_XHATCH_HXX
-#include <svx/xenum.hxx>
#include <tools/color.hxx>
#include <svx/svxdllapi.h>
+#include <com/sun/star/drawing/HatchStyle.hpp>
// class XHatch
@@ -31,24 +31,24 @@
class SVX_DLLPUBLIC XHatch
{
protected:
- XHatchStyle eStyle;
+ css::drawing::HatchStyle eStyle;
Color aColor;
long nDistance;
long nAngle;
public:
- XHatch() : eStyle(XHATCH_SINGLE), nDistance(0), nAngle(0) {}
- XHatch(const Color& rCol, XHatchStyle eStyle = XHATCH_SINGLE,
+ XHatch() : eStyle(css::drawing::HatchStyle_SINGLE), nDistance(0), nAngle(0) {}
+ XHatch(const Color& rCol, css::drawing::HatchStyle eStyle = css::drawing::HatchStyle_SINGLE,
long nDistance = 20, long nAngle = 0);
bool operator==(const XHatch& rHatch) const;
- void SetHatchStyle(XHatchStyle eNewStyle) { eStyle = eNewStyle; }
+ void SetHatchStyle(css::drawing::HatchStyle eNewStyle) { eStyle = eNewStyle; }
void SetColor(const Color& rColor) { aColor = rColor; }
void SetDistance(long nNewDistance) { nDistance = nNewDistance; }
void SetAngle(long nNewAngle) { nAngle = nNewAngle; }
- XHatchStyle GetHatchStyle() const { return eStyle; }
+ css::drawing::HatchStyle GetHatchStyle() const { return eStyle; }
Color GetColor() const { return aColor; }
long GetDistance() const { return nDistance; }
long GetAngle() const { return nAngle; }
diff --git a/sd/source/ui/view/drviews9.cxx b/sd/source/ui/view/drviews9.cxx
index 084f13cdb5c6..d224c328122f 100644
--- a/sd/source/ui/view/drviews9.cxx
+++ b/sd/source/ui/view/drviews9.cxx
@@ -567,7 +567,7 @@ void DrawViewShell::AttrExec (SfxRequest &rReq)
SFX_REQUEST_ARG (rReq, pDistance, SfxUInt32Item, ID_VAL_DISTANCE, false);
SFX_REQUEST_ARG (rReq, pAngle, SfxUInt32Item, ID_VAL_ANGLE, false);
- if (CHECK_RANGE (XHATCH_SINGLE, (sal_Int32)pStyle->GetValue (), XHATCH_TRIPLE) &&
+ if (CHECK_RANGE (css::drawing::HatchStyle_SINGLE, (sal_Int32)pStyle->GetValue (), css::drawing::HatchStyle_TRIPLE) &&
CHECK_RANGE (0, (sal_Int32)pAngle->GetValue (), 360))
{
pAttr->ClearItem (XATTR_FILLHATCH);
@@ -585,7 +585,7 @@ void DrawViewShell::AttrExec (SfxRequest &rReq)
{
XHatch aHatch(pEntry->GetHatch());
- aHatch.SetHatchStyle ((XHatchStyle) pStyle->GetValue ());
+ aHatch.SetHatchStyle ((css::drawing::HatchStyle) pStyle->GetValue ());
aHatch.SetDistance (pDistance->GetValue ());
aHatch.SetAngle (pAngle->GetValue () * 10);
@@ -598,7 +598,7 @@ void DrawViewShell::AttrExec (SfxRequest &rReq)
if (i >= nCounts)
{
Color aBlack (0, 0, 0);
- XHatch aHatch (aBlack, (XHatchStyle) pStyle->GetValue (), pDistance->GetValue (),
+ XHatch aHatch (aBlack, (css::drawing::HatchStyle) pStyle->GetValue (), pDistance->GetValue (),
pAngle->GetValue () * 10);
pHatchList->Insert (new XHatchEntry (aHatch, pName->GetValue ()));
diff --git a/svx/source/sdr/primitive2d/sdrattributecreator.cxx b/svx/source/sdr/primitive2d/sdrattributecreator.cxx
index 94db008d6b49..5b657c359368 100644
--- a/svx/source/sdr/primitive2d/sdrattributecreator.cxx
+++ b/svx/source/sdr/primitive2d/sdrattributecreator.cxx
@@ -113,21 +113,21 @@ namespace drawinglayer
}
}
- attribute::HatchStyle XHatchStyleToHatchStyle(XHatchStyle eStyle)
+ attribute::HatchStyle XHatchStyleToHatchStyle(css::drawing::HatchStyle eStyle)
{
switch(eStyle)
{
- case XHATCH_SINGLE :
+ case css::drawing::HatchStyle_SINGLE :
{
return attribute::HATCHSTYLE_SINGLE;
}
- case XHATCH_DOUBLE :
+ case css::drawing::HatchStyle_DOUBLE :
{
return attribute::HATCHSTYLE_DOUBLE;
}
default :
{
- return attribute::HATCHSTYLE_TRIPLE; // XHATCH_TRIPLE
+ return attribute::HATCHSTYLE_TRIPLE; // css::drawing::HatchStyle_TRIPLE
}
}
}
diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx
index 391364bdb045..b0991ab9a9ff 100644
--- a/svx/source/svdraw/svdfmtf.cxx
+++ b/svx/source/svdraw/svdfmtf.cxx
@@ -1139,25 +1139,25 @@ void ImpSdrGDIMetaFileImport::DoAction( MetaHatchAction& rAct )
SdrPathObj* pPath = new SdrPathObj(OBJ_POLY, aSource);
// #i125211# Use the ranges from the SdrObject to create a new empty SfxItemSet
SfxItemSet aHatchAttr(mpModel->GetItemPool(), pPath->GetMergedItemSet().GetRanges());
- XHatchStyle eStyle;
+ css::drawing::HatchStyle eStyle;
switch(rHatch.GetStyle())
{
case(HATCH_TRIPLE) :
{
- eStyle = XHATCH_TRIPLE;
+ eStyle = css::drawing::HatchStyle_TRIPLE;
break;
}
case(HATCH_DOUBLE) :
{
- eStyle = XHATCH_DOUBLE;
+ eStyle = css::drawing::HatchStyle_DOUBLE;
break;
}
default:
{
- eStyle = XHATCH_SINGLE;
+ eStyle = css::drawing::HatchStyle_SINGLE;
break;
}
}
diff --git a/svx/source/unodraw/XPropertyTable.cxx b/svx/source/unodraw/XPropertyTable.cxx
index 60df2af3014c..6697f7bbd24e 100644
--- a/svx/source/unodraw/XPropertyTable.cxx
+++ b/svx/source/unodraw/XPropertyTable.cxx
@@ -510,7 +510,7 @@ XPropertyEntry* SvxUnoXHatchTable::getEntry( const OUString& rName, const uno::A
return NULL;
XHatch aXHatch;
- aXHatch.SetHatchStyle( (XHatchStyle)aUnoHatch.Style );
+ aXHatch.SetHatchStyle( (css::drawing::HatchStyle)aUnoHatch.Style );
aXHatch.SetColor( aUnoHatch.Color );
aXHatch.SetDistance( aUnoHatch.Distance );
aXHatch.SetAngle( aUnoHatch.Angle );
diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx
index 87356be82617..06e44c472bc6 100644
--- a/svx/source/xoutdev/xattr.cxx
+++ b/svx/source/xoutdev/xattr.cxx
@@ -2824,7 +2824,7 @@ XFillFloatTransparenceItem* XFillFloatTransparenceItem::checkForUniqueItem( SdrM
return NULL;
}
-XHatch::XHatch(const Color& rCol, XHatchStyle eTheStyle, long nTheDistance,
+XHatch::XHatch(const Color& rCol, css::drawing::HatchStyle eTheStyle, long nTheDistance,
long nTheAngle) :
eStyle(eTheStyle),
aColor(rCol),
@@ -2868,7 +2868,7 @@ XFillHatchItem::XFillHatchItem(SvStream& rIn) :
sal_Int16 nITemp;
sal_Int32 nLTemp;
- rIn.ReadInt16( nITemp ); aHatch.SetHatchStyle((XHatchStyle)nITemp);
+ rIn.ReadInt16( nITemp ); aHatch.SetHatchStyle((css::drawing::HatchStyle)nITemp);
rIn.ReadUInt16( nRed );
rIn.ReadUInt16( nGreen );
rIn.ReadUInt16( nBlue );
@@ -3036,7 +3036,7 @@ bool XFillHatchItem::PutValue( const ::com::sun::star::uno::Any& rVal, sal_uInt8
SetName( aName );
if ( bHatch )
{
- aHatch.SetHatchStyle( (XHatchStyle)aUnoHatch.Style );
+ aHatch.SetHatchStyle( (css::drawing::HatchStyle)aUnoHatch.Style );
aHatch.SetColor( aUnoHatch.Color );
aHatch.SetDistance( aUnoHatch.Distance );
aHatch.SetAngle( aUnoHatch.Angle );
@@ -3054,7 +3054,7 @@ bool XFillHatchItem::PutValue( const ::com::sun::star::uno::Any& rVal, sal_uInt8
if(!(rVal >>= aUnoHatch))
return false;
- aHatch.SetHatchStyle( (XHatchStyle)aUnoHatch.Style );
+ aHatch.SetHatchStyle( (css::drawing::HatchStyle)aUnoHatch.Style );
aHatch.SetColor( aUnoHatch.Color );
aHatch.SetDistance( aUnoHatch.Distance );
aHatch.SetAngle( aUnoHatch.Angle );
@@ -3075,7 +3075,7 @@ bool XFillHatchItem::PutValue( const ::com::sun::star::uno::Any& rVal, sal_uInt8
sal_Int16 nVal = sal_Int16();
if (!(rVal >>= nVal ))
return false;
- aHatch.SetHatchStyle( (XHatchStyle)nVal );
+ aHatch.SetHatchStyle( (css::drawing::HatchStyle)nVal );
break;
}
diff --git a/svx/source/xoutdev/xtabhtch.cxx b/svx/source/xoutdev/xtabhtch.cxx
index 2f59801d37fd..ba73c5c7c8b4 100644
--- a/svx/source/xoutdev/xtabhtch.cxx
+++ b/svx/source/xoutdev/xtabhtch.cxx
@@ -71,11 +71,11 @@ bool XHatchList::Create()
aStr.append(" 1");
sal_Int32 nLen = aStr.getLength() - 1;
- Insert(new XHatchEntry(XHatch(RGB_Color(COL_BLACK),XHATCH_SINGLE,100, 0),aStr.toString()));
+ Insert(new XHatchEntry(XHatch(RGB_Color(COL_BLACK),css::drawing::HatchStyle_SINGLE,100, 0),aStr.toString()));
aStr[nLen] = '2';
- Insert(new XHatchEntry(XHatch(RGB_Color(COL_RED ),XHATCH_DOUBLE, 80,450),aStr.toString()));
+ Insert(new XHatchEntry(XHatch(RGB_Color(COL_RED ),css::drawing::HatchStyle_DOUBLE, 80,450),aStr.toString()));
aStr[nLen] = '3';
- Insert(new XHatchEntry(XHatch(RGB_Color(COL_BLUE ),XHATCH_TRIPLE,120, 0),aStr.toString()));
+ Insert(new XHatchEntry(XHatch(RGB_Color(COL_BLUE ),css::drawing::HatchStyle_TRIPLE,120, 0),aStr.toString()));
return true;
}
@@ -100,19 +100,19 @@ Bitmap XHatchList::CreateBitmapForUI( long nIndex )
switch(rHatch.GetHatchStyle())
{
- case XHATCH_SINGLE :
+ case css::drawing::HatchStyle_SINGLE :
{
aHatchStyle = drawinglayer::attribute::HATCHSTYLE_SINGLE;
break;
}
- case XHATCH_DOUBLE :
+ case css::drawing::HatchStyle_DOUBLE :
{
aHatchStyle = drawinglayer::attribute::HATCHSTYLE_DOUBLE;
break;
}
default :
{
- aHatchStyle = drawinglayer::attribute::HATCHSTYLE_TRIPLE; // XHATCH_TRIPLE
+ aHatchStyle = drawinglayer::attribute::HATCHSTYLE_TRIPLE; // css::drawing::HatchStyle_TRIPLE
break;
}
}