[Libreoffice-commits] .: 2 commits - i18npool/CppunitTest_i18npool_test_breakiterator.mk i18npool/prj Repository.mk solenv/inc test/inc test/prj test/source unotest/inc unotest/prj unotest/source
Michael Meeks
michael at kemper.freedesktop.org
Wed Sep 28 09:54:45 PDT 2011
Repository.mk | 1
i18npool/CppunitTest_i18npool_test_breakiterator.mk | 9
i18npool/prj/build.lst | 2
solenv/inc/libs.mk | 2
test/inc/makefile.mk | 38 -
test/inc/pch/precompiled_test.cxx | 29
test/inc/pch/precompiled_test.hxx | 33 -
test/inc/test/bootstrapfixture.hxx | 2
test/inc/test/detail/testdllapi.hxx | 42 -
test/inc/test/gettestargument.hxx | 49 -
test/inc/test/officeconnection.hxx | 71 --
test/inc/test/oustringostreaminserter.hxx | 51 -
test/inc/test/testdllapi.hxx | 42 +
test/inc/test/toabsolutefileurl.hxx | 47 -
test/inc/test/uniquepipename.hxx | 47 -
test/prj/build.lst | 8
test/prj/d.lst | 11
test/source/bootstrapfixture.cxx | 115 +++
test/source/cpp/bootstrapfixture.cxx | 115 ---
test/source/cpp/getargument.cxx | 50 -
test/source/cpp/getargument.hxx | 47 -
test/source/cpp/gettestargument.cxx | 46 -
test/source/cpp/makefile.mk | 69 --
test/source/cpp/officeconnection.cxx | 192 -----
test/source/cpp/toabsolutefileurl.cxx | 86 --
test/source/cpp/uniquepipename.cxx | 52 -
test/source/cpp/unoexceptionprotector/makefile.mk | 59 -
test/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx | 125 ---
test/source/java/org/openoffice/test/Argument.java | 36 -
test/source/java/org/openoffice/test/FileHelper.java | 62 -
test/source/java/org/openoffice/test/OfficeConnection.java | 229 ------
test/source/java/org/openoffice/test/OfficeFileUrl.java | 42 -
test/source/java/org/openoffice/test/TestArgument.java | 39 -
test/source/java/org/openoffice/test/UnoApiTest.java | 52 -
test/source/java/org/openoffice/test/makefile.mk | 57 -
test/source/java/org/openoffice/test/tools/DocumentType.java | 64 -
test/source/java/org/openoffice/test/tools/OfficeDocument.java | 328 ----------
test/source/java/org/openoffice/test/tools/OfficeDocumentView.java | 144 ----
test/source/java/org/openoffice/test/tools/SpreadsheetDocument.java | 73 --
test/source/java/org/openoffice/test/tools/SpreadsheetView.java | 72 --
test/source/java/org/openoffice/test/tools/makefile.mk | 49 -
test/source/makefile.mk | 65 +
unotest/inc/unotest/detail/unotestdllapi.hxx | 41 +
unotest/inc/unotest/gettestargument.hxx | 49 +
unotest/inc/unotest/officeconnection.hxx | 71 ++
unotest/inc/unotest/oustringostreaminserter.hxx | 51 +
unotest/inc/unotest/toabsolutefileurl.hxx | 47 +
unotest/inc/unotest/uniquepipename.hxx | 47 +
unotest/prj/build.lst | 5
unotest/prj/d.lst | 18
unotest/source/cpp/getargument.cxx | 50 +
unotest/source/cpp/getargument.hxx | 47 +
unotest/source/cpp/gettestargument.cxx | 46 +
unotest/source/cpp/makefile.mk | 63 +
unotest/source/cpp/officeconnection.cxx | 192 +++++
unotest/source/cpp/toabsolutefileurl.cxx | 86 ++
unotest/source/cpp/uniquepipename.cxx | 52 +
unotest/source/cpp/unoexceptionprotector/makefile.mk | 59 +
unotest/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx | 124 +++
unotest/source/java/org/openoffice/test/Argument.java | 36 +
unotest/source/java/org/openoffice/test/FileHelper.java | 62 +
unotest/source/java/org/openoffice/test/OfficeConnection.java | 229 ++++++
unotest/source/java/org/openoffice/test/OfficeFileUrl.java | 42 +
unotest/source/java/org/openoffice/test/TestArgument.java | 39 +
unotest/source/java/org/openoffice/test/UnoApiTest.java | 52 +
unotest/source/java/org/openoffice/test/makefile.mk | 57 +
unotest/source/java/org/openoffice/test/tools/DocumentType.java | 64 +
unotest/source/java/org/openoffice/test/tools/OfficeDocument.java | 328 ++++++++++
unotest/source/java/org/openoffice/test/tools/OfficeDocumentView.java | 144 ++++
unotest/source/java/org/openoffice/test/tools/SpreadsheetDocument.java | 73 ++
unotest/source/java/org/openoffice/test/tools/SpreadsheetView.java | 72 ++
unotest/source/java/org/openoffice/test/tools/makefile.mk | 49 +
72 files changed, 2527 insertions(+), 2520 deletions(-)
New commits:
commit 5e4451575964151dbe7b0e905d0a9f4757f609d2
Author: Michael Meeks <michael.meeks at suse.com>
Date: Wed Sep 28 15:57:53 2011 +0100
Rename and re-factor test and unotest to compile and run again
diff --git a/test/inc/test/bootstrapfixture.hxx b/test/inc/test/bootstrapfixture.hxx
index 791710c..7a0cc90 100644
--- a/test/inc/test/bootstrapfixture.hxx
+++ b/test/inc/test/bootstrapfixture.hxx
@@ -40,7 +40,7 @@
#include "cppunit/TestFixture.h"
#include "cppunit/extensions/HelperMacros.h"
#include "cppunit/plugin/TestPlugIn.h"
-#include "test/detail/testdllapi.hxx"
+#include "test/testdllapi.hxx"
namespace test {
diff --git a/test/inc/test/detail/testdllapi.hxx b/test/inc/test/detail/testdllapi.hxx
deleted file mode 100644
index bc2231c..0000000
--- a/test/inc/test/detail/testdllapi.hxx
+++ /dev/null
@@ -1,42 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
-* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-*
-* Copyright 2000, 2010 Oracle and/or its affiliates.
-*
-* OpenOffice.org - a multi-platform office productivity suite
-*
-* This file is part of OpenOffice.org.
-*
-* OpenOffice.org is free software: you can redistribute it and/or modify
-* it under the terms of the GNU Lesser General Public License version 3
-* only, as published by the Free Software Foundation.
-*
-* OpenOffice.org is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU Lesser General Public License version 3 for more details
-* (a copy is included in the LICENSE file that accompanied this code).
-*
-* You should have received a copy of the GNU Lesser General Public License
-* version 3 along with OpenOffice.org. If not, see
-* <http://www.openoffice.org/license.html>
-* for a copy of the LGPLv3 License.
-************************************************************************/
-
-#ifndef INCLUDED_TEST_DETAIL_TESTDLLAPI_HXX
-#define INCLUDED_TEST_DETAIL_TESTDLLAPI_HXX
-
-#include "sal/config.h"
-
-#include "sal/types.h"
-
-#if defined OOO_DLLIMPLEMENTATION_TEST
-#define OOO_DLLPUBLIC_TEST SAL_DLLPUBLIC_EXPORT
-#else
-#define OOO_DLLPUBLIC_TEST SAL_DLLPUBLIC_IMPORT
-#endif
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/test/inc/test/gettestargument.hxx b/test/inc/test/gettestargument.hxx
deleted file mode 100644
index 4fe1114..0000000
--- a/test/inc/test/gettestargument.hxx
+++ /dev/null
@@ -1,49 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
-*
-* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-*
-* Copyright 2000, 2010 Oracle and/or its affiliates.
-*
-* OpenOffice.org - a multi-platform office productivity suite
-*
-* This file is part of OpenOffice.org.
-*
-* OpenOffice.org is free software: you can redistribute it and/or modify
-* it under the terms of the GNU Lesser General Public License version 3
-* only, as published by the Free Software Foundation.
-*
-* OpenOffice.org is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU Lesser General Public License version 3 for more details
-* (a copy is included in the LICENSE file that accompanied this code).
-*
-* You should have received a copy of the GNU Lesser General Public License
-* version 3 along with OpenOffice.org. If not, see
-* <http://www.openoffice.org/license.html>
-* for a copy of the LGPLv3 License.
-*
-************************************************************************/
-
-#ifndef INCLUDED_TEST_GETTESTARGUMENT_HXX
-#define INCLUDED_TEST_GETTESTARGUMENT_HXX
-
-#include "sal/config.h"
-
-#include "test/detail/testdllapi.hxx"
-
-namespace rtl { class OUString; }
-
-namespace test {
-
-// Obtain the value of a test argument (tunneled in via an "arg-testarg.<name>"
-// bootstrap variable):
-OOO_DLLPUBLIC_TEST bool getTestArgument(
- rtl::OUString const & name, rtl::OUString * value);
-
-}
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/test/inc/test/officeconnection.hxx b/test/inc/test/officeconnection.hxx
deleted file mode 100644
index e5250ce..0000000
--- a/test/inc/test/officeconnection.hxx
+++ /dev/null
@@ -1,71 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
-* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-*
-* Copyright 2000, 2010 Oracle and/or its affiliates.
-*
-* OpenOffice.org - a multi-platform office productivity suite
-*
-* This file is part of OpenOffice.org.
-*
-* OpenOffice.org is free software: you can redistribute it and/or modify
-* it under the terms of the GNU Lesser General Public License version 3
-* only, as published by the Free Software Foundation.
-*
-* OpenOffice.org is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU Lesser General Public License version 3 for more details
-* (a copy is included in the LICENSE file that accompanied this code).
-*
-* You should have received a copy of the GNU Lesser General Public License
-* version 3 along with OpenOffice.org. If not, see
-* <http://www.openoffice.org/license.html>
-* for a copy of the LGPLv3 License.
-************************************************************************/
-
-#ifndef INCLUDED_TEST_OFFICECONNECTION_HXX
-#define INCLUDED_TEST_OFFICECONNECTION_HXX
-
-#include "sal/config.h"
-
-#include "boost/noncopyable.hpp"
-#include "com/sun/star/uno/Reference.hxx"
-#include "osl/process.h"
-#include "test/detail/testdllapi.hxx"
-
-namespace com { namespace sun { namespace star { namespace uno {
- class XComponentContext;
-} } } }
-
-namespace test {
-
-// Start up and shut down an OOo instance (details about the OOo instance are
-// tunneled in via "arg-..." bootstrap variables):
-class OOO_DLLPUBLIC_TEST OfficeConnection: private boost::noncopyable {
-public:
- OfficeConnection();
-
- ~OfficeConnection();
-
- void setUp();
-
- void tearDown();
-
- com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >
- getComponentContext() const;
-
- // Must not be called before setUp or after tearDown:
- bool isStillAlive() const;
-
-private:
- oslProcess process_;
- com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >
- context_;
-};
-
-}
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/test/inc/test/oustringostreaminserter.hxx b/test/inc/test/oustringostreaminserter.hxx
deleted file mode 100644
index 2658cad..0000000
--- a/test/inc/test/oustringostreaminserter.hxx
+++ /dev/null
@@ -1,51 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
-* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-*
-* Copyright 2000, 2010 Oracle and/or its affiliates.
-*
-* OpenOffice.org - a multi-platform office productivity suite
-*
-* This file is part of OpenOffice.org.
-*
-* OpenOffice.org is free software: you can redistribute it and/or modify
-* it under the terms of the GNU Lesser General Public License version 3
-* only, as published by the Free Software Foundation.
-*
-* OpenOffice.org is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU Lesser General Public License version 3 for more details
-* (a copy is included in the LICENSE file that accompanied this code).
-*
-* You should have received a copy of the GNU Lesser General Public License
-* version 3 along with OpenOffice.org. If not, see
-* <http://www.openoffice.org/license.html>
-* for a copy of the LGPLv3 License.
-************************************************************************/
-
-#ifndef INCLUDED_TEST_OUSTRINGOSTREAMINSERTER_HXX
-#define INCLUDED_TEST_OUSTRINGOSTREAMINSERTER_HXX
-
-#include "sal/config.h"
-
-#include <ostream>
-
-#include "osl/thread.h"
-#include "rtl/ustring.hxx"
-
-// Include this header to support rtl::OUString in CPPUNIT_ASSERT macros.
-
-template< typename charT, typename traits > std::basic_ostream<charT, traits> &
-operator <<(
- std::basic_ostream<charT, traits> & stream, rtl::OUString const & string)
-{
- return stream <<
- rtl::OUStringToOString(string, osl_getThreadTextEncoding()).getStr();
- // best effort; potentially loses data due to conversion failures and
- // embedded null characters
-}
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/test/inc/test/testdllapi.hxx b/test/inc/test/testdllapi.hxx
new file mode 100644
index 0000000..bc2231c
--- /dev/null
+++ b/test/inc/test/testdllapi.hxx
@@ -0,0 +1,42 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+************************************************************************/
+
+#ifndef INCLUDED_TEST_DETAIL_TESTDLLAPI_HXX
+#define INCLUDED_TEST_DETAIL_TESTDLLAPI_HXX
+
+#include "sal/config.h"
+
+#include "sal/types.h"
+
+#if defined OOO_DLLIMPLEMENTATION_TEST
+#define OOO_DLLPUBLIC_TEST SAL_DLLPUBLIC_EXPORT
+#else
+#define OOO_DLLPUBLIC_TEST SAL_DLLPUBLIC_IMPORT
+#endif
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/test/inc/test/toabsolutefileurl.hxx b/test/inc/test/toabsolutefileurl.hxx
deleted file mode 100644
index fdd8a7b..0000000
--- a/test/inc/test/toabsolutefileurl.hxx
+++ /dev/null
@@ -1,47 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
-* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-*
-* Copyright 2000, 2010 Oracle and/or its affiliates.
-*
-* OpenOffice.org - a multi-platform office productivity suite
-*
-* This file is part of OpenOffice.org.
-*
-* OpenOffice.org is free software: you can redistribute it and/or modify
-* it under the terms of the GNU Lesser General Public License version 3
-* only, as published by the Free Software Foundation.
-*
-* OpenOffice.org is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU Lesser General Public License version 3 for more details
-* (a copy is included in the LICENSE file that accompanied this code).
-*
-* You should have received a copy of the GNU Lesser General Public License
-* version 3 along with OpenOffice.org. If not, see
-* <http://www.openoffice.org/license.html>
-* for a copy of the LGPLv3 License.
-************************************************************************/
-
-#ifndef INCLUDED_TEST_TOABSOLUTEFILEURL_HXX
-#define INCLUDED_TEST_TOABSOLUTEFILEURL_HXX
-
-#include "sal/config.h"
-
-#include "test/detail/testdllapi.hxx"
-
-namespace rtl { class OUString; }
-
-namespace test {
-
-// Convert a pathname in system notation, potentially relative to the process's
-// current working directory, to an absolute file URL:
-OOO_DLLPUBLIC_TEST rtl::OUString toAbsoluteFileUrl(
- rtl::OUString const & relativePathname);
-
-}
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/test/inc/test/uniquepipename.hxx b/test/inc/test/uniquepipename.hxx
deleted file mode 100644
index b66492c..0000000
--- a/test/inc/test/uniquepipename.hxx
+++ /dev/null
@@ -1,47 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
-*
-* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-*
-* Copyright 2000, 2010 Oracle and/or its affiliates.
-*
-* OpenOffice.org - a multi-platform office productivity suite
-*
-* This file is part of OpenOffice.org.
-*
-* OpenOffice.org is free software: you can redistribute it and/or modify
-* it under the terms of the GNU Lesser General Public License version 3
-* only, as published by the Free Software Foundation.
-*
-* OpenOffice.org is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU Lesser General Public License version 3 for more details
-* (a copy is included in the LICENSE file that accompanied this code).
-*
-* You should have received a copy of the GNU Lesser General Public License
-* version 3 along with OpenOffice.org. If not, see
-* <http://www.openoffice.org/license.html>
-* for a copy of the LGPLv3 License.
-*
-************************************************************************/
-
-#ifndef INCLUDED_TEST_UNIQUEPIPENAME_HXX
-#define INCLUDED_TEST_UNIQUEPIPENAME_HXX
-
-#include "sal/config.h"
-
-#include "test/detail/testdllapi.hxx"
-
-namespace rtl { class OUString; }
-
-namespace test {
-
-// Create a system-wide unique name (for use with osl::Pipe):
-OOO_DLLPUBLIC_TEST rtl::OUString uniquePipeName(rtl::OUString const & name);
-
-}
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/test/prj/build.lst b/test/prj/build.lst
index c99600b..f2209a9 100644
--- a/test/prj/build.lst
+++ b/test/prj/build.lst
@@ -1,2 +1,2 @@
te test : unotest vcl NULL
-te test\source\cpp nmake - all source_cpp inc NULL
+te test\source nmake - all source_cpp NULL
diff --git a/test/source/bootstrapfixture.cxx b/test/source/bootstrapfixture.cxx
new file mode 100644
index 0000000..d46cf4d
--- /dev/null
+++ b/test/source/bootstrapfixture.cxx
@@ -0,0 +1,115 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License or as specified alternatively below. You may obtain a copy of
+ * the License at http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * Major Contributor(s):
+ * Copyright (C) 2011 Michael Meeks <michael.meeks at suse.com>
+ * Caolán McNamara <caolanm at redhat.com>
+ *
+ * All Rights Reserved.
+ *
+ * For minor contributions see the git repository.
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
+#include <test/bootstrapfixture.hxx>
+#include <tools/errinf.hxx>
+#include <rtl/strbuf.hxx>
+#include <cppuhelper/bootstrap.hxx>
+#include <ucbhelper/contentbroker.hxx>
+#include <comphelper/processfactory.hxx>
+
+#include <com/sun/star/lang/Locale.hpp>
+#include <com/sun/star/lang/XComponent.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+
+#include <vcl/svapp.hxx>
+#include <tools/resmgr.hxx>
+#include <unotools/syslocaleoptions.hxx>
+
+using namespace ::com::sun::star;
+
+static void aBasicErrorFunc( const String &rErr, const String &rAction )
+{
+ rtl::OStringBuffer aErr( "Unexpected dialog: " );
+ aErr.append( rtl::OUStringToOString( rAction, RTL_TEXTENCODING_ASCII_US ) );
+ aErr.append( " Error: " );
+ aErr.append( rtl::OUStringToOString( rErr, RTL_TEXTENCODING_ASCII_US ) );
+ CPPUNIT_ASSERT_MESSAGE( aErr.getStr(), false);
+}
+
+test::BootstrapFixture::BootstrapFixture( bool bAssertOnDialog )
+ : m_aSrcRootURL(RTL_CONSTASCII_USTRINGPARAM("file://"))
+{
+ m_xContext = cppu::defaultBootstrap_InitialComponentContext();
+ m_xFactory = m_xContext->getServiceManager();
+ m_xSFactory = uno::Reference<lang::XMultiServiceFactory> (m_xFactory, uno::UNO_QUERY_THROW);
+
+ //Without this we're crashing because callees are using
+ //getProcessServiceFactory. In general those should be removed in favour
+ //of retaining references to the root ServiceFactory as its passed around
+ comphelper::setProcessServiceFactory(m_xSFactory);
+
+ // initialise UCB-Broker
+ uno::Sequence<uno::Any> aUcbInitSequence(2);
+ aUcbInitSequence[0] <<= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Local"));
+ aUcbInitSequence[1] <<= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Office"));
+ bool bInitUcb = ucbhelper::ContentBroker::initialize(m_xSFactory, aUcbInitSequence);
+ CPPUNIT_ASSERT_MESSAGE("Should be able to initialize UCB", bInitUcb);
+
+ uno::Reference<ucb::XContentProviderManager> xUcb =
+ ucbhelper::ContentBroker::get()->getContentProviderManagerInterface();
+ uno::Reference<ucb::XContentProvider> xFileProvider(m_xSFactory->createInstance(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.FileContentProvider"))), uno::UNO_QUERY);
+ xUcb->registerContentProvider(xFileProvider, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("file")), sal_True);
+
+ // force locale (and resource files loaded) to en-US
+ rtl::OUString aLang( RTL_CONSTASCII_USTRINGPARAM( "en" ) );
+ rtl::OUString aCountry( RTL_CONSTASCII_USTRINGPARAM( "US" ) );
+ rtl::OUString aISO( RTL_CONSTASCII_USTRINGPARAM( "en-US" ) );
+ lang::Locale aLocale(aLang, aCountry, rtl::OUString());
+ ResMgr::SetDefaultLocale( aLocale );
+ SvtSysLocaleOptions aLocalOptions;
+ aLocalOptions.SetUILocaleConfigString( aISO );
+
+ InitVCL(m_xSFactory);
+
+ if( bAssertOnDialog )
+ ErrorHandler::RegisterDisplay( aBasicErrorFunc );
+
+ const char* pSrcRoot = getenv( "SRC_ROOT" );
+ CPPUNIT_ASSERT_MESSAGE("SRC_ROOT env variable not set", pSrcRoot != NULL && pSrcRoot[0] != 0);
+
+#ifdef WNT
+ if (pSrcRoot[1] == ':')
+ m_aSrcRootURL += rtl::OUString::createFromAscii( "/" );
+#endif
+ m_aSrcRootPath = rtl::OUString::createFromAscii( pSrcRoot );
+ m_aSrcRootURL += m_aSrcRootPath;
+}
+
+test::BootstrapFixture::~BootstrapFixture()
+{
+ uno::Reference< lang::XComponent >(m_xContext, uno::UNO_QUERY_THROW)->dispose();
+}
+
+::rtl::OUString test::BootstrapFixture::getURLFromSrc( const char *pPath )
+{
+ return m_aSrcRootURL + rtl::OUString::createFromAscii( pPath );
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/test/source/cpp/bootstrapfixture.cxx b/test/source/cpp/bootstrapfixture.cxx
deleted file mode 100644
index d46cf4d..0000000
--- a/test/source/cpp/bootstrapfixture.cxx
+++ /dev/null
@@ -1,115 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * Version: MPL 1.1 / GPLv3+ / LGPLv3+
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License or as specified alternatively below. You may obtain a copy of
- * the License at http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * Major Contributor(s):
- * Copyright (C) 2011 Michael Meeks <michael.meeks at suse.com>
- * Caolán McNamara <caolanm at redhat.com>
- *
- * All Rights Reserved.
- *
- * For minor contributions see the git repository.
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
- * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
- * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
- * instead of those above.
- */
-#include <test/bootstrapfixture.hxx>
-#include <tools/errinf.hxx>
-#include <rtl/strbuf.hxx>
-#include <cppuhelper/bootstrap.hxx>
-#include <ucbhelper/contentbroker.hxx>
-#include <comphelper/processfactory.hxx>
-
-#include <com/sun/star/lang/Locale.hpp>
-#include <com/sun/star/lang/XComponent.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-
-#include <vcl/svapp.hxx>
-#include <tools/resmgr.hxx>
-#include <unotools/syslocaleoptions.hxx>
-
-using namespace ::com::sun::star;
-
-static void aBasicErrorFunc( const String &rErr, const String &rAction )
-{
- rtl::OStringBuffer aErr( "Unexpected dialog: " );
- aErr.append( rtl::OUStringToOString( rAction, RTL_TEXTENCODING_ASCII_US ) );
- aErr.append( " Error: " );
- aErr.append( rtl::OUStringToOString( rErr, RTL_TEXTENCODING_ASCII_US ) );
- CPPUNIT_ASSERT_MESSAGE( aErr.getStr(), false);
-}
-
-test::BootstrapFixture::BootstrapFixture( bool bAssertOnDialog )
- : m_aSrcRootURL(RTL_CONSTASCII_USTRINGPARAM("file://"))
-{
- m_xContext = cppu::defaultBootstrap_InitialComponentContext();
- m_xFactory = m_xContext->getServiceManager();
- m_xSFactory = uno::Reference<lang::XMultiServiceFactory> (m_xFactory, uno::UNO_QUERY_THROW);
-
- //Without this we're crashing because callees are using
- //getProcessServiceFactory. In general those should be removed in favour
- //of retaining references to the root ServiceFactory as its passed around
- comphelper::setProcessServiceFactory(m_xSFactory);
-
- // initialise UCB-Broker
- uno::Sequence<uno::Any> aUcbInitSequence(2);
- aUcbInitSequence[0] <<= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Local"));
- aUcbInitSequence[1] <<= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Office"));
- bool bInitUcb = ucbhelper::ContentBroker::initialize(m_xSFactory, aUcbInitSequence);
- CPPUNIT_ASSERT_MESSAGE("Should be able to initialize UCB", bInitUcb);
-
- uno::Reference<ucb::XContentProviderManager> xUcb =
- ucbhelper::ContentBroker::get()->getContentProviderManagerInterface();
- uno::Reference<ucb::XContentProvider> xFileProvider(m_xSFactory->createInstance(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.FileContentProvider"))), uno::UNO_QUERY);
- xUcb->registerContentProvider(xFileProvider, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("file")), sal_True);
-
- // force locale (and resource files loaded) to en-US
- rtl::OUString aLang( RTL_CONSTASCII_USTRINGPARAM( "en" ) );
- rtl::OUString aCountry( RTL_CONSTASCII_USTRINGPARAM( "US" ) );
- rtl::OUString aISO( RTL_CONSTASCII_USTRINGPARAM( "en-US" ) );
- lang::Locale aLocale(aLang, aCountry, rtl::OUString());
- ResMgr::SetDefaultLocale( aLocale );
- SvtSysLocaleOptions aLocalOptions;
- aLocalOptions.SetUILocaleConfigString( aISO );
-
- InitVCL(m_xSFactory);
-
- if( bAssertOnDialog )
- ErrorHandler::RegisterDisplay( aBasicErrorFunc );
-
- const char* pSrcRoot = getenv( "SRC_ROOT" );
- CPPUNIT_ASSERT_MESSAGE("SRC_ROOT env variable not set", pSrcRoot != NULL && pSrcRoot[0] != 0);
-
-#ifdef WNT
- if (pSrcRoot[1] == ':')
- m_aSrcRootURL += rtl::OUString::createFromAscii( "/" );
-#endif
- m_aSrcRootPath = rtl::OUString::createFromAscii( pSrcRoot );
- m_aSrcRootURL += m_aSrcRootPath;
-}
-
-test::BootstrapFixture::~BootstrapFixture()
-{
- uno::Reference< lang::XComponent >(m_xContext, uno::UNO_QUERY_THROW)->dispose();
-}
-
-::rtl::OUString test::BootstrapFixture::getURLFromSrc( const char *pPath )
-{
- return m_aSrcRootURL + rtl::OUString::createFromAscii( pPath );
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/test/source/cpp/makefile.mk b/test/source/cpp/makefile.mk
deleted file mode 100644
index 262326a..0000000
--- a/test/source/cpp/makefile.mk
+++ /dev/null
@@ -1,64 +0,0 @@
-#*************************************************************************
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#***********************************************************************/
-
-PRJ = ../..
-PRJNAME = test
-TARGET = cpp
-
-ENABLE_EXCEPTIONS = TRUE
-VISIBILITY_HIDDEN = TRUE
-
-.INCLUDE: settings.mk
-
-# --- Files --------------------------------------------------------
-CDEFS += -DOOO_DLLIMPLEMENTATION_TEST
-
-CFLAGSCXX += $(CPPUNIT_CFLAGS)
-
-SLOFILES = \
- $(SLO)/bootstrapfixture.obj
-
-.IF "$(CROSS_COMPILING)" == "YES"
-SHL1IMPLIB = $(SHL1TARGET)
-.ELSE
-SHL1IMPLIB = i$(SHL1TARGET)
-.ENDIF
-SHL1OBJS = $(SLOFILES)
-SHL1RPATH = NONE
-SHL1STDLIBS = \
- $(VCLLIB) \
- $(TOOLSLIB) \
- $(UCBHELPERLIB) \
- $(COMPHELPERLIB) \
- $(CPPUHELPERLIB) \
- $(UNOTOOLSLIB) \
- $(CPPULIB) \
- $(CPPUNITLIB) \
- $(SALLIB)
-SHL1TARGET = test
-SHL1USE_EXPORTS = name
-DEF1NAME = $(SHL1TARGET)
-
-.INCLUDE: target.mk
diff --git a/test/source/makefile.mk b/test/source/makefile.mk
new file mode 100644
index 0000000..c2266ce
--- /dev/null
+++ b/test/source/makefile.mk
@@ -0,0 +1,65 @@
+#*************************************************************************
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#***********************************************************************/
+
+PRJ = ..
+PRJNAME = test
+TARGET = cpp
+
+ENABLE_EXCEPTIONS = TRUE
+VISIBILITY_HIDDEN = TRUE
+
+.INCLUDE: settings.mk
+
+# --- Files --------------------------------------------------------
+CDEFS += -DOOO_DLLIMPLEMENTATION_TEST
+
+CFLAGSCXX += $(CPPUNIT_CFLAGS)
+
+SLOFILES = \
+ $(SLO)/bootstrapfixture.obj
+
+.IF "$(CROSS_COMPILING)" == "YES"
+SHL1IMPLIB = $(SHL1TARGET)
+.ELSE
+SHL1IMPLIB = i$(SHL1TARGET)
+.ENDIF
+SHL1OBJS = $(SLOFILES)
+SHL1RPATH = NONE
+SHL1STDLIBS = \
+ $(UNOTESTLIB) \
+ $(VCLLIB) \
+ $(TOOLSLIB) \
+ $(UCBHELPERLIB) \
+ $(COMPHELPERLIB) \
+ $(CPPUHELPERLIB) \
+ $(UNOTOOLSLIB) \
+ $(CPPULIB) \
+ $(CPPUNITLIB) \
+ $(SALLIB)
+SHL1TARGET = test
+SHL1USE_EXPORTS = name
+DEF1NAME = $(SHL1TARGET)
+
+.INCLUDE: target.mk
diff --git a/unotest/inc/unotest/gettestargument.hxx b/unotest/inc/unotest/gettestargument.hxx
index 4fe1114..bc4ad1b 100644
--- a/unotest/inc/unotest/gettestargument.hxx
+++ b/unotest/inc/unotest/gettestargument.hxx
@@ -31,7 +31,7 @@
#include "sal/config.h"
-#include "test/detail/testdllapi.hxx"
+#include "unotest/detail/unotestdllapi.hxx"
namespace rtl { class OUString; }
@@ -39,7 +39,7 @@ namespace test {
// Obtain the value of a test argument (tunneled in via an "arg-testarg.<name>"
// bootstrap variable):
-OOO_DLLPUBLIC_TEST bool getTestArgument(
+OOO_DLLPUBLIC_UNOTEST bool getTestArgument(
rtl::OUString const & name, rtl::OUString * value);
}
diff --git a/unotest/inc/unotest/officeconnection.hxx b/unotest/inc/unotest/officeconnection.hxx
index e5250ce..f79e0de 100644
--- a/unotest/inc/unotest/officeconnection.hxx
+++ b/unotest/inc/unotest/officeconnection.hxx
@@ -32,7 +32,7 @@
#include "boost/noncopyable.hpp"
#include "com/sun/star/uno/Reference.hxx"
#include "osl/process.h"
-#include "test/detail/testdllapi.hxx"
+#include "unotest/detail/unotestdllapi.hxx"
namespace com { namespace sun { namespace star { namespace uno {
class XComponentContext;
@@ -42,7 +42,7 @@ namespace test {
// Start up and shut down an OOo instance (details about the OOo instance are
// tunneled in via "arg-..." bootstrap variables):
-class OOO_DLLPUBLIC_TEST OfficeConnection: private boost::noncopyable {
+class OOO_DLLPUBLIC_UNOTEST OfficeConnection: private boost::noncopyable {
public:
OfficeConnection();
diff --git a/unotest/inc/unotest/uniquepipename.hxx b/unotest/inc/unotest/uniquepipename.hxx
index b66492c..0a9b2c1 100644
--- a/unotest/inc/unotest/uniquepipename.hxx
+++ b/unotest/inc/unotest/uniquepipename.hxx
@@ -31,14 +31,14 @@
#include "sal/config.h"
-#include "test/detail/testdllapi.hxx"
+#include "unotest/detail/unotestdllapi.hxx"
namespace rtl { class OUString; }
namespace test {
// Create a system-wide unique name (for use with osl::Pipe):
-OOO_DLLPUBLIC_TEST rtl::OUString uniquePipeName(rtl::OUString const & name);
+OOO_DLLPUBLIC_UNOTEST rtl::OUString uniquePipeName(rtl::OUString const & name);
}
diff --git a/unotest/prj/build.lst b/unotest/prj/build.lst
index 1bb6c71..d3be738 100644
--- a/unotest/prj/build.lst
+++ b/unotest/prj/build.lst
@@ -1,5 +1,5 @@
-unote unotest : BOOST:boost cppu cppuhelper CPPUNIT:cppunit javaunohelper offapi ridljar sal solenv stlport unoil qadevOOo vcl NULL
-unote unotest\source\cpp nmake - all source_cpp inc NULL
-unote unotest\source\cpp\unoexceptionprotector nmake - all source_cpp_unoexceptionprotector inc NULL
+unote unotest : BOOST:boost cppu cppuhelper CPPUNIT:cppunit javaunohelper offapi ridljar sal solenv stlport unoil qadevOOo NULL
+unote unotest\source\cpp nmake - all source_cpp NULL
+unote unotest\source\cpp\unoexceptionprotector nmake - all source_cpp_unoexceptionprotector NULL
unote unotest\source\java\org\openoffice\test nmake - all source_java NULL
unote unotest\source\java\org\openoffice\test\tools nmake - all source_java_tools NULL
diff --git a/unotest/source/cpp/gettestargument.cxx b/unotest/source/cpp/gettestargument.cxx
index 0bc0006..24e5c57 100644
--- a/unotest/source/cpp/gettestargument.cxx
+++ b/unotest/source/cpp/gettestargument.cxx
@@ -30,7 +30,7 @@
#include "rtl/ustring.h"
#include "rtl/ustring.hxx"
-#include "test/gettestargument.hxx"
+#include "unotest/gettestargument.hxx"
#include "getargument.hxx"
diff --git a/unotest/source/cpp/makefile.mk b/unotest/source/cpp/makefile.mk
index 31eafda..b28b1ed 100644
--- a/unotest/source/cpp/makefile.mk
+++ b/unotest/source/cpp/makefile.mk
@@ -40,7 +40,6 @@ CFLAGSCXX += $(CPPUNIT_CFLAGS)
SLOFILES = \
$(SLO)/getargument.obj \
$(SLO)/gettestargument.obj \
- $(SLO)/bootstrapfixture.obj \
$(SLO)/officeconnection.obj \
$(SLO)/toabsolutefileurl.obj \
$(SLO)/uniquepipename.obj
@@ -53,16 +52,11 @@ SHL1IMPLIB = i$(SHL1TARGET)
SHL1OBJS = $(SLOFILES)
SHL1RPATH = NONE
SHL1STDLIBS = \
- $(VCLLIB) \
- $(TOOLSLIB) \
- $(UCBHELPERLIB) \
- $(COMPHELPERLIB) \
$(CPPUHELPERLIB) \
- $(UNOTOOLSLIB) \
$(CPPULIB) \
$(CPPUNITLIB) \
$(SALLIB)
-SHL1TARGET = test
+SHL1TARGET = unotest
SHL1USE_EXPORTS = name
DEF1NAME = $(SHL1TARGET)
diff --git a/unotest/source/cpp/officeconnection.cxx b/unotest/source/cpp/officeconnection.cxx
index 9c8d4d5..1b2e47c 100644
--- a/unotest/source/cpp/officeconnection.cxx
+++ b/unotest/source/cpp/officeconnection.cxx
@@ -40,9 +40,9 @@
#include "osl/time.h"
#include "sal/macros.h"
#include "sal/types.h"
-#include "test/officeconnection.hxx"
-#include "test/toabsolutefileurl.hxx"
-#include "test/uniquepipename.hxx"
+#include "unotest/officeconnection.hxx"
+#include "unotest/toabsolutefileurl.hxx"
+#include "unotest/uniquepipename.hxx"
#include "getargument.hxx"
diff --git a/unotest/source/cpp/toabsolutefileurl.cxx b/unotest/source/cpp/toabsolutefileurl.cxx
index e7c97d2..ec97491 100644
--- a/unotest/source/cpp/toabsolutefileurl.cxx
+++ b/unotest/source/cpp/toabsolutefileurl.cxx
@@ -32,7 +32,7 @@
#include "osl/file.hxx"
#include "osl/process.h"
#include "rtl/ustring.hxx"
-#include "test/toabsolutefileurl.hxx"
+#include "unotest/toabsolutefileurl.hxx"
namespace {
diff --git a/unotest/source/cpp/uniquepipename.cxx b/unotest/source/cpp/uniquepipename.cxx
index 1725ca2..eae8de3 100644
--- a/unotest/source/cpp/uniquepipename.cxx
+++ b/unotest/source/cpp/uniquepipename.cxx
@@ -34,7 +34,7 @@
#include "rtl/ustring.h"
#include "rtl/ustring.hxx"
#include "sal/types.h"
-#include "test/uniquepipename.hxx"
+#include "unotest/uniquepipename.hxx"
namespace test {
diff --git a/unotest/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx b/unotest/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx
index 7e7e000..3829bd1 100644
--- a/unotest/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx
+++ b/unotest/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx
@@ -24,7 +24,6 @@
* for a copy of the LGPLv3 License.
************************************************************************/
-#include "precompiled_test.hxx"
#include "sal/config.h"
#include "sal/precppunit.hxx"
commit d0edcf0a554828232ab3c8edfbea22d611bfda2b
Author: Michael Meeks <michael.meeks at suse.com>
Date: Wed Sep 28 15:48:09 2011 +0100
split 'test' into 'unotest' and 'test' to help dependencies
diff --git a/Repository.mk b/Repository.mk
index 73e591f..21cee99 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -282,6 +282,7 @@ $(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO, \
sofficeapp \
store \
test \
+ unotest \
textconv_dict \
ucb \
ucpfile \
diff --git a/i18npool/CppunitTest_i18npool_test_breakiterator.mk b/i18npool/CppunitTest_i18npool_test_breakiterator.mk
index 5a8b53d..28a8c39 100644
--- a/i18npool/CppunitTest_i18npool_test_breakiterator.mk
+++ b/i18npool/CppunitTest_i18npool_test_breakiterator.mk
@@ -59,12 +59,9 @@ $(eval $(call gb_CppunitTest_add_service_rdbs,i18npool_test_breakiterator,\
i18npool_test_breakiterator \
))
-#
-# Disable for now - to break circular dependency ...
-#
-# $(eval $(call gb_CppunitTest_set_args,i18npool_test_breakiterator,\
-# --protector unoexceptionprotector$(gb_Library_DLLEXT) unoexceptionprotector \
-# ))
+$(eval $(call gb_CppunitTest_set_args,i18npool_test_breakiterator,\
+ --protector unoexceptionprotector$(gb_Library_DLLEXT) unoexceptionprotector \
+))
$(eval $(call gb_RdbTarget_RdbTarget,i18npool_test_breakiterator))
diff --git a/i18npool/prj/build.lst b/i18npool/prj/build.lst
index 935e4c4..e95a27a 100644
--- a/i18npool/prj/build.lst
+++ b/i18npool/prj/build.lst
@@ -1,2 +1,2 @@
-inp i18npool : bridges sax stoc comphelper CPPUNIT:cppunit ICU:icu i18nutil regexp DESKTOP:cpputools LIBXSLT:libxslt udkapi ure NULL
+inp i18npool : bridges sax stoc comphelper CPPUNIT:cppunit ICU:icu i18nutil regexp DESKTOP:cpputools LIBXSLT:libxslt udkapi ure unotest NULL
inp i18npool\prj nmake - all inp_prj NULL
diff --git a/solenv/inc/libs.mk b/solenv/inc/libs.mk
index dffd6f4..d6a8db2 100644
--- a/solenv/inc/libs.mk
+++ b/solenv/inc/libs.mk
@@ -310,6 +310,7 @@ LPSOLVELIB=-llpsolve55
SOFFICELIB=-lsofficeapp
UNOPKGAPPLIB=-lunopkgapp
TESTLIB=-ltest
+UNOTESTLIB=-lunotest
XMLREADERLIB=-lxmlreader
.IF "$(OS)" == "IOS"
@@ -522,6 +523,7 @@ LPSOLVELIB=lpsolve55.lib
SOFFICELIB=isofficeapp.lib
UNOPKGAPPLIB=iunopkgapp.lib
TESTLIB=itest.lib
+UNOTESTLIB=iunotest.lib
BOOSTTHREADLIB=boostthread.lib
XMLREADERLIB=ixmlreader.lib
diff --git a/test/inc/makefile.mk b/test/inc/makefile.mk
deleted file mode 100644
index c842846..0000000
--- a/test/inc/makefile.mk
+++ /dev/null
@@ -1,38 +0,0 @@
-#*************************************************************************
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#***********************************************************************/
-
-PRJ = ..
-PRJNAME = test
-TARGET = inc
-
-ENABLE_EXCEPTIONS = TRUE
-VISIBILITY_HIDDEN = TRUE
-
-.INCLUDE: settings.mk
-.INCLUDE: target.mk
-
-.IF "$(ENABLE_PCH)" != ""
-ALLTAR: $(SLO)/precompiled.pch $(SLO)/precompiled_ex.pch
-.ENDIF
diff --git a/test/inc/pch/precompiled_test.cxx b/test/inc/pch/precompiled_test.cxx
deleted file mode 100644
index f08dea1..0000000
--- a/test/inc/pch/precompiled_test.cxx
+++ /dev/null
@@ -1,29 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
-* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-*
-* Copyright 2000, 2010 Oracle and/or its affiliates.
-*
-* OpenOffice.org - a multi-platform office productivity suite
-*
-* This file is part of OpenOffice.org.
-*
-* OpenOffice.org is free software: you can redistribute it and/or modify
-* it under the terms of the GNU Lesser General Public License version 3
-* only, as published by the Free Software Foundation.
-*
-* OpenOffice.org is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU Lesser General Public License version 3 for more details
-* (a copy is included in the LICENSE file that accompanied this code).
-*
-* You should have received a copy of the GNU Lesser General Public License
-* version 3 along with OpenOffice.org. If not, see
-* <http://www.openoffice.org/license.html>
-* for a copy of the LGPLv3 License.
-************************************************************************/
-
-#include "precompiled_test.hxx"
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/test/inc/pch/precompiled_test.hxx b/test/inc/pch/precompiled_test.hxx
deleted file mode 100644
index 51067ed..0000000
--- a/test/inc/pch/precompiled_test.hxx
+++ /dev/null
@@ -1,33 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
-* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-*
-* Copyright 2000, 2010 Oracle and/or its affiliates.
-*
-* OpenOffice.org - a multi-platform office productivity suite
-*
-* This file is part of OpenOffice.org.
-*
-* OpenOffice.org is free software: you can redistribute it and/or modify
-* it under the terms of the GNU Lesser General Public License version 3
-* only, as published by the Free Software Foundation.
-*
-* OpenOffice.org is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU Lesser General Public License version 3 for more details
-* (a copy is included in the LICENSE file that accompanied this code).
-*
-* You should have received a copy of the GNU Lesser General Public License
-* version 3 along with OpenOffice.org. If not, see
-* <http://www.openoffice.org/license.html>
-* for a copy of the LGPLv3 License.
-************************************************************************/
-
-#if defined PRECOMPILED_HEADERS
-
-#include "sal/config.h"
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/test/prj/build.lst b/test/prj/build.lst
index 655170f..c99600b 100644
--- a/test/prj/build.lst
+++ b/test/prj/build.lst
@@ -1,6 +1,2 @@
-te test : BOOST:boost cppu cppuhelper CPPUNIT:cppunit javaunohelper offapi ridljar sal solenv stlport unoil qadevOOo vcl NULL
-te test\inc nmake - all inc NULL
+te test : unotest vcl NULL
te test\source\cpp nmake - all source_cpp inc NULL
-te test\source\cpp\unoexceptionprotector nmake - all source_cpp_unoexceptionprotector inc NULL
-te test\source\java\org\openoffice\test nmake - all source_java NULL
-te test\source\java\org\openoffice\test\tools nmake - all source_java_tools NULL
diff --git a/test/prj/d.lst b/test/prj/d.lst
index bf4af6d..326d666 100644
--- a/test/prj/d.lst
+++ b/test/prj/d.lst
@@ -1,19 +1,8 @@
mkdir: %_DEST%\inc\test
-mkdir: %_DEST%\inc\test\detail
..\%__SRC%\bin\test.dll %_DEST%\bin\test.dll
-..\%__SRC%\bin\unoexceptionprotector.dll %_DEST%\bin\unoexceptionprotector.dll
..\%__SRC%\lib\itest.lib %_DEST%\lib\itest.lib
..\%__SRC%\lib\libtest.dylib %_DEST%\lib\libtest.dylib
..\%__SRC%\lib\libtest.so %_DEST%\lib\libtest.so
..\%__SRC%\lib\libtest.dll.a %_DEST%\lib\libtest.dll.a
-..\%__SRC%\lib\unoexceptionprotector.dylib %_DEST%\lib\unoexceptionprotector.dylib
-..\%__SRC%\lib\unoexceptionprotector.so %_DEST%\lib\unoexceptionprotector.so
..\inc\test\detail\testdllapi.hxx %_DEST%\inc\test\detail\testdllapi.hxx
-..\inc\test\gettestargument.hxx %_DEST%\inc\test\gettestargument.hxx
-..\inc\test\officeconnection.hxx %_DEST%\inc\test\officeconnection.hxx
..\inc\test\bootstrapfixture.hxx %_DEST%\inc\test\bootstrapfixture.hxx
-..\inc\test\oustringostreaminserter.hxx %_DEST%\inc\test\oustringostreaminserter.hxx
-..\inc\test\toabsolutefileurl.hxx %_DEST%\inc\test\toabsolutefileurl.hxx
-..\inc\test\uniquepipename.hxx %_DEST%\inc\test\uniquepipename.hxx
-..\%__SRC%\class\test.jar %_DEST%\bin\test.jar
-..\%__SRC%\class\test-tools.jar %_DEST%\bin\test-tools.jar
diff --git a/test/source/cpp/getargument.cxx b/test/source/cpp/getargument.cxx
deleted file mode 100644
index d401bc9..0000000
--- a/test/source/cpp/getargument.cxx
+++ /dev/null
@@ -1,50 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
-* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-*
-* Copyright 2000, 2010 Oracle and/or its affiliates.
-*
-* OpenOffice.org - a multi-platform office productivity suite
-*
-* This file is part of OpenOffice.org.
-*
-* OpenOffice.org is free software: you can redistribute it and/or modify
-* it under the terms of the GNU Lesser General Public License version 3
-* only, as published by the Free Software Foundation.
-*
-* OpenOffice.org is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU Lesser General Public License version 3 for more details
-* (a copy is included in the LICENSE file that accompanied this code).
-*
-* You should have received a copy of the GNU Lesser General Public License
-* version 3 along with OpenOffice.org. If not, see
-* <http://www.openoffice.org/license.html>
-* for a copy of the LGPLv3 License.
-************************************************************************/
-
-#include "sal/config.h"
-
-#include "osl/diagnose.h"
-#include "rtl/bootstrap.hxx"
-#include "rtl/ustring.h"
-#include "rtl/ustring.hxx"
-
-#include "getargument.hxx"
-
-namespace test {
-
-namespace detail {
-
-bool getArgument(rtl::OUString const & name, rtl::OUString * value) {
- OSL_ASSERT(value != 0);
- return rtl::Bootstrap::get(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("arg-")) + name, *value);
-}
-
-}
-
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/test/source/cpp/getargument.hxx b/test/source/cpp/getargument.hxx
deleted file mode 100644
index 3380fdd..0000000
--- a/test/source/cpp/getargument.hxx
+++ /dev/null
@@ -1,47 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
-* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-*
-* Copyright 2000, 2010 Oracle and/or its affiliates.
-*
-* OpenOffice.org - a multi-platform office productivity suite
-*
-* This file is part of OpenOffice.org.
-*
-* OpenOffice.org is free software: you can redistribute it and/or modify
-* it under the terms of the GNU Lesser General Public License version 3
-* only, as published by the Free Software Foundation.
-*
-* OpenOffice.org is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU Lesser General Public License version 3 for more details
-* (a copy is included in the LICENSE file that accompanied this code).
-*
-* You should have received a copy of the GNU Lesser General Public License
-* version 3 along with OpenOffice.org. If not, see
-* <http://www.openoffice.org/license.html>
-* for a copy of the LGPLv3 License.
-************************************************************************/
-
-#ifndef INCLUDED_TEST_SOURCE_CPP_GETARGUMENT_HXX
-#define INCLUDED_TEST_SOURCE_CPP_GETARGUMENT_HXX
-
-#include "sal/config.h"
-
-namespace test {
-
-namespace detail {
-
-// Obtain the value of an argument tunneled in via an "arg-<name>" bootstrap
-// variable:
-bool getArgument(
- rtl::OUString const & name, rtl::OUString * value);
-
-}
-
-}
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/test/source/cpp/gettestargument.cxx b/test/source/cpp/gettestargument.cxx
deleted file mode 100644
index 0bc0006..0000000
--- a/test/source/cpp/gettestargument.cxx
+++ /dev/null
@@ -1,46 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
-*
-* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-*
-* Copyright 2000, 2010 Oracle and/or its affiliates.
-*
-* OpenOffice.org - a multi-platform office productivity suite
-*
-* This file is part of OpenOffice.org.
-*
-* OpenOffice.org is free software: you can redistribute it and/or modify
-* it under the terms of the GNU Lesser General Public License version 3
-* only, as published by the Free Software Foundation.
-*
-* OpenOffice.org is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU Lesser General Public License version 3 for more details
-* (a copy is included in the LICENSE file that accompanied this code).
-*
-* You should have received a copy of the GNU Lesser General Public License
-* version 3 along with OpenOffice.org. If not, see
-* <http://www.openoffice.org/license.html>
-* for a copy of the LGPLv3 License.
-*
-************************************************************************/
-
-#include "sal/config.h"
-
-#include "rtl/ustring.h"
-#include "rtl/ustring.hxx"
-#include "test/gettestargument.hxx"
-
-#include "getargument.hxx"
-
-namespace test {
-
-bool getTestArgument(rtl::OUString const & name, rtl::OUString * value) {
- return detail::getArgument(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("testarg.")) + name, value);
-}
-
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/test/source/cpp/makefile.mk b/test/source/cpp/makefile.mk
index 68bca02..262326a 100644
--- a/test/source/cpp/makefile.mk
+++ b/test/source/cpp/makefile.mk
@@ -38,12 +38,7 @@ CDEFS += -DOOO_DLLIMPLEMENTATION_TEST
CFLAGSCXX += $(CPPUNIT_CFLAGS)
SLOFILES = \
- $(SLO)/getargument.obj \
- $(SLO)/gettestargument.obj \
- $(SLO)/bootstrapfixture.obj \
- $(SLO)/officeconnection.obj \
- $(SLO)/toabsolutefileurl.obj \
- $(SLO)/uniquepipename.obj
+ $(SLO)/bootstrapfixture.obj
.IF "$(CROSS_COMPILING)" == "YES"
SHL1IMPLIB = $(SHL1TARGET)
diff --git a/test/source/cpp/officeconnection.cxx b/test/source/cpp/officeconnection.cxx
deleted file mode 100644
index 9c8d4d5..0000000
--- a/test/source/cpp/officeconnection.cxx
+++ /dev/null
@@ -1,192 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
-* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-*
-* Copyright 2000, 2010 Oracle and/or its affiliates.
-*
-* OpenOffice.org - a multi-platform office productivity suite
-*
-* This file is part of OpenOffice.org.
-*
-* OpenOffice.org is free software: you can redistribute it and/or modify
-* it under the terms of the GNU Lesser General Public License version 3
-* only, as published by the Free Software Foundation.
-*
-* OpenOffice.org is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU Lesser General Public License version 3 for more details
-* (a copy is included in the LICENSE file that accompanied this code).
-*
-* You should have received a copy of the GNU Lesser General Public License
-* version 3 along with OpenOffice.org. If not, see
-* <http://www.openoffice.org/license.html>
-* for a copy of the LGPLv3 License.
-************************************************************************/
-
-#include "sal/config.h"
-#include "sal/precppunit.hxx"
-
-#include "com/sun/star/bridge/UnoUrlResolver.hpp"
-#include "com/sun/star/bridge/XUnoUrlResolver.hpp"
-#include "com/sun/star/connection/NoConnectException.hpp"
-#include "com/sun/star/frame/XDesktop.hpp"
-#include "com/sun/star/lang/DisposedException.hpp"
-#include "com/sun/star/uno/Reference.hxx"
-#include "com/sun/star/uno/XComponentContext.hpp"
-#include "cppuhelper/bootstrap.hxx"
-#include "cppunit/TestAssert.h"
-#include "osl/process.h"
-#include "osl/time.h"
-#include "sal/macros.h"
-#include "sal/types.h"
-#include "test/officeconnection.hxx"
-#include "test/toabsolutefileurl.hxx"
-#include "test/uniquepipename.hxx"
-
-#include "getargument.hxx"
-
-namespace {
-
-namespace css = com::sun::star;
-
-}
-
-namespace test {
-
-OfficeConnection::OfficeConnection(): process_(0) {}
-
-OfficeConnection::~OfficeConnection() {}
-
-void OfficeConnection::setUp() {
- rtl::OUString desc;
- rtl::OUString argSoffice;
- CPPUNIT_ASSERT(
- detail::getArgument(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("soffice")),
- &argSoffice));
- if (argSoffice.matchAsciiL(RTL_CONSTASCII_STRINGPARAM("path:"))) {
- desc = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("pipe,name=")) +
- uniquePipeName(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("oootest")));
- rtl::OUString noquickArg(
- RTL_CONSTASCII_USTRINGPARAM("--quickstart=no"));
- rtl::OUString nofirstArg(
- RTL_CONSTASCII_USTRINGPARAM("--nofirststartwizard"));
- rtl::OUString norestoreArg(RTL_CONSTASCII_USTRINGPARAM("--norestore"));
- rtl::OUString nologoArg(RTL_CONSTASCII_USTRINGPARAM("--nologo"));
- // disable use of the unix standalone splash screen app for the
- // tests (probably not needed in combination with --headless?)
- rtl::OUString headlessArg(RTL_CONSTASCII_USTRINGPARAM("--headless"));
- rtl::OUString acceptArg(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("--accept=")) + desc +
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(";urp")));
- rtl::OUString argUser;
- CPPUNIT_ASSERT(
- detail::getArgument(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("user")), &argUser));
- rtl::OUString userArg(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM("-env:UserInstallation=")) +
- toAbsoluteFileUrl(argUser));
- rtl::OUString jreArg(
- RTL_CONSTASCII_USTRINGPARAM("-env:UNO_JAVA_JFW_ENV_JREHOME=true"));
- rtl::OUString classpathArg(
- RTL_CONSTASCII_USTRINGPARAM(
- "-env:UNO_JAVA_JFW_ENV_CLASSPATH=true"));
- rtl_uString * args[] = {
- noquickArg.pData, nofirstArg.pData, norestoreArg.pData,
- nologoArg.pData, headlessArg.pData, acceptArg.pData, userArg.pData,
- jreArg.pData, classpathArg.pData };
- rtl_uString ** envs = 0;
- rtl::OUString argEnv;
- if (detail::getArgument(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("env")), &argEnv))
- {
- envs = &argEnv.pData;
- }
- CPPUNIT_ASSERT_EQUAL(
- osl_Process_E_None,
- osl_executeProcess(
- toAbsoluteFileUrl(
- argSoffice.copy(RTL_CONSTASCII_LENGTH("path:"))).pData,
- args, SAL_N_ELEMENTS(args), 0, 0, 0, envs, envs == 0 ? 0 : 1,
- &process_));
- } else if (argSoffice.matchAsciiL(RTL_CONSTASCII_STRINGPARAM("connect:"))) {
- desc = argSoffice.copy(RTL_CONSTASCII_LENGTH("connect:"));
- } else {
- CPPUNIT_FAIL(
- "\"soffice\" argument starts with neither \"path:\" nor"
- " \"connect:\"");
- }
- css::uno::Reference< css::bridge::XUnoUrlResolver > resolver(
- css::bridge::UnoUrlResolver::create(
- cppu::defaultBootstrap_InitialComponentContext()));
- for (;;) {
- try {
- context_ =
- css::uno::Reference< css::uno::XComponentContext >(
- resolver->resolve(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("uno:")) +
- desc +
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- ";urp;StarOffice.ComponentContext"))),
- css::uno::UNO_QUERY_THROW);
- break;
- } catch (css::connection::NoConnectException &) {}
- if (process_ != 0) {
- TimeValue delay = { 1, 0 }; // 1 sec
- CPPUNIT_ASSERT_EQUAL(
- osl_Process_E_TimedOut,
- osl_joinProcessWithTimeout(process_, &delay));
- }
- }
-}
-
-void OfficeConnection::tearDown() {
- if (process_ != 0) {
- if (context_.is()) {
- css::uno::Reference< css::frame::XDesktop > desktop(
- context_->getServiceManager()->createInstanceWithContext(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.frame.Desktop")),
- context_),
- css::uno::UNO_QUERY_THROW);
- context_.clear();
- try {
- CPPUNIT_ASSERT(desktop->terminate());
- desktop.clear();
- } catch (css::lang::DisposedException &) {}
- // it appears that DisposedExceptions can already happen while
- // receiving the response of the terminate call
- }
- CPPUNIT_ASSERT_EQUAL(osl_Process_E_None, osl_joinProcess(process_));
- oslProcessInfo info;
- info.Size = sizeof info;
- CPPUNIT_ASSERT_EQUAL(
- osl_Process_E_None,
- osl_getProcessInfo(process_, osl_Process_EXITCODE, &info));
- CPPUNIT_ASSERT_EQUAL(oslProcessExitCode(0), info.Code);
- osl_freeProcessHandle(process_);
- process_ = 0; // guard against subsequent calls to isStillAlive
- }
-}
-
-css::uno::Reference< css::uno::XComponentContext >
-OfficeConnection::getComponentContext() const {
- return context_;
-}
-
-bool OfficeConnection::isStillAlive() const {
- OSL_ASSERT(process_ != 0);
- TimeValue delay = { 0, 0 }; // 0 sec
- oslProcessError e = osl_joinProcessWithTimeout(process_, &delay);
- CPPUNIT_ASSERT(e == osl_Process_E_None || e == osl_Process_E_TimedOut);
- return e == osl_Process_E_TimedOut;
-}
-
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/test/source/cpp/toabsolutefileurl.cxx b/test/source/cpp/toabsolutefileurl.cxx
deleted file mode 100644
index e7c97d2..0000000
--- a/test/source/cpp/toabsolutefileurl.cxx
+++ /dev/null
@@ -1,86 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
-* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-*
-* Copyright 2000, 2010 Oracle and/or its affiliates.
-*
-* OpenOffice.org - a multi-platform office productivity suite
-*
-* This file is part of OpenOffice.org.
-*
-* OpenOffice.org is free software: you can redistribute it and/or modify
-* it under the terms of the GNU Lesser General Public License version 3
-* only, as published by the Free Software Foundation.
-*
-* OpenOffice.org is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU Lesser General Public License version 3 for more details
-* (a copy is included in the LICENSE file that accompanied this code).
-*
-* You should have received a copy of the GNU Lesser General Public License
-* version 3 along with OpenOffice.org. If not, see
-* <http://www.openoffice.org/license.html>
-* for a copy of the LGPLv3 License.
-************************************************************************/
-
-#include "sal/config.h"
-
-#include "com/sun/star/uno/Reference.hxx"
-#include "com/sun/star/uno/RuntimeException.hpp"
-#include "com/sun/star/uno/XInterface.hpp"
-#include "osl/file.hxx"
-#include "osl/process.h"
-#include "rtl/ustring.hxx"
-#include "test/toabsolutefileurl.hxx"
-
-namespace {
-
-namespace css = com::sun::star;
-
-}
-
-namespace test {
-
-rtl::OUString toAbsoluteFileUrl(rtl::OUString const & relativePathname) {
- rtl::OUString cwd;
- oslProcessError e1 = osl_getProcessWorkingDir(&cwd.pData);
- if (e1 != osl_Process_E_None) {
- throw css::uno::RuntimeException(
- (rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "osl_getProcessWorkingDir failed with ")) +
- rtl::OUString::valueOf(static_cast< sal_Int32 >(e1))),
- css::uno::Reference< css::uno::XInterface >());
- }
- rtl::OUString url;
- osl::FileBase::RC e2 = osl::FileBase::getFileURLFromSystemPath(
- relativePathname, url);
- if (e2 != osl::FileBase::E_None) {
- throw css::uno::RuntimeException(
- (rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "osl::FileBase::getFileURLFromSystemPath(")) +
- relativePathname +
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(") failed with ")) +
- rtl::OUString::valueOf(static_cast< sal_Int32 >(e2))),
- css::uno::Reference< css::uno::XInterface >());
- }
- rtl::OUString absUrl;
- e2 = osl::FileBase::getAbsoluteFileURL(cwd, url, absUrl);
- if (e2 != osl::FileBase::E_None) {
- throw css::uno::RuntimeException(
- (rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "osl::FileBase::getAbsoluteFileURL(")) +
- cwd + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(", ")) + url +
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(") failed with ")) +
- rtl::OUString::valueOf(static_cast< sal_Int32 >(e2))),
- css::uno::Reference< css::uno::XInterface >());
- }
- return absUrl;
-}
-
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/test/source/cpp/uniquepipename.cxx b/test/source/cpp/uniquepipename.cxx
deleted file mode 100644
index 1725ca2..0000000
--- a/test/source/cpp/uniquepipename.cxx
+++ /dev/null
@@ -1,52 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
-*
-* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-*
-* Copyright 2000, 2010 Oracle and/or its affiliates.
-*
-* OpenOffice.org - a multi-platform office productivity suite
-*
-* This file is part of OpenOffice.org.
-*
-* OpenOffice.org is free software: you can redistribute it and/or modify
-* it under the terms of the GNU Lesser General Public License version 3
-* only, as published by the Free Software Foundation.
-*
-* OpenOffice.org is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU Lesser General Public License version 3 for more details
-* (a copy is included in the LICENSE file that accompanied this code).
-*
-* You should have received a copy of the GNU Lesser General Public License
-* version 3 along with OpenOffice.org. If not, see
-* <http://www.openoffice.org/license.html>
-* for a copy of the LGPLv3 License.
-*
-************************************************************************/
-
-#include "sal/config.h"
-#include "sal/precppunit.hxx"
-
-#include "cppunit/TestAssert.h"
-#include "osl/process.h"
-#include "rtl/ustring.h"
-#include "rtl/ustring.hxx"
-#include "sal/types.h"
-#include "test/uniquepipename.hxx"
-
-namespace test {
-
-rtl::OUString uniquePipeName(rtl::OUString const & name) {
- oslProcessInfo info;
- info.Size = sizeof info;
- CPPUNIT_ASSERT_EQUAL(
- osl_Process_E_None,
- osl_getProcessInfo(0, osl_Process_IDENTIFIER, &info));
- return name + rtl::OUString::valueOf(static_cast< sal_Int64 >(info.Ident));
-}
-
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/test/source/cpp/unoexceptionprotector/makefile.mk b/test/source/cpp/unoexceptionprotector/makefile.mk
deleted file mode 100644
index d3d13e6..0000000
--- a/test/source/cpp/unoexceptionprotector/makefile.mk
+++ /dev/null
@@ -1,59 +0,0 @@
-#*************************************************************************
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#***********************************************************************/
-
-PRJ = ../../..
-PRJNAME = test
-TARGET = unoexceptionprotector
-
-ENABLE_EXCEPTIONS = TRUE
-VISIBILITY_HIDDEN = TRUE
-
-.INCLUDE: settings.mk
-
-.IF "$(CROSS_COMPILING)"=="YES"
-all:
- @echo Nothing done when cross-compiling
-.ENDIF
-
-# --- Files --------------------------------------------------------
-DLLPRE =
-
-CFLAGSCXX += $(CPPUNIT_CFLAGS)
-
-SLOFILES = $(SLO)/unoexceptionprotector.obj
-
-SHL1IMPLIB = i$(SHL1TARGET)
-SHL1OBJS = $(SLOFILES)
-SHL1RPATH = NONE
-SHL1STDLIBS = \
- $(CPPUHELPERLIB) \
- $(CPPULIB) \
- $(CPPUNITLIB) \
- $(SALLIB)
-SHL1TARGET = unoexceptionprotector
-SHL1USE_EXPORTS = name
-DEF1NAME = $(SHL1TARGET)
-
-.INCLUDE: target.mk
diff --git a/test/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx b/test/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx
deleted file mode 100644
index 7e7e000..0000000
--- a/test/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx
+++ /dev/null
@@ -1,125 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
-* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-*
-* Copyright 2000, 2011 Oracle and/or its affiliates.
-*
-* OpenOffice.org - a multi-platform office productivity suite
-*
-* This file is part of OpenOffice.org.
-*
-* OpenOffice.org is free software: you can redistribute it and/or modify
-* it under the terms of the GNU Lesser General Public License version 3
-* only, as published by the Free Software Foundation.
-*
-* OpenOffice.org is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU Lesser General Public License version 3 for more details
-* (a copy is included in the LICENSE file that accompanied this code).
-*
-* You should have received a copy of the GNU Lesser General Public License
-* version 3 along with OpenOffice.org. If not, see
-* <http://www.openoffice.org/license.html>
-* for a copy of the LGPLv3 License.
-************************************************************************/
-
-#include "precompiled_test.hxx"
-#include "sal/config.h"
-#include "sal/precppunit.hxx"
-
-#include <limits>
-#include <string>
-#include <iostream>
-
-#include "boost/noncopyable.hpp"
-#include "com/sun/star/uno/Any.hxx"
-#include "com/sun/star/uno/Exception.hpp"
-#include "cppuhelper/exc_hlp.hxx"
-#include "cppunit/Message.h"
-#include "osl/thread.h"
-#include "rtl/string.hxx"
-#include "rtl/ustring.h"
-#include "rtl/ustring.hxx"
-#include "sal/types.h"
-
-#include "protectorfactory.hxx"
-
-namespace {
-
-namespace css = com::sun::star;
-
-// Best effort conversion:
-std::string convert(rtl::OUString const & s16) {
- rtl::OString s8(rtl::OUStringToOString(s16, osl_getThreadTextEncoding()));
- return std::string(
- s8.getStr(),
- ((static_cast< sal_uInt32 >(s8.getLength())
- > std::numeric_limits< std::string::size_type >::max())
- ? std::numeric_limits< std::string::size_type >::max()
- : static_cast< std::string::size_type >(s8.getLength())));
-}
-
-class Prot : public cppunittester::LibreOfficeProtector, private boost::noncopyable
-{
-public:
- Prot() {}
-
- virtual ~Prot() {}
-
- virtual bool protect(
- CppUnit::Functor const & functor,
- CppUnit::ProtectorContext const & context);
-
- virtual bool protect(CppUnit::Functor const & functor);
-};
-
-bool Prot::protect(
- CppUnit::Functor const & functor, CppUnit::ProtectorContext const & context)
-{
- try {
- return functor();
- } catch (const css::uno::Exception &e) {
- css::uno::Any a(cppu::getCaughtException());
- reportError(
- context,
- CppUnit::Message(
- convert(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "An uncaught exception of type "))
- + a.getValueTypeName()),
- convert(e.Message)));
- }
- return false;
-}
-
-bool Prot::protect(CppUnit::Functor const & functor)
-{
- bool bRet = false;
- try
- {
- bRet = functor();
- } catch (const css::uno::Exception &e)
- {
- css::uno::Any a(cppu::getCaughtException());
- std::cerr
- << convert(rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "An uncaught exception of type "))
- + a.getValueTypeName())
- << std::endl << "Exception Message was: " << convert(e.Message)
- << std::endl;
- throw;
- }
- return bRet;
-}
-
-}
-
-extern "C" SAL_DLLPUBLIC_EXPORT CppUnit::Protector * SAL_CALL
-unoexceptionprotector() {
- return new Prot;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/test/source/java/org/openoffice/test/Argument.java b/test/source/java/org/openoffice/test/Argument.java
deleted file mode 100644
index 0380375..0000000
--- a/test/source/java/org/openoffice/test/Argument.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*************************************************************************
-*
-* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-*
-* Copyright 2000, 2010 Oracle and/or its affiliates.
-*
-* OpenOffice.org - a multi-platform office productivity suite
-*
-* This file is part of OpenOffice.org.
-*
-* OpenOffice.org is free software: you can redistribute it and/or modify
-* it under the terms of the GNU Lesser General Public License version 3
-* only, as published by the Free Software Foundation.
-*
-* OpenOffice.org is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU Lesser General Public License version 3 for more details
-* (a copy is included in the LICENSE file that accompanied this code).
-*
-* You should have received a copy of the GNU Lesser General Public License
-* version 3 along with OpenOffice.org. If not, see
-* <http://www.openoffice.org/license.html>
-* for a copy of the LGPLv3 License.
-*
-************************************************************************/
-
-package org.openoffice.test;
-
-public final class Argument {
- public static String get(String name) {
- return System.getProperty("org.openoffice.test.arg." + name);
- }
-
- private Argument() {}
-}
diff --git a/test/source/java/org/openoffice/test/FileHelper.java b/test/source/java/org/openoffice/test/FileHelper.java
deleted file mode 100644
index 722b311..0000000
--- a/test/source/java/org/openoffice/test/FileHelper.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * ************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- * ************************************************************************
- */
-
-package org.openoffice.test;
-
-/**
- * Helper Functions for File handling
- */
-public class FileHelper
-{
- public FileHelper()
- {
- }
- /**
- * Concat a _sRelativePathToAdd to a _sPath and append a '/' to the _sPath only if need.
- *
- * @param _sPath
- * @param _sRelativePathToAdd
- * @return a right concated path
- */
- public static String appendPath(String _sPath, String _sRelativePathToAdd)
- {
- String sNewPath = _sPath;
- String fs = System.getProperty("file.separator");
- if (_sPath.startsWith("file:"))
- {
- fs = "/"; // we use a file URL so only '/' is allowed.
- }
- if (! (sNewPath.endsWith("/") || sNewPath.endsWith("\\") ) )
- {
- sNewPath += fs;
- }
- sNewPath += _sRelativePathToAdd;
- return sNewPath;
- }
-}
diff --git a/test/source/java/org/openoffice/test/OfficeConnection.java b/test/source/java/org/openoffice/test/OfficeConnection.java
deleted file mode 100644
index b05c34b..0000000
--- a/test/source/java/org/openoffice/test/OfficeConnection.java
+++ /dev/null
@@ -1,229 +0,0 @@
-/*************************************************************************
-* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-*
-* Copyright 2000, 2010 Oracle and/or its affiliates.
-*
-* OpenOffice.org - a multi-platform office productivity suite
-*
-* This file is part of OpenOffice.org.
-*
-* OpenOffice.org is free software: you can redistribute it and/or modify
-* it under the terms of the GNU Lesser General Public License version 3
-* only, as published by the Free Software Foundation.
-*
-* OpenOffice.org is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU Lesser General Public License version 3 for more details
-* (a copy is included in the LICENSE file that accompanied this code).
-*
-* You should have received a copy of the GNU Lesser General Public License
-* version 3 along with OpenOffice.org. If not, see
-* <http://www.openoffice.org/license.html>
-* for a copy of the LGPLv3 License.
-************************************************************************/
-
-package org.openoffice.test;
-
-import com.sun.star.bridge.UnoUrlResolver;
-import com.sun.star.bridge.XUnoUrlResolver;
-import com.sun.star.comp.helper.Bootstrap;
-import com.sun.star.connection.NoConnectException;
-import com.sun.star.frame.XDesktop;
-import com.sun.star.lang.DisposedException;
-import com.sun.star.lang.XMultiComponentFactory;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XComponentContext;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.PrintStream;
-import java.util.Map;
-import java.util.UUID;
-import static org.junit.Assert.*;
-
-/** Start up and shut down an OOo instance.
-
- Details about the OOo instance are tunneled in via
- org.openoffice.test.arg.... system properties.
-*/
-
-public final class OfficeConnection {
- /** Start up an OOo instance.
- */
- public void setUp() throws Exception {
- String sofficeArg = Argument.get("soffice");
- if (sofficeArg.startsWith("path:")) {
- description = "pipe,name=oootest" + UUID.randomUUID();
- ProcessBuilder pb = new ProcessBuilder(
- sofficeArg.substring("path:".length()), "--quickstart=no",
- "--nofirststartwizard", "--norestore", "--nologo", "--headless",
- "--accept=" + description + ";urp",
- "-env:UserInstallation=" + Argument.get("user"),
- "-env:UNO_JAVA_JFW_ENV_JREHOME=true");
- String envArg = Argument.get("env");
- if (envArg != null) {
- Map<String, String> env = pb.environment();
- int i = envArg.indexOf('=');
- if (i == -1) {
- env.remove(envArg);
- } else {
- env.put(envArg.substring(0, i), envArg.substring(i + 1));
- }
- }
- process = pb.start();
- outForward = new Forward(process.getInputStream(), System.out);
- outForward.start();
- errForward = new Forward(process.getErrorStream(), System.err);
- errForward.start();
- } else if (sofficeArg.startsWith("connect:")) {
- description = sofficeArg.substring("connect:".length());
- } else {
- fail(
- "\"soffice\" argument \"" + sofficeArg +
- " starts with neither \"path:\" nor \"connect:\"");
- }
- XUnoUrlResolver resolver = UnoUrlResolver.create(
- Bootstrap.createInitialComponentContext(null));
- for (;;) {
- try {
- context = UnoRuntime.queryInterface(
- XComponentContext.class,
- resolver.resolve(
- "uno:" + description +
- ";urp;StarOffice.ComponentContext"));
- break;
- } catch (NoConnectException e) {}
- if (process != null) {
- assertNull(waitForProcess(process, 1000)); // 1 sec
- }
- }
- try {
- ProcessBuilder debugbp = new ProcessBuilder(
- Argument.get("debugcommand").split(" "));
- debugbp.start();
- Thread.sleep(1000);
- } catch(Exception e) {}
- }
-
- /** Shut down the OOo instance.
- */
- public void tearDown()
- throws InterruptedException, com.sun.star.uno.Exception
- {
- boolean desktopTerminated = true;
- if (process != null) {
- if (context != null) {
- XMultiComponentFactory factory = context.getServiceManager();
- assertNotNull(factory);
- XDesktop desktop = UnoRuntime.queryInterface(
- XDesktop.class,
- factory.createInstanceWithContext(
- "com.sun.star.frame.Desktop", context));
- context = null;
- try {
- desktopTerminated = desktop.terminate();
- } catch (DisposedException e) {}
- // it appears that DisposedExceptions can already happen
- // while receiving the response of the terminate call
- desktop = null;
- } else {
- process.destroy();
- }
- }
- int code = 0;
- if (process != null) {
- code = process.waitFor();
- }
- boolean outTerminated = outForward == null || outForward.terminated();
- boolean errTerminated = errForward == null || errForward.terminated();
- assertTrue(desktopTerminated);
- assertEquals(0, code);
- assertTrue(outTerminated);
- assertTrue(errTerminated);
- }
-
- /** Obtain the component context of the running OOo instance.
- */
- public XComponentContext getComponentContext() {
- return context;
- }
-
- //TODO: get rid of this hack for legacy qa/unoapi tests
- public String getDescription() {
- return description;
- }
-
- private static Integer waitForProcess(Process process, final long millis)
- throws InterruptedException
- {
- final Thread t1 = Thread.currentThread();
- Thread t2 = new Thread("waitForProcess") {
- public void run() {
- try {
- Thread.currentThread().sleep(millis);
- } catch (InterruptedException e) {}
- t1.interrupt();
- }
- };
- boolean old = Thread.interrupted();
- // clear interrupted status, get old status
- t2.start();
- int n = 0;
- boolean done = false;
- try {
- n = process.waitFor();
- done = true;
- } catch (InterruptedException e) {}
- t2.interrupt();
- try {
- t2.join();
- } catch (InterruptedException e) {
- t2.join();
- }
- Thread.interrupted(); // clear interrupted status
- if (old) {
- t1.interrupt(); // reset old status
- }
- return done ? new Integer(n) : null;
- }
-
- private static final class Forward extends Thread {
- public Forward(InputStream in, PrintStream out) {
- super("process output forwarder");
- this.in = in;
- this.out = out;
- }
-
- public void run() {
- for (;;) {
- byte[] buf = new byte[1024];
- int n;
- try {
- n = in.read(buf);
- } catch (IOException e) {
- throw new RuntimeException("wrapping", e);
- }
- if (n == -1) {
- break;
- }
- out.write(buf, 0, n);
- }
- done = true;
- }
-
- public boolean terminated() throws InterruptedException {
- join();
- return done;
- }
-
- private final InputStream in;
- private final PrintStream out;
- private boolean done = false;
- }
-
- private String description;
- private Process process = null;
- private Forward outForward = null;
- private Forward errForward = null;
- private XComponentContext context = null;
-}
diff --git a/test/source/java/org/openoffice/test/OfficeFileUrl.java b/test/source/java/org/openoffice/test/OfficeFileUrl.java
deleted file mode 100644
index 1ab62e2..0000000
--- a/test/source/java/org/openoffice/test/OfficeFileUrl.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*************************************************************************
-*
-* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-*
-* Copyright 2000, 2010 Oracle and/or its affiliates.
-*
-* OpenOffice.org - a multi-platform office productivity suite
-*
-* This file is part of OpenOffice.org.
-*
-* OpenOffice.org is free software: you can redistribute it and/or modify
-* it under the terms of the GNU Lesser General Public License version 3
-* only, as published by the Free Software Foundation.
-*
-* OpenOffice.org is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU Lesser General Public License version 3 for more details
-* (a copy is included in the LICENSE file that accompanied this code).
-*
-* You should have received a copy of the GNU Lesser General Public License
-* version 3 along with OpenOffice.org. If not, see
-* <http://www.openoffice.org/license.html>
-* for a copy of the LGPLv3 License.
-*
-************************************************************************/
-
-package org.openoffice.test;
-
-import java.io.File;
-
-/** Obtain the office-internal absolute file URL of a given file.
- */
-public final class OfficeFileUrl {
- public static String getAbsolute(File file) {
- return file.getAbsoluteFile().toURI().toString().replaceFirst(
- "\\A[Ff][Ii][Ll][Ee]:/(?=[^/]|\\z)", "file:///");
- // file:/path -> file:///path
- }
-
- private OfficeFileUrl() {}
-}
diff --git a/test/source/java/org/openoffice/test/TestArgument.java b/test/source/java/org/openoffice/test/TestArgument.java
deleted file mode 100644
index 1303d09..0000000
--- a/test/source/java/org/openoffice/test/TestArgument.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*************************************************************************
-*
-* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-*
-* Copyright 2000, 2010 Oracle and/or its affiliates.
-*
-* OpenOffice.org - a multi-platform office productivity suite
-*
-* This file is part of OpenOffice.org.
-*
-* OpenOffice.org is free software: you can redistribute it and/or modify
-* it under the terms of the GNU Lesser General Public License version 3
-* only, as published by the Free Software Foundation.
-*
-* OpenOffice.org is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU Lesser General Public License version 3 for more details
-* (a copy is included in the LICENSE file that accompanied this code).
-*
-* You should have received a copy of the GNU Lesser General Public License
-* version 3 along with OpenOffice.org. If not, see
-* <http://www.openoffice.org/license.html>
-* for a copy of the LGPLv3 License.
-*
-************************************************************************/
-
-package org.openoffice.test;
-
-/** Obtain the value of a test argument (tunneled in via an
- "org.openoffice.test.arg.testarg.<name>" system property).
- */
-public final class TestArgument {
- public static String get(String name) {
- return Argument.get("testarg." + name);
- }
-
- private TestArgument() {}
-}
diff --git a/test/source/java/org/openoffice/test/UnoApiTest.java b/test/source/java/org/openoffice/test/UnoApiTest.java
deleted file mode 100644
index fc5ba5a..0000000
--- a/test/source/java/org/openoffice/test/UnoApiTest.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*************************************************************************
-* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-*
-* Copyright 2000, 2010 Oracle and/or its affiliates.
-*
-* OpenOffice.org - a multi-platform office productivity suite
-*
-* This file is part of OpenOffice.org.
-*
-* OpenOffice.org is free software: you can redistribute it and/or modify
-* it under the terms of the GNU Lesser General Public License version 3
-* only, as published by the Free Software Foundation.
-*
-* OpenOffice.org is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU Lesser General Public License version 3 for more details
-* (a copy is included in the LICENSE file that accompanied this code).
-*
-* You should have received a copy of the GNU Lesser General Public License
-* version 3 along with OpenOffice.org. If not, see
-* <http://www.openoffice.org/license.html>
-* for a copy of the LGPLv3 License.
-************************************************************************/
-
-package org.openoffice.test;
-
-import org.openoffice.Runner;
-import org.openoffice.test.OfficeConnection;
-import org.openoffice.test.Argument;
-import static org.junit.Assert.*;
-
-public final class UnoApiTest {
- @org.junit.Before public void setUp() throws Exception {
- connection.setUp();
- }
-
- @org.junit.After public void tearDown()
- throws InterruptedException, com.sun.star.uno.Exception
- {
- connection.tearDown();
- }
-
- @org.junit.Test public void test() {
- assertTrue(
- Runner.run(
- "-sce", Argument.get("sce"), "-xcl", Argument.get("xcl"), "-tdoc",
- Argument.get("tdoc"), "-cs", connection.getDescription()));
- }
-
- private final OfficeConnection connection = new OfficeConnection();
-}
diff --git a/test/source/java/org/openoffice/test/makefile.mk b/test/source/java/org/openoffice/test/makefile.mk
deleted file mode 100644
index 65b54d1..0000000
--- a/test/source/java/org/openoffice/test/makefile.mk
+++ /dev/null
@@ -1,57 +0,0 @@
-#*************************************************************************
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#***********************************************************************/
-
-PRJ = ../../../../..
-PRJNAME = test
-TARGET = test
-
-.IF "$(OOO_JUNIT_JAR)" != ""
-
-PACKAGE = org/openoffice/test
-JAVAFILES = \
- Argument.java \
- FileHelper.java \
- OfficeConnection.java \
- OfficeFileUrl.java \
- TestArgument.java \
- UnoApiTest.java \
-
-JARFILES = juh.jar ridl.jar unoil.jar OOoRunner.jar
-EXTRAJARFILES = $(OOO_JUNIT_JAR)
-
-JARTARGET = $(TARGET).jar
-JARCLASSDIRS = $(PACKAGE)
-JARCLASSEXCLUDES = $(PACKAGE)/tools/*
-JARCLASSPATH = $(JARFILES)
- # expect $(OOO_JUNIT_JAR) to be on CLASSPATH wherever test.jar is used (also,
- # on Windows, $(OOO_JUNIT_JAR) could be an absolute pathname with drive letter
- # like X:/path and some JVMs would refuse to load test.jar if its MANIFEST.MF
- # Class-Path contained such a pathname that looks like an unknown URL with
- # scheme X)
-
-.END
-
-.INCLUDE: settings.mk
-.INCLUDE: target.mk
diff --git a/test/source/java/org/openoffice/test/tools/DocumentType.java b/test/source/java/org/openoffice/test/tools/DocumentType.java
deleted file mode 100644
index bf310c5..0000000
--- a/test/source/java/org/openoffice/test/tools/DocumentType.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-package org.openoffice.test.tools;
-
-/** a helper "enumeration class" for classifying a document type
-*/
-public class DocumentType extends com.sun.star.uno.Enum
-{
- private DocumentType( int value )
- {
- super( value );
- }
-
- public static DocumentType getDefault()
- {
- return WRITER;
- }
-
- public static final DocumentType WRITER = new DocumentType(0);
- public static final DocumentType CALC = new DocumentType(1);
- public static final DocumentType DRAWING = new DocumentType(2);
- public static final DocumentType XMLFORM = new DocumentType(3);
- public static final DocumentType PRESENTATION = new DocumentType(4);
- public static final DocumentType FORMULA = new DocumentType(5);
- public static final DocumentType UNKNOWN = new DocumentType(-1);
-
- public static DocumentType fromInt(int value)
- {
- switch(value)
- {
- case 0: return WRITER;
- case 1: return CALC;
- case 2: return DRAWING;
- case 3: return XMLFORM;
- case 4: return PRESENTATION;
- case 5: return FORMULA;
- default: return UNKNOWN;
- }
- }
-};
diff --git a/test/source/java/org/openoffice/test/tools/OfficeDocument.java b/test/source/java/org/openoffice/test/tools/OfficeDocument.java
deleted file mode 100644
index bfb76a3..0000000
--- a/test/source/java/org/openoffice/test/tools/OfficeDocument.java
+++ /dev/null
@@ -1,328 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-package org.openoffice.test.tools;
-
-import com.sun.star.beans.PropertyState;
-import com.sun.star.beans.PropertyValue;
-import com.sun.star.document.MacroExecMode;
-import com.sun.star.drawing.XDrawPage;
-import com.sun.star.drawing.XDrawPageSupplier;
-import com.sun.star.drawing.XDrawPages;
-import com.sun.star.drawing.XDrawPagesSupplier;
-import com.sun.star.frame.XComponentLoader;
-import com.sun.star.frame.XController;
-import com.sun.star.frame.XFrame;
-import com.sun.star.frame.XModel;
-import com.sun.star.lang.XComponent;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.lang.XServiceInfo;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XInterface;
-import com.sun.star.util.CloseVetoException;
-import com.sun.star.util.XCloseable;
-import com.sun.star.util.XModifiable;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**************************************************************************/
-
-/**************************************************************************/
-/** provides a small wrapper around a document
-*/
-public class OfficeDocument
-{
- /* ================================================================== */
- /* ------------------------------------------------------------------ */
- public OfficeDocument( XMultiServiceFactory orb, XComponent document )
- {
- m_orb = orb;
- m_documentComponent = document;
- }
-
- /* ------------------------------------------------------------------ */
- protected static XComponent implLoadAsComponent( XMultiServiceFactory orb, String documentOrFactoryURL ) throws com.sun.star.uno.Exception
- {
- return implLoadAsComponent( orb, documentOrFactoryURL, new PropertyValue[0] );
- }
-
- /* ------------------------------------------------------------------ */
- protected static XComponent implLoadAsComponent( XMultiServiceFactory orb, String documentOrFactoryURL, final PropertyValue[] i_args ) throws com.sun.star.uno.Exception
- {
- XComponentLoader aLoader = UnoRuntime.queryInterface( XComponentLoader.class,
- orb.createInstance( "com.sun.star.frame.Desktop" ) );
-
- XComponent document = UnoRuntime.queryInterface( XComponent.class,
- aLoader.loadComponentFromURL( documentOrFactoryURL, "_blank", 0, i_args )
- );
- return document;
- }
-
- /* ------------------------------------------------------------------ */
- private static OfficeDocument implLoadDocument( XMultiServiceFactory orb, String documentOrFactoryURL ) throws com.sun.star.uno.Exception
- {
- return implLoadDocument( orb, documentOrFactoryURL, new PropertyValue[0] );
- }
-
- /* ------------------------------------------------------------------ */
- private static OfficeDocument implLoadDocument( XMultiServiceFactory orb, String documentOrFactoryURL, final PropertyValue[] i_args ) throws com.sun.star.uno.Exception
- {
- XComponent document = implLoadAsComponent( orb, documentOrFactoryURL, i_args );
-
- XServiceInfo xSI = UnoRuntime.queryInterface( XServiceInfo.class, document );
- if ( xSI.supportsService( "com.sun.star.sheet.SpreadsheetDocument" ) )
- return new SpreadsheetDocument( orb, document );
- return new OfficeDocument( orb, document );
- }
-
- /* ------------------------------------------------------------------ */
- public static OfficeDocument loadDocument( XMultiServiceFactory orb, String documentURL ) throws com.sun.star.uno.Exception
- {
- return implLoadDocument( orb, documentURL );
- }
-
- /* ------------------------------------------------------------------ */
- public static OfficeDocument blankTextDocument( XMultiServiceFactory orb ) throws com.sun.star.uno.Exception
- {
- return blankDocument( orb, DocumentType.WRITER );
- }
-
- /* ------------------------------------------------------------------ */
- public static OfficeDocument blankXMLForm( XMultiServiceFactory orb ) throws com.sun.star.uno.Exception
- {
- return blankDocument( orb, DocumentType.XMLFORM );
- }
-
- /* ------------------------------------------------------------------ */
- public static OfficeDocument blankDocument( XMultiServiceFactory orb, DocumentType eType ) throws com.sun.star.uno.Exception
- {
- final PropertyValue[] args = new PropertyValue[] {
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list