cui/source/tabpages/tpline.cxx | 2 - cui/source/tabpages/tplnedef.cxx | 14 +++++----- filter/source/msfilter/msdffimp.cxx | 2 - include/svx/xdash.hxx | 39 +++++++++++++++--------------- include/svx/xenum.hxx | 3 -- sc/source/filter/excel/xiescher.cxx | 8 +++--- sd/source/ui/animations/motionpathtag.cxx | 2 - sd/source/ui/view/drviews9.cxx | 4 +-- svx/source/svdraw/svdfmtf.cxx | 8 +++--- svx/source/unodraw/XPropertyTable.cxx | 2 - svx/source/xoutdev/xattr.cxx | 12 ++++----- svx/source/xoutdev/xtabdash.cxx | 6 ++-- sw/source/filter/ww8/ww8graf.cxx | 2 - 13 files changed, 52 insertions(+), 52 deletions(-)
New commits: commit 09b1c24dc971323e4b9bb4bd80517e1480cc7069 Author: Radu Ioan <ioan.rad...@gmail.com> Date: Sat Nov 29 12:50:37 2014 +0200 fdo#85486 - Clean up unnecessary enumerations from xenum.hxx Removed XDashStyle Change-Id: Id14802a007a90508ee033e1dc964c57d3d5ef582 Reviewed-on: https://gerrit.libreoffice.org/13213 Reviewed-by: Miklos Vajna <vmik...@collabora.co.uk> Tested-by: Miklos Vajna <vmik...@collabora.co.uk> diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx index 5bf1028..7d1fd99 100644 --- a/cui/source/tabpages/tpline.cxx +++ b/cui/source/tabpages/tpline.cxx @@ -102,7 +102,7 @@ SvxLineTabPage::SvxLineTabPage pXPool ( static_cast<XOutdevItemPool*>(rInAttrs.GetPool()) ), aXLStyle ( drawing::LineStyle_DASH ), aXWidth ( 1 ), - aXDash ( OUString(), XDash( XDASH_RECT, 3, 7, 2, 40, 15 ) ), + aXDash ( OUString(), XDash( css::drawing::DashStyle_RECT, 3, 7, 2, 40, 15 ) ), aXColor ( OUString(), COL_LIGHTRED ), aXLineAttr ( pXPool ), rXLSet ( aXLineAttr.GetItemSet() ), diff --git a/cui/source/tabpages/tplnedef.cxx b/cui/source/tabpages/tplnedef.cxx index c31c811..3b45fd90 100644 --- a/cui/source/tabpages/tplnedef.cxx +++ b/cui/source/tabpages/tplnedef.cxx @@ -65,7 +65,7 @@ SvxLineDefTabPage::SvxLineDefTabPage pXPool ( static_cast<XOutdevItemPool*>(rInAttrs.GetPool()) ), aXLStyle ( drawing::LineStyle_DASH ), aXWidth ( XOUT_WIDTH ), - aXDash ( OUString(), XDash( XDASH_RECT, 3, 7, 2, 40, 15 ) ), + aXDash ( OUString(), XDash( css::drawing::DashStyle_RECT, 3, 7, 2, 40, 15 ) ), aXColor ( OUString(), COL_BLACK ), aXLineAttr ( pXPool ), rXLSet ( aXLineAttr.GetItemSet() ), @@ -209,7 +209,7 @@ int SvxLineDefTabPage::DeactivatePage( SfxItemSet* _pSet ) void SvxLineDefTabPage::CheckChanges_Impl() { // is here used to NOT lose changes - //XDashStyle eXDS; + //css::drawing::DashStyle eXDS; if( m_pNumFldNumber1->IsValueChangedFromSaved() || m_pMtrLength1->IsValueChangedFromSaved() || @@ -844,12 +844,12 @@ IMPL_LINK_NOARG(SvxLineDefTabPage, ClickSaveHdl_Impl) void SvxLineDefTabPage::FillDash_Impl() { - XDashStyle eXDS; + css::drawing::DashStyle eXDS; if( m_pCbxSynchronize->IsChecked() ) - eXDS = XDASH_RECTRELATIVE; + eXDS = css::drawing::DashStyle_RECTRELATIVE; else - eXDS = XDASH_RECT; + eXDS = css::drawing::DashStyle_RECT; aDash.SetDashStyle( eXDS ); aDash.SetDots( (sal_uInt8) m_pNumFldNumber1->GetValue() ); @@ -868,8 +868,8 @@ void SvxLineDefTabPage::FillDash_Impl() void SvxLineDefTabPage::FillDialog_Impl() { - XDashStyle eXDS = aDash.GetDashStyle(); // XDASH_RECT, XDASH_ROUND - if( eXDS == XDASH_RECTRELATIVE ) + css::drawing::DashStyle eXDS = aDash.GetDashStyle(); // css::drawing::DashStyle_RECT, css::drawing::DashStyle_ROUND + if( eXDS == css::drawing::DashStyle_RECTRELATIVE ) m_pCbxSynchronize->Check(); else m_pCbxSynchronize->Check( false ); diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index 22eda40..f62cc97 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -925,7 +925,7 @@ void DffPropertyReader::ApplyLineAttributes( SfxItemSet& rSet, const MSO_SPT eSh rSet.Put(XLineStyleItem( drawing::LineStyle_SOLID ) ); else { - XDashStyle eDash = XDASH_RECT; + css::drawing::DashStyle eDash = css::drawing::DashStyle_RECT; sal_uInt16 nDots = 1; sal_uInt32 nDotLen = nLineWidth / 360; sal_uInt16 nDashes = 0; diff --git a/include/svx/xdash.hxx b/include/svx/xdash.hxx index 837f64a..4b0ef84 100644 --- a/include/svx/xdash.hxx +++ b/include/svx/xdash.hxx @@ -26,39 +26,40 @@ #include <svx/xenum.hxx> #include <svx/svxdllapi.h> +#include <com/sun/star/drawing/DashStyle.hpp> #include <vector> class SVX_DLLPUBLIC XDash { protected: - XDashStyle eDash; - sal_uInt16 nDots; - sal_uIntPtr nDotLen; - sal_uInt16 nDashes; - sal_uIntPtr nDashLen; - sal_uIntPtr nDistance; + css::drawing::DashStyle eDash; + sal_uInt16 nDots; + sal_uIntPtr nDotLen; + sal_uInt16 nDashes; + sal_uIntPtr nDashLen; + sal_uIntPtr nDistance; public: - XDash(XDashStyle eDash = XDASH_RECT, + XDash(css::drawing::DashStyle eDash = css::drawing::DashStyle_RECT, sal_uInt16 nDots = 1, sal_uIntPtr nDotLen = 20, sal_uInt16 nDashes = 1, sal_uIntPtr nDashLen = 20, sal_uIntPtr nDistance = 20); bool operator==(const XDash& rDash) const; - void SetDashStyle(XDashStyle eNewStyle) { eDash = eNewStyle; } - void SetDots(sal_uInt16 nNewDots) { nDots = nNewDots; } - void SetDotLen(sal_uIntPtr nNewDotLen) { nDotLen = nNewDotLen; } - void SetDashes(sal_uInt16 nNewDashes) { nDashes = nNewDashes; } - void SetDashLen(sal_uIntPtr nNewDashLen) { nDashLen = nNewDashLen; } - void SetDistance(sal_uIntPtr nNewDistance) { nDistance = nNewDistance; } + void SetDashStyle(css::drawing::DashStyle eNewStyle) { eDash = eNewStyle; } + void SetDots(sal_uInt16 nNewDots) { nDots = nNewDots; } + void SetDotLen(sal_uIntPtr nNewDotLen) { nDotLen = nNewDotLen; } + void SetDashes(sal_uInt16 nNewDashes) { nDashes = nNewDashes; } + void SetDashLen(sal_uIntPtr nNewDashLen) { nDashLen = nNewDashLen; } + void SetDistance(sal_uIntPtr nNewDistance) { nDistance = nNewDistance; } - XDashStyle GetDashStyle() const { return eDash; } - sal_uInt16 GetDots() const { return nDots; } - sal_uIntPtr GetDotLen() const { return nDotLen; } - sal_uInt16 GetDashes() const { return nDashes; } - sal_uIntPtr GetDashLen() const { return nDashLen; } - sal_uIntPtr GetDistance() const { return nDistance; } + css::drawing::DashStyle GetDashStyle() const { return eDash; } + sal_uInt16 GetDots() const { return nDots; } + sal_uIntPtr GetDotLen() const { return nDotLen; } + sal_uInt16 GetDashes() const { return nDashes; } + sal_uIntPtr GetDashLen() const { return nDashLen; } + sal_uIntPtr GetDistance() const { return nDistance; } // XDash is translated into an array of doubles which describe the lengths of the // dashes, dots and empty passages. It returns the complete length of the full DashDot diff --git a/include/svx/xenum.hxx b/include/svx/xenum.hxx index 6becd2a..df659f9 100644 --- a/include/svx/xenum.hxx +++ b/include/svx/xenum.hxx @@ -20,8 +20,7 @@ #ifndef INCLUDED_SVX_XENUM_HXX #define INCLUDED_SVX_XENUM_HXX -enum XDashStyle { XDASH_RECT, XDASH_ROUND, XDASH_RECTRELATIVE, - XDASH_ROUNDRELATIVE }; + enum XGradientStyle { XGRAD_LINEAR, XGRAD_AXIAL, XGRAD_RADIAL, XGRAD_ELLIPTICAL, XGRAD_SQUARE, XGRAD_RECT }; enum XHatchStyle { XHATCH_SINGLE, XHATCH_DOUBLE, XHATCH_TRIPLE }; diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx index 3da59ae..276782c 100644 --- a/sc/source/filter/excel/xiescher.cxx +++ b/sc/source/filter/excel/xiescher.cxx @@ -630,19 +630,19 @@ void XclImpDrawObjBase::ConvertLineStyle( SdrObject& rSdrObj, const XclObjLineDa break; case EXC_OBJ_LINE_DASH: rSdrObj.SetMergedItem( XLineStyleItem( drawing::LineStyle_DASH ) ); - rSdrObj.SetMergedItem( XLineDashItem( EMPTY_OUSTRING, XDash( XDASH_RECT, 0, nDotLen, 1, nDashLen, nDist ) ) ); + rSdrObj.SetMergedItem( XLineDashItem( EMPTY_OUSTRING, XDash( css::drawing::DashStyle_RECT, 0, nDotLen, 1, nDashLen, nDist ) ) ); break; case EXC_OBJ_LINE_DOT: rSdrObj.SetMergedItem( XLineStyleItem( drawing::LineStyle_DASH ) ); - rSdrObj.SetMergedItem( XLineDashItem( EMPTY_OUSTRING, XDash( XDASH_RECT, 1, nDotLen, 0, nDashLen, nDist ) ) ); + rSdrObj.SetMergedItem( XLineDashItem( EMPTY_OUSTRING, XDash( css::drawing::DashStyle_RECT, 1, nDotLen, 0, nDashLen, nDist ) ) ); break; case EXC_OBJ_LINE_DASHDOT: rSdrObj.SetMergedItem( XLineStyleItem( drawing::LineStyle_DASH ) ); - rSdrObj.SetMergedItem( XLineDashItem( EMPTY_OUSTRING, XDash( XDASH_RECT, 1, nDotLen, 1, nDashLen, nDist ) ) ); + rSdrObj.SetMergedItem( XLineDashItem( EMPTY_OUSTRING, XDash( css::drawing::DashStyle_RECT, 1, nDotLen, 1, nDashLen, nDist ) ) ); break; case EXC_OBJ_LINE_DASHDOTDOT: rSdrObj.SetMergedItem( XLineStyleItem( drawing::LineStyle_DASH ) ); - rSdrObj.SetMergedItem( XLineDashItem( EMPTY_OUSTRING, XDash( XDASH_RECT, 2, nDotLen, 1, nDashLen, nDist ) ) ); + rSdrObj.SetMergedItem( XLineDashItem( EMPTY_OUSTRING, XDash( css::drawing::DashStyle_RECT, 2, nDotLen, 1, nDashLen, nDist ) ) ); break; case EXC_OBJ_LINE_MEDTRANS: rSdrObj.SetMergedItem( XLineStyleItem( drawing::LineStyle_SOLID ) ); diff --git a/sd/source/ui/animations/motionpathtag.cxx b/sd/source/ui/animations/motionpathtag.cxx index b3b2591..1b7014c 100644 --- a/sd/source/ui/animations/motionpathtag.cxx +++ b/sd/source/ui/animations/motionpathtag.cxx @@ -356,7 +356,7 @@ MotionPathTag::MotionPathTag( CustomAnimationPane& rPane, ::sd::View& rView, con mpPathObj->SetObjList( pPage ); } - XDash aDash( XDASH_RECT, 1, 80, 1, 80, 80); + XDash aDash( css::drawing::DashStyle_RECT, 1, 80, 1, 80, 80); OUString aEmpty( "?" ); mpPathObj->SetMergedItem( XLineDashItem( aEmpty, aDash ) ); mpPathObj->SetMergedItem( XLineStyleItem( drawing::LineStyle_DASH ) ); diff --git a/sd/source/ui/view/drviews9.cxx b/sd/source/ui/view/drviews9.cxx index f7308c0..943448f 100644 --- a/sd/source/ui/view/drviews9.cxx +++ b/sd/source/ui/view/drviews9.cxx @@ -443,9 +443,9 @@ void DrawViewShell::AttrExec (SfxRequest &rReq) SFX_REQUEST_ARG (rReq, pDashLen, SfxUInt32Item, ID_VAL_DASHLEN, false); SFX_REQUEST_ARG (rReq, pDistance, SfxUInt32Item, ID_VAL_DISTANCE, false); - if (CHECK_RANGE (XDASH_RECT, (sal_Int32)pStyle->GetValue (), XDASH_ROUNDRELATIVE)) + if (CHECK_RANGE (css::drawing::DashStyle_RECT, (sal_Int32)pStyle->GetValue (), css::drawing::DashStyle_ROUNDRELATIVE)) { - XDash aNewDash ((XDashStyle) pStyle->GetValue (), (short) pDots->GetValue (), pDotLen->GetValue (), + XDash aNewDash ((css::drawing::DashStyle) pStyle->GetValue (), (short) pDots->GetValue (), pDotLen->GetValue (), (short) pDashes->GetValue (), pDashLen->GetValue (), pDistance->GetValue ()); pAttr->ClearItem (XATTR_LINEDASH); diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx index a714f9d..f92df8c 100644 --- a/svx/source/svdraw/svdfmtf.cxx +++ b/svx/source/svdraw/svdfmtf.cxx @@ -90,7 +90,7 @@ ImpSdrGDIMetaFileImport::ImpSdrGDIMetaFileImport( mnLineWidth(0), maLineJoin(basegfx::B2DLINEJOIN_NONE), maLineCap(com::sun::star::drawing::LineCap_BUTT), - maDash(XDASH_RECT, 0, 0, 0, 0, 0), + maDash(css::drawing::DashStyle_RECT, 0, 0, 0, 0, 0), mbMov(false), mbSize(false), maOfs(0, 0), @@ -380,7 +380,7 @@ void ImpSdrGDIMetaFileImport::SetAttributes(SdrObject* pObj, bool bForceTextAttr } else { - mpLineAttr->Put(XLineDashItem(OUString(), XDash(XDASH_RECT))); + mpLineAttr->Put(XLineDashItem(OUString(), XDash(css::drawing::DashStyle_RECT))); } } else @@ -708,7 +708,7 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaLineAction& rAct) mnLineWidth = nNewLineWidth; maLineJoin = rLineInfo.GetLineJoin(); maLineCap = rLineInfo.GetLineCap(); - maDash = XDash(XDASH_RECT, + maDash = XDash(css::drawing::DashStyle_RECT, rLineInfo.GetDotCount(), rLineInfo.GetDotLen(), rLineInfo.GetDashCount(), rLineInfo.GetDashLen(), rLineInfo.GetDistance()); @@ -934,7 +934,7 @@ void ImpSdrGDIMetaFileImport::DoAction( MetaPolyLineAction& rAct ) mnLineWidth = nNewLineWidth; maLineJoin = rLineInfo.GetLineJoin(); maLineCap = rLineInfo.GetLineCap(); - maDash = XDash(XDASH_RECT, + maDash = XDash(css::drawing::DashStyle_RECT, rLineInfo.GetDotCount(), rLineInfo.GetDotLen(), rLineInfo.GetDashCount(), rLineInfo.GetDashLen(), rLineInfo.GetDistance()); diff --git a/svx/source/unodraw/XPropertyTable.cxx b/svx/source/unodraw/XPropertyTable.cxx index 417e473..b6df02f 100644 --- a/svx/source/unodraw/XPropertyTable.cxx +++ b/svx/source/unodraw/XPropertyTable.cxx @@ -432,7 +432,7 @@ XPropertyEntry* SvxUnoXDashTable::getEntry( const OUString& rName, const uno::An XDash aXDash; - aXDash.SetDashStyle((XDashStyle)((sal_uInt16)(aLineDash.Style))); + aXDash.SetDashStyle((css::drawing::DashStyle)((sal_uInt16)(aLineDash.Style))); aXDash.SetDots(aLineDash.Dots); aXDash.SetDotLen(aLineDash.DotLen); aXDash.SetDashes(aLineDash.Dashes); diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx index fcfc46a..803178d 100644 --- a/svx/source/xoutdev/xattr.cxx +++ b/svx/source/xoutdev/xattr.cxx @@ -425,7 +425,7 @@ sal_uInt16 XLineStyleItem::GetValueCount() const return 3; } -XDash::XDash(XDashStyle eTheDash, sal_uInt16 nTheDots, sal_uIntPtr nTheDotLen, +XDash::XDash(css::drawing::DashStyle eTheDash, sal_uInt16 nTheDots, sal_uIntPtr nTheDotLen, sal_uInt16 nTheDashes, sal_uIntPtr nTheDashLen, sal_uIntPtr nTheDistance) : eDash(eTheDash), nDots(nTheDots), @@ -462,7 +462,7 @@ double XDash::CreateDotDashArray(::std::vector< double >& rDotDashArray, double double fSingleDashLen = (double)GetDashLen(); double fSingleDotLen = (double)GetDotLen(); - if(GetDashStyle() == XDASH_RECTRELATIVE || GetDashStyle() == XDASH_ROUNDRELATIVE) + if(GetDashStyle() == css::drawing::DashStyle_RECTRELATIVE || GetDashStyle() == css::drawing::DashStyle_ROUNDRELATIVE) { if(fLineWidth != 0.0) { @@ -662,7 +662,7 @@ XLineDashItem::XLineDashItem(SvStream& rIn) : sal_uInt32 nLTemp; sal_Int32 nITemp; - rIn.ReadInt32( nITemp ); aDash.SetDashStyle((XDashStyle)nITemp); + rIn.ReadInt32( nITemp ); aDash.SetDashStyle((css::drawing::DashStyle)nITemp); rIn.ReadUInt16( nSTemp ); aDash.SetDots(nSTemp); rIn.ReadUInt32( nLTemp ); aDash.SetDotLen(nLTemp); rIn.ReadUInt16( nSTemp ); aDash.SetDashes(nSTemp); @@ -868,7 +868,7 @@ bool XLineDashItem::PutValue( const ::com::sun::star::uno::Any& rVal, sal_uInt8 { XDash aXDash; - aXDash.SetDashStyle((XDashStyle)((sal_uInt16)(aLineDash.Style))); + aXDash.SetDashStyle((css::drawing::DashStyle)((sal_uInt16)(aLineDash.Style))); aXDash.SetDots(aLineDash.Dots); aXDash.SetDotLen(aLineDash.DotLen); aXDash.SetDashes(aLineDash.Dashes); @@ -904,7 +904,7 @@ bool XLineDashItem::PutValue( const ::com::sun::star::uno::Any& rVal, sal_uInt8 XDash aXDash; - aXDash.SetDashStyle((XDashStyle)((sal_uInt16)(aLineDash.Style))); + aXDash.SetDashStyle((css::drawing::DashStyle)((sal_uInt16)(aLineDash.Style))); aXDash.SetDots(aLineDash.Dots); aXDash.SetDotLen(aLineDash.DotLen); aXDash.SetDashes(aLineDash.Dashes); @@ -925,7 +925,7 @@ bool XLineDashItem::PutValue( const ::com::sun::star::uno::Any& rVal, sal_uInt8 return false; XDash aXDash = GetDashValue(); - aXDash.SetDashStyle((XDashStyle)((sal_uInt16)(nVal))); + aXDash.SetDashStyle((css::drawing::DashStyle)((sal_uInt16)(nVal))); if((0 == aXDash.GetDots()) && (0 == aXDash.GetDashes())) aXDash.SetDots(1); diff --git a/svx/source/xoutdev/xtabdash.cxx b/svx/source/xoutdev/xtabdash.cxx index 47dacc2..129490a 100644 --- a/svx/source/xoutdev/xtabdash.cxx +++ b/svx/source/xoutdev/xtabdash.cxx @@ -72,9 +72,9 @@ bool XDashList::Create() { const OUString aStr(SVX_RESSTR(RID_SVXSTR_LINESTYLE)); - Insert(new XDashEntry(XDash(XDASH_RECT,1, 50,1, 50, 50),aStr + " 1")); - Insert(new XDashEntry(XDash(XDASH_RECT,1,500,1,500,500),aStr + " 2")); - Insert(new XDashEntry(XDash(XDASH_RECT,2, 50,3,250,120),aStr + " 3")); + Insert(new XDashEntry(XDash(css::drawing::DashStyle_RECT,1, 50,1, 50, 50),aStr + " 1")); + Insert(new XDashEntry(XDash(css::drawing::DashStyle_RECT,1,500,1,500,500),aStr + " 2")); + Insert(new XDashEntry(XDash(css::drawing::DashStyle_RECT,2, 50,3,250,120),aStr + " 3")); return true; } diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx index 82ed68c..ae4a618 100644 --- a/sw/source/filter/ww8/ww8graf.cxx +++ b/sw/source/filter/ww8/ww8graf.cxx @@ -215,7 +215,7 @@ static void SetStdAttr( SfxItemSet& rSet, WW8_DP_LINETYPE& rL, && SVBT16ToShort(rL.lnps ) <= 4 ){ // line style rSet.Put( XLineStyleItem( drawing::LineStyle_DASH ) ); sal_Int16 nLen = SVBT16ToShort( rL.lnpw ); - XDash aD( XDASH_RECT, 1, 2 * nLen, 1, 5 * nLen, 5 * nLen ); + XDash aD( css::drawing::DashStyle_RECT, 1, 2 * nLen, 1, 5 * nLen, 5 * nLen ); switch( SVBT16ToShort( rL.lnps ) ){ case 1: aD.SetDots( 0 ); // Dash aD.SetDashLen( 6 * nLen ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits