summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Beck <thomas.beck@cib.de>2017-03-28 12:34:19 +0200
committerMichael Stahl <mstahl@redhat.com>2017-03-28 11:31:30 +0000
commit659cb8466495a15a680f684ec4aa1f1d3c4225cc (patch)
tree91045cff0003cd31a62f16a5b7f1ddb52011b278
parenta70ae479fe30db77354159d614dcacc87e4142c4 (diff)
tdf#96505 Get rid of cargo cult "long" integer literals
Removed "long" integer literals where applicable in some files of xmloff module Change-Id: I96f44c00583a95f8a0ae6acf25f439936433ac08 Reviewed-on: https://gerrit.libreoffice.org/35798 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r--xmloff/source/draw/ximppage.cxx2
-rw-r--r--xmloff/source/draw/ximpshap.cxx24
-rw-r--r--xmloff/source/draw/ximpstyl.cxx26
-rw-r--r--xmloff/source/style/xmlexppr.cxx2
-rw-r--r--xmloff/source/style/xmlnumi.cxx16
5 files changed, 35 insertions, 35 deletions
diff --git a/xmloff/source/draw/ximppage.cxx b/xmloff/source/draw/ximppage.cxx
index 6b37ecf5da98..dcc94e696e11 100644
--- a/xmloff/source/draw/ximppage.cxx
+++ b/xmloff/source/draw/ximppage.cxx
@@ -460,7 +460,7 @@ void SdXMLGenericPageContext::DeleteAllShapes()
while(mxShapes->getCount())
{
Reference< drawing::XShape > xShape;
- uno::Any aAny(mxShapes->getByIndex(0L));
+ uno::Any aAny(mxShapes->getByIndex(0));
aAny >>= xShape;
diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx
index 0eb5f9b38e8b..8f7196801da5 100644
--- a/xmloff/source/draw/ximpshap.cxx
+++ b/xmloff/source/draw/ximpshap.cxx
@@ -933,7 +933,7 @@ SdXMLRectShapeContext::SdXMLRectShapeContext(
uno::Reference< drawing::XShapes >& rShapes,
bool bTemporaryShape)
: SdXMLShapeContext( rImport, nPrfx, rLocalName, xAttrList, rShapes, bTemporaryShape ),
- mnRadius( 0L )
+ mnRadius( 0 )
{
}
@@ -998,10 +998,10 @@ SdXMLLineShapeContext::SdXMLLineShapeContext(
uno::Reference< drawing::XShapes >& rShapes,
bool bTemporaryShape)
: SdXMLShapeContext( rImport, nPrfx, rLocalName, xAttrList, rShapes, bTemporaryShape ),
- mnX1( 0L ),
- mnY1( 0L ),
- mnX2( 1L ),
- mnY2( 1L )
+ mnX1( 0 ),
+ mnY1( 0 ),
+ mnX2( 1 ),
+ mnY2( 1 )
{
}
@@ -1077,9 +1077,9 @@ void SdXMLLineShapeContext::StartElement(const uno::Reference< xml::sax::XAttrib
uno::Reference< beans::XPropertySet > xPropSet(mxShape, uno::UNO_QUERY);
if(xPropSet.is())
{
- drawing::PointSequenceSequence aPolyPoly(1L);
+ drawing::PointSequenceSequence aPolyPoly(1);
drawing::PointSequence* pOuterSequence = aPolyPoly.getArray();
- pOuterSequence->realloc(2L);
+ pOuterSequence->realloc(2);
awt::Point* pInnerSequence = pOuterSequence->getArray();
*pInnerSequence = awt::Point( mnX1 - aTopLeft.X, mnY1 - aTopLeft.Y);
@@ -1111,10 +1111,10 @@ SdXMLEllipseShapeContext::SdXMLEllipseShapeContext(
uno::Reference< drawing::XShapes >& rShapes,
bool bTemporaryShape)
: SdXMLShapeContext( rImport, nPrfx, rLocalName, xAttrList, rShapes, bTemporaryShape ),
- mnCX( 0L ),
- mnCY( 0L ),
- mnRX( 1L ),
- mnRY( 1L ),
+ mnCX( 0 ),
+ mnCY( 0 ),
+ mnRX( 1 ),
+ mnRY( 1 ),
meKind( drawing::CircleKind_FULL ),
mnStartAngle( 0 ),
mnEndAngle( 0 )
@@ -2242,7 +2242,7 @@ SdXMLCaptionShapeContext::SdXMLCaptionShapeContext(
bool bTemporaryShape)
: SdXMLShapeContext( rImport, nPrfx, rLocalName, xAttrList, rShapes, bTemporaryShape ),
// #86616# for correct edge rounding import mnRadius needs to be initialized
- mnRadius( 0L )
+ mnRadius( 0 )
{
}
diff --git a/xmloff/source/draw/ximpstyl.cxx b/xmloff/source/draw/ximpstyl.cxx
index 88efe5bb46c0..010c16ab6669 100644
--- a/xmloff/source/draw/ximpstyl.cxx
+++ b/xmloff/source/draw/ximpstyl.cxx
@@ -290,12 +290,12 @@ SdXMLPageMasterStyleContext::SdXMLPageMasterStyleContext(
const OUString& rLName,
const uno::Reference< xml::sax::XAttributeList>& xAttrList)
: SvXMLStyleContext(rImport, nPrfx, rLName, xAttrList, XML_STYLE_FAMILY_SD_PAGEMASTERSTYLECONEXT_ID),
- mnBorderBottom( 0L ),
- mnBorderLeft( 0L ),
- mnBorderRight( 0L ),
- mnBorderTop( 0L ),
- mnWidth( 0L ),
- mnHeight( 0L ),
+ mnBorderBottom( 0 ),
+ mnBorderLeft( 0 ),
+ mnBorderRight( 0 ),
+ mnBorderTop( 0 ),
+ mnWidth( 0 ),
+ mnHeight( 0 ),
meOrientation(GetSdImport().IsDraw() ? view::PaperOrientation_PORTRAIT : view::PaperOrientation_LANDSCAPE)
{
// set family to something special at SvXMLStyleContext
@@ -679,10 +679,10 @@ SdXMLPresentationPlaceholderContext::SdXMLPresentationPlaceholderContext(
OUString& rLName,
const uno::Reference< xml::sax::XAttributeList>& xAttrList)
: SvXMLImportContext( rImport, nPrfx, rLName),
- mnX(0L),
- mnY(0L),
- mnWidth(1L),
- mnHeight(1L)
+ mnX(0),
+ mnY(0),
+ mnWidth(1),
+ mnHeight(1)
{
sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
for(sal_Int16 i=0; i < nAttrCount; i++)
@@ -1089,7 +1089,7 @@ void SdXMLStylesContext::EndElement()
GetImport().GetFormImport()->setAutoStyleContext( this );
// associate AutoStyles with styles in preparation to setting Styles on shapes
- for(sal_uInt32 a(0L); a < GetStyleCount(); a++)
+ for(sal_uInt32 a(0); a < GetStyleCount(); a++)
{
const SvXMLStyleContext* pStyle = GetStyle(a);
if (const XMLShapeStyleContext* pDocStyle = dynamic_cast<const XMLShapeStyleContext*>(pStyle))
@@ -1347,7 +1347,7 @@ void SdXMLStylesContext::ImpSetGraphicStyles( uno::Reference< container::XNameAc
}
// now set parents for all styles (when necessary)
- for(a = 0L; a < GetStyleCount(); a++)
+ for(a = 0; a < GetStyleCount(); a++)
{
const SvXMLStyleContext* pStyle = GetStyle(a);
@@ -1394,7 +1394,7 @@ uno::Reference< container::XNameAccess > SdXMLStylesContext::getPageLayouts() co
{
uno::Reference< container::XNameContainer > xLayouts( comphelper::NameContainer_createInstance( ::cppu::UnoType<sal_Int32>::get()) );
- for(sal_uInt32 a(0L); a < GetStyleCount(); a++)
+ for(sal_uInt32 a(0); a < GetStyleCount(); a++)
{
const SvXMLStyleContext* pStyle = GetStyle(a);
if (const SdXMLPresentationPageLayoutContext* pContext = dynamic_cast<const SdXMLPresentationPageLayoutContext*>(pStyle))
diff --git a/xmloff/source/style/xmlexppr.cxx b/xmloff/source/style/xmlexppr.cxx
index 32a45aa4303c..9675c42b4cee 100644
--- a/xmloff/source/style/xmlexppr.cxx
+++ b/xmloff/source/style/xmlexppr.cxx
@@ -777,7 +777,7 @@ void SvXMLExportPropertyMapper::exportXML(
nFlags, &aIndexArray,
nPropMapStartIdx, nPropMapEndIdx );
- if( rExport.GetAttrList().getLength() > 0L ||
+ if( rExport.GetAttrList().getLength() > 0 ||
(nFlags & SvXmlExportFlags::EMPTY) ||
!aIndexArray.empty() )
{
diff --git a/xmloff/source/style/xmlnumi.cxx b/xmloff/source/style/xmlnumi.cxx
index c70a3c0ddec3..46ac909b7f80 100644
--- a/xmloff/source/style/xmlnumi.cxx
+++ b/xmloff/source/style/xmlnumi.cxx
@@ -253,12 +253,12 @@ SvxXMLListLevelStyleContext_Impl::SvxXMLListLevelStyleContext_Impl(
, sStarBats( "StarBats" )
, sStarMath( "StarMath" )
, sNumFormat( OUString("1") )
-, nLevel( -1L )
-, nSpaceBefore( 0L )
-, nMinLabelWidth( 0L )
-, nMinLabelDist( 0L )
-, nImageWidth( 0L )
-, nImageHeight( 0L )
+, nLevel( -1 )
+, nSpaceBefore( 0 )
+, nMinLabelWidth( 0 )
+, nMinLabelDist( 0 )
+, nImageWidth( 0 )
+, nImageHeight( 0 )
, nNumStartValue( 1 )
, nNumDisplayLevels( 1 )
, eAdjust( HoriOrientation::LEFT )
@@ -342,7 +342,7 @@ SvxXMLListLevelStyleContext_Impl::SvxXMLListLevelStyleContext_Impl(
{
sal_Int32 nTmp = rValue.toInt32();
nNumStartValue =
- (nTmp < 0L) ? 1 : ( (nTmp>SHRT_MAX) ? SHRT_MAX
+ (nTmp < 0) ? 1 : ( (nTmp>SHRT_MAX) ? SHRT_MAX
: (sal_Int16)nTmp );
}
break;
@@ -351,7 +351,7 @@ SvxXMLListLevelStyleContext_Impl::SvxXMLListLevelStyleContext_Impl(
{
sal_Int32 nTmp = rValue.toInt32();
nNumDisplayLevels =
- (nTmp < 1L) ? 1 : ( (nTmp>SHRT_MAX) ? SHRT_MAX
+ (nTmp < 1) ? 1 : ( (nTmp>SHRT_MAX) ? SHRT_MAX
: (sal_Int16)nTmp );
}
break;