summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-04-27 21:49:58 +0200
committerStephan Bergmann <sbergman@redhat.com>2017-04-27 23:58:53 +0200
commit74ccd02eda2d6325a27266fd935aba29b3d75020 (patch)
treeb5db339494824202fa325f1f1b684fee09d1f751 /oox
parentf8fdc6417b4d023b7c75485754a0ab1b164a69d6 (diff)
tdf#107020: Reintroduce uses of I32S, I64S
...that had been removed with 4b788a12380518e31a9064d5839f4880d3f36874 "There should be no need to distinguish between I32S and I64S" (which this commit effectively reverts). I had erroneously assumed that the arguments to I32S and I64S would only be of (signed) integer types, and that it would be irrelevant that they are truncated to sal_Int32 resp. sal_Int64. However, at least oox/source/export/drawingml.cxx called I32S with double values (for which there is an OUString::number overload too), so the resulting strings could be rather different. Change-Id: Ib3887269fad0764740bc9ed3be91f67696a23b55 Reviewed-on: https://gerrit.libreoffice.org/37040 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/export/chartexport.cxx62
-rw-r--r--oox/source/export/drawingml.cxx106
-rw-r--r--oox/source/export/shapes.cxx60
3 files changed, 114 insertions, 114 deletions
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx
index 1a970a1f877a..329a5e8aadef 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -527,7 +527,7 @@ void ChartExport::WriteChartObj( const Reference< XShape >& xShape, sal_Int32 nC
sal_Int32 nID = GetChartID();
pFS->singleElementNS( mnXmlNamespace, XML_cNvPr,
- XML_id, IS( nID ),
+ XML_id, I32S( nID ),
XML_name, USS( sName ),
FSEND );
@@ -1562,7 +1562,7 @@ void ChartExport::exportBarChart( const Reference< chart2::XChartType >& xChartT
{
sal_Int32 nGapWidth = aBarPositionSequence[0];
pFS->singleElement( FSNS( XML_c, XML_gapWidth ),
- XML_val, IS( nGapWidth ),
+ XML_val, I32S( nGapWidth ),
FSEND );
}
}
@@ -1604,7 +1604,7 @@ void ChartExport::exportBarChart( const Reference< chart2::XChartType >& xChartT
{
sal_Int32 nOverlap = aBarPositionSequence[0];
pFS->singleElement( FSNS( XML_c, XML_overlap ),
- XML_val, IS( nOverlap ),
+ XML_val, I32S( nOverlap ),
FSEND );
}
}
@@ -1649,7 +1649,7 @@ void ChartExport::exportDoughnutChart( const Reference< chart2::XChartType >& xC
//FIXME: holeSize
sal_Int32 nHoleSize = 50;
pFS->singleElement( FSNS( XML_c, XML_holeSize ),
- XML_val, IS( nHoleSize ),
+ XML_val, I32S( nHoleSize ),
FSEND );
pFS->endElement( FSNS( XML_c, XML_doughnutChart ) );
@@ -1901,7 +1901,7 @@ void ChartExport::exportUpDownBars( const Reference< chart2::XChartType >& xChar
// TODO: gapWidth
sal_Int32 nGapWidth = 150;
pFS->singleElement( FSNS( XML_c, XML_gapWidth ),
- XML_val, IS( nGapWidth ),
+ XML_val, I32S( nGapWidth ),
FSEND );
Reference< beans::XPropertySet > xChartPropSet = xChartPropProvider->getUpBar();
@@ -2056,10 +2056,10 @@ void ChartExport::exportSeries( const Reference<chart2::XChartType>& xChartType,
// TODO: idx and order
pFS->singleElement( FSNS( XML_c, XML_idx ),
- XML_val, IS(mnSeriesCount),
+ XML_val, I32S(mnSeriesCount),
FSEND );
pFS->singleElement( FSNS( XML_c, XML_order ),
- XML_val, IS(mnSeriesCount++),
+ XML_val, I32S(mnSeriesCount++),
FSEND );
// export label
@@ -2106,7 +2106,7 @@ void ChartExport::exportSeries( const Reference<chart2::XChartType>& xChartType,
sal_Int32 nOffset = 0;
mAny >>= nOffset;
pFS->singleElement( FSNS( XML_c, XML_explosion ),
- XML_val, IS( nOffset ),
+ XML_val, I32S( nOffset ),
FSEND );
}
break;
@@ -2238,10 +2238,10 @@ void ChartExport::exportCandleStickSeries(
// TODO: idx and order
// idx attribute should start from 1 and not from 0.
pFS->singleElement( FSNS( XML_c, XML_idx ),
- XML_val, IS(idx+1),
+ XML_val, I32S(idx+1),
FSEND );
pFS->singleElement( FSNS( XML_c, XML_order ),
- XML_val, IS(idx+1),
+ XML_val, I32S(idx+1),
FSEND );
// export label
@@ -2326,12 +2326,12 @@ void ChartExport::exportSeriesCategory( const Reference< chart2::data::XDataSequ
pFS->startElement( FSNS( XML_c, XML_strCache ),
FSEND );
pFS->singleElement( FSNS( XML_c, XML_ptCount ),
- XML_val, IS( ptCount ),
+ XML_val, I32S( ptCount ),
FSEND );
for( sal_Int32 i = 0; i < ptCount; i++ )
{
pFS->startElement( FSNS( XML_c, XML_pt ),
- XML_idx, IS( i ),
+ XML_idx, I32S( i ),
FSEND );
pFS->startElement( FSNS( XML_c, XML_v ),
FSEND );
@@ -2374,7 +2374,7 @@ void ChartExport::exportSeriesValues( const Reference< chart2::data::XDataSequen
pFS->writeEscaped( "General" );
pFS->endElement( FSNS( XML_c, XML_formatCode ) );
pFS->singleElement( FSNS( XML_c, XML_ptCount ),
- XML_val, IS( ptCount ),
+ XML_val, I32S( ptCount ),
FSEND );
bool bIsNumberValue = true;
@@ -2387,7 +2387,7 @@ void ChartExport::exportSeriesValues( const Reference< chart2::data::XDataSequen
for( sal_Int32 i = 0; i < ptCount; i++ )
{
pFS->startElement( FSNS( XML_c, XML_pt ),
- XML_idx, IS( i ),
+ XML_idx, I32S( i ),
FSEND );
pFS->startElement( FSNS( XML_c, XML_v ),
FSEND );
@@ -2641,7 +2641,7 @@ void ChartExport::_exportAxis(
pFS->startElement( FSNS( XML_c, nAxisType ),
FSEND );
pFS->singleElement( FSNS( XML_c, XML_axId ),
- XML_val, IS( rAxisIdPair.nAxisId ),
+ XML_val, I32S( rAxisIdPair.nAxisId ),
FSEND );
pFS->startElement( FSNS( XML_c, XML_scaling ),
@@ -2657,7 +2657,7 @@ void ChartExport::_exportAxis(
// default value is 10?
sal_Int32 nLogBase = 10;
pFS->singleElement( FSNS( XML_c, XML_logBase ),
- XML_val, IS( nLogBase ),
+ XML_val, I32S( nLogBase ),
FSEND );
}
}
@@ -2839,7 +2839,7 @@ void ChartExport::_exportAxis(
exportTextProps(xAxisProp);
pFS->singleElement( FSNS( XML_c, XML_crossAx ),
- XML_val, IS( rAxisIdPair.nCrossAx ),
+ XML_val, I32S( rAxisIdPair.nCrossAx ),
FSEND );
// crosses & crossesAt
@@ -2902,7 +2902,7 @@ void ChartExport::_exportAxis(
// FIXME: seems not support? lblOffset
sal_Int32 nLblOffset = 100;
pFS->singleElement( FSNS( XML_c, XML_lblOffset ),
- XML_val, IS( nLblOffset ),
+ XML_val, I32S( nLblOffset ),
FSEND );
}
@@ -3147,7 +3147,7 @@ void ChartExport::exportDataLabels(
// Individual label property that overwrites the baseline.
pFS->startElement(FSNS(XML_c, XML_dLbl), FSEND);
- pFS->singleElement(FSNS(XML_c, XML_idx), XML_val, IS(nIdx), FSEND);
+ pFS->singleElement(FSNS(XML_c, XML_idx), XML_val, I32S(nIdx), FSEND);
writeLabelProperties(pFS, xLabelPropSet, aParam);
pFS->endElement(FSNS(XML_c, XML_dLbl));
}
@@ -3215,7 +3215,7 @@ void ChartExport::exportDataPoints(
pFS->startElement( FSNS( XML_c, XML_dPt ),
FSEND );
pFS->singleElement( FSNS( XML_c, XML_idx ),
- XML_val, IS(nElement),
+ XML_val, I32S(nElement),
FSEND );
exportShapeProps( xPropSet );
@@ -3235,10 +3235,10 @@ void ChartExport::exportAxesId(bool bPrimaryAxes)
maAxes.push_back( AxisIdPair( eYAxis, nAxisIdy, nAxisIdx ) );
FSHelperPtr pFS = GetFS();
pFS->singleElement( FSNS( XML_c, XML_axId ),
- XML_val, IS( nAxisIdx ),
+ XML_val, I32S( nAxisIdx ),
FSEND );
pFS->singleElement( FSNS( XML_c, XML_axId ),
- XML_val, IS( nAxisIdy ),
+ XML_val, I32S( nAxisIdy ),
FSEND );
if (mbHasZAxis)
{
@@ -3249,7 +3249,7 @@ void ChartExport::exportAxesId(bool bPrimaryAxes)
maAxes.push_back( AxisIdPair( AXIS_PRIMARY_Z, nAxisIdz, nAxisIdy ) );
}
pFS->singleElement( FSNS( XML_c, XML_axId ),
- XML_val, IS( nAxisIdz ),
+ XML_val, I32S( nAxisIdz ),
FSEND );
}
}
@@ -3361,7 +3361,7 @@ void ChartExport::exportTrendlines( const Reference< chart2::XDataSeries >& xSer
sal_Int32 aDegree = 2;
xProperties->getPropertyValue( "PolynomialDegree") >>= aDegree;
pFS->singleElement( FSNS( XML_c, XML_order ),
- XML_val, IS(aDegree),
+ XML_val, I32S(aDegree),
FSEND );
}
else if( aService == "com.sun.star.chart2.MovingAverageRegressionCurve" )
@@ -3374,7 +3374,7 @@ void ChartExport::exportTrendlines( const Reference< chart2::XDataSeries >& xSer
xProperties->getPropertyValue( "MovingAveragePeriod") >>= aPeriod;
pFS->singleElement( FSNS( XML_c, XML_period ),
- XML_val, IS(aPeriod),
+ XML_val, I32S(aPeriod),
FSEND );
}
else
@@ -3509,7 +3509,7 @@ void ChartExport::exportMarker(const Reference< chart2::XDataSeries >& xSeries)
//the value is always 1 less than the actual value.
nSize = std::min<sal_Int32>( 72, std::max<sal_Int32>( 2, nSize ) );
pFS->singleElement( FSNS( XML_c, XML_size),
- XML_val, IS(nSize),
+ XML_val, I32S(nSize),
FSEND );
pFS->startElement( FSNS( XML_c, XML_spPr ),
@@ -3556,7 +3556,7 @@ void ChartExport::exportFirstSliceAng( )
// convert to ooxml angle
nStartingAngle = (450 - nStartingAngle ) % 360;
pFS->singleElement( FSNS( XML_c, XML_firstSliceAng ),
- XML_val, IS( nStartingAngle ),
+ XML_val, I32S( nStartingAngle ),
FSEND );
}
@@ -3725,7 +3725,7 @@ void ChartExport::exportView3D()
nRotationX += 360; // X rotation (map Chart2 [-179,180] to OOXML [-90..90])
}
pFS->singleElement( FSNS( XML_c, XML_rotX ),
- XML_val, IS( nRotationX ),
+ XML_val, I32S( nRotationX ),
FSEND );
}
// rotY
@@ -3740,7 +3740,7 @@ void ChartExport::exportView3D()
// convert to ooxml angle
nStartingAngle = (450 - nStartingAngle ) % 360;
pFS->singleElement( FSNS( XML_c, XML_rotY ),
- XML_val, IS( nStartingAngle ),
+ XML_val, I32S( nStartingAngle ),
FSEND );
}
else
@@ -3751,7 +3751,7 @@ void ChartExport::exportView3D()
if( nRotationY < 0 )
nRotationY += 360;
pFS->singleElement( FSNS( XML_c, XML_rotY ),
- XML_val, IS( nRotationY ),
+ XML_val, I32S( nRotationY ),
FSEND );
}
}
@@ -3773,7 +3773,7 @@ void ChartExport::exportView3D()
// map Chart2 [0,100] to OOXML [0..200]
nPerspective *= 2;
pFS->singleElement( FSNS( XML_c, XML_perspective ),
- XML_val, IS( nPerspective ),
+ XML_val, I32S( nPerspective ),
FSEND );
}
pFS->endElement( FSNS( XML_c, XML_view3D ) );
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index c59a2bfbf638..5f049f26b98c 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -238,7 +238,7 @@ void DrawingML::WriteColorTransformations( const Sequence< PropertyValue >& aTra
if( nToken != XML_TOKEN_INVALID && aTransformations[i].Value.hasValue() )
{
sal_Int32 nValue = aTransformations[i].Value.get<sal_Int32>();
- mpFS->singleElementNS( XML_a, nToken, XML_val, IS( nValue ), FSEND );
+ mpFS->singleElementNS( XML_a, nToken, XML_val, I32S( nValue ), FSEND );
}
}
}
@@ -332,7 +332,7 @@ void DrawingML::WriteSolidFill( const Reference< XPropertySet >& rXPropSet )
void DrawingML::WriteGradientStop( sal_uInt16 nStop, sal_uInt32 nColor )
{
mpFS->startElementNS( XML_a, XML_gs,
- XML_pos, IS( nStop * 1000 ),
+ XML_pos, I32S( nStop * 1000 ),
FSEND );
WriteColor( nColor );
mpFS->endElementNS( XML_a, XML_gs );
@@ -449,7 +449,7 @@ void DrawingML::WriteGrabBagGradientFill( const Sequence< PropertyValue >& aGrad
mpFS->endElementNS( XML_a, XML_gsLst );
mpFS->singleElementNS( XML_a, XML_lin,
- XML_ang, IS( ( ( ( 3600 - rGradient.Angle + 900 ) * 6000 ) % 21600000 ) ),
+ XML_ang, I32S( ( ( ( 3600 - rGradient.Angle + 900 ) * 6000 ) % 21600000 ) ),
FSEND );
}
@@ -464,7 +464,7 @@ void DrawingML::WriteGradientFill( awt::Gradient rGradient )
WriteGradientStop( 100, ColorWithIntensity( rGradient.EndColor, rGradient.EndIntensity ) );
mpFS->endElementNS( XML_a, XML_gsLst );
mpFS->singleElementNS( XML_a, XML_lin,
- XML_ang, IS( ( ( ( 3600 - rGradient.Angle + 900 ) * 6000 ) % 21600000 ) ),
+ XML_ang, I32S( ( ( ( 3600 - rGradient.Angle + 900 ) * 6000 ) % 21600000 ) ),
FSEND );
break;
@@ -475,7 +475,7 @@ void DrawingML::WriteGradientFill( awt::Gradient rGradient )
WriteGradientStop( 100, ColorWithIntensity( rGradient.EndColor, rGradient.EndIntensity ) );
mpFS->endElementNS( XML_a, XML_gsLst );
mpFS->singleElementNS( XML_a, XML_lin,
- XML_ang, IS( ( ( ( 3600 - rGradient.Angle + 900 ) * 6000 ) % 21600000 ) ),
+ XML_ang, I32S( ( ( ( 3600 - rGradient.Angle + 900 ) * 6000 ) % 21600000 ) ),
FSEND );
break;
@@ -661,7 +661,7 @@ void DrawingML::WriteOutline( const Reference<XPropertySet>& rXPropSet )
mpFS->startElementNS( XML_a, XML_ln,
XML_cap, cap,
XML_w, nLineWidth > 1 && nStyleLineWidth != nLineWidth ?
- IS( oox::drawingml::convertHmmToEmu( nLineWidth ) ) :nullptr,
+ I64S( oox::drawingml::convertHmmToEmu( nLineWidth ) ) :nullptr,
FSEND );
if( bColorSet )
@@ -986,8 +986,8 @@ OUString DrawingML::WriteBlip( const Reference< XPropertySet >& rXPropSet, const
if( nBright || nContrast )
{
mpFS->singleElementNS( XML_a, XML_lum,
- XML_bright, nBright ? IS( nBright*1000 ) : nullptr,
- XML_contrast, nContrast ? IS( nContrast*1000 ) : nullptr,
+ XML_bright, nBright ? I32S( nBright*1000 ) : nullptr,
+ XML_contrast, nContrast ? I32S( nContrast*1000 ) : nullptr,
FSEND );
}
WriteArtisticEffect( rXPropSet );
@@ -1113,10 +1113,10 @@ void DrawingML::WriteSrcRect( const Reference< XPropertySet >& rXPropSet, const
if ( (0 != aGraphicCropStruct.Left) || (0 != aGraphicCropStruct.Top) || (0 != aGraphicCropStruct.Right) || (0 != aGraphicCropStruct.Bottom) )
{
mpFS->singleElementNS( XML_a, XML_srcRect,
- XML_l, IS(rtl::math::round(static_cast<double>(aGraphicCropStruct.Left) * 100000 / aOriginalSize.Width())),
- XML_t, IS(rtl::math::round(static_cast<double>(aGraphicCropStruct.Top) * 100000 / aOriginalSize.Height())),
- XML_r, IS(rtl::math::round(static_cast<double>(aGraphicCropStruct.Right) * 100000 / aOriginalSize.Width())),
- XML_b, IS(rtl::math::round(static_cast<double>(aGraphicCropStruct.Bottom) * 100000 / aOriginalSize.Height())),
+ XML_l, I32S(rtl::math::round(static_cast<double>(aGraphicCropStruct.Left) * 100000 / aOriginalSize.Width())),
+ XML_t, I32S(rtl::math::round(static_cast<double>(aGraphicCropStruct.Top) * 100000 / aOriginalSize.Height())),
+ XML_r, I32S(rtl::math::round(static_cast<double>(aGraphicCropStruct.Right) * 100000 / aOriginalSize.Width())),
+ XML_b, I32S(rtl::math::round(static_cast<double>(aGraphicCropStruct.Bottom) * 100000 / aOriginalSize.Height())),
FSEND );
}
}
@@ -1136,10 +1136,10 @@ void DrawingML::WriteStretch( const css::uno::Reference< css::beans::XPropertySe
{
Size aOriginalSize( GraphicObject::CreateGraphicObjectFromURL( rURL ).GetPrefSize() );
mpFS->singleElementNS( XML_a, XML_fillRect,
- XML_l, IS(((aGraphicCropStruct.Left) * 100000)/aOriginalSize.Width()),
- XML_t, IS(((aGraphicCropStruct.Top) * 100000)/aOriginalSize.Height()),
- XML_r, IS(((aGraphicCropStruct.Right) * 100000)/aOriginalSize.Width()),
- XML_b, IS(((aGraphicCropStruct.Bottom) * 100000)/aOriginalSize.Height()),
+ XML_l, I32S(((aGraphicCropStruct.Left) * 100000)/aOriginalSize.Width()),
+ XML_t, I32S(((aGraphicCropStruct.Top) * 100000)/aOriginalSize.Height()),
+ XML_r, I32S(((aGraphicCropStruct.Right) * 100000)/aOriginalSize.Width()),
+ XML_b, I32S(((aGraphicCropStruct.Bottom) * 100000)/aOriginalSize.Height()),
FSEND );
bCrop = true;
}
@@ -1159,7 +1159,7 @@ void DrawingML::WriteTransformation( const tools::Rectangle& rRect,
mpFS->startElementNS( nXmlNamespace, XML_xfrm,
XML_flipH, bFlipH ? "1" : nullptr,
XML_flipV, bFlipV ? "1" : nullptr,
- XML_rot, (nRotation % 21600000) ? IS( nRotation ) : nullptr,
+ XML_rot, (nRotation % 21600000) ? I32S( nRotation ) : nullptr,
FSEND );
sal_Int32 nLeft = rRect.Left();
@@ -1933,13 +1933,13 @@ void DrawingML::WriteLinespacing( LineSpacing& rSpacing )
if( rSpacing.Mode == LineSpacingMode::PROP )
{
mpFS->singleElementNS( XML_a, XML_spcPct,
- XML_val, IS( ((sal_Int32)rSpacing.Height)*1000 ),
+ XML_val, I32S( ((sal_Int32)rSpacing.Height)*1000 ),
FSEND );
}
else
{
mpFS->singleElementNS( XML_a, XML_spcPts,
- XML_val, IS( rSpacing.Height ),
+ XML_val, I32S( rSpacing.Height ),
FSEND );
}
}
@@ -1996,17 +1996,17 @@ void DrawingML::WriteParagraphProperties( const Reference< XTextContent >& rPara
{
if (nParaLeftMargin) // For Paragraph
mpFS->startElementNS( XML_a, XML_pPr,
- XML_lvl, nLevel > 0 ? IS( nLevel ) : nullptr,
- XML_marL, nParaLeftMargin > 0 ? IS( oox::drawingml::convertHmmToEmu( nParaLeftMargin ) ) : nullptr,
- XML_indent, nParaFirstLineIndent ? IS( oox::drawingml::convertHmmToEmu( nParaFirstLineIndent ) ) : nullptr,
+ XML_lvl, nLevel > 0 ? I32S( nLevel ) : nullptr,
+ XML_marL, nParaLeftMargin > 0 ? I32S( oox::drawingml::convertHmmToEmu( nParaLeftMargin ) ) : nullptr,
+ XML_indent, nParaFirstLineIndent ? I32S( oox::drawingml::convertHmmToEmu( nParaFirstLineIndent ) ) : nullptr,
XML_algn, GetAlignment( nAlignment ),
XML_rtl, bRtl ? BS(bRtl) : nullptr,
FSEND );
else
mpFS->startElementNS( XML_a, XML_pPr,
- XML_lvl, nLevel > 0 ? IS( nLevel ) : nullptr,
- XML_marL, nLeftMargin > 0 ? IS( oox::drawingml::convertHmmToEmu( nLeftMargin ) ) : nullptr,
- XML_indent, nLineIndentation ? IS( oox::drawingml::convertHmmToEmu( nLineIndentation ) ) : nullptr,
+ XML_lvl, nLevel > 0 ? I32S( nLevel ) : nullptr,
+ XML_marL, nLeftMargin > 0 ? I32S( oox::drawingml::convertHmmToEmu( nLeftMargin ) ) : nullptr,
+ XML_indent, nLineIndentation ? I32S( oox::drawingml::convertHmmToEmu( nLineIndentation ) ) : nullptr,
XML_algn, GetAlignment( nAlignment ),
XML_rtl, bRtl ? BS(bRtl) : nullptr,
FSEND );
@@ -2024,7 +2024,7 @@ void DrawingML::WriteParagraphProperties( const Reference< XTextContent >& rPara
mpFS->startElementNS( XML_a, XML_spcBef, FSEND );
{
mpFS->singleElementNS( XML_a, XML_spcPts,
- XML_val, IS( std::lround( nParaTopMargin / 25.4 * 72 ) ),
+ XML_val, I32S( std::lround( nParaTopMargin / 25.4 * 72 ) ),
FSEND );
}
mpFS->endElementNS( XML_a, XML_spcBef );
@@ -2035,7 +2035,7 @@ void DrawingML::WriteParagraphProperties( const Reference< XTextContent >& rPara
mpFS->startElementNS( XML_a, XML_spcAft, FSEND );
{
mpFS->singleElementNS( XML_a, XML_spcPts,
- XML_val, IS( std::lround( nParaBottomMargin / 25.4 * 72 ) ),
+ XML_val, I32S( std::lround( nParaBottomMargin / 25.4 * 72 ) ),
FSEND );
}
mpFS->endElementNS( XML_a, XML_spcAft );
@@ -2455,8 +2455,8 @@ bool DrawingML::WriteCustomGeometry( const Reference< XShape >& rXShape )
if ( aPathSize.hasElements() )
{
mpFS->startElementNS( XML_a, XML_path,
- XML_w, IS( aPathSize[0].Width ),
- XML_h, IS( aPathSize[0].Height ),
+ XML_w, I64S( aPathSize[0].Width ),
+ XML_h, I64S( aPathSize[0].Height ),
FSEND );
}
else
@@ -2481,8 +2481,8 @@ bool DrawingML::WriteCustomGeometry( const Reference< XShape >& rXShape )
nYMax = nCandidate;
}
mpFS->startElementNS( XML_a, XML_path,
- XML_w, IS( nXMax - nXMin ),
- XML_h, IS( nYMax - nYMin ),
+ XML_w, I64S( nXMax - nXMin ),
+ XML_h, I64S( nYMax - nYMin ),
FSEND );
}
@@ -2507,8 +2507,8 @@ bool DrawingML::WriteCustomGeometry( const Reference< XShape >& rXShape )
aPairs[nPairIndex].Second.Value >>= nY;
mpFS->singleElementNS( XML_a, XML_pt,
- XML_x, IS(nX),
- XML_y, IS(nY),
+ XML_x, I64S(nX),
+ XML_y, I64S(nY),
FSEND );
mpFS->endElementNS( XML_a, XML_moveTo );
@@ -2524,8 +2524,8 @@ bool DrawingML::WriteCustomGeometry( const Reference< XShape >& rXShape )
aPairs[nPairIndex].Second.Value >>= nY;
mpFS->singleElementNS( XML_a, XML_pt,
- XML_x, IS(nX),
- XML_y, IS(nY),
+ XML_x, I64S(nX),
+ XML_y, I64S(nY),
FSEND );
mpFS->endElementNS( XML_a, XML_lnTo );
nPairIndex++;
@@ -2541,8 +2541,8 @@ bool DrawingML::WriteCustomGeometry( const Reference< XShape >& rXShape )
aPairs[nPairIndex+l].Second.Value >>= nY;
mpFS->singleElementNS( XML_a, XML_pt,
- XML_x, IS( nX ),
- XML_y, IS( nY ),
+ XML_x, I64S( nX ),
+ XML_y, I64S( nY ),
FSEND );
}
@@ -2580,8 +2580,8 @@ bool DrawingML::WriteCustomGeometry( const Reference< XShape >& rXShape )
aPairs[nPairIndex+l].Second.Value >>= nY;
mpFS->singleElementNS( XML_a, XML_pt,
- XML_x, IS( nX ),
- XML_y, IS( nY ),
+ XML_x, I64S( nX ),
+ XML_y, I64S( nY ),
FSEND );
}
@@ -2635,8 +2635,8 @@ void DrawingML::WritePolyPolygon( const tools::PolyPolygon& rPolyPolygon )
// Put all polygons of rPolyPolygon in the same path elemnt
// to subtract the overlapped areas.
mpFS->startElementNS( XML_a, XML_path,
- XML_w, IS( aRect.GetWidth() ),
- XML_h, IS( aRect.GetHeight() ),
+ XML_w, I64S( aRect.GetWidth() ),
+ XML_h, I64S( aRect.GetHeight() ),
FSEND );
for( sal_uInt16 i = 0; i < rPolyPolygon.Count(); i ++ )
@@ -2649,8 +2649,8 @@ void DrawingML::WritePolyPolygon( const tools::PolyPolygon& rPolyPolygon )
mpFS->startElementNS( XML_a, XML_moveTo, FSEND );
mpFS->singleElementNS( XML_a, XML_pt,
- XML_x, IS( rPoly[ 0 ].X() - aRect.Left() ),
- XML_y, IS( rPoly[ 0 ].Y() - aRect.Top() ),
+ XML_x, I64S( rPoly[ 0 ].X() - aRect.Left() ),
+ XML_y, I64S( rPoly[ 0 ].Y() - aRect.Top() ),
FSEND );
mpFS->endElementNS( XML_a, XML_moveTo );
@@ -2669,8 +2669,8 @@ void DrawingML::WritePolyPolygon( const tools::PolyPolygon& rPolyPolygon )
for( sal_uInt8 k = 0; k <= 2; ++k )
{
mpFS->singleElementNS( XML_a, XML_pt,
- XML_x, IS( rPoly[j+k].X() - aRect.Left() ),
- XML_y, IS( rPoly[j+k].Y() - aRect.Top() ),
+ XML_x, I64S( rPoly[j+k].X() - aRect.Left() ),
+ XML_y, I64S( rPoly[j+k].Y() - aRect.Top() ),
FSEND );
}
@@ -2682,8 +2682,8 @@ void DrawingML::WritePolyPolygon( const tools::PolyPolygon& rPolyPolygon )
{
mpFS->startElementNS( XML_a, XML_lnTo, FSEND );
mpFS->singleElementNS( XML_a, XML_pt,
- XML_x, IS( rPoly[j].X() - aRect.Left() ),
- XML_y, IS( rPoly[j].Y() - aRect.Top() ),
+ XML_x, I64S( rPoly[j].X() - aRect.Left() ),
+ XML_y, I64S( rPoly[j].Y() - aRect.Top() ),
FSEND );
mpFS->endElementNS( XML_a, XML_lnTo );
}
@@ -2701,15 +2701,15 @@ void DrawingML::WriteConnectorConnections( EscherConnectorListEntry& rConnectorE
if( nStartID != -1 )
{
mpFS->singleElementNS( XML_a, XML_stCxn,
- XML_id, IS( nStartID ),
- XML_idx, IS( rConnectorEntry.GetConnectorRule( true ) ),
+ XML_id, I32S( nStartID ),
+ XML_idx, I64S( rConnectorEntry.GetConnectorRule( true ) ),
FSEND );
}
if( nEndID != -1 )
{
mpFS->singleElementNS( XML_a, XML_endCxn,
- XML_id, IS( nEndID ),
- XML_idx, IS( rConnectorEntry.GetConnectorRule( false ) ),
+ XML_id, I32S( nEndID ),
+ XML_idx, I64S( rConnectorEntry.GetConnectorRule( false ) ),
FSEND );
}
}
@@ -2804,14 +2804,14 @@ void DrawingML::WriteStyleProperties( sal_Int32 nTokenId, const Sequence< Proper
else if( aProperties[i].Name == "Transformations" )
aProperties[i].Value >>= aTransformations;
}
- mpFS->startElementNS( XML_a, nTokenId, XML_idx, IS( nIdx ), FSEND );
+ mpFS->startElementNS( XML_a, nTokenId, XML_idx, I32S( nIdx ), FSEND );
WriteColor( sSchemeClr, aTransformations );
mpFS->endElementNS( XML_a, nTokenId );
}
else
{
// write mock <a:*Ref> tag
- mpFS->singleElementNS( XML_a, nTokenId, XML_idx, IS( 0 ), FSEND );
+ mpFS->singleElementNS( XML_a, nTokenId, XML_idx, I32S( 0 ), FSEND );
}
}
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index 82d899ff1078..fc662db95a7b 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -450,7 +450,7 @@ ShapeExport& ShapeExport::WritePolyPolygonShape( const Reference< XShape >& xSha
{
pFS->startElementNS( mnXmlNamespace, XML_nvSpPr, FSEND );
pFS->singleElementNS( mnXmlNamespace, XML_cNvPr,
- XML_id, IS( GetNewShapeID( xShape ) ),
+ XML_id, I32S( GetNewShapeID( xShape ) ),
XML_name, IDS( Freeform ),
FSEND );
}
@@ -763,7 +763,7 @@ ShapeExport& ShapeExport::WriteCustomShape( const Reference< XShape >& xShape )
}
pFS->startElementNS( mnXmlNamespace, XML_nvSpPr, FSEND );
pFS->startElementNS( mnXmlNamespace, XML_cNvPr,
- XML_id, IS( GetNewShapeID( xShape ) ),
+ XML_id, I32S( GetNewShapeID( xShape ) ),
XML_name, IDS( CustomShape ),
XML_hidden, isVisible ? nullptr : "1",
FSEND );
@@ -1012,7 +1012,7 @@ ShapeExport& ShapeExport::WriteEllipseShape( const Reference< XShape >& xShape )
{
pFS->startElementNS( mnXmlNamespace, XML_nvSpPr, FSEND );
pFS->singleElementNS( mnXmlNamespace, XML_cNvPr,
- XML_id, IS( GetNewShapeID( xShape ) ),
+ XML_id, I32S( GetNewShapeID( xShape ) ),
XML_name, IDS( Ellipse ),
FSEND );
pFS->singleElementNS( mnXmlNamespace, XML_cNvSpPr, FSEND );
@@ -1099,7 +1099,7 @@ void ShapeExport::WriteGraphicObjectShapePart( const Reference< XShape >& xShape
mAny >>= sDescr;
pFS->singleElementNS( mnXmlNamespace, XML_cNvPr,
- XML_id, IS( GetNewShapeID( xShape ) ),
+ XML_id, I32S( GetNewShapeID( xShape ) ),
XML_name, bHaveName ? USS( sName ) : OString( "Picture " + OString::number( mnPictureIdMax++ )).getStr(),
XML_descr, bHaveDesc ? USS( sDescr ) : nullptr,
FSEND );
@@ -1208,7 +1208,7 @@ ShapeExport& ShapeExport::WriteConnectorShape( const Reference< XShape >& xShape
// non visual shape properties
pFS->startElementNS( mnXmlNamespace, XML_nvCxnSpPr, FSEND );
pFS->singleElementNS( mnXmlNamespace, XML_cNvPr,
- XML_id, IS( GetNewShapeID( xShape ) ),
+ XML_id, I32S( GetNewShapeID( xShape ) ),
XML_name, IDS( Line ),
FSEND );
// non visual connector shape drawing properties
@@ -1261,7 +1261,7 @@ ShapeExport& ShapeExport::WriteLineShape( const Reference< XShape >& xShape )
{
pFS->startElementNS( mnXmlNamespace, XML_nvSpPr, FSEND );
pFS->singleElementNS( mnXmlNamespace, XML_cNvPr,
- XML_id, IS( GetNewShapeID( xShape ) ),
+ XML_id, I32S( GetNewShapeID( xShape ) ),
XML_name, IDS( Line ),
FSEND );
}
@@ -1297,7 +1297,7 @@ ShapeExport& ShapeExport::WriteLineShape( const Reference< XShape >& xShape )
ShapeExport& ShapeExport::WriteNonVisualDrawingProperties( const Reference< XShape >& xShape, const char* pName )
{
GetFS()->singleElementNS( mnXmlNamespace, XML_cNvPr,
- XML_id, IS( GetNewShapeID( xShape ) ),
+ XML_id, I32S( GetNewShapeID( xShape ) ),
XML_name, pName,
FSEND );
@@ -1338,7 +1338,7 @@ ShapeExport& ShapeExport::WriteRectangleShape( const Reference< XShape >& xShape
pFS->singleElementNS( mnXmlNamespace, XML_cNvSpPr, FSEND );
pFS->startElementNS( mnXmlNamespace, XML_nvSpPr, FSEND );
pFS->singleElementNS( mnXmlNamespace, XML_cNvPr,
- XML_id, IS( GetNewShapeID( xShape ) ),
+ XML_id, I32S( GetNewShapeID( xShape ) ),
XML_name, IDS( Rectangle ),
FSEND );
pFS->singleElementNS( mnXmlNamespace, XML_cNvSpPr, FSEND );
@@ -1485,7 +1485,7 @@ void ShapeExport::WriteTable( const Reference< XShape >& rXShape )
sal_Int32 nWidth(0);
xColPropSet->getPropertyValue( "Width" ) >>= nWidth;
- mpFS->singleElementNS( XML_a, XML_gridCol, XML_w, IS(oox::drawingml::convertHmmToEmu(nWidth)), FSEND );
+ mpFS->singleElementNS( XML_a, XML_gridCol, XML_w, I64S(oox::drawingml::convertHmmToEmu(nWidth)), FSEND );
}
mpFS->endElementNS( XML_a, XML_tblGrid );
@@ -1501,7 +1501,7 @@ void ShapeExport::WriteTable( const Reference< XShape >& rXShape )
xRowPropSet->getPropertyValue( "Height" ) >>= nRowHeight;
- mpFS->startElementNS( XML_a, XML_tr, XML_h, IS( oox::drawingml::convertHmmToEmu( nRowHeight ) ), FSEND );
+ mpFS->startElementNS( XML_a, XML_tr, XML_h, I64S( oox::drawingml::convertHmmToEmu( nRowHeight ) ), FSEND );
for( sal_Int32 nColumn = 0; nColumn < nColumnCount; nColumn++ )
{
Reference< XMergeableCell > xCell( xTable->getCellByPosition( nColumn, nRow ),
@@ -1515,8 +1515,8 @@ void ShapeExport::WriteTable( const Reference< XShape >& rXShape )
{
// having both : horizontal and vertical merge
mpFS->startElementNS(XML_a, XML_tc, XML_gridSpan,
- IS(xCell->getColumnSpan()),
- XML_rowSpan, IS(xCell->getRowSpan()),
+ I32S(xCell->getColumnSpan()),
+ XML_rowSpan, I32S(xCell->getRowSpan()),
FSEND);
// since, XMergeableCell doesn't have the information about
// cell having hMerge or vMerge.
@@ -1538,7 +1538,7 @@ void ShapeExport::WriteTable( const Reference< XShape >& rXShape )
{
// having : horizontal merge
mpFS->startElementNS(XML_a, XML_tc, XML_gridSpan,
- IS(xCell->getColumnSpan()), FSEND);
+ I32S(xCell->getColumnSpan()), FSEND);
for(sal_Int32 columnIndex = nColumn; columnIndex < nColumn + xCell->getColumnSpan(); ++columnIndex) {
sal_Int32 transposeIndexForMergeCell = (nRow*nColumnCount) + columnIndex;
mergedCellMap[transposeIndexForMergeCell] =
@@ -1549,7 +1549,7 @@ void ShapeExport::WriteTable( const Reference< XShape >& rXShape )
{
// having : vertical merge
mpFS->startElementNS(XML_a, XML_tc, XML_rowSpan,
- IS(xCell->getRowSpan()), FSEND);
+ I32S(xCell->getRowSpan()), FSEND);
for(sal_Int32 rowIndex = nRow; rowIndex < nRow + xCell->getRowSpan(); ++rowIndex) {
sal_Int32 transposeIndexForMergeCell = (rowIndex*nColumnCount) + nColumn;
@@ -1585,15 +1585,15 @@ void ShapeExport::WriteTable( const Reference< XShape >& rXShape )
{
// vMerge and has gridSpan
mpFS->startElementNS( XML_a, XML_tc,
- XML_vMerge, IS(1),
- XML_gridSpan, IS(xCell->getColumnSpan()),
+ XML_vMerge, I32S(1),
+ XML_gridSpan, I32S(xCell->getColumnSpan()),
FSEND );
}
else
{
// only vMerge
mpFS->startElementNS( XML_a, XML_tc,
- XML_vMerge, IS(1), FSEND );
+ XML_vMerge, I32S(1), FSEND );
}
}
else if(nRow == parentRowIndex)
@@ -1603,23 +1603,23 @@ void ShapeExport::WriteTable( const Reference< XShape >& rXShape )
{
// hMerge and has rowspan
mpFS->startElementNS( XML_a, XML_tc,
- XML_hMerge, IS(1),
- XML_rowSpan, IS(xCell->getRowSpan()),
+ XML_hMerge, I32S(1),
+ XML_rowSpan, I32S(xCell->getRowSpan()),
FSEND );
}
else
{
// only hMerge
mpFS->startElementNS( XML_a, XML_tc,
- XML_hMerge, IS(1), FSEND );
+ XML_hMerge, I32S(1), FSEND );
}
}
else
{
// has hMerge and vMerge
mpFS->startElementNS( XML_a, XML_tc,
- XML_vMerge, IS(1),
- XML_hMerge, IS(1),
+ XML_vMerge, I32S(1),
+ XML_hMerge, I32S(1),
FSEND );
}
}
@@ -1660,8 +1660,8 @@ void ShapeExport::WriteTableCellProperties(const Reference< XPropertySet>& xCell
aRightMargin >>= nRightMargin;
mpFS->startElementNS( XML_a, XML_tcPr,
- XML_marL, nLeftMargin > 0 ? IS( oox::drawingml::convertHmmToEmu( nLeftMargin ) ) : nullptr,
- XML_marR, nRightMargin > 0 ? IS( oox::drawingml::convertHmmToEmu( nRightMargin ) ): nullptr,
+ XML_marL, nLeftMargin > 0 ? I32S( oox::drawingml::convertHmmToEmu( nLeftMargin ) ) : nullptr,
+ XML_marR, nRightMargin > 0 ? I32S( oox::drawingml::convertHmmToEmu( nRightMargin ) ): nullptr,
FSEND );
// Write background fill for table cell.
@@ -1688,7 +1688,7 @@ void ShapeExport::WriteTableCellBorders(const Reference< XPropertySet>& xCellPro
if(nLeftBorder > 0)
{
- mpFS->startElementNS( XML_a, XML_lnL, XML_w, IS(nLeftBorder), FSEND );
+ mpFS->startElementNS( XML_a, XML_lnL, XML_w, I32S(nLeftBorder), FSEND );
DrawingML::WriteSolidFill(aLeftBorderColor);
mpFS->endElementNS( XML_a, XML_lnL );
}
@@ -1702,7 +1702,7 @@ void ShapeExport::WriteTableCellBorders(const Reference< XPropertySet>& xCellPro
if(nRightBorder > 0)
{
- mpFS->startElementNS( XML_a, XML_lnR, XML_w, IS(nRightBorder), FSEND);
+ mpFS->startElementNS( XML_a, XML_lnR, XML_w, I32S(nRightBorder), FSEND);
DrawingML::WriteSolidFill(aRightBorderColor);
mpFS->endElementNS( XML_a, XML_lnR);
}
@@ -1716,7 +1716,7 @@ void ShapeExport::WriteTableCellBorders(const Reference< XPropertySet>& xCellPro
if(nTopBorder > 0)
{
- mpFS->startElementNS( XML_a, XML_lnT, XML_w, IS(nTopBorder), FSEND);
+ mpFS->startElementNS( XML_a, XML_lnT, XML_w, I32S(nTopBorder), FSEND);
DrawingML::WriteSolidFill(aTopBorderColor);
mpFS->endElementNS( XML_a, XML_lnT);
}
@@ -1730,7 +1730,7 @@ void ShapeExport::WriteTableCellBorders(const Reference< XPropertySet>& xCellPro
if(nBottomBorder > 0)
{
- mpFS->startElementNS( XML_a, XML_lnB, XML_w, IS(nBottomBorder), FSEND);
+ mpFS->startElementNS( XML_a, XML_lnB, XML_w, I32S(nBottomBorder), FSEND);
DrawingML::WriteSolidFill(aBottomBorderColor);
mpFS->endElementNS( XML_a, XML_lnB);
}
@@ -1745,7 +1745,7 @@ ShapeExport& ShapeExport::WriteTableShape( const Reference< XShape >& xShape )
pFS->startElementNS( mnXmlNamespace, XML_nvGraphicFramePr, FSEND );
pFS->singleElementNS( mnXmlNamespace, XML_cNvPr,
- XML_id, IS( GetNewShapeID( xShape ) ),
+ XML_id, I32S( GetNewShapeID( xShape ) ),
XML_name, IDS(Table),
FSEND );
@@ -1994,7 +1994,7 @@ ShapeExport& ShapeExport::WriteOLE2Shape( const Reference< XShape >& xShape )
mpFS->startElementNS( mnXmlNamespace, XML_nvGraphicFramePr, FSEND );
mpFS->singleElementNS( mnXmlNamespace, XML_cNvPr,
- XML_id, IS( GetNewShapeID( xShape ) ),
+ XML_id, I32S( GetNewShapeID( xShape ) ),
XML_name, IDS(Object),
FSEND );