include/svx/xdash.hxx | 22 ++++++++++----------- reportdesign/source/ui/report/ReportController.cxx | 1 sd/source/core/drawdoc4.cxx | 1 sfx2/source/dialog/styfitem.cxx | 15 ++++++-------- svx/source/xoutdev/xattr.cxx | 6 ++--- 5 files changed, 21 insertions(+), 24 deletions(-)
New commits: commit 86043a2f57a9f50cabe689dd5e9f8db0dbd16f80 Author: Matteo Casalin <matteo.casa...@yahoo.com> Date: Sun Nov 8 19:45:45 2015 +0100 Remove unused XDash variables Change-Id: Ibc40a0f8b422aebeeb1df5a6701dee4be134862b diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx index 6126c03..3235aa6 100644 --- a/reportdesign/source/ui/report/ReportController.cxx +++ b/reportdesign/source/ui/report/ReportController.cxx @@ -2403,7 +2403,6 @@ void OReportController::openPageDialog(const uno::Reference<report::XSection>& _ const Graphic aNullGraphic; const ::Color aNullLineCol(COL_DEFAULT_SHAPE_STROKE); // #i121448# Use defined default color const ::Color aNullFillCol(COL_DEFAULT_SHAPE_FILLING); // #i121448# Use defined default color - const XDash aNullDash; const XGradient aNullGrad(RGB_Color(COL_BLACK), RGB_Color(COL_WHITE)); const XHatch aNullHatch(aNullLineCol); diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx index a18ad19..0007165 100644 --- a/sd/source/core/drawdoc4.cxx +++ b/sd/source/core/drawdoc4.cxx @@ -552,7 +552,6 @@ void SdDrawDocument::CreateDefaultCellStyles() Color aNullCol(RGB_Color(COL_BLACK)); - XDash aNullDash; XGradient aNullGrad(aNullCol,RGB_Color(COL_WHITE)); aNullGrad.SetStartIntens( 100 ); aNullGrad.SetEndIntens( 100 ); commit a847127fc32c2c611a7c2cc281e1ce7b27bb7754 Author: Matteo Casalin <matteo.casa...@yahoo.com> Date: Sun Nov 8 19:41:42 2015 +0100 XDash: salu_uIntPtr to sal_uInt32 Unsigned integer was used tp be consistent with previous integral type, but both unsigned and signed integers are used by callers. Change-Id: I3f902e00fbff690a72a7ca0f1c818976d3d2bebe diff --git a/include/svx/xdash.hxx b/include/svx/xdash.hxx index 4b0ef84..f7e20e9 100644 --- a/include/svx/xdash.hxx +++ b/include/svx/xdash.hxx @@ -35,31 +35,31 @@ class SVX_DLLPUBLIC XDash protected: css::drawing::DashStyle eDash; sal_uInt16 nDots; - sal_uIntPtr nDotLen; + sal_uInt32 nDotLen; sal_uInt16 nDashes; - sal_uIntPtr nDashLen; - sal_uIntPtr nDistance; + sal_uInt32 nDashLen; + sal_uInt32 nDistance; public: 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); + sal_uInt16 nDots = 1, sal_uInt32 nDotLen = 20, + sal_uInt16 nDashes = 1, sal_uInt32 nDashLen = 20, sal_uInt32 nDistance = 20); bool operator==(const XDash& rDash) const; void SetDashStyle(css::drawing::DashStyle eNewStyle) { eDash = eNewStyle; } void SetDots(sal_uInt16 nNewDots) { nDots = nNewDots; } - void SetDotLen(sal_uIntPtr nNewDotLen) { nDotLen = nNewDotLen; } + void SetDotLen(sal_uInt32 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 SetDashLen(sal_uInt32 nNewDashLen) { nDashLen = nNewDashLen; } + void SetDistance(sal_uInt32 nNewDistance) { nDistance = nNewDistance; } css::drawing::DashStyle GetDashStyle() const { return eDash; } sal_uInt16 GetDots() const { return nDots; } - sal_uIntPtr GetDotLen() const { return nDotLen; } + sal_uInt32 GetDotLen() const { return nDotLen; } sal_uInt16 GetDashes() const { return nDashes; } - sal_uIntPtr GetDashLen() const { return nDashLen; } - sal_uIntPtr GetDistance() const { return nDistance; } + sal_uInt32 GetDashLen() const { return nDashLen; } + sal_uInt32 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/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx index 5d08e1e..4b5f51b 100644 --- a/svx/source/xoutdev/xattr.cxx +++ b/svx/source/xoutdev/xattr.cxx @@ -434,8 +434,8 @@ sal_uInt16 XLineStyleItem::GetValueCount() const return 3; } -XDash::XDash(css::drawing::DashStyle eTheDash, sal_uInt16 nTheDots, sal_uIntPtr nTheDotLen, - sal_uInt16 nTheDashes, sal_uIntPtr nTheDashLen, sal_uIntPtr nTheDistance) : +XDash::XDash(css::drawing::DashStyle eTheDash, sal_uInt16 nTheDots, sal_uInt32 nTheDotLen, + sal_uInt16 nTheDashes, sal_uInt32 nTheDashLen, sal_uInt32 nTheDistance) : eDash(eTheDash), nDots(nTheDots), nDotLen(nTheDotLen), @@ -968,7 +968,7 @@ bool XLineDashItem::PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) case MID_LINEDASH_DASHLEN: case MID_LINEDASH_DISTANCE: { - sal_Int32 nVal = 0; + sal_uInt32 nVal = 0; if(!(rVal >>= nVal)) return false; commit b905d3e9f261fd9dbe9fdbedacd302ee2898c24a Author: Matteo Casalin <matteo.casa...@yahoo.com> Date: Fri Nov 6 09:47:54 2015 +0100 sal_uIntPtr to sal_Int32 Change-Id: Ib21faeca4ca05bcb534c0418025c7f2607d21077 diff --git a/sfx2/source/dialog/styfitem.cxx b/sfx2/source/dialog/styfitem.cxx index bc3aeb6..d98a474 100644 --- a/sfx2/source/dialog/styfitem.cxx +++ b/sfx2/source/dialog/styfitem.cxx @@ -38,17 +38,16 @@ SfxStyleFamilyItem::SfxStyleFamilyItem( const ResId &rResId ) : Resource( rResId.SetRT( RSC_SFX_STYLE_FAMILY_ITEM ) ) { - sal_uIntPtr nMask = ReadLongRes(); + const sal_Int32 nMask = ReadLongRes(); if(nMask & RSC_SFX_STYLE_ITEM_LIST) { - sal_uIntPtr nCount = ReadLongRes(); - for( sal_uIntPtr i = 0; i < nCount; i++ ) + const sal_Int32 nCount = ReadLongRes(); + for( sal_Int32 i = 0; i < nCount; ++i ) { SfxFilterTupel *pTupel = new SfxFilterTupel; pTupel->aName = ReadStringRes(); - long lFlags = ReadLongRes(); - pTupel->nFlags = (sal_uInt16)lFlags; + pTupel->nFlags = static_cast<sal_uInt16>(ReadLongRes()); aFilterList.push_back( pTupel ); } } @@ -67,7 +66,7 @@ SfxStyleFamilyItem::SfxStyleFamilyItem( const ResId &rResId ) : } if(nMask & RSC_SFX_STYLE_ITEM_STYLEFAMILY) { - nFamily = (sal_uInt16)ReadLongRes(); + nFamily = static_cast<sal_uInt16>(ReadLongRes()); } else nFamily = SFX_STYLE_FAMILY_PARA; @@ -98,8 +97,8 @@ SfxStyleFamilyItem::~SfxStyleFamilyItem() SfxStyleFamilies::SfxStyleFamilies( const ResId& rResId ) : Resource( rResId.SetRT( RSC_SFX_STYLE_FAMILIES ).SetAutoRelease( false ) ) { - sal_uIntPtr nCount = ReadLongRes(); - for( sal_uIntPtr i = 0; i < nCount; i++ ) + const sal_Int32 nCount = ReadLongRes(); + for( sal_Int32 i = 0; i < nCount; ++i ) { const ResId aResId(static_cast<RSHEADER_TYPE *>(GetClassRes()), *rResId.GetResMgr()); SfxStyleFamilyItem *pItem = new SfxStyleFamilyItem(aResId); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits