From e6f81b1898a59280f41177206b777a7a0d32f3fc Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Thu, 22 Nov 2012 11:26:49 +0100 Subject: API CHANGE: remove com.sun.star.document.XDocumentInfo The following badly designed interfaces and services were deprecated in OpenOffice.org 3.0 and are now remove from the API: com.sun.star.document.DocumentInfo com.sun.star.document.StandaloneDocumentInfo com.sun.star.document.XDocumentInfo com.sun.star.document.XDocumentInfoSupplier com.sun.star.document.XStandaloneDocumentInfo The supported replacements for these have been introduced in OOo 3.0: com.sun.star.document.XDocumentProperties com.sun.star.document.XDocumentPropertiesSupplier com.sun.star.document.DocumentProperties http://www.mail-archive.com/interface-announce@openoffice.org/msg00432.html Remove the implementation of these interfaces and services in sfx2 (SfxBaseModel, objuno.cxx) Also remove unit tests for these services in qadevOOo and sfx2. Conflicts: offapi/type_reference/types.rdb Change-Id: Ib0b48a4e53a8079c82fac3bb49a829812f8e5256 --- qadevOOo/Jar_OOoRunner.mk | 6 - .../sc/com.sun.star.comp.office.ScModelObj.csv | 1 - ...com.sun.star.comp.office.SdXImpressDocument.csv | 1 - ...m.sun.star.comp.sfx2.StandaloneDocumentInfo.csv | 46 ----- .../com.sun.star.comp.office.SwXTextDocument.csv | 1 - .../tests/java/ifc/document/_DocumentInfo.java | 142 -------------- .../tests/java/ifc/document/_XDocumentInfo.java | 215 --------------------- .../java/ifc/document/_XDocumentInfoSupplier.java | 47 ----- .../ifc/document/_XStandaloneDocumentInfo.java | 120 ------------ .../tests/java/mod/_fwk/DocumentProperties.java | 120 ------------ .../java/mod/_sfx/StandaloneDocumentInfo.java | 123 ------------ 11 files changed, 822 deletions(-) delete mode 100644 qadevOOo/objdsc/sfx/com.sun.star.comp.sfx2.StandaloneDocumentInfo.csv delete mode 100644 qadevOOo/tests/java/ifc/document/_DocumentInfo.java delete mode 100644 qadevOOo/tests/java/ifc/document/_XDocumentInfo.java delete mode 100644 qadevOOo/tests/java/ifc/document/_XDocumentInfoSupplier.java delete mode 100644 qadevOOo/tests/java/ifc/document/_XStandaloneDocumentInfo.java delete mode 100644 qadevOOo/tests/java/mod/_fwk/DocumentProperties.java delete mode 100644 qadevOOo/tests/java/mod/_sfx/StandaloneDocumentInfo.java (limited to 'qadevOOo') diff --git a/qadevOOo/Jar_OOoRunner.mk b/qadevOOo/Jar_OOoRunner.mk index d6c5c9eceb9e..998a794c25a2 100644 --- a/qadevOOo/Jar_OOoRunner.mk +++ b/qadevOOo/Jar_OOoRunner.mk @@ -410,15 +410,12 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunner,\ qadevOOo/tests/java/ifc/datatransfer/clipboard/_XFlushableClipboard \ qadevOOo/tests/java/ifc/datatransfer/_XDataFormatTranslator \ qadevOOo/tests/java/ifc/datatransfer/_XMimeContentTypeFactory \ - qadevOOo/tests/java/ifc/document/_DocumentInfo \ qadevOOo/tests/java/ifc/document/_ExportFilter \ qadevOOo/tests/java/ifc/document/_ImportFilter \ qadevOOo/tests/java/ifc/document/_LinkTarget \ qadevOOo/tests/java/ifc/document/_OfficeDocument \ qadevOOo/tests/java/ifc/document/_Settings \ qadevOOo/tests/java/ifc/document/_XActionLockable \ - qadevOOo/tests/java/ifc/document/_XDocumentInfo \ - qadevOOo/tests/java/ifc/document/_XDocumentInfoSupplier \ qadevOOo/tests/java/ifc/document/_XDocumentInsertable \ qadevOOo/tests/java/ifc/document/_XEmbeddedObjectSupplier \ qadevOOo/tests/java/ifc/document/_XEventBroadcaster \ @@ -428,7 +425,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunner,\ qadevOOo/tests/java/ifc/document/_XImporter \ qadevOOo/tests/java/ifc/document/_XLinkTargetSupplier \ qadevOOo/tests/java/ifc/document/_XMimeTypeInfo \ - qadevOOo/tests/java/ifc/document/_XStandaloneDocumentInfo \ qadevOOo/tests/java/ifc/document/_XTypeDetection \ qadevOOo/tests/java/ifc/document/_XViewDataSupplier \ qadevOOo/tests/java/ifc/drawing/_AreaShapeDescriptor \ @@ -1061,7 +1057,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunner,\ qadevOOo/tests/java/mod/_fwk/Desktop \ qadevOOo/tests/java/mod/_fwk/DispatchRecorder \ qadevOOo/tests/java/mod/_fwk/DispatchRecorderSupplier \ - qadevOOo/tests/java/mod/_fwk/DocumentProperties \ qadevOOo/tests/java/mod/_fwk/FontMenuController \ qadevOOo/tests/java/mod/_fwk/FontSizeMenuController \ qadevOOo/tests/java/mod/_fwk/FooterMenuController \ @@ -1322,7 +1317,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunner,\ qadevOOo/tests/java/mod/_sfx/DocumentTemplates \ qadevOOo/tests/java/mod/_sfx/FrameLoader \ qadevOOo/tests/java/mod/_sfx/SfxMacroLoader \ - qadevOOo/tests/java/mod/_sfx/StandaloneDocumentInfo \ qadevOOo/tests/java/mod/_shlibloader/uno/DLLComponentLoader \ qadevOOo/tests/java/mod/_simplereg/uno/SimpleRegistry \ qadevOOo/tests/java/mod/_simreg/SimpleRegistry \ diff --git a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScModelObj.csv b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScModelObj.csv index c4da0da4f5a5..cb7c6d1de96b 100644 --- a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScModelObj.csv +++ b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScModelObj.csv @@ -47,7 +47,6 @@ "ScModelObj";"com::sun::star::beans::XPropertySet#optional";"removePropertyChangeListener()" "ScModelObj";"com::sun::star::beans::XPropertySet#optional";"addVetoableChangeListener()" "ScModelObj";"com::sun::star::beans::XPropertySet#optional";"removeVetoableChangeListener()" -"ScModelObj";"com::sun::star::document::XDocumentInfoSupplier#optional";"getDocumentInfo()" "ScModelObj";"com::sun::star::sheet::XDocumentAuditing";"refreshArrows()" "ScModelObj";"com::sun::star::sheet::XGoalSeek";"seekGoal()" "ScModelObj";"com::sun::star::sheet::SpreadsheetDocument";"NamedRanges" diff --git a/qadevOOo/objdsc/sd/com.sun.star.comp.office.SdXImpressDocument.csv b/qadevOOo/objdsc/sd/com.sun.star.comp.office.SdXImpressDocument.csv index 0e50db8f1c42..fd2b76673ca2 100644 --- a/qadevOOo/objdsc/sd/com.sun.star.comp.office.SdXImpressDocument.csv +++ b/qadevOOo/objdsc/sd/com.sun.star.comp.office.SdXImpressDocument.csv @@ -40,7 +40,6 @@ "SdXImpressDocument";"com::sun::star::beans::XPropertySet";"removePropertyChangeListener()" "SdXImpressDocument";"com::sun::star::beans::XPropertySet";"addVetoableChangeListener()" "SdXImpressDocument";"com::sun::star::beans::XPropertySet";"removeVetoableChangeListener()" -"SdXImpressDocument";"com::sun::star::document::XDocumentInfoSupplier#optional";"getDocumentInfo()" "SdXImpressDocument";"com::sun::star::document::OfficeDocument";"AutomaticControlFocus#optional" "SdXImpressDocument";"com::sun::star::document::OfficeDocument";"ApplyFormDesignMode#optional" "SdXImpressDocument";"com::sun::star::document::OfficeDocument";"RuntimeUID#optional" diff --git a/qadevOOo/objdsc/sfx/com.sun.star.comp.sfx2.StandaloneDocumentInfo.csv b/qadevOOo/objdsc/sfx/com.sun.star.comp.sfx2.StandaloneDocumentInfo.csv deleted file mode 100644 index d9b6e02696c3..000000000000 --- a/qadevOOo/objdsc/sfx/com.sun.star.comp.sfx2.StandaloneDocumentInfo.csv +++ /dev/null @@ -1,46 +0,0 @@ -"StandaloneDocumentInfo";"com::sun::star::document::XStandaloneDocumentInfo";"loadFromURL()" -"StandaloneDocumentInfo";"com::sun::star::document::XStandaloneDocumentInfo";"storeIntoURL()" -"StandaloneDocumentInfo";"com::sun::star::document::DocumentInfo";"Author" -"StandaloneDocumentInfo";"com::sun::star::document::DocumentInfo";"Generator" -"StandaloneDocumentInfo";"com::sun::star::document::DocumentInfo";"CreationDate" -"StandaloneDocumentInfo";"com::sun::star::document::DocumentInfo";"Title" -"StandaloneDocumentInfo";"com::sun::star::document::DocumentInfo";"Subject" -"StandaloneDocumentInfo";"com::sun::star::document::DocumentInfo";"Description" -"StandaloneDocumentInfo";"com::sun::star::document::DocumentInfo";"Keywords" -"StandaloneDocumentInfo";"com::sun::star::document::DocumentInfo";"MIMEType" -"StandaloneDocumentInfo";"com::sun::star::document::DocumentInfo";"Language" -"StandaloneDocumentInfo";"com::sun::star::document::DocumentInfo";"ModifiedBy" -"StandaloneDocumentInfo";"com::sun::star::document::DocumentInfo";"ModifyDate" -"StandaloneDocumentInfo";"com::sun::star::document::DocumentInfo";"PrintedBy" -"StandaloneDocumentInfo";"com::sun::star::document::DocumentInfo";"PrintDate" -"StandaloneDocumentInfo";"com::sun::star::document::DocumentInfo";"Template" -"StandaloneDocumentInfo";"com::sun::star::document::DocumentInfo";"TemplateDate" -"StandaloneDocumentInfo";"com::sun::star::document::DocumentInfo";"AutoloadURL" -"StandaloneDocumentInfo";"com::sun::star::document::DocumentInfo";"AutoloadSecs" -"StandaloneDocumentInfo";"com::sun::star::document::DocumentInfo";"DefaultTarget" -"StandaloneDocumentInfo";"com::sun::star::document::DocumentInfo";"BlindCopiesTo" -"StandaloneDocumentInfo";"com::sun::star::document::DocumentInfo";"CopyTo" -"StandaloneDocumentInfo";"com::sun::star::document::DocumentInfo";"InReplyTo" -"StandaloneDocumentInfo";"com::sun::star::document::DocumentInfo";"Newsgroups" -"StandaloneDocumentInfo";"com::sun::star::document::DocumentInfo";"Original" -"StandaloneDocumentInfo";"com::sun::star::document::DocumentInfo";"Priority" -"StandaloneDocumentInfo";"com::sun::star::document::DocumentInfo";"Recipient" -"StandaloneDocumentInfo";"com::sun::star::document::DocumentInfo";"References" -"StandaloneDocumentInfo";"com::sun::star::document::DocumentInfo";"ReplyTo" -"StandaloneDocumentInfo";"com::sun::star::document::DocumentInfo";"Theme" -"StandaloneDocumentInfo";"com::sun::star::document::DocumentInfo";"IsEncrypted" -"StandaloneDocumentInfo";"com::sun::star::document::DocumentInfo";"AutoloadEnabled" -"StandaloneDocumentInfo";"com::sun::star::document::XDocumentInfo";"getUserFieldCount()" -"StandaloneDocumentInfo";"com::sun::star::document::XDocumentInfo";"getUserFieldName()" -"StandaloneDocumentInfo";"com::sun::star::document::XDocumentInfo";"getUserFieldValue()" -"StandaloneDocumentInfo";"com::sun::star::document::XDocumentInfo";"setUserFieldName()" -"StandaloneDocumentInfo";"com::sun::star::document::XDocumentInfo";"setUserFieldValue()" -"StandaloneDocumentInfo";"com::sun::star::beans::XPropertySet";"getPropertySetInfo()" -"StandaloneDocumentInfo";"com::sun::star::beans::XPropertySet";"setPropertyValue()" -"StandaloneDocumentInfo";"com::sun::star::beans::XPropertySet";"getPropertyValue()" -"StandaloneDocumentInfo";"com::sun::star::beans::XPropertySet";"addPropertyChangeListener()" -"StandaloneDocumentInfo";"com::sun::star::beans::XPropertySet";"removePropertyChangeListener()" -"StandaloneDocumentInfo";"com::sun::star::beans::XPropertySet";"addVetoableChangeListener()" -"StandaloneDocumentInfo";"com::sun::star::beans::XPropertySet";"removeVetoableChangeListener()" -"StandaloneDocumentInfo";"com::sun::star::beans::XFastPropertySet";"setFastPropertyValue()" -"StandaloneDocumentInfo";"com::sun::star::beans::XFastPropertySet";"getFastPropertyValue()" diff --git a/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXTextDocument.csv b/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXTextDocument.csv index 09e9c91ca3ef..dd21e266c688 100644 --- a/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXTextDocument.csv +++ b/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXTextDocument.csv @@ -58,7 +58,6 @@ "SwXTextDocument";"com::sun::star::beans::XPropertySet#optional";"removePropertyChangeListener()" "SwXTextDocument";"com::sun::star::beans::XPropertySet#optional";"addVetoableChangeListener()" "SwXTextDocument";"com::sun::star::beans::XPropertySet#optional";"removeVetoableChangeListener()" -"SwXTextDocument";"com::sun::star::document::XDocumentInfoSupplier#optional";"getDocumentInfo()" "SwXTextDocument";"com::sun::star::text::GenericTextDocument";"CharLocale#optional" "SwXTextDocument";"com::sun::star::text::GenericTextDocument";"CharacterCount#optional" "SwXTextDocument";"com::sun::star::text::GenericTextDocument";"ParagraphCount#optional" diff --git a/qadevOOo/tests/java/ifc/document/_DocumentInfo.java b/qadevOOo/tests/java/ifc/document/_DocumentInfo.java deleted file mode 100644 index 5809f3e56eda..000000000000 --- a/qadevOOo/tests/java/ifc/document/_DocumentInfo.java +++ /dev/null @@ -1,142 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -package ifc.document; - -import lib.MultiPropertyTest; - -import com.sun.star.util.DateTime; - -/** -* Testing com.sun.star.document.DocumentInfo -* service properties :

-*

-* Properties testing is automated by lib.MultiPropertyTest. -* @see com.sun.star.document.DocumentInfo -*/ -public class _DocumentInfo extends MultiPropertyTest { - - /** - * Overrides compare method. Can compare DateTime - * structures. - */ - protected boolean compare(Object ob1, Object ob2) { - if (ob1 instanceof DateTime && ob2 instanceof DateTime) { - DateTime dt1 = (DateTime)ob1; - DateTime dt2 = (DateTime)ob2; - - return dt1.Year == dt2.Year - && dt1.Month == dt2.Month - && dt1.Day == dt2.Day - && dt1.Hours == dt2.Hours - && dt1.Minutes == dt2.Minutes - && dt1.Seconds == dt2.Seconds - && dt1.HundredthSeconds == dt2.HundredthSeconds; - } else { - return super.compare(ob1, ob2); - } - } - - /** - * Prints DateTime. - */ - protected String toString(Object obj) { - if (obj instanceof DateTime) { - DateTime dt = (DateTime)obj; - - return dt.Year + ":" + dt.Month + ":" + dt.Day - + ":" + dt.Hours + ":" + dt.Minutes - + ":" + dt.Seconds + ":" + dt.HundredthSeconds; - } else { - return super.toString(obj); - } - } - - /** - * Tester for properties with DateTime type which - * creates new structure if old property value was null. - */ - class DatePropertyTester extends PropertyTester { - protected Object getNewValue(String propName, - Object oldValue) { - if (oldValue == null || util.utils.isVoid(oldValue)) { - DateTime dt = new DateTime(); - - dt.Year = 2000; - dt.Month = 10; - dt.Day = 18; - dt.Hours = 19; - dt.Minutes = 41; - - return dt; - } else { - return super.getNewValue(propName, oldValue); - } - } - } - - /** - * Can be void. - */ - public void _PrintDate() { - testProperty("PrintDate", new DatePropertyTester()); - } - - /** - * Can be void. - */ - public void _TemplateDate() { - testProperty("TemplateDate", new DatePropertyTester()); - } - - /** - * Can be void. - */ - public void _ModifyDate() { - testProperty("ModifyDate", new DatePropertyTester()); - } -} - diff --git a/qadevOOo/tests/java/ifc/document/_XDocumentInfo.java b/qadevOOo/tests/java/ifc/document/_XDocumentInfo.java deleted file mode 100644 index 02c371df261b..000000000000 --- a/qadevOOo/tests/java/ifc/document/_XDocumentInfo.java +++ /dev/null @@ -1,215 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -package ifc.document; - -import lib.MultiMethodTest; - -import com.sun.star.document.XDocumentInfo; -import com.sun.star.lang.ArrayIndexOutOfBoundsException; - -/** -* Testing com.sun.star.document.XDocumentInfo -* interface methods : -*

-* Test is NOT multithread compilant.

-* @see com.sun.star.document.XDocumentInfo -*/ -public class _XDocumentInfo extends MultiMethodTest { - - public XDocumentInfo oObj = null; - - short fieldCount; - - /** - * Gets user field count.

- * Has OK status if count is positive. - */ - public void _getUserFieldCount() { - fieldCount = oObj.getUserFieldCount(); - tRes.tested("getUserFieldCount()", fieldCount >= 0); - } - - String[] oldNames; - String[] oldValues; - - /** - * Retrieves all user field names and stores them.

- * Has OK status if no exceptions were thrown and - * names returned are not null values.

- * The following method tests are to be completed successfully before : - *

- */ - public void _getUserFieldName() { - requiredMethod("getUserFieldCount()"); - - oldNames = new String[fieldCount]; - - for (short i = 0; i < fieldCount; i++) { - try { - oldNames[i] = oObj.getUserFieldName(i); - if (oldNames[i] == null) { - tRes.tested("getUserFieldName()", false); - return; - } - } catch (ArrayIndexOutOfBoundsException e) { - log.println("Couldn't get an user field name at " + i); - tRes.tested("getUserFieldName()", false); - return; - } - } - - tRes.tested("getUserFieldName()", true); - } - - /** - * For each field its name changed and the checked if it's properly - * changed. Finally old names are restored.

- * Has OK status if names were properly changed.

- * The following method tests are to be completed successfully before : - *

- */ - public void _setUserFieldName() { - requiredMethod("getUserFieldName()"); - - for (short i = 0; i < fieldCount; i++) { - String newName = oldNames[i] + "_new"; - - try { - oObj.setUserFieldName(i, newName); - } catch (ArrayIndexOutOfBoundsException e) { - log.println("Couldn't set an user field name at " + i); - tRes.tested("setUserFieldName()", false); - return; - } - - try { - if (!newName.equals(oObj.getUserFieldName(i))) { - tRes.tested("setUserFieldName()", false); - return; - } - } catch (ArrayIndexOutOfBoundsException e) { - log.println("Couldn't set an user field name at " + i); - tRes.tested("setUserFieldName()", false); - return; - } finally { - try { - oObj.setUserFieldName(i, oldNames[i]); - } catch (ArrayIndexOutOfBoundsException e) { - log.println("Couldn't restore an user field name at " + i); - tRes.tested("setUserFieldName()", false); - return; - } - } - } - - tRes.tested("setUserFieldName()", true); - } - - - /** - * Retrieves all user field values and stores them.

- * Has OK status if no exceptions were thrown and - * values returned are not null values.

- * The following method tests are to be completed successfully before : - *

- */ - public void _getUserFieldValue() { - requiredMethod("getUserFieldCount()"); - - oldValues = new String[fieldCount]; - - for (short i = 0; i < fieldCount; i++) { - try { - oldValues[i] = oObj.getUserFieldValue(i); - if (oldValues[i] == null) { - tRes.tested("getUserFieldValue()", false); - return; - } - } catch (ArrayIndexOutOfBoundsException e) { - log.println("Couldn't get an user field value at " + i); - tRes.tested("getUserFieldValue()", false); - return; - } - } - - tRes.tested("getUserFieldValue()", true); - } - - /** - * For each field its value changed and the checked if it's properly - * changed. Finally old values are restored.

- * Has OK status if values were properly changed.

- * The following method tests are to be completed successfully before : - *

- */ - public void _setUserFieldValue() { - requiredMethod("getUserFieldValue()"); - - for (short i = 0; i < fieldCount; i++) { - String newValue = oldValues[i] + "_new"; - - try { - oObj.setUserFieldValue(i, newValue); - } catch (ArrayIndexOutOfBoundsException e) { - log.println("Couldn't set an user field value at " + i); - tRes.tested("setUserFieldValue()", false); - return; - } - - try { - if (!newValue.equals(oObj.getUserFieldValue(i))) { - tRes.tested("setUserFieldValue()", false); - return; - } - } catch (ArrayIndexOutOfBoundsException e) { - log.println("Couldn't set an user field value at " + i); - tRes.tested("setUserFieldValue()", false); - return; - } finally { - try { - oObj.setUserFieldValue(i, oldNames[i]); - } catch (ArrayIndexOutOfBoundsException e) { - log.println("Couldn't restore an user field value at " + i); - tRes.tested("setUserFieldValue()", false); - return; - } - } - } - - tRes.tested("setUserFieldValue()", true); - } - -} // finish class _XDocumentInfo - diff --git a/qadevOOo/tests/java/ifc/document/_XDocumentInfoSupplier.java b/qadevOOo/tests/java/ifc/document/_XDocumentInfoSupplier.java deleted file mode 100644 index 5810ae83dabf..000000000000 --- a/qadevOOo/tests/java/ifc/document/_XDocumentInfoSupplier.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -package ifc.document; - -import com.sun.star.beans.XPropertySet; -import com.sun.star.document.XDocumentInfo; -import com.sun.star.document.XDocumentInfoSupplier; -import com.sun.star.uno.UnoRuntime; -import lib.MultiMethodTest; - -/** - * test the XDocumentInfoSupplier interface. - */ -public class _XDocumentInfoSupplier extends MultiMethodTest { - public XDocumentInfoSupplier oObj = null; - - public void _getDocumentInfo() { - // returns a com.sun.star.document.DocumentInfo - XDocumentInfo info = oObj.getDocumentInfo(); - XPropertySet xPropertySet = UnoRuntime.queryInterface(XPropertySet.class, info); - String title = null; - try { - title = (String)xPropertySet.getPropertyValue("Title"); - } - catch(Exception e) { - e.printStackTrace(log); - title = null; - } - log.println("Got document title: " + title); - tRes.tested("getDocumentInfo()", title != null); - } -} diff --git a/qadevOOo/tests/java/ifc/document/_XStandaloneDocumentInfo.java b/qadevOOo/tests/java/ifc/document/_XStandaloneDocumentInfo.java deleted file mode 100644 index 88f60d43573a..000000000000 --- a/qadevOOo/tests/java/ifc/document/_XStandaloneDocumentInfo.java +++ /dev/null @@ -1,120 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -package ifc.document; - -import lib.MultiMethodTest; -import lib.Status; -import lib.StatusException; - -import com.sun.star.beans.XPropertySet; -import com.sun.star.document.XStandaloneDocumentInfo; -import com.sun.star.io.IOException; -import com.sun.star.uno.UnoRuntime; - -/** -* Testing com.sun.star.document.XStandaloneDocumentInfo -* interface methods.

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