summaryrefslogtreecommitdiff
path: root/qadevOOo
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2012-11-22 11:26:49 +0100
committerMichael Stahl <mstahl@redhat.com>2012-11-26 23:14:33 +0100
commite6f81b1898a59280f41177206b777a7a0d32f3fc (patch)
treec8047f94d0e647630ce45f8159600fdad7ebad48 /qadevOOo
parent31170413ae3786bf44564e813d7291354e939a77 (diff)
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
Diffstat (limited to 'qadevOOo')
-rw-r--r--qadevOOo/Jar_OOoRunner.mk6
-rw-r--r--qadevOOo/objdsc/sc/com.sun.star.comp.office.ScModelObj.csv1
-rw-r--r--qadevOOo/objdsc/sd/com.sun.star.comp.office.SdXImpressDocument.csv1
-rw-r--r--qadevOOo/objdsc/sfx/com.sun.star.comp.sfx2.StandaloneDocumentInfo.csv46
-rw-r--r--qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXTextDocument.csv1
-rw-r--r--qadevOOo/tests/java/ifc/document/_DocumentInfo.java142
-rw-r--r--qadevOOo/tests/java/ifc/document/_XDocumentInfo.java215
-rw-r--r--qadevOOo/tests/java/ifc/document/_XDocumentInfoSupplier.java47
-rw-r--r--qadevOOo/tests/java/ifc/document/_XStandaloneDocumentInfo.java120
-rw-r--r--qadevOOo/tests/java/mod/_fwk/DocumentProperties.java120
-rw-r--r--qadevOOo/tests/java/mod/_sfx/StandaloneDocumentInfo.java123
11 files changed, 0 insertions, 822 deletions
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 <code>com.sun.star.document.DocumentInfo</code>
-* service properties : <p>
-* <ul>
-* <li> <code> Author </code> </li>
-* <li> <code> AutoloadEnabled </code> </li>
-* <li> <code> AutoloadSecs </code> </li>
-* <li> <code> AutoloadURL </code> </li>
-* <li> <code> BlindCopiesTo </code> </li>
-* <li> <code> CopyTo </code> </li>
-* <li> <code> CreationDate </code> </li>
-* <li> <code> DefaultTarget </code> </li>
-* <li> <code> Description </code> </li>
-* <li> <code> InReplyTo </code> </li>
-* <li> <code> IsEncrypted </code> </li>
-* <li> <code> Keywords </code> </li>
-* <li> <code> MIMEType </code> </li>
-* <li> <code> ModifiedBy </code> </li>
-* <li> <code> ModifyDate </code> </li>
-* <li> <code> Newsgroups </code> </li>
-* <li> <code> Original </code> </li>
-* <li> <code> PrintDate </code> </li>
-* <li> <code> PrintedBy </code> </li>
-* <li> <code> Priority </code> </li>
-* <li> <code> Recipient </code> </li>
-* <li> <code> References </code> </li>
-* <li> <code> ReplyTo </code> </li>
-* <li> <code> Template </code> </li>
-* <li> <code> TemplateDate </code> </li>
-* <li> <code> Theme </code> </li>
-* <li> <code> Title </code> </li>
-* </ul>
-* Properties testing is automated by <code>lib.MultiPropertyTest</code>.
-* @see com.sun.star.document.DocumentInfo
-*/
-public class _DocumentInfo extends MultiPropertyTest {
-
- /**
- * Overrides compare method. Can compare <code>DateTime</code>
- * 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 <code>DateTime</code> 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 <code>com.sun.star.document.XDocumentInfo</code>
-* interface methods :
-* <ul>
-* <li><code> getUserFieldCount()</code></li>
-* <li><code> getUserFieldName()</code></li>
-* <li><code> setUserFieldName()</code></li>
-* <li><code> getUserFieldValue()</code></li>
-* <li><code> setUserFieldValue()</code></li>
-* </ul> <p>
-* Test is <b> NOT </b> multithread compilant. <p>
-* @see com.sun.star.document.XDocumentInfo
-*/
-public class _XDocumentInfo extends MultiMethodTest {
-
- public XDocumentInfo oObj = null;
-
- short fieldCount;
-
- /**
- * Gets user field count. <p>
- * Has <b> OK </b> 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. <p>
- * Has <b> OK </b> status if no exceptions were thrown and
- * names returned are not <code>null</code> values. <p>
- * The following method tests are to be completed successfully before :
- * <ul>
- * <li> <code> getUserFieldCount() </code> : to obtain number of
- * fields </li>
- * </ul>
- */
- 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.<p>
- * Has <b> OK </b> status if names were properly changed. <p>
- * The following method tests are to be completed successfully before :
- * <ul>
- * <li> <code> getUserFieldName() </code> : to retrieve old names </li>
- * </ul>
- */
- 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. <p>
- * Has <b> OK </b> status if no exceptions were thrown and
- * values returned are not <code>null</code> values. <p>
- * The following method tests are to be completed successfully before :
- * <ul>
- * <li> <code> getUserFieldCount() </code> : to obtain number of
- * fields </li>
- * </ul>
- */
- 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.<p>
- * Has <b> OK </b> status if values were properly changed. <p>
- * The following method tests are to be completed successfully before :
- * <ul>
- * <li> <code> getUserFieldValue() </code> : to retrieve old values. </li>
- * </ul>
- */
- 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 <code>com.sun.star.document.XStandaloneDocumentInfo</code>
-* interface methods. <p>
-* This test needs the following object relations :
-* <ul>
-* <li> <code>'DOCURL'</code> (of type <code>String</code>):
-* URL of document which info is loaded.</li>
-* <ul> <p>
-* Test is <b> NOT </b> multithread compilant. <p>
-* @see com.sun.star.document.XStandaloneDocumentInfo
-*/
-public class _XStandaloneDocumentInfo extends MultiMethodTest {
-
- public XStandaloneDocumentInfo oObj = null;
- String url = null;
-
- protected void before() {
- url = (String)tEnv.getObjRelation("DOCURL");
- if (url == null) {
- throw new StatusException
- (Status.failed("Relation 'DOCURL' not found"));
- }
- }
-
- String oldProp = null;
- String newProp = null;
- /**
- * Sets new value of the property 'Author' and calls the method. <p>
- * Has <b> OK </b> status if no exception occurred.
- */
- public void _storeIntoURL() {
- try {
- oObj.loadFromURL(url);
- XPropertySet propSet = UnoRuntime.queryInterface(XPropertySet.class, oObj);
- oldProp = (String)propSet.getPropertyValue("Author");
- newProp = oldProp + "_";
- propSet.setPropertyValue("Author", newProp);
-
- oObj.storeIntoURL(url);
- tRes.tested("storeIntoURL()", true);
- } catch (IOException e) {
- log.println("Couldn't store to " + url
- + " : " + e.getMessage());
- e.printStackTrace(log);
- tRes.tested("storeIntoURL()", false);
- } catch(com.sun.star.lang.WrappedTargetException e) {
- log.println("Couldn't get/set property 'Author':" + e);
- tRes.tested("storeIntoURL()", false);
- } catch(com.sun.star.beans.UnknownPropertyException e) {
- log.println("Couldn't get/set property 'Author':" + e);
- tRes.tested("storeIntoURL()", false);
- } catch(com.sun.star.lang.IllegalArgumentException e) {
- log.println("Couldn't get/set property 'Author':" + e);
- tRes.tested("storeIntoURL()", false);
- } catch(com.sun.star.beans.PropertyVetoException e) {
- log.println("Couldn't get/set property 'Author':" + e);
- tRes.tested("storeIntoURL()", false);
- }
- }
-
- /**
- * Calls the method and checks value of the property 'Author'. <p>
- * Has <b> OK </b> status if no exception occurred and value of the property
- * 'Author' is equal to value that was set in the method
- * <code>storeIntoURL</code>.
- */
- public void _loadFromURL() {
- requiredMethod("storeIntoURL()");
- try {
- oObj.loadFromURL(url);
- XPropertySet propSet = UnoRuntime.queryInterface(XPropertySet.class, oObj);
- String resProp = (String)propSet.getPropertyValue("Author");
- log.println("Was: '" + oldProp + "',Set: '" + newProp +
- "', New: " + resProp + "'");
- tRes.tested("loadFromURL()", resProp.equals(newProp) );
- } catch (IOException e) {
- log.println("Couldn't load from " + url
- + " : " + e.getMessage());
- e.printStackTrace(log);
- tRes.tested("loadFromURL()", false);
- } catch(com.sun.star.lang.WrappedTargetException e) {
- log.println("Couldn't get/set property 'Author':" + e);
- tRes.tested("loadFromURL()", false);
- } catch(com.sun.star.beans.UnknownPropertyException e) {
- log.println("Couldn't get/set property 'Author':" + e);
- tRes.tested("loadFromURL()", false);
- }
- }
-
-} // finish class _XStandaloneDocumentInfo
-
diff --git a/qadevOOo/tests/java/mod/_fwk/DocumentProperties.java b/qadevOOo/tests/java/mod/_fwk/DocumentProperties.java
deleted file mode 100644
index 97ebe692a24f..000000000000
--- a/qadevOOo/tests/java/mod/_fwk/DocumentProperties.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 mod._fwk;
-
-import java.io.PrintWriter;
-
-import lib.StatusException;
-import lib.TestCase;
-import lib.TestEnvironment;
-import lib.TestParameters;
-import util.SOfficeFactory;
-
-import com.sun.star.document.XDocumentInfoSupplier;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.text.XTextDocument;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XInterface;
-
-/**
-* Test for object which is represented by service
-* <code>com.sun.star.document.DocumentInfo</code>. <p>
-* Object implements the following interfaces :
-* <ul>
-* <li><code>com::sun::star::beans::XFastPropertySet</code></li>
-* <li><code>com::sun::star::beans::XPropertySet</code></li>
-* <li><code>com::sun::star::document::XDocumentInfo</code></li>
-* <li><code>com::sun::star::document::XStandaloneDocumentInfo</code></li>
-* <li><code>com::sun::star::lang::XComponent</code></li>
-* </ul><p>
-* @see com.sun.star.beans.XFastPropertySet
-* @see com.sun.star.beans.XPropertySet
-* @see com.sun.star.document.XDocumentInfo
-* @see com.sun.star.document.XStandaloneDocumentInfo
-* @see com.sun.star.lang.XComponent
-* @see ifc.beans._XFastPropertySet
-* @see ifc.beans._XPropertySet
-* @see ifc.document._XDocumentInfo
-* @see ifc.document._XStandaloneDocumentInfo
-* @see ifc.lang._XComponent
-*/
-public class DocumentProperties extends TestCase {
-
- XTextDocument xTextDoc;
-
- /**
- * Disposes the document, if exists, created in
- * <code>createTestEnvironment</code> method.
- */
- protected void cleanup( TestParameters Param, PrintWriter log) {
-
- log.println("disposing xTextDoc");
-
- if (xTextDoc != null) {
- xTextDoc.dispose();
- }
- }
-
- /**
- * Creates a text document.
- * Obtains the property <code>'DocumentInfo'</code> of the created document.
- */
- public TestEnvironment createTestEnvironment( TestParameters Param,
- PrintWriter log ) throws StatusException {
-
- XInterface oObj = null;
-
- log.println( "creating a test environment" );
-
- if (xTextDoc != null) xTextDoc.dispose();
-
- // get a soffice factory object
- SOfficeFactory SOF = SOfficeFactory.getFactory( (XMultiServiceFactory)Param.getMSF());
-
- try {
- log.println( "creating a text document" );
- xTextDoc = SOF.createTextDoc(null);
- } catch ( com.sun.star.uno.Exception e ) {
- // Some exception occures.FAILED
- e.printStackTrace( log );
- throw new StatusException( "Couldn't create document", e );
- }
-
- shortWait();
-
- XDocumentInfoSupplier xdis = UnoRuntime.queryInterface(XDocumentInfoSupplier.class, xTextDoc);
- //oObj = (XInterface)UnoRuntime.queryInterface(XInterface.class, docInfo);
- oObj = xdis.getDocumentInfo();
- TestEnvironment tEnv = new TestEnvironment( oObj );
-
- return tEnv;
- } // finish method getTestEnvironment
-
- /**
- * Sleeps for 0.5 sec. to allow StarOffice to react on <code>
- * reset</code> call.
- */
- private void shortWait() {
- try {
- Thread.sleep(500) ;
- } catch (InterruptedException e) {
- log.println("While waiting :" + e) ;
- }
- }
-}
diff --git a/qadevOOo/tests/java/mod/_sfx/StandaloneDocumentInfo.java b/qadevOOo/tests/java/mod/_sfx/StandaloneDocumentInfo.java
deleted file mode 100644
index f3ec7a1cbe6a..000000000000
--- a/qadevOOo/tests/java/mod/_sfx/StandaloneDocumentInfo.java
+++ /dev/null
@@ -1,123 +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 mod._sfx;
-
-import java.io.PrintWriter;
-
-import lib.StatusException;
-import lib.TestCase;
-import lib.TestEnvironment;
-import lib.TestParameters;
-import util.utils;
-
-import com.sun.star.document.XStandaloneDocumentInfo;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XInterface;
-
-/**
- * Test for object which is represented by service
- * <code>com.sun.star.document.StandaloneDocumentInfo</code>. <p>
- * Object implements the following interfaces :
- * <ul>
- * <li> <code>com::sun::star::lang::XComponent</code></li>
- * <li> <code>com::sun::star::document::DocumentInfo</code></li>
- * <li> <code>com::sun::star::document::XDocumentInfo</code></li>
- * <li> <code>com::sun::star::document::XStandaloneDocumentInfo</code></li>
- * <li> <code>com::sun::star::beans::XFastPropertySet</code></li>
- * <li> <code>com::sun::star::beans::XPropertySet</code></li>
- * </ul> <p>
- * The following files used by this test :
- * <ul>
- * <li><b> SfxStandaloneDocInfoObject.sdw </b> : is copied
- * to SOffice temporary directory and is used to load and
- * save its info. </li>
- * </ul> <p>
- * This object test <b> is NOT </b> designed to be run in several
- * threads concurently.
- *
- * @see com.sun.star.lang.XComponent
- * @see com.sun.star.document.DocumentInfo
- * @see com.sun.star.document.XDocumentInfo
- * @see com.sun.star.document.XStandaloneDocumentInfo
- * @see com.sun.star.beans.XFastPropertySet
- * @see com.sun.star.beans.XPropertySet
- * @see ifc.lang._XComponent
- * @see ifc.document._DocumentInfo
- * @see ifc.document._XDocumentInfo
- * @see ifc.document._XStandaloneDocumentInfo
- * @see ifc.beans._XFastPropertySet
- * @see ifc.beans._XPropertySet
- */
-public class StandaloneDocumentInfo extends TestCase {
-
- String destUrl = null ;
-
- /**
- * Copies file 'SfxStandaloneDocInfoObject.sdw' to tempopary
- * location (overwriting the old file if exists).
- */
- protected void initialize( TestParameters tParam, PrintWriter log ) {
- String srcUrl = utils.getFullTestURL("SfxStandaloneDocInfoObject.sdw") ;
- destUrl = utils.getOfficeTemp((XMultiServiceFactory)tParam.getMSF()) +
- "SfxStandaloneDocInfoObject.sdw";
-
- utils.doOverwriteFile((XMultiServiceFactory)tParam.getMSF(), srcUrl, destUrl) ;
- }
-
- /**
- * Creating a Testenvironment for the interfaces to be tested.
- * Creates an instance of the service
- * <code>com.sun.star.document.StandaloneDocumentInfo</code>.
- * Object relations created :
- * <ul>
- * <li> <code>'DOCURL'</code> for
- * {@link ifc.document._XStandaloneDocumentInfo} :
- * the Writer file URL in temporary location. </li>
- * </ul>
- */
- protected TestEnvironment createTestEnvironment
- (TestParameters tParam, PrintWriter log) {
- XMultiServiceFactory xMSF = (XMultiServiceFactory)tParam.getMSF();
- XInterface oObj = null;
-
- try {
- oObj = (XInterface)xMSF.createInstance
- ("com.sun.star.document.StandaloneDocumentInfo");
- } catch (com.sun.star.uno.Exception e) {
- e.printStackTrace(log);
- throw new StatusException("Unexpected exception", e);
- }
-
- String Iname = util.utils.getImplName(oObj);
- log.println("Implementation Name: "+Iname);
- TestEnvironment tEnv = new TestEnvironment(oObj);
- XStandaloneDocumentInfo the_info = UnoRuntime.queryInterface(XStandaloneDocumentInfo.class, oObj);
- try {
- the_info.loadFromURL(destUrl);
- } catch (com.sun.star.io.IOException e) {
- e.printStackTrace(log);
- throw new StatusException("Couldn't load document: " + destUrl,e);
- }
- tEnv.addObjRelation("DOCURL",destUrl);
- return tEnv;
- }
-
-} // finish class TestCase
-