Fix (some of) fallouts from tools::Long change to 64 bit on _WIN64
Change-Id: I297d43c594c5d8c3378e8b7f29ad798e89e4ebaf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105776 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
This commit is contained in:
@@ -189,11 +189,11 @@ void testFormats(ScBootstrapFixture* pTest, ScDocument* pDoc, sal_Int32 nFormat)
|
|||||||
const ScPatternAttr* pPattern = pDoc->GetPattern(0, 0, 1);
|
const ScPatternAttr* pPattern = pDoc->GetPattern(0, 0, 1);
|
||||||
vcl::Font aFont;
|
vcl::Font aFont;
|
||||||
pPattern->GetFont(aFont,SC_AUTOCOL_RAW);
|
pPattern->GetFont(aFont,SC_AUTOCOL_RAW);
|
||||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("font size should be 10", 200l, aFont.GetFontSize().getHeight());
|
CPPUNIT_ASSERT_EQUAL_MESSAGE("font size should be 10", tools::Long(200), aFont.GetFontSize().getHeight());
|
||||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("font color should be black", COL_AUTO, aFont.GetColor());
|
CPPUNIT_ASSERT_EQUAL_MESSAGE("font color should be black", COL_AUTO, aFont.GetColor());
|
||||||
pPattern = pDoc->GetPattern(0,1,1);
|
pPattern = pDoc->GetPattern(0,1,1);
|
||||||
pPattern->GetFont(aFont, SC_AUTOCOL_RAW);
|
pPattern->GetFont(aFont, SC_AUTOCOL_RAW);
|
||||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("font size should be 12", 240l, aFont.GetFontSize().getHeight());
|
CPPUNIT_ASSERT_EQUAL_MESSAGE("font size should be 12", tools::Long(240), aFont.GetFontSize().getHeight());
|
||||||
pPattern = pDoc->GetPattern(0,2,1);
|
pPattern = pDoc->GetPattern(0,2,1);
|
||||||
pPattern->GetFont(aFont, SC_AUTOCOL_RAW);
|
pPattern->GetFont(aFont, SC_AUTOCOL_RAW);
|
||||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("font should be italic", ITALIC_NORMAL, aFont.GetItalic());
|
CPPUNIT_ASSERT_EQUAL_MESSAGE("font should be italic", ITALIC_NORMAL, aFont.GetItalic());
|
||||||
|
@@ -776,7 +776,7 @@ void Test::testPivotTableCache()
|
|||||||
ScDPCache aCache(*m_pDoc);
|
ScDPCache aCache(*m_pDoc);
|
||||||
aCache.InitFromDoc(*m_pDoc, aDataRange);
|
aCache.InitFromDoc(*m_pDoc, aDataRange);
|
||||||
tools::Long nDimCount = aCache.GetColumnCount();
|
tools::Long nDimCount = aCache.GetColumnCount();
|
||||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("wrong dimension count.", 3L, nDimCount);
|
CPPUNIT_ASSERT_EQUAL_MESSAGE("wrong dimension count.", tools::Long(3), nDimCount);
|
||||||
OUString aDimName = aCache.GetDimensionName(0);
|
OUString aDimName = aCache.GetDimensionName(0);
|
||||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("wrong dimension name", OUString("F1"), aDimName);
|
CPPUNIT_ASSERT_EQUAL_MESSAGE("wrong dimension name", OUString("F1"), aDimName);
|
||||||
aDimName = aCache.GetDimensionName(1);
|
aDimName = aCache.GetDimensionName(1);
|
||||||
@@ -791,7 +791,7 @@ void Test::testPivotTableCache()
|
|||||||
|
|
||||||
// Dimension 0 - a mix of strings and values.
|
// Dimension 0 - a mix of strings and values.
|
||||||
tools::Long nMemCount = aCache.GetDimMemberCount(0);
|
tools::Long nMemCount = aCache.GetDimMemberCount(0);
|
||||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("wrong dimension member count", 6L, nMemCount);
|
CPPUNIT_ASSERT_EQUAL_MESSAGE("wrong dimension member count", tools::Long(6), nMemCount);
|
||||||
const ScDPItemData* pItem = aCache.GetItemDataById(0, 0);
|
const ScDPItemData* pItem = aCache.GetItemDataById(0, 0);
|
||||||
CPPUNIT_ASSERT_MESSAGE("wrong item value", pItem &&
|
CPPUNIT_ASSERT_MESSAGE("wrong item value", pItem &&
|
||||||
pItem->GetType() == ScDPItemData::Value &&
|
pItem->GetType() == ScDPItemData::Value &&
|
||||||
@@ -821,7 +821,7 @@ void Test::testPivotTableCache()
|
|||||||
|
|
||||||
// Dimension 1 - duplicate values in source.
|
// Dimension 1 - duplicate values in source.
|
||||||
nMemCount = aCache.GetDimMemberCount(1);
|
nMemCount = aCache.GetDimMemberCount(1);
|
||||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("wrong dimension member count", 3L, nMemCount);
|
CPPUNIT_ASSERT_EQUAL_MESSAGE("wrong dimension member count", tools::Long(3), nMemCount);
|
||||||
pItem = aCache.GetItemDataById(1, 0);
|
pItem = aCache.GetItemDataById(1, 0);
|
||||||
CPPUNIT_ASSERT_MESSAGE("wrong item value", pItem &&
|
CPPUNIT_ASSERT_MESSAGE("wrong item value", pItem &&
|
||||||
pItem->GetType() == ScDPItemData::String &&
|
pItem->GetType() == ScDPItemData::String &&
|
||||||
@@ -839,7 +839,7 @@ void Test::testPivotTableCache()
|
|||||||
|
|
||||||
// Dimension 2 - values only.
|
// Dimension 2 - values only.
|
||||||
nMemCount = aCache.GetDimMemberCount(2);
|
nMemCount = aCache.GetDimMemberCount(2);
|
||||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("wrong dimension member count", 6L, nMemCount);
|
CPPUNIT_ASSERT_EQUAL_MESSAGE("wrong dimension member count", tools::Long(6), nMemCount);
|
||||||
pItem = aCache.GetItemDataById(2, 0);
|
pItem = aCache.GetItemDataById(2, 0);
|
||||||
CPPUNIT_ASSERT_MESSAGE("wrong item value", pItem &&
|
CPPUNIT_ASSERT_MESSAGE("wrong item value", pItem &&
|
||||||
pItem->GetType() == ScDPItemData::Value &&
|
pItem->GetType() == ScDPItemData::Value &&
|
||||||
|
@@ -317,13 +317,13 @@ public:
|
|||||||
mpLayerManager->removeShape(pShape4);
|
mpLayerManager->removeShape(pShape4);
|
||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL_MESSAGE( "Shape 1 must have refcount of 1",
|
CPPUNIT_ASSERT_EQUAL_MESSAGE( "Shape 1 must have refcount of 1",
|
||||||
tools::Long(1), mpTestShape.use_count() );
|
1L, mpTestShape.use_count() );
|
||||||
CPPUNIT_ASSERT_EQUAL_MESSAGE( "Shape 2 must have refcount of ",
|
CPPUNIT_ASSERT_EQUAL_MESSAGE( "Shape 2 must have refcount of ",
|
||||||
tools::Long(1), pShape2.use_count() );
|
1L, pShape2.use_count() );
|
||||||
CPPUNIT_ASSERT_EQUAL_MESSAGE( "Shape 3 must have refcount of 1",
|
CPPUNIT_ASSERT_EQUAL_MESSAGE( "Shape 3 must have refcount of 1",
|
||||||
tools::Long(1), pShape3.use_count() );
|
1L, pShape3.use_count() );
|
||||||
CPPUNIT_ASSERT_EQUAL_MESSAGE( "Shape 4 must have refcount of",
|
CPPUNIT_ASSERT_EQUAL_MESSAGE( "Shape 4 must have refcount of",
|
||||||
tools::Long(1), pShape4.use_count() );
|
1L, pShape4.use_count() );
|
||||||
|
|
||||||
|
|
||||||
mpLayerManager->addShape(mpTestShape);
|
mpLayerManager->addShape(mpTestShape);
|
||||||
@@ -340,13 +340,13 @@ public:
|
|||||||
mpLayerManager->removeShape(pShape4);
|
mpLayerManager->removeShape(pShape4);
|
||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL_MESSAGE( "Shape 1 must have refcount of 1",
|
CPPUNIT_ASSERT_EQUAL_MESSAGE( "Shape 1 must have refcount of 1",
|
||||||
tools::Long(1), mpTestShape.use_count() );
|
1L, mpTestShape.use_count() );
|
||||||
CPPUNIT_ASSERT_EQUAL_MESSAGE( "Shape 2 must have refcount of ",
|
CPPUNIT_ASSERT_EQUAL_MESSAGE( "Shape 2 must have refcount of ",
|
||||||
tools::Long(1), pShape2.use_count() );
|
1L, pShape2.use_count() );
|
||||||
CPPUNIT_ASSERT_EQUAL_MESSAGE( "Shape 3 must have refcount of 1",
|
CPPUNIT_ASSERT_EQUAL_MESSAGE( "Shape 3 must have refcount of 1",
|
||||||
tools::Long(1), pShape3.use_count() );
|
1L, pShape3.use_count() );
|
||||||
CPPUNIT_ASSERT_EQUAL_MESSAGE( "Shape 4 must have refcount of 1",
|
CPPUNIT_ASSERT_EQUAL_MESSAGE( "Shape 4 must have refcount of 1",
|
||||||
tools::Long(1), pShape4.use_count() );
|
1L, pShape4.use_count() );
|
||||||
}
|
}
|
||||||
|
|
||||||
// hook up the test
|
// hook up the test
|
||||||
|
@@ -104,7 +104,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testViewBoxLeftTop)
|
|||||||
awt::Rectangle aBoundRectLR;
|
awt::Rectangle aBoundRectLR;
|
||||||
xShapeLRProps->getPropertyValue(UNO_NAME_MISC_OBJ_BOUNDRECT) >>= aBoundRectLR;
|
xShapeLRProps->getPropertyValue(UNO_NAME_MISC_OBJ_BOUNDRECT) >>= aBoundRectLR;
|
||||||
// difference should be zero, but allow some rounding errors
|
// difference should be zero, but allow some rounding errors
|
||||||
CPPUNIT_ASSERT_LESS(static_cast<tools::Long>(3), labs(aFrameRectLR.X - aBoundRectLR.X));
|
CPPUNIT_ASSERT_LESS(3L, labs(aFrameRectLR.X - aBoundRectLR.X));
|
||||||
|
|
||||||
// Get the shape "topbottom". Error was, that the identifier "top" was always set to zero, thus
|
// Get the shape "topbottom". Error was, that the identifier "top" was always set to zero, thus
|
||||||
// the path was outside the frame rectangle for a viewBox having a positive "top" value.
|
// the path was outside the frame rectangle for a viewBox having a positive "top" value.
|
||||||
@@ -116,7 +116,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testViewBoxLeftTop)
|
|||||||
awt::Rectangle aBoundRectTB;
|
awt::Rectangle aBoundRectTB;
|
||||||
xShapeTBProps->getPropertyValue(UNO_NAME_MISC_OBJ_BOUNDRECT) >>= aBoundRectTB;
|
xShapeTBProps->getPropertyValue(UNO_NAME_MISC_OBJ_BOUNDRECT) >>= aBoundRectTB;
|
||||||
// difference should be zero, but allow some rounding errors
|
// difference should be zero, but allow some rounding errors
|
||||||
CPPUNIT_ASSERT_LESS(static_cast<tools::Long>(3), labs(aFrameRectTB.Y - aBoundRectTB.Y));
|
CPPUNIT_ASSERT_LESS(3L, labs(aFrameRectTB.Y - aBoundRectTB.Y));
|
||||||
}
|
}
|
||||||
|
|
||||||
CPPUNIT_TEST_FIXTURE(CustomshapesTest, testAccuracyCommandX)
|
CPPUNIT_TEST_FIXTURE(CustomshapesTest, testAccuracyCommandX)
|
||||||
|
@@ -228,20 +228,20 @@ void BitmapFilterTest::testGenerateStripRanges()
|
|||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL(size_t(4), aRanges.size());
|
CPPUNIT_ASSERT_EQUAL(size_t(4), aRanges.size());
|
||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL(0L, std::get<0>(aRanges[0]));
|
CPPUNIT_ASSERT_EQUAL(tools::Long(0), std::get<0>(aRanges[0]));
|
||||||
CPPUNIT_ASSERT_EQUAL(31L, std::get<1>(aRanges[0]));
|
CPPUNIT_ASSERT_EQUAL(tools::Long(31), std::get<1>(aRanges[0]));
|
||||||
CPPUNIT_ASSERT_EQUAL(false, std::get<2>(aRanges[0]));
|
CPPUNIT_ASSERT_EQUAL(false, std::get<2>(aRanges[0]));
|
||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL(32L, std::get<0>(aRanges[1]));
|
CPPUNIT_ASSERT_EQUAL(tools::Long(32), std::get<0>(aRanges[1]));
|
||||||
CPPUNIT_ASSERT_EQUAL(63L, std::get<1>(aRanges[1]));
|
CPPUNIT_ASSERT_EQUAL(tools::Long(63), std::get<1>(aRanges[1]));
|
||||||
CPPUNIT_ASSERT_EQUAL(false, std::get<2>(aRanges[1]));
|
CPPUNIT_ASSERT_EQUAL(false, std::get<2>(aRanges[1]));
|
||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL(64L, std::get<0>(aRanges[2]));
|
CPPUNIT_ASSERT_EQUAL(tools::Long(64), std::get<0>(aRanges[2]));
|
||||||
CPPUNIT_ASSERT_EQUAL(95L, std::get<1>(aRanges[2]));
|
CPPUNIT_ASSERT_EQUAL(tools::Long(95), std::get<1>(aRanges[2]));
|
||||||
CPPUNIT_ASSERT_EQUAL(false, std::get<2>(aRanges[2]));
|
CPPUNIT_ASSERT_EQUAL(false, std::get<2>(aRanges[2]));
|
||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL(96L, std::get<0>(aRanges[3]));
|
CPPUNIT_ASSERT_EQUAL(tools::Long(96), std::get<0>(aRanges[3]));
|
||||||
CPPUNIT_ASSERT_EQUAL(100L, std::get<1>(aRanges[3]));
|
CPPUNIT_ASSERT_EQUAL(tools::Long(100), std::get<1>(aRanges[3]));
|
||||||
CPPUNIT_ASSERT_EQUAL(true, std::get<2>(aRanges[3]));
|
CPPUNIT_ASSERT_EQUAL(true, std::get<2>(aRanges[3]));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -260,16 +260,16 @@ void BitmapFilterTest::testGenerateStripRanges()
|
|||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL(size_t(3), aRanges.size());
|
CPPUNIT_ASSERT_EQUAL(size_t(3), aRanges.size());
|
||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL(0L, std::get<0>(aRanges[0]));
|
CPPUNIT_ASSERT_EQUAL(tools::Long(0), std::get<0>(aRanges[0]));
|
||||||
CPPUNIT_ASSERT_EQUAL(31L, std::get<1>(aRanges[0]));
|
CPPUNIT_ASSERT_EQUAL(tools::Long(31), std::get<1>(aRanges[0]));
|
||||||
CPPUNIT_ASSERT_EQUAL(false, std::get<2>(aRanges[0]));
|
CPPUNIT_ASSERT_EQUAL(false, std::get<2>(aRanges[0]));
|
||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL(32L, std::get<0>(aRanges[1]));
|
CPPUNIT_ASSERT_EQUAL(tools::Long(32), std::get<0>(aRanges[1]));
|
||||||
CPPUNIT_ASSERT_EQUAL(63L, std::get<1>(aRanges[1]));
|
CPPUNIT_ASSERT_EQUAL(tools::Long(63), std::get<1>(aRanges[1]));
|
||||||
CPPUNIT_ASSERT_EQUAL(false, std::get<2>(aRanges[1]));
|
CPPUNIT_ASSERT_EQUAL(false, std::get<2>(aRanges[1]));
|
||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL(64L, std::get<0>(aRanges[2]));
|
CPPUNIT_ASSERT_EQUAL(tools::Long(64), std::get<0>(aRanges[2]));
|
||||||
CPPUNIT_ASSERT_EQUAL(95L, std::get<1>(aRanges[2]));
|
CPPUNIT_ASSERT_EQUAL(tools::Long(95), std::get<1>(aRanges[2]));
|
||||||
CPPUNIT_ASSERT_EQUAL(true, std::get<2>(aRanges[2]));
|
CPPUNIT_ASSERT_EQUAL(true, std::get<2>(aRanges[2]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -64,8 +64,8 @@ void GraphicDescriptorTest::testDetectPNG()
|
|||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL(GraphicFileFormat::PNG, aDescriptor.GetFileFormat());
|
CPPUNIT_ASSERT_EQUAL(GraphicFileFormat::PNG, aDescriptor.GetFileFormat());
|
||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL(100L, aDescriptor.GetSizePixel().Width());
|
CPPUNIT_ASSERT_EQUAL(tools::Long(100), aDescriptor.GetSizePixel().Width());
|
||||||
CPPUNIT_ASSERT_EQUAL(100L, aDescriptor.GetSizePixel().Height());
|
CPPUNIT_ASSERT_EQUAL(tools::Long(100), aDescriptor.GetSizePixel().Height());
|
||||||
}
|
}
|
||||||
|
|
||||||
void GraphicDescriptorTest::testDetectJPG()
|
void GraphicDescriptorTest::testDetectJPG()
|
||||||
@@ -78,8 +78,8 @@ void GraphicDescriptorTest::testDetectJPG()
|
|||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL(GraphicFileFormat::JPG, aDescriptor.GetFileFormat());
|
CPPUNIT_ASSERT_EQUAL(GraphicFileFormat::JPG, aDescriptor.GetFileFormat());
|
||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL(100L, aDescriptor.GetSizePixel().Width());
|
CPPUNIT_ASSERT_EQUAL(tools::Long(100), aDescriptor.GetSizePixel().Width());
|
||||||
CPPUNIT_ASSERT_EQUAL(100L, aDescriptor.GetSizePixel().Height());
|
CPPUNIT_ASSERT_EQUAL(tools::Long(100), aDescriptor.GetSizePixel().Height());
|
||||||
}
|
}
|
||||||
|
|
||||||
void GraphicDescriptorTest::testDetectGIF()
|
void GraphicDescriptorTest::testDetectGIF()
|
||||||
@@ -92,8 +92,8 @@ void GraphicDescriptorTest::testDetectGIF()
|
|||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL(GraphicFileFormat::GIF, aDescriptor.GetFileFormat());
|
CPPUNIT_ASSERT_EQUAL(GraphicFileFormat::GIF, aDescriptor.GetFileFormat());
|
||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL(100L, aDescriptor.GetSizePixel().Width());
|
CPPUNIT_ASSERT_EQUAL(tools::Long(100), aDescriptor.GetSizePixel().Width());
|
||||||
CPPUNIT_ASSERT_EQUAL(100L, aDescriptor.GetSizePixel().Height());
|
CPPUNIT_ASSERT_EQUAL(tools::Long(100), aDescriptor.GetSizePixel().Height());
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
@@ -195,13 +195,13 @@ void GraphicTest::testUnloadedGraphic()
|
|||||||
// check GetSizePixel doesn't load graphic
|
// check GetSizePixel doesn't load graphic
|
||||||
aGraphic = makeUnloadedGraphic("png");
|
aGraphic = makeUnloadedGraphic("png");
|
||||||
CPPUNIT_ASSERT_EQUAL(false, aGraphic.isAvailable());
|
CPPUNIT_ASSERT_EQUAL(false, aGraphic.isAvailable());
|
||||||
CPPUNIT_ASSERT_EQUAL(120L, aGraphic.GetSizePixel().Width());
|
CPPUNIT_ASSERT_EQUAL(tools::Long(120), aGraphic.GetSizePixel().Width());
|
||||||
CPPUNIT_ASSERT_EQUAL(100L, aGraphic.GetSizePixel().Height());
|
CPPUNIT_ASSERT_EQUAL(tools::Long(100), aGraphic.GetSizePixel().Height());
|
||||||
CPPUNIT_ASSERT_EQUAL(false, aGraphic.isAvailable());
|
CPPUNIT_ASSERT_EQUAL(false, aGraphic.isAvailable());
|
||||||
|
|
||||||
// check GetPrefSize doesn't load graphic
|
// check GetPrefSize doesn't load graphic
|
||||||
CPPUNIT_ASSERT_EQUAL(6000L, aGraphic.GetPrefSize().Width());
|
CPPUNIT_ASSERT_EQUAL(tools::Long(6000), aGraphic.GetPrefSize().Width());
|
||||||
CPPUNIT_ASSERT_EQUAL(5000L, aGraphic.GetPrefSize().Height());
|
CPPUNIT_ASSERT_EQUAL(tools::Long(5000), aGraphic.GetPrefSize().Height());
|
||||||
CPPUNIT_ASSERT_EQUAL(false, aGraphic.isAvailable());
|
CPPUNIT_ASSERT_EQUAL(false, aGraphic.isAvailable());
|
||||||
|
|
||||||
// check GetSizeBytes loads graphic
|
// check GetSizeBytes loads graphic
|
||||||
@@ -228,8 +228,8 @@ void GraphicTest::testUnloadedGraphicLoading()
|
|||||||
|
|
||||||
// check available
|
// check available
|
||||||
CPPUNIT_ASSERT_EQUAL(false, aGraphic.isAvailable());
|
CPPUNIT_ASSERT_EQUAL(false, aGraphic.isAvailable());
|
||||||
CPPUNIT_ASSERT_EQUAL(120L, aGraphic.GetSizePixel().Width());
|
CPPUNIT_ASSERT_EQUAL(tools::Long(120), aGraphic.GetSizePixel().Width());
|
||||||
CPPUNIT_ASSERT_EQUAL(100L, aGraphic.GetSizePixel().Height());
|
CPPUNIT_ASSERT_EQUAL(tools::Long(100), aGraphic.GetSizePixel().Height());
|
||||||
CPPUNIT_ASSERT_EQUAL(false, aGraphic.isAvailable());
|
CPPUNIT_ASSERT_EQUAL(false, aGraphic.isAvailable());
|
||||||
CPPUNIT_ASSERT(aGraphic.GetSizeBytes() > 0);
|
CPPUNIT_ASSERT(aGraphic.GetSizeBytes() > 0);
|
||||||
CPPUNIT_ASSERT_EQUAL(true, aGraphic.isAvailable());
|
CPPUNIT_ASSERT_EQUAL(true, aGraphic.isAvailable());
|
||||||
@@ -307,8 +307,8 @@ void GraphicTest::testSwapping()
|
|||||||
CPPUNIT_ASSERT_EQUAL(true, aGraphic.makeAvailable());
|
CPPUNIT_ASSERT_EQUAL(true, aGraphic.makeAvailable());
|
||||||
CPPUNIT_ASSERT_EQUAL(true, aGraphic.isAvailable());
|
CPPUNIT_ASSERT_EQUAL(true, aGraphic.isAvailable());
|
||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL(120L, aGraphic.GetSizePixel().Width());
|
CPPUNIT_ASSERT_EQUAL(tools::Long(120), aGraphic.GetSizePixel().Width());
|
||||||
CPPUNIT_ASSERT_EQUAL(100L, aGraphic.GetSizePixel().Height());
|
CPPUNIT_ASSERT_EQUAL(tools::Long(100), aGraphic.GetSizePixel().Height());
|
||||||
|
|
||||||
BitmapChecksum aChecksumBeforeSwapping = aGraphic.GetChecksum();
|
BitmapChecksum aChecksumBeforeSwapping = aGraphic.GetChecksum();
|
||||||
|
|
||||||
@@ -357,8 +357,8 @@ void GraphicTest::testSwapping()
|
|||||||
CPPUNIT_ASSERT_EQUAL(false, comphelper::DirectoryHelper::fileExists(rSwapFileURL));
|
CPPUNIT_ASSERT_EQUAL(false, comphelper::DirectoryHelper::fileExists(rSwapFileURL));
|
||||||
|
|
||||||
// Check the bitmap
|
// Check the bitmap
|
||||||
CPPUNIT_ASSERT_EQUAL(120L, aGraphic.GetSizePixel().Width());
|
CPPUNIT_ASSERT_EQUAL(tools::Long(120), aGraphic.GetSizePixel().Width());
|
||||||
CPPUNIT_ASSERT_EQUAL(100L, aGraphic.GetSizePixel().Height());
|
CPPUNIT_ASSERT_EQUAL(tools::Long(100), aGraphic.GetSizePixel().Height());
|
||||||
CPPUNIT_ASSERT_EQUAL(true, checkBitmap(aGraphic));
|
CPPUNIT_ASSERT_EQUAL(true, checkBitmap(aGraphic));
|
||||||
CPPUNIT_ASSERT_EQUAL(true, checkBitmap(aGraphic));
|
CPPUNIT_ASSERT_EQUAL(true, checkBitmap(aGraphic));
|
||||||
}
|
}
|
||||||
|
@@ -83,12 +83,12 @@ void VclComplexTextTest::testArabic()
|
|||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL(aRefCharWidths, aCharWidths);
|
CPPUNIT_ASSERT_EQUAL(aRefCharWidths, aCharWidths);
|
||||||
// this sporadically returns 75 or 74 on some of the windows tinderboxes eg. tb73
|
// this sporadically returns 75 or 74 on some of the windows tinderboxes eg. tb73
|
||||||
CPPUNIT_ASSERT_EQUAL(72L, nTextWidth);
|
CPPUNIT_ASSERT_EQUAL(tools::Long(72), nTextWidth);
|
||||||
CPPUNIT_ASSERT_EQUAL(nTextWidth, aCharWidths.back());
|
CPPUNIT_ASSERT_EQUAL(nTextWidth, aCharWidths.back());
|
||||||
|
|
||||||
// text advance width and line height
|
// text advance width and line height
|
||||||
CPPUNIT_ASSERT_EQUAL(72L, pOutDev->GetTextWidth(aOneTwoThree));
|
CPPUNIT_ASSERT_EQUAL(tools::Long(72), pOutDev->GetTextWidth(aOneTwoThree));
|
||||||
CPPUNIT_ASSERT_EQUAL(14L, pOutDev->GetTextHeight());
|
CPPUNIT_ASSERT_EQUAL(tools::Long(14), pOutDev->GetTextHeight());
|
||||||
|
|
||||||
// exact bounding rectangle, not essentially the same as text width/height
|
// exact bounding rectangle, not essentially the same as text width/height
|
||||||
tools::Rectangle aBoundRect, aTestRect( 0, 1, 71, 15 );
|
tools::Rectangle aBoundRect, aTestRect( 0, 1, 71, 15 );
|
||||||
|
@@ -49,27 +49,27 @@ void VclFontMetricTest::testSpacings()
|
|||||||
// default constructor should set scalable flag to false
|
// default constructor should set scalable flag to false
|
||||||
FontMetric aFontMetric;
|
FontMetric aFontMetric;
|
||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL( 0L, aFontMetric.GetAscent() );
|
CPPUNIT_ASSERT_EQUAL(tools::Long(0), aFontMetric.GetAscent());
|
||||||
CPPUNIT_ASSERT_EQUAL( 0L, aFontMetric.GetDescent() );
|
CPPUNIT_ASSERT_EQUAL(tools::Long(0), aFontMetric.GetDescent());
|
||||||
CPPUNIT_ASSERT_EQUAL( 0L, aFontMetric.GetExternalLeading() );
|
CPPUNIT_ASSERT_EQUAL(tools::Long(0), aFontMetric.GetExternalLeading());
|
||||||
CPPUNIT_ASSERT_EQUAL( 0L, aFontMetric.GetInternalLeading() );
|
CPPUNIT_ASSERT_EQUAL(tools::Long(0), aFontMetric.GetInternalLeading());
|
||||||
CPPUNIT_ASSERT_EQUAL( 0L, aFontMetric.GetLineHeight() );
|
CPPUNIT_ASSERT_EQUAL(tools::Long(0), aFontMetric.GetLineHeight());
|
||||||
|
|
||||||
|
|
||||||
aFontMetric.SetAscent( 100 );
|
aFontMetric.SetAscent( 100 );
|
||||||
CPPUNIT_ASSERT_EQUAL( 100L, aFontMetric.GetAscent() );
|
CPPUNIT_ASSERT_EQUAL(tools::Long(100), aFontMetric.GetAscent());
|
||||||
|
|
||||||
aFontMetric.SetDescent( 100 );
|
aFontMetric.SetDescent( 100 );
|
||||||
CPPUNIT_ASSERT_EQUAL( 100L, aFontMetric.GetDescent() );
|
CPPUNIT_ASSERT_EQUAL(tools::Long(100), aFontMetric.GetDescent());
|
||||||
|
|
||||||
aFontMetric.SetExternalLeading( 100 );
|
aFontMetric.SetExternalLeading( 100 );
|
||||||
CPPUNIT_ASSERT_EQUAL( 100L, aFontMetric.GetExternalLeading() );
|
CPPUNIT_ASSERT_EQUAL(tools::Long(100), aFontMetric.GetExternalLeading());
|
||||||
|
|
||||||
aFontMetric.SetInternalLeading( 100 );
|
aFontMetric.SetInternalLeading( 100 );
|
||||||
CPPUNIT_ASSERT_EQUAL( 100L, aFontMetric.GetInternalLeading() );
|
CPPUNIT_ASSERT_EQUAL(tools::Long(100), aFontMetric.GetInternalLeading());
|
||||||
|
|
||||||
aFontMetric.SetLineHeight( 100 );
|
aFontMetric.SetLineHeight( 100 );
|
||||||
CPPUNIT_ASSERT_EQUAL( 100L, aFontMetric.GetLineHeight() );
|
CPPUNIT_ASSERT_EQUAL(tools::Long(100), aFontMetric.GetLineHeight());
|
||||||
}
|
}
|
||||||
|
|
||||||
void VclFontMetricTest::testSlant()
|
void VclFontMetricTest::testSlant()
|
||||||
@@ -77,10 +77,10 @@ void VclFontMetricTest::testSlant()
|
|||||||
// default constructor should set scalable flag to false
|
// default constructor should set scalable flag to false
|
||||||
FontMetric aFontMetric;
|
FontMetric aFontMetric;
|
||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL( 0L, aFontMetric.GetSlant() );
|
CPPUNIT_ASSERT_EQUAL(tools::Long(0), aFontMetric.GetSlant());
|
||||||
|
|
||||||
aFontMetric.SetSlant( 45 );
|
aFontMetric.SetSlant( 45 );
|
||||||
CPPUNIT_ASSERT_EQUAL( 45L, aFontMetric.GetSlant() );
|
CPPUNIT_ASSERT_EQUAL(tools::Long(45), aFontMetric.GetSlant());
|
||||||
}
|
}
|
||||||
|
|
||||||
void VclFontMetricTest::testBulletOffset()
|
void VclFontMetricTest::testBulletOffset()
|
||||||
@@ -88,10 +88,10 @@ void VclFontMetricTest::testBulletOffset()
|
|||||||
// default constructor should set scalable flag to false
|
// default constructor should set scalable flag to false
|
||||||
FontMetric aFontMetric;
|
FontMetric aFontMetric;
|
||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL( 0L, aFontMetric.GetBulletOffset() );
|
CPPUNIT_ASSERT_EQUAL(tools::Long(0), aFontMetric.GetBulletOffset());
|
||||||
|
|
||||||
aFontMetric.SetBulletOffset( 45 );
|
aFontMetric.SetBulletOffset( 45 );
|
||||||
CPPUNIT_ASSERT_EQUAL( 45L, aFontMetric.GetBulletOffset() );
|
CPPUNIT_ASSERT_EQUAL(tools::Long(45), aFontMetric.GetBulletOffset());
|
||||||
}
|
}
|
||||||
|
|
||||||
void VclFontMetricTest::testEqualityOperator()
|
void VclFontMetricTest::testEqualityOperator()
|
||||||
|
@@ -128,8 +128,8 @@ void VclFiltersTest::checkExportImport(const OUString& aFilterShortName)
|
|||||||
BitmapEx aLoadedBitmapEx = aLoadedGraphic.GetBitmapEx();
|
BitmapEx aLoadedBitmapEx = aLoadedGraphic.GetBitmapEx();
|
||||||
Size aSize = aLoadedBitmapEx.GetSizePixel();
|
Size aSize = aLoadedBitmapEx.GetSizePixel();
|
||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL(100L, aSize.Width());
|
CPPUNIT_ASSERT_EQUAL(tools::Long(100), aSize.Width());
|
||||||
CPPUNIT_ASSERT_EQUAL(100L, aSize.Height());
|
CPPUNIT_ASSERT_EQUAL(tools::Long(100), aSize.Height());
|
||||||
}
|
}
|
||||||
|
|
||||||
void VclFiltersTest::testExportImport()
|
void VclFiltersTest::testExportImport()
|
||||||
|
@@ -112,8 +112,8 @@ void JpegReaderTest::testReadRGB()
|
|||||||
Graphic aGraphic = loadJPG(getFullUrl("JPEGTestRGB.jpeg"));
|
Graphic aGraphic = loadJPG(getFullUrl("JPEGTestRGB.jpeg"));
|
||||||
Bitmap aBitmap = aGraphic.GetBitmapEx().GetBitmap();
|
Bitmap aBitmap = aGraphic.GetBitmapEx().GetBitmap();
|
||||||
Size aSize = aBitmap.GetSizePixel();
|
Size aSize = aBitmap.GetSizePixel();
|
||||||
CPPUNIT_ASSERT_EQUAL(12L, aSize.Width());
|
CPPUNIT_ASSERT_EQUAL(tools::Long(12), aSize.Width());
|
||||||
CPPUNIT_ASSERT_EQUAL(12L, aSize.Height());
|
CPPUNIT_ASSERT_EQUAL(tools::Long(12), aSize.Height());
|
||||||
|
|
||||||
int nMaxDelta = 1; // still acceptable color error
|
int nMaxDelta = 1; // still acceptable color error
|
||||||
CPPUNIT_ASSERT(checkRect(aBitmap, 0, 8, 8, Color(0xff, 0xff, 0xff), nMaxDelta));
|
CPPUNIT_ASSERT(checkRect(aBitmap, 0, 8, 8, Color(0xff, 0xff, 0xff), nMaxDelta));
|
||||||
@@ -129,8 +129,8 @@ void JpegReaderTest::testReadGray()
|
|||||||
Graphic aGraphic = loadJPG(getFullUrl("JPEGTestGray.jpeg"));
|
Graphic aGraphic = loadJPG(getFullUrl("JPEGTestGray.jpeg"));
|
||||||
Bitmap aBitmap = aGraphic.GetBitmapEx().GetBitmap();
|
Bitmap aBitmap = aGraphic.GetBitmapEx().GetBitmap();
|
||||||
Size aSize = aBitmap.GetSizePixel();
|
Size aSize = aBitmap.GetSizePixel();
|
||||||
CPPUNIT_ASSERT_EQUAL(12L, aSize.Width());
|
CPPUNIT_ASSERT_EQUAL(tools::Long(12), aSize.Width());
|
||||||
CPPUNIT_ASSERT_EQUAL(12L, aSize.Height());
|
CPPUNIT_ASSERT_EQUAL(tools::Long(12), aSize.Height());
|
||||||
|
|
||||||
aBitmap.Convert(BmpConversion::N24Bit); // convert to 24bit so we don't need to deal with palette
|
aBitmap.Convert(BmpConversion::N24Bit); // convert to 24bit so we don't need to deal with palette
|
||||||
|
|
||||||
@@ -148,8 +148,8 @@ void JpegReaderTest::testReadCMYK()
|
|||||||
Graphic aGraphic = loadJPG(getFullUrl("JPEGTestCMYK.jpeg"));
|
Graphic aGraphic = loadJPG(getFullUrl("JPEGTestCMYK.jpeg"));
|
||||||
Bitmap aBitmap = aGraphic.GetBitmapEx().GetBitmap();
|
Bitmap aBitmap = aGraphic.GetBitmapEx().GetBitmap();
|
||||||
Size aSize = aBitmap.GetSizePixel();
|
Size aSize = aBitmap.GetSizePixel();
|
||||||
CPPUNIT_ASSERT_EQUAL(12L, aSize.Width());
|
CPPUNIT_ASSERT_EQUAL(tools::Long(12), aSize.Width());
|
||||||
CPPUNIT_ASSERT_EQUAL(12L, aSize.Height());
|
CPPUNIT_ASSERT_EQUAL(tools::Long(12), aSize.Height());
|
||||||
|
|
||||||
int maxDelta = 1;
|
int maxDelta = 1;
|
||||||
CPPUNIT_ASSERT(checkRect(aBitmap, 0, 8, 8, Color(0xff, 0xff, 0xff), maxDelta));
|
CPPUNIT_ASSERT(checkRect(aBitmap, 0, 8, 8, Color(0xff, 0xff, 0xff), maxDelta));
|
||||||
|
@@ -61,8 +61,8 @@ void PngFilterTest::testPng()
|
|||||||
Bitmap aBitmap = aBitmapEx.GetBitmap();
|
Bitmap aBitmap = aBitmapEx.GetBitmap();
|
||||||
{
|
{
|
||||||
Bitmap::ScopedReadAccess pAccess(aBitmap);
|
Bitmap::ScopedReadAccess pAccess(aBitmap);
|
||||||
CPPUNIT_ASSERT_EQUAL(4L, pAccess->Width());
|
CPPUNIT_ASSERT_EQUAL(tools::Long(4), pAccess->Width());
|
||||||
CPPUNIT_ASSERT_EQUAL(4L, pAccess->Height());
|
CPPUNIT_ASSERT_EQUAL(tools::Long(4), pAccess->Height());
|
||||||
|
|
||||||
if (pAccess->GetBitCount() == 24 || pAccess->GetBitCount() == 32)
|
if (pAccess->GetBitCount() == 24 || pAccess->GetBitCount() == 32)
|
||||||
{
|
{
|
||||||
@@ -94,8 +94,8 @@ void PngFilterTest::testPng()
|
|||||||
Bitmap aBitmap = aBitmapEx.GetBitmap();
|
Bitmap aBitmap = aBitmapEx.GetBitmap();
|
||||||
{
|
{
|
||||||
Bitmap::ScopedReadAccess pAccess(aBitmap);
|
Bitmap::ScopedReadAccess pAccess(aBitmap);
|
||||||
CPPUNIT_ASSERT_EQUAL(4L, pAccess->Width());
|
CPPUNIT_ASSERT_EQUAL(tools::Long(4), pAccess->Width());
|
||||||
CPPUNIT_ASSERT_EQUAL(4L, pAccess->Height());
|
CPPUNIT_ASSERT_EQUAL(tools::Long(4), pAccess->Height());
|
||||||
if (pAccess->GetBitCount() == 24 || pAccess->GetBitCount() == 32)
|
if (pAccess->GetBitCount() == 24 || pAccess->GetBitCount() == 32)
|
||||||
{
|
{
|
||||||
CPPUNIT_ASSERT_EQUAL(BitmapColor(0xFF, 0xFF, 0xFF, 0x00), pAccess->GetPixel(0, 0));
|
CPPUNIT_ASSERT_EQUAL(BitmapColor(0xFF, 0xFF, 0xFF, 0x00), pAccess->GetPixel(0, 0));
|
||||||
@@ -125,8 +125,8 @@ void PngFilterTest::testPng()
|
|||||||
Bitmap aBitmap = aBitmapEx.GetBitmap();
|
Bitmap aBitmap = aBitmapEx.GetBitmap();
|
||||||
{
|
{
|
||||||
Bitmap::ScopedReadAccess pAccess(aBitmap);
|
Bitmap::ScopedReadAccess pAccess(aBitmap);
|
||||||
CPPUNIT_ASSERT_EQUAL(4L, pAccess->Width());
|
CPPUNIT_ASSERT_EQUAL(tools::Long(4), pAccess->Width());
|
||||||
CPPUNIT_ASSERT_EQUAL(4L, pAccess->Height());
|
CPPUNIT_ASSERT_EQUAL(tools::Long(4), pAccess->Height());
|
||||||
|
|
||||||
if (pAccess->GetBitCount() == 24)
|
if (pAccess->GetBitCount() == 24)
|
||||||
{
|
{
|
||||||
@@ -144,8 +144,8 @@ void PngFilterTest::testPng()
|
|||||||
{
|
{
|
||||||
AlphaMask::ScopedReadAccess pAlphaAccess(aAlpha);
|
AlphaMask::ScopedReadAccess pAlphaAccess(aAlpha);
|
||||||
CPPUNIT_ASSERT_EQUAL(sal_uInt16(8), pAlphaAccess->GetBitCount());
|
CPPUNIT_ASSERT_EQUAL(sal_uInt16(8), pAlphaAccess->GetBitCount());
|
||||||
CPPUNIT_ASSERT_EQUAL(4L, pAlphaAccess->Width());
|
CPPUNIT_ASSERT_EQUAL(tools::Long(4), pAlphaAccess->Width());
|
||||||
CPPUNIT_ASSERT_EQUAL(4L, pAlphaAccess->Height());
|
CPPUNIT_ASSERT_EQUAL(tools::Long(4), pAlphaAccess->Height());
|
||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL(BitmapColor(0x00, 0x00, 0x80, 0x00),
|
CPPUNIT_ASSERT_EQUAL(BitmapColor(0x00, 0x00, 0x80, 0x00),
|
||||||
pAlphaAccess->GetPixel(0, 0));
|
pAlphaAccess->GetPixel(0, 0));
|
||||||
|
@@ -182,7 +182,7 @@ void WPXSvStreamTest::testRead()
|
|||||||
void WPXSvStreamTest::testSeekSet()
|
void WPXSvStreamTest::testSeekSet()
|
||||||
{
|
{
|
||||||
const shared_ptr<RVNGInputStream> pInput(lcl_createStream());
|
const shared_ptr<RVNGInputStream> pInput(lcl_createStream());
|
||||||
const tools::Long nLen = sizeof aText;
|
const long nLen = sizeof aText;
|
||||||
|
|
||||||
// check initial state
|
// check initial state
|
||||||
CPPUNIT_ASSERT_EQUAL(0L, pInput->tell());
|
CPPUNIT_ASSERT_EQUAL(0L, pInput->tell());
|
||||||
@@ -220,7 +220,7 @@ void WPXSvStreamTest::testSeekSet()
|
|||||||
void WPXSvStreamTest::testSeekCur()
|
void WPXSvStreamTest::testSeekCur()
|
||||||
{
|
{
|
||||||
const shared_ptr<RVNGInputStream> pInput(lcl_createStream());
|
const shared_ptr<RVNGInputStream> pInput(lcl_createStream());
|
||||||
const tools::Long nLen = sizeof aText;
|
const long nLen = sizeof aText;
|
||||||
|
|
||||||
// check initial state
|
// check initial state
|
||||||
CPPUNIT_ASSERT(!pInput->isEnd());
|
CPPUNIT_ASSERT(!pInput->isEnd());
|
||||||
@@ -257,7 +257,7 @@ void WPXSvStreamTest::testSeekCur()
|
|||||||
void WPXSvStreamTest::testSeekEnd()
|
void WPXSvStreamTest::testSeekEnd()
|
||||||
{
|
{
|
||||||
const shared_ptr<RVNGInputStream> pInput(lcl_createStream());
|
const shared_ptr<RVNGInputStream> pInput(lcl_createStream());
|
||||||
const tools::Long nLen = sizeof aText;
|
const long nLen = sizeof aText;
|
||||||
|
|
||||||
// check initial state
|
// check initial state
|
||||||
CPPUNIT_ASSERT(!pInput->isEnd());
|
CPPUNIT_ASSERT(!pInput->isEnd());
|
||||||
|
Reference in New Issue
Block a user