From ed5640d8b587fbcfed7dd7967f3de04b37a76f26 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 11:06:44 +0200 Subject: Adding upstream version 4:7.4.7. Signed-off-by: Daniel Baumann --- .../java/ifc/drawing/_AreaShapeDescriptor.java | 109 +++++++++++ .../java/ifc/drawing/_ConnectorProperties.java | 39 ++++ .../tests/java/ifc/drawing/_ConnectorShape.java | 70 +++++++ .../ifc/drawing/_ConnectorShapeDescriptor.java | 35 ++++ .../ifc/drawing/_DimensioningShapeDescriptor.java | 39 ++++ .../tests/java/ifc/drawing/_DrawingDocument.java | 36 ++++ .../java/ifc/drawing/_DrawingDocumentDrawView.java | 172 +++++++++++++++++ qadevOOo/tests/java/ifc/drawing/_EllipseShape.java | 37 ++++ .../java/ifc/drawing/_EllipseShapeDescriptor.java | 27 +++ .../tests/java/ifc/drawing/_FillProperties.java | 213 +++++++++++++++++++++ .../tests/java/ifc/drawing/_GenericDrawPage.java | 87 +++++++++ .../java/ifc/drawing/_GenericDrawingDocument.java | 25 +++ .../java/ifc/drawing/_GraphicObjectShape.java | 157 +++++++++++++++ .../ifc/drawing/_GraphicObjectShapeDescriptor.java | 65 +++++++ qadevOOo/tests/java/ifc/drawing/_Layer.java | 38 ++++ .../tests/java/ifc/drawing/_LineProperties.java | 77 ++++++++ .../java/ifc/drawing/_LineShapeDescriptor.java | 137 +++++++++++++ .../tests/java/ifc/drawing/_MeasureProperties.java | 51 +++++ qadevOOo/tests/java/ifc/drawing/_MeasureShape.java | 37 ++++ .../ifc/drawing/_PolyPolygonBezierDescriptor.java | 38 ++++ .../java/ifc/drawing/_PolyPolygonDescriptor.java | 38 ++++ .../java/ifc/drawing/_RotationDescriptor.java | 94 +++++++++ .../tests/java/ifc/drawing/_ShadowDescriptor.java | 35 ++++ .../tests/java/ifc/drawing/_ShadowProperties.java | 39 ++++ qadevOOo/tests/java/ifc/drawing/_Shape.java | 151 +++++++++++++++ .../tests/java/ifc/drawing/_ShapeDescriptor.java | 134 +++++++++++++ qadevOOo/tests/java/ifc/drawing/_Text.java | 61 ++++++ .../tests/java/ifc/drawing/_TextProperties.java | 58 ++++++ qadevOOo/tests/java/ifc/drawing/_TextShape.java | 35 ++++ .../java/ifc/drawing/_TextShapeDescriptor.java | 27 +++ .../tests/java/ifc/drawing/_XConnectorShape.java | 139 ++++++++++++++ .../tests/java/ifc/drawing/_XControlShape.java | 96 ++++++++++ .../java/ifc/drawing/_XDrawPageDuplicator.java | 81 ++++++++ .../tests/java/ifc/drawing/_XDrawPageSupplier.java | 35 ++++ qadevOOo/tests/java/ifc/drawing/_XDrawPages.java | 85 ++++++++ .../java/ifc/drawing/_XDrawPagesSupplier.java | 55 ++++++ qadevOOo/tests/java/ifc/drawing/_XDrawView.java | 104 ++++++++++ .../java/ifc/drawing/_XGluePointsSupplier.java | 55 ++++++ .../tests/java/ifc/drawing/_XLayerManager.java | 157 +++++++++++++++ .../tests/java/ifc/drawing/_XLayerSupplier.java | 60 ++++++ .../tests/java/ifc/drawing/_XMasterPageTarget.java | 99 ++++++++++ .../java/ifc/drawing/_XMasterPagesSupplier.java | 54 ++++++ qadevOOo/tests/java/ifc/drawing/_XShape.java | 186 ++++++++++++++++++ qadevOOo/tests/java/ifc/drawing/_XShapeBinder.java | 100 ++++++++++ .../tests/java/ifc/drawing/_XShapeCombiner.java | 101 ++++++++++ .../tests/java/ifc/drawing/_XShapeDescriptor.java | 87 +++++++++ qadevOOo/tests/java/ifc/drawing/_XShapeGroup.java | 61 ++++++ .../tests/java/ifc/drawing/_XShapeGrouper.java | 101 ++++++++++ qadevOOo/tests/java/ifc/drawing/_XShapes.java | 100 ++++++++++ 49 files changed, 3917 insertions(+) create mode 100644 qadevOOo/tests/java/ifc/drawing/_AreaShapeDescriptor.java create mode 100644 qadevOOo/tests/java/ifc/drawing/_ConnectorProperties.java create mode 100644 qadevOOo/tests/java/ifc/drawing/_ConnectorShape.java create mode 100644 qadevOOo/tests/java/ifc/drawing/_ConnectorShapeDescriptor.java create mode 100644 qadevOOo/tests/java/ifc/drawing/_DimensioningShapeDescriptor.java create mode 100644 qadevOOo/tests/java/ifc/drawing/_DrawingDocument.java create mode 100644 qadevOOo/tests/java/ifc/drawing/_DrawingDocumentDrawView.java create mode 100644 qadevOOo/tests/java/ifc/drawing/_EllipseShape.java create mode 100644 qadevOOo/tests/java/ifc/drawing/_EllipseShapeDescriptor.java create mode 100644 qadevOOo/tests/java/ifc/drawing/_FillProperties.java create mode 100644 qadevOOo/tests/java/ifc/drawing/_GenericDrawPage.java create mode 100644 qadevOOo/tests/java/ifc/drawing/_GenericDrawingDocument.java create mode 100644 qadevOOo/tests/java/ifc/drawing/_GraphicObjectShape.java create mode 100644 qadevOOo/tests/java/ifc/drawing/_GraphicObjectShapeDescriptor.java create mode 100644 qadevOOo/tests/java/ifc/drawing/_Layer.java create mode 100644 qadevOOo/tests/java/ifc/drawing/_LineProperties.java create mode 100644 qadevOOo/tests/java/ifc/drawing/_LineShapeDescriptor.java create mode 100644 qadevOOo/tests/java/ifc/drawing/_MeasureProperties.java create mode 100644 qadevOOo/tests/java/ifc/drawing/_MeasureShape.java create mode 100644 qadevOOo/tests/java/ifc/drawing/_PolyPolygonBezierDescriptor.java create mode 100644 qadevOOo/tests/java/ifc/drawing/_PolyPolygonDescriptor.java create mode 100644 qadevOOo/tests/java/ifc/drawing/_RotationDescriptor.java create mode 100644 qadevOOo/tests/java/ifc/drawing/_ShadowDescriptor.java create mode 100644 qadevOOo/tests/java/ifc/drawing/_ShadowProperties.java create mode 100644 qadevOOo/tests/java/ifc/drawing/_Shape.java create mode 100644 qadevOOo/tests/java/ifc/drawing/_ShapeDescriptor.java create mode 100644 qadevOOo/tests/java/ifc/drawing/_Text.java create mode 100644 qadevOOo/tests/java/ifc/drawing/_TextProperties.java create mode 100644 qadevOOo/tests/java/ifc/drawing/_TextShape.java create mode 100644 qadevOOo/tests/java/ifc/drawing/_TextShapeDescriptor.java create mode 100644 qadevOOo/tests/java/ifc/drawing/_XConnectorShape.java create mode 100644 qadevOOo/tests/java/ifc/drawing/_XControlShape.java create mode 100644 qadevOOo/tests/java/ifc/drawing/_XDrawPageDuplicator.java create mode 100644 qadevOOo/tests/java/ifc/drawing/_XDrawPageSupplier.java create mode 100644 qadevOOo/tests/java/ifc/drawing/_XDrawPages.java create mode 100644 qadevOOo/tests/java/ifc/drawing/_XDrawPagesSupplier.java create mode 100644 qadevOOo/tests/java/ifc/drawing/_XDrawView.java create mode 100644 qadevOOo/tests/java/ifc/drawing/_XGluePointsSupplier.java create mode 100644 qadevOOo/tests/java/ifc/drawing/_XLayerManager.java create mode 100644 qadevOOo/tests/java/ifc/drawing/_XLayerSupplier.java create mode 100644 qadevOOo/tests/java/ifc/drawing/_XMasterPageTarget.java create mode 100644 qadevOOo/tests/java/ifc/drawing/_XMasterPagesSupplier.java create mode 100644 qadevOOo/tests/java/ifc/drawing/_XShape.java create mode 100644 qadevOOo/tests/java/ifc/drawing/_XShapeBinder.java create mode 100644 qadevOOo/tests/java/ifc/drawing/_XShapeCombiner.java create mode 100644 qadevOOo/tests/java/ifc/drawing/_XShapeDescriptor.java create mode 100644 qadevOOo/tests/java/ifc/drawing/_XShapeGroup.java create mode 100644 qadevOOo/tests/java/ifc/drawing/_XShapeGrouper.java create mode 100644 qadevOOo/tests/java/ifc/drawing/_XShapes.java (limited to 'qadevOOo/tests/java/ifc/drawing') diff --git a/qadevOOo/tests/java/ifc/drawing/_AreaShapeDescriptor.java b/qadevOOo/tests/java/ifc/drawing/_AreaShapeDescriptor.java new file mode 100644 index 000000000..1bee62098 --- /dev/null +++ b/qadevOOo/tests/java/ifc/drawing/_AreaShapeDescriptor.java @@ -0,0 +1,109 @@ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +package ifc.drawing; + +import lib.MultiPropertyTest; + +public class _AreaShapeDescriptor extends MultiPropertyTest { + + @Override + protected boolean compare(Object ob1, Object ob2) { + + return super.compare(ob1, ob2); + + } + + protected PropertyTester URLTester = new PropertyTester() { + @Override + protected Object getNewValue(String propName, Object oldValue) + throws java.lang.IllegalArgumentException { + if (oldValue.equals(util.utils.getFullTestURL("space-metal.jpg"))) + return util.utils.getFullTestURL("crazy-blue.jpg"); else + return util.utils.getFullTestURL("space-metal.jpg"); + } + } ; + + protected PropertyTester StringTester = new PropertyTester() { + @Override + protected Object getNewValue(String propName, Object oldValue) + throws java.lang.IllegalArgumentException { + if (oldValue.equals(str1)) + return str2; else + return str1; + } + } ; + + public void _FillBitmapURL() { + log.println("Testing with custom Property tester") ; + testProperty("FillBitmapURL", URLTester) ; + } + + public String str1 = ""; + public String str2 = ""; + + public void _FillGradientName() { + log.println("Testing with custom Property tester") ; + str1 = "Gradient 1"; + str2 = "Gradient 3"; + testProperty("FillGradientName", StringTester) ; + } + + public void _FillBitmapName() { + log.println("Testing with custom Property tester") ; + str1 = "Sky"; + str2 = "Blank"; + testProperty("FillBitmapName", StringTester) ; + } + + public void _FillTransparenceGradientName() { + log.println("Testing with custom Property tester") ; + str1 = "Standard 1"; + str2 = "Standard 2"; + testProperty("FillTransparenceGradientName", StringTester) ; + } + + public void _FillHatchName() { + log.println("Testing with custom Property tester") ; + str1 = "Black 0 degrees"; + str2 = "Black 45 degrees"; + testProperty("FillHatchName", StringTester) ; + } + + public void _FillBitmapMode() { + log.println("Testing with custom Property tester") ; + try { + Object getting = oObj.getPropertyValue("FillBitmapMode"); + if (! (getting instanceof com.sun.star.drawing.BitmapMode)) { + log.println("getting the property 'FillBitmapMode'"); + log.println("return "+ oObj.getClass().getName()); + log.println("Expected was 'com.sun.star.drawing.BitmapMode'"); + tRes.tested("FillBitmapMode",false); + } else testProperty("FillBitmapMode"); + } + catch (Exception ex) { + log.println("Exception while checking 'FillBitmapMode'"); + ex.printStackTrace(log); + tRes.tested("FillBitmapMode",false); + } + + } + +} + + diff --git a/qadevOOo/tests/java/ifc/drawing/_ConnectorProperties.java b/qadevOOo/tests/java/ifc/drawing/_ConnectorProperties.java new file mode 100644 index 000000000..1cbe9f077 --- /dev/null +++ b/qadevOOo/tests/java/ifc/drawing/_ConnectorProperties.java @@ -0,0 +1,39 @@ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +package ifc.drawing; + +import lib.MultiPropertyTest; + +/** +* Testing com.sun.star.drawing.ConnectorProperties +* service properties : +*

+* Properties testing is automated by lib.MultiPropertyTest. +* @see com.sun.star.drawing.ConnectorProperties +*/ +public class _ConnectorProperties extends MultiPropertyTest { + +} + diff --git a/qadevOOo/tests/java/ifc/drawing/_ConnectorShape.java b/qadevOOo/tests/java/ifc/drawing/_ConnectorShape.java new file mode 100644 index 000000000..d338126d7 --- /dev/null +++ b/qadevOOo/tests/java/ifc/drawing/_ConnectorShape.java @@ -0,0 +1,70 @@ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +package ifc.drawing; + +import lib.MultiPropertyTest; + +import com.sun.star.drawing.XShape; +/** +* Testing com.sun.star.drawing.ConnectorShape +* service properties : +*

+* Properties testing is automated by lib.MultiPropertyTest. +* @see com.sun.star.drawing.ConnectorShape +*/ +public class _ConnectorShape extends MultiPropertyTest { + public XShape[] conShapes = null; + + @Override + protected void before() { + conShapes = (XShape[]) tEnv.getObjRelation("XConnectorShape.Shapes"); + } + + public void _EndShape() { + Object oldProp = null; + try { + oldProp = oObj.getPropertyValue("EndShape"); + } catch (com.sun.star.beans.UnknownPropertyException e) { + e.printStackTrace(); + } catch (com.sun.star.lang.WrappedTargetException e) { + e.printStackTrace(); + } + testProperty("EndShape",oldProp,conShapes[0]); + } + + public void _StartShape() { + Object oldProp = null; + log.println("Special for StartShape"); + try { + oldProp = oObj.getPropertyValue("StartShape"); + } catch (com.sun.star.beans.UnknownPropertyException e) { + e.printStackTrace(); + } catch (com.sun.star.lang.WrappedTargetException e) { + e.printStackTrace(); + } + testProperty("StartShape",oldProp,conShapes[1]); + } + + +} + diff --git a/qadevOOo/tests/java/ifc/drawing/_ConnectorShapeDescriptor.java b/qadevOOo/tests/java/ifc/drawing/_ConnectorShapeDescriptor.java new file mode 100644 index 000000000..99f974b49 --- /dev/null +++ b/qadevOOo/tests/java/ifc/drawing/_ConnectorShapeDescriptor.java @@ -0,0 +1,35 @@ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +package ifc.drawing; + +import lib.MultiPropertyTest; + +public class _ConnectorShapeDescriptor extends MultiPropertyTest { + + @Override + protected boolean compare(Object ob1, Object ob2) { + + return super.compare(ob1, ob2); + + } + +} // finish class _ConnectorShapeDescriptor + + + diff --git a/qadevOOo/tests/java/ifc/drawing/_DimensioningShapeDescriptor.java b/qadevOOo/tests/java/ifc/drawing/_DimensioningShapeDescriptor.java new file mode 100644 index 000000000..ef55d860e --- /dev/null +++ b/qadevOOo/tests/java/ifc/drawing/_DimensioningShapeDescriptor.java @@ -0,0 +1,39 @@ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +package ifc.drawing; + +import lib.MultiPropertyTest; + + +public class _DimensioningShapeDescriptor extends MultiPropertyTest { + +/* + protected PropertyTester lengthTester = new PropertyTester() { + protected Object getNewValue(String propName, Object oldValue) + throws java.lang.IllegalArgumentException { + + int val = ((Integer)oldValue).intValue() ; + return Integer.valueOf(val + 100) ; + } + } ; +*/ + +} // finish class _ParagraphProperties + + diff --git a/qadevOOo/tests/java/ifc/drawing/_DrawingDocument.java b/qadevOOo/tests/java/ifc/drawing/_DrawingDocument.java new file mode 100644 index 000000000..a0df35bcb --- /dev/null +++ b/qadevOOo/tests/java/ifc/drawing/_DrawingDocument.java @@ -0,0 +1,36 @@ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +package ifc.drawing; + +import lib.MultiPropertyTest; + +/** +* Testing com.sun.star.drawing.DrawingDocument +* service properties : +*

+* Properties testing is automated by lib.MultiPropertyTest. +* @see com.sun.star.drawing.DrawingDocument +*/ +public class _DrawingDocument extends MultiPropertyTest { + +} + diff --git a/qadevOOo/tests/java/ifc/drawing/_DrawingDocumentDrawView.java b/qadevOOo/tests/java/ifc/drawing/_DrawingDocumentDrawView.java new file mode 100644 index 000000000..597e44cee --- /dev/null +++ b/qadevOOo/tests/java/ifc/drawing/_DrawingDocumentDrawView.java @@ -0,0 +1,172 @@ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +package ifc.drawing; + +import lib.MultiPropertyTest; + +import com.sun.star.container.XNamed; +import com.sun.star.drawing.XDrawPage; +import com.sun.star.uno.UnoRuntime; +import util.ValueChanger; + +/** +* Testing com.sun.star.drawing.DrawingDocumentDrawView +* service properties : +*

+* This test needs the following object relations : +*