summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel <noelgrandin@gmail.com>2020-10-15 14:26:35 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-10-16 11:12:31 +0200
commit87c90cec38c43efbbd9cbfad1f0f607f428043d4 (patch)
treeb65b6ccc78a4a922c027f98e4d8ab5251fdf33bb /sc
parent9b34dc20b6946698ae6ce2d5d859885bfb444633 (diff)
fix some *printf which are using "%l" ie. long specifiers
which are not portable between Linux and Windows because long is not portable. In preparation for converting long -> tools::Long Change-Id: I8bf1aa1570946ca887a6c83dd5f99c024d437336 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104374 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r--sc/qa/unit/filters-test.cxx8
-rw-r--r--sc/source/filter/xcl97/xcl97rec.cxx6
2 files changed, 7 insertions, 7 deletions
diff --git a/sc/qa/unit/filters-test.cxx b/sc/qa/unit/filters-test.cxx
index 43c3483bb281..c537baeb53f4 100644
--- a/sc/qa/unit/filters-test.cxx
+++ b/sc/qa/unit/filters-test.cxx
@@ -498,13 +498,13 @@ static void impl_testLegacyCellAnchoredRotatedShape( ScDocument& rDoc, const too
SdrObject* pObj = pPage->GetObj(0);
const tools::Rectangle& aSnap = pObj->GetSnapRect();
- printf("expected height %ld actual %ld\n", aRect.GetHeight(), aSnap.GetHeight() );
+ printf("expected height %" SAL_PRIdINT64 " actual %" SAL_PRIdINT64 "\n", sal_Int64(aRect.GetHeight()), sal_Int64(aSnap.GetHeight()) );
CPPUNIT_ASSERT_EQUAL( true, testEqualsWithTolerance( aRect.GetHeight(), aSnap.GetHeight(), TOLERANCE ) );
- printf("expected width %ld actual %ld\n", aRect.GetWidth(), aSnap.GetWidth() );
+ printf("expected width %" SAL_PRIdINT64 " actual %" SAL_PRIdINT64 "\n", sal_Int64(aRect.GetWidth()), sal_Int64(aSnap.GetWidth()) );
CPPUNIT_ASSERT_EQUAL( true, testEqualsWithTolerance( aRect.GetWidth(), aSnap.GetWidth(), TOLERANCE ) );
- printf("expected left %ld actual %ld\n", aRect.Left(), aSnap.Left() );
+ printf("expected left %" SAL_PRIdINT64 " actual %" SAL_PRIdINT64 "\n", sal_Int64(aRect.Left()), sal_Int64(aSnap.Left()) );
CPPUNIT_ASSERT_EQUAL( true, testEqualsWithTolerance( aRect.Left(), aSnap.Left(), TOLERANCE ) );
- printf("expected right %ld actual %ld\n", aRect.Top(), aSnap.Top() );
+ printf("expected right %" SAL_PRIdINT64 " actual %" SAL_PRIdINT64 "\n", sal_Int64(aRect.Top()), sal_Int64(aSnap.Top()) );
CPPUNIT_ASSERT_EQUAL( true, testEqualsWithTolerance( aRect.Top(), aSnap.Top(), TOLERANCE ) );
ScDrawObjData* pData = ScDrawLayer::GetObjData( pObj );
diff --git a/sc/source/filter/xcl97/xcl97rec.cxx b/sc/source/filter/xcl97/xcl97rec.cxx
index ef952278e0eb..4bf9b3a2e673 100644
--- a/sc/source/filter/xcl97/xcl97rec.cxx
+++ b/sc/source/filter/xcl97/xcl97rec.cxx
@@ -731,9 +731,9 @@ void VmlCommentExporter::EndShape( sal_Int32 nShapeElement )
{
char pAnchor[100];
sax_fastparser::FSHelperPtr pVmlDrawing = GetFS();
- snprintf( pAnchor, 100, "%ld, %ld, %ld, %ld, %ld, %ld, %ld, %ld",
- maFrom.Left(), maFrom.Top(), maFrom.Right(), maFrom.Bottom(),
- maTo.Left(), maTo.Top(), maTo.Right(), maTo.Bottom() );
+ snprintf( pAnchor, 100, "%" SAL_PRIdINT64 ", %" SAL_PRIdINT64 ", %" SAL_PRIdINT64 ", %" SAL_PRIdINT64 ", %" SAL_PRIdINT64 ", %" SAL_PRIdINT64 ", %" SAL_PRIdINT64 ", %" SAL_PRIdINT64,
+ sal_Int64(maFrom.Left()), sal_Int64(maFrom.Top()), sal_Int64(maFrom.Right()), sal_Int64(maFrom.Bottom()),
+ sal_Int64(maTo.Left()), sal_Int64(maTo.Top()), sal_Int64(maTo.Right()), sal_Int64(maTo.Bottom()) );
// Getting comment text alignments
const char* pVertAlign = lcl_GetVertAlignFromItemSetChar(mpCaption->GetMergedItemSet());