diff options
author | Michael Stahl <mstahl@redhat.com> | 2012-11-22 11:26:49 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-11-26 23:14:33 +0100 |
commit | e6f81b1898a59280f41177206b777a7a0d32f3fc (patch) | |
tree | c8047f94d0e647630ce45f8159600fdad7ebad48 /sfx2/qa/complex | |
parent | 31170413ae3786bf44564e813d7291354e939a77 (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 'sfx2/qa/complex')
-rw-r--r-- | sfx2/qa/complex/sfx2/DocumentInfo.java | 338 | ||||
-rw-r--r-- | sfx2/qa/complex/sfx2/StandaloneDocumentInfo.java | 90 | ||||
-rw-r--r-- | sfx2/qa/complex/sfx2/standalonedocinfo/StandaloneDocumentInfoTest.java | 22 | ||||
-rw-r--r-- | sfx2/qa/complex/sfx2/standalonedocinfo/Test01.java | 135 | ||||
-rw-r--r-- | sfx2/qa/complex/sfx2/standalonedocinfo/TestHelper.java | 39 |
5 files changed, 0 insertions, 624 deletions
diff --git a/sfx2/qa/complex/sfx2/DocumentInfo.java b/sfx2/qa/complex/sfx2/DocumentInfo.java deleted file mode 100644 index 1532a3cc14c4..000000000000 --- a/sfx2/qa/complex/sfx2/DocumentInfo.java +++ /dev/null @@ -1,338 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -package complex.sfx2; - -import com.sun.star.beans.PropertyAttribute; -import com.sun.star.beans.Property; -import com.sun.star.beans.PropertyValue; -import com.sun.star.beans.XPropertyContainer; -import com.sun.star.beans.XPropertySet; -import com.sun.star.beans.XPropertySetInfo; -import com.sun.star.document.XDocumentInfo; -import com.sun.star.document.XDocumentInfoSupplier; -import com.sun.star.frame.XComponentLoader; -import com.sun.star.frame.XStorable; -import com.sun.star.lang.XComponent; -import com.sun.star.lang.XMultiServiceFactory; -import com.sun.star.text.XTextDocument; -import com.sun.star.uno.UnoRuntime; -import com.sun.star.util.Date; - - - -import util.DesktopTools; -import util.WriterTools; - -import org.junit.After; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; -import org.openoffice.test.OfficeConnection; -import static org.junit.Assert.*; - -public class DocumentInfo -{ - XMultiServiceFactory m_xMSF = null; - XTextDocument xTextDoc = null; - XTextDocument xTextDocSecond = null; - - @Test public void checkDocInfo() throws Exception - { - m_xMSF = getMSF(); - - System.out.println("check whether there is a valid MultiServiceFactory"); - - assertNotNull("## Couldn't get MultiServiceFactory make sure your Office is started", m_xMSF); - - String tempdir = util.utils.getOfficeTemp/*Dir*/(m_xMSF); - String fs = System.getProperty("file.separator"); - - if (!tempdir.endsWith(fs)) - { - tempdir += fs; - } - tempdir = util.utils.getFullURL(tempdir); - final String sTempDocument = tempdir + "DocInfo.oot"; - - if (true) - { - System.out.println("... done"); - - - System.out.println("Opening a Writer document"); - xTextDoc = WriterTools.createTextDoc(m_xMSF); - System.out.println("... done"); - - XDocumentInfoSupplier xDocInfoSup = UnoRuntime.queryInterface(XDocumentInfoSupplier.class, xTextDoc); - XDocumentInfo xDocInfo = xDocInfoSup.getDocumentInfo(); - XPropertyContainer xPropContainer = UnoRuntime.queryInterface(XPropertyContainer.class, xDocInfo); - - System.out.println("Trying to add a existing property"); - - boolean worked = addProperty(xPropContainer, "Author", (short) 0, ""); - assertTrue("Could set an existing property", !worked); - System.out.println("...done"); - - System.out.println("Trying to add a integer property"); - worked = addProperty(xPropContainer, "intValue", com.sun.star.beans.PropertyAttribute.READONLY, new Integer(17)); - assertTrue("Couldn't set an integer property", worked); - System.out.println("...done"); - - System.out.println("Trying to add a double property"); - worked = addProperty(xPropContainer, "doubleValue", com.sun.star.beans.PropertyAttribute.REMOVEABLE, new Double(17.7)); - assertTrue("Couldn't set an double property", worked); - System.out.println("...done"); - - System.out.println("Trying to add a boolean property"); - worked = addProperty(xPropContainer, "booleanValue", com.sun.star.beans.PropertyAttribute.REMOVEABLE, Boolean.TRUE); - assertTrue("Couldn't set an boolean property", worked); - System.out.println("...done"); - - System.out.println("Trying to add a date property"); - worked = addProperty(xPropContainer, "dateValue", com.sun.star.beans.PropertyAttribute.REMOVEABLE, new Date()); - assertTrue("Couldn't set an date property", worked); - System.out.println("...done"); - - System.out.println("trying to remove a read only Property"); - try - { - xPropContainer.removeProperty("intValue"); - fail("Could remove read only property"); - } - catch (Exception e) - { - System.out.println("\tException was thrown " + e); - System.out.println("\t...OK"); - } - System.out.println("...done"); - - XPropertySet xProps2 = UnoRuntime.queryInterface(XPropertySet.class, xPropContainer); - showPropertySet(xProps2); - - - System.out.println("Storing the document"); - XStorable store = UnoRuntime.queryInterface(XStorable.class, xTextDoc); - store.storeToURL(sTempDocument, new PropertyValue[] {}); - DesktopTools.closeDoc(xTextDoc); - - System.out.println("...done"); - } - - - if (true) - { - System.out.println("loading the document"); - - XComponentLoader xCL = UnoRuntime.queryInterface(XComponentLoader.class, m_xMSF.createInstance("com.sun.star.frame.Desktop")); - XComponent xComp = xCL.loadComponentFromURL(sTempDocument, "_blank", 0, new PropertyValue[] {}); - xTextDocSecond = UnoRuntime.queryInterface(XTextDocument.class, xComp); - - System.out.println("...done"); - - XDocumentInfoSupplier xDocInfoSup = UnoRuntime.queryInterface(XDocumentInfoSupplier.class, xTextDocSecond); - XDocumentInfo xDocInfo = xDocInfoSup.getDocumentInfo(); - XPropertyContainer xPropContainer = UnoRuntime.queryInterface(XPropertyContainer.class, xDocInfo); - - XPropertySet xProps = UnoRuntime.queryInterface(XPropertySet.class, xDocInfo); - showPropertySet(xProps); - - assertTrue("Double doesn't work", checkType(xProps, "doubleValue", "java.lang.Double")); - assertTrue("Boolean doesn't work", checkType(xProps, "booleanValue", "java.lang.Boolean")); - - // TODO: dateValue does not exist. - // assertTrue("Date doesn't work", checkType(xProps, "dateValue", "com.sun.star.util.DateTime")); - - // TODO: is java.lang.Double - // assertTrue("Integer doesn't work", checkType(xProps, "intValue", "java.lang.Integer")); - - xPropContainer = UnoRuntime.queryInterface(XPropertyContainer.class, xDocInfo); - - System.out.println("trying to remove a not user defined Property"); - try - { - xPropContainer.removeProperty("Author"); - fail("Could remove non user defined property"); - } - catch (Exception e) - { - System.out.println("\tException was thrown " + e); - System.out.println("\t...OK"); - } - System.out.println("...done"); - - - System.out.println("Trying to remove a user defined property"); - try - { - xPropContainer.removeProperty("booleanValue"); - System.out.println("\t...OK"); - } - catch (Exception e) - { - System.out.println("\tException was thrown " + e); - System.out.println("\t...FAILED"); - fail("Could not remove user defined property"); - } - showPropertySet(xProps); - System.out.println("...done"); - } - } - - @After public void cleanup() - { - DesktopTools.closeDoc(xTextDocSecond); - DesktopTools.closeDoc(xTextDoc); - } - - private void showPropertySet(XPropertySet xProps) - { - try - { - // get an XPropertySet, here the one of a text cursor - // XPropertySet xCursorProps = (XPropertySet)UnoRuntime.queryInterface(XPropertySet.class, mxDocCursor); - - // get the property info interface of this XPropertySet - XPropertySetInfo xPropsInfo = xProps.getPropertySetInfo(); - - // get all properties (NOT the values) from XPropertySetInfo - Property[] aProps = xPropsInfo.getProperties(); - int i; - for (i = 0; i < aProps.length; ++i) { - // number of property within this info object - System.out.print("Property #" + i); - - // name of property - System.out.print(": Name<" + aProps[i].Name); - - // handle of property (only for XFastPropertySet) - System.out.print("> Handle<" + aProps[i].Handle); - - // type of property - System.out.print("> " + aProps[i].Type.toString()); - - // attributes (flags) - System.out.print(" Attributes<"); - short nAttribs = aProps[i].Attributes; - if ((nAttribs & PropertyAttribute.MAYBEVOID) != 0) - System.out.print("MAYBEVOID|"); - if ((nAttribs & PropertyAttribute.BOUND) != 0) - System.out.print("BOUND|"); - if ((nAttribs & PropertyAttribute.CONSTRAINED) != 0) - System.out.print("CONSTRAINED|"); - if ((nAttribs & PropertyAttribute.READONLY) != 0) - System.out.print("READONLY|"); - if ((nAttribs & PropertyAttribute.TRANSIENT) != 0) - System.out.print("TRANSIENT|"); - if ((nAttribs & PropertyAttribute.MAYBEAMBIGUOUS ) != 0) - System.out.print("MAYBEAMBIGUOUS|"); - if ((nAttribs & PropertyAttribute.MAYBEDEFAULT) != 0) - System.out.print("MAYBEDEFAULT|"); - if ((nAttribs & PropertyAttribute.REMOVEABLE) != 0) - System.out.print("REMOVEABLE|"); - System.out.println("0>"); - } - } catch (Exception e) { - // If anything goes wrong, give the user a stack trace - e.printStackTrace(System.err); - } - } - - private boolean checkType(XPropertySet xProps, String aName, - String expected) - { - boolean ret = true; - System.out.println("Checking " + expected); - - String getting = - getPropertyByName(xProps, aName).getClass().getName(); - - if (!getting.equals(expected)) - { - System.out.println("\t Expected: " + expected); - System.out.println("\t Getting: " + getting); - ret = false; - } - - if (ret) - { - System.out.println("...OK"); - } - return ret; - } - - private Object getPropertyByName(XPropertySet xProps, String aName) - { - Object ret = null; - - try - { - ret = xProps.getPropertyValue(aName); - } - catch (Exception e) - { - System.out.println("\tCouldn't get Property " + aName); - System.out.println("\tMessage " + e); - } - - return ret; - } - - private boolean addProperty(XPropertyContainer xPropContainer, - String aName, short attr, Object defaults) - { - boolean ret = true; - - try - { - xPropContainer.addProperty(aName, attr, defaults); - } - catch (Exception e) - { - ret = false; - System.out.println("\tCouldn't get Property " + aName); - System.out.println("\tMessage " + e); - } - - return ret; - } - - private XMultiServiceFactory getMSF() - { - final XMultiServiceFactory xMSF1 = UnoRuntime.queryInterface(XMultiServiceFactory.class, connection.getComponentContext().getServiceManager()); - return xMSF1; - } - - // setup and close connections - @BeforeClass public static void setUpConnection() throws Exception - { - System.out.println( "------------------------------------------------------------" ); - System.out.println( "starting class: " + DocumentInfo.class.getName() ); - System.out.println( "------------------------------------------------------------" ); - connection.setUp(); - } - - @AfterClass public static void tearDownConnection() - throws InterruptedException, com.sun.star.uno.Exception - { - System.out.println( "------------------------------------------------------------" ); - System.out.println( "finishing class: " + DocumentInfo.class.getName() ); - System.out.println( "------------------------------------------------------------" ); - connection.tearDown(); - } - private static final OfficeConnection connection = new OfficeConnection(); -} diff --git a/sfx2/qa/complex/sfx2/StandaloneDocumentInfo.java b/sfx2/qa/complex/sfx2/StandaloneDocumentInfo.java deleted file mode 100644 index f7d9f679e8b0..000000000000 --- a/sfx2/qa/complex/sfx2/StandaloneDocumentInfo.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -package complex.sfx2; - -import com.sun.star.lang.XMultiServiceFactory; -import com.sun.star.uno.UnoRuntime; -import complex.sfx2.standalonedocinfo.StandaloneDocumentInfoTest; -import complex.sfx2.standalonedocinfo.Test01; - -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.*; - -/* Document here -*/ - -public class StandaloneDocumentInfo { - private XMultiServiceFactory m_xMSF = null; - - @Before public void before() { - try { - m_xMSF = getMSF(); - } catch(Exception e) { - fail( "Failed to create service factory!" ); - } - if( m_xMSF ==null ) { - fail( "Failed to create service factory!" ); - } - } - - @After public void after() { - m_xMSF = null; - } - - @Test public void ExecuteTest01() { - StandaloneDocumentInfoTest aTest = new Test01 (m_xMSF); - assertTrue( "Test01 failed!", aTest.test() ); - } - - - - - private XMultiServiceFactory getMSF() - { - final XMultiServiceFactory xMSF1 = UnoRuntime.queryInterface(XMultiServiceFactory.class, connection.getComponentContext().getServiceManager()); - return xMSF1; - } - - // setup and close connections - @BeforeClass public static void setUpConnection() throws Exception - { - System.out.println( "------------------------------------------------------------" ); - System.out.println( "starting class: " + StandaloneDocumentInfo.class.getName() ); - System.out.println( "------------------------------------------------------------" ); - connection.setUp(); - } - - @AfterClass public static void tearDownConnection() - throws InterruptedException, com.sun.star.uno.Exception - { - System.out.println( "------------------------------------------------------------" ); - System.out.println( "finishing class: " + StandaloneDocumentInfo.class.getName() ); - System.out.println( "------------------------------------------------------------" ); - connection.tearDown(); - } - - private static final OfficeConnection connection = new OfficeConnection(); - -} - - diff --git a/sfx2/qa/complex/sfx2/standalonedocinfo/StandaloneDocumentInfoTest.java b/sfx2/qa/complex/sfx2/standalonedocinfo/StandaloneDocumentInfoTest.java deleted file mode 100644 index 83ba5bda80a5..000000000000 --- a/sfx2/qa/complex/sfx2/standalonedocinfo/StandaloneDocumentInfoTest.java +++ /dev/null @@ -1,22 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -package complex.sfx2.standalonedocinfo; - -public interface StandaloneDocumentInfoTest { - boolean test(); -} diff --git a/sfx2/qa/complex/sfx2/standalonedocinfo/Test01.java b/sfx2/qa/complex/sfx2/standalonedocinfo/Test01.java deleted file mode 100644 index 66daa4fec787..000000000000 --- a/sfx2/qa/complex/sfx2/standalonedocinfo/Test01.java +++ /dev/null @@ -1,135 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -package complex.sfx2.standalonedocinfo; - -import complex.sfx2.standalonedocinfo.TestHelper; -import complex.sfx2.standalonedocinfo.StandaloneDocumentInfoTest; -import com.sun.star.lang.XMultiServiceFactory; -import com.sun.star.document.XStandaloneDocumentInfo; -import com.sun.star.io.XTempFile; -import com.sun.star.frame.XLoadable; -import com.sun.star.frame.XStorable; -import com.sun.star.beans.PropertyValue; -import com.sun.star.beans.XPropertySet; -import com.sun.star.uno.UnoRuntime; -import com.sun.star.uno.AnyConverter; - - -public class Test01 implements StandaloneDocumentInfoTest { - XMultiServiceFactory m_xMSF = null; - TestHelper m_aTestHelper = null; - - public Test01 ( XMultiServiceFactory xMSF ) { - m_xMSF = xMSF; - m_aTestHelper = new TestHelper( "Test01: " ); - } - - public boolean test() { - try { - final String sDocTitle [] = new String [] { - "ODF_Doc", "OOo6_Doc", "old_binary_Doc" }; - final String sFilterName [] = new String [] { - "writer8", "StarOffice XML (Writer)", "StarWriter 5.0" }; - - for (int i = 0; i < 3; ++i ) { - m_aTestHelper.Message ( "==============================" ); - m_aTestHelper.Message ( sFilterName[i] ); - m_aTestHelper.Message ( "==============================" ); - //create a new temporary file - Object oTempFile = m_xMSF.createInstance ( "com.sun.star.io.TempFile" ); - XTempFile xTempFile = UnoRuntime.queryInterface(XTempFile.class, oTempFile); - - //create a text document and initiallize it - Object oTextDocument = m_xMSF.createInstance ( "com.sun.star.text.TextDocument" ); - XLoadable xLoadable = UnoRuntime.queryInterface(XLoadable.class, oTextDocument); - xLoadable.initNew(); - m_aTestHelper.Message ( "New document initialized." ); - - //store the instance to the temporary file URL - XStorable xStorable = UnoRuntime.queryInterface(XStorable.class, oTextDocument); - String sURL = AnyConverter.toString ( xTempFile.getUri () ); - PropertyValue aProps[] = new PropertyValue[2]; - aProps[0] = new PropertyValue(); - aProps[0].Name = "DocumentTitle"; - aProps[0].Value = sDocTitle[i]; - aProps[1] = new PropertyValue(); - aProps[1].Name = "FilterName"; - aProps[1].Value = sFilterName[i]; - m_aTestHelper.Message ( "Set title: " + - sDocTitle[i] ); - xStorable.storeToURL ( sURL, aProps ); - m_aTestHelper.Message ( "Document stored." ); - - //create StandaloneDocumentInfo object and load it from the file - Object oStandaloneDocInfo = m_xMSF.createInstance ( - "com.sun.star.document.StandaloneDocumentInfo" ); - XStandaloneDocumentInfo xStandaloneDocInfo = - UnoRuntime.queryInterface(XStandaloneDocumentInfo.class, oStandaloneDocInfo); - xStandaloneDocInfo.loadFromURL ( sURL ); - m_aTestHelper.Message ( "StandaloneDocumentInfo loaded." ); - - //get the title from the object and check it - XPropertySet xPropSet = - UnoRuntime.queryInterface(XPropertySet.class, oStandaloneDocInfo); - String sTitle = xPropSet.getPropertyValue ( "Title" ).toString (); - m_aTestHelper.Message ( "Get title: " + sTitle ); - if ( sTitle.compareTo ( sDocTitle[i] ) != 0 ) { - m_aTestHelper.Error ( "Title not match. Expected \"" - + sDocTitle[i] + - "\"" ); - return false; - } else { - m_aTestHelper.Message ( "Title matched." ); - } - - //set a new title to the object - sTitle += "_new"; - xPropSet.setPropertyValue ( "Title", sTitle ); - m_aTestHelper.Message ( "Set new title: " + sTitle ); - - //store the object to the same file - xStandaloneDocInfo.storeIntoURL ( sURL ); - m_aTestHelper.Message ( "Document info stored." ); - - //create a new StandaloneDocumentInfo object and load it from the file - Object oStandaloneDocInfo_ = m_xMSF.createInstance ( - "com.sun.star.document.StandaloneDocumentInfo" ); - XStandaloneDocumentInfo xStandaloneDocInfo_ = - UnoRuntime.queryInterface(XStandaloneDocumentInfo.class, oStandaloneDocInfo_); - xStandaloneDocInfo_.loadFromURL ( sURL ); - m_aTestHelper.Message ( "New StandaloneDocumentInfo loaded." ); - - //get the title and check it - XPropertySet xPropSet_ = UnoRuntime.queryInterface(XPropertySet.class, oStandaloneDocInfo_); - String sTitle_ = xPropSet_.getPropertyValue ( "Title" ).toString (); - m_aTestHelper.Message ( "Get new title: " + sTitle_ ); - if ( sTitle_.compareTo ( sTitle ) != 0 ) { - m_aTestHelper.Error ( "New title not matched. Expected: \"" + sTitle - + "\"." ); - return false; - } else { - m_aTestHelper.Message ( "New title matched." ); - } - } - } catch ( Exception e ) { - m_aTestHelper.Error( "Exception: " + e ); - return false; - } - return true; - } -} diff --git a/sfx2/qa/complex/sfx2/standalonedocinfo/TestHelper.java b/sfx2/qa/complex/sfx2/standalonedocinfo/TestHelper.java deleted file mode 100644 index 18e5d5402cf7..000000000000 --- a/sfx2/qa/complex/sfx2/standalonedocinfo/TestHelper.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -package complex.sfx2.standalonedocinfo; - - -public class TestHelper { - - String m_sTestPrefix; - - /** Creates a new instance of TestHelper - * @param sTestPrefix - */ - public TestHelper ( String sTestPrefix ) { - m_sTestPrefix = sTestPrefix; - } - - public void Error ( String sError ) { - System.out.println ( m_sTestPrefix + "Error: " + sError ); - } - - public void Message ( String sMessage ) { - System.out.println ( m_sTestPrefix + sMessage ); - } -} |