[Libreoffice-commits] .: 5 commits - offapi/com offapi/type_reference oox/inc oox/source qadevOOo/tests sc/qa
Markus Mohrhard
mmohrhard at kemper.freedesktop.org
Mon Dec 5 14:07:25 PST 2011
offapi/com/sun/star/sheet/TableAutoFormatField.idl | 12 ++++++++++--
offapi/com/sun/star/table/CellProperties.idl | 12 ++++++++++--
offapi/type_reference/types.rdb |binary
oox/inc/oox/xls/stylesbuffer.hxx | 5 ++---
oox/source/xls/stylesbuffer.cxx | 8 ++++----
qadevOOo/tests/java/mod/_sc/ScDatabaseRangeObj.java | 8 +++++---
sc/qa/extras/cellproperties.cxx | 13 ++++++-------
sc/qa/extras/tableautoformatfield.cxx | 15 ++++++---------
sc/qa/unit/data/contentCSV/mathematical-functions.csv | 5 +++++
sc/qa/unit/data/ods/functions.ods |binary
10 files changed, 48 insertions(+), 30 deletions(-)
New commits:
commit e091888badc289fae0090b5e7f4556c69fb9a2a0
Author: Wolfgang Pechlaner <libo at pechlaner.at>
Date: Mon Dec 5 23:00:19 2011 +0100
add tests for new bitshift functions to sc
diff --git a/sc/qa/unit/data/contentCSV/mathematical-functions.csv b/sc/qa/unit/data/contentCSV/mathematical-functions.csv
index c5e1d04..db68e38 100644
--- a/sc/qa/unit/data/contentCSV/mathematical-functions.csv
+++ b/sc/qa/unit/data/contentCSV/mathematical-functions.csv
@@ -5,3 +5,8 @@
3.1415926536
1,1,3,-3,-5,5
0,2,12,-4,-6,4
+4, Err:502, Err:502
+14, Err:502
+10, Err:502
+3, 48
+48, 3
diff --git a/sc/qa/unit/data/ods/functions.ods b/sc/qa/unit/data/ods/functions.ods
index 22ebf65..813f9c6 100644
Binary files a/sc/qa/unit/data/ods/functions.ods and b/sc/qa/unit/data/ods/functions.ods differ
commit 219703ba3bd991f20a445e9b34439815a5659509
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Mon Dec 5 21:29:49 2011 +0100
remove last uses of CellVertJustify in our code
please use now only CellVertJustify2
diff --git a/oox/inc/oox/xls/stylesbuffer.hxx b/oox/inc/oox/xls/stylesbuffer.hxx
index 0d960e7..0ab97dd 100644
--- a/oox/inc/oox/xls/stylesbuffer.hxx
+++ b/oox/inc/oox/xls/stylesbuffer.hxx
@@ -32,7 +32,7 @@
#include <com/sun/star/awt/FontDescriptor.hpp>
#include <com/sun/star/table/CellHoriJustify.hpp>
#include <com/sun/star/table/CellOrientation.hpp>
-#include <com/sun/star/table/CellVertJustify.hpp>
+#include <com/sun/star/table/CellVertJustify2.hpp>
#include <com/sun/star/table/BorderLine2.hpp>
#include <com/sun/star/util/CellProtection.hpp>
#include "oox/drawingml/color.hxx"
@@ -809,8 +809,7 @@ private:
XfModel maModel; /// Cell XF or style XF model data.
Alignment maAlignment; /// Cell alignment data.
Protection maProtection; /// Cell protection data.
- ::com::sun::star::table::CellVertJustify
- meRotationRef; /// Rotation reference dependent on border.
+ sal_Int32 meRotationRef; /// Rotation reference dependent on border.
};
typedef ::boost::shared_ptr< Xf > XfRef;
diff --git a/oox/source/xls/stylesbuffer.cxx b/oox/source/xls/stylesbuffer.cxx
index df6d93c..cc48ad5 100644
--- a/oox/source/xls/stylesbuffer.cxx
+++ b/oox/source/xls/stylesbuffer.cxx
@@ -2267,7 +2267,7 @@ Xf::Xf( const WorkbookHelper& rHelper ) :
WorkbookHelper( rHelper ),
maAlignment( rHelper ),
maProtection( rHelper ),
- meRotationRef( ::com::sun::star::table::CellVertJustify_STANDARD )
+ meRotationRef( ::com::sun::star::table::CellVertJustify2::STANDARD )
{
}
@@ -2488,7 +2488,7 @@ void Xf::finalizeImport()
sal_Int32 nBorderId = maModel.mbBorderUsed ? maModel.mnBorderId : (pStyleXf ? pStyleXf->maModel.mnBorderId : -1);
if( const Border* pBorder = rStyles.getBorder( nBorderId ).get() )
if( (pAlignment->getApiData().mnRotation != 0) && pBorder->getApiData().hasAnyOuterBorder() )
- meRotationRef = ::com::sun::star::table::CellVertJustify_BOTTOM;
+ meRotationRef = ::com::sun::star::table::CellVertJustify2::BOTTOM;
}
}
@@ -2527,9 +2527,9 @@ void Xf::writeToPropertyMap( PropertyMap& rPropMap ) const
if( maModel.mbAlignUsed || maModel.mbBorderUsed )
rPropMap[ PROP_RotateReference ] <<= meRotationRef;
- ::com::sun::star::table::CellVertJustify eRotRef = ::com::sun::star::table::CellVertJustify_STANDARD;
+ sal_Int32 eRotRef = ::com::sun::star::table::CellVertJustify2::STANDARD;
if (maModel.mbBorderUsed && rStyles.hasBorder(maModel.mnBorderId) && maAlignment.getApiData().mnRotation)
- eRotRef = ::com::sun::star::table::CellVertJustify_BOTTOM;
+ eRotRef = ::com::sun::star::table::CellVertJustify2::BOTTOM;
rPropMap[ PROP_RotateReference ] <<= eRotRef;
}
commit 27f50cecdc3c4b36dc61b05b3d8de6e69518d967
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Mon Dec 5 21:14:20 2011 +0100
enable sc's c++ subsequenttests related to fdo#43308
diff --git a/sc/qa/extras/cellproperties.cxx b/sc/qa/extras/cellproperties.cxx
index 20e90f4..6ed0878 100644
--- a/sc/qa/extras/cellproperties.cxx
+++ b/sc/qa/extras/cellproperties.cxx
@@ -43,9 +43,8 @@ class ScCellProperties : public UnoApiTest
void testVertJustify();
void testRotateReference();
CPPUNIT_TEST_SUITE(ScCellProperties);
- //enable as soon as fixed
- //CPPUNIT_TEST(testVertJustify);
- //CPPUNIT_TEST(testRotateReference);
+ CPPUNIT_TEST(testVertJustify);
+ CPPUNIT_TEST(testRotateReference);
CPPUNIT_TEST_SUITE_END();
};
@@ -59,12 +58,12 @@ void ScCellProperties::testVertJustify()
std::cout << "Old VertJustify value: " << aValue << std::endl;
uno::Any aNewVertJustify;
- aNewVertJustify <<= table::CellVertJustify_BOTTOM;
+ aNewVertJustify <<= static_cast<sal_Int32>(3);
xCellRangeBase->setPropertyValue(aVertJustify, aNewVertJustify);
uno::Any aVertJustifyControllValue = xCellRangeBase->getPropertyValue(aVertJustify);
CPPUNIT_ASSERT(aVertJustifyControllValue >>= aValue);
std::cout << "New VertJustify value: " << aValue << std::endl;
- CPPUNIT_ASSERT_MESSAGE("value has not been changed", aValue == table::CellVertJustify_BOTTOM);
+ CPPUNIT_ASSERT_MESSAGE("value has not been changed", aValue == 3);
}
void ScCellProperties::testRotateReference()
@@ -77,12 +76,12 @@ void ScCellProperties::testRotateReference()
std::cout << "Old RotateReference Value: " << aValue << std::endl;
uno::Any aNewRotateReference;
- aNewRotateReference <<= table::CellVertJustify_BOTTOM;
+ aNewRotateReference <<= static_cast<sal_Int32>(3);
xCellRangeBase->setPropertyValue(aRotateReference, aNewRotateReference);
uno::Any aRotateReferenceControllValue = xCellRangeBase->getPropertyValue(aRotateReference);
CPPUNIT_ASSERT(aRotateReferenceControllValue >>= aValue);
std::cout << "New RotateReference value: " << aValue << std::endl;
- CPPUNIT_ASSERT_MESSAGE("value has not been changed", aValue == table::CellVertJustify_BOTTOM);
+ CPPUNIT_ASSERT_MESSAGE("value has not been changed", aValue == 3);
}
uno::Reference< beans::XPropertySet > ScCellProperties::init()
diff --git a/sc/qa/extras/tableautoformatfield.cxx b/sc/qa/extras/tableautoformatfield.cxx
index c405c2e..e53758a 100644
--- a/sc/qa/extras/tableautoformatfield.cxx
+++ b/sc/qa/extras/tableautoformatfield.cxx
@@ -29,7 +29,6 @@
#include <test/unoapi_test.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/table/CellVertJustify.hpp>
#include <iostream>
@@ -43,10 +42,8 @@ public:
void testVertJustify();
CPPUNIT_TEST_SUITE(ScTableAutoFormatField);
- // both tests are broken
- // related to: 7da57d17b6179e71c8b6d7549ad89eaf3a4a28c6
- //CPPUNIT_TEST(testRotateReference);
- //CPPUNIT_TEST(testVertJustify);
+ CPPUNIT_TEST(testRotateReference);
+ CPPUNIT_TEST(testVertJustify);
CPPUNIT_TEST_SUITE_END();
};
@@ -72,12 +69,12 @@ void ScTableAutoFormatField::testRotateReference()
std::cout << "Old RotateReferene Value: " << aValue << std::endl;
uno::Any aNewRotateReference;
- aNewRotateReference <<= table::CellVertJustify_BOTTOM;
+ aNewRotateReference <<= static_cast<sal_Int32>(3);
xTableAutoFormatField->setPropertyValue(aRotateReference, aNewRotateReference);
uno::Any aRotateReferenceControllValue = xTableAutoFormatField->getPropertyValue(aRotateReference);
CPPUNIT_ASSERT(aRotateReferenceControllValue >>= aValue);
std::cout << "New VertJustify value: " << aValue << std::endl;
- CPPUNIT_ASSERT_MESSAGE("value has not been changed", aValue == table::CellVertJustify_BOTTOM);
+ CPPUNIT_ASSERT_MESSAGE("value has not been changed", aValue == 3);
}
void ScTableAutoFormatField::testVertJustify()
@@ -90,12 +87,12 @@ void ScTableAutoFormatField::testVertJustify()
std::cout << "Old VertJustify value: " << aValue << std::endl;
uno::Any aNewVertJustify;
- aNewVertJustify <<= table::CellVertJustify_BOTTOM;
+ aNewVertJustify <<= static_cast<sal_Int32>(3);
xTableAutoFormatField->setPropertyValue(aVertJustify, aNewVertJustify);
uno::Any aVertJustifyControllValue = xTableAutoFormatField->getPropertyValue(aVertJustify);
CPPUNIT_ASSERT(aVertJustifyControllValue >>= aValue);
std::cout << "New VertJustify value: " << aValue << std::endl;
- CPPUNIT_ASSERT_MESSAGE("value has not been changed", aValue == table::CellVertJustify_BOTTOM);
+ CPPUNIT_ASSERT_MESSAGE("value has not been changed", aValue == 3);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScTableAutoFormatField);
commit 27fa364db8af77ddfbbce43d8fc49d318c779efb
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Mon Dec 5 21:05:51 2011 +0100
incompatible change to solve uno problem related to fdo#43308
diff --git a/offapi/com/sun/star/sheet/TableAutoFormatField.idl b/offapi/com/sun/star/sheet/TableAutoFormatField.idl
index 9e172bd..872a3bd 100644
--- a/offapi/com/sun/star/sheet/TableAutoFormatField.idl
+++ b/offapi/com/sun/star/sheet/TableAutoFormatField.idl
@@ -228,8 +228,12 @@ published service TableAutoFormatField
//-------------------------------------------------------------------------
/** specifies the vertical alignment of the cell contents.
+
+ changed from com::sun::star::table::CellVertJustify to long in LibO 3.5
+
+ @see com::sun::star::table::CellVertJustify2
*/
- [optional, property] com::sun::star::table::CellVertJustify VertJustify;
+ [optional, property] long VertJustify;
//-------------------------------------------------------------------------
@@ -253,8 +257,12 @@ published service TableAutoFormatField
//-------------------------------------------------------------------------
/** contains the reference edge of the cell rotation.
+
+ changed from com::sun::star::table::CellVertJustify to long in LibO 3.5
+
+ @see com::sun::star::table::CellVertJustify2
*/
- [optional, property] com::sun::star::table::CellVertJustify RotateReference;
+ [optional, property] long RotateReference;
//-------------------------------------------------------------------------
diff --git a/offapi/com/sun/star/table/CellProperties.idl b/offapi/com/sun/star/table/CellProperties.idl
index c54f478..85406cd 100644
--- a/offapi/com/sun/star/table/CellProperties.idl
+++ b/offapi/com/sun/star/table/CellProperties.idl
@@ -89,8 +89,12 @@ published service CellProperties
//-------------------------------------------------------------------------
/** contains the vertical alignment of the cell contents.
+
+ changed from com::sun::star::table::CellVertJustify to long in LibO 3.5
+
+ @see com::sun::star::table::CellVertJustify2
*/
- [property] com::sun::star::table::CellVertJustify VertJustify;
+ [property] long VertJustify;
//-------------------------------------------------------------------------
@@ -123,8 +127,12 @@ published service CellProperties
//-------------------------------------------------------------------------
/** defines at which edge rotated cells are aligned.
+
+ changed from com::sun::star::table::CellVertJustify to long in LibO 3.5
+
+ @see com::sun::star::table::CellVertJustify2
*/
- [property] com::sun::star::table::CellVertJustify RotateReference;
+ [property] long RotateReference;
//-------------------------------------------------------------------------
diff --git a/offapi/type_reference/types.rdb b/offapi/type_reference/types.rdb
index 5fd80a1..c12270b 100644
Binary files a/offapi/type_reference/types.rdb and b/offapi/type_reference/types.rdb differ
commit 9429fe7b1c7f372d2407dbbc939385ef95db466f
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Mon Dec 5 21:00:47 2011 +0100
possible fix for fdo#43312
did not test that yet, should be quite safe to avoid a null pointer
exception but the selected area might need some change to allow tests to
pass
diff --git a/qadevOOo/tests/java/mod/_sc/ScDatabaseRangeObj.java b/qadevOOo/tests/java/mod/_sc/ScDatabaseRangeObj.java
index 0b9a71c..8bd9675 100644
--- a/qadevOOo/tests/java/mod/_sc/ScDatabaseRangeObj.java
+++ b/qadevOOo/tests/java/mod/_sc/ScDatabaseRangeObj.java
@@ -174,6 +174,7 @@ public class ScDatabaseRangeObj extends TestCase {
dbRanges.removeByName("dbRange");
}
+
//CellRangeAddress aRange = new CellRangeAddress((short)0, 0, 0, 0, 13);
CellRangeAddress aRange = null;
@@ -183,11 +184,12 @@ public class ScDatabaseRangeObj extends TestCase {
XNamed xNamed = null;
try {
- String[] dbNames = dbrNA.getElementNames();
+ // we need to add it
+ dbRanges.addNewByName("dbRanges",new CellRangeAddress((short)0, 0, 0, 0, 5));
+
xNamed = (XNamed) UnoRuntime.queryInterface(XNamed.class,
dbrNA.getByName(
- dbNames[0]));
- xNamed.setName("dbRange");
+ "dbRange"));
XCellRangeReferrer aReferrer = (XCellRangeReferrer) UnoRuntime.queryInterface(
XCellRangeReferrer.class,
More information about the Libreoffice-commits
mailing list