[Libreoffice-commits] core.git: 2 commits - sw/qa writerfilter/source
Miklos Vajna
vmiklos at suse.cz
Thu Mar 28 08:57:57 PDT 2013
sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 2 +-
sw/qa/extras/rtfimport/rtfimport.cxx | 4 ++--
writerfilter/source/dmapper/DomainMapperTableManager.cxx | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
New commits:
commit 584322cbbd063e0a8d2c18a5e6a12f213af56057
Author: Miklos Vajna <vmiklos at suse.cz>
Date: Thu Mar 28 16:47:28 2013 +0100
fix failing testcases
Change-Id: I2f4deaca308b64f1dc923e3d0a9c10c6f974a33b
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index e3f1618..bf153a2 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -1297,7 +1297,7 @@ void Test::testFdo59273()
uno::Reference<text::XTextTable> xTextTable(xTables->getByIndex(0), uno::UNO_QUERY);
uno::Reference<table::XTableRows> xTableRows(xTextTable->getRows(), uno::UNO_QUERY);
// Was 9997, so the 4th column had ~zero width
- CPPUNIT_ASSERT_EQUAL(sal_Int16(7498), getProperty< uno::Sequence<text::TableColumnSeparator> >(xTableRows->getByIndex(0), "TableColumnSeparators")[2].Position);
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(7499), getProperty< uno::Sequence<text::TableColumnSeparator> >(xTableRows->getByIndex(0), "TableColumnSeparators")[2].Position);
}
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx
index 895082a..b19bd4d 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -1000,7 +1000,7 @@ void Test::testFdo55525()
CPPUNIT_ASSERT_EQUAL(sal_Int32(-1877), getProperty<sal_Int32>(xTable, "LeftMargin"));
// Cell width of A1 was 3332 (e.g. not set, 30% percent of total width)
uno::Reference<table::XTableRows> xTableRows(xTable->getRows(), uno::UNO_QUERY);
- CPPUNIT_ASSERT_EQUAL(sal_Int16(1016), getProperty< uno::Sequence<text::TableColumnSeparator> >(xTableRows->getByIndex(0), "TableColumnSeparators")[0].Position);
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(896), getProperty< uno::Sequence<text::TableColumnSeparator> >(xTableRows->getByIndex(0), "TableColumnSeparators")[0].Position);
}
void Test::testFdo57708()
@@ -1133,7 +1133,7 @@ void Test::testFdo59953()
uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
// Cell width of A1 was 4998 (e.g. not set / not wide enough, ~50% of total width)
uno::Reference<table::XTableRows> xTableRows(xTable->getRows(), uno::UNO_QUERY);
- CPPUNIT_ASSERT_EQUAL(sal_Int16(7650), getProperty< uno::Sequence<text::TableColumnSeparator> >(xTableRows->getByIndex(0), "TableColumnSeparators")[0].Position);
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(7649), getProperty< uno::Sequence<text::TableColumnSeparator> >(xTableRows->getByIndex(0), "TableColumnSeparators")[0].Position);
}
void Test::testFdo59638()
commit 84f1fa190fc2b91d21b685f4d0ea99aaeea26fe0
Author: Miklos Vajna <vmiklos at suse.cz>
Date: Thu Mar 28 16:47:11 2013 +0100
WaE: -Wsign-compare
Change-Id: I4de04e5ba43735e5ed236109cdf5bfbfc9d1a220
diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.cxx b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
index 1dddd67..af64ffe 100644
--- a/writerfilter/source/dmapper/DomainMapperTableManager.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
@@ -119,7 +119,7 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm)
pPropMap->setValue( TablePropertyMap::TABLE_WIDTH_TYPE, text::SizeType::FIX );
pPropMap->setValue( TablePropertyMap::TABLE_WIDTH, m_nTableWidth );
}
- else if( pMeasureHandler->getUnit() == NS_ooxml::LN_Value_ST_TblWidth_pct )
+ else if( sal::static_int_cast<Id>(pMeasureHandler->getUnit()) == NS_ooxml::LN_Value_ST_TblWidth_pct )
{
sal_Int32 nPercent = pMeasureHandler->getValue() / 50;
if(nPercent > 100)
@@ -127,7 +127,7 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm)
pPropMap->setValue( TablePropertyMap::TABLE_WIDTH_TYPE, text::SizeType::VARIABLE );
pPropMap->setValue( TablePropertyMap::TABLE_WIDTH, nPercent );
}
- else if( pMeasureHandler->getUnit() == NS_ooxml::LN_Value_ST_TblWidth_auto )
+ else if( sal::static_int_cast<Id>(pMeasureHandler->getUnit()) == NS_ooxml::LN_Value_ST_TblWidth_auto )
{
pPropMap->setValue( TablePropertyMap::TABLE_WIDTH_TYPE, text::SizeType::VARIABLE );
pPropMap->setValue( TablePropertyMap::TABLE_WIDTH, 100 );
More information about the Libreoffice-commits
mailing list