Kaydet (Commit) 659cb846 authored tarafından Thomas Beck's avatar Thomas Beck Kaydeden (comit) Michael Stahl

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/35798Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMichael Stahl <mstahl@redhat.com>
üst a70ae479
...@@ -460,7 +460,7 @@ void SdXMLGenericPageContext::DeleteAllShapes() ...@@ -460,7 +460,7 @@ void SdXMLGenericPageContext::DeleteAllShapes()
while(mxShapes->getCount()) while(mxShapes->getCount())
{ {
Reference< drawing::XShape > xShape; Reference< drawing::XShape > xShape;
uno::Any aAny(mxShapes->getByIndex(0L)); uno::Any aAny(mxShapes->getByIndex(0));
aAny >>= xShape; aAny >>= xShape;
......
...@@ -933,7 +933,7 @@ SdXMLRectShapeContext::SdXMLRectShapeContext( ...@@ -933,7 +933,7 @@ SdXMLRectShapeContext::SdXMLRectShapeContext(
uno::Reference< drawing::XShapes >& rShapes, uno::Reference< drawing::XShapes >& rShapes,
bool bTemporaryShape) bool bTemporaryShape)
: SdXMLShapeContext( rImport, nPrfx, rLocalName, xAttrList, rShapes, bTemporaryShape ), : SdXMLShapeContext( rImport, nPrfx, rLocalName, xAttrList, rShapes, bTemporaryShape ),
mnRadius( 0L ) mnRadius( 0 )
{ {
} }
...@@ -998,10 +998,10 @@ SdXMLLineShapeContext::SdXMLLineShapeContext( ...@@ -998,10 +998,10 @@ SdXMLLineShapeContext::SdXMLLineShapeContext(
uno::Reference< drawing::XShapes >& rShapes, uno::Reference< drawing::XShapes >& rShapes,
bool bTemporaryShape) bool bTemporaryShape)
: SdXMLShapeContext( rImport, nPrfx, rLocalName, xAttrList, rShapes, bTemporaryShape ), : SdXMLShapeContext( rImport, nPrfx, rLocalName, xAttrList, rShapes, bTemporaryShape ),
mnX1( 0L ), mnX1( 0 ),
mnY1( 0L ), mnY1( 0 ),
mnX2( 1L ), mnX2( 1 ),
mnY2( 1L ) mnY2( 1 )
{ {
} }
...@@ -1077,9 +1077,9 @@ void SdXMLLineShapeContext::StartElement(const uno::Reference< xml::sax::XAttrib ...@@ -1077,9 +1077,9 @@ void SdXMLLineShapeContext::StartElement(const uno::Reference< xml::sax::XAttrib
uno::Reference< beans::XPropertySet > xPropSet(mxShape, uno::UNO_QUERY); uno::Reference< beans::XPropertySet > xPropSet(mxShape, uno::UNO_QUERY);
if(xPropSet.is()) if(xPropSet.is())
{ {
drawing::PointSequenceSequence aPolyPoly(1L); drawing::PointSequenceSequence aPolyPoly(1);
drawing::PointSequence* pOuterSequence = aPolyPoly.getArray(); drawing::PointSequence* pOuterSequence = aPolyPoly.getArray();
pOuterSequence->realloc(2L); pOuterSequence->realloc(2);
awt::Point* pInnerSequence = pOuterSequence->getArray(); awt::Point* pInnerSequence = pOuterSequence->getArray();
*pInnerSequence = awt::Point( mnX1 - aTopLeft.X, mnY1 - aTopLeft.Y); *pInnerSequence = awt::Point( mnX1 - aTopLeft.X, mnY1 - aTopLeft.Y);
...@@ -1111,10 +1111,10 @@ SdXMLEllipseShapeContext::SdXMLEllipseShapeContext( ...@@ -1111,10 +1111,10 @@ SdXMLEllipseShapeContext::SdXMLEllipseShapeContext(
uno::Reference< drawing::XShapes >& rShapes, uno::Reference< drawing::XShapes >& rShapes,
bool bTemporaryShape) bool bTemporaryShape)
: SdXMLShapeContext( rImport, nPrfx, rLocalName, xAttrList, rShapes, bTemporaryShape ), : SdXMLShapeContext( rImport, nPrfx, rLocalName, xAttrList, rShapes, bTemporaryShape ),
mnCX( 0L ), mnCX( 0 ),
mnCY( 0L ), mnCY( 0 ),
mnRX( 1L ), mnRX( 1 ),
mnRY( 1L ), mnRY( 1 ),
meKind( drawing::CircleKind_FULL ), meKind( drawing::CircleKind_FULL ),
mnStartAngle( 0 ), mnStartAngle( 0 ),
mnEndAngle( 0 ) mnEndAngle( 0 )
...@@ -2242,7 +2242,7 @@ SdXMLCaptionShapeContext::SdXMLCaptionShapeContext( ...@@ -2242,7 +2242,7 @@ SdXMLCaptionShapeContext::SdXMLCaptionShapeContext(
bool bTemporaryShape) bool bTemporaryShape)
: SdXMLShapeContext( rImport, nPrfx, rLocalName, xAttrList, rShapes, bTemporaryShape ), : SdXMLShapeContext( rImport, nPrfx, rLocalName, xAttrList, rShapes, bTemporaryShape ),
// #86616# for correct edge rounding import mnRadius needs to be initialized // #86616# for correct edge rounding import mnRadius needs to be initialized
mnRadius( 0L ) mnRadius( 0 )
{ {
} }
......
...@@ -290,12 +290,12 @@ SdXMLPageMasterStyleContext::SdXMLPageMasterStyleContext( ...@@ -290,12 +290,12 @@ SdXMLPageMasterStyleContext::SdXMLPageMasterStyleContext(
const OUString& rLName, const OUString& rLName,
const uno::Reference< xml::sax::XAttributeList>& xAttrList) const uno::Reference< xml::sax::XAttributeList>& xAttrList)
: SvXMLStyleContext(rImport, nPrfx, rLName, xAttrList, XML_STYLE_FAMILY_SD_PAGEMASTERSTYLECONEXT_ID), : SvXMLStyleContext(rImport, nPrfx, rLName, xAttrList, XML_STYLE_FAMILY_SD_PAGEMASTERSTYLECONEXT_ID),
mnBorderBottom( 0L ), mnBorderBottom( 0 ),
mnBorderLeft( 0L ), mnBorderLeft( 0 ),
mnBorderRight( 0L ), mnBorderRight( 0 ),
mnBorderTop( 0L ), mnBorderTop( 0 ),
mnWidth( 0L ), mnWidth( 0 ),
mnHeight( 0L ), mnHeight( 0 ),
meOrientation(GetSdImport().IsDraw() ? view::PaperOrientation_PORTRAIT : view::PaperOrientation_LANDSCAPE) meOrientation(GetSdImport().IsDraw() ? view::PaperOrientation_PORTRAIT : view::PaperOrientation_LANDSCAPE)
{ {
// set family to something special at SvXMLStyleContext // set family to something special at SvXMLStyleContext
...@@ -679,10 +679,10 @@ SdXMLPresentationPlaceholderContext::SdXMLPresentationPlaceholderContext( ...@@ -679,10 +679,10 @@ SdXMLPresentationPlaceholderContext::SdXMLPresentationPlaceholderContext(
OUString& rLName, OUString& rLName,
const uno::Reference< xml::sax::XAttributeList>& xAttrList) const uno::Reference< xml::sax::XAttributeList>& xAttrList)
: SvXMLImportContext( rImport, nPrfx, rLName), : SvXMLImportContext( rImport, nPrfx, rLName),
mnX(0L), mnX(0),
mnY(0L), mnY(0),
mnWidth(1L), mnWidth(1),
mnHeight(1L) mnHeight(1)
{ {
sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
for(sal_Int16 i=0; i < nAttrCount; i++) for(sal_Int16 i=0; i < nAttrCount; i++)
...@@ -1089,7 +1089,7 @@ void SdXMLStylesContext::EndElement() ...@@ -1089,7 +1089,7 @@ void SdXMLStylesContext::EndElement()
GetImport().GetFormImport()->setAutoStyleContext( this ); GetImport().GetFormImport()->setAutoStyleContext( this );
// associate AutoStyles with styles in preparation to setting Styles on shapes // 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); const SvXMLStyleContext* pStyle = GetStyle(a);
if (const XMLShapeStyleContext* pDocStyle = dynamic_cast<const XMLShapeStyleContext*>(pStyle)) if (const XMLShapeStyleContext* pDocStyle = dynamic_cast<const XMLShapeStyleContext*>(pStyle))
...@@ -1347,7 +1347,7 @@ void SdXMLStylesContext::ImpSetGraphicStyles( uno::Reference< container::XNameAc ...@@ -1347,7 +1347,7 @@ void SdXMLStylesContext::ImpSetGraphicStyles( uno::Reference< container::XNameAc
} }
// now set parents for all styles (when necessary) // 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); const SvXMLStyleContext* pStyle = GetStyle(a);
...@@ -1394,7 +1394,7 @@ uno::Reference< container::XNameAccess > SdXMLStylesContext::getPageLayouts() co ...@@ -1394,7 +1394,7 @@ uno::Reference< container::XNameAccess > SdXMLStylesContext::getPageLayouts() co
{ {
uno::Reference< container::XNameContainer > xLayouts( comphelper::NameContainer_createInstance( ::cppu::UnoType<sal_Int32>::get()) ); 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); const SvXMLStyleContext* pStyle = GetStyle(a);
if (const SdXMLPresentationPageLayoutContext* pContext = dynamic_cast<const SdXMLPresentationPageLayoutContext*>(pStyle)) if (const SdXMLPresentationPageLayoutContext* pContext = dynamic_cast<const SdXMLPresentationPageLayoutContext*>(pStyle))
......
...@@ -777,7 +777,7 @@ void SvXMLExportPropertyMapper::exportXML( ...@@ -777,7 +777,7 @@ void SvXMLExportPropertyMapper::exportXML(
nFlags, &aIndexArray, nFlags, &aIndexArray,
nPropMapStartIdx, nPropMapEndIdx ); nPropMapStartIdx, nPropMapEndIdx );
if( rExport.GetAttrList().getLength() > 0L || if( rExport.GetAttrList().getLength() > 0 ||
(nFlags & SvXmlExportFlags::EMPTY) || (nFlags & SvXmlExportFlags::EMPTY) ||
!aIndexArray.empty() ) !aIndexArray.empty() )
{ {
......
...@@ -253,12 +253,12 @@ SvxXMLListLevelStyleContext_Impl::SvxXMLListLevelStyleContext_Impl( ...@@ -253,12 +253,12 @@ SvxXMLListLevelStyleContext_Impl::SvxXMLListLevelStyleContext_Impl(
, sStarBats( "StarBats" ) , sStarBats( "StarBats" )
, sStarMath( "StarMath" ) , sStarMath( "StarMath" )
, sNumFormat( OUString("1") ) , sNumFormat( OUString("1") )
, nLevel( -1L ) , nLevel( -1 )
, nSpaceBefore( 0L ) , nSpaceBefore( 0 )
, nMinLabelWidth( 0L ) , nMinLabelWidth( 0 )
, nMinLabelDist( 0L ) , nMinLabelDist( 0 )
, nImageWidth( 0L ) , nImageWidth( 0 )
, nImageHeight( 0L ) , nImageHeight( 0 )
, nNumStartValue( 1 ) , nNumStartValue( 1 )
, nNumDisplayLevels( 1 ) , nNumDisplayLevels( 1 )
, eAdjust( HoriOrientation::LEFT ) , eAdjust( HoriOrientation::LEFT )
...@@ -342,7 +342,7 @@ SvxXMLListLevelStyleContext_Impl::SvxXMLListLevelStyleContext_Impl( ...@@ -342,7 +342,7 @@ SvxXMLListLevelStyleContext_Impl::SvxXMLListLevelStyleContext_Impl(
{ {
sal_Int32 nTmp = rValue.toInt32(); sal_Int32 nTmp = rValue.toInt32();
nNumStartValue = nNumStartValue =
(nTmp < 0L) ? 1 : ( (nTmp>SHRT_MAX) ? SHRT_MAX (nTmp < 0) ? 1 : ( (nTmp>SHRT_MAX) ? SHRT_MAX
: (sal_Int16)nTmp ); : (sal_Int16)nTmp );
} }
break; break;
...@@ -351,7 +351,7 @@ SvxXMLListLevelStyleContext_Impl::SvxXMLListLevelStyleContext_Impl( ...@@ -351,7 +351,7 @@ SvxXMLListLevelStyleContext_Impl::SvxXMLListLevelStyleContext_Impl(
{ {
sal_Int32 nTmp = rValue.toInt32(); sal_Int32 nTmp = rValue.toInt32();
nNumDisplayLevels = nNumDisplayLevels =
(nTmp < 1L) ? 1 : ( (nTmp>SHRT_MAX) ? SHRT_MAX (nTmp < 1) ? 1 : ( (nTmp>SHRT_MAX) ? SHRT_MAX
: (sal_Int16)nTmp ); : (sal_Int16)nTmp );
} }
break; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment