[Libreoffice-commits] core.git: sw/CppunitTest_sw_accessible_relation_set.mk sw/JunitTest_sw_complex.mk sw/Module_sw.mk sw/qa

2018-04-08 Thread kadertarlan
 sw/CppunitTest_sw_accessible_relation_set.mk   |   59 
 sw/JunitTest_sw_complex.mk |2 
 sw/Module_sw.mk|1 
 sw/qa/complex/accessibility/AccessibleRelationSet.java |  219 ---
 sw/qa/extras/accessibility/accessible_relation_set.cxx |  246 +
 5 files changed, 306 insertions(+), 221 deletions(-)

New commits:
commit b6d2d6db28eec4ab311c4223cf5be508feb2e057
Author: kadertarlan 
Date:   Sun May 1 16:01:45 2016 +0300

tdf#45904 move java based api tests to c++ (AccessibleRelationSet)

Change-Id: I2d9d72bbc845acf091570df663849495619ee765
Reviewed-on: https://gerrit.libreoffice.org/24563
Tested-by: Jenkins 
Reviewed-by: Michael Stahl 

diff --git a/sw/CppunitTest_sw_accessible_relation_set.mk 
b/sw/CppunitTest_sw_accessible_relation_set.mk
new file mode 100644
index ..0de87d256d44
--- /dev/null
+++ b/sw/CppunitTest_sw_accessible_relation_set.mk
@@ -0,0 +1,59 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#*
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+#*
+
+$(eval $(call gb_CppunitTest_CppunitTest,sw_accessible_relation_set))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,sw_accessible_relation_set, 
\
+sw/qa/extras/accessibility/accessible_relation_set \
+))
+
+$(eval $(call gb_CppunitTest_use_libraries,sw_accessible_relation_set, \
+comphelper \
+cppu \
+   cppuhelper \
+   i18nlangtag \
+sal \
+subsequenttest \
+sw \
+test \
+   tl \
+unotest \
+utl \
+vcl \
+   $(gb_UWINAPI) \
+))
+
+$(eval $(call gb_CppunitTest_use_externals,sw_accessible_relation_set,\
+   boost_headers \
+libxml2 \
+))
+
+$(eval $(call gb_CppunitTest_set_include,sw_htmlexport,\
+-I$(SRCDIR)/sw/inc \
+-I$(SRCDIR)/sw/source/core/inc \
+-I$(SRCDIR)/sw/source/uibase/inc \
+   -I$(SRCDIR)/sw/qa/extras/inc \
+$$(INCLUDE) \
+))
+
+$(eval $(call gb_CppunitTest_use_api,sw_accessible_relation_set,\
+offapi \
+udkapi \
+))
+
+$(eval $(call gb_CppunitTest_use_ure,sw_accessible_relation_set))
+$(eval $(call gb_CppunitTest_use_vcl,sw_accessible_relation_set))
+
+$(eval $(call gb_CppunitTest_use_rdb,sw_accessible_relation_set,services))
+
+$(eval $(call gb_CppunitTest_use_configuration,sw_accessible_relation_set))
+
+# vim: set noet sw=4 ts=4:
diff --git a/sw/JunitTest_sw_complex.mk b/sw/JunitTest_sw_complex.mk
index d39f39f22515..a4d7a08ec02b 100644
--- a/sw/JunitTest_sw_complex.mk
+++ b/sw/JunitTest_sw_complex.mk
@@ -20,7 +20,6 @@
 $(eval $(call gb_JunitTest_JunitTest,sw_complex))
 
 $(eval $(call gb_JunitTest_add_sourcefiles,sw_complex,\
-sw/qa/complex/accessibility/AccessibleRelationSet \
 sw/qa/complex/indeterminateState/CheckIndeterminateState \
 ))
 
@@ -33,7 +32,6 @@ $(eval $(call gb_JunitTest_use_jars,sw_complex,\
 ))
 
 $(eval $(call gb_JunitTest_add_classes,sw_complex,\
-complex.accessibility.AccessibleRelationSet \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/sw/Module_sw.mk b/sw/Module_sw.mk
index 8fb2836f70e6..01a67af503a9 100644
--- a/sw/Module_sw.mk
+++ b/sw/Module_sw.mk
@@ -91,6 +91,7 @@ $(eval $(call gb_Module_add_slowcheck_targets,sw,\
 CppunitTest_sw_layoutwriter \
 CppunitTest_sw_mailmerge \
 CppunitTest_sw_globalfilter \
+CppunitTest_sw_accessible_relation_set \
 ))
 
 ifneq ($(ENABLE_HEADLESS),TRUE)
diff --git a/sw/qa/complex/accessibility/AccessibleRelationSet.java 
b/sw/qa/complex/accessibility/AccessibleRelationSet.java
deleted file mode 100644
index a2b2e2e506fe..
--- a/sw/qa/complex/accessibility/AccessibleRelationSet.java
+++ /dev/null
@@ -1,219 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-package complex.accessibility;
-
-import com.sun.star.accessibility.Acce

[Libreoffice-commits] core.git: sw/qa

2016-03-25 Thread kadertarlan
 sw/qa/python/check_table.py |   24 
 1 file changed, 12 insertions(+), 12 deletions(-)

New commits:
commit b8e595263841ff719bd38128507fdb5ae238f173
Author: kadertarlan 
Date:   Thu Mar 24 22:50:06 2016 +0200

tdf#97362: Fixed Python Unit Test(check_table.py)

Change-Id: I6c88091e5231a42a7eb4ae82cb6231bd9330ae40
Reviewed-on: https://gerrit.libreoffice.org/23501
Tested-by: Jenkins 
Reviewed-by: jan iversen 

diff --git a/sw/qa/python/check_table.py b/sw/qa/python/check_table.py
index e92044f..04b95ba 100644
--- a/sw/qa/python/check_table.py
+++ b/sw/qa/python/check_table.py
@@ -358,7 +358,7 @@ class CheckTable(unittest.TestCase):
 xTable.ChartRowAsLabel = False
 xTable.Data = ((1,2,3), (4,5,6), (7,8,9), (10,11,12))
 xRows = xTable.Rows
-self.assertEquals(xRows.ImplementationName, 'SwXTableRows')
+self.assertEqual(xRows.ImplementationName, 'SwXTableRows')
 self.assertTrue(xRows.supportsService('com.sun.star.text.TableRows'))
 self.assertFalse(xRows.supportsService('foo'))
 self.assertIn('com.sun.star.text.TableRows', 
xRows.SupportedServiceNames)
@@ -366,7 +366,7 @@ class CheckTable(unittest.TestCase):
 xRows.removeByIndex(1, 2)
 self.assertEqual( xTable.Data, ((1,2,3), (10,11,12)))
 xCols = xTable.Columns
-self.assertEquals(xCols.ImplementationName, 'SwXTableColumns')
+self.assertEqual(xCols.ImplementationName, 'SwXTableColumns')
 
self.assertTrue(xCols.supportsService('com.sun.star.text.TableColumns'))
 self.assertFalse(xCols.supportsService('foo'))
 self.assertIn('com.sun.star.text.TableColumns', 
xCols.SupportedServiceNames)
@@ -429,7 +429,7 @@ class CheckTable(unittest.TestCase):
 self.assertTrue(xTable.Name == 'Table1')
 self.assertIn('com.sun.star.text.GenericTextDocument', 
xDoc.SupportedServiceNames)
 xChartdataprovider = 
xDoc.createInstance('com.sun.star.chart2.data.DataProvider')
-self.assertEquals(xChartdataprovider.ImplementationName, 
'SwChartDataProvider')
+self.assertEqual(xChartdataprovider.ImplementationName, 
'SwChartDataProvider')
 
self.assertTrue(xChartdataprovider.supportsService('com.sun.star.chart2.data.DataProvider'))
 self.assertFalse(xChartdataprovider.supportsService('foo'))
 self.assertIn('com.sun.star.chart2.data.DataProvider', 
xChartdataprovider.SupportedServiceNames)
@@ -442,7 +442,7 @@ class CheckTable(unittest.TestCase):
 expectedCellrange = ('A1:A2', 'B1:B2', 'C1:C2')
 for col in range(3):
 xSeq = xDataSource.DataSequences[col].Values
-self.assertEquals(xSeq.ImplementationName, 'SwChartDataSequence')
+self.assertEqual(xSeq.ImplementationName, 'SwChartDataSequence')
 
self.assertTrue(xSeq.supportsService('com.sun.star.chart2.data.DataSequence'))
 self.assertFalse(xSeq.supportsService('foo'))
 self.assertIn('com.sun.star.chart2.data.DataSequence', 
xSeq.SupportedServiceNames)
@@ -479,16 +479,16 @@ class CheckTable(unittest.TestCase):
(PropertyValue('Text', 0, '3', 0),))
 xDispatcher.executeDispatch(xDocFrame, '.uno:JumpToNextCell', '', 0, 
())
 # Check that the formatting we set up is not destroyed
-self.assertEquals(xTable.getCellByPosition(0,0).getString(), '3.00 
€')
-self.assertEquals(xTable.getCellByPosition(0,0).getValue(), 3)
+self.assertEqual(xTable.getCellByPosition(0,0).getString(), '3.00 €')
+self.assertEqual(xTable.getCellByPosition(0,0).getValue(), 3)
 # Verify that it works with number recognition turned on as well
 xDispatcher.executeDispatch(xDocFrame, '.uno:TableNumberRecognition', 
'', 0,
(PropertyValue('TableNumberRecognition', 0, 
True, 0),))
 xDispatcher.executeDispatch(xDocFrame, '.uno:InsertText', '', 0,
(PropertyValue('Text', 0, '4', 0),))
 xDispatcher.executeDispatch(xDocFrame, '.uno:JumpToNextCell', '', 0, 
())
-self.assertEquals(xTable.getCellByPosition(0,1).getString(), '4.00 
€')
-self.assertEquals(xTable.getCellByPosition(0,1).getValue(), 4)
+self.assertEqual(xTable.getCellByPosition(0,1).getString(), '4.00 €')
+self.assertEqual(xTable.getCellByPosition(0,1).getValue(), 4)
 xDoc.dispose()
 
 def test_numberRecognition(self):
@@ -507,8 +507,8 @@ class Che

[Libreoffice-commits] core.git: include/test sc/CppunitTest_sc_check_data_pilot_field.mk sc/CppunitTest_sc_check_data_pilot_table.mk sc/JunitTest_sc_complex.mk sc/Module_sc.mk sc/qa test/source

2016-03-19 Thread kadertarlan
 include/test/beans/xpropertyset.hxx |2 
 sc/CppunitTest_sc_check_data_pilot_field.mk |  103 +
 sc/CppunitTest_sc_check_data_pilot_table.mk |  103 +
 sc/JunitTest_sc_complex.mk  |2 
 sc/Module_sc.mk |2 
 sc/qa/complex/dataPilot/CheckDataPilot.java |  315 
 sc/qa/extras/check_data_pilot_field.cxx |  195 +
 sc/qa/extras/check_data_pilot_table.cxx |  193 +
 test/source/beans/xpropertyset.cxx  |   11 
 test/source/sheet/xdatapilotdescriptor.cxx  |1 
 10 files changed, 609 insertions(+), 318 deletions(-)

New commits:
commit 1d5767c6e464b914812867aac5c3ccd0745dd1ea
Author: kadertarlan 
Date:   Mon Feb 22 02:08:55 2016 +0200

tdf#45904 move java based api tests to c++

Change-Id: Ibd9411e844c8e42fe625ffd979e936f827099ee9
Reviewed-on: https://gerrit.libreoffice.org/22604
Tested-by: Jenkins 
Reviewed-by: Markus Mohrhard 

diff --git a/include/test/beans/xpropertyset.hxx 
b/include/test/beans/xpropertyset.hxx
index e53cee2..3b110a5 100644
--- a/include/test/beans/xpropertyset.hxx
+++ b/include/test/beans/xpropertyset.hxx
@@ -34,6 +34,8 @@ public:
 protected:
 bool isPropertyValueChangeable(const OUString& rName);
 
+virtual bool isPropertyIgnored(const OUString& rName);
+
 private:
 void fillPropsToTest(const 
css::uno::Reference& xPropInfo);
 static bool getSinglePropertyValue(
diff --git a/sc/CppunitTest_sc_check_data_pilot_field.mk 
b/sc/CppunitTest_sc_check_data_pilot_field.mk
new file mode 100644
index 000..06db60a
--- /dev/null
+++ b/sc/CppunitTest_sc_check_data_pilot_field.mk
@@ -0,0 +1,103 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#*
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+#*
+$(eval $(call gb_CppunitTest_CppunitTest,sc_check_data_pilot_field))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,sc_check_data_pilot_field, \
+sc/qa/extras/check_data_pilot_field \
+))
+
+$(eval $(call gb_CppunitTest_use_libraries,sc_check_data_pilot_field, \
+basegfx \
+comphelper \
+cppu \
+cppuhelper \
+drawinglayer \
+editeng \
+for \
+forui \
+i18nlangtag \
+msfilter \
+oox \
+sal \
+salhelper \
+sax \
+sb \
+sc \
+scqahelper \
+sfx \
+sot \
+subsequenttest \
+svl \
+svt \
+svx \
+svxcore \
+test \
+tk \
+tl \
+ucbhelper \
+unotest \
+utl \
+vbahelper \
+vcl \
+xo \
+$(gb_UWINAPI) \
+))
+
+$(eval $(call gb_CppunitTest_set_include,sc_check_data_pilot_field,\
+-I$(SRCDIR)/sc/source/ui/inc \
+-I$(SRCDIR)/sc/inc \
+$$(INCLUDE) \
+))
+
+$(eval $(call gb_CppunitTest_use_api,sc_check_data_pilot_field,\
+offapi \
+udkapi \
+))
+
+$(eval $(call gb_CppunitTest_use_ure,sc_check_data_pilot_field))
+$(eval $(call gb_CppunitTest_use_vcl,sc_check_data_pilot_field))
+
+$(eval $(call gb_CppunitTest_use_components,sc_check_data_pilot_field,\
+basic/util/sb \
+comphelper/util/comphelp \
+configmgr/source/configmgr \
+dbaccess/util/dba \
+filter/source/config/cache/filterconfig1 \
+forms/util/frm \
+framework/util/fwk \
+i18npool/util/i18npool \
+oox/util/oox \
+package/source/xstor/xstor \
+package/util/package2 \
+sax/source/expatwrap/expwrap \
+scripting/source/basprov/basprov \
+scripting/util/scriptframe \
+sc/util/sc \
+sc/util/scd \
+sc/util/scfilt \
+$(call gb_Helper_optional,SCRIPTING, \
+sc/util/vbaobj) \
+sfx2/util/sfx \
+sot/util/sot \
+svl/source/fsstor/fsstorage \
+toolkit/util/tk \
+ucb/source/core/ucb1 \
+ucb/source/ucp/file/ucpfile1 \
+ucb/source/ucp/tdoc/ucptdoc1 \
+unotools/util/utl \
+unoxml/source/rdf/unordf \
+unoxml/source/service/unoxml \
+svtools/util/svt \
+))
+
+$(eval $(call gb_CppunitTest_use_configuration,sc_check_data_pilot_field))
+
+# vim: set noet sw=4 ts=4:
diff --git a/sc/CppunitTest_sc_check_data_pilot_table.mk 
b/sc/CppunitTest_sc_check_data_pilot_table.mk
new file mode 100644
index 000..fe6d588
--- /dev/null
+++ b/sc/CppunitTest_sc_check_data_pilot_table.mk
@@ -0,0 +1,103 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#*
+#
+# This file is part of the LibreOf

[Libreoffice-commits] core.git: sw/JunitTest_sw_complex.mk sw/PythonTest_sw_python.mk sw/qa

2016-03-19 Thread kadertarlan
 sw/JunitTest_sw_complex.mk |1 
 sw/PythonTest_sw_python.mk |1 
 sw/qa/complex/writer/LoadSaveTest.java |  215 -
 sw/qa/python/load_save_test.py |  129 +++
 4 files changed, 130 insertions(+), 216 deletions(-)

New commits:
commit b27aabc4ea3692a6ffbf28d8da0f75ad51feece9
Author: kadertarlan 
Date:   Tue Mar 15 03:09:34 2016 +0200

tdf#97362: Convert Java unit test to Python(load_save_test.py)

Change-Id: I7c3f2e786f94137b850770c77fbd24578f56b0af
Reviewed-on: https://gerrit.libreoffice.org/23254
Reviewed-by: jan iversen 
Tested-by: jan iversen 

diff --git a/sw/JunitTest_sw_complex.mk b/sw/JunitTest_sw_complex.mk
index 57e4671..afa5398 100644
--- a/sw/JunitTest_sw_complex.mk
+++ b/sw/JunitTest_sw_complex.mk
@@ -29,7 +29,6 @@ $(eval $(call gb_JunitTest_add_sourcefiles,sw_complex,\
 sw/qa/complex/checkColor/CheckChangeColor \
 sw/qa/complex/indeterminateState/CheckIndeterminateState \
 sw/qa/complex/writer/CheckBookmarks \
-sw/qa/complex/writer/LoadSaveTest \
 sw/qa/complex/writer/TestDocument \
 sw/qa/complex/writer/TextPortionEnumerationTest \
 ))
diff --git a/sw/PythonTest_sw_python.mk b/sw/PythonTest_sw_python.mk
index 3c5e2d5..9e8d0d2 100644
--- a/sw/PythonTest_sw_python.mk
+++ b/sw/PythonTest_sw_python.mk
@@ -22,6 +22,7 @@ $(eval $(call 
gb_PythonTest_add_modules,sw_python,$(SRCDIR)/sw/qa/python,\
check_indexed_property_values \
check_styles \
check_table \
+   load_save_test \
get_expression \
set_expression \
var_fields \
diff --git a/sw/qa/complex/writer/LoadSaveTest.java 
b/sw/qa/complex/writer/LoadSaveTest.java
deleted file mode 100644
index e2ae7ab..000
--- a/sw/qa/complex/writer/LoadSaveTest.java
+++ /dev/null
@@ -1,215 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-package complex.writer;
-
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XComponentContext;
-import com.sun.star.lang.EventObject;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.lang.XComponent;
-import com.sun.star.beans.PropertyValue;
-import com.sun.star.beans.Pair;
-import com.sun.star.frame.XGlobalEventBroadcaster;
-import com.sun.star.frame.XStorable;
-import com.sun.star.frame.theGlobalEventBroadcaster;
-import com.sun.star.document.DocumentEvent;
-import com.sun.star.document.XDocumentEventListener;
-import org.openoffice.test.OfficeConnection;
-
-import org.junit.AfterClass;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import static org.junit.Assert.*;
-
-import java.util.List;
-import java.util.ArrayList;
-import java.io.File;
-
-/**
- * a small program to load documents from one directory (recursively)
- * and store them in another, implemented as a complex test.
- */
-public class LoadSaveTest
-{
-private static final OfficeConnection connection = new OfficeConnection();
-
-@BeforeClass public static void setUpConnection() throws Exception {
-connection.setUp();
-}
-
-@AfterClass public static void tearDownConnection()
-throws InterruptedException, com.sun.star.uno.Exception
-{
-connection.tearDown();
-}
-
-private XMultiServiceFactory m_xMSF = null;
-private XGlobalEventBroadcaster m_xGEB = null;
-
-private static final String m_fileURL = "file://";
-// these should be parameters or something?
-private static final String m_SourceDir = "FIXME";
-private static final String m_TargetDir = "/tmp/out";
-
-@Before public void before() throws Exception
-{
-XComponentContext xContext = connection.getComponentContext();
-assertNotNull("could not get component context.", xContext);
-m_xMSF = UnoRuntime.queryInterface(
-XMultiServiceFactory.class, xContext.getServiceManager());
-m_xGEB = theGlobalEventBroadcaster.get(xContext);
-String sTmpDir = util.utils.getOfficeTemp/*Dir*/(m_xMSF);
-System.out.println("tempdir: " + sTmpDir);
-System.out.println("sourcedir: " +

[Libreoffice-commits] core.git: sc/CppunitTest_sc_check_xcell_ranges_query.mk sc/JunitTest_sc_complex.mk sc/Module_sc.mk sc/qa

2016-02-14 Thread kadertarlan
 sc/CppunitTest_sc_check_xcell_ranges_query.mk |  103 ++
 sc/JunitTest_sc_complex.mk|2 
 sc/Module_sc.mk   |1 
 sc/qa/extras/check_xcell_ranges_query.cxx |  191 ++
 4 files changed, 295 insertions(+), 2 deletions(-)

New commits:
commit 8c125eca7f8a0dd2d59678cff2574bbccc70e536
Author: kadertarlan 
Date:   Thu Feb 11 03:01:14 2016 +0200

tdf#45904 move java based api tests to c++

Change-Id: Ia4eedef6a6cb060d756ee83b3fb82afa68ac2c5a
Reviewed-on: https://gerrit.libreoffice.org/22276
Tested-by: Jenkins 
Reviewed-by: Markus Mohrhard 
Tested-by: Markus Mohrhard 

diff --git a/sc/CppunitTest_sc_check_xcell_ranges_query.mk 
b/sc/CppunitTest_sc_check_xcell_ranges_query.mk
new file mode 100644
index 000..5ca88d9
--- /dev/null
+++ b/sc/CppunitTest_sc_check_xcell_ranges_query.mk
@@ -0,0 +1,103 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#*
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+#*
+$(eval $(call gb_CppunitTest_CppunitTest,sc_check_xcell_ranges_query))
+
+$(eval $(call 
gb_CppunitTest_add_exception_objects,sc_check_xcell_ranges_query, \
+   sc/qa/extras/check_xcell_ranges_query \
+))
+
+$(eval $(call gb_CppunitTest_use_libraries,sc_check_xcell_ranges_query, \
+   basegfx \
+   comphelper \
+   cppu \
+   cppuhelper \
+   drawinglayer \
+   editeng \
+   for \
+   forui \
+   i18nlangtag \
+   msfilter \
+   oox \
+   sal \
+   salhelper \
+   sax \
+   sb \
+   sc \
+   scqahelper \
+   sfx \
+   sot \
+   subsequenttest \
+   svl \
+   svt \
+   svx \
+   svxcore \
+   test \
+   tk \
+   tl \
+   ucbhelper \
+   unotest \
+   utl \
+   vbahelper \
+   vcl \
+   xo \
+   $(gb_UWINAPI) \
+))
+
+$(eval $(call gb_CppunitTest_set_include,sc_check_xcell_ranges_query,\
+   -I$(SRCDIR)/sc/source/ui/inc \
+   -I$(SRCDIR)/sc/inc \
+   $$(INCLUDE) \
+))
+
+$(eval $(call gb_CppunitTest_use_api,sc_check_xcell_ranges_query,\
+   offapi \
+   udkapi \
+))
+
+$(eval $(call gb_CppunitTest_use_ure,sc_check_xcell_ranges_query))
+$(eval $(call gb_CppunitTest_use_vcl,sc_check_xcell_ranges_query))
+
+$(eval $(call gb_CppunitTest_use_components,sc_check_xcell_ranges_query,\
+basic/util/sb \
+comphelper/util/comphelp \
+configmgr/source/configmgr \
+dbaccess/util/dba \
+filter/source/config/cache/filterconfig1 \
+forms/util/frm \
+framework/util/fwk \
+i18npool/util/i18npool \
+oox/util/oox \
+package/source/xstor/xstor \
+package/util/package2 \
+sax/source/expatwrap/expwrap \
+scripting/source/basprov/basprov \
+scripting/util/scriptframe \
+sc/util/sc \
+sc/util/scd \
+sc/util/scfilt \
+$(call gb_Helper_optional,SCRIPTING, \
+   sc/util/vbaobj) \
+sfx2/util/sfx \
+sot/util/sot \
+svl/source/fsstor/fsstorage \
+toolkit/util/tk \
+ucb/source/core/ucb1 \
+ucb/source/ucp/file/ucpfile1 \
+ucb/source/ucp/tdoc/ucptdoc1 \
+unotools/util/utl \
+unoxml/source/rdf/unordf \
+unoxml/source/service/unoxml \
+   svtools/util/svt \
+))
+
+$(eval $(call gb_CppunitTest_use_configuration,sc_check_xcell_ranges_query,))
+
+# vim: set noet sw=4 ts=4:
\ No newline at end of file
diff --git a/sc/JunitTest_sc_complex.mk b/sc/JunitTest_sc_complex.mk
index 8fedb47..6e446e8 100644
--- a/sc/JunitTest_sc_complex.mk
+++ b/sc/JunitTest_sc_complex.mk
@@ -13,7 +13,6 @@ $(eval $(call gb_JunitTest_JunitTest,sc_complex))
 # any key after resizing" etc.)
 
 $(eval $(call gb_JunitTest_add_classes,sc_complex, \
-complex.cellRanges.CheckXCellRangesQuery \
 complex.dataPilot.CheckDataPilot \
 complex.sc.CalcRTL \
 ))
@@ -27,7 +26,6 @@ $(eval $(call gb_JunitTest_use_jars,sc_complex, \
 ))
 
 $(eval $(call gb_JunitTest_add_sourcefiles,sc_complex, \
-sc/qa/complex/cellRanges/CheckXCellRangesQuery \
 sc/qa/complex/dataPilot/CheckDataPilot \
 sc/qa/complex/dataPilot/_XDataPilotDescriptor \
 sc/qa/complex/dataPilot/_XDataPilotTable \
diff --git a/sc/Module_sc.mk b/sc/Module_sc.mk
index 1d802f9..c8f9808 100644
--- a/sc/Module_sc.mk
+++ b/sc/Module_sc.mk
@@ -89,6 +89,7 @@ $(eval $(call gb_Module_add_subsequentcheck_targets,sc,\
CppunitTest_sc_editfieldobj_cell \
CppunitTest_sc_editfieldobj_header \
CppunitTest_sc_modelobj \
+   CppunitTest_sc_check_xcell_ranges_query \
 ))
 
 $(eval $(call gb_Module_add_perfcheck_targets,sc,\
diff --

[Libreoffice-commits] core.git: sw/JunitTest_sw_complex.mk sw/qa

2016-01-31 Thread kadertarlan
 sw/JunitTest_sw_complex.mk   |2 
 sw/qa/complex/writer/CheckTable.java |  291 ---
 2 files changed, 293 deletions(-)

New commits:
commit 830b758b11645730306e9f9e5b67e3b22ce17ec6
Author: kadertarlan 
Date:   Sun Jan 31 10:21:40 2016 +0200

tdf#97362: Deleted CheckTable.java(this test translated to Python already.)

v2: Deleted CheckTable.java in JunitTest_sw_complex.mk

Change-Id: I737a887d6f48fb2cacbe893289a430dd8312b3d8
Reviewed-on: https://gerrit.libreoffice.org/21949
Reviewed-by: jan iversen 
Tested-by: jan iversen 

diff --git a/sw/JunitTest_sw_complex.mk b/sw/JunitTest_sw_complex.mk
index 0bff210..57e4671 100644
--- a/sw/JunitTest_sw_complex.mk
+++ b/sw/JunitTest_sw_complex.mk
@@ -29,7 +29,6 @@ $(eval $(call gb_JunitTest_add_sourcefiles,sw_complex,\
 sw/qa/complex/checkColor/CheckChangeColor \
 sw/qa/complex/indeterminateState/CheckIndeterminateState \
 sw/qa/complex/writer/CheckBookmarks \
-sw/qa/complex/writer/CheckTable \
 sw/qa/complex/writer/LoadSaveTest \
 sw/qa/complex/writer/TestDocument \
 sw/qa/complex/writer/TextPortionEnumerationTest \
@@ -47,7 +46,6 @@ $(eval $(call gb_JunitTest_add_classes,sw_complex,\
 complex.accessibility.AccessibleRelationSet \
 complex.checkColor.CheckChangeColor \
 complex.writer.CheckBookmarks \
-complex.writer.CheckTable \
 complex.writer.TextPortionEnumerationTest \
 ))
 
diff --git a/sw/qa/complex/writer/CheckTable.java 
b/sw/qa/complex/writer/CheckTable.java
deleted file mode 100644
index e4d33d3..000
--- a/sw/qa/complex/writer/CheckTable.java
+++ /dev/null
@@ -1,291 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-
-package complex.writer;
-
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.RuntimeException;
-import com.sun.star.uno.XComponentContext;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.beans.XPropertySet;
-import com.sun.star.beans.XPropertySetInfo;
-import com.sun.star.beans.Property;
-import com.sun.star.text.XText;
-import com.sun.star.text.XTextDocument;
-import com.sun.star.text.XTextCursor;
-import com.sun.star.text.XTextRange;
-import com.sun.star.text.XTextTable;
-import com.sun.star.table.TableBorder;
-import com.sun.star.table.TableBorder2;
-import com.sun.star.table.BorderLine;
-import com.sun.star.table.BorderLine2;
-import static com.sun.star.table.BorderLineStyle.*;
-
-import org.openoffice.test.OfficeConnection;
-
-import org.junit.After;
-import org.junit.AfterClass;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import static org.junit.Assert.*;
-
-public class CheckTable
-{
-private static final OfficeConnection connection = new OfficeConnection();
-
-@BeforeClass public static void setUpConnection() throws Exception {
-connection.setUp();
-//Thread.sleep(5000);
-}
-
-@AfterClass public static void tearDownConnection()
-throws InterruptedException, com.sun.star.uno.Exception
-{
-connection.tearDown();
-}
-
-private XTextDocument m_xDoc = null;
-
-@Before public void before() throws Exception
-{
-XMultiServiceFactory xMSF = UnoRuntime.queryInterface(
-XMultiServiceFactory.class,
-connection.getComponentContext().getServiceManager());
-XComponentContext xContext = connection.getComponentContext();
-assertNotNull("could not get component context.", xContext);
-m_xDoc = util.WriterTools.createTextDoc(xMSF);
-}
-
-@After public void after()
-{
-util.DesktopTools.closeDoc(m_xDoc);
-}
-
-@Test
-public void test_tableborder() throws Exception
-{
-// insert table
-XMultiServiceFactory xDocF =
-UnoRuntime.queryInterface(XMultiServiceFactory.class, m_xDoc);
-XTextTable xTable = UnoRuntime.queryInterface(XTextTable.class,
-xDocF.createInstance("com.sun.star.text.TextTable"));
-xTable.initialize(3, 3);
-XText xText = m_xDoc.getText();
-XTextCursor xCursor = xText.createTextCursor();
-xText.insertTextContent(xCursor, xTable, false);
-// read orig border
-XPropertySet xProps = UnoRuntime.queryInterface(XPropertySet.class,
-xTable);
-TableBorder border = (TableBorder) 
xProps.getPropertyValue("TableBorder");
-assertTrue(border.IsTopLineValid);
-assertEquals(0, border.TopLine.InnerLineWidth);
-assertEquals(2, border.TopLine.OuterLineWidth);
-assertEquals(0, border.TopLine.LineDistance);
-assert

[Libreoffice-commits] core.git: sw/qa

2016-01-29 Thread kadertarlan
 sw/qa/python/check_named_property_values.py |   25 ++---
 1 file changed, 14 insertions(+), 11 deletions(-)

New commits:
commit ba1d44bec1f85f45a23e7b871e3344ee457e8eac
Author: kadertarlan 
Date:   Thu Jan 28 15:24:49 2016 +0200

tdf#97362: Convert Java unit test to Python (check_named_property_values.py)

Change-Id: Icb94cdf3601d6d985ea147e3c80eadba2999ccee
Reviewed-on: https://gerrit.libreoffice.org/21877
Tested-by: Jenkins 
Reviewed-by: jan iversen 

diff --git a/sw/qa/python/check_named_property_values.py 
b/sw/qa/python/check_named_property_values.py
index 9d7825b..2859699 100644
--- a/sw/qa/python/check_named_property_values.py
+++ b/sw/qa/python/check_named_property_values.py
@@ -24,6 +24,9 @@ from org.libreoffice.unotest import UnoInProcess
 from com.sun.star.beans import PropertyValue
 from com.sun.star.container import XNameContainer
 from org.libreoffice.unotest import OfficeConnection
+from com.sun.star.container import ElementExistException
+from com.sun.star.lang import IllegalArgumentException
+from com.sun.star.container import NoSuchElementException
 
 
 class CheckNamedPropertyValues(unittest.TestCase):
@@ -40,8 +43,8 @@ class CheckNamedPropertyValues(unittest.TestCase):
 cls._uno.tearDown()
 
 
-def test_checkNamedPropertyValues(self): 
-
+def test_checkNamedPropertyValues(self):
+
 xServiceManager = self.xContext.ServiceManager
 xCont = 
xServiceManager.createInstanceWithContext('com.sun.star.document.NamedPropertyValues',
 self.xContext)
 
@@ -52,7 +55,7 @@ class CheckNamedPropertyValues(unittest.TestCase):
 prop2 = uno.Any("[]com.sun.star.beans.PropertyValue", (p2,))
 
 t = xCont.getElementType()
-self.assertFalse(xCont.hasElements()) #Initial container is not empty
+self.assertFalse(xCont.hasElements(),  "Initial container is not 
empty")
 
 uno.invoke(xCont, "insertByName", ("prop1", prop1))
 ret = xCont["prop1"]
@@ -65,23 +68,23 @@ class CheckNamedPropertyValues(unittest.TestCase):
 self.assertEqual(p2.Value, ret[0].Value)
 
 xCont.removeByName("prop1")
-self.assertFalse(xCont.hasElements()) #Could not remove PropertyValue.
+self.assertFalse(xCont.hasElements(), "Could not remove 
PropertyValue.")
 uno.invoke(xCont, "insertByName", ("prop1", prop1))
 uno.invoke(xCont, "insertByName", ("prop2", prop2))
-self.assertTrue(xCont.hasElements()) #Did not insert PropertyValue
+self.assertTrue(xCont.hasElements(), "Did not insert PropertyValue")
 names = xCont.getElementNames()
-self.assertEqual(2, len(names)) #Not all element names were returned
+self.assertEqual(2, len(names), "Not all element names were returned")
+
 for i in range(len(names)):
-self.assertTrue( names[i]=="prop1" or names[i]=="prop2") #Got a 
wrong element name
+self.assertIn(names[i], ["prop1", "prop2"], "Got a wrong element 
name")
 
-with self.assertRaises(Exception):
+with self.assertRaises(ElementExistException):
 uno.invoke(xCont, "insertByName", ("prop2", prop1))
 
-with self.assertRaises(Exception):
+with self.assertRaises(IllegalArgumentException):
 uno.invoke(xCont, "insertByName",("prop3", "Example String"))
 
-with self.assertRaises(Exception):
+with self.assertRaises(NoSuchElementException):
 xCont.removeByName("prop3")
 
 
-
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/qa

2016-01-29 Thread kadertarlan
 sw/qa/python/check_indexed_property_values.py |   14 --
 1 file changed, 8 insertions(+), 6 deletions(-)

New commits:
commit 679bcbe06dc063414151ce05d4bf3e3b44f2de8d
Author: kadertarlan 
Date:   Thu Jan 28 20:51:10 2016 +0200

tdf#97362: Fixed Python unit test (check_indexed_property_values.py)

Change-Id: Ib8cfaccaaf5bf75169c96e46d95ff118cc850f79
v2: Deleted whitespaces
Reviewed-on: https://gerrit.libreoffice.org/21886
Tested-by: Jenkins 
Reviewed-by: jan iversen 

diff --git a/sw/qa/python/check_indexed_property_values.py 
b/sw/qa/python/check_indexed_property_values.py
index 0e18b94..b146359 100644
--- a/sw/qa/python/check_indexed_property_values.py
+++ b/sw/qa/python/check_indexed_property_values.py
@@ -23,6 +23,8 @@ from org.libreoffice.unotest import UnoInProcess
 from com.sun.star.beans import PropertyValue
 from com.sun.star.container import XIndexContainer
 from org.libreoffice.unotest import OfficeConnection
+from com.sun.star.lang import IllegalArgumentException
+from com.sun.star.lang import IndexOutOfBoundsException
 
 class CheckIndexedPropertyValues(unittest.TestCase):
 
@@ -53,7 +55,7 @@ class CheckIndexedPropertyValues(unittest.TestCase):
 prop3 = uno.Any("[]com.sun.star.beans.PropertyValue", (p3,))
 
 t = xCont.getElementType()
-self.assertEqual(0, xCont.getCount()) #Initial container is not empty
+self.assertEqual(0, xCont.getCount(), "Initial container is not empty")
 uno.invoke(xCont, "insertByIndex", (0, prop1))
 
 ret = xCont.getByIndex(0)
@@ -66,10 +68,10 @@ class CheckIndexedPropertyValues(unittest.TestCase):
 self.assertEqual(p2.Value, ret[0].Value)
 
 xCont.removeByIndex(0)
-self.assertTrue(not(xCont.hasElements()) and xCont.getCount()==0) 
#Could not remove PropertyValue
+self.assertTrue(not(xCont.hasElements()) and xCont.getCount()==0, 
"Could not remove PropertyValue")
 uno.invoke(xCont, "insertByIndex", (0, prop1))
 uno.invoke(xCont, "insertByIndex", (1, prop2))
-self.assertTrue(xCont.hasElements() and xCont.getCount()==2) #Did not 
insert PropertyValue
+self.assertTrue(xCont.hasElements() and xCont.getCount()==2, "Did not 
insert PropertyValue")
 
 uno.invoke(xCont, "insertByIndex", (1, prop2))
 uno.invoke(xCont, "insertByIndex", (1, prop3))
@@ -77,11 +79,11 @@ class CheckIndexedPropertyValues(unittest.TestCase):
 self.assertEqual(p3.Name, ret[0].Name)
 self.assertEqual(p3.Value, ret[0].Value)
 
-with self.assertRaises(Exception):
+with self.assertRaises(IndexOutOfBoundsException):
 uno.invoke(xCont, "insertByIndex", (25, prop2))
 
-with self.assertRaises(Exception):
+with self.assertRaises(IndexOutOfBoundsException):
 xCont.removeByIndex(25)
 
-with self.assertRaises(Exception):
+with self.assertRaises(IllegalArgumentException):
 uno.invoke(xCont, "insertByIndex", (3, "Example String"))
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/JunitTest_sw_complex.mk sw/PythonTest_sw_python.mk sw/qa

2016-01-28 Thread kadertarlan
 sw/JunitTest_sw_complex.mk   |2 
 sw/PythonTest_sw_python.mk   |9 -
 sw/qa/complex/writer/CheckIndexedPropertyValues.java |  122 ---
 sw/qa/python/check_indexed_property_values.py|   87 +
 4 files changed, 92 insertions(+), 128 deletions(-)

New commits:
commit db796cbdeca1c1573728fbdf9bf24e223c3a6c6b
Author: kadertarlan 
Date:   Wed Jan 27 23:44:02 2016 +0200

tdf#97362: Convert Java unit test to Python 
(check_indexed_property_values.py)

Change-Id: I6c3be8496b4a2225375072d9380d5e226b663905
Reviewed-on: https://gerrit.libreoffice.org/21853
Tested-by: Jenkins 
Reviewed-by: jan iversen 

diff --git a/sw/JunitTest_sw_complex.mk b/sw/JunitTest_sw_complex.mk
index e0aaa97..0bff210 100644
--- a/sw/JunitTest_sw_complex.mk
+++ b/sw/JunitTest_sw_complex.mk
@@ -29,7 +29,6 @@ $(eval $(call gb_JunitTest_add_sourcefiles,sw_complex,\
 sw/qa/complex/checkColor/CheckChangeColor \
 sw/qa/complex/indeterminateState/CheckIndeterminateState \
 sw/qa/complex/writer/CheckBookmarks \
-sw/qa/complex/writer/CheckIndexedPropertyValues \
 sw/qa/complex/writer/CheckTable \
 sw/qa/complex/writer/LoadSaveTest \
 sw/qa/complex/writer/TestDocument \
@@ -49,7 +48,6 @@ $(eval $(call gb_JunitTest_add_classes,sw_complex,\
 complex.checkColor.CheckChangeColor \
 complex.writer.CheckBookmarks \
 complex.writer.CheckTable \
-complex.writer.CheckIndexedPropertyValues \
 complex.writer.TextPortionEnumerationTest \
 ))
 
diff --git a/sw/PythonTest_sw_python.mk b/sw/PythonTest_sw_python.mk
index e2efba0..3c5e2d5 100644
--- a/sw/PythonTest_sw_python.mk
+++ b/sw/PythonTest_sw_python.mk
@@ -15,10 +15,11 @@ $(eval $(call gb_PythonTest_set_defs,sw_python,\
 
 $(eval $(call gb_PythonTest_add_modules,sw_python,$(SRCDIR)/sw/qa/python,\
check_index \
-check_flies \
-   check_fields \
-check_cross_references \
-check_named_property_values \
+   check_flies \
+   check_fields \
+   check_cross_references \
+   check_named_property_values \
+   check_indexed_property_values \
check_styles \
check_table \
get_expression \
diff --git a/sw/qa/complex/writer/CheckIndexedPropertyValues.java 
b/sw/qa/complex/writer/CheckIndexedPropertyValues.java
deleted file mode 100644
index 83d58c4..000
--- a/sw/qa/complex/writer/CheckIndexedPropertyValues.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-package complex.writer;
-
-import com.sun.star.beans.PropertyValue;
-import com.sun.star.container.XIndexContainer;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.Type;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.openoffice.test.OfficeConnection;
-import static org.junit.Assert.*;
-
-/**
- * Test the com.sun.star.document.IndexedPropertyValues service
- */
-public class CheckIndexedPropertyValues {
-@Test public void checkIndexedPropertyValues()
-throws com.sun.star.uno.Exception
-{
-Object instance = connection.getComponentContext().getServiceManager().
-createInstanceWithContext(
-"com.sun.star.document.IndexedPropertyValues",
-connection.getComponentContext());
-XIndexContainer xCont = 
UnoRuntime.queryInterface(XIndexContainer.class, instance);
-
-assertNotNull("XIndexContainer was queried but returned null.", xCont);
-PropertyValue[] prop1 = new PropertyValue[1];
-prop1[0] = new PropertyValue();
-prop1[0].Name  = "Jupp";
-prop1[0].Value = "GoodGuy";
-
-PropertyValue[] prop2 = new PropertyValue[1];
-prop2[0] = new PropertyValue();
-prop2[0].Name  = "Horst";
-prop2[0].Value = "BadGuy";
-
-PropertyValue[] prop3 = new PropertyValue[1];
-prop3[0] = new PropertyValue();
-prop3[0].Name  = "Peter";
-prop3[0].Value = "FamilyGuy";
-
-Type t = xCont.g

[Libreoffice-commits] core.git: sw/JunitTest_sw_complex.mk sw/PythonTest_sw_python.mk sw/qa

2016-01-27 Thread kadertarlan
 sw/JunitTest_sw_complex.mk |2 
 sw/PythonTest_sw_python.mk |1 
 sw/qa/complex/writer/CheckNamedPropertyValues.java |  110 -
 sw/qa/python/check_named_property_values.py|   87 
 4 files changed, 88 insertions(+), 112 deletions(-)

New commits:
commit 4a377f5d37a733e30de1c545c9e90eddd9dac9c3
Author: kadertarlan 
Date:   Wed Jan 27 01:05:44 2016 +0200

Convert Java unit test to Python (check_named_property_values.py)

Change-Id: I70d05395b8b5ca89c6a2ebf63c1b4a7760a1559e
Reviewed-on: https://gerrit.libreoffice.org/21829
Tested-by: Jenkins 
Reviewed-by: Björn Michaelsen 

diff --git a/sw/JunitTest_sw_complex.mk b/sw/JunitTest_sw_complex.mk
index 688ef19..e0aaa97 100644
--- a/sw/JunitTest_sw_complex.mk
+++ b/sw/JunitTest_sw_complex.mk
@@ -30,7 +30,6 @@ $(eval $(call gb_JunitTest_add_sourcefiles,sw_complex,\
 sw/qa/complex/indeterminateState/CheckIndeterminateState \
 sw/qa/complex/writer/CheckBookmarks \
 sw/qa/complex/writer/CheckIndexedPropertyValues \
-sw/qa/complex/writer/CheckNamedPropertyValues \
 sw/qa/complex/writer/CheckTable \
 sw/qa/complex/writer/LoadSaveTest \
 sw/qa/complex/writer/TestDocument \
@@ -51,7 +50,6 @@ $(eval $(call gb_JunitTest_add_classes,sw_complex,\
 complex.writer.CheckBookmarks \
 complex.writer.CheckTable \
 complex.writer.CheckIndexedPropertyValues \
-complex.writer.CheckNamedPropertyValues \
 complex.writer.TextPortionEnumerationTest \
 ))
 
diff --git a/sw/PythonTest_sw_python.mk b/sw/PythonTest_sw_python.mk
index 44d7ff4..e2efba0 100644
--- a/sw/PythonTest_sw_python.mk
+++ b/sw/PythonTest_sw_python.mk
@@ -18,6 +18,7 @@ $(eval $(call 
gb_PythonTest_add_modules,sw_python,$(SRCDIR)/sw/qa/python,\
 check_flies \
check_fields \
 check_cross_references \
+check_named_property_values \
check_styles \
check_table \
get_expression \
diff --git a/sw/qa/complex/writer/CheckNamedPropertyValues.java 
b/sw/qa/complex/writer/CheckNamedPropertyValues.java
deleted file mode 100644
index d09ebb6..000
--- a/sw/qa/complex/writer/CheckNamedPropertyValues.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-package complex.writer;
-
-import com.sun.star.beans.PropertyValue;
-import com.sun.star.container.XNameContainer;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.Type;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.openoffice.test.OfficeConnection;
-import static org.junit.Assert.*;
-
-/**
- *
- */
-public class CheckNamedPropertyValues {
-@Test public void checkNamedPropertyValues()
-throws com.sun.star.uno.Exception
-{
-Object instance = connection.getComponentContext().getServiceManager().
-createInstanceWithContext( 
"com.sun.star.document.NamedPropertyValues", connection.getComponentContext());
-XNameContainer xCont = UnoRuntime.queryInterface(XNameContainer.class, 
instance);
-
-assertNotNull("XNameContainer was queried but returned null.", xCont);
-PropertyValue[] prop1 = new PropertyValue[1];
-prop1[0] = new PropertyValue();
-prop1[0].Name  = "Jupp";
-prop1[0].Value = "GoodGuy";
-
-PropertyValue[] prop2 = new PropertyValue[1];
-prop2[0] = new PropertyValue();
-prop2[0].Name  = "Horst";
-prop2[0].Value = "BadGuy";
-
-Type t = xCont.getElementType();
-assertFalse("Initial container is not empty.", xCont.hasElements());
-
-xCont.insertByName("prop1", prop1);
-PropertyValue[]ret = (PropertyValue[])xCont.getByName("prop1");
-assertEquals(prop1[0].Name, ret[0].Name);
-assertEquals(prop1[0].Value, ret[0].Value);
-xCont.replaceByName("prop1", prop2);
-ret = (PropertyValue[])xCont.getByName("prop1");
-assertEquals(prop2[0].Name, ret[0].Name);
-assertEquals(prop2[0].Value, ret[0]

[Libreoffice-commits] core.git: sw/JunitTest_sw_complex.mk sw/PythonTest_sw_python.mk sw/qa

2015-12-18 Thread kadertarlan
 sw/JunitTest_sw_complex.mk |1 
 sw/PythonTest_sw_python.mk |1 
 sw/qa/complex/writer/CheckCrossReferences.java |  312 -
 sw/qa/python/check_cross_references.py |  234 ++
 4 files changed, 235 insertions(+), 313 deletions(-)

New commits:
commit 214b0c8356ab88e75cb4bbc2ad3109ee536dcd70
Author: kadertarlan 
Date:   Fri Dec 18 05:51:32 2015 +0200

Java unittest(CheckCrossReferences.java) converted to Python unittest

Change-Id: I9b856c9ffd7b3b380b2c1ba37c7c07355423c1f5
Reviewed-on: https://gerrit.libreoffice.org/20786
Reviewed-by: jan iversen 
Tested-by: jan iversen 

diff --git a/sw/JunitTest_sw_complex.mk b/sw/JunitTest_sw_complex.mk
index cdf9a94..ae96c28 100644
--- a/sw/JunitTest_sw_complex.mk
+++ b/sw/JunitTest_sw_complex.mk
@@ -29,7 +29,6 @@ $(eval $(call gb_JunitTest_add_sourcefiles,sw_complex,\
 sw/qa/complex/checkColor/CheckChangeColor \
 sw/qa/complex/indeterminateState/CheckIndeterminateState \
 sw/qa/complex/writer/CheckBookmarks \
-sw/qa/complex/writer/CheckCrossReferences \
 sw/qa/complex/writer/CheckIndexedPropertyValues \
 sw/qa/complex/writer/CheckNamedPropertyValues \
 sw/qa/complex/writer/CheckTable \
diff --git a/sw/PythonTest_sw_python.mk b/sw/PythonTest_sw_python.mk
index c24d418..44d7ff4 100644
--- a/sw/PythonTest_sw_python.mk
+++ b/sw/PythonTest_sw_python.mk
@@ -17,6 +17,7 @@ $(eval $(call 
gb_PythonTest_add_modules,sw_python,$(SRCDIR)/sw/qa/python,\
check_index \
 check_flies \
check_fields \
+check_cross_references \
check_styles \
check_table \
get_expression \
diff --git a/sw/qa/complex/writer/CheckCrossReferences.java 
b/sw/qa/complex/writer/CheckCrossReferences.java
deleted file mode 100644
index 651604b..000
--- a/sw/qa/complex/writer/CheckCrossReferences.java
+++ /dev/null
@@ -1,312 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-package complex.writer;
-
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.text.XTextDocument;
-import com.sun.star.uno.UnoRuntime;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.openoffice.test.OfficeConnection;
-import static org.junit.Assert.*;
-
-public class CheckCrossReferences {
-
-private com.sun.star.container.XEnumeration xParaEnum;
-private com.sun.star.container.XEnumeration xPortionEnum;
-private com.sun.star.util.XRefreshable xFieldsRefresh;
-
-public com.sun.star.text.XTextField getNextField()
-throws com.sun.star.uno.Exception
-{
-while (true) {
-while (xPortionEnum == null) {
-if (!xParaEnum.hasMoreElements())
-fail("Cannot retrieve next field.");
-
-com.sun.star.container.XEnumerationAccess aPara =
-UnoRuntime.queryInterface(
-com.sun.star.container.XEnumerationAccess.class, 
xParaEnum.nextElement());
-xPortionEnum = aPara.createEnumeration();
-}
-
-if ( xPortionEnum == null )
-break;
-
-while ( xPortionEnum.hasMoreElements() ) {
-com.sun.star.beans.XPropertySet xPortionProps =
-UnoRuntime.queryInterface(
-com.sun.star.beans.XPropertySet.class , 
xPortionEnum.nextElement());
-final String sPortionType =
-xPortionProps.getPropertyValue( "TextPortionType" 
).toString();
-if ( sPortionType.equals( "TextField") ) {
-com.sun.star.text.XTextField xField = 
UnoRuntime.queryInterface(
-com.sun.star.text.XTextField.class,
-xPortionProps.getPropertyValue( "TextField" ) );
-assertNotNull("Cannot retrieve next field.", xField);
-return xField;
-}
-}
-xPortionEnum = null;
-}
-
-return null; // unreachable
-}

[Libreoffice-commits] core.git: sw/PythonTest_sw_python.mk sw/qa

2015-12-15 Thread kadertarlan
 sw/PythonTest_sw_python.mk   |3 
 sw/qa/complex/writer/CheckFlies.java |  207 ---
 sw/qa/python/check_flies.py  |  126 +
 3 files changed, 128 insertions(+), 208 deletions(-)

New commits:
commit b71540c1980955b439d334c875f47d2ee44e4c5f
Author: kadertarlan 
Date:   Mon Dec 14 17:06:17 2015 +0200

Java unit tests were converted to Python unit tests

Remark test document not moved, due to other test cases.

Change-Id: I9564b72fae60cceb60121fec06e1ed015add8453
Reviewed-on: https://gerrit.libreoffice.org/20703
Reviewed-by: jan iversen 
Tested-by: jan iversen 

diff --git a/sw/PythonTest_sw_python.mk b/sw/PythonTest_sw_python.mk
index 695bbf9..c24d418 100644
--- a/sw/PythonTest_sw_python.mk
+++ b/sw/PythonTest_sw_python.mk
@@ -15,7 +15,8 @@ $(eval $(call gb_PythonTest_set_defs,sw_python,\
 
 $(eval $(call gb_PythonTest_add_modules,sw_python,$(SRCDIR)/sw/qa/python,\
check_index \
-   check_fields \
+check_flies \
+   check_fields \
check_styles \
check_table \
get_expression \
diff --git a/sw/qa/complex/writer/CheckFlies.java 
b/sw/qa/complex/writer/CheckFlies.java
deleted file mode 100644
index 6682696..000
--- a/sw/qa/complex/writer/CheckFlies.java
+++ /dev/null
@@ -1,207 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-package complex.writer;
-
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.text.XTextDocument;
-import com.sun.star.uno.UnoRuntime;
-import java.util.Collection;
-import java.util.ArrayList;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.openoffice.test.OfficeConnection;
-import static org.junit.Assert.*;
-
-public class CheckFlies {
-@Test public void checkFlies()
-throws com.sun.star.uno.Exception
-{
-com.sun.star.text.XTextFramesSupplier xTFS = UnoRuntime.queryInterface(
-com.sun.star.text.XTextFramesSupplier.class,
-document);
-checkTextFrames(xTFS);
-com.sun.star.text.XTextGraphicObjectsSupplier xTGOS = 
UnoRuntime.queryInterface(
-com.sun.star.text.XTextGraphicObjectsSupplier.class,
-document);
-checkGraphicFrames(xTGOS);
-com.sun.star.text.XTextEmbeddedObjectsSupplier xTEOS = 
UnoRuntime.queryInterface(
-com.sun.star.text.XTextEmbeddedObjectsSupplier.class,
-document);
-checkEmbeddedFrames(xTEOS);
-}
-
-private void 
checkEmbeddedFrames(com.sun.star.text.XTextEmbeddedObjectsSupplier xTGOS)
-throws com.sun.star.uno.Exception
-{
-Collection vExpectedEmbeddedFrames = new ArrayList();
-vExpectedEmbeddedFrames.add("Object1");
-int nEmbeddedFrames = vExpectedEmbeddedFrames.size();
-com.sun.star.container.XNameAccess xEmbeddedFrames = 
xTGOS.getEmbeddedObjects();
-for(String sFrameName : xEmbeddedFrames.getElementNames())
-{
-assertTrue(
-"Unexpected frame name",
-vExpectedEmbeddedFrames.remove(sFrameName));
-xEmbeddedFrames.getByName(sFrameName);
-assertTrue(
-"Could not find embedded frame by name.",
-xEmbeddedFrames.hasByName(sFrameName));
-}
-assertTrue(
-"Missing expected embedded frames.",
-vExpectedEmbeddedFrames.isEmpty());
-try
-{
-xEmbeddedFrames.getByName("Nonexisting embedded frame");
-fail("Got nonexisting embedded frame");
-}
-catch(com.sun.star.container.NoSuchElementException e)
-{}
-assertFalse(
-"Has nonexisting embedded frame",
-xEmbeddedFrames.hasByName("Nonexisting embedded frame"));
-
-com.sun.star.container.XIndexAccess xEmbeddedFramesIdx = 
UnoRuntime.queryInterface(
-com.sun.star.container.XIndexAccess.class,
-xEmbeddedFrames);
-as