summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chart2/prj/build.lst1
-rw-r--r--chart2/prj/d.lst4
-rw-r--r--chart2/source/controller/chartcontroller.component56
-rw-r--r--chart2/source/controller/main/_serviceregistration_controller.cxx7
-rw-r--r--chart2/source/controller/makefile.mk8
-rw-r--r--chart2/source/inc/exports.dxp1
-rw-r--r--chart2/source/model/chartmodel.component150
-rw-r--r--chart2/source/model/main/_serviceregistration_model.cxx10
-rw-r--r--chart2/source/model/makefile.mk8
-rw-r--r--chart2/source/tools/_serviceregistration_tools.cxx7
-rw-r--r--chart2/source/tools/charttools.component92
-rw-r--r--chart2/source/tools/makefile.mk8
-rw-r--r--chart2/source/view/chartview.component34
-rw-r--r--chart2/source/view/main/_serviceregistration_view.cxx7
-rw-r--r--chart2/source/view/makefile.mk8
-rw-r--r--sc/addin/inc/addin.h7
-rw-r--r--sc/inc/address.hxx6
-rw-r--r--sc/inc/callform.hxx6
-rw-r--r--sc/inc/unoguard.hxx2
-rw-r--r--[-rwxr-xr-x]sc/prj/build.lst7
-rw-r--r--sc/prj/d.lst3
-rw-r--r--sc/qa/complex/calcPreview/TestDocument.java39
-rwxr-xr-xsc/qa/complex/calcPreview/ViewForwarder.java501
-rwxr-xr-xsc/qa/complex/calcPreview/makefile.mk140
-rwxr-xr-xsc/qa/complex/cellRanges/CheckXCellRangesQuery.java157
-rwxr-xr-xsc/qa/complex/cellRanges/makefile.mk62
-rw-r--r--sc/qa/complex/dataPilot/CheckDataPilot.java198
-rw-r--r--sc/qa/complex/dataPilot/_XDataPilotDescriptor.java (renamed from sc/qa/complex/dataPilot/interfaceTests/sheet/_XDataPilotDescriptor.java)135
-rw-r--r--sc/qa/complex/dataPilot/_XDataPilotTable.java (renamed from sc/qa/complex/dataPilot/interfaceTests/sheet/_XDataPilotTable.java)26
-rw-r--r--sc/qa/complex/dataPilot/_XNamed.java (renamed from sc/qa/complex/dataPilot/interfaceTests/container/_XNamed.java)46
-rw-r--r--sc/qa/complex/dataPilot/_XPropertySet.java (renamed from sc/qa/complex/dataPilot/interfaceTests/beans/_XPropertySet.java)164
-rw-r--r--sc/qa/complex/dataPilot/interfaceTests/beans/makefile.mk6
-rw-r--r--sc/qa/complex/dataPilot/interfaceTests/container/makefile.mk6
-rw-r--r--sc/qa/complex/dataPilot/interfaceTests/sheet/makefile.mk6
-rw-r--r--sc/qa/complex/dataPilot/makefile.mk45
-rw-r--r--sc/qa/complex/sc/CalcRTL.java238
-rw-r--r--sc/qa/complex/sc/makefile.mk44
-rwxr-xr-x[-rw-r--r--]sc/source/core/data/documen2.cxx0
-rw-r--r--sc/source/core/data/table1.cxx2
-rw-r--r--sc/source/core/tool/chartpos.cxx23
-rw-r--r--sc/source/core/tool/interpr1.cxx16
-rw-r--r--sc/source/core/tool/interpr2.cxx8
-rwxr-xr-x[-rw-r--r--]sc/source/core/tool/interpr4.cxx0
-rw-r--r--sc/source/filter/excel/impop.cxx2
-rw-r--r--sc/source/filter/lotus/lotimpop.cxx2
-rw-r--r--sc/source/filter/lotus/op.cxx2
-rwxr-xr-x[-rw-r--r--]sc/source/ui/app/inputwin.cxx6
-rw-r--r--sc/source/ui/dbgui/scuiasciiopt.cxx5
-rw-r--r--sc/source/ui/drawfunc/futext2.cxx4
-rw-r--r--sc/source/ui/unoobj/appluno.cxx120
-rw-r--r--sc/source/ui/unoobj/detreg.cxx21
-rw-r--r--sc/source/ui/vba/service.cxx35
-rw-r--r--sc/source/ui/view/prevwsh2.cxx4
-rw-r--r--sc/source/ui/view/viewfun3.cxx4
-rw-r--r--sc/util/makefile.mk20
-rw-r--r--sc/util/sc.component97
-rw-r--r--sc/util/scd.component34
-rw-r--r--sc/util/vbaobj.component58
-rw-r--r--scaddins/prj/d.lst2
-rw-r--r--scaddins/source/analysis/analysis.component35
-rw-r--r--scaddins/source/analysis/analysis.cxx31
-rw-r--r--scaddins/source/analysis/makefile.mk8
-rw-r--r--scaddins/source/datefunc/date.component35
-rw-r--r--scaddins/source/datefunc/datefunc.cxx29
-rw-r--r--scaddins/source/datefunc/datefunc.def1
-rw-r--r--scaddins/source/datefunc/makefile.mk8
-rw-r--r--sccomp/prj/d.lst1
-rw-r--r--sccomp/source/solver/makefile.mk8
-rw-r--r--sccomp/source/solver/solver.component34
-rw-r--r--sccomp/source/solver/solver.cxx28
70 files changed, 1774 insertions, 1154 deletions
diff --git a/chart2/prj/build.lst b/chart2/prj/build.lst
index 469eb7554..3cdc9a26e 100644
--- a/chart2/prj/build.lst
+++ b/chart2/prj/build.lst
@@ -24,4 +24,3 @@ ch chart2\source\controller\chartapiwrapper nmake - all ch_source_controlle
ch chart2\source\controller\main nmake - all ch_source_controller_main ch_inc NULL
ch chart2\source\controller\menus nmake - all ch_source_controller_menus ch_inc NULL
ch chart2\prj get - all ch_prj NULL
-ch chart2\qa\unoapi nmake - all ch_qa_unoapi NULL
diff --git a/chart2/prj/d.lst b/chart2/prj/d.lst
index 440e2efbe..bf1085336 100644
--- a/chart2/prj/d.lst
+++ b/chart2/prj/d.lst
@@ -21,3 +21,7 @@ mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\schart\statusbar
..\uiconfig\statusbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\schart\statusbar\*.xml
mkdir: %_DEST%\inc%_EXT%\chart2
+..\%__SRC%\misc\chartcontroller.component %_DEST%\xml%_EXT%\chartcontroller.component
+..\%__SRC%\misc\chartmodel.component %_DEST%\xml%_EXT%\chartmodel.component
+..\%__SRC%\misc\charttools.component %_DEST%\xml%_EXT%\charttools.component
+..\%__SRC%\misc\chartview.component %_DEST%\xml%_EXT%\chartview.component
diff --git a/chart2/source/controller/chartcontroller.component b/chart2/source/controller/chartcontroller.component
new file mode 100644
index 000000000..fc99913b5
--- /dev/null
+++ b/chart2/source/controller/chartcontroller.component
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.comp.chart.ElementSelectorToolbarController">
+ <service name="com.sun.star.frame.ToolbarController"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.chart2.ChartController">
+ <service name="com.sun.star.chart2.ChartController"/>
+ <service name="com.sun.star.frame.Controller"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.chart2.ChartDocumentWrapper">
+ <service name="com.sun.star.beans.PropertySet"/>
+ <service name="com.sun.star.chart.ChartDocument"/>
+ <service name="com.sun.star.chart2.ChartDocumentWrapper"/>
+ <service name="com.sun.star.xml.UserDefinedAttributeSupplier"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.chart2.ChartFrameLoader">
+ <service name="com.sun.star.frame.SynchronousFrameLoader"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.chart2.ChartTypeDialog">
+ <service name="com.sun.star.chart2.ChartTypeDialog"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.chart2.ShapeToolbarController">
+ <service name="com.sun.star.chart2.ShapeToolbarController"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.chart2.WizardDialog">
+ <service name="com.sun.star.chart2.WizardDialog"/>
+ </implementation>
+</component>
diff --git a/chart2/source/controller/main/_serviceregistration_controller.cxx b/chart2/source/controller/main/_serviceregistration_controller.cxx
index 6dd12e642..eaa970b82 100644
--- a/chart2/source/controller/main/_serviceregistration_controller.cxx
+++ b/chart2/source/controller/main/_serviceregistration_controller.cxx
@@ -108,13 +108,6 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
//==================================================================================================
-SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo(
- void * pServiceManager, void * pRegistryKey )
-{
- return ::cppu::component_writeInfoHelper(
- pServiceManager, pRegistryKey, g_entries_chart2_controller );
-}
-//==================================================================================================
SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
{
diff --git a/chart2/source/controller/makefile.mk b/chart2/source/controller/makefile.mk
index b8a256181..fbc888f38 100644
--- a/chart2/source/controller/makefile.mk
+++ b/chart2/source/controller/makefile.mk
@@ -126,3 +126,11 @@ RESLIB1DEPN=$(RESLIB1LIST)
# --- Targets -----------------------------------------------------------------
.INCLUDE: target.mk
+
+ALLTAR : $(MISC)/chartcontroller.component
+
+$(MISC)/chartcontroller.component .ERRREMOVE : \
+ $(SOLARENV)/bin/createcomponent.xslt chartcontroller.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt chartcontroller.component
diff --git a/chart2/source/inc/exports.dxp b/chart2/source/inc/exports.dxp
index 9630d7e06..f0e1c6993 100644
--- a/chart2/source/inc/exports.dxp
+++ b/chart2/source/inc/exports.dxp
@@ -1,3 +1,2 @@
component_getImplementationEnvironment
-component_writeInfo
component_getFactory
diff --git a/chart2/source/model/chartmodel.component b/chart2/source/model/chartmodel.component
new file mode 100644
index 000000000..fa26e51ac
--- /dev/null
+++ b/chart2/source/model/chartmodel.component
@@ -0,0 +1,150 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.comp.chart.AreaChartType">
+ <service name="com.sun.star.chart2.AreaChartType"/>
+ <service name="com.sun.star.chart2.ChartType"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.chart.BarChartType">
+ <service name="com.sun.star.chart2.BarChartType"/>
+ <service name="com.sun.star.chart2.ChartType"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.chart.BubbleChartType">
+ <service name="com.sun.star.beans.PropertySet"/>
+ <service name="com.sun.star.chart2.BubbleChartType"/>
+ <service name="com.sun.star.chart2.ChartType"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.chart.CandleStickChartType">
+ <service name="com.sun.star.beans.PropertySet"/>
+ <service name="com.sun.star.chart2.CandleStickChartType"/>
+ <service name="com.sun.star.chart2.ChartType"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.chart.ChartTypeManager">
+ <service name="com.sun.star.chart2.ChartTypeManager"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.chart.ColumnChartType">
+ <service name="com.sun.star.chart2.ChartType"/>
+ <service name="com.sun.star.chart2.ColumnChartType"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.chart.DataSeries">
+ <service name="com.sun.star.beans.PropertySet"/>
+ <service name="com.sun.star.chart2.DataPointProperties"/>
+ <service name="com.sun.star.chart2.DataSeries"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.chart.FilledNetChartType">
+ <service name="com.sun.star.beans.PropertySet"/>
+ <service name="com.sun.star.chart2.ChartType"/>
+ <service name="com.sun.star.chart2.FilledNetChartType"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.chart.FormattedString">
+ <service name="com.sun.star.beans.PropertySet"/>
+ <service name="com.sun.star.chart2.FormattedString"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.chart.LineChartType">
+ <service name="com.sun.star.beans.PropertySet"/>
+ <service name="com.sun.star.chart2.ChartType"/>
+ <service name="com.sun.star.chart2.LineChartType"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.chart.NetChartType">
+ <service name="com.sun.star.beans.PropertySet"/>
+ <service name="com.sun.star.chart2.ChartType"/>
+ <service name="com.sun.star.chart2.NetChartType"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.chart.PieChartType">
+ <service name="com.sun.star.beans.PropertySet"/>
+ <service name="com.sun.star.chart2.ChartType"/>
+ <service name="com.sun.star.chart2.PieChartType"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.chart.ScatterChartType">
+ <service name="com.sun.star.beans.PropertySet"/>
+ <service name="com.sun.star.chart2.ChartType"/>
+ <service name="com.sun.star.chart2.ScatterChartType"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.chart2.Axis">
+ <service name="com.sun.star.beans.PropertySet"/>
+ <service name="com.sun.star.chart2.Axis"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.chart2.CartesianCoordinateSystem2d">
+ <service name="com.sun.star.chart2.CartesianCoordinateSystem2d"/>
+ <service name="com.sun.star.chart2.CoordinateSystems.Cartesian"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.chart2.CartesianCoordinateSystem3d">
+ <service name="com.sun.star.chart2.CartesianCoordinateSystem3d"/>
+ <service name="com.sun.star.chart2.CoordinateSystems.Cartesian"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.chart2.ChartModel">
+ <service name="com.sun.star.chart.ChartDocument"/>
+ <service name="com.sun.star.chart2.ChartDocument"/>
+ <service name="com.sun.star.document.OfficeDocument"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.chart2.Diagram">
+ <service name="com.sun.star.beans.PropertySet"/>
+ <service name="com.sun.star.chart2.Diagram"/>
+ <service name="com.sun.star.layout.LayoutElement"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.chart2.GridProperties">
+ <service name="com.sun.star.beans.PropertySet"/>
+ <service name="com.sun.star.chart2.GridProperties"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.chart2.Legend">
+ <service name="com.sun.star.beans.PropertySet"/>
+ <service name="com.sun.star.chart2.Legend"/>
+ <service name="com.sun.star.drawing.FillProperties"/>
+ <service name="com.sun.star.drawing.LineProperties"/>
+ <service name="com.sun.star.layout.LayoutElement"/>
+ <service name="com.sun.star.style.CharacterProperties"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.chart2.PageBackground">
+ <service name="com.sun.star.beans.PropertySet"/>
+ <service name="com.sun.star.chart2.PageBackground"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.chart2.PolarCoordinateSystem2d">
+ <service name="com.sun.star.chart2.CoordinateSystems.Polar"/>
+ <service name="com.sun.star.chart2.PolarCoordinateSystem2d"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.chart2.PolarCoordinateSystem3d">
+ <service name="com.sun.star.chart2.CoordinateSystems.Polar"/>
+ <service name="com.sun.star.chart2.PolarCoordinateSystem3d"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.chart2.Title">
+ <service name="com.sun.star.beans.PropertySet"/>
+ <service name="com.sun.star.chart2.Title"/>
+ <service name="com.sun.star.layout.LayoutElement"/>
+ <service name="com.sun.star.style.ParagraphProperties"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.chart2.XMLFilter">
+ <service name="com.sun.star.document.ExportFilter"/>
+ <service name="com.sun.star.document.ImportFilter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.chart2.report.XMLFilter">
+ <service name="com.sun.star.document.ExportFilter"/>
+ <service name="com.sun.star.document.ImportFilter"/>
+ </implementation>
+</component>
diff --git a/chart2/source/model/main/_serviceregistration_model.cxx b/chart2/source/model/main/_serviceregistration_model.cxx
index a3f3f19cd..416a7d9a9 100644
--- a/chart2/source/model/main/_serviceregistration_model.cxx
+++ b/chart2/source/model/main/_serviceregistration_model.cxx
@@ -193,16 +193,6 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
//==================================================================================================
-SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo(
- void * pServiceManager, void * pRegistryKey )
-{
- return (::cppu::component_writeInfoHelper(
- pServiceManager, pRegistryKey, g_entries_chart2_model ) &&
- ::cppu::component_writeInfoHelper(
- pServiceManager, pRegistryKey,
- ChartTypeEntriesForServiceRegistration::getImplementationEntries() ));
-}
-//==================================================================================================
SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
{
diff --git a/chart2/source/model/makefile.mk b/chart2/source/model/makefile.mk
index dfb5522a7..52cc85c10 100644
--- a/chart2/source/model/makefile.mk
+++ b/chart2/source/model/makefile.mk
@@ -98,3 +98,11 @@ DEF1NAME= $(SHL1TARGET)
# --- Targets -----------------------------------------------------------------
.INCLUDE: target.mk
+
+ALLTAR : $(MISC)/chartmodel.component
+
+$(MISC)/chartmodel.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ chartmodel.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt chartmodel.component
diff --git a/chart2/source/tools/_serviceregistration_tools.cxx b/chart2/source/tools/_serviceregistration_tools.cxx
index f85e0ac2a..8b90bc31d 100644
--- a/chart2/source/tools/_serviceregistration_tools.cxx
+++ b/chart2/source/tools/_serviceregistration_tools.cxx
@@ -183,13 +183,6 @@ OOO_DLLPUBLIC_CHARTTOOLS void SAL_CALL component_getImplementationEnvironment(
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
//==================================================================================================
-OOO_DLLPUBLIC_CHARTTOOLS sal_Bool SAL_CALL component_writeInfo(
- void * pServiceManager, void * pRegistryKey )
-{
- return ::cppu::component_writeInfoHelper(
- pServiceManager, pRegistryKey, g_entries_chart2_tools );
-}
-//==================================================================================================
OOO_DLLPUBLIC_CHARTTOOLS void * SAL_CALL component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
{
diff --git a/chart2/source/tools/charttools.component b/chart2/source/tools/charttools.component
new file mode 100644
index 000000000..7ca499a7b
--- /dev/null
+++ b/chart2/source/tools/charttools.component
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.chart2.ExponentialScaling">
+ <service name="com.sun.star.chart2.ExponentialScaling"/>
+ </implementation>
+ <implementation name="com.sun.star.chart2.LinearScaling">
+ <service name="com.sun.star.chart2.LinearScaling"/>
+ </implementation>
+ <implementation name="com.sun.star.chart2.LogarithmicScaling">
+ <service name="com.sun.star.chart2.LogarithmicScaling"/>
+ </implementation>
+ <implementation name="com.sun.star.chart2.PowerScaling">
+ <service name="com.sun.star.chart2.PowerScaling"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.chart.CachedDataSequence">
+ <service name="com.sun.star.chart2.data.DataSequence"/>
+ <service name="com.sun.star.chart2.data.NumericalDataSequence"/>
+ <service name="com.sun.star.chart2.data.TextualDataSequence"/>
+ <service name="com.sun.star.comp.chart.CachedDataSequence"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.chart.DataSource">
+ <service name="com.sun.star.chart2.data.DataSource"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.chart.InternalDataProvider">
+ <service name="com.sun.star.chart2.data.DataProvider"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.chart2.ConfigDefaultColorScheme">
+ <service name="com.sun.star.chart2.ColorScheme"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.chart2.ErrorBar">
+ <service name="com.sun.star.chart2.ErrorBar"/>
+ <service name="com.sun.star.comp.chart2.ErrorBar"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.chart2.ExponentialRegressionCurve">
+ <service name="com.sun.star.chart2.ExponentialRegressionCurve"/>
+ <service name="com.sun.star.chart2.RegressionCurve"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.chart2.LabeledDataSequence">
+ <service name="com.sun.star.chart2.data.LabeledDataSequence"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.chart2.LinearRegressionCurve">
+ <service name="com.sun.star.chart2.LinearRegressionCurve"/>
+ <service name="com.sun.star.chart2.RegressionCurve"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.chart2.LogarithmicRegressionCurve">
+ <service name="com.sun.star.chart2.LogarithmicRegressionCurve"/>
+ <service name="com.sun.star.chart2.RegressionCurve"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.chart2.MeanValueRegressionCurve">
+ <service name="com.sun.star.chart2.MeanValueRegressionCurve"/>
+ <service name="com.sun.star.chart2.RegressionCurve"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.chart2.PotentialRegressionCurve">
+ <service name="com.sun.star.chart2.PotentialRegressionCurve"/>
+ <service name="com.sun.star.chart2.RegressionCurve"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.chart2.RegressionEquation">
+ <service name="com.sun.star.beans.PropertySet"/>
+ <service name="com.sun.star.chart2.RegressionEquation"/>
+ <service name="com.sun.star.drawing.FillProperties"/>
+ <service name="com.sun.star.drawing.LineProperties"/>
+ <service name="com.sun.star.style.CharacterProperties"/>
+ </implementation>
+</component>
diff --git a/chart2/source/tools/makefile.mk b/chart2/source/tools/makefile.mk
index 2f990af7a..fd92b894b 100644
--- a/chart2/source/tools/makefile.mk
+++ b/chart2/source/tools/makefile.mk
@@ -187,3 +187,11 @@ $(MISC)$/$(SHL1TARGET).flt: makefile.mk \
exports.flt
$(TYPE) exports.flt > $@
+
+ALLTAR : $(MISC)/charttools.component
+
+$(MISC)/charttools.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ charttools.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt charttools.component
diff --git a/chart2/source/view/chartview.component b/chart2/source/view/chartview.component
new file mode 100644
index 000000000..773666150
--- /dev/null
+++ b/chart2/source/view/chartview.component
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.comp.chart2.ChartView">
+ <service name="com.sun.star.chart2.ChartView"/>
+ </implementation>
+</component>
diff --git a/chart2/source/view/main/_serviceregistration_view.cxx b/chart2/source/view/main/_serviceregistration_view.cxx
index 6f384df19..8ca7b5363 100644
--- a/chart2/source/view/main/_serviceregistration_view.cxx
+++ b/chart2/source/view/main/_serviceregistration_view.cxx
@@ -54,13 +54,6 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
//==================================================================================================
-SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo(
- void * pServiceManager, void * pRegistryKey )
-{
- return ::cppu::component_writeInfoHelper(
- pServiceManager, pRegistryKey, g_entries_chart2_view );
-}
-//==================================================================================================
SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
{
diff --git a/chart2/source/view/makefile.mk b/chart2/source/view/makefile.mk
index aa3c149a7..0b54ac976 100644
--- a/chart2/source/view/makefile.mk
+++ b/chart2/source/view/makefile.mk
@@ -118,3 +118,11 @@ DEF1DES= Viewable Component Chart View
$(MISC)$/$(SHL1TARGET).flt: makefile.mk \
exports.flt
$(TYPE) exports.flt > $@
+
+ALLTAR : $(MISC)/chartview.component
+
+$(MISC)/chartview.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ chartview.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt chartview.component
diff --git a/sc/addin/inc/addin.h b/sc/addin/inc/addin.h
index 69cda0b10..3998d3e66 100644
--- a/sc/addin/inc/addin.h
+++ b/sc/addin/inc/addin.h
@@ -67,18 +67,11 @@ typedef enum
NONE
} ParamType;
-#ifndef WIN
#ifdef WNT
#define CALLTYPE __cdecl
#else
#define CALLTYPE
#endif
-#else
-#define PASCAL _pascal
-#define FAR _far
-#define CALLTYPE FAR PASCAL
-#endif
-
#ifdef __cplusplus
diff --git a/sc/inc/address.hxx b/sc/inc/address.hxx
index 6a8d4d79f..545ec192d 100644
--- a/sc/inc/address.hxx
+++ b/sc/inc/address.hxx
@@ -133,12 +133,6 @@ const SCROW SCROWS64K = 65536;
// === old stuff defines =====================================================
-#ifdef WIN
-// Under 16bit Windows rows still had to be limited to 8192.
-// (define manually for testing)
-#define SC_LIMIT_ROWS
-#endif
-
#define MAXROW_30 8191
#define MAXROW_40 31999
diff --git a/sc/inc/callform.hxx b/sc/inc/callform.hxx
index 995c2bebb..6b1dcb69d 100644
--- a/sc/inc/callform.hxx
+++ b/sc/inc/callform.hxx
@@ -35,17 +35,11 @@
#define MAXARRSIZE 0xfffe
//------------------------------------------------------------------------
-#ifndef WIN
#ifndef WNT
#define CALLTYPE
#else
#define CALLTYPE __cdecl
#endif
-#else
-#define PASCAL _pascal
-#define FAR _far
-#define CALLTYPE FAR PASCAL
-#endif
extern "C" {
typedef void (CALLTYPE* AdvData)( double& nHandle, void* pData );
diff --git a/sc/inc/unoguard.hxx b/sc/inc/unoguard.hxx
index 4c83f3cb2..f9efb7dec 100644
--- a/sc/inc/unoguard.hxx
+++ b/sc/inc/unoguard.hxx
@@ -30,7 +30,7 @@
#include <vos/mutex.hxx>
-class ScUnoGuard : public NAMESPACE_VOS(OGuard)
+class ScUnoGuard : public vos::OGuard
{
public:
ScUnoGuard();
diff --git a/sc/prj/build.lst b/sc/prj/build.lst
index afdd953d2..08d9f97b2 100755..100644
--- a/sc/prj/build.lst
+++ b/sc/prj/build.lst
@@ -48,3 +48,10 @@ sc sc\addin\datefunc nmake - all sc_addfu sc_add sc_sdi sc_inc NULL
sc sc\addin\rot13 nmake - all sc_adrot sc_add sc_sdi sc_inc NULL
sc sc\addin\util nmake - all sc_adutil sc_addfu sc_adrot sc_sdi sc_inc NULL
sc sc\util nmake - all sc_util sc_addfu sc_adrot sc_adutil sc_app sc_attr sc_cctrl sc_cosrc sc_data sc_dbgui sc_dif sc_docsh sc_drfnc sc_excel sc_form sc_html sc_lotus sc_qpro sc_misc sc_name sc_nvipi sc_opt sc_page sc_rtf sc_scalc sc_style sc_tool sc_uisrc sc_undo sc_unobj sc_view sc_xcl97 sc_xml sc_acc sc_ftools sc_inc sc_vba NULL
+
+# remarked due to the fact, key press is need in this test.
+# sc sc\qa\complex\calcPreview nmake - all qa_calcpreview NULL
+
+sc sc\qa\complex\cellRanges nmake - all qa_cellranges sc_util NULL
+#sc sc\qa\complex\dataPilot nmake - all qa_datapilot qa_datapilot_ifacetst_beans qa_datapilot_ifacetst_container qa_datapilot_ifacetst_sheet sc_util NULL
+sc sc\qa\complex\sc nmake - all qa_sc sc_util NULL
diff --git a/sc/prj/d.lst b/sc/prj/d.lst
index 6f4e95203..a0d4c1290 100644
--- a/sc/prj/d.lst
+++ b/sc/prj/d.lst
@@ -32,3 +32,6 @@ mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\scalc\statusbar
..\uiconfig\scalc\statusbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\scalc\statusbar\*.xml
..\%__SRC%\bin\*-layout.zip %_DEST%\pck%_EXT%\*.*
+..\%__SRC%\misc\sc.component %_DEST%\xml%_EXT%\sc.component
+..\%__SRC%\misc\scd.component %_DEST%\xml%_EXT%\scd.component
+..\%__SRC%\misc\vbaobj.component %_DEST%\xml%_EXT%\vbaobj.component
diff --git a/sc/qa/complex/calcPreview/TestDocument.java b/sc/qa/complex/calcPreview/TestDocument.java
new file mode 100644
index 000000000..a568556e6
--- /dev/null
+++ b/sc/qa/complex/calcPreview/TestDocument.java
@@ -0,0 +1,39 @@
+/*************************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+************************************************************************/
+
+package complex.calcPreview;
+
+import java.io.File;
+import org.openoffice.test.OfficeFileUrl;
+
+final class TestDocument {
+ public static String getUrl(String name) {
+ return OfficeFileUrl.getAbsolute(new File("test_documents", name));
+ }
+
+ private TestDocument() {}
+}
diff --git a/sc/qa/complex/calcPreview/ViewForwarder.java b/sc/qa/complex/calcPreview/ViewForwarder.java
index 56fa3dc82..3f2b707e0 100755
--- a/sc/qa/complex/calcPreview/ViewForwarder.java
+++ b/sc/qa/complex/calcPreview/ViewForwarder.java
@@ -27,7 +27,7 @@
package complex.calcPreview;
-import complexlib.ComplexTestCase;
+// import complexlib.ComplexTestCase;
import com.sun.star.awt.XWindow;
import com.sun.star.container.XIndexAccess;
@@ -35,13 +35,13 @@ import com.sun.star.frame.XController;
import com.sun.star.frame.XDispatch;
import com.sun.star.frame.XDispatchProvider;
import com.sun.star.frame.XModel;
-import com.sun.star.lang.XComponent;
+// import com.sun.star.lang.XComponent;
import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.sheet.XSpreadsheet;
-import com.sun.star.sheet.XSpreadsheetDocument;
+// import com.sun.star.sheet.XSpreadsheetDocument;
import com.sun.star.sheet.XSpreadsheets;
import com.sun.star.table.XCell;
-import com.sun.star.uno.Any;
+// import com.sun.star.uno.Any;
import com.sun.star.uno.AnyConverter;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.uno.XInterface;
@@ -59,7 +59,7 @@ import util.SOfficeFactory;
import util.utils;
import com.sun.star.beans.XPropertySet;
-import com.sun.star.beans.XPropertySetInfo;
+// import com.sun.star.beans.XPropertySetInfo;
import com.sun.star.container.XNameAccess;
import com.sun.star.lang.XComponent;
import com.sun.star.sheet.XHeaderFooterContent;
@@ -67,20 +67,30 @@ import com.sun.star.sheet.XSpreadsheetDocument;
import com.sun.star.style.XStyle;
import com.sun.star.style.XStyleFamiliesSupplier;
import com.sun.star.text.XText;
-import com.sun.star.drawing.XDrawPageSupplier;
-import com.sun.star.drawing.XDrawPage;
-import com.sun.star.drawing.XShape;
-import com.sun.star.drawing.XShapes;
+// import com.sun.star.drawing.XDrawPageSupplier;
+// import com.sun.star.drawing.XDrawPage;
+// import com.sun.star.drawing.XShape;
+// import com.sun.star.drawing.XShapes;
+
+// import com.sun.star.beans.Property;
+// import com.sun.star.lang.XServiceInfo;
-import com.sun.star.beans.Property;
-import com.sun.star.lang.XServiceInfo;
+
+
+// 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.*;
/**
* A complex test for the preview of Calc documents. This complex test
* needs interaction from the user: documents have to be resized and moved.
*/
-public class ViewForwarder extends ComplexTestCase {
+public class ViewForwarder {
/** The MultiServiceFactory **/
private XMultiServiceFactory mXMSF = null;
@@ -88,34 +98,40 @@ public class ViewForwarder extends ComplexTestCase {
/** Get all test methods.
* @return The test methods.
*/
- public String[] getTestMethodNames() {
- return new String[]{"checkPositiveViewForwarder",
- "checkNegativeViewForwarder",
- "checkPreviewHeaderCells",
- "checkPreviewShape"
- };
- }
+// public String[] getTestMethodNames() {
+// return new String[]{"checkPositiveViewForwarder",
+// "checkNegativeViewForwarder",
+// "checkPreviewHeaderCells",
+// "checkPreviewShape"
+// };
+// }
/**
* Get a MultiServiceFactory from the Office before the test.
*/
- public void before() {
- mXMSF = (XMultiServiceFactory)param.getMSF();
+ @Before public void before()
+ {
+ mXMSF = UnoRuntime.queryInterface(XMultiServiceFactory.class, connection.getComponentContext().getServiceManager());
+ // SOfficeFactory SOF = SOfficeFactory.getFactory(mXMSF);
+
+ // param = new TestParameters();
+ // param.put("ServiceFactory", xMsf);
+ // mXMSF = (XMultiServiceFactory)param.getMSF();
}
/** Create a spreadsheet document, insert some text, header and footer.
* Let the user resize the document and check the contents.
*/
- public void checkPositiveViewForwarder() {
+ @Test public void checkPositiveViewForwarder() {
SOfficeFactory SOF = SOfficeFactory.getFactory( mXMSF );
XSpreadsheetDocument xSpreadsheetDoc = null;
try {
- log.println("Creating a spreadsheet document");
+ System.out.println("Creating a spreadsheet document");
xSpreadsheetDoc = SOF.createCalcDoc(null);
} catch (com.sun.star.uno.Exception e) {
- failed(e.getMessage());
+ fail(e.getMessage());
return;
}
@@ -125,7 +141,7 @@ public class ViewForwarder extends ComplexTestCase {
XCell xCell = null;
try {
XSpreadsheets oSheets = xSpreadsheetDoc.getSheets() ;
- XIndexAccess oIndexSheets = (XIndexAccess)
+ XIndexAccess oIndexSheets =
UnoRuntime.queryInterface(XIndexAccess.class, oSheets);
Object o = oIndexSheets.getByIndex(0);
XSpreadsheet oSheet = (XSpreadsheet)AnyConverter.toObject(
@@ -138,23 +154,23 @@ public class ViewForwarder extends ComplexTestCase {
xCell = oSheet.getCellByPosition(0, 2) ;
xCell.setFormula("Cell 2");
} catch(com.sun.star.lang.IllegalArgumentException e) {
- log.println("Exception ceating relation :");
- failed(e.getMessage());
+ System.out.println("Exception ceating relation :");
+ fail(e.getMessage());
} catch(com.sun.star.lang.WrappedTargetException e) {
- log.println("Exception ceating relation :");
- failed(e.getMessage());
+ System.out.println("Exception ceating relation :");
+ fail(e.getMessage());
} catch(com.sun.star.lang.IndexOutOfBoundsException e) {
- log.println("Exception ceating relation :");
- failed(e.getMessage());
+ System.out.println("Exception ceating relation :");
+ fail(e.getMessage());
}
- XModel aModel = (XModel)
+ XModel aModel =
UnoRuntime.queryInterface(XModel.class, xSpreadsheetDoc);
XController xController = aModel.getCurrentController();
// get page styles
- XStyleFamiliesSupplier StyleFam = (XStyleFamiliesSupplier)
+ XStyleFamiliesSupplier StyleFam =
UnoRuntime.queryInterface(
XStyleFamiliesSupplier.class,
xSpreadsheetDoc );
@@ -170,17 +186,17 @@ public class ViewForwarder extends ComplexTestCase {
StdStyle = (XStyle)AnyConverter.toObject(
new com.sun.star.uno.Type(XStyle.class), o);
} catch(com.sun.star.lang.IllegalArgumentException e) {
- failed(e.getMessage());
+ fail(e.getMessage());
} catch(com.sun.star.lang.WrappedTargetException e){
- failed(e.getMessage());
+ fail(e.getMessage());
return;
} catch(com.sun.star.container.NoSuchElementException e){
- failed(e.getMessage());
+ fail(e.getMessage());
return;
}
//get the property-set
- final XPropertySet PropSet = (XPropertySet)
+ final XPropertySet PropSet =
UnoRuntime.queryInterface(XPropertySet.class, StdStyle);
XHeaderFooterContent RPHFC = null;
@@ -192,12 +208,12 @@ public class ViewForwarder extends ComplexTestCase {
new com.sun.star.uno.Type(XHeaderFooterContent.class), o);
} catch(com.sun.star.lang.IllegalArgumentException e) {
- failed(e.getMessage());
+ fail(e.getMessage());
} catch(com.sun.star.lang.WrappedTargetException e){
- failed(e.getMessage());
+ fail(e.getMessage());
return;
} catch(com.sun.star.beans.UnknownPropertyException e){
- failed(e.getMessage());
+ fail(e.getMessage());
return;
}
@@ -218,12 +234,12 @@ public class ViewForwarder extends ComplexTestCase {
RPHFC = (XHeaderFooterContent)AnyConverter.toObject(
new com.sun.star.uno.Type(XHeaderFooterContent.class), o);
} catch(com.sun.star.lang.IllegalArgumentException e) {
- failed(e.getMessage());
+ fail(e.getMessage());
} catch(com.sun.star.lang.WrappedTargetException e){
- failed(e.getMessage());
+ fail(e.getMessage());
return;
} catch(com.sun.star.beans.UnknownPropertyException e){
- failed(e.getMessage());
+ fail(e.getMessage());
return;
}
@@ -239,9 +255,9 @@ public class ViewForwarder extends ComplexTestCase {
// switching to 'Page Preview' mode
try {
- XDispatchProvider xDispProv = (XDispatchProvider)
+ XDispatchProvider xDispProv =
UnoRuntime.queryInterface(XDispatchProvider.class, xController);
- XURLTransformer xParser = (com.sun.star.util.XURLTransformer)
+ XURLTransformer xParser =
UnoRuntime.queryInterface(XURLTransformer.class,
mXMSF.createInstance("com.sun.star.util.URLTransformer"));
// Because it's an in/out parameter we must use an
@@ -253,9 +269,11 @@ public class ViewForwarder extends ComplexTestCase {
URL aURL = aParseURL[0];
XDispatch xDispatcher = xDispProv.queryDispatch(aURL, "", 0);
if(xDispatcher != null)
+ {
xDispatcher.dispatch( aURL, null );
+ }
} catch (com.sun.star.uno.Exception e) {
- failed("Couldn't change mode");
+ fail("Couldn't change mode");
return;
}
@@ -263,7 +281,7 @@ public class ViewForwarder extends ComplexTestCase {
Thread.sleep(500);
} catch (InterruptedException ex) {}
- log.println("Press any key after resizing ");
+ System.out.println("Press any key after resizing ");
try{
byte[]b = new byte[16];
System.in.read(b);
@@ -283,34 +301,34 @@ public class ViewForwarder extends ComplexTestCase {
(xRoot, AccessibleRole.HEADER, "").getAccessibleChild(0);
oObj = parent.getAccessibleContext().getAccessibleChild(0);
} catch (com.sun.star.lang.IndexOutOfBoundsException iabe) {
- failed(iabe.getMessage());
+ fail(iabe.getMessage());
return;
}
- log.println("ImplementationName " + utils.getImplName(oObj));
+ System.out.println("ImplementationName " + utils.getImplName(oObj));
- XAccessibleComponent accPC = (XAccessibleComponent)
+ XAccessibleComponent accPC =
UnoRuntime.queryInterface(XAccessibleComponent.class, parent);
- log.println("Parent-BoundsX= "+accPC.getBounds().X);
- log.println("Parent-BoundsY= "+accPC.getBounds().Y);
- log.println("Parent-BoundsWidth= "+accPC.getBounds().Width);
- log.println("Parent-BoundsHeight= "+accPC.getBounds().Height);
+ System.out.println("Parent-BoundsX= "+accPC.getBounds().X);
+ System.out.println("Parent-BoundsY= "+accPC.getBounds().Y);
+ System.out.println("Parent-BoundsWidth= "+accPC.getBounds().Width);
+ System.out.println("Parent-BoundsHeight= "+accPC.getBounds().Height);
- XAccessibleComponent accPPC = (XAccessibleComponent)
+ XAccessibleComponent accPPC =
UnoRuntime.queryInterface(XAccessibleComponent.class,
parent.getAccessibleContext().getAccessibleParent());
- log.println("P-Parent-BoundsX= "+accPPC.getBounds().X);
- log.println("P-Parent-BoundsY= "+accPPC.getBounds().Y);
- log.println("P-Parent-BoundsWidth= "+accPPC.getBounds().Width);
- log.println("P-Parent-BoundsHeight= "+accPPC.getBounds().Height);
+ System.out.println("P-Parent-BoundsX= "+accPPC.getBounds().X);
+ System.out.println("P-Parent-BoundsY= "+accPPC.getBounds().Y);
+ System.out.println("P-Parent-BoundsWidth= "+accPPC.getBounds().Width);
+ System.out.println("P-Parent-BoundsHeight= "+accPPC.getBounds().Height);
try {
Thread.sleep(500);
} catch (InterruptedException ex) {}
- log.println("Press any key when the second line is on top");
+ System.out.println("Press any key when the second line is on top");
try{
byte[]b = new byte[16];
System.in.read(b);
@@ -319,46 +337,46 @@ public class ViewForwarder extends ComplexTestCase {
}
try {
- log.println("ChildCount: "+
+ System.out.println("ChildCount: "+
parent.getAccessibleContext().getAccessibleChildCount());
- log.println("Getting child 0 again");
+ System.out.println("Getting child 0 again");
oObj = parent.getAccessibleContext().getAccessibleChild(0);
} catch (com.sun.star.lang.IndexOutOfBoundsException iabe) {
- failed(iabe.getMessage());
+ fail(iabe.getMessage());
return;
}
- XAccessibleText accT = (XAccessibleText)
+ XAccessibleText accT =
UnoRuntime.queryInterface(XAccessibleText.class, oObj);
- log.println("Getting the text: "+accT.getText());
+ System.out.println("Getting the text: "+accT.getText());
- XAccessibleComponent accC = (XAccessibleComponent)
+ XAccessibleComponent accC =
UnoRuntime.queryInterface(XAccessibleComponent.class, oObj);
- log.println("BoundsX= "+accC.getBounds().X);
- log.println("BoundsY= "+accC.getBounds().Y);
- log.println("BoundsWidth= "+accC.getBounds().Width);
- log.println("BoundsHeight= "+accC.getBounds().Height);
+ System.out.println("BoundsX= "+accC.getBounds().X);
+ System.out.println("BoundsY= "+accC.getBounds().Y);
+ System.out.println("BoundsWidth= "+accC.getBounds().Width);
+ System.out.println("BoundsHeight= "+accC.getBounds().Height);
- accPC = (XAccessibleComponent)
+ accPC =
UnoRuntime.queryInterface(XAccessibleComponent.class, parent);
- log.println("Parent-BoundsX= "+accPC.getBounds().X);
- log.println("Parent-BoundsY= "+accPC.getBounds().Y);
- log.println("Parent-BoundsWidth= "+accPC.getBounds().Width);
- log.println("Parent-BoundsHeight= "+accPC.getBounds().Height);
+ System.out.println("Parent-BoundsX= "+accPC.getBounds().X);
+ System.out.println("Parent-BoundsY= "+accPC.getBounds().Y);
+ System.out.println("Parent-BoundsWidth= "+accPC.getBounds().Width);
+ System.out.println("Parent-BoundsHeight= "+accPC.getBounds().Height);
- accPPC = (XAccessibleComponent)
+ accPPC =
UnoRuntime.queryInterface(XAccessibleComponent.class,
parent.getAccessibleContext().getAccessibleParent());
- log.println("P-Parent-BoundsX= "+accPPC.getBounds().X);
- log.println("P-Parent-BoundsY= "+accPPC.getBounds().Y);
- log.println("P-Parent-BoundsWidth= "+accPPC.getBounds().Width);
- log.println("P-Parent-BoundsHeight= "+accPPC.getBounds().Height);
+ System.out.println("P-Parent-BoundsX= "+accPPC.getBounds().X);
+ System.out.println("P-Parent-BoundsY= "+accPPC.getBounds().Y);
+ System.out.println("P-Parent-BoundsWidth= "+accPPC.getBounds().Width);
+ System.out.println("P-Parent-BoundsHeight= "+accPPC.getBounds().Height);
- log.println("Press any key when the footer is visible.");
+ System.out.println("Press any key when the footer is visible.");
try{
byte[]b = new byte[16];
System.in.read(b);
@@ -370,53 +388,53 @@ public class ViewForwarder extends ComplexTestCase {
parent = at.getAccessibleObjectForRole
(xRoot, AccessibleRole.FOOTER, "").getAccessibleChild(0);
} catch (com.sun.star.lang.IndexOutOfBoundsException iabe) {
- failed(iabe.getMessage());
+ fail(iabe.getMessage());
return;
}
- accPC = (XAccessibleComponent)
+ accPC =
UnoRuntime.queryInterface(XAccessibleComponent.class, parent);
try {
- log.println("ChildCount: "+
+ System.out.println("ChildCount: "+
parent.getAccessibleContext().getAccessibleChildCount());
- log.println("Getting child 0 again");
+ System.out.println("Getting child 0 again");
oObj = parent.getAccessibleContext().getAccessibleChild(0);
} catch (com.sun.star.lang.IndexOutOfBoundsException iabe) {
- failed(iabe.getMessage());
+ fail(iabe.getMessage());
return;
}
- accT = (XAccessibleText)
+ accT =
UnoRuntime.queryInterface(XAccessibleText.class, oObj);
- log.println("Getting the text: "+accT.getText());
+ System.out.println("Getting the text: "+accT.getText());
- accC = (XAccessibleComponent)
+ accC =
UnoRuntime.queryInterface(XAccessibleComponent.class, oObj);
- log.println("BoundsX= "+accC.getBounds().X);
- log.println("BoundsY= "+accC.getBounds().Y);
- log.println("BoundsWidth= "+accC.getBounds().Width);
- log.println("BoundsHeight= "+accC.getBounds().Height);
+ System.out.println("BoundsX= "+accC.getBounds().X);
+ System.out.println("BoundsY= "+accC.getBounds().Y);
+ System.out.println("BoundsWidth= "+accC.getBounds().Width);
+ System.out.println("BoundsHeight= "+accC.getBounds().Height);
- accPC = (XAccessibleComponent)
+ accPC =
UnoRuntime.queryInterface(XAccessibleComponent.class, parent);
- log.println("Parent-BoundsX= "+accPC.getBounds().X);
- log.println("Parent-BoundsY= "+accPC.getBounds().Y);
- log.println("Parent-BoundsWidth= "+accPC.getBounds().Width);
- log.println("Parent-BoundsHeight= "+accPC.getBounds().Height);
+ System.out.println("Parent-BoundsX= "+accPC.getBounds().X);
+ System.out.println("Parent-BoundsY= "+accPC.getBounds().Y);
+ System.out.println("Parent-BoundsWidth= "+accPC.getBounds().Width);
+ System.out.println("Parent-BoundsHeight= "+accPC.getBounds().Height);
- accPPC = (XAccessibleComponent)
+ accPPC =
UnoRuntime.queryInterface(XAccessibleComponent.class,
parent.getAccessibleContext().getAccessibleParent());
- log.println("P-Parent-BoundsX= "+accPPC.getBounds().X);
- log.println("P-Parent-BoundsY= "+accPPC.getBounds().Y);
- log.println("P-Parent-BoundsWidth= "+accPPC.getBounds().Width);
- log.println("P-Parent-BoundsHeight= "+accPPC.getBounds().Height);
+ System.out.println("P-Parent-BoundsX= "+accPPC.getBounds().X);
+ System.out.println("P-Parent-BoundsY= "+accPPC.getBounds().Y);
+ System.out.println("P-Parent-BoundsWidth= "+accPPC.getBounds().Width);
+ System.out.println("P-Parent-BoundsHeight= "+accPPC.getBounds().Height);
- log.println("Press any key when the page content is on top");
+ System.out.println("Press any key when the page content is on top");
try{
byte[]b = new byte[16];
System.in.read(b);
@@ -428,22 +446,22 @@ public class ViewForwarder extends ComplexTestCase {
parent = at.getAccessibleObjectForRole
(xRoot, AccessibleRole.DOCUMENT, "").getAccessibleChild(0);
} catch (com.sun.star.lang.IndexOutOfBoundsException iabe) {
- failed(iabe.getMessage());
+ fail(iabe.getMessage());
return;
}
System.out.println("PARENT: " + parent.getAccessibleContext().getAccessibleName());
- accPC = (XAccessibleComponent)
+ accPC =
UnoRuntime.queryInterface(XAccessibleComponent.class, parent);
int cCount = 0;
try {
cCount =
parent.getAccessibleContext().getAccessibleChildCount();
- log.println("ChildCount: "+cCount);
- log.println("Getting child 0 again");
+ System.out.println("ChildCount: "+cCount);
+ System.out.println("Getting child 0 again");
oObj = parent.getAccessibleContext().getAccessibleChild(0);
} catch (com.sun.star.lang.IndexOutOfBoundsException iabe) {
- failed(iabe.getMessage());
+ fail(iabe.getMessage());
return;
}
@@ -452,7 +470,7 @@ public class ViewForwarder extends ComplexTestCase {
XAccessible xA = parent.getAccessibleContext().getAccessibleChild(i);
System.out.println("NAME object " + i + ": " + xA.getAccessibleContext().getAccessibleName());
} catch (com.sun.star.lang.IndexOutOfBoundsException iabe) {
- failed(iabe.getMessage());
+ fail(iabe.getMessage());
return;
}
}
@@ -460,43 +478,47 @@ public class ViewForwarder extends ComplexTestCase {
System.out.println("SERVICES:");
util.dbg.getSuppServices(oObj);
- XAccessibleValue accV = (XAccessibleValue)
+ XAccessibleValue accV =
UnoRuntime.queryInterface(XAccessibleValue.class, oObj);
Object o = accV.getCurrentValue();
if (o instanceof String)
+ {
System.out.println("Value: " + (String)o);
+ }
else
+ {
System.out.println("Name of Object: " + o.getClass().getName());
- log.println("Getting the value: "+accV.getCurrentValue());
+ }
+ System.out.println("Getting the value: "+accV.getCurrentValue());
- accC = (XAccessibleComponent)
+ accC =
UnoRuntime.queryInterface(XAccessibleComponent.class, oObj);
- log.println("BoundsX= "+accC.getBounds().X);
- log.println("BoundsY= "+accC.getBounds().Y);
- log.println("BoundsWidth= "+accC.getBounds().Width);
- log.println("BoundsHeight= "+accC.getBounds().Height);
+ System.out.println("BoundsX= "+accC.getBounds().X);
+ System.out.println("BoundsY= "+accC.getBounds().Y);
+ System.out.println("BoundsWidth= "+accC.getBounds().Width);
+ System.out.println("BoundsHeight= "+accC.getBounds().Height);
- accPC = (XAccessibleComponent)
+ accPC =
UnoRuntime.queryInterface(XAccessibleComponent.class, parent);
- log.println("Parent-BoundsX= "+accPC.getBounds().X);
- log.println("Parent-BoundsY= "+accPC.getBounds().Y);
- log.println("Parent-BoundsWidth= "+accPC.getBounds().Width);
- log.println("Parent-BoundsHeight= "+accPC.getBounds().Height);
+ System.out.println("Parent-BoundsX= "+accPC.getBounds().X);
+ System.out.println("Parent-BoundsY= "+accPC.getBounds().Y);
+ System.out.println("Parent-BoundsWidth= "+accPC.getBounds().Width);
+ System.out.println("Parent-BoundsHeight= "+accPC.getBounds().Height);
- accPPC = (XAccessibleComponent)
+ accPPC =
UnoRuntime.queryInterface(XAccessibleComponent.class,
parent.getAccessibleContext().getAccessibleParent());
- log.println("P-Parent-BoundsX= "+accPPC.getBounds().X);
- log.println("P-Parent-BoundsY= "+accPPC.getBounds().Y);
- log.println("P-Parent-BoundsWidth= "+accPPC.getBounds().Width);
- log.println("P-Parent-BoundsHeight= "+accPPC.getBounds().Height);
+ System.out.println("P-Parent-BoundsX= "+accPPC.getBounds().X);
+ System.out.println("P-Parent-BoundsY= "+accPPC.getBounds().Y);
+ System.out.println("P-Parent-BoundsWidth= "+accPPC.getBounds().Width);
+ System.out.println("P-Parent-BoundsHeight= "+accPPC.getBounds().Height);
- XComponent xComp = (XComponent)UnoRuntime.queryInterface(
+ XComponent xComp = UnoRuntime.queryInterface(
XComponent.class, xSpreadsheetDoc);
xComp.dispose();
}
@@ -512,15 +534,15 @@ public class ViewForwarder extends ComplexTestCase {
* Create a spreadsheet document, insert some text, header and footer.
* Let the user resize the document and check the contents.
*/
- public void checkNegativeViewForwarder() {
+ @Test public void checkNegativeViewForwarder() {
SOfficeFactory SOF = SOfficeFactory.getFactory( mXMSF );
XSpreadsheetDocument xSpreadsheetDoc = null;
try {
- log.println("Creating a spreadsheet document");
+ System.out.println("Creating a spreadsheet document");
xSpreadsheetDoc = SOF.createCalcDoc(null);
} catch (com.sun.star.uno.Exception e) {
- failed(e.getMessage());
+ fail(e.getMessage());
return;
}
@@ -530,7 +552,7 @@ public class ViewForwarder extends ComplexTestCase {
XCell xCell = null;
try {
XSpreadsheets oSheets = xSpreadsheetDoc.getSheets() ;
- XIndexAccess oIndexSheets = (XIndexAccess)
+ XIndexAccess oIndexSheets =
UnoRuntime.queryInterface(XIndexAccess.class, oSheets);
Object o = oIndexSheets.getByIndex(0);
XSpreadsheet oSheet = (XSpreadsheet)AnyConverter.toObject(
@@ -543,23 +565,23 @@ public class ViewForwarder extends ComplexTestCase {
xCell = oSheet.getCellByPosition(0, 2) ;
xCell.setFormula("Cell 2");
} catch(com.sun.star.lang.IllegalArgumentException e) {
- log.println("Exception ceating relation :");
- failed(e.getMessage());
+ System.out.println("Exception ceating relation :");
+ fail(e.getMessage());
} catch(com.sun.star.lang.WrappedTargetException e) {
- log.println("Exception ceating relation :");
- failed(e.getMessage());
+ System.out.println("Exception ceating relation :");
+ fail(e.getMessage());
} catch(com.sun.star.lang.IndexOutOfBoundsException e) {
- log.println("Exception ceating relation :");
- failed(e.getMessage());
+ System.out.println("Exception ceating relation :");
+ fail(e.getMessage());
}
- XModel aModel = (XModel)
+ XModel aModel =
UnoRuntime.queryInterface(XModel.class, xSpreadsheetDoc);
XController xController = aModel.getCurrentController();
// get page styles
- XStyleFamiliesSupplier StyleFam = (XStyleFamiliesSupplier)
+ XStyleFamiliesSupplier StyleFam =
UnoRuntime.queryInterface(
XStyleFamiliesSupplier.class,
xSpreadsheetDoc );
@@ -575,34 +597,34 @@ public class ViewForwarder extends ComplexTestCase {
StdStyle = (XStyle)AnyConverter.toObject(
new com.sun.star.uno.Type(XStyle.class), o);
} catch(com.sun.star.lang.IllegalArgumentException e) {
- failed(e.getMessage());
+ fail(e.getMessage());
} catch(com.sun.star.lang.WrappedTargetException e){
- failed(e.getMessage());
+ fail(e.getMessage());
return;
} catch(com.sun.star.container.NoSuchElementException e){
- failed(e.getMessage());
+ fail(e.getMessage());
return;
}
//get the property-set
- final XPropertySet PropSet = (XPropertySet)
+ final XPropertySet PropSet =
UnoRuntime.queryInterface(XPropertySet.class, StdStyle);
XHeaderFooterContent RPHFC = null;
// get the header
- log.println( "Creating a test environment" );
+ System.out.println( "Creating a test environment" );
try {
Object o = PropSet.getPropertyValue("RightPageHeaderContent");
RPHFC = (XHeaderFooterContent)AnyConverter.toObject(
new com.sun.star.uno.Type(XHeaderFooterContent.class), o);
} catch(com.sun.star.lang.IllegalArgumentException e) {
- failed(e.getMessage());
+ fail(e.getMessage());
} catch(com.sun.star.lang.WrappedTargetException e){
- failed(e.getMessage());
+ fail(e.getMessage());
return;
} catch(com.sun.star.beans.UnknownPropertyException e){
- failed(e.getMessage());
+ fail(e.getMessage());
return;
}
@@ -623,12 +645,12 @@ public class ViewForwarder extends ComplexTestCase {
RPHFC = (XHeaderFooterContent)AnyConverter.toObject(
new com.sun.star.uno.Type(XHeaderFooterContent.class), o);
} catch(com.sun.star.lang.IllegalArgumentException e) {
- failed(e.getMessage());
+ fail(e.getMessage());
} catch(com.sun.star.lang.WrappedTargetException e){
- failed(e.getMessage());
+ fail(e.getMessage());
return;
} catch(com.sun.star.beans.UnknownPropertyException e){
- failed(e.getMessage());
+ fail(e.getMessage());
return;
}
@@ -644,9 +666,9 @@ public class ViewForwarder extends ComplexTestCase {
// switching to 'Page Preview' mode
try {
- XDispatchProvider xDispProv = (XDispatchProvider)
+ XDispatchProvider xDispProv =
UnoRuntime.queryInterface(XDispatchProvider.class, xController);
- XURLTransformer xParser = (com.sun.star.util.XURLTransformer)
+ XURLTransformer xParser =
UnoRuntime.queryInterface(XURLTransformer.class,
mXMSF.createInstance("com.sun.star.util.URLTransformer"));
// Because it's an in/out parameter we must use an
@@ -658,9 +680,11 @@ public class ViewForwarder extends ComplexTestCase {
URL aURL = aParseURL[0];
XDispatch xDispatcher = xDispProv.queryDispatch(aURL, "", 0);
if(xDispatcher != null)
+ {
xDispatcher.dispatch( aURL, null );
+ }
} catch (com.sun.star.uno.Exception e) {
- failed("Couldn't change mode");
+ fail("Couldn't change mode");
return;
}
@@ -668,7 +692,7 @@ public class ViewForwarder extends ComplexTestCase {
Thread.sleep(500);
} catch (InterruptedException ex) {}
- log.println("Press any key after resizing ");
+ System.out.println("Press any key after resizing ");
try{
byte[]b = new byte[16];
System.in.read(b);
@@ -688,34 +712,34 @@ public class ViewForwarder extends ComplexTestCase {
(xRoot, AccessibleRole.HEADER, "").getAccessibleChild(0);
oObj = parent.getAccessibleContext().getAccessibleChild(0);
} catch (com.sun.star.lang.IndexOutOfBoundsException iabe) {
- failed(iabe.getMessage());
+ fail(iabe.getMessage());
return;
}
- log.println("ImplementationName " + utils.getImplName(oObj));
+ System.out.println("ImplementationName " + utils.getImplName(oObj));
- XAccessibleComponent accPC = (XAccessibleComponent)
+ XAccessibleComponent accPC =
UnoRuntime.queryInterface(XAccessibleComponent.class, parent);
- log.println("Parent-BoundsX= "+accPC.getBounds().X);
- log.println("Parent-BoundsY= "+accPC.getBounds().Y);
- log.println("Parent-BoundsWidth= "+accPC.getBounds().Width);
- log.println("Parent-BoundsHeight= "+accPC.getBounds().Height);
+ System.out.println("Parent-BoundsX= "+accPC.getBounds().X);
+ System.out.println("Parent-BoundsY= "+accPC.getBounds().Y);
+ System.out.println("Parent-BoundsWidth= "+accPC.getBounds().Width);
+ System.out.println("Parent-BoundsHeight= "+accPC.getBounds().Height);
- XAccessibleComponent accPPC = (XAccessibleComponent)
+ XAccessibleComponent accPPC =
UnoRuntime.queryInterface(XAccessibleComponent.class,
parent.getAccessibleContext().getAccessibleParent());
- log.println("P-Parent-BoundsX= "+accPPC.getBounds().X);
- log.println("P-Parent-BoundsY= "+accPPC.getBounds().Y);
- log.println("P-Parent-BoundsWidth= "+accPPC.getBounds().Width);
- log.println("P-Parent-BoundsHeight= "+accPPC.getBounds().Height);
+ System.out.println("P-Parent-BoundsX= "+accPPC.getBounds().X);
+ System.out.println("P-Parent-BoundsY= "+accPPC.getBounds().Y);
+ System.out.println("P-Parent-BoundsWidth= "+accPPC.getBounds().Width);
+ System.out.println("P-Parent-BoundsHeight= "+accPPC.getBounds().Height);
try {
Thread.sleep(500);
} catch (InterruptedException ex) {}
- log.println("Press any key when the header is not visible.");
+ System.out.println("Press any key when the header is not visible.");
try{
byte[]b = new byte[16];
System.in.read(b);
@@ -726,24 +750,26 @@ public class ViewForwarder extends ComplexTestCase {
int childCount = 0;
childCount =
parent.getAccessibleContext().getAccessibleChildCount();
- log.println("ChildCount: "+childCount);
+ System.out.println("ChildCount: "+childCount);
if (childCount != 0)
- failed("Could access header although it was not visible on page.");
+ {
+ fail("Could access header although it was not visible on page.");
+ }
try {
parent = at.getAccessibleObjectForRole
(xRoot, AccessibleRole.FOOTER, "").getAccessibleChild(0);
} catch (com.sun.star.lang.IndexOutOfBoundsException iabe) {
- failed(iabe.getMessage());
+ fail(iabe.getMessage());
return;
}
- accPC = (XAccessibleComponent)
+ accPC =
UnoRuntime.queryInterface(XAccessibleComponent.class, parent);
- log.println("Press any key when the footer is not visible.");
+ System.out.println("Press any key when the footer is not visible.");
try{
byte[]b = new byte[16];
System.in.read(b);
@@ -753,12 +779,14 @@ public class ViewForwarder extends ComplexTestCase {
childCount =
parent.getAccessibleContext().getAccessibleChildCount();
- log.println("ChildCount: "+childCount);
+ System.out.println("ChildCount: "+childCount);
if (childCount != 0)
- failed("Could access footer although it was not visible on page.");
+ {
+ fail("Could access footer although it was not visible on page.");
+ }
- XComponent xComp = (XComponent)UnoRuntime.queryInterface(
+ XComponent xComp =UnoRuntime.queryInterface(
XComponent.class, xSpreadsheetDoc);
xComp.dispose();
@@ -770,21 +798,21 @@ public class ViewForwarder extends ComplexTestCase {
/**
* Check the preview of header cells
*/
- public void checkPreviewHeaderCells() {
+ @Test public void checkPreviewHeaderCells() {
XInterface oObj = null;
SOfficeFactory SOF = SOfficeFactory.getFactory( mXMSF);
XSpreadsheetDocument xSpreadsheetDoc = null;
try {
- log.println("Creating a spreadsheet document");
+ System.out.println("Creating a spreadsheet document");
xSpreadsheetDoc = SOF.createCalcDoc(null);
} catch (com.sun.star.uno.Exception e) {
- failed(e.getMessage());
+ fail(e.getMessage());
return;
}
- XModel xModel = (XModel)
+ XModel xModel =
UnoRuntime.queryInterface(XModel.class, xSpreadsheetDoc);
XController xController = xModel.getCurrentController();
@@ -792,70 +820,70 @@ public class ViewForwarder extends ComplexTestCase {
//setting value of cell A1
XCell xCell = null;
try {
- log.println("Getting spreadsheet") ;
+ System.out.println("Getting spreadsheet") ;
XSpreadsheets oSheets = xSpreadsheetDoc.getSheets() ;
- XIndexAccess oIndexSheets = (XIndexAccess)
+ XIndexAccess oIndexSheets =
UnoRuntime.queryInterface(XIndexAccess.class, oSheets);
Object o = oIndexSheets.getByIndex(0);
XSpreadsheet oSheet = (XSpreadsheet)AnyConverter.toObject(
new com.sun.star.uno.Type(XSpreadsheet.class), o);
- log.println("Getting a cell from sheet") ;
+ System.out.println("Getting a cell from sheet") ;
xCell = oSheet.getCellByPosition(0, 0);
} catch(com.sun.star.lang.IllegalArgumentException e) {
- failed(e.getMessage());
+ fail(e.getMessage());
} catch (com.sun.star.lang.WrappedTargetException e) {
- failed(e.getMessage());
+ fail(e.getMessage());
return;
} catch (com.sun.star.lang.IndexOutOfBoundsException e) {
- failed(e.getMessage());
+ fail(e.getMessage());
return;
}
xCell.setFormula("Value");
//setting property 'PrintHeaders' of the style 'Default'
- XStyleFamiliesSupplier xSFS = (XStyleFamiliesSupplier)
+ XStyleFamiliesSupplier xSFS =
UnoRuntime.queryInterface(XStyleFamiliesSupplier.class,
xSpreadsheetDoc);
XNameAccess xNA = xSFS.getStyleFamilies();
XPropertySet xPropSet = null;
try {
Object oPageStyles = xNA.getByName("PageStyles");
- xNA = (XNameAccess)
+ xNA =
UnoRuntime.queryInterface(XNameAccess.class, oPageStyles);
Object oDefStyle = xNA.getByName("Default");
- xPropSet = (XPropertySet)
+ xPropSet =
UnoRuntime.queryInterface(XPropertySet.class, oDefStyle);
} catch(com.sun.star.lang.WrappedTargetException e) {
- failed(e.getMessage());
+ fail(e.getMessage());
return;
} catch(com.sun.star.container.NoSuchElementException e) {
- failed(e.getMessage());
+ fail(e.getMessage());
return;
}
try {
xPropSet.setPropertyValue("PrintHeaders", new Boolean(true));
} catch(com.sun.star.lang.WrappedTargetException e) {
- failed(e.getMessage());
+ fail(e.getMessage());
return;
} catch(com.sun.star.lang.IllegalArgumentException e) {
- failed(e.getMessage());
+ fail(e.getMessage());
return;
} catch(com.sun.star.beans.PropertyVetoException e) {
- failed(e.getMessage());
+ fail(e.getMessage());
return;
} catch(com.sun.star.beans.UnknownPropertyException e) {
- failed(e.getMessage());
+ fail(e.getMessage());
return;
}
//switching to 'Print Preview' mode
try {
- XDispatchProvider xDispProv = (XDispatchProvider)
+ XDispatchProvider xDispProv =
UnoRuntime.queryInterface(XDispatchProvider.class, xController);
- XURLTransformer xParser = (com.sun.star.util.XURLTransformer)
+ XURLTransformer xParser =
UnoRuntime.queryInterface(XURLTransformer.class,
mXMSF.createInstance("com.sun.star.util.URLTransformer"));
URL[] aParseURL = new URL[1];
@@ -865,9 +893,11 @@ public class ViewForwarder extends ComplexTestCase {
URL aURL = aParseURL[0];
XDispatch xDispatcher = xDispProv.queryDispatch(aURL, "", 0);
if(xDispatcher != null)
+ {
xDispatcher.dispatch( aURL, null );
+ }
} catch (com.sun.star.uno.Exception e) {
- failed(e.getMessage());
+ fail(e.getMessage());
return;
}
@@ -882,9 +912,9 @@ public class ViewForwarder extends ComplexTestCase {
XWindow xWindow = at.getCurrentWindow(mXMSF, xModel);
XAccessible xRoot = at.getAccessibleObject(xWindow);
-// log.println("ImplementationName " + utils.getImplName(oObj));
+// System.out.println("ImplementationName " + utils.getImplName(oObj));
- log.println("Press any key when the header cell is on top.");
+ System.out.println("Press any key when the header cell is on top.");
try{
byte[]b = new byte[16];
System.in.read(b);
@@ -905,7 +935,7 @@ public class ViewForwarder extends ComplexTestCase {
oObj = at.getAccessibleObjectForRole
(xRoot, AccessibleRole.TABLE, "").getAccessibleChild(2);
} catch (com.sun.star.lang.IndexOutOfBoundsException iabe) {
- failed(iabe.getMessage());
+ fail(iabe.getMessage());
return;
}
@@ -921,26 +951,26 @@ public class ViewForwarder extends ComplexTestCase {
try {
System.out.println("Children now: " + accCtx.getAccessibleChild(0).getAccessibleContext().getAccessibleChildCount());
} catch (com.sun.star.lang.IndexOutOfBoundsException iabe) {
- failed(iabe.getMessage());
+ fail(iabe.getMessage());
return;
}
*/
- XAccessibleValue accV = (XAccessibleValue)
+ XAccessibleValue accV =
UnoRuntime.queryInterface(XAccessibleValue.class, oObj);
Object o = accV.getCurrentValue();
- log.println("Getting the value: "+o + " is void " + util.utils.isVoid(o));
+ System.out.println("Getting the value: "+o + " is void " + util.utils.isVoid(o));
- XAccessibleComponent accC = (XAccessibleComponent)
+ XAccessibleComponent accC =
UnoRuntime.queryInterface(XAccessibleComponent.class, oObj);
- log.println("BoundsX= "+accC.getBounds().X);
- log.println("BoundsY= "+accC.getBounds().Y);
- log.println("BoundsWidth= "+accC.getBounds().Width);
- log.println("BoundsHeight= "+accC.getBounds().Height);
+ System.out.println("BoundsX= "+accC.getBounds().X);
+ System.out.println("BoundsY= "+accC.getBounds().Y);
+ System.out.println("BoundsWidth= "+accC.getBounds().Width);
+ System.out.println("BoundsHeight= "+accC.getBounds().Height);
- XComponent xComp = (XComponent)UnoRuntime.queryInterface(
+ XComponent xComp = UnoRuntime.queryInterface(
XComponent.class, xSpreadsheetDoc);
xComp.dispose();
@@ -954,7 +984,7 @@ public class ViewForwarder extends ComplexTestCase {
* Check the preview of Shapes: load a document with shapes and see, if they
* are accessible.
*/
- public void checkPreviewShape() {
+ @Test public void checkPreviewShape() {
SOfficeFactory SOF = SOfficeFactory.getFactory( mXMSF );
XSpreadsheetDocument xSpreadsheetDoc = null;
XComponent xComp = null;
@@ -962,14 +992,15 @@ public class ViewForwarder extends ComplexTestCase {
try {
String docName = "calcshapes.sxc";
- log.println("Loading a spreadsheetdocument.");
- String url = utils.getFullURL(
- (String)param.get("TestDocumentPath") + "/" + docName);
- log.println("loading document '" + url + "'");
+ System.out.println("Loading a spreadsheetdocument.");
+ // String url = utils.getFullURL((String)param.get("TestDocumentPath") + "/" + docName);
+ String url = TestDocument.getUrl(docName);
+ System.out.println("loading document '" + url + "'");
xComp = SOF.loadDocument(url);
-
- } catch (com.sun.star.uno.Exception e) {
- failed(e.getMessage());
+ assertNotNull(xComp);
+ }
+ catch (com.sun.star.uno.Exception e) {
+ fail(e.getMessage());
return;
}
@@ -980,22 +1011,22 @@ public class ViewForwarder extends ComplexTestCase {
}
if (xComp == null) {
- failed("loading document failed.");
+ fail("loading document failed.");
return;
}
- xSpreadsheetDoc = (XSpreadsheetDocument)UnoRuntime.queryInterface(
+ xSpreadsheetDoc = UnoRuntime.queryInterface(
XSpreadsheetDocument.class, xComp);
- XModel aModel = (XModel)
+ XModel aModel =
UnoRuntime.queryInterface(XModel.class, xSpreadsheetDoc);
XController xController = aModel.getCurrentController();
// switching to 'Page Preview' mode
try {
- XDispatchProvider xDispProv = (XDispatchProvider)
+ XDispatchProvider xDispProv =
UnoRuntime.queryInterface(XDispatchProvider.class, xController);
- XURLTransformer xParser = (com.sun.star.util.XURLTransformer)
+ XURLTransformer xParser =
UnoRuntime.queryInterface(XURLTransformer.class,
mXMSF.createInstance("com.sun.star.util.URLTransformer"));
// Because it's an in/out parameter we must use an
@@ -1007,9 +1038,11 @@ public class ViewForwarder extends ComplexTestCase {
URL aURL = aParseURL[0];
XDispatch xDispatcher = xDispProv.queryDispatch(aURL, "", 0);
if(xDispatcher != null)
+ {
xDispatcher.dispatch( aURL, null );
+ }
} catch (com.sun.star.uno.Exception e) {
- failed("Couldn't change mode");
+ fail("Couldn't change mode");
return;
}
@@ -1021,7 +1054,7 @@ public class ViewForwarder extends ComplexTestCase {
- log.println("Press any key when a shape is on top.");
+ System.out.println("Press any key when a shape is on top.");
try{
byte[]b = new byte[16];
System.in.read(b);
@@ -1039,19 +1072,31 @@ public class ViewForwarder extends ComplexTestCase {
try {
XAccessibleContext con = at.getAccessibleObjectForRole
(xRoot, AccessibleRole.SHAPE, "");
- log.println("Name of AccessibleContext: " + con.getAccessibleName());
+ System.out.println("Name of AccessibleContext: " + con.getAccessibleName());
oObj = con;
} catch (Exception e) {
- failed(e.getMessage());
+ fail(e.getMessage());
return;
}
- log.println("ImplementationName: " + utils.getImplName(oObj));
+ System.out.println("ImplementationName: " + utils.getImplName(oObj));
util.dbg.printInterfaces(oObj);
xComp.dispose();
}
+ @BeforeClass public static void setUpConnection() throws Exception {
+ connection.setUp();
+ }
+
+ @AfterClass public static void tearDownConnection()
+ throws InterruptedException, com.sun.star.uno.Exception
+ {
+ connection.tearDown();
+ }
+
+ private static final OfficeConnection connection = new OfficeConnection();
+
}
diff --git a/sc/qa/complex/calcPreview/makefile.mk b/sc/qa/complex/calcPreview/makefile.mk
index 14f942867..864e14976 100755
--- a/sc/qa/complex/calcPreview/makefile.mk
+++ b/sc/qa/complex/calcPreview/makefile.mk
@@ -25,69 +25,99 @@
#
#*************************************************************************
-PRJ = ..$/..$/..
-TARGET = ViewForward
-PRJNAME = $(TARGET)
-PACKAGE = complex$/calcPreview
-
-# --- Settings -----------------------------------------------------
-.INCLUDE: settings.mk
-
-
-#----- compile .java files -----------------------------------------
-
-JARFILES = mysql.jar ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar mysql.jar
-JAVAFILES = ViewForwarder.java
-JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class)
-
-#----- make a jar from compiled files ------------------------------
-
-MAXLINELENGTH = 100000
-
-JARCLASSDIRS = $(PACKAGE)
-JARTARGET = $(TARGET).jar
-JARCOMPRESS = TRUE
-
-# --- Parameters for the test --------------------------------------
-
-# start an office if the parameter is set for the makefile
-.IF "$(OFFICE)" == ""
-CT_APPEXECCOMMAND =
+.IF "$(OOO_SUBSEQUENT_TESTS)" == ""
+nothing .PHONY:
.ELSE
-CT_APPEXECCOMMAND = -AppExecutionCommand "$(OFFICE)$/soffice -accept=socket,host=localhost,port=8100;urp;"
-.ENDIF
-# test base is java complex
-CT_TESTBASE = -TestBase java_complex
+PRJ = ../../..
+PRJNAME = sc
+TARGET = qa_complex_calcpreview
-# set test document path
-CT_TESTDOCS = -tdoc $(PWD)$/test_documents
+.IF "$(OOO_JUNIT_JAR)" != ""
+PACKAGE = complex/calcPreview
+JAVATESTFILES = \
+ TestDocument.java \
+ ViewForwarder.java
-# test looks something like the.full.package.TestName
-CT_TEST = -o $(PACKAGE:s\$/\.\).$(JAVAFILES:b)
+JAVAFILES = $(JAVATESTFILES)
+JARFILES = OOoRunner.jar ridl.jar test.jar unoil.jar jurt.jar
+EXTRAJARFILES = $(OOO_JUNIT_JAR)
+.END
-# start the runner application
-CT_APP = org.openoffice.Runner
-
-# set the timeout to a bigger value
-CT_TIMEOUT = -TimeOut 120000
-
-# --- Targets ------------------------------------------------------
-
-.IF "$(depend)" == ""
-$(CLASSDIR)$/$(PACKAGE)$/$(JAVAFILES:b).props : ALLTAR
-.ELSE
-$(CLASSDIR)$/$(PACKAGE)$/$(JAVAFILES:b).props : ALLDEP
-.ENDIF
+.INCLUDE: settings.mk
+.INCLUDE: target.mk
+.INCLUDE: installationtest.mk
-.INCLUDE : target.mk
+ALLTAR : javatest
+.END
-RUN:
- +java -cp "$(CLASSPATH)" $(CT_APP) $(CT_APPEXECCOMMAND) $(CT_TESTDOCS) $(CT_TESTBASE) $(CT_WORKDIR) $(CT_TIMEOUT) $(CT_TEST)
-run: RUN
-tst:
- +@echo $(CT_TESTDOCS)
+# PRJ = ..$/..$/..
+# TARGET = ViewForward
+# PRJNAME = $(TARGET)
+# PACKAGE = complex$/calcPreview
+#
+# # --- Settings -----------------------------------------------------
+# .INCLUDE: settings.mk
+#
+#
+# #----- compile .java files -----------------------------------------
+#
+# JARFILES = mysql.jar ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar mysql.jar
+# JAVAFILES = ViewForwarder.java
+# JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class)
+#
+# #----- make a jar from compiled files ------------------------------
+#
+# MAXLINELENGTH = 100000
+#
+# JARCLASSDIRS = $(PACKAGE)
+# JARTARGET = $(TARGET).jar
+# JARCOMPRESS = TRUE
+#
+# # --- Parameters for the test --------------------------------------
+#
+# # start an office if the parameter is set for the makefile
+# .IF "$(OFFICE)" == ""
+# CT_APPEXECCOMMAND =
+# .ELSE
+# CT_APPEXECCOMMAND = -AppExecutionCommand "$(OFFICE)$/soffice -accept=socket,host=localhost,port=8100;urp;"
+# .ENDIF
+#
+# # test base is java complex
+# CT_TESTBASE = -TestBase java_complex
+#
+# # set test document path
+# CT_TESTDOCS = -tdoc $(PWD)$/test_documents
+#
+# # test looks something like the.full.package.TestName
+# CT_TEST = -o $(PACKAGE:s\$/\.\).$(JAVAFILES:b)
+#
+# # start the runner application
+# CT_APP = org.openoffice.Runner
+#
+# # set the timeout to a bigger value
+# CT_TIMEOUT = -TimeOut 120000
+#
+# # --- Targets ------------------------------------------------------
+#
+# .IF "$(depend)" == ""
+# $(CLASSDIR)$/$(PACKAGE)$/$(JAVAFILES:b).props : ALLTAR
+# .ELSE
+# $(CLASSDIR)$/$(PACKAGE)$/$(JAVAFILES:b).props : ALLDEP
+# .ENDIF
+#
+# .INCLUDE : target.mk
+#
+#
+# RUN:
+# +java -cp "$(CLASSPATH)" $(CT_APP) $(CT_APPEXECCOMMAND) $(CT_TESTDOCS) $(CT_TESTBASE) $(CT_WORKDIR) $(CT_TIMEOUT) $(CT_TEST)
+#
+# run: RUN
+#
+# tst:
+# +@echo $(CT_TESTDOCS)
+#
diff --git a/sc/qa/complex/cellRanges/CheckXCellRangesQuery.java b/sc/qa/complex/cellRanges/CheckXCellRangesQuery.java
index 0a48e6584..dfc9e4a39 100755
--- a/sc/qa/complex/cellRanges/CheckXCellRangesQuery.java
+++ b/sc/qa/complex/cellRanges/CheckXCellRangesQuery.java
@@ -28,30 +28,39 @@
package complex.cellRanges;
import com.sun.star.container.XIndexAccess;
-import complexlib.ComplexTestCase;
+// import complexlib.ComplexTestCase;
import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.sheet.CellFlags;
+// import com.sun.star.sheet.CellFlags;
import com.sun.star.sheet.XCellRangesQuery;
import com.sun.star.sheet.XSheetCellRanges;
import com.sun.star.sheet.XSpreadsheet;
import com.sun.star.sheet.XSpreadsheetDocument;
import com.sun.star.sheet.XSpreadsheets;
import com.sun.star.table.CellAddress;
-import com.sun.star.table.XColumnRowRange;
-import com.sun.star.table.XTableColumns;
-import com.sun.star.table.XTableRows;
+// import com.sun.star.table.XColumnRowRange;
+// import com.sun.star.table.XTableColumns;
+// import com.sun.star.table.XTableRows;
import com.sun.star.uno.AnyConverter;
import com.sun.star.uno.Type;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.uno.XInterface;
-import java.io.PrintWriter;
+// import java.io.PrintWriter;
+import com.sun.star.util.XCloseable;
import util.SOfficeFactory;
+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.*;
+
/**
* Check the XCellRangesQuery interface on the SheetCell service. test was
* created for bug i20044.
*/
-public class CheckXCellRangesQuery extends ComplexTestCase {
+public class CheckXCellRangesQuery /* extends ComplexTestCase */ {
XSpreadsheetDocument m_xSheetDoc = null;
XCellRangesQuery m_xCell = null;
XSpreadsheet m_xSpreadSheet = null;
@@ -60,50 +69,52 @@ public class CheckXCellRangesQuery extends ComplexTestCase {
* Get all test methods.
* @return The test methods.
*/
- public String[] getTestMethodNames() {
- return new String[] {"checkEmptyCell", "checkFilledCell"};
- }
+// public String[] getTestMethodNames() {
+// return new String[] {"checkEmptyCell", "checkFilledCell"};
+// }
/**
* Creates Spreadsheet document and the test object,
* before the actual test starts.
*/
- public void before() {
+ @Before public void before() {
// create a calc document
- SOfficeFactory SOF = SOfficeFactory.getFactory( (XMultiServiceFactory)param.getMSF() );
+ // SOfficeFactory SOF = SOfficeFactory.getFactory( (XMultiServiceFactory)param.getMSF() );
+ final XMultiServiceFactory xMsf = UnoRuntime.queryInterface(XMultiServiceFactory.class, connection.getComponentContext().getServiceManager());
+ SOfficeFactory SOF = SOfficeFactory.getFactory(xMsf);
try {
- log.println( "creating a Spreadsheet document" );
+ System.out.println( "creating a Spreadsheet document" );
m_xSheetDoc = SOF.createCalcDoc(null);
} catch ( com.sun.star.uno.Exception e ) {
// Some exception occures.FAILED
- e.printStackTrace( (PrintWriter)log );
- failed( "Couldn?t create document");
+ e.printStackTrace( );
+ fail( "Couldn?t create document");
}
XInterface oObj = null;
try {
- log.println("Getting spreadsheet") ;
+ System.out.println("Getting spreadsheet") ;
XSpreadsheets oSheets = m_xSheetDoc.getSheets() ;
- XIndexAccess oIndexSheets = (XIndexAccess)
+ XIndexAccess oIndexSheets =
UnoRuntime.queryInterface(XIndexAccess.class, oSheets);
m_xSpreadSheet = (XSpreadsheet) AnyConverter.toObject(
new Type(XSpreadsheet.class),oIndexSheets.getByIndex(0));
// get the cell
- log.println("Getting a cell from sheet") ;
+ System.out.println("Getting a cell from sheet") ;
oObj = m_xSpreadSheet.getCellByPosition(2, 3);
- m_xCell = (XCellRangesQuery)UnoRuntime.queryInterface(XCellRangesQuery.class, oObj);
+ m_xCell = UnoRuntime.queryInterface(XCellRangesQuery.class, oObj);
} catch (com.sun.star.lang.WrappedTargetException e) {
- e.printStackTrace((PrintWriter)log);
- failed("Error getting cell object from spreadsheet document");
+ e.printStackTrace();
+ fail("Error getting cell object from spreadsheet document");
} catch (com.sun.star.lang.IndexOutOfBoundsException e) {
- e.printStackTrace((PrintWriter)log);
- failed("Error getting cell object from spreadsheet document");
+ e.printStackTrace();
+ fail("Error getting cell object from spreadsheet document");
} catch (com.sun.star.lang.IllegalArgumentException e) {
- e.printStackTrace((PrintWriter)log);
- failed("Error getting cell object from spreadsheet document");
+ e.printStackTrace();
+ fail("Error getting cell object from spreadsheet document");
}
// set one value for comparison.
@@ -115,12 +126,45 @@ public class CheckXCellRangesQuery extends ComplexTestCase {
m_xSpreadSheet.getCellByPosition(3, 2).setFormula("");
m_xSpreadSheet.getCellByPosition(3, 3).setFormula(""); */
} catch (com.sun.star.lang.IndexOutOfBoundsException e) {
- e.printStackTrace((PrintWriter)log);
- failed("Could not fill cell (1, 1) with a value.");
+ e.printStackTrace();
+ fail("Could not fill cell (1, 1) with a value.");
+ }
+
+ }
+
+ /*
+ * this method closes a calc document and resets the corresponding class variable xSheetDoc
+ */
+ protected boolean closeSpreadsheetDocument() {
+ boolean worked = true;
+
+ System.out.println(" disposing xSheetDoc ");
+
+ try {
+ XCloseable oCloser = UnoRuntime.queryInterface(
+ XCloseable.class, m_xSheetDoc);
+ oCloser.close(true);
+ } catch (com.sun.star.util.CloseVetoException e) {
+ worked = false;
+ System.out.println("Couldn't close document");
+ } catch (com.sun.star.lang.DisposedException e) {
+ worked = false;
+ System.out.println("Document already disposed");
+ } catch (java.lang.NullPointerException e) {
+ worked = false;
+ System.out.println("Couldn't get XCloseable");
}
+ m_xSheetDoc = null;
+
+ return worked;
}
+ @After public void after()
+ {
+ closeSpreadsheetDocument();
+ }
+
/**
* Perform some tests on an empty cell:
* <ol>
@@ -129,15 +173,15 @@ public class CheckXCellRangesQuery extends ComplexTestCase {
* <li>query for empty cells</li>
* <ol>
*/
- public void checkEmptyCell() {
- log.println("Checking an empty cell...");
+ @Test public void checkEmptyCell() {
+ System.out.println("Checking an empty cell...");
// compare an empty cell with a cell with a value
- assure("\tQuery column differences did not return the correct value.", _queryColumnDifferences("Sheet1.C4"), true);
+ assertTrue("\tQuery column differences did not return the correct value.", _queryColumnDifferences("Sheet1.C4"));
// compare an empty cell with a cell with a value
- assure("\tQuery column differences did not return the correct value.", _queryRowDifferences("Sheet1.C4"), true);
+ assertTrue("\tQuery column differences did not return the correct value.", _queryRowDifferences("Sheet1.C4"));
// try to get this cell
- assure("\tQuery empty cells did not return the correct value.", _queryEmptyCells("Sheet1.C4"), true);
- log.println("...done");
+// assertTrue("\tQuery empty cells did not return the correct value.", _queryEmptyCells("Sheet1.C4"));
+ System.out.println("...done");
}
/**
@@ -148,24 +192,24 @@ public class CheckXCellRangesQuery extends ComplexTestCase {
* <li>query for an empty cell.</li>
* <ol>
*/
- public void checkFilledCell() {
- log.println("Checking a filled cell...");
+ @Test public void checkFilledCell() {
+ System.out.println("Checking a filled cell...");
// fill the cell with a value
try {
m_xSpreadSheet.getCellByPosition(2, 3).setValue(15);
} catch (com.sun.star.lang.IndexOutOfBoundsException e) {
- e.printStackTrace((PrintWriter)log);
- failed("Could not fill cell (2, 3) with a value.");
+ e.printStackTrace();
+ fail("Could not fill cell (2, 3) with a value.");
}
// compare an cell with value 5 with a cell with value 15
- assure("\tQuery column differences did not return the correct value.", _queryColumnDifferences("Sheet1.C4"), true);
+ assertTrue("\tQuery column differences did not return the correct value.", _queryColumnDifferences("Sheet1.C4"));
// compare an cell with value 5 with a cell with value 15
- assure("\tQuery column differences did not return the correct value.", _queryRowDifferences("Sheet1.C4"), true);
+ assertTrue("\tQuery column differences did not return the correct value.", _queryRowDifferences("Sheet1.C4"));
// try to get nothing
- assure("\tQuery empty cells did not return the correct value.", _queryEmptyCells(""), true);
- log.println("...done");
+ assertTrue("\tQuery empty cells did not return the correct value.", _queryEmptyCells(""));
+ System.out.println("...done");
}
@@ -175,14 +219,14 @@ public class CheckXCellRangesQuery extends ComplexTestCase {
* @return True, if the result equals the expected result.
*/
public boolean _queryColumnDifferences(String expected) {
- log.println("\tQuery column differences");
+ System.out.println("\tQuery column differences");
XSheetCellRanges ranges = m_xCell.queryColumnDifferences(
new CellAddress((short) 0, 1, 1));
String getting = ranges.getRangeAddressesAsString();
if (!getting.equals(expected)) {
- log.println("\tGetting: " + getting);
- log.println("\tShould have been: " + expected);
+ System.out.println("\tGetting: " + getting);
+ System.out.println("\tShould have been: " + expected);
return false;
}
return true;
@@ -194,13 +238,13 @@ public class CheckXCellRangesQuery extends ComplexTestCase {
* @return True, if the result equals the expected result.
*/
public boolean _queryEmptyCells(String expected) {
- log.println("\tQuery empty cells");
+ System.out.println("\tQuery empty cells");
XSheetCellRanges ranges = m_xCell.queryEmptyCells();
String getting = ranges.getRangeAddressesAsString();
if (!getting.equals(expected)) {
- log.println("\tGetting: " + getting);
- log.println("\tShould have been: " + expected);
+ System.out.println("\tGetting: " + getting);
+ System.out.println("\tShould have been: " + expected);
return false;
}
return true;
@@ -212,18 +256,31 @@ public class CheckXCellRangesQuery extends ComplexTestCase {
* @return True, if the result equals the expected result.
*/
public boolean _queryRowDifferences(String expected) {
- log.println("\tQuery row differences");
+ System.out.println("\tQuery row differences");
XSheetCellRanges ranges = m_xCell.queryRowDifferences(
new CellAddress((short) 0, 1, 1));
String getting = ranges.getRangeAddressesAsString();
if (!getting.equals(expected)) {
- log.println("\tGetting: " + getting);
- log.println("\tShould have been: " + expected);
+ System.out.println("\tGetting: " + getting);
+ System.out.println("\tShould have been: " + expected);
return false;
}
return true;
}
+
+ @BeforeClass public static void setUpConnection() throws Exception {
+ connection.setUp();
+ }
+
+ @AfterClass public static void tearDownConnection()
+ throws InterruptedException, com.sun.star.uno.Exception
+ {
+ connection.tearDown();
+ }
+
+ private static final OfficeConnection connection = new OfficeConnection();
+
}
diff --git a/sc/qa/complex/cellRanges/makefile.mk b/sc/qa/complex/cellRanges/makefile.mk
index fc296fe4f..a0beb3839 100755
--- a/sc/qa/complex/cellRanges/makefile.mk
+++ b/sc/qa/complex/cellRanges/makefile.mk
@@ -25,53 +25,27 @@
#
#*************************************************************************
-PRJ = ..$/..$/..
-TARGET = CheckXCellRangesQuery
-PRJNAME = $(TARGET)
-PACKAGE = complex$/cellRanges
-
-# --- Settings -----------------------------------------------------
-.INCLUDE: settings.mk
-
-
-#----- compile .java files -----------------------------------------
-
-JARFILES = mysql.jar ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar
-JAVAFILES = $(TARGET).java
-JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class)
-
-#----- make a jar from compiled files ------------------------------
-
-MAXLINELENGTH = 100000
-
-JARCLASSDIRS = $(PACKAGE)
-JARTARGET = $(TARGET).jar
-JARCOMPRESS = TRUE
-
-# --- Parameters for the test --------------------------------------
-
-# start an office if the parameter is set for the makefile
-.IF "$(OFFICE)" == ""
-CT_APPEXECCOMMAND =
+.IF "$(OOO_SUBSEQUENT_TESTS)" == ""
+nothing .PHONY:
.ELSE
-CT_APPEXECCOMMAND = -AppExecutionCommand "$(OFFICE)$/soffice -accept=socket,host=localhost,port=8100;urp;"
-.ENDIF
-
-# test base is java complex
-CT_TESTBASE = -TestBase java_complex
-# test looks something like the.full.package.TestName
-CT_TEST = -o $(PACKAGE:s\$/\.\).$(JAVAFILES:b)
+PRJ = ../../..
+PRJNAME = sc
+TARGET = qa_complex_cellRanges
-# start the runner application
-CT_APP = org.openoffice.Runner
+.IF "$(OOO_JUNIT_JAR)" != ""
+PACKAGE = complex/cellRanges
+JAVATESTFILES = \
+ CheckXCellRangesQuery.java
+JAVAFILES = $(JAVATESTFILES)
+JARFILES = OOoRunner.jar ridl.jar test.jar unoil.jar
+EXTRAJARFILES = $(OOO_JUNIT_JAR)
+.END
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
-
-RUN: run
+.INCLUDE: settings.mk
+.INCLUDE: target.mk
+.INCLUDE: installationtest.mk
-run:
- +java -cp "$(CLASSPATH)" $(CT_APP) $(CT_APPEXECCOMMAND) $(CT_TESTBASE) $(CT_TEST)
+ALLTAR : javatest
+.END
diff --git a/sc/qa/complex/dataPilot/CheckDataPilot.java b/sc/qa/complex/dataPilot/CheckDataPilot.java
index 8774bdd7c..26a2ff202 100644
--- a/sc/qa/complex/dataPilot/CheckDataPilot.java
+++ b/sc/qa/complex/dataPilot/CheckDataPilot.java
@@ -31,12 +31,12 @@ import com.sun.star.beans.XPropertySet;
import com.sun.star.container.XIndexAccess;
import com.sun.star.container.XNamed;
import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.sheet.TableFilterField;
+// import com.sun.star.sheet.TableFilterField;
import com.sun.star.sheet.XDataPilotDescriptor;
import com.sun.star.sheet.XDataPilotTable;
import com.sun.star.sheet.XDataPilotTables;
import com.sun.star.sheet.XDataPilotTablesSupplier;
-import com.sun.star.sheet.XSheetFilterDescriptor;
+// import com.sun.star.sheet.XSheetFilterDescriptor;
import com.sun.star.sheet.XSpreadsheet;
import com.sun.star.sheet.XSpreadsheetDocument;
import com.sun.star.sheet.XSpreadsheets;
@@ -46,29 +46,47 @@ import com.sun.star.uno.AnyConverter;
import com.sun.star.uno.Type;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.uno.XInterface;
-import complex.dataPilot.interfaceTests.beans._XPropertySet;
-import complex.dataPilot.interfaceTests.container._XNamed;
-import complex.dataPilot.interfaceTests.sheet._XDataPilotDescriptor;
-import complex.dataPilot.interfaceTests.sheet._XDataPilotTable;
-import complexlib.ComplexTestCase;
+import com.sun.star.util.XCloseable;
+import complex.dataPilot._XPropertySet;
+import complex.dataPilot._XNamed;
+import complex.dataPilot._XDataPilotDescriptor;
+import complex.dataPilot._XDataPilotTable;
+// import complexlib.ComplexTestCase;
import lib.StatusException;
+import lib.TestParameters;
import util.SOfficeFactory;
+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.*;
+
+
/**
* check the DataPilot of Calc.
*/
-public class CheckDataPilot extends ComplexTestCase {
+public class CheckDataPilot {
/** The data pilot field object **/
private XInterface mDataPilotFieldObject = null;
/** The data pilot table object **/
private XInterface mDataPilotTableObject = null;
+
+ private XSpreadsheetDocument xSheetDoc = null;
+
/**
* A field is filled some values. This integer determines the size of the
* field in x and y direction.
*/
private int mMaxFieldIndex = 6;
+ /**
+ * The test parameters
+ */
+ private static TestParameters param = null;
/**
* Get all test methods
@@ -83,27 +101,27 @@ public class CheckDataPilot extends ComplexTestCase {
* Test the data pilot field object:
* simply execute the interface tests in a row
*/
- public void testDataPilotFieldObject() {
- log.println("Starting 'testDataPilotFieldObject'");
+ @Test public void testDataPilotFieldObject() {
+ System.out.println("Starting 'testDataPilotFieldObject'");
// _XNamed
- XNamed xNamed = (XNamed)UnoRuntime.queryInterface(
+ XNamed xNamed = UnoRuntime.queryInterface(
XNamed.class, mDataPilotFieldObject);
- _XNamed _xNamed = new _XNamed(xNamed, log, param);
- assure("_getName failed.",_xNamed._getName());
- assure("_setName failed.",_xNamed._setName());
+ _XNamed _xNamed = new _XNamed(xNamed/*, log*/, param);
+ assertTrue("_getName failed.",_xNamed._getName());
+ assertTrue("_setName failed.",_xNamed._setName());
// _XPropertySet
- XPropertySet xProp = (XPropertySet)UnoRuntime.queryInterface(
+ XPropertySet xProp = UnoRuntime.queryInterface(
XPropertySet.class, mDataPilotFieldObject);
- _XPropertySet _xProp = new _XPropertySet(xProp, log, param);
- assure("_getPropertySetInfo failed.",_xProp._getPropertySetInfo());
- assure("_addPropertyChangeListener failed.",_xProp._addPropertyChangeListener());
- assure("_addVetoableChangeListener failed.",_xProp._addVetoableChangeListener());
- assure("_setPropertyValue failed.",_xProp._setPropertyValue());
- assure("_getPropertyValue failed.",_xProp._getPropertyValue());
- assure("_removePropertyChangeListener failed.",_xProp._removePropertyChangeListener());
- assure("_removeVetoableChangeListener failed.",_xProp._removeVetoableChangeListener());
+ _XPropertySet _xProp = new _XPropertySet(xProp/*, log*/, param);
+ assertTrue("_getPropertySetInfo failed.",_xProp._getPropertySetInfo());
+ assertTrue("_addPropertyChangeListener failed.",_xProp._addPropertyChangeListener());
+ assertTrue("_addVetoableChangeListener failed.",_xProp._addVetoableChangeListener());
+ assertTrue("_setPropertyValue failed.",_xProp._setPropertyValue());
+ assertTrue("_getPropertyValue failed.",_xProp._getPropertyValue());
+ assertTrue("_removePropertyChangeListener failed.",_xProp._removePropertyChangeListener());
+ assertTrue("_removeVetoableChangeListener failed.",_xProp._removeVetoableChangeListener());
}
@@ -111,53 +129,57 @@ public class CheckDataPilot extends ComplexTestCase {
* Test the data pilot table object:
* simply execute the interface tests in a row
*/
- public void testDataPilotTableObject() {
- log.println("Starting 'testDataPilotTableObject'");
+ @Test public void testDataPilotTableObject() {
+ System.out.println("Starting 'testDataPilotTableObject'");
// _XNamed
- XNamed xNamed = (XNamed)UnoRuntime.queryInterface(
+ XNamed xNamed = UnoRuntime.queryInterface(
XNamed.class, mDataPilotTableObject);
- _XNamed _xNamed = new _XNamed(xNamed, log, param);
- assure("_getName failed.",_xNamed._getName());
- assure("_setName failed.",_xNamed._setName());
+ _XNamed _xNamed = new _XNamed(xNamed/*, log*/, param);
+ assertTrue("_getName failed.",_xNamed._getName());
+ assertTrue("_setName failed.",_xNamed._setName());
// _XDataPilotTable
- XDataPilotTable xDataPilotTable = (XDataPilotTable)
+ XDataPilotTable xDataPilotTable =
UnoRuntime.queryInterface(XDataPilotTable.class,
mDataPilotTableObject);
_XDataPilotTable _xDataPilotTable =
- new _XDataPilotTable(xDataPilotTable, log, param);
- assure("before failed.", _xDataPilotTable.before());
- assure("_getOutputRange failed.", _xDataPilotTable._getOutputRange()) ;
- assure("_refresh failed.", _xDataPilotTable._refresh()) ;
+ new _XDataPilotTable(xDataPilotTable/*, log*/, param);
+ assertTrue("before failed.", _xDataPilotTable.before());
+ assertTrue("_getOutputRange failed.", _xDataPilotTable._getOutputRange()) ;
+// assertTrue("_refresh failed.", _xDataPilotTable._refresh()) ;
// _XDataPilotDescriptor
- XDataPilotDescriptor xDataPilotDescriptor = (XDataPilotDescriptor)
+ XDataPilotDescriptor xDataPilotDescriptor =
UnoRuntime.queryInterface(XDataPilotDescriptor.class,
mDataPilotTableObject);
_XDataPilotDescriptor _xDataPilotDescriptor =
- new _XDataPilotDescriptor(xDataPilotDescriptor, log, param);
- assure("before failed.", _xDataPilotDescriptor.before());
- assure("_setTag failed.", _xDataPilotDescriptor._setTag()) ;
- assure("_getTag failed.", _xDataPilotDescriptor._getTag()) ;
- assure("_getFilterDescriptor failed.", _xDataPilotDescriptor._getFilterDescriptor()) ;
- assure("_getDataPilotFields failed.", _xDataPilotDescriptor._getDataPilotFields()) ;
- assure("_getColumnFields failed.", _xDataPilotDescriptor._getColumnFields()) ;
- assure("_getRowFields failed.", _xDataPilotDescriptor._getRowFields()) ;
- assure("_getDataFields failed.", _xDataPilotDescriptor._getDataFields()) ;
- assure("_getHiddenFields failed.", _xDataPilotDescriptor._getHiddenFields()) ;
- assure("_getPageFields failed.", _xDataPilotDescriptor._getPageFields()) ;
- assure("_setSourceRange failed.", _xDataPilotDescriptor._setSourceRange()) ;
- assure("_getSourceRange failed.", _xDataPilotDescriptor._getSourceRange()) ;
+ new _XDataPilotDescriptor(xDataPilotDescriptor/*, log*/, param);
+ assertTrue("before failed.", _xDataPilotDescriptor.before());
+ assertTrue("_setTag failed.", _xDataPilotDescriptor._setTag()) ;
+ assertTrue("_getTag failed.", _xDataPilotDescriptor._getTag()) ;
+ assertTrue("_getFilterDescriptor failed.", _xDataPilotDescriptor._getFilterDescriptor()) ;
+ assertTrue("_getDataPilotFields failed.", _xDataPilotDescriptor._getDataPilotFields()) ;
+ assertTrue("_getColumnFields failed.", _xDataPilotDescriptor._getColumnFields()) ;
+ assertTrue("_getRowFields failed.", _xDataPilotDescriptor._getRowFields()) ;
+ assertTrue("_getDataFields failed.", _xDataPilotDescriptor._getDataFields()) ;
+ assertTrue("_getHiddenFields failed.", _xDataPilotDescriptor._getHiddenFields()) ;
+ assertTrue("_getPageFields failed.", _xDataPilotDescriptor._getPageFields()) ;
+ assertTrue("_setSourceRange failed.", _xDataPilotDescriptor._setSourceRange()) ;
+ assertTrue("_getSourceRange failed.", _xDataPilotDescriptor._getSourceRange()) ;
}
/**
* create an environment for the test
*/
- public void before() {
- Object oInterface = null;
- XSpreadsheetDocument xSheetDoc = null;
+ @Before public void before() {
+// Object oInterface = null;
+
+ // SOfficeFactory SOF = SOfficeFactory.getFactory( (XMultiServiceFactory)param.getMSF() );
+ final XMultiServiceFactory xMsf = UnoRuntime.queryInterface(XMultiServiceFactory.class, connection.getComponentContext().getServiceManager());
+ SOfficeFactory SOF = SOfficeFactory.getFactory(xMsf);
- SOfficeFactory SOF = SOfficeFactory.getFactory( (XMultiServiceFactory)param.getMSF() );
+ param = new TestParameters();
+ param.put("ServiceFactory", xMsf);
// the cell range
CellRangeAddress sCellRangeAdress = new CellRangeAddress();
@@ -174,7 +196,7 @@ public class CheckDataPilot extends ComplexTestCase {
sCellAdress.Row = 8;
try {
- log.println( "Creating a Spreadsheet document" );
+ System.out.println( "Creating a Spreadsheet document" );
xSheetDoc = SOF.createCalcDoc(null);
} catch (com.sun.star.uno.Exception e) {
// Some exception occures.FAILED
@@ -182,11 +204,11 @@ public class CheckDataPilot extends ComplexTestCase {
throw new StatusException( "Couldn't create document", e );
}
- log.println("Getting a sheet");
- XSpreadsheets xSpreadsheets = (XSpreadsheets)xSheetDoc.getSheets();
+ System.out.println("Getting a sheet");
+ XSpreadsheets xSpreadsheets = xSheetDoc.getSheets();
XSpreadsheet oSheet = null;
XSpreadsheet oSheet2 = null;
- XIndexAccess oIndexAccess = (XIndexAccess)
+ XIndexAccess oIndexAccess =
UnoRuntime.queryInterface(XIndexAccess.class, xSpreadsheets);
try {
@@ -206,7 +228,7 @@ public class CheckDataPilot extends ComplexTestCase {
}
try {
- log.println("Filling a table");
+ System.out.println("Filling a table");
for (int i = 1; i < mMaxFieldIndex; i++) {
oSheet.getCellByPosition(i, 0).setFormula("Col" + i);
oSheet.getCellByPosition(0, i).setFormula("Row" + i);
@@ -215,10 +237,13 @@ public class CheckDataPilot extends ComplexTestCase {
}
for (int i = 1; i < mMaxFieldIndex; i++)
- for (int j = 1; j < mMaxFieldIndex; j++) {
+ {
+ for (int j = 1; j < mMaxFieldIndex; j++)
+ {
oSheet.getCellByPosition(i, j).setValue(i * (j + 1));
oSheet2.getCellByPosition(i, j).setValue(i * (j + 2));
}
+ }
} catch (com.sun.star.lang.IndexOutOfBoundsException e) {
e.printStackTrace();
throw new StatusException("Couldn't fill some cells", e);
@@ -244,8 +269,8 @@ public class CheckDataPilot extends ComplexTestCase {
// create the test objects
- log.println("Getting test objects") ;
- XDataPilotTablesSupplier DPTS = (XDataPilotTablesSupplier)
+ System.out.println("Getting test objects") ;
+ XDataPilotTablesSupplier DPTS =
UnoRuntime.queryInterface(XDataPilotTablesSupplier.class, oSheet);
XDataPilotTables DPT = DPTS.getDataPilotTables();
XDataPilotDescriptor DPDsc = DPT.createDataPilotDescriptor();
@@ -254,7 +279,7 @@ public class CheckDataPilot extends ComplexTestCase {
XPropertySet fieldPropSet = null;
try {
Object oDataPilotField = DPDsc.getDataPilotFields().getByIndex(0);
- fieldPropSet = (XPropertySet)
+ fieldPropSet =
UnoRuntime.queryInterface(XPropertySet.class, oDataPilotField);
} catch (com.sun.star.lang.WrappedTargetException e) {
e.printStackTrace();
@@ -283,7 +308,7 @@ public class CheckDataPilot extends ComplexTestCase {
throw new StatusException("Couldn't create a test environment", e);
}
- log.println("Insert the DataPilotTable");
+ System.out.println("Insert the DataPilotTable");
if (DPT.hasByName("DataPilotTable")) {
DPT.removeByName("DataPilotTable");
}
@@ -326,4 +351,53 @@ public class CheckDataPilot extends ComplexTestCase {
}
+ /*
+ * this method closes a calc document and resets the corresponding class variable xSheetDoc
+ */
+ protected boolean closeSpreadsheetDocument() {
+ boolean worked = true;
+
+ System.out.println(" disposing xSheetDoc ");
+
+ try {
+ XCloseable oCloser = UnoRuntime.queryInterface(
+ XCloseable.class, xSheetDoc);
+ oCloser.close(true);
+ } catch (com.sun.star.util.CloseVetoException e) {
+ worked = false;
+ System.out.println("Couldn't close document");
+ } catch (com.sun.star.lang.DisposedException e) {
+ worked = false;
+ System.out.println("Document already disposed");
+ } catch (java.lang.NullPointerException e) {
+ worked = false;
+ System.out.println("Couldn't get XCloseable");
+ }
+
+ xSheetDoc = null;
+
+ return worked;
+ }
+
+ @After public void after()
+ {
+ closeSpreadsheetDocument();
+ }
+
+
+ @BeforeClass public static void setUpConnection() throws Exception {
+ System.out.println("setUpConnection()");
+ connection.setUp();
+ }
+
+ @AfterClass public static void tearDownConnection()
+ throws InterruptedException, com.sun.star.uno.Exception
+ {
+ System.out.println("tearDownConnection()");
+ connection.tearDown();
+ }
+
+ private static final OfficeConnection connection = new OfficeConnection();
+
+
}
diff --git a/sc/qa/complex/dataPilot/interfaceTests/sheet/_XDataPilotDescriptor.java b/sc/qa/complex/dataPilot/_XDataPilotDescriptor.java
index d5651b604..2d8267961 100644
--- a/sc/qa/complex/dataPilot/interfaceTests/sheet/_XDataPilotDescriptor.java
+++ b/sc/qa/complex/dataPilot/_XDataPilotDescriptor.java
@@ -25,7 +25,7 @@
*
************************************************************************/
-package complex.dataPilot.interfaceTests.sheet;
+package complex.dataPilot;
import com.sun.star.beans.XPropertySet;
import com.sun.star.container.XIndexAccess;
@@ -34,11 +34,11 @@ import com.sun.star.sheet.DataPilotFieldOrientation;
import com.sun.star.sheet.XDataPilotDescriptor;
import com.sun.star.table.CellRangeAddress;
import com.sun.star.uno.UnoRuntime;
-import lib.MultiMethodTest;
-import lib.Status;
+// import lib.MultiMethodTest;
+// import lib.Status;
//import lib.StatusException;
import lib.TestParameters;
-import share.LogWriter;
+// import share.LogWriter;
/**
* Testing <code>com.sun.star.sheet.XDataPilotDescriptor</code>
@@ -81,29 +81,29 @@ public class _XDataPilotDescriptor {
/**
* The log writer
*/
- private LogWriter log = null;
+// private LogWriter log = null;
/**
* Constructor: gets the object to test, a logger and the test parameters
* @param xObj The test object
- * @param log A log writer
* @param param The test parameters
*/
- public _XDataPilotDescriptor(XDataPilotDescriptor xObj,
- LogWriter log, TestParameters param) {
+ public _XDataPilotDescriptor(XDataPilotDescriptor xObj/*,
+ LogWriter log*/, TestParameters param) {
oObj = xObj;
- this.log = log;
+ // this.log = log;
this.param = param;
}
/**
* Retrieves object relations.
- * @throws StatusException If one of relations not found.
- */
+
+ * @return
+ */
public boolean before() {
Integer amount = (Integer)param.get("FIELDSAMOUNT");
if (amount == null) {
- log.println("Relation 'FIELDSAMOUNT' not found");
+ System.out.println("Relation 'FIELDSAMOUNT' not found");
return false;
}
tEnvFieldsAmount = amount.intValue();
@@ -118,7 +118,8 @@ public class _XDataPilotDescriptor {
* <ul>
* <li> <code> setSourceRange() </code> : to have current source range </li>
* </ul>
- */
+ * @return
+ */
public boolean _getSourceRange(){
// requiredMethod("setSourceRange()");
boolean bResult = true;
@@ -144,7 +145,8 @@ public class _XDataPilotDescriptor {
* <li> <code> getHiddenFields() </code> </li>
* <li> <code> getPageFields() </code> </li>
* </ul>
- */
+ * @return
+ */
public boolean _setSourceRange(){
/* executeMethod("getColumnFields()") ;
executeMethod("getRowFields()") ;
@@ -167,7 +169,8 @@ public class _XDataPilotDescriptor {
* <ul>
* <li> <code> setTag() </code> : to have current tag </li>
* </ul>
- */
+ * @return
+ */
public boolean _getTag(){
// requiredMethod("setTag()");
boolean bResult = true;
@@ -181,7 +184,8 @@ public class _XDataPilotDescriptor {
/**
* Test just calls the method. <p>
* Has <b> OK </b> status if the method successfully returns. <p>
- */
+ * @return
+ */
public boolean _setTag(){
oObj.setTag(sTag);
return true;
@@ -195,22 +199,23 @@ public class _XDataPilotDescriptor {
* Has <b> OK </b> status if returned value isn't null, number of fields
* goten from returned value is less than number of fields obtained by relation
* and no exceptions were thrown. <p>
- */
+ * @return
+ */
public boolean _getDataPilotFields(){
boolean bResult = true;
XIndexAccess IA = null;
IA = oObj.getDataPilotFields();
if (IA == null) {
- log.println("Returned value is null.");
+ System.out.println("Returned value is null.");
return false;
- } else {log.println("getDataPilotFields returned not Null value -- OK");}
+ } else {System.out.println("getDataPilotFields returned not Null value -- OK");}
fieldsAmount = IA.getCount();
if (fieldsAmount < tEnvFieldsAmount) {
- log.println("Number of fields is less than number goten by relation.");
+ System.out.println("Number of fields is less than number goten by relation.");
return false;
- } else {log.println("count of returned fields -- OK");}
+ } else {System.out.println("count of returned fields -- OK");}
fieldsNames = new String[tEnvFieldsAmount];
int i = -1 ;
@@ -220,24 +225,23 @@ public class _XDataPilotDescriptor {
try {
field = IA.getByIndex(i);
} catch(com.sun.star.lang.WrappedTargetException e) {
- e.printStackTrace((java.io.PrintWriter)log);
+ e.printStackTrace();
return false;
} catch(com.sun.star.lang.IndexOutOfBoundsException e) {
- e.printStackTrace((java.io.PrintWriter)log);
+ e.printStackTrace();
return false;
}
- XNamed named = (XNamed)
- UnoRuntime.queryInterface(XNamed.class, field);
+ XNamed named = UnoRuntime.queryInterface(XNamed.class, field);
String name = named.getName();
- log.println("Field : '" + name + "' ... ") ;
+ System.out.println("Field : '" + name + "' ... ") ;
if (!name.equals("Data")) {
fieldsNames[cnt] = name ;
- XPropertySet props = (XPropertySet)
+ XPropertySet props =
UnoRuntime.queryInterface(XPropertySet.class, field);
try {
@@ -245,44 +249,49 @@ public class _XDataPilotDescriptor {
case 0 :
props.setPropertyValue("Orientation",
DataPilotFieldOrientation.COLUMN);
- log.println(" Column") ;
+ System.out.println(" Column") ;
break;
case 1 :
props.setPropertyValue("Orientation",
DataPilotFieldOrientation.ROW);
- log.println(" Row") ;
+ System.out.println(" Row") ;
break;
case 2 :
props.setPropertyValue("Orientation",
DataPilotFieldOrientation.DATA);
- log.println(" Data") ;
+ System.out.println(" Data") ;
break;
case 3 :
props.setPropertyValue("Orientation",
DataPilotFieldOrientation.HIDDEN);
- log.println(" Hidden") ;
+ System.out.println(" Hidden") ;
break;
case 4 :
props.setPropertyValue("Orientation",
DataPilotFieldOrientation.PAGE);
- log.println(" Page") ;
+ System.out.println(" Page") ;
props.setPropertyValue("CurrentPage", "20");
break;
} } catch (com.sun.star.lang.WrappedTargetException e) {
- e.printStackTrace((java.io.PrintWriter)log);
+ e.printStackTrace();
return false;
} catch (com.sun.star.lang.IllegalArgumentException e) {
- e.printStackTrace((java.io.PrintWriter)log);
+ e.printStackTrace();
return false;
} catch (com.sun.star.beans.PropertyVetoException e) {
- e.printStackTrace((java.io.PrintWriter)log);
+ e.printStackTrace();
return false;
} catch (com.sun.star.beans.UnknownPropertyException e) {
- e.printStackTrace((java.io.PrintWriter)log);
+ e.printStackTrace();
return false;
}
- if (++cnt > 4) break;
- } else {
+ if (++cnt > 4)
+ {
+ break;
+ }
+ }
+ else
+ {
return false;
}
}
@@ -299,10 +308,11 @@ public class _XDataPilotDescriptor {
* <ul>
* <li> <code> getDataPilotFields() </code> : to have array of field names </li>
* </ul>
- */
+ * @return
+ */
public boolean _getColumnFields(){
// requiredMethod("getDataPilotFields()");
- log.println("getColumnFields") ;
+ System.out.println("getColumnFields") ;
XIndexAccess IA = oObj.getColumnFields();
return CheckNames(IA, 0);
}
@@ -316,10 +326,11 @@ public class _XDataPilotDescriptor {
* <ul>
* <li> <code> getDataPilotFields() </code> : to have array of field names </li>
* </ul>
- */
+ * @return
+ */
public boolean _getDataFields(){
// requiredMethod("getDataPilotFields()");
- log.println("getDataFields") ;
+ System.out.println("getDataFields") ;
XIndexAccess IA = oObj.getDataFields();
return CheckNames(IA, 2);
}
@@ -333,10 +344,11 @@ public class _XDataPilotDescriptor {
* <ul>
* <li> <code> getDataPilotFields() </code> : to have array of field names </li>
* </ul>
- */
+ * @return
+ */
public boolean _getHiddenFields(){
// requiredMethod("getDataPilotFields()");
- log.println("getHiddenFields") ;
+ System.out.println("getHiddenFields") ;
XIndexAccess IA = oObj.getHiddenFields();
return CheckNames(IA, 3);
}
@@ -350,10 +362,11 @@ public class _XDataPilotDescriptor {
* <ul>
* <li> <code> getDataPilotFields() </code> : to have array of field names </li>
* </ul>
- */
+ * @return
+ */
public boolean _getRowFields(){
// requiredMethod("getDataPilotFields()");
- log.println("getRowFields") ;
+ System.out.println("getRowFields") ;
XIndexAccess IA = oObj.getRowFields();
boolean bResult = CheckNames(IA, 1);
return bResult;
@@ -367,10 +380,11 @@ public class _XDataPilotDescriptor {
* <ul>
* <li> <code> getDataPilotFields() </code> : to have array of field names </li>
* </ul>
- */
+ * @return
+ */
public boolean _getPageFields(){
// requiredMethod("getDataPilotFields()");
- log.println("getPageFields") ;
+ System.out.println("getPageFields") ;
XIndexAccess IA = oObj.getPageFields();
boolean bResult = CheckNames(IA, 4);
return bResult;
@@ -380,7 +394,8 @@ public class _XDataPilotDescriptor {
* Test calls the method and checks returned value. <p>
* Has <b> OK </b> status if returned value isn't null
* and no exceptions were thrown. <p>
- */
+ * @return
+ */
public boolean _getFilterDescriptor(){
boolean bResult = oObj.getFilterDescriptor() != null;
return bResult;
@@ -396,46 +411,46 @@ public class _XDataPilotDescriptor {
* false otherwise
* @see com.sun.star.container.XNamed
*/
- boolean CheckNames(XIndexAccess IA, int rem) {
+ private boolean CheckNames(XIndexAccess IA, int rem) {
String name = null;
if (IA == null) {
- log.println("Null retruned.") ;
+ System.out.println("Null retruned.") ;
return false ;
}
if (fieldsNames[rem] == null) {
- log.println("No fields were set to this orientation - cann't check result") ;
+ System.out.println("No fields were set to this orientation - cann't check result") ;
return true ;
}
if (IA.getCount() == 0) {
- log.println("No fields found. Must be at least '"
+ System.out.println("No fields found. Must be at least '"
+ fieldsNames[rem] + "'") ;
return false ;
}
try {
- log.println("Fields returned ") ;
+ System.out.println("Fields returned ") ;
for (int i = 0; i < IA.getCount(); i++) {
Object field = IA.getByIndex(i);
- XNamed named = (XNamed)UnoRuntime.queryInterface
+ XNamed named = UnoRuntime.queryInterface
(XNamed.class, field);
name = named.getName();
- log.println(" " + name) ;
+ System.out.println(" " + name) ;
if (fieldsNames[rem].equals(name)) {
- log.println(" - OK") ;
+ System.out.println(" - OK") ;
return true ;
}
}
} catch (com.sun.star.lang.WrappedTargetException e) {
- e.printStackTrace((java.io.PrintWriter)log);
+ e.printStackTrace();
return false ;
} catch (com.sun.star.lang.IndexOutOfBoundsException e) {
- e.printStackTrace((java.io.PrintWriter)log);
+ e.printStackTrace();
return false ;
}
- log.println(" - FAILED (field " + fieldsNames[rem] + " was not found.") ;
+ System.out.println(" - FAILED (field " + fieldsNames[rem] + " was not found.") ;
return false ;
}
diff --git a/sc/qa/complex/dataPilot/interfaceTests/sheet/_XDataPilotTable.java b/sc/qa/complex/dataPilot/_XDataPilotTable.java
index 9fa0abf0b..0f164a654 100644
--- a/sc/qa/complex/dataPilot/interfaceTests/sheet/_XDataPilotTable.java
+++ b/sc/qa/complex/dataPilot/_XDataPilotTable.java
@@ -25,16 +25,16 @@
*
************************************************************************/
-package complex.dataPilot.interfaceTests.sheet;
+package complex.dataPilot;
import com.sun.star.sheet.XDataPilotTable;
import com.sun.star.table.CellAddress;
import com.sun.star.table.CellRangeAddress;
import com.sun.star.table.XCell;
-import lib.Status;
+// import lib.Status;
//import lib.StatusException;
import lib.TestParameters;
-import share.LogWriter;
+// import share.LogWriter;
/**
* Testing <code>com.sun.star.sheet.XDataPilotTable</code>
@@ -71,18 +71,18 @@ public class _XDataPilotTable {
/**
* The log writer
*/
- private LogWriter log = null;
+ // private LogWriter log = null;
/**
* Constructor: gets the object to test, a logger and the test parameters
* @param xObj The test object
- * @param log A log writer
+
* @param param The test parameters
*/
- public _XDataPilotTable(XDataPilotTable xObj,
- LogWriter log, TestParameters param) {
+ public _XDataPilotTable(XDataPilotTable xObj/*,
+ LogWriter log*/, TestParameters param) {
oObj = xObj;
- this.log = log;
+ // this.log = log;
this.param = param;
}
@@ -94,7 +94,7 @@ public class _XDataPilotTable {
if (xCellForChange == null || OutputRange == null ||
xCellForCheck == null) {
- log.println("Relation not found");
+ System.out.println("Relation not found");
return false;
}
return true;
@@ -103,7 +103,8 @@ public class _XDataPilotTable {
* Test calls the method and checks returned value using value obtained by
* object relation <code>'OUTPUTRANGE'</code>. <p>
* Has <b> OK </b> status if values are equal. <p>
- */
+ * @return
+ */
public boolean _getOutputRange(){
boolean bResult = true;
CellRangeAddress objRange = oObj.getOutputRange();
@@ -119,13 +120,14 @@ public class _XDataPilotTable {
* relation 'CELLFORCHECK'.<p>
* Has <b>OK</b> status if value of the cell obtained by object relation
* 'CELLFORCHECK' is changed. <p>
- */
+ * @return
+ */
public boolean _refresh(){
xCellForChange.setValue(changeValue);
double oldData = xCellForCheck.getValue();
oObj.refresh();
double newData = xCellForCheck.getValue();
- log.println("Old data:" + oldData + "; new data:" + newData);
+ System.out.println("Old data:" + oldData + "; new data:" + newData);
return oldData != newData;
}
diff --git a/sc/qa/complex/dataPilot/interfaceTests/container/_XNamed.java b/sc/qa/complex/dataPilot/_XNamed.java
index b38659a97..48433d8c8 100644
--- a/sc/qa/complex/dataPilot/interfaceTests/container/_XNamed.java
+++ b/sc/qa/complex/dataPilot/_XNamed.java
@@ -25,12 +25,12 @@
*
************************************************************************/
-package complex.dataPilot.interfaceTests.container;
+package complex.dataPilot;
import com.sun.star.container.XNamed;
import lib.TestParameters;
-import share.LogWriter;
-import util.utils;
+// import share.LogWriter;
+// import util.utils;
/**
* Testing <code>com.sun.star.container.XNamed</code>
@@ -64,7 +64,7 @@ public class _XNamed {
/**
* The log writer
*/
- private LogWriter log = null;
+ // private LogWriter log = null;
/**
* Constructor: gets the object to test, a logger and the test parameters
@@ -72,9 +72,9 @@ public class _XNamed {
* @param log A log writer
* @param param The test parameters
*/
- public _XNamed(XNamed xObj, LogWriter log, TestParameters param) {
+ public _XNamed(XNamed xObj/*, LogWriter log*/, TestParameters param) {
oObj = xObj;
- this.log = log;
+ // this.log = log;
this.param = param;
}
@@ -87,7 +87,7 @@ public class _XNamed {
public boolean _getName() {
// write to log what we try next
- log.println( "test for getName()" );
+ System.out.println( "test for getName()" );
boolean result = true;
boolean loc_result = true;
@@ -95,10 +95,16 @@ public class _XNamed {
String NewName = null;
loc_result = ((name = oObj.getName()) != null);
- log.println("getting the name \"" + name + "\"");
-
- if (loc_result) log.println("... getName() - OK");
- else log.println("... getName() - FAILED");
+ System.out.println("getting the name \"" + name + "\"");
+
+ if (loc_result)
+ {
+ System.out.println("... getName() - OK");
+ }
+ else
+ {
+ System.out.println("... getName() - FAILED");
+ }
result &= loc_result;
return result;
}
@@ -121,23 +127,29 @@ public class _XNamed {
*/
public boolean _setName(){
// requiredMethod("getName()");
- log.println("testing setName() ... ");
+ System.out.println("testing setName() ... ");
String oldName = oObj.getName();
String NewName = oldName == null ? "XNamed" : oldName + "X" ;
boolean result = true;
boolean loc_result = true;
- log.println("set the name of object to \"" + NewName + "\"");
+ System.out.println("set the name of object to \"" + NewName + "\"");
oObj.setName(NewName);
- log.println("check that container has element with this name");
+ System.out.println("check that container has element with this name");
String name = oObj.getName();
- log.println("getting the name \"" + name + "\"");
+ System.out.println("getting the name \"" + name + "\"");
loc_result = name.equals(NewName);
- if (loc_result) log.println("... setName() - OK");
- else log.println("... setName() - FAILED");
+ if (loc_result)
+ {
+ System.out.println("... setName() - OK");
+ }
+ else
+ {
+ System.out.println("... setName() - FAILED");
+ }
result &= loc_result;
oObj.setName(oldName);
return result;
diff --git a/sc/qa/complex/dataPilot/interfaceTests/beans/_XPropertySet.java b/sc/qa/complex/dataPilot/_XPropertySet.java
index 09e4d7e6e..33dc592af 100644
--- a/sc/qa/complex/dataPilot/interfaceTests/beans/_XPropertySet.java
+++ b/sc/qa/complex/dataPilot/_XPropertySet.java
@@ -25,7 +25,7 @@
*
************************************************************************/
-package complex.dataPilot.interfaceTests.beans;
+package complex.dataPilot;
import com.sun.star.beans.Property;
import com.sun.star.beans.PropertyAttribute;
@@ -38,7 +38,7 @@ import com.sun.star.lang.EventObject;
import java.util.Random;
import java.util.StringTokenizer;
import lib.TestParameters;
-import share.LogWriter;
+// import share.LogWriter;
//import lib.MultiMethodTest;
import util.ValueChanger;
import util.utils;
@@ -72,7 +72,7 @@ public class _XPropertySet {
/**
* The log writer
*/
- private LogWriter log = null;
+ // private LogWriter log = null;
/**
* Flag that indicates change listener was called.
@@ -144,9 +144,9 @@ public class _XPropertySet {
* @param log A log writer
* @param param The test parameters
*/
- public _XPropertySet(XPropertySet xObj, LogWriter log, TestParameters param) {
+ public _XPropertySet(XPropertySet xObj/*, LogWriter log*/, TestParameters param) {
oObj = xObj;
- this.log = log;
+ // this.log = log;
this.param = param;
}
@@ -166,7 +166,7 @@ public class _XPropertySet {
XPropertySetInfo propertySetInfo = oObj.getPropertySetInfo();
if (propertySetInfo == null) {
- log.println("getPropertySetInfo() method returned null");
+ System.out.println("getPropertySetInfo() method returned null");
String[] ptt = (String[]) param.get("PTT");
PTT.normal=ptt[0];
PTT.bound=ptt[1];
@@ -197,7 +197,7 @@ public class _XPropertySet {
boolean result = true;
if ( PTT.bound.equals("none") ) {
- log.println("*** No bound properties found ***");
+ System.out.println("*** No bound properties found ***");
} else {
try {
oObj.addPropertyChangeListener(PTT.bound,PClistener);
@@ -205,25 +205,25 @@ public class _XPropertySet {
oObj.setPropertyValue(PTT.bound,
ValueChanger.changePValue(gValue));
} catch (com.sun.star.beans.PropertyVetoException e) {
- log.println("Exception occured while trying to change "+
+ System.out.println("Exception occured while trying to change "+
"property '"+ PTT.bound+"'");
- e.printStackTrace((java.io.PrintWriter)log);
+ e.printStackTrace();
} catch (com.sun.star.lang.IllegalArgumentException e) {
- log.println("Exception occured while trying to change "+
+ System.out.println("Exception occured while trying to change "+
"property '"+ PTT.bound+"'");
- e.printStackTrace((java.io.PrintWriter)log);
+ e.printStackTrace();
} catch (com.sun.star.beans.UnknownPropertyException e) {
- log.println("Exception occured while trying to change "+
+ System.out.println("Exception occured while trying to change "+
"property '"+ PTT.bound+"'");
- e.printStackTrace((java.io.PrintWriter)log);
+ e.printStackTrace();
} catch (com.sun.star.lang.WrappedTargetException e) {
- log.println("Exception occured while trying to change "+
+ System.out.println("Exception occured while trying to change "+
"property '"+ PTT.bound+"'");
- e.printStackTrace((java.io.PrintWriter)log);
+ e.printStackTrace();
} // end of try-catch
result = propertyChanged;
if (!propertyChanged) {
- log.println("propertyChangeListener wasn't called for '"+
+ System.out.println("propertyChangeListener wasn't called for '"+
PTT.bound+"'");
}
} //endif
@@ -252,7 +252,7 @@ public class _XPropertySet {
boolean result = true;
if ( PTT.constrained.equals("none") ) {
- log.println("*** No constrained properties found ***");
+ System.out.println("*** No constrained properties found ***");
} else {
try {
oObj.addVetoableChangeListener(PTT.constrained,VClistener);
@@ -260,25 +260,25 @@ public class _XPropertySet {
oObj.setPropertyValue(PTT.constrained,
ValueChanger.changePValue(gValue));
} catch (com.sun.star.beans.PropertyVetoException e) {
- log.println("Exception occured while trying to change "+
+ System.out.println("Exception occured while trying to change "+
"property '"+ PTT.constrained+"'");
- e.printStackTrace((java.io.PrintWriter)log);
+ e.printStackTrace();
} catch (com.sun.star.lang.IllegalArgumentException e) {
- log.println("Exception occured while trying to change "+
+ System.out.println("Exception occured while trying to change "+
"property '"+ PTT.constrained+"'");
- e.printStackTrace((java.io.PrintWriter)log);
+ e.printStackTrace();
} catch (com.sun.star.beans.UnknownPropertyException e) {
- log.println("Exception occured while trying to change "+
+ System.out.println("Exception occured while trying to change "+
"property '"+ PTT.constrained+"'");
- e.printStackTrace((java.io.PrintWriter)log);
+ e.printStackTrace();
} catch (com.sun.star.lang.WrappedTargetException e) {
- log.println("Exception occured while trying to change "+
+ System.out.println("Exception occured while trying to change "+
"property '"+ PTT.constrained+"'");
- e.printStackTrace((java.io.PrintWriter)log);
+ e.printStackTrace();
} // end of try-catch
result = vetoableChanged;
if (!vetoableChanged) {
- log.println("vetoableChangeListener wasn't called for '"+
+ System.out.println("vetoableChangeListener wasn't called for '"+
PTT.constrained+"'");
}
} //endif
@@ -310,7 +310,7 @@ public class _XPropertySet {
boolean result = true;
if ( PTT.normal.equals("none") ) {
- log.println("*** No changeable properties found ***");
+ System.out.println("*** No changeable properties found ***");
} else {
try {
gValue = oObj.getPropertyValue(PTT.normal);
@@ -318,21 +318,21 @@ public class _XPropertySet {
oObj.setPropertyValue(PTT.normal, sValue);
sValue = oObj.getPropertyValue(PTT.normal);
} catch (com.sun.star.beans.PropertyVetoException e) {
- log.println("Exception occured while trying to change "+
+ System.out.println("Exception occured while trying to change "+
"property '"+ PTT.normal+"'");
- e.printStackTrace((java.io.PrintWriter)log);
+ e.printStackTrace();
} catch (com.sun.star.lang.IllegalArgumentException e) {
- log.println("Exception occured while trying to change "+
+ System.out.println("Exception occured while trying to change "+
"property '"+ PTT.normal+"'");
- e.printStackTrace((java.io.PrintWriter)log);
+ e.printStackTrace();
} catch (com.sun.star.beans.UnknownPropertyException e) {
- log.println("Exception occured while trying to change "+
+ System.out.println("Exception occured while trying to change "+
"property '"+ PTT.normal+"'");
- e.printStackTrace((java.io.PrintWriter)log);
+ e.printStackTrace();
} catch (com.sun.star.lang.WrappedTargetException e) {
- log.println("Exception occured while trying to change "+
+ System.out.println("Exception occured while trying to change "+
"property '"+ PTT.normal+"'");
- e.printStackTrace((java.io.PrintWriter)log);
+ e.printStackTrace();
} // end of try-catch
result = !gValue.equals(sValue);
} //endif
@@ -361,21 +361,21 @@ public class _XPropertySet {
if ( PTT.normal.equals("none") ) {
toCheck = oObj.getPropertySetInfo().getProperties()[0].Name;
- log.println("All properties are Read Only");
- log.println("Using: "+toCheck);
+ System.out.println("All properties are Read Only");
+ System.out.println("Using: "+toCheck);
}
try {
Object gValue = oObj.getPropertyValue(toCheck);
} catch (com.sun.star.beans.UnknownPropertyException e) {
- log.println("Exception occured while trying to get property '"+
+ System.out.println("Exception occured while trying to get property '"+
PTT.normal+"'");
- e.printStackTrace((java.io.PrintWriter)log);
+ e.printStackTrace();
result = false;
} catch (com.sun.star.lang.WrappedTargetException e) {
- log.println("Exception occured while trying to get property '"+
+ System.out.println("Exception occured while trying to get property '"+
PTT.normal+"'");
- e.printStackTrace((java.io.PrintWriter)log);
+ e.printStackTrace();
result = false;
} // end of try-catch
@@ -402,7 +402,7 @@ public class _XPropertySet {
boolean result = true;
if ( PTT.bound.equals("none") ) {
- log.println("*** No bound properties found ***");
+ System.out.println("*** No bound properties found ***");
} else {
try {
propertyChanged = false;
@@ -411,26 +411,26 @@ public class _XPropertySet {
oObj.setPropertyValue(PTT.bound,
ValueChanger.changePValue(gValue));
} catch (com.sun.star.beans.PropertyVetoException e) {
- log.println("Exception occured while trying to change "+
+ System.out.println("Exception occured while trying to change "+
"property '"+ PTT.bound+"'");
- e.printStackTrace((java.io.PrintWriter)log);
+ e.printStackTrace();
} catch (com.sun.star.lang.IllegalArgumentException e) {
- log.println("Exception occured while trying to change "+
+ System.out.println("Exception occured while trying to change "+
"property '"+ PTT.bound+"'");
- e.printStackTrace((java.io.PrintWriter)log);
+ e.printStackTrace();
} catch (com.sun.star.beans.UnknownPropertyException e) {
- log.println("Exception occured while trying to change "+
+ System.out.println("Exception occured while trying to change "+
"property '"+ PTT.bound+"'");
- e.printStackTrace((java.io.PrintWriter)log);
+ e.printStackTrace();
} catch (com.sun.star.lang.WrappedTargetException e) {
- log.println("Exception occured while trying to change "+
+ System.out.println("Exception occured while trying to change "+
"property '"+ PTT.bound+"'");
- e.printStackTrace((java.io.PrintWriter)log);
+ e.printStackTrace();
} // end of try-catch
result = !propertyChanged;
if (propertyChanged) {
- log.println("propertyChangeListener was called after removing"+
+ System.out.println("propertyChangeListener was called after removing"+
" for '"+PTT.bound+"'");
}
} //endif
@@ -460,7 +460,7 @@ public class _XPropertySet {
boolean result = true;
if ( PTT.constrained.equals("none") ) {
- log.println("*** No constrained properties found ***");
+ System.out.println("*** No constrained properties found ***");
} else {
try {
oObj.removeVetoableChangeListener(PTT.constrained,VClistener);
@@ -468,26 +468,26 @@ public class _XPropertySet {
oObj.setPropertyValue(PTT.constrained,
ValueChanger.changePValue(gValue));
} catch (com.sun.star.beans.PropertyVetoException e) {
- log.println("Exception occured while trying to change "+
+ System.out.println("Exception occured while trying to change "+
"property '"+ PTT.constrained+"'");
- e.printStackTrace((java.io.PrintWriter)log);
+ e.printStackTrace();
} catch (com.sun.star.lang.IllegalArgumentException e) {
- log.println("Exception occured while trying to change "+
+ System.out.println("Exception occured while trying to change "+
"property '"+ PTT.constrained+"'");
- e.printStackTrace((java.io.PrintWriter)log);
+ e.printStackTrace();
} catch (com.sun.star.beans.UnknownPropertyException e) {
- log.println("Exception occured while trying to change "+
+ System.out.println("Exception occured while trying to change "+
"property '"+ PTT.constrained+"'");
- e.printStackTrace((java.io.PrintWriter)log);
+ e.printStackTrace();
} catch (com.sun.star.lang.WrappedTargetException e) {
- log.println("Exception occured while trying to change "+
+ System.out.println("Exception occured while trying to change "+
"property '"+ PTT.constrained+"'");
- e.printStackTrace((java.io.PrintWriter)log);
+ e.printStackTrace();
} // end of try-catch
result = !vetoableChanged;
if (vetoableChanged) {
- log.println("vetoableChangeListener was called after "+
+ System.out.println("vetoableChangeListener was called after "+
"removing for '"+PTT.constrained+"'");
}
} //endif
@@ -512,7 +512,7 @@ public class _XPropertySet {
Property property = properties[i];
String name = property.Name;
- log.println("Checking '"+name+"'");
+ System.out.println("Checking '"+name+"'");
boolean isWritable = ((property.Attributes &
PropertyAttribute.READONLY) == 0);
boolean isNotNull = ((property.Attributes &
@@ -523,7 +523,7 @@ public class _XPropertySet {
PropertyAttribute.CONSTRAINED) != 0);
boolean canChange = false;
- if ( !isWritable ) log.println("Property '"+name+"' is READONLY");
+ if ( !isWritable ) System.out.println("Property '"+name+"' is READONLY");
if (name.endsWith("URL")) isWritable = false;
if (name.startsWith("Fill")) isWritable = false;
@@ -552,11 +552,11 @@ public class _XPropertySet {
//get a random bound property
PTT.bound=getRandomString(bound);
- log.println("Bound: "+PTT.bound);
+ System.out.println("Bound: "+PTT.bound);
//get a random constrained property
PTT.constrained=getRandomString(constrained);
- log.println("Constrained: "+PTT.constrained);
+ System.out.println("Constrained: "+PTT.constrained);
//get a random normal property
PTT.normal=getRandomString(normal);
@@ -588,39 +588,39 @@ public class _XPropertySet {
boolean hasChanged = false;
try {
Object getProp = oObj.getPropertyValue(name);
- log.println("Getting: "+getProp);
+ System.out.println("Getting: "+getProp);
Object setValue = null;
if (getProp != null) {
if (!utils.isVoid(getProp))
setValue = ValueChanger.changePValue(getProp);
- else log.println("Property '"+name+
+ else System.out.println("Property '"+name+
"' is void but MAYBEVOID isn't set");
- } else log.println("Property '"+name+"'is null and can't be changed");
+ } else System.out.println("Property '"+name+"'is null and can't be changed");
if (name.equals("LineStyle")) setValue = null;
if (setValue != null) {
oObj.setPropertyValue(name, setValue);
- log.println("Setting to :"+setValue);
+ System.out.println("Setting to :"+setValue);
hasChanged = (! getProp.equals(oObj.getPropertyValue(name)));
- } else log.println("Couldn't change Property '"+name+"'");
+ } else System.out.println("Couldn't change Property '"+name+"'");
} catch (com.sun.star.beans.PropertyVetoException e) {
- log.println("'" + name + "' throws exception '" + e + "'");
- e.printStackTrace((java.io.PrintWriter)log);
+ System.out.println("'" + name + "' throws exception '" + e + "'");
+ e.printStackTrace();
} catch (com.sun.star.lang.IllegalArgumentException e) {
- log.println("'" + name + "' throws exception '" + e + "'");
- e.printStackTrace((java.io.PrintWriter)log);
+ System.out.println("'" + name + "' throws exception '" + e + "'");
+ e.printStackTrace();
} catch (com.sun.star.beans.UnknownPropertyException e) {
- log.println("'" + name + "' throws exception '" + e + "'");
- e.printStackTrace((java.io.PrintWriter)log);
+ System.out.println("'" + name + "' throws exception '" + e + "'");
+ e.printStackTrace();
} catch (com.sun.star.lang.WrappedTargetException e) {
- log.println("'" + name + "' throws exception '" + e + "'");
- e.printStackTrace((java.io.PrintWriter)log);
+ System.out.println("'" + name + "' throws exception '" + e + "'");
+ e.printStackTrace();
} catch (com.sun.star.uno.RuntimeException e) {
- log.println("'" + name + "' throws exception '" + e + "'");
- e.printStackTrace((java.io.PrintWriter)log);
+ System.out.println("'" + name + "' throws exception '" + e + "'");
+ e.printStackTrace();
} catch (java.lang.ArrayIndexOutOfBoundsException e) {
- log.println("'" + name + "' throws exception '" + e + "'");
- e.printStackTrace((java.io.PrintWriter)log);
+ System.out.println("'" + name + "' throws exception '" + e + "'");
+ e.printStackTrace();
}
return hasChanged;
diff --git a/sc/qa/complex/dataPilot/interfaceTests/beans/makefile.mk b/sc/qa/complex/dataPilot/interfaceTests/beans/makefile.mk
index 6ef9f7456..22b29f5e0 100644
--- a/sc/qa/complex/dataPilot/interfaceTests/beans/makefile.mk
+++ b/sc/qa/complex/dataPilot/interfaceTests/beans/makefile.mk
@@ -25,10 +25,10 @@
#
#*************************************************************************
-PRJ = ..$/..$/..$/..$/..
+PRJ = ../../../../..
TARGET = DataPilotInterfaceBeans
PRJNAME = sc
-PACKAGE = complex$/dataPilot$/interfaceTests$/beans
+PACKAGE = complex/dataPilot/interfaceTests/beans
# --- Settings -----------------------------------------------------
.INCLUDE: settings.mk
@@ -38,7 +38,7 @@ PACKAGE = complex$/dataPilot$/interfaceTests$/beans
JARFILES = ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar
JAVAFILES = _XPropertySet.java
-JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class)
+JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)/$(PACKAGE)/$(i:b).class)
# --- Targets ------------------------------------------------------
diff --git a/sc/qa/complex/dataPilot/interfaceTests/container/makefile.mk b/sc/qa/complex/dataPilot/interfaceTests/container/makefile.mk
index 675fe7be9..d8b4321f0 100644
--- a/sc/qa/complex/dataPilot/interfaceTests/container/makefile.mk
+++ b/sc/qa/complex/dataPilot/interfaceTests/container/makefile.mk
@@ -25,10 +25,10 @@
#
#*************************************************************************
-PRJ = ..$/..$/..$/..$/..
+PRJ = ../../../../..
TARGET = DataPilotInterfaceContainer
PRJNAME = sc
-PACKAGE = complex$/dataPilot$/interfaceTests$/container
+PACKAGE = complex/dataPilot/interfaceTests/container
# --- Settings -----------------------------------------------------
.INCLUDE: settings.mk
@@ -38,7 +38,7 @@ PACKAGE = complex$/dataPilot$/interfaceTests$/container
JARFILES = ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar
JAVAFILES = _XNamed.java
-JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class)
+JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)/$(PACKAGE)/$(i:b).class)
# --- Targets ------------------------------------------------------
diff --git a/sc/qa/complex/dataPilot/interfaceTests/sheet/makefile.mk b/sc/qa/complex/dataPilot/interfaceTests/sheet/makefile.mk
index 350e3fcb8..f62d17614 100644
--- a/sc/qa/complex/dataPilot/interfaceTests/sheet/makefile.mk
+++ b/sc/qa/complex/dataPilot/interfaceTests/sheet/makefile.mk
@@ -25,10 +25,10 @@
#
#*************************************************************************
-PRJ = ..$/..$/..$/..$/..
+PRJ = ../../../../..
TARGET = DataPilotInterfaceSheet
PRJNAME = sc
-PACKAGE = complex$/dataPilot$/interfaceTests$/sheet
+PACKAGE = complex/dataPilot/interfaceTests/sheet
# --- Settings -----------------------------------------------------
.INCLUDE: settings.mk
@@ -38,7 +38,7 @@ PACKAGE = complex$/dataPilot$/interfaceTests$/sheet
JARFILES = ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar
JAVAFILES = _XDataPilotDescriptor.java _XDataPilotTable.java
-JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class)
+JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)/$(PACKAGE)/$(i:b).class)
# --- Targets ------------------------------------------------------
diff --git a/sc/qa/complex/dataPilot/makefile.mk b/sc/qa/complex/dataPilot/makefile.mk
index a0bf1df34..85512f8e5 100644
--- a/sc/qa/complex/dataPilot/makefile.mk
+++ b/sc/qa/complex/dataPilot/makefile.mk
@@ -25,34 +25,35 @@
#
#*************************************************************************
-PRJ = ..$/..$/..
-TARGET = DataPilot
-PRJNAME = sc
-PACKAGE = complex$/dataPilot
-
-# --- Settings -----------------------------------------------------
-.INCLUDE: settings.mk
+.IF "$(OOO_SUBSEQUENT_TESTS)" == ""
+nothing .PHONY:
+.ELSE
+PRJ = ../../..
+PRJNAME = sc
+TARGET = qa_complex_datapilot
-#----- compile .java files -----------------------------------------
-
-JARFILES = ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar
-JAVAFILES = CheckDataPilot.java
-JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class)
+.IF "$(OOO_JUNIT_JAR)" != ""
+PACKAGE = complex/dataPilot
+JAVATESTFILES = \
+ CheckDataPilot.java
-SUBDIRS = interfaceTests$/beans interfaceTests$/container interfaceTests$/sheet
-#----- make a jar from compiled files ------------------------------
+JAVAFILES = $(JAVATESTFILES) \
+ _XDataPilotDescriptor.java \
+ _XDataPilotTable.java \
+ _XNamed.java \
+ _XPropertySet.java
-MAXLINELENGTH = 100000
+JARFILES = OOoRunner.jar ridl.jar test.jar unoil.jar
+EXTRAJARFILES = $(OOO_JUNIT_JAR)
-JARCLASSDIRS = $(PACKAGE)
-JARTARGET = $(TARGET).jar
-JARCOMPRESS = TRUE
+.END
-# --- Targets ------------------------------------------------------
+.INCLUDE: settings.mk
+.INCLUDE: target.mk
+.INCLUDE: installationtest.mk
-.INCLUDE : target.mk
+ALLTAR : javatest
+.END
-run:
- +java -cp $(CLASSPATH) org.openoffice.Runner -TimeOut 0 -tb java_complex -o $(PACKAGE:s#$/#.#).$(JAVAFILES:b)
diff --git a/sc/qa/complex/sc/CalcRTL.java b/sc/qa/complex/sc/CalcRTL.java
index fb39b7ca0..a451d4f6c 100644
--- a/sc/qa/complex/sc/CalcRTL.java
+++ b/sc/qa/complex/sc/CalcRTL.java
@@ -44,23 +44,32 @@ import com.sun.star.sheet.XCellRangeAddressable;
import com.sun.star.sheet.XSpreadsheet;
import com.sun.star.sheet.XSpreadsheetDocument;
import com.sun.star.sheet.XSpreadsheets;
-import com.sun.star.table.XCell;
+// import com.sun.star.table.XCell;
import com.sun.star.uno.Any;
import com.sun.star.uno.AnyConverter;
import com.sun.star.uno.Type;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.util.XCloseable;
-import complexlib.ComplexTestCase;
+// import complexlib.ComplexTestCase;
-import java.io.PrintWriter;
+// import java.io.PrintWriter;
import util.DrawTools;
import util.SOfficeFactory;
import util.ValueComparer;
+// 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 CalcRTL extends ComplexTestCase {
+
+public class CalcRTL /* extends ComplexTestCase */
+{
XSpreadsheetDocument xSheetDoc = null;
/*
@@ -74,12 +83,12 @@ public class CalcRTL extends ComplexTestCase {
* <br>
* 3. A calc document is opened and a shape inserted, afterwards the effect of changing the TableLayout to the shape is checked
*/
- public String[] getTestMethodNames() {
- return new String[] {
- "checkSpreadsheetProperties", "checkShapeProperties",
- "checkInfluenceOfSpreadsheetChange"
- };
- }
+// public String[] getTestMethodNames() {
+// return new String[] {
+// "checkSpreadsheetProperties", "checkShapeProperties",
+// "checkInfluenceOfSpreadsheetChange"
+// };
+// }
/*
* In this method a spreadsheet document is opened<br>
@@ -92,26 +101,26 @@ public class CalcRTL extends ComplexTestCase {
*<li> TableLayout
*</ul>
*/
- public void checkSpreadsheetProperties() {
- assure("Couldn't open document", openSpreadsheetDocument());
+ @Test public void checkSpreadsheetProperties() {
+ assertTrue("Couldn't open document", openSpreadsheetDocument());
- XPropertySet set = (XPropertySet) UnoRuntime.queryInterface(
+ XPropertySet set = UnoRuntime.queryInterface(
XPropertySet.class, getSpreadsheet());
- assure("Problems when setting property 'IsVisible'",
+ assertTrue("Problems when setting property 'IsVisible'",
changeProperty(set, "IsVisible", Boolean.FALSE));
- assure("Problems when setting property 'IsVisible'",
+ assertTrue("Problems when setting property 'IsVisible'",
changeProperty(set, "IsVisible", Boolean.TRUE));
- assure("Problems when setting property 'PageStyle'",
+ assertTrue("Problems when setting property 'PageStyle'",
changeProperty(set, "PageStyle", "Report"));
- assure("Problems when setting property 'PageStyle'",
+ assertTrue("Problems when setting property 'PageStyle'",
changeProperty(set, "PageStyle", "Default"));
- assure("Problems when setting property 'TableLayout'",
+ assertTrue("Problems when setting property 'TableLayout'",
changeProperty(set, "TableLayout",
new Short(com.sun.star.text.WritingMode2.RL_TB)));
- assure("Problems when setting property 'TableLayout'",
+ assertTrue("Problems when setting property 'TableLayout'",
changeProperty(set, "TableLayout",
new Short(com.sun.star.text.WritingMode2.LR_TB)));
- assure("Couldn't close document", closeSpreadsheetDocument());
+ assertTrue("Couldn't close document", closeSpreadsheetDocument());
}
/*
@@ -125,67 +134,69 @@ public class CalcRTL extends ComplexTestCase {
*<li> VertOrientPosition
*</ul>
*/
- public void checkShapeProperties() {
- assure("Couldn't open document", openSpreadsheetDocument());
+ @Test public void checkShapeProperties() {
+ assertTrue("Couldn't open document", openSpreadsheetDocument());
- XPropertySet set = (XPropertySet) UnoRuntime.queryInterface(
+ XPropertySet set = UnoRuntime.queryInterface(
XPropertySet.class, getInsertedShape());
try {
- assure("Problems when setting property 'Anchor'",
+ assertTrue("Problems when setting property 'Anchor'",
changeProperty(set, "Anchor",
getSpreadsheet().getCellByPosition(5, 5)));
} catch (com.sun.star.lang.IndexOutOfBoundsException e) {
- assure("Problems when setting property 'Anchor'", false);
+ // assure("Problems when setting property 'Anchor'", false);
+ fail("Problems when setting property 'Anchor'");
}
- assure("Problems when setting property 'HoriOrientPosition'",
+ assertTrue("Problems when setting property 'HoriOrientPosition'",
changeProperty(set, "HoriOrientPosition", new Integer(1000)));
- assure("Problems when setting property 'VertOrientPosition'",
+ assertTrue("Problems when setting property 'VertOrientPosition'",
changeProperty(set, "VertOrientPosition", new Integer(1000)));
- assure("Couldn't close document", closeSpreadsheetDocument());
+ assertTrue("Couldn't close document", closeSpreadsheetDocument());
}
- public void checkInfluenceOfSpreadsheetChange() {
- assure("Couldn't open document", openSpreadsheetDocument());
+ @Test public void checkInfluenceOfSpreadsheetChange() {
+ assertTrue("Couldn't open document", openSpreadsheetDocument());
XShape oShape = getInsertedShape();
- XPropertySet sheetProps = (XPropertySet) UnoRuntime.queryInterface(
+ XPropertySet sheetProps = UnoRuntime.queryInterface(
XPropertySet.class, getSpreadsheet());
- XPropertySet shapeProps = (XPropertySet) UnoRuntime.queryInterface(
+ XPropertySet shapeProps = UnoRuntime.queryInterface(
XPropertySet.class, oShape);
String[] previous = getShapeProps(shapeProps, oShape);
- assure("Problems when setting property 'TableLayout'",
+ assertTrue("Problems when setting property 'TableLayout'",
changeProperty(sheetProps, "TableLayout",
new Short(com.sun.star.text.WritingMode2.RL_TB)));
String[] RL_TB = getShapeProps(shapeProps, oShape);
- assure("Problems when setting property 'TableLayout'",
+ assertTrue("Problems when setting property 'TableLayout'",
changeProperty(sheetProps, "TableLayout",
new Short(com.sun.star.text.WritingMode2.LR_TB)));
String[] LR_TB = getShapeProps(shapeProps, oShape);
- assure("Anchor has changed",
+ assertTrue("Anchor has changed",
(previous[0].equals(RL_TB[0]) && previous[0].equals(LR_TB[0])));
- assure("HoriOrientPosition has changed",
- (Integer.valueOf(previous[1]).intValue() + Integer.valueOf(
+ assertEquals("HoriOrientPosition has changed",
+ 2100, (Integer.valueOf(previous[1]).intValue() + Integer.valueOf(
RL_TB[1])
.intValue() +
- Integer.valueOf(LR_TB[1]).intValue() == 2099));
- assure("VertOrientPosition has changed",
+ Integer.valueOf(LR_TB[1]).intValue()));
+ assertEquals("VertOrientPosition has changed",
+ 3*Integer.valueOf(previous[2]).intValue(),
(Integer.valueOf(previous[2]).intValue() + Integer.valueOf(
RL_TB[2])
.intValue() +
- Integer.valueOf(LR_TB[2]).intValue() == 3*Integer.valueOf(previous[2]).intValue()));
- assure("x-position hasn't changed",
+ Integer.valueOf(LR_TB[2]).intValue()));
+ assertTrue("x-position hasn't changed",
(previous[3].equals(LR_TB[3]) &&
((Integer.valueOf(previous[3]).intValue() * (-1)) -
oShape.getSize().Width != Integer.valueOf(LR_TB[2])
.intValue())));
- assure("Couldn't close document", closeSpreadsheetDocument());
+ assertTrue("Couldn't close document", closeSpreadsheetDocument());
}
protected String[] getShapeProps(XPropertySet set, XShape oShape) {
@@ -200,10 +211,10 @@ public class CalcRTL extends ComplexTestCase {
} catch (com.sun.star.lang.WrappedTargetException e) {
}
- log.println("\t Anchor :" + reValue[0]);
- log.println("\t HoriOrientPosition :" + reValue[1]);
- log.println("\t VertOrientPosition :" + reValue[2]);
- log.println("\t Shape Position (x,y) : (" + oShape.getPosition().X +
+ System.out.println("\t Anchor :" + reValue[0]);
+ System.out.println("\t HoriOrientPosition :" + reValue[1]);
+ System.out.println("\t VertOrientPosition :" + reValue[2]);
+ System.out.println("\t Shape Position (x,y) : (" + oShape.getPosition().X +
"," + oShape.getPosition().Y + ")");
return reValue;
@@ -213,17 +224,21 @@ public class CalcRTL extends ComplexTestCase {
* this method opens a calc document and sets the corresponding class variable xSheetDoc
*/
protected boolean openSpreadsheetDocument() {
- SOfficeFactory SOF = SOfficeFactory.getFactory(
- (XMultiServiceFactory) param.getMSF());
+ // SOfficeFactory SOF = SOfficeFactory.getFactory(
+ // (XMultiServiceFactory) param.getMSF());
+
+ final XMultiServiceFactory xMsf = UnoRuntime.queryInterface(XMultiServiceFactory.class, connection.getComponentContext().getServiceManager());
+ SOfficeFactory SOF = SOfficeFactory.getFactory(xMsf);
+
boolean worked = true;
try {
- log.println("creating a sheetdocument");
+ System.out.println("creating a sheetdocument");
xSheetDoc = SOF.createCalcDoc(null);
} catch (com.sun.star.uno.Exception e) {
// Some exception occures.FAILED
worked = false;
- e.printStackTrace((PrintWriter) log);
+ e.printStackTrace(/*(PrintWriter) log*/ System.out);
}
return worked;
@@ -235,21 +250,21 @@ public class CalcRTL extends ComplexTestCase {
protected boolean closeSpreadsheetDocument() {
boolean worked = true;
- log.println(" disposing xSheetDoc ");
+ System.out.println(" disposing xSheetDoc ");
try {
- XCloseable oCloser = (XCloseable) UnoRuntime.queryInterface(
+ XCloseable oCloser = UnoRuntime.queryInterface(
XCloseable.class, xSheetDoc);
oCloser.close(true);
} catch (com.sun.star.util.CloseVetoException e) {
worked = false;
- log.println("Couldn't close document");
+ System.out.println("Couldn't close document");
} catch (com.sun.star.lang.DisposedException e) {
worked = false;
- log.println("Document already disposed");
+ System.out.println("Document already disposed");
} catch (java.lang.NullPointerException e) {
worked = false;
- log.println("Couldn't get XCloseable");
+ System.out.println("Couldn't get XCloseable");
}
xSheetDoc = null;
@@ -264,22 +279,22 @@ public class CalcRTL extends ComplexTestCase {
protected XSpreadsheet getSpreadsheet() {
XSpreadsheet oSheet = null;
- log.println("getting sheets");
+ System.out.println("getting sheets");
- XSpreadsheets xSpreadsheets = (XSpreadsheets) xSheetDoc.getSheets();
+ XSpreadsheets xSpreadsheets = xSheetDoc.getSheets();
- log.println("getting a sheet");
+ System.out.println("getting a sheet");
- XIndexAccess oIndexAccess = (XIndexAccess) UnoRuntime.queryInterface(
+ XIndexAccess oIndexAccess = UnoRuntime.queryInterface(
XIndexAccess.class, xSpreadsheets);
try {
- oSheet = (XSpreadsheet) UnoRuntime.queryInterface(
+ oSheet = UnoRuntime.queryInterface(
XSpreadsheet.class, oIndexAccess.getByIndex(0));
} catch (com.sun.star.lang.WrappedTargetException e) {
- e.printStackTrace((PrintWriter) log);
+ e.printStackTrace(System.out);
} catch (com.sun.star.lang.IndexOutOfBoundsException e) {
- e.printStackTrace((PrintWriter) log);
+ e.printStackTrace(System.out);
}
return oSheet;
@@ -361,19 +376,19 @@ public class CalcRTL extends ComplexTestCase {
//check get-set methods
if (maybeVoid) {
- log.println("Property " + propName + " is void");
+ System.out.println("Property " + propName + " is void");
}
if (readOnly) {
- log.println("Property " + propName + " is readOnly");
+ System.out.println("Property " + propName + " is readOnly");
}
if (util.utils.isVoid(oldValue) && !maybeVoid) {
- log.println(propName + " is void, but it's not MAYBEVOID");
+ System.out.println(propName + " is void, but it's not MAYBEVOID");
return false;
} else if (oldValue == null) {
- log.println(propName +
+ System.out.println(propName +
" has null value, and therefore can't be changed");
return true;
@@ -382,26 +397,26 @@ public class CalcRTL extends ComplexTestCase {
if (exception != null) {
if (exception instanceof PropertyVetoException) {
// the change of read only prohibited - OK
- log.println("Property is ReadOnly and wasn't changed");
- log.println("Property '" + propName + "' OK");
+ System.out.println("Property is ReadOnly and wasn't changed");
+ System.out.println("Property '" + propName + "' OK");
return true;
} else if (exception instanceof IllegalArgumentException) {
// the change of read only prohibited - OK
- log.println("Property is ReadOnly and wasn't changed");
- log.println("Property '" + propName + "' OK");
+ System.out.println("Property is ReadOnly and wasn't changed");
+ System.out.println("Property '" + propName + "' OK");
return true;
} else if (exception instanceof UnknownPropertyException) {
// the change of read only prohibited - OK
- log.println("Property is ReadOnly and wasn't changed");
- log.println("Property '" + propName + "' OK");
+ System.out.println("Property is ReadOnly and wasn't changed");
+ System.out.println("Property '" + propName + "' OK");
return true;
} else if (exception instanceof RuntimeException) {
// the change of read only prohibited - OK
- log.println("Property is ReadOnly and wasn't changed");
- log.println("Property '" + propName + "' OK");
+ System.out.println("Property is ReadOnly and wasn't changed");
+ System.out.println("Property '" + propName + "' OK");
return true;
} else {
@@ -411,7 +426,7 @@ public class CalcRTL extends ComplexTestCase {
// if no exception - check that value
// has not changed
if (!ValueComparer.equalValue(resValue, oldValue)) {
- log.println("Read only property '" + propName +
+ System.out.println("Read only property '" + propName +
"' has changed");
try {
@@ -422,17 +437,17 @@ public class CalcRTL extends ComplexTestCase {
oldValue);
}
- log.println("old = " + toString(oldValue));
- log.println("new = " + toString(newValue));
- log.println("result = " + toString(resValue));
+ System.out.println("old = " + toString(oldValue));
+ System.out.println("new = " + toString(newValue));
+ System.out.println("result = " + toString(resValue));
} catch (com.sun.star.lang.IllegalArgumentException iae) {
}
return false;
} else {
- log.println("Read only property '" + propName +
+ System.out.println("Read only property '" + propName +
"' hasn't changed");
- log.println("Property '" + propName + "' OK");
+ System.out.println("Property '" + propName + "' OK");
return true;
}
@@ -443,7 +458,7 @@ public class CalcRTL extends ComplexTestCase {
// check that the new value is set
if ((!ValueComparer.equalValue(resValue, newValue)) ||
(ValueComparer.equalValue(resValue, oldValue))) {
- log.println("Value for '" + propName +
+ System.out.println("Value for '" + propName +
"' hasn't changed as expected");
try {
@@ -454,16 +469,16 @@ public class CalcRTL extends ComplexTestCase {
oldValue);
}
- log.println("old = " + toString(oldValue));
- log.println("new = " + toString(newValue));
- log.println("result = " + toString(resValue));
+ System.out.println("old = " + toString(oldValue));
+ System.out.println("new = " + toString(newValue));
+ System.out.println("result = " + toString(resValue));
} catch (com.sun.star.lang.IllegalArgumentException iae) {
}
if (resValue != null) {
if ((!ValueComparer.equalValue(resValue, oldValue)) ||
(!resValue.equals(oldValue))) {
- log.println("But it has changed.");
+ System.out.println("But it has changed.");
return true;
} else {
@@ -475,7 +490,7 @@ public class CalcRTL extends ComplexTestCase {
//tRes.tested(propName, false);
} else {
- log.println("Property '" + propName + "' OK");
+ System.out.println("Property '" + propName + "' OK");
try {
if (!util.utils.isVoid(oldValue) &&
@@ -485,9 +500,9 @@ public class CalcRTL extends ComplexTestCase {
oldValue);
}
- log.println("old = " + toString(oldValue));
- log.println("new = " + toString(newValue));
- log.println("result = " + toString(resValue));
+ System.out.println("old = " + toString(oldValue));
+ System.out.println("new = " + toString(newValue));
+ System.out.println("result = " + toString(resValue));
} catch (com.sun.star.lang.IllegalArgumentException iae) {
}
@@ -514,7 +529,7 @@ public class CalcRTL extends ComplexTestCase {
Object value = null;
if (UnoRuntime.queryInterface(XCellRangeAddressable.class, obj) != null) {
- XCellRangeAddressable aCell = (XCellRangeAddressable) UnoRuntime.queryInterface(
+ XCellRangeAddressable aCell = UnoRuntime.queryInterface(
XCellRangeAddressable.class,
obj);
value = "Cell in Column " + aCell.getRangeAddress().StartColumn +
@@ -533,35 +548,54 @@ public class CalcRTL extends ComplexTestCase {
XShape insertedShape = null;
try {
- log.println("getting Drawpages");
+ System.out.println("getting Drawpages");
- XDrawPagesSupplier oDPS = (XDrawPagesSupplier) UnoRuntime.queryInterface(
+ XDrawPagesSupplier oDPS = UnoRuntime.queryInterface(
XDrawPagesSupplier.class,
xSheetDoc);
- XDrawPages oDP = (XDrawPages) oDPS.getDrawPages();
- XDrawPage firstDrawPage = (XDrawPage) UnoRuntime.queryInterface(
+ XDrawPages oDP = oDPS.getDrawPages();
+ XDrawPage firstDrawPage = UnoRuntime.queryInterface(
XDrawPage.class,
oDP.getByIndex(0));
- SOfficeFactory SOF = SOfficeFactory.getFactory(
- (XMultiServiceFactory) param.getMSF());
- XComponent xComp = (XComponent) UnoRuntime.queryInterface(
+ final XMultiServiceFactory xMsf = UnoRuntime.queryInterface(XMultiServiceFactory.class, connection.getComponentContext().getServiceManager());
+ SOfficeFactory SOF = SOfficeFactory.getFactory(xMsf);
+
+ // SOfficeFactory SOF = SOfficeFactory.getFactory(
+ // (XMultiServiceFactory) param.getMSF());
+ XComponent xComp = UnoRuntime.queryInterface(
XComponent.class, xSheetDoc);
insertedShape = SOF.createShape(xComp, 5000, 3500, 700, 500,
"Rectangle");
DrawTools.getShapes(firstDrawPage).add(insertedShape);
} catch (com.sun.star.lang.WrappedTargetException e) {
- log.println("Couldn't create instance");
- e.printStackTrace((PrintWriter) log);
+ System.out.println("Couldn't create instance");
+ e.printStackTrace();
return null;
} catch (com.sun.star.lang.IndexOutOfBoundsException e) {
- log.println("Couldn't create instance");
- e.printStackTrace((PrintWriter) log);
+ System.out.println("Couldn't create instance");
+ e.printStackTrace();
return null;
}
return insertedShape;
}
-} \ No newline at end of file
+
+
+
+
+ @BeforeClass public static void setUpConnection() throws Exception {
+ connection.setUp();
+ }
+
+ @AfterClass public static void tearDownConnection()
+ throws InterruptedException, com.sun.star.uno.Exception
+ {
+ connection.tearDown();
+ }
+
+ private static final OfficeConnection connection = new OfficeConnection();
+
+}
diff --git a/sc/qa/complex/sc/makefile.mk b/sc/qa/complex/sc/makefile.mk
index 097e6d0c5..e064f9d3b 100644
--- a/sc/qa/complex/sc/makefile.mk
+++ b/sc/qa/complex/sc/makefile.mk
@@ -25,33 +25,27 @@
#
#*************************************************************************
-PRJ = ..$/..$/..
-TARGET = CalcRTL
-PRJNAME = sc
-PACKAGE = complex$/sc
-
-# --- Settings -----------------------------------------------------
-.INCLUDE: settings.mk
-
-
-#----- compile .java files -----------------------------------------
+.IF "$(OOO_SUBSEQUENT_TESTS)" == ""
+nothing .PHONY:
+.ELSE
-JARFILES = ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar
-JAVAFILES = CalcRTL.java
-JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class)
-
-#----- make a jar from compiled files ------------------------------
-
-MAXLINELENGTH = 100000
-
-JARCLASSDIRS = $(PACKAGE)
-JARTARGET = $(TARGET).jar
-JARCOMPRESS = TRUE
+PRJ = ../../..
+PRJNAME = sc
+TARGET = qa_complex_sc
-# --- Targets ------------------------------------------------------
+.IF "$(OOO_JUNIT_JAR)" != ""
+PACKAGE = complex/sc
+JAVATESTFILES = \
+ CalcRTL.java
+JAVAFILES = $(JAVATESTFILES)
+JARFILES = OOoRunner.jar ridl.jar test.jar unoil.jar jurt.jar
+EXTRAJARFILES = $(OOO_JUNIT_JAR)
+.END
-.INCLUDE : target.mk
+.INCLUDE: settings.mk
+.INCLUDE: target.mk
+.INCLUDE: installationtest.mk
+ALLTAR : javatest
-run:
- +java -cp "$(CLASSPATH)" org.openoffice.Runner -TimeOut 0 -tb java_complex -o $(PACKAGE:s#$/#.#).$(JAVAFILES:b)
+.END
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
index 1c1cf3983..1c1cf3983 100644..100755
--- a/sc/source/core/data/documen2.cxx
+++ b/sc/source/core/data/documen2.cxx
diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index b6788ebae..ff8022681 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -28,6 +28,8 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sc.hxx"
+// INCLUDE ---------------------------------------------------------------
+
#include "scitems.hxx"
#include <svx/algitem.hxx>
#include <unotools/textsearch.hxx>
diff --git a/sc/source/core/tool/chartpos.cxx b/sc/source/core/tool/chartpos.cxx
index fec8c6998..56403e8a8 100644
--- a/sc/source/core/tool/chartpos.cxx
+++ b/sc/source/core/tool/chartpos.cxx
@@ -175,25 +175,9 @@ void ScChartPositioner::GlueState()
const BYTE nOccu = 1;
const BYTE nFree = 2;
const BYTE nGlue = 3;
-#ifdef WIN
- // we hate 16bit, don't we?
- BYTE huge* p;
- BYTE huge* pA = (BYTE huge*) SvMemAlloc( nCR );
- if ( nCR > (ULONG)((USHORT)~0) )
- { // in 32k Bloecken initialisieren
- ULONG j;
- for ( j=0; j<nCR; j+=0x8000 )
- {
- memset( pA+j, nHole, Min( (ULONG)0x8000, nCR-j ) );
- }
- }
- else
- memset( pA, nHole, nCR * sizeof(BYTE) );
-#else
BYTE* p;
BYTE* pA = new BYTE[ nCR ];
memset( pA, 0, nCR * sizeof(BYTE) );
-#endif
SCCOL nCol, nCol1, nCol2;
SCROW nRow, nRow1, nRow2;
@@ -285,11 +269,7 @@ void ScChartPositioner::GlueState()
eGlue = SC_CHARTGLUE_NONE;
}
-#ifdef WIN
- SvMemFree( pA );
-#else
delete [] pA;
-#endif
}
void ScChartPositioner::CheckColRowHeaders()
@@ -524,9 +504,6 @@ ScChartPositionMap::ScChartPositionMap( SCCOL nChartCols, SCROW nChartRows,
nRowCount( nChartRows )
{
DBG_ASSERT( nColCount && nRowCount, "ScChartPositionMap without dimension" );
-#ifdef WIN
-#error ScChartPositionMap not implemented for 16-bit dumdums
-#endif
ScAddress* pPos;
SCCOL nCol;
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 2249ff236..aefa84cbe 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -2967,10 +2967,6 @@ void ScInterpreter::ScMin( BOOL bTextAsZero )
PushDouble(nMin);
}
-#if defined(WIN) && defined(MSC)
-#pragma optimize("",off)
-#endif
-
void ScInterpreter::ScMax( BOOL bTextAsZero )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScMax" );
@@ -3091,10 +3087,6 @@ void ScInterpreter::ScMax( BOOL bTextAsZero )
else
PushDouble(nMax);
}
-#if defined(WIN) && defined(MSC)
-#pragma optimize("",on)
-#endif
-
double ScInterpreter::IterateParameters( ScIterFunc eFunc, BOOL bTextAsZero )
{
@@ -5780,10 +5772,6 @@ void ScInterpreter::ScVLookup()
CalculateLookup(FALSE);
}
-#if defined(WIN) && defined(MSC)
-#pragma optimize("",off)
-#endif
-
void ScInterpreter::ScSubTotal()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScSubTotal" );
@@ -5823,10 +5811,6 @@ void ScInterpreter::ScSubTotal()
PushDouble( nVal );
}
}
-#if defined(WIN) && defined(MSC)
-#pragma optimize("",on)
-#endif
-
ScDBQueryParamBase* ScInterpreter::GetDBParams( BOOL& rMissingField )
{
diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx
index 09b6408fa..88193b1ff 100644
--- a/sc/source/core/tool/interpr2.cxx
+++ b/sc/source/core/tool/interpr2.cxx
@@ -682,10 +682,6 @@ void ScInterpreter::ScNPV()
}
}
-#if defined(WIN) && defined(MSC)
-#pragma optimize("",off)
-#endif
-
void ScInterpreter::ScIRR()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScIRR" );
@@ -752,10 +748,6 @@ void ScInterpreter::ScIRR()
else
PushError( errNoConvergence);
}
-#if defined(WIN) && defined(MSC)
-#pragma optimize("",on)
-#endif
-
void ScInterpreter::ScMIRR()
{ // range_of_values ; rate_invest ; rate_reinvest
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index d248211fa..d248211fa 100644..100755
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
diff --git a/sc/source/filter/excel/impop.cxx b/sc/source/filter/excel/impop.cxx
index cea2a9dd1..b4483910f 100644
--- a/sc/source/filter/excel/impop.cxx
+++ b/sc/source/filter/excel/impop.cxx
@@ -87,7 +87,7 @@
#include "excimp8.hxx"
#include "excform.hxx"
-#if defined( WNT ) || defined( WIN )
+#if defined( WNT )
#include <math.h>
#else
#include <stdlib.h>
diff --git a/sc/source/filter/lotus/lotimpop.cxx b/sc/source/filter/lotus/lotimpop.cxx
index 1b8b9d964..5a13a0a74 100644
--- a/sc/source/filter/lotus/lotimpop.cxx
+++ b/sc/source/filter/lotus/lotimpop.cxx
@@ -48,7 +48,7 @@
#include "lotattr.hxx"
-static NAMESPACE_VOS( OMutex ) aLotImpSemaphore;
+static vos:: OMutex aLotImpSemaphore;
ImportLotus::ImportLotus( SvStream& aStream, ScDocument* pDoc, CharSet eQ ) :
diff --git a/sc/source/filter/lotus/op.cxx b/sc/source/filter/lotus/op.cxx
index b51774f80..a3d6fd5e3 100644
--- a/sc/source/filter/lotus/op.cxx
+++ b/sc/source/filter/lotus/op.cxx
@@ -73,7 +73,7 @@
#include <string.h>
#include <math.h>
#include <ctype.h>
-#if defined( MAC ) || defined( ICC )
+#if defined( ICC )
#include <stdlib.h>
#endif
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 2a832cdec..0f8fb4050 100644..100755
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -757,7 +757,11 @@ ScTextWnd::ScTextWnd( Window* pParent )
aTextFont.SetColor (aTxtColor);
aTextFont.SetWeight ( WEIGHT_NORMAL );
- SetSizePixel ( Size(1,TBX_WINDOW_HEIGHT) );
+ Size aSize(1,TBX_WINDOW_HEIGHT);
+ Size aMinEditSize( Edit::GetMinimumEditSize() );
+ if( aMinEditSize.Height() > aSize.Height() )
+ aSize.Height() = aMinEditSize.Height();
+ SetSizePixel ( aSize );
SetBackground ( aBgColor );
SetLineColor ( COL_BLACK );
SetMapMode ( MAP_TWIP );
diff --git a/sc/source/ui/dbgui/scuiasciiopt.cxx b/sc/source/ui/dbgui/scuiasciiopt.cxx
index 76ed61179..7414e672f 100644
--- a/sc/source/ui/dbgui/scuiasciiopt.cxx
+++ b/sc/source/ui/dbgui/scuiasciiopt.cxx
@@ -46,13 +46,8 @@
#include <com/sun/star/uno/Sequence.hxx>
#include "miscuno.hxx"
-
//! TODO make dynamic
-#ifdef WIN
-const SCSIZE ASCIIDLG_MAXROWS = 10000;
-#else
const SCSIZE ASCIIDLG_MAXROWS = MAXROWCOUNT;
-#endif
using namespace rtl;
diff --git a/sc/source/ui/drawfunc/futext2.cxx b/sc/source/ui/drawfunc/futext2.cxx
index 84763a922..9a28e7fb2 100644
--- a/sc/source/ui/drawfunc/futext2.cxx
+++ b/sc/source/ui/drawfunc/futext2.cxx
@@ -129,10 +129,6 @@
//#define _GRAPH_HXX
#define _SOUND_HXX
-#if defined WIN
-#define _MENUBTN_HXX
-#endif
-
//svtools
#define _SCRWIN_HXX
#define _RULER_HXX
diff --git a/sc/source/ui/unoobj/appluno.cxx b/sc/source/ui/unoobj/appluno.cxx
index d3a1b8879..778a64bc0 100644
--- a/sc/source/ui/unoobj/appluno.cxx
+++ b/sc/source/ui/unoobj/appluno.cxx
@@ -184,21 +184,6 @@ SC_SIMPLE_SERVICE_INFO( ScSpreadsheetSettings, "ScSpreadsheetSettings", SCSPREAD
//------------------------------------------------------------------------
-static void lcl_WriteInfo( registry::XRegistryKey* pRegistryKey,
- const rtl::OUString& rImplementationName,
- const uno::Sequence< rtl::OUString >& rServices )
- throw( registry::InvalidRegistryException )
-{
- rtl::OUString aImpl(rtl::OUString::createFromAscii( "/" ));
- aImpl += rImplementationName;
- aImpl += rtl::OUString::createFromAscii( "/UNO/SERVICES" );
- uno::Reference<registry::XRegistryKey> xNewKey(pRegistryKey->createKey(aImpl));
-
- const rtl::OUString* pArray = rServices.getConstArray();
- for( sal_Int32 i = 0; i < rServices.getLength(); i++ )
- xNewKey->createKey( pArray[i]);
-}
-
extern "C" {
SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
@@ -207,111 +192,6 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
-SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo(
- void * /* pServiceManager */, registry::XRegistryKey * pRegistryKey )
-{
- if (pRegistryKey)
- {
- try
- {
- lcl_WriteInfo( pRegistryKey,
- ScSpreadsheetSettings::getImplementationName_Static(),
- ScSpreadsheetSettings::getSupportedServiceNames_Static() );
-
- lcl_WriteInfo( pRegistryKey,
- ScRecentFunctionsObj::getImplementationName_Static(),
- ScRecentFunctionsObj::getSupportedServiceNames_Static() );
-
- lcl_WriteInfo( pRegistryKey,
- ScFunctionListObj::getImplementationName_Static(),
- ScFunctionListObj::getSupportedServiceNames_Static() );
-
- lcl_WriteInfo( pRegistryKey,
- ScAutoFormatsObj::getImplementationName_Static(),
- ScAutoFormatsObj::getSupportedServiceNames_Static() );
-
- lcl_WriteInfo( pRegistryKey,
- ScFunctionAccess::getImplementationName_Static(),
- ScFunctionAccess::getSupportedServiceNames_Static() );
-
- lcl_WriteInfo( pRegistryKey,
- ScFilterOptionsObj::getImplementationName_Static(),
- ScFilterOptionsObj::getSupportedServiceNames_Static() );
-
- lcl_WriteInfo( pRegistryKey,
- ScXMLImport_getImplementationName(),
- ScXMLImport_getSupportedServiceNames() );
-
- lcl_WriteInfo( pRegistryKey,
- ScXMLImport_Meta_getImplementationName(),
- ScXMLImport_Meta_getSupportedServiceNames() );
-
- lcl_WriteInfo( pRegistryKey,
- ScXMLImport_Styles_getImplementationName(),
- ScXMLImport_Styles_getSupportedServiceNames() );
-
- lcl_WriteInfo( pRegistryKey,
- ScXMLImport_Content_getImplementationName(),
- ScXMLImport_Content_getSupportedServiceNames() );
-
- lcl_WriteInfo( pRegistryKey,
- ScXMLImport_Settings_getImplementationName(),
- ScXMLImport_Settings_getSupportedServiceNames() );
-
- lcl_WriteInfo( pRegistryKey,
- ScXMLOOoExport_getImplementationName(),
- ScXMLOOoExport_getSupportedServiceNames() );
-
- lcl_WriteInfo( pRegistryKey,
- ScXMLOOoExport_Meta_getImplementationName(),
- ScXMLOOoExport_Meta_getSupportedServiceNames() );
-
- lcl_WriteInfo( pRegistryKey,
- ScXMLOOoExport_Styles_getImplementationName(),
- ScXMLOOoExport_Styles_getSupportedServiceNames() );
-
- lcl_WriteInfo( pRegistryKey,
- ScXMLOOoExport_Content_getImplementationName(),
- ScXMLOOoExport_Content_getSupportedServiceNames() );
-
- lcl_WriteInfo( pRegistryKey,
- ScXMLOOoExport_Settings_getImplementationName(),
- ScXMLOOoExport_Settings_getSupportedServiceNames() );
-
- lcl_WriteInfo( pRegistryKey,
- ScXMLOasisExport_getImplementationName(),
- ScXMLOasisExport_getSupportedServiceNames() );
-
- lcl_WriteInfo( pRegistryKey,
- ScXMLOasisExport_Meta_getImplementationName(),
- ScXMLOasisExport_Meta_getSupportedServiceNames() );
-
- lcl_WriteInfo( pRegistryKey,
- ScXMLOasisExport_Styles_getImplementationName(),
- ScXMLOasisExport_Styles_getSupportedServiceNames() );
-
- lcl_WriteInfo( pRegistryKey,
- ScXMLOasisExport_Content_getImplementationName(),
- ScXMLOasisExport_Content_getSupportedServiceNames() );
-
- lcl_WriteInfo( pRegistryKey,
- ScXMLOasisExport_Settings_getImplementationName(),
- ScXMLOasisExport_Settings_getSupportedServiceNames() );
-
- lcl_WriteInfo( pRegistryKey,
- ScDocument_getImplementationName(),
- ScDocument_getSupportedServiceNames() );
-
- return sal_True;
- }
- catch (registry::InvalidRegistryException&)
- {
- OSL_ENSURE( sal_False, "### InvalidRegistryException!" );
- }
- }
- return sal_False;
-}
-
SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * /* pRegistryKey */ )
{
diff --git a/sc/source/ui/unoobj/detreg.cxx b/sc/source/ui/unoobj/detreg.cxx
index b8399ae20..5be1e4305 100644
--- a/sc/source/ui/unoobj/detreg.cxx
+++ b/sc/source/ui/unoobj/detreg.cxx
@@ -49,27 +49,6 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
*ppEnvironmentTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ;
}
-SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( void* /* pServiceManager */ ,
- void* pRegistryKey )
-{
- Reference< ::registry::XRegistryKey >
- xKey( reinterpret_cast< ::registry::XRegistryKey* >( pRegistryKey ) ) ;
-
- OUString aDelimiter( RTL_CONSTASCII_USTRINGPARAM("/") );
- OUString aUnoServices( RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES") );
-
- // Eigentliche Implementierung und ihre Services registrieren
- sal_Int32 i;
- Reference< ::registry::XRegistryKey > xNewKey(xKey->createKey( aDelimiter + ScFilterDetect::impl_getStaticImplementationName() +
- aUnoServices ));
-
- Sequence< OUString > aServices(ScFilterDetect::impl_getStaticSupportedServiceNames());
- for(i = 0; i < aServices.getLength(); i++ )
- xNewKey->createKey( aServices.getConstArray()[i] );
-
- return sal_True;
-}
-
SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplementationName,
void* pServiceManager,
void* /* pRegistryKey */ )
diff --git a/sc/source/ui/vba/service.cxx b/sc/source/ui/vba/service.cxx
index b21b55f6a..53c69e511 100644
--- a/sc/source/ui/vba/service.cxx
+++ b/sc/source/ui/vba/service.cxx
@@ -84,41 +84,6 @@ extern "C"
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
- SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo(
- lang::XMultiServiceFactory * pServiceManager, registry::XRegistryKey * pRegistryKey )
- {
- OSL_TRACE("In component_writeInfo");
-#if 0
- // Component registration
- if ( component_writeInfoHelper( pServiceManager, pRegistryKey,
- range::serviceDecl, workbook::serviceDecl, worksheet::serviceDecl, globals::serviceDecl, window::serviceDecl, hyperlink::serviceDecl, application::serviceDecl ) && component_writeInfoHelper( pServiceManager, pRegistryKey, vbaeventshelper::serviceDecl ) )
- {
- // Singleton registration
- try
- {
- registry::XRegistryKey * pKey =
- reinterpret_cast< registry::XRegistryKey * >(pRegistryKey);
-
- Reference< registry::XRegistryKey >xKey = pKey->createKey(
- rtl::OUString::createFromAscii( ("ooo.vba.Globals/UNO/SINGLETONS/ooo.vba.theGlobals") ) );
- xKey->setStringValue( ::rtl::OUString::createFromAscii(
- ("ooo.vba.Globals") ) );
- return sal_True;
- }
- catch( uno::Exception& /*e*/ )
- {
- //recomp & friends will detect false returned and fail
- }
- }
- return sal_False;
-#else
- // Component registration
- return component_writeInfoHelper( pServiceManager, pRegistryKey,
- range::serviceDecl, workbook::serviceDecl, worksheet::serviceDecl, globals::serviceDecl, window::serviceDecl, hyperlink::serviceDecl, application::serviceDecl ) && component_writeInfoHelper( pServiceManager, pRegistryKey, vbaeventshelper::serviceDecl, textframe::serviceDecl );
-#endif
-
- }
-
SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
const sal_Char * pImplName, lang::XMultiServiceFactory * pServiceManager,
registry::XRegistryKey * pRegistryKey )
diff --git a/sc/source/ui/view/prevwsh2.cxx b/sc/source/ui/view/prevwsh2.cxx
index 96444ae69..1853734a8 100644
--- a/sc/source/ui/view/prevwsh2.cxx
+++ b/sc/source/ui/view/prevwsh2.cxx
@@ -126,10 +126,6 @@
//#define _GRAPH_HXX
#define _SOUND_HXX
-#if defined WIN
-#define _MENUBTN_HXX
-#endif
-
//svtools
#define _SCRWIN_HXX
#define _RULER_HXX
diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx
index 8fc5acde8..0ecd90e82 100644
--- a/sc/source/ui/view/viewfun3.cxx
+++ b/sc/source/ui/view/viewfun3.cxx
@@ -34,10 +34,6 @@
#define _SV_NOXSOUND
-#ifdef WIN
- #define _MENUBTN_HXX
-#endif
-
#define _BASE_DLGS_HXX
#define _BIGINT_HXX
#define _CACHESTR_HXX
diff --git a/sc/util/makefile.mk b/sc/util/makefile.mk
index 980d271ae..09578f6ef 100644
--- a/sc/util/makefile.mk
+++ b/sc/util/makefile.mk
@@ -342,3 +342,23 @@ ALLTAR: $(MISC)$/linkinc.ls $(COMP)
build_extn : $(SHL9TARGETN)
$(PERL) createExtPackage.pl $(COMMONBIN)$/vbaapi.oxt $(SOLARBINDIR)$/oovbaapi.rdb $(LIBCOMPNAME)
+
+ALLTAR : $(MISC)/sc.component $(MISC)/scd.component $(MISC)/vbaobj.component
+
+$(MISC)/sc.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ sc.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt sc.component
+
+$(MISC)/scd.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ scd.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL2TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt scd.component
+
+$(MISC)/vbaobj.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ vbaobj.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL9TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt vbaobj.component
diff --git a/sc/util/sc.component b/sc/util/sc.component
new file mode 100644
index 000000000..abd05aa57
--- /dev/null
+++ b/sc/util/sc.component
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.comp.Calc.FilterOptionsDialog">
+ <service name="com.sun.star.ui.dialogs.FilterOptionsDialog"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Calc.SpreadsheetDocument">
+ <service name="com.sun.star.sheet.SpreadsheetDocument"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Calc.XMLContentExporter">
+ <service name="com.sun.star.comp.Calc.XMLContentExporter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Calc.XMLExporter">
+ <service name="com.sun.star.comp.Calc.XMLExporter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Calc.XMLMetaExporter">
+ <service name="com.sun.star.comp.Calc.XMLMetaExporter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Calc.XMLOasisContentExporter">
+ <service name="com.sun.star.comp.Calc.XMLOasisContentExporter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Calc.XMLOasisContentImporter">
+ <service name="com.sun.star.comp.Calc.XMLOasisContentImporter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Calc.XMLOasisExporter">
+ <service name="com.sun.star.comp.Calc.XMLOasisExporter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Calc.XMLOasisImporter">
+ <service name="com.sun.star.comp.Calc.XMLOasisImporter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Calc.XMLOasisMetaExporter">
+ <service name="com.sun.star.comp.Calc.XMLOasisMetaExporter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Calc.XMLOasisMetaImporter">
+ <service name="com.sun.star.comp.Calc.XMLOasisMetaImporter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Calc.XMLOasisSettingsExporter">
+ <service name="com.sun.star.comp.Calc.XMLOasisSettingsExporter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Calc.XMLOasisSettingsImporter">
+ <service name="com.sun.star.comp.Calc.XMLOasisSettingsImporter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Calc.XMLOasisStylesExporter">
+ <service name="com.sun.star.comp.Calc.XMLOasisStylesExporter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Calc.XMLOasisStylesImporter">
+ <service name="com.sun.star.comp.Calc.XMLOasisStylesImporter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Calc.XMLSettingsExporter">
+ <service name="com.sun.star.comp.Calc.XMLSettingsExporter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Calc.XMLStylesExporter">
+ <service name="com.sun.star.comp.Calc.XMLStylesExporter"/>
+ </implementation>
+ <implementation name="stardiv.StarCalc.ScAutoFormatsObj">
+ <service name="com.sun.star.sheet.TableAutoFormats"/>
+ </implementation>
+ <implementation name="stardiv.StarCalc.ScFunctionAccess">
+ <service name="com.sun.star.sheet.FunctionAccess"/>
+ </implementation>
+ <implementation name="stardiv.StarCalc.ScFunctionListObj">
+ <service name="com.sun.star.sheet.FunctionDescriptions"/>
+ </implementation>
+ <implementation name="stardiv.StarCalc.ScRecentFunctionsObj">
+ <service name="com.sun.star.sheet.RecentFunctions"/>
+ </implementation>
+ <implementation name="stardiv.StarCalc.ScSpreadsheetSettings">
+ <service name="com.sun.star.sheet.GlobalSheetSettings"/>
+ </implementation>
+</component>
diff --git a/sc/util/scd.component b/sc/util/scd.component
new file mode 100644
index 000000000..df2e2f77e
--- /dev/null
+++ b/sc/util/scd.component
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.comp.calc.FormatDetector">
+ <service name="com.sun.star.frame.ExtendedTypeDetection"/>
+ </implementation>
+</component>
diff --git a/sc/util/vbaobj.component b/sc/util/vbaobj.component
new file mode 100644
index 000000000..52ad69182
--- /dev/null
+++ b/sc/util/vbaobj.component
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="ScVbaApplication">
+ <service name="ooo.vba.excel.Application"/>
+ </implementation>
+ <implementation name="ScVbaEventsHelper">
+ <service name="com.sun.star.script.vba.VBASpreadsheetEventProcessor"/>
+ </implementation>
+ <implementation name="ScVbaGlobals">
+ <service name="ooo.vba.excel.Globals"/>
+ </implementation>
+ <implementation name="ScVbaHyperlink">
+ <service name="ooo.vba.excel.Hyperlink"/>
+ </implementation>
+ <implementation name="ScVbaTextFrame">
+ <service name="ooo.vba.excel.TextFrame"/>
+ </implementation>
+ <implementation name="ScVbaWindow">
+ <service name="ooo.vba.excel.Window"/>
+ </implementation>
+ <implementation name="ScVbaWorkbook">
+ <service name="ooo.vba.excel.Workbook"/>
+ </implementation>
+ <implementation name="ScVbaWorksheet">
+ <service name="ooo.vba.excel.Worksheet"/>
+ </implementation>
+ <implementation name="SvVbaRange">
+ <service name="ooo.vba.excel.Range"/>
+ </implementation>
+</component>
diff --git a/scaddins/prj/d.lst b/scaddins/prj/d.lst
index f31644cf5..c1463ef39 100644
--- a/scaddins/prj/d.lst
+++ b/scaddins/prj/d.lst
@@ -7,3 +7,5 @@ mkdir: %COMMON_DEST%\bin%_EXT%\hid
..\%__SRC%\lib\*.sl %_DEST%\lib%_EXT%\*.sl
..\%__SRC%\bin\*.bin %_DEST%\bin%_EXT%\*.bin
..\%__SRC%\bin\*.res %_DEST%\bin%_EXT%\*.res
+..\%__SRC%\misc\analysis.component %_DEST%\xml%_EXT%\analysis.component
+..\%__SRC%\misc\date.component %_DEST%\xml%_EXT%\date.component
diff --git a/scaddins/source/analysis/analysis.component b/scaddins/source/analysis/analysis.component
new file mode 100644
index 000000000..af4d13fa4
--- /dev/null
+++ b/scaddins/source/analysis/analysis.component
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.sheet.addin.AnalysisImpl">
+ <service name="com.sun.star.sheet.AddIn"/>
+ <service name="com.sun.star.sheet.addin.Analysis"/>
+ </implementation>
+</component>
diff --git a/scaddins/source/analysis/analysis.cxx b/scaddins/source/analysis/analysis.cxx
index 78de6abe0..91565a627 100644
--- a/scaddins/source/analysis/analysis.cxx
+++ b/scaddins/source/analysis/analysis.cxx
@@ -59,37 +59,6 @@ void SAL_CALL component_getImplementationEnvironment( const sal_Char** ppEnvType
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
-
-sal_Bool SAL_CALL component_writeInfo( void* /*pServiceManager*/, registry::XRegistryKey* pRegistryKey )
-{
- if( pRegistryKey )
- {
- try
- {
- STRING aImpl = STRFROMASCII( "/" );
- aImpl += AnalysisAddIn::getImplementationName_Static();
- aImpl += STRFROMASCII( "/UNO/SERVICES" );
-
- REF( registry::XRegistryKey ) xNewKey(
- reinterpret_cast< registry::XRegistryKey* >( pRegistryKey )->createKey( aImpl ) );
-
- SEQ( STRING ) aSequ = AnalysisAddIn::getSupportedServiceNames_Static();
- const STRING* pArray = aSequ.getConstArray();
-
- for( sal_Int32 i = 0 ; i < aSequ.getLength() ; i++ )
- xNewKey->createKey( pArray[ i ] );
-
- return sal_True;
- }
- catch( registry::InvalidRegistryException& )
- {
- OSL_ENSURE( sal_False, "### InvalidRegistryException!" );
- }
- }
- return sal_False;
-}
-
-
void* SAL_CALL component_getFactory( const sal_Char* pImplName, void* pServiceManager, void* /*pRegistryKey*/ )
{
void* pRet = 0;
diff --git a/scaddins/source/analysis/makefile.mk b/scaddins/source/analysis/makefile.mk
index a23f9886b..774e9506b 100644
--- a/scaddins/source/analysis/makefile.mk
+++ b/scaddins/source/analysis/makefile.mk
@@ -133,3 +133,11 @@ $(BIN)$/analysisadd.rdb: $(ALLIDLFILES)
touch $@
+
+ALLTAR : $(MISC)/analysis.component
+
+$(MISC)/analysis.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ analysis.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt analysis.component
diff --git a/scaddins/source/datefunc/date.component b/scaddins/source/datefunc/date.component
new file mode 100644
index 000000000..47e73d891
--- /dev/null
+++ b/scaddins/source/datefunc/date.component
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.sheet.addin.DateFunctionsImpl">
+ <service name="com.sun.star.sheet.AddIn"/>
+ <service name="com.sun.star.sheet.addin.DateFunctions"/>
+ </implementation>
+</component>
diff --git a/scaddins/source/datefunc/datefunc.cxx b/scaddins/source/datefunc/datefunc.cxx
index 9d2b235e8..21f2d3eef 100644
--- a/scaddins/source/datefunc/datefunc.cxx
+++ b/scaddins/source/datefunc/datefunc.cxx
@@ -244,35 +244,6 @@ void SAL_CALL component_getImplementationEnvironment(
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
-sal_Bool SAL_CALL component_writeInfo(
- void * /*pServiceManager*/, registry::XRegistryKey * pRegistryKey )
-{
- if (pRegistryKey)
- {
- try
- {
- OUString aImpl = OUString::createFromAscii( "/" );
- aImpl += ScaDateAddIn::getImplementationName_Static();
- aImpl += OUString::createFromAscii( "/UNO/SERVICES" );
-
- uno::Reference< registry::XRegistryKey > xNewKey(
- reinterpret_cast< registry::XRegistryKey* >( pRegistryKey )->createKey( aImpl ) );
-
- uno::Sequence< OUString > aSequ = ScaDateAddIn::getSupportedServiceNames_Static();
- const OUString * pArray = aSequ.getConstArray();
- for( sal_Int32 i = 0; i < aSequ.getLength(); i++ )
- xNewKey->createKey( pArray[i] );
-
- return sal_True;
- }
- catch (registry::InvalidRegistryException&)
- {
- OSL_ENSURE( sal_False, "### InvalidRegistryException!" );
- }
- }
- return sal_False;
-}
-
void * SAL_CALL component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ )
{
diff --git a/scaddins/source/datefunc/datefunc.def b/scaddins/source/datefunc/datefunc.def
index cc1b3562a..17573d6f5 100644
--- a/scaddins/source/datefunc/datefunc.def
+++ b/scaddins/source/datefunc/datefunc.def
@@ -3,5 +3,4 @@ DESCRIPTION 'StarView 3.00 Uno BE Reflection data 551 '
HEAPSIZE 0
EXPORTS
component_getImplementationEnvironment
-component_writeInfo
component_getFactory
diff --git a/scaddins/source/datefunc/makefile.mk b/scaddins/source/datefunc/makefile.mk
index 8a2805d76..afb221bd3 100644
--- a/scaddins/source/datefunc/makefile.mk
+++ b/scaddins/source/datefunc/makefile.mk
@@ -119,3 +119,11 @@ $(BIN)$/dateadd.rdb: $(ALLIDLFILES)
touch $@
+
+ALLTAR : $(MISC)/date.component
+
+$(MISC)/date.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ date.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt date.component
diff --git a/sccomp/prj/d.lst b/sccomp/prj/d.lst
index f31644cf5..2af1e70a9 100644
--- a/sccomp/prj/d.lst
+++ b/sccomp/prj/d.lst
@@ -7,3 +7,4 @@ mkdir: %COMMON_DEST%\bin%_EXT%\hid
..\%__SRC%\lib\*.sl %_DEST%\lib%_EXT%\*.sl
..\%__SRC%\bin\*.bin %_DEST%\bin%_EXT%\*.bin
..\%__SRC%\bin\*.res %_DEST%\bin%_EXT%\*.res
+..\%__SRC%\misc\solver.component %_DEST%\xml%_EXT%\solver.component
diff --git a/sccomp/source/solver/makefile.mk b/sccomp/source/solver/makefile.mk
index 6b25f60c8..b1c65e88c 100644
--- a/sccomp/source/solver/makefile.mk
+++ b/sccomp/source/solver/makefile.mk
@@ -75,3 +75,11 @@ RESLIB1SRSFILES=$(RESLIB1LIST)
.INCLUDE : target.mk
+
+ALLTAR : $(MISC)/solver.component
+
+$(MISC)/solver.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ solver.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt solver.component
diff --git a/sccomp/source/solver/solver.component b/sccomp/source/solver/solver.component
new file mode 100644
index 000000000..de9cb3bd5
--- /dev/null
+++ b/sccomp/source/solver/solver.component
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.comp.Calc.Solver">
+ <service name="com.sun.star.sheet.Solver"/>
+ </implementation>
+</component>
diff --git a/sccomp/source/solver/solver.cxx b/sccomp/source/solver/solver.cxx
index c36cb791a..2d9176d20 100644
--- a/sccomp/source/solver/solver.cxx
+++ b/sccomp/source/solver/solver.cxx
@@ -602,34 +602,6 @@ extern "C"
}
// -------------------------------------------------------------------------
-
- SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( void* /*pServiceManager*/, void* pRegistryKey )
- {
- if (pRegistryKey)
- {
- try
- {
- uno::Reference<registry::XRegistryKey> xNewKey;
- sal_Int32 nPos;
-
- xNewKey = reinterpret_cast< registry::XRegistryKey * >( pRegistryKey )->createKey( SolverComponent_getImplementationName() );
- xNewKey = xNewKey->createKey( OUString::createFromAscii( "/UNO/SERVICES" ) );
- const uno::Sequence< OUString > & rSNL1 = SolverComponent_getSupportedServiceNames();
- const OUString * pArray1 = rSNL1.getConstArray();
- for ( nPos = rSNL1.getLength(); nPos--; )
- xNewKey->createKey( pArray1[nPos] );
-
- return sal_True;
- }
- catch (registry::InvalidRegistryException &)
- {
- OSL_ENSURE( sal_False, "### InvalidRegistryException!" );
- }
- }
- return sal_False;
- }
-
- // -------------------------------------------------------------------------
SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ )
{