From 939cb5ec7761014e250df23777231142cd940f12 Mon Sep 17 00:00:00 2001 From: sb Date: Fri, 14 May 2010 13:50:22 +0200 Subject: sb123: #i111598# OfficeConnection getFactory -> getComponentContext --- smoketestoo_native/smoketest.cxx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'smoketestoo_native') diff --git a/smoketestoo_native/smoketest.cxx b/smoketestoo_native/smoketest.cxx index e2cb51127..57018f56a 100644 --- a/smoketestoo_native/smoketest.cxx +++ b/smoketestoo_native/smoketest.cxx @@ -141,10 +141,12 @@ void Test::test() { css::uno::Reference< css::frame::XController >( css::uno::Reference< css::frame::XModel >( css::uno::Reference< css::frame::XComponentLoader >( - connection_.getFactory()->createInstance( - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.frame.Desktop"))), + (connection_.getComponentContext()-> + getServiceManager()->createInstanceWithContext( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.frame.Desktop")), + connection_.getComponentContext())), css::uno::UNO_QUERY_THROW)->loadComponentFromURL( test::toAbsoluteFileUrl(doc), rtl::OUString( -- cgit v1.2.3 From 3eb6722861079aa03f254c39cd79736ea97a4004 Mon Sep 17 00:00:00 2001 From: sb Date: Fri, 14 May 2010 16:22:06 +0200 Subject: sb123: #i111601# various additional test helper functionality --- smoketestoo_native/makefile.mk | 3 ++- smoketestoo_native/smoketest.cxx | 6 ++--- test/inc/test/getargument.hxx | 44 -------------------------------- test/inc/test/gettestargument.hxx | 46 ++++++++++++++++++++++++++++++++++ test/prj/d.lst | 2 +- test/source/cpp/getargument.cxx | 7 +++++- test/source/cpp/getargument.hxx | 44 ++++++++++++++++++++++++++++++++ test/source/cpp/gettestargument.cxx | 43 +++++++++++++++++++++++++++++++ test/source/cpp/makefile.mk | 1 + test/source/cpp/officeconnection.cxx | 9 ++++--- test/source/java/Argument.java | 36 ++++++++++++++++++++++++++ test/source/java/OfficeConnection.java | 10 +++----- test/source/java/OfficeFileUrl.java | 42 +++++++++++++++++++++++++++++++ test/source/java/TestArgument.java | 39 ++++++++++++++++++++++++++++ test/source/java/makefile.mk | 6 ++++- 15 files changed, 276 insertions(+), 62 deletions(-) delete mode 100644 test/inc/test/getargument.hxx create mode 100644 test/inc/test/gettestargument.hxx create mode 100644 test/source/cpp/getargument.hxx create mode 100644 test/source/cpp/gettestargument.cxx create mode 100644 test/source/java/Argument.java create mode 100644 test/source/java/OfficeFileUrl.java create mode 100644 test/source/java/TestArgument.java (limited to 'smoketestoo_native') diff --git a/smoketestoo_native/makefile.mk b/smoketestoo_native/makefile.mk index 0337c748d..ec0d6be31 100644 --- a/smoketestoo_native/makefile.mk +++ b/smoketestoo_native/makefile.mk @@ -49,7 +49,8 @@ ALLTAR : cpptest cpptest : $(SHL1TARGETN) $(BIN)/smoketestdoc.sxw -OOO_CPPTEST_ARGS = $(SHL1TARGETN) -env:arg-doc=$(BIN)/smoketestdoc.sxw +TEST_ARGUMENTS = smoketest.doc=$(BIN)/smoketestdoc.sxw +CPPTEST_LIBRARY = $(SHL1TARGETN) $(BIN)/smoketestdoc.sxw: data/smoketestdoc.sxw $(COPY) $< $@ diff --git a/smoketestoo_native/smoketest.cxx b/smoketestoo_native/smoketest.cxx index 57018f56a..0d7e636f1 100644 --- a/smoketestoo_native/smoketest.cxx +++ b/smoketestoo_native/smoketest.cxx @@ -53,7 +53,7 @@ #include "osl/diagnose.h" #include "rtl/ustring.h" #include "rtl/ustring.hxx" -#include "test/getargument.hxx" +#include "test/gettestargument.hxx" #include "test/officeconnection.hxx" #include "test/oustringostreaminserter.hxx" #include "test/toabsolutefileurl.hxx" @@ -121,8 +121,8 @@ void Test::tearDown() { void Test::test() { rtl::OUString doc; CPPUNIT_ASSERT( - test::getArgument( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("doc")), &doc)); + test::getTestArgument( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("smoketest.doc")), &doc)); css::uno::Sequence< css::beans::PropertyValue > args(1); args[0].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("MacroExecutionMode")); diff --git a/test/inc/test/getargument.hxx b/test/inc/test/getargument.hxx deleted file mode 100644 index 1b4df29d2..000000000 --- a/test/inc/test/getargument.hxx +++ /dev/null @@ -1,44 +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 -* -* for a copy of the LGPLv3 License. -************************************************************************/ - -#ifndef INCLUDED_TEST_GETARGUMENT_HXX -#define INCLUDED_TEST_GETARGUMENT_HXX - -#include "sal/config.h" - -#include "test/detail/testdllapi.hxx" - -namespace rtl { class OUString; } - -namespace test { - -// Obtain the value of an argument tunneled in via an "arg-" bootstrap -// variable: -OOO_DLLPUBLIC_TEST bool getArgument( - rtl::OUString const & name, rtl::OUString * value); - -} - -#endif diff --git a/test/inc/test/gettestargument.hxx b/test/inc/test/gettestargument.hxx new file mode 100644 index 000000000..21b9df7a0 --- /dev/null +++ b/test/inc/test/gettestargument.hxx @@ -0,0 +1,46 @@ +/************************************************************************* +* +* 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 +* +* 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." +// bootstrap variable): +OOO_DLLPUBLIC_TEST bool getTestArgument( + rtl::OUString const & name, rtl::OUString * value); + +} + +#endif diff --git a/test/prj/d.lst b/test/prj/d.lst index bcea8bee4..34218f54e 100644 --- a/test/prj/d.lst +++ b/test/prj/d.lst @@ -5,7 +5,7 @@ mkdir: %_DEST%\inc%_EXT%\test\detail ..\%__SRC%\lib\libtest.dylib %_DEST%\lib%_EXT%\libtest.dylib ..\%__SRC%\lib\libtest.so %_DEST%\lib%_EXT%\libtest.so ..\inc\test\detail\testdllapi.hxx %_DEST%\inc%_EXT%\test\detail\testdllapi.hxx -..\inc\test\getargument.hxx %_DEST%\inc%_EXT%\test\getargument.hxx +..\inc\test\gettestargument.hxx %_DEST%\inc%_EXT%\test\gettestargument.hxx ..\inc\test\officeconnection.hxx %_DEST%\inc%_EXT%\test\officeconnection.hxx ..\inc\test\oustringostreaminserter.hxx %_DEST%\inc%_EXT%\test\oustringostreaminserter.hxx ..\inc\test\toabsolutefileurl.hxx %_DEST%\inc%_EXT%\test\toabsolutefileurl.hxx diff --git a/test/source/cpp/getargument.cxx b/test/source/cpp/getargument.cxx index 339c5c9c7..0db144679 100644 --- a/test/source/cpp/getargument.cxx +++ b/test/source/cpp/getargument.cxx @@ -29,10 +29,13 @@ #include "rtl/bootstrap.hxx" #include "rtl/ustring.h" #include "rtl/ustring.hxx" -#include "test/getargument.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( @@ -40,3 +43,5 @@ bool getArgument(rtl::OUString const & name, rtl::OUString * value) { } } + +} diff --git a/test/source/cpp/getargument.hxx b/test/source/cpp/getargument.hxx new file mode 100644 index 000000000..4ba7e0f47 --- /dev/null +++ b/test/source/cpp/getargument.hxx @@ -0,0 +1,44 @@ +/************************************************************************* +* 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 +* +* 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-" bootstrap +// variable: +bool getArgument( + rtl::OUString const & name, rtl::OUString * value); + +} + +} + +#endif diff --git a/test/source/cpp/gettestargument.cxx b/test/source/cpp/gettestargument.cxx new file mode 100644 index 000000000..757faa751 --- /dev/null +++ b/test/source/cpp/gettestargument.cxx @@ -0,0 +1,43 @@ +/************************************************************************* +* +* 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 +* +* 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); +} + +} diff --git a/test/source/cpp/makefile.mk b/test/source/cpp/makefile.mk index 8494bd4aa..1c2d5a8ca 100644 --- a/test/source/cpp/makefile.mk +++ b/test/source/cpp/makefile.mk @@ -37,6 +37,7 @@ CFLAGSCXX += $(CPPUNIT_CFLAGS) SLOFILES = \ $(SLO)/getargument.obj \ + $(SLO)/gettestargument.obj \ $(SLO)/officeconnection.obj \ $(SLO)/toabsolutefileurl.obj diff --git a/test/source/cpp/officeconnection.cxx b/test/source/cpp/officeconnection.cxx index c8c42873c..5ea493f0b 100644 --- a/test/source/cpp/officeconnection.cxx +++ b/test/source/cpp/officeconnection.cxx @@ -37,10 +37,11 @@ #include "osl/process.h" #include "osl/time.h" #include "sal/types.h" -#include "test/getargument.hxx" #include "test/officeconnection.hxx" #include "test/toabsolutefileurl.hxx" +#include "getargument.hxx" + namespace { namespace css = com::sun::star; @@ -57,7 +58,7 @@ void OfficeConnection::setUp() { rtl::OUString desc; rtl::OUString argSoffice; CPPUNIT_ASSERT( - getArgument( + detail::getArgument( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("soffice")), &argSoffice)); if (argSoffice.matchAsciiL(RTL_CONSTASCII_STRINGPARAM("path:"))) { @@ -78,7 +79,7 @@ void OfficeConnection::setUp() { rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(";urp"))); rtl::OUString argUser; CPPUNIT_ASSERT( - getArgument( + detail::getArgument( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("user")), &argUser)); rtl::OUString userArg( rtl::OUString( @@ -94,7 +95,7 @@ void OfficeConnection::setUp() { acceptArg.pData, userArg.pData, jreArg.pData, classpathArg.pData }; rtl_uString ** envs = 0; rtl::OUString argEnv; - if (getArgument( + if (detail::getArgument( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("env")), &argEnv)) { envs = &argEnv.pData; diff --git a/test/source/java/Argument.java b/test/source/java/Argument.java new file mode 100644 index 000000000..4e2a78153 --- /dev/null +++ b/test/source/java/Argument.java @@ -0,0 +1,36 @@ +/************************************************************************* +* +* 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 +* +* for a copy of the LGPLv3 License. +* +************************************************************************/ + +package org.openoffice.test; + +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/OfficeConnection.java b/test/source/java/OfficeConnection.java index b0b08c164..fc6e78f5f 100644 --- a/test/source/java/OfficeConnection.java +++ b/test/source/java/OfficeConnection.java @@ -49,17 +49,17 @@ public final class OfficeConnection { /** Start up an OOo instance. */ public void setUp() throws Exception { - String sofficeArg = getArgument("soffice"); + 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", "-accept=" + description + ";urp", - "-env:UserInstallation=" + getArgument("user"), + "-env:UserInstallation=" + Argument.get("user"), "-env:UNO_JAVA_JFW_ENV_JREHOME=true", "-env:UNO_JAVA_JFW_ENV_CLASSPATH=true"); - String envArg = getArgument("env"); + String envArg = Argument.get("env"); if (envArg != null) { Map env = pb.environment(); int i = envArg.indexOf("="); @@ -142,10 +142,6 @@ public final class OfficeConnection { return description; } - private static String getArgument(String name) { - return System.getProperty("org.openoffice.test.arg." + name); - } - private static Integer waitForProcess(Process process, final long millis) throws InterruptedException { diff --git a/test/source/java/OfficeFileUrl.java b/test/source/java/OfficeFileUrl.java new file mode 100644 index 000000000..1ab62e283 --- /dev/null +++ b/test/source/java/OfficeFileUrl.java @@ -0,0 +1,42 @@ +/************************************************************************* +* +* 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 +* +* 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/TestArgument.java b/test/source/java/TestArgument.java new file mode 100644 index 000000000..1303d09e1 --- /dev/null +++ b/test/source/java/TestArgument.java @@ -0,0 +1,39 @@ +/************************************************************************* +* +* 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 +* +* 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." 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/makefile.mk b/test/source/java/makefile.mk index a541d532f..86506f11c 100644 --- a/test/source/java/makefile.mk +++ b/test/source/java/makefile.mk @@ -30,7 +30,11 @@ TARGET = java .IF "$(OOO_JUNIT_JAR)" != "" PACKAGE = org/openoffice/test -JAVAFILES = OfficeConnection.java +JAVAFILES = \ + Argument.java \ + OfficeConnection.java \ + OfficeFileUrl.java \ + TestArgument.java JARFILES = juh.jar ridl.jar unoil.jar EXTRAJARFILES = $(OOO_JUNIT_JAR) -- cgit v1.2.3 From 479b6371eee5545e45cf2e8ea5cafac335016b10 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 3 Aug 2010 10:01:07 +0100 Subject: cmcfixes77: #i113503# system non-stlport cppunit with OOo stlport --- smoketestoo_native/makefile.mk | 7 +++++++ smoketestoo_native/smoketest.cxx | 2 ++ test/source/cpp/makefile.mk | 7 +++++++ test/source/cpp/officeconnection.cxx | 2 ++ 4 files changed, 18 insertions(+) (limited to 'smoketestoo_native') diff --git a/smoketestoo_native/makefile.mk b/smoketestoo_native/makefile.mk index 0337c748d..3dccb111c 100644 --- a/smoketestoo_native/makefile.mk +++ b/smoketestoo_native/makefile.mk @@ -33,6 +33,13 @@ ENABLE_EXCEPTIONS = TRUE CFLAGSCXX += $(CPPUNIT_CFLAGS) +#building with stlport, but cppunit was not built with stlport +.IF "$(USE_SYSTEM_STL)"!="YES" +.IF "$(SYSTEM_CPPUNIT)"=="YES" +CFLAGSCXX+=-DADAPT_EXT_STL +.ENDIF +.ENDIF + SLOFILES = $(SHL1OBJS) SHL1TARGET = smoketest diff --git a/smoketestoo_native/smoketest.cxx b/smoketestoo_native/smoketest.cxx index e2cb51127..bb86cd254 100644 --- a/smoketestoo_native/smoketest.cxx +++ b/smoketestoo_native/smoketest.cxx @@ -44,11 +44,13 @@ #include "com/sun/star/uno/RuntimeException.hpp" #include "com/sun/star/uno/Sequence.hxx" #include "com/sun/star/util/URL.hpp" +#include #include "cppuhelper/implbase1.hxx" #include "cppunit/TestAssert.h" #include "cppunit/TestFixture.h" #include "cppunit/extensions/HelperMacros.h" #include "cppunit/plugin/TestPlugIn.h" +#include #include "osl/conditn.hxx" #include "osl/diagnose.h" #include "rtl/ustring.h" diff --git a/test/source/cpp/makefile.mk b/test/source/cpp/makefile.mk index 8494bd4aa..04eedea3c 100644 --- a/test/source/cpp/makefile.mk +++ b/test/source/cpp/makefile.mk @@ -35,6 +35,13 @@ VISIBILITY_HIDDEN = TRUE CDEFS += -DOOO_DLLIMPLEMENTATION_TEST CFLAGSCXX += $(CPPUNIT_CFLAGS) +#building with stlport, but cppunit was not built with stlport +.IF "$(USE_SYSTEM_STL)"!="YES" +.IF "$(SYSTEM_CPPUNIT)"=="YES" +CFLAGSCXX+=-DADAPT_EXT_STL +.ENDIF +.ENDIF + SLOFILES = \ $(SLO)/getargument.obj \ $(SLO)/officeconnection.obj \ diff --git a/test/source/cpp/officeconnection.cxx b/test/source/cpp/officeconnection.cxx index ccfd2cd0a..b77fb59e4 100644 --- a/test/source/cpp/officeconnection.cxx +++ b/test/source/cpp/officeconnection.cxx @@ -33,7 +33,9 @@ #include "com/sun/star/lang/XMultiServiceFactory.hpp" #include "com/sun/star/uno/Reference.hxx" #include "cppuhelper/bootstrap.hxx" +#include #include "cppunit/TestAssert.h" +#include #include "osl/process.h" #include "osl/time.h" #include "sal/types.h" -- cgit v1.2.3 From 79e5af71e103bc6dd3a0d2957870fc6cfc8adfa8 Mon Sep 17 00:00:00 2001 From: sb Date: Mon, 20 Sep 2010 11:01:23 +0200 Subject: sb123: #i112986# fixed merge conflict --- smoketestoo_native/smoketest.cxx | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'smoketestoo_native') diff --git a/smoketestoo_native/smoketest.cxx b/smoketestoo_native/smoketest.cxx index d1cf454c0..a4e532123 100644 --- a/smoketestoo_native/smoketest.cxx +++ b/smoketestoo_native/smoketest.cxx @@ -28,8 +28,8 @@ #include "sal/config.h" #include "boost/noncopyable.hpp" +#include "com/sun/star/awt/AsyncCallback.hpp" #include "com/sun/star/awt/XCallback.hpp" -#include "com/sun/star/awt/XRequestCallback.hpp" #include "com/sun/star/beans/PropertyState.hpp" #include "com/sun/star/beans/PropertyValue.hpp" #include "com/sun/star/document/MacroExecMode.hpp" @@ -186,11 +186,8 @@ void Test::test() { css::uno::UNO_QUERY_THROW); Result result; // Shifted to main thread to work around potential deadlocks (i112867): - css::uno::Reference< css::awt::XRequestCallback >( - connection_.getFactory()->createInstance( //TODO: AsyncCallback ctor - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.AsyncCallback"))), - css::uno::UNO_QUERY_THROW)->addCallback( + com::sun::star::awt::AsyncCallback::create( + connection_.getComponentContext())->addCallback( new Callback( disp, url, css::uno::Sequence< css::beans::PropertyValue >(), new Listener(&result)), -- cgit v1.2.3 From d2452c009cd7fe392d3f81a5c4f9d2fdcb1c941f Mon Sep 17 00:00:00 2001 From: sb Date: Fri, 24 Sep 2010 09:06:28 +0200 Subject: sb132: #i97025# removed cut/paste test (using system clipboard) from smoketest --- smoketestoo_native/data/Events.xml | 22 ----- smoketestoo_native/data/Global.xml | 36 ++------ smoketestoo_native/data/OptionsDlg.xml | 20 ++-- smoketestoo_native/data/Test_10er.xml | 161 --------------------------------- smoketestoo_native/data/content.xml | 2 +- 5 files changed, 18 insertions(+), 223 deletions(-) (limited to 'smoketestoo_native') diff --git a/smoketestoo_native/data/Events.xml b/smoketestoo_native/data/Events.xml index 956a1ee40..61272293f 100644 --- a/smoketestoo_native/data/Events.xml +++ b/smoketestoo_native/data/Events.xml @@ -28,28 +28,6 @@ REM ***** BASIC ***** -Sub InitEvents - call ClickCutTest -End Sub - -Sub ClickSaveTest - if not OptionsDlg.cbSaveTest.Value then - OptionsDlg.cbOpenTest.Value = false - OptionsDlg.cbOpenTest.Enabled = false - else - OptionsDlg.cbOpenTest.Enabled = true - end If -End Sub - -Sub ClickCutTest - if not OptionsDlg.cbCutTest.Value then - OptionsDlg.cbPasteTest.Value = false - OptionsDlg.cbPasteTest.Enabled = false - else - OptionsDlg.cbPasteTest.Enabled = true - end If -End Sub - Sub PressCancel gDlgState = cDlgCancel end Sub diff --git a/smoketestoo_native/data/Global.xml b/smoketestoo_native/data/Global.xml index 43d0a14e6..588b4df7f 100644 --- a/smoketestoo_native/data/Global.xml +++ b/smoketestoo_native/data/Global.xml @@ -35,7 +35,7 @@ const cParagraphBreak = 0 global const cExtensionFileName = "TestExtension.oxt" -global const cDocNew = 0, cDocCut = 1, cDocPaste = 2, cDocSaveOpen8 = 3, cDocSaveOpenXML = 4, cDocSaveOpen50 = 5, cDocClose = 6, cDocWrite = 7 +global const cDocNew = 0, cDocSaveOpen8 = 1, cDocSaveOpenXML = 2, cDocSaveOpen50 = 3, cDocClose = 4, cDocWrite = 5 global const cDBService = 0, cDBOpen = 1, cDBInsert = 2, cDBDelete = 3, cDBSeek = 4, cDBClose = 5 global const cEXTService = 0, cEXTInstall = 1, cEXTUninstall = 2 global const cLogfileFailed = 255 @@ -83,8 +83,8 @@ Global const cUserFieldTestWriter = "Writer", cUserFieldTestCalc = &qu Global const cUserFieldTestDraw = "Draw", cUserFieldTestMath = "Math", cUserFieldTestChart = "Chart" Global const cUserFieldTestHTML = "HTML", cUserFieldTestJava = "Java", cUserFieldTestDatabase = "Database" Global const cUserFieldTestExtension = "Extension" -Global const cUserFieldTestOpenSaveXML = "SaveOpenXML", cUserFieldTestOpenSave50 = "SaveOpen50", cUserFieldTestCut = "Cut" -Global const cUserFieldTestPaste = "Paste", cUserFieldTestTerminateAfterTest = "Terminate", cUserFieldTestOpenSave8 = "SaveOpen8" +Global const cUserFieldTestOpenSaveXML = "SaveOpenXML", cUserFieldTestOpenSave50 = "SaveOpen50" +Global const cUserFieldTestTerminateAfterTest = "Terminate", cUserFieldTestOpenSave8 = "SaveOpen8" Global const cOptionsDialogName = "OptionsDlg", cTest10Modul = "Standard" @@ -100,8 +100,8 @@ Global bMakeWriterTest as boolean, bMakeCalcTest as boolean, bMakeImpressTest a Global bMakeDrawTest as Boolean, bMakeMathTest as boolean, bMakeChartTest as boolean Global bMakeHTMLTest as boolean, bMakeJavaTest as boolean, bMakeDBTest as boolean Global bMakeExtensionTest as boolean -Global bMakeSaveOpenXMLTest as boolean, bMakeSaveOpen50Test as boolean, bMakeCutTest as boolean -Global bMakePasteTest as boolean, bMakeTerminateAfterTest as boolean, bShowTable as boolean +Global bMakeSaveOpenXMLTest as boolean, bMakeSaveOpen50Test as boolean +Global bMakeTerminateAfterTest as boolean, bShowTable as boolean Global bMakeSaveOpen8Test as boolean global sExtensionURL as string @@ -156,10 +156,8 @@ Sub CreateStatusTable tableHeaders(cStHTML) = "HTML" tableHeaders(cStJava) = "Java" - dim tableColums(5) as string + dim tableColums(3) as string tableColums(cDocNew) = "new" - tableColums(cDocCut) = "cut" - tableColums(cDocPaste) = "paste" tableColums(cDocSaveOpen8) = "V8.0" tableColums(cDocSaveOpenXML) = "XML" tableColums(cDocSaveOpen50) = "V5.0" @@ -211,7 +209,7 @@ Sub CreateStatusTable xCell.BackTransparent = False xCell.BackColor = cCoGrey - for i% = 0 to 5 + for i% = 0 to 3 tableCursor.goDown(1,FALSE) cName = tableCursor.getRangeName() xCell = table.getCellByName(cName) @@ -509,8 +507,6 @@ Sub SetOptions SetUserFieldState (cUserFieldTestOpenSaveXML, -(gOptionsDialog.getControl("cbSaveOpenXMLTest").getState), gOutPutDoc) SetUserFieldState (cUserFieldTestOpenSave50, -(gOptionsDialog.getControl("cbSaveOpen50Test").getState), gOutPutDoc) SetUserFieldState (cUserFieldTestOpenSave8, -(gOptionsDialog.getControl("cbSaveOpen8Test").getState), gOutPutDoc) - SetUserFieldState (cUserFieldTestCut, -(gOptionsDialog.getControl("cbCutTest").getState), gOutPutDoc) - SetUserFieldState (cUserFieldTestPaste, -(gOptionsDialog.getControl("cbPasteTest").getState), gOutPutDoc) SetUserFieldState (cUserFieldTestTerminateAfterTest, -(gOptionsDialog.getControl("cbTerminateAfterTest").getState), gOutPutDoc) end Sub @@ -529,8 +525,6 @@ Sub GetOptions gOptionsDialog.getControl("cbSaveOpenXMLTest").setState( -( GetUserFieldState (cUserFieldTestOpenSaveXML, gOutPutDoc))) gOptionsDialog.getControl("cbSaveOpen50Test").setState( -( GetUserFieldState (cUserFieldTestOpenSave50, gOutPutDoc))) gOptionsDialog.getControl("cbSaveOpen8Test").setState( -( GetUserFieldState (cUserFieldTestOpenSave8, gOutPutDoc))) - gOptionsDialog.getControl("cbCutTest").setState( -( GetUserFieldState (cUserFieldTestCut, gOutPutDoc))) - gOptionsDialog.getControl("cbPasteTest").setState( -( GetUserFieldState (cUserFieldTestPaste, gOutPutDoc))) gOptionsDialog.getControl("cbTerminateAfterTest").setState( -( GetUserFieldState (cUserFieldTestTerminateAfterTest, gOutPutDoc))) End Sub @@ -549,8 +543,6 @@ Sub ReadOptions bMakeSaveOpenXMLTest = GetUserFieldState (cUserFieldTestOpenSaveXML, gOutPutDoc) bMakeSaveOpen50Test = GetUserFieldState (cUserFieldTestOpenSave50, gOutPutDoc) bMakeSaveOpen8Test = GetUserFieldState (cUserFieldTestOpenSave8, gOutPutDoc) - bMakeCutTest = GetUserFieldState (cUserFieldTestCut, gOutPutDoc) - bMakePasteTest = GetUserFieldState (cUserFieldTestPaste, gOutPutDoc) bMakeTerminateAfterTest = GetUserFieldState (cUserFieldTestTerminateAfterTest, gOutPutDoc) end Sub @@ -579,8 +571,6 @@ Sub SetDefaultOptions bMakeSaveOpen50Test = true End If bMakeSaveOpen8Test = true - bMakeCutTest = true - bMakePasteTest = true bMakeTerminateAfterTest = false end Sub @@ -614,10 +604,8 @@ Function StartTestWithDefaultOptions component(cStJava) = "Java" component(cStDataBase) = "Base" component(cStExtension) = "Extensions" - dim action(5) as string + dim action(3) as string action(cDocNew) = "new" - action(cDocCut) = "cut" - action(cDocPaste) = "paste" action(cDocSaveOpen8) = "V8.0" action(cDocSaveOpenXML) = "XML" action(cDocSaveOpen50) = "V5.0" @@ -700,14 +688,6 @@ Sub ExecuteSlot( SlotNr As String, oDoc as Object ) End Sub -Sub CutText (oDoc as Object) - ExecuteSlot ("5710", oDoc) -End Sub - -Sub PasteText (oDoc as Object) - ExecuteSlot ("5712", oDoc) -End Sub - Sub DelAllUserFields (aDoc as Object) Dim aFieldType as Object Dim aElements as Variant diff --git a/smoketestoo_native/data/OptionsDlg.xml b/smoketestoo_native/data/OptionsDlg.xml index b993a31c9..213c880d4 100644 --- a/smoketestoo_native/data/OptionsDlg.xml +++ b/smoketestoo_native/data/OptionsDlg.xml @@ -43,22 +43,20 @@ - - - - - + + + - + - + - - - - + + + + diff --git a/smoketestoo_native/data/Test_10er.xml b/smoketestoo_native/data/Test_10er.xml index 5563ce1b4..e19f0c73b 100644 --- a/smoketestoo_native/data/Test_10er.xml +++ b/smoketestoo_native/data/Test_10er.xml @@ -42,8 +42,6 @@ const cMessageSaveOpenXMLDoc = "Save/Open Document XML (6/7)" const cMessageSaveOpen50Doc = "Save/Open Document 5.0" const cMessageNewDoc = "New Document" const cMessageCloseDoc = "Close Document" -const cMessageCutObj = "Cut Object" -const cMessagePasteObj = "Paste Object" Global sWorkPath$ Global sWorkPathURL$ @@ -294,12 +292,6 @@ Sub WriteTests (sText as string, bTestAll as boolean, nFileChannel as integer) sWriteStr = sText sWriteStr = sWriteStr + "new" if bTestAll then - if bMakeCutTest then - sWriteStr = sWriteStr + ", cut" - end if - if bMakePasteTest then - sWriteStr = sWriteStr + ", paste" - end if if bMakeSaveOpen8Test then sWriteStr = sWriteStr + ", save 8.0" end if @@ -364,9 +356,6 @@ Sub MakeDocTest (FilterType as Integer) LogState (not IsNull (oDoc), GetDocFilter(FilterType or cFltNewDoc)+" "+ cMessageNewDoc, MainFileChannel) SetStatus (FilterType, cDocNew, not IsNull (oDoc)) if not IsNull (oDoc) then - nCurrentAction = cDocCut - call CutAndPaste(FilterType, oDoc) -' bError = oDoc.CurrentController.frame.close nCurrentAction = cDocSaveOpen8 if bMakeSaveOpen8Test and IsFilterAvailable (FilterType or cFlt8) then sFileName8 = sWorkPathURL+cTempFileName+"."+GetDocEndings(FilterType or cFlt8) @@ -674,10 +663,6 @@ Function GetErrorMessageOnAction (nAction as Integer) as String Select Case ( nAction ) case cDocNew GetErrorMessageOnAction = cMessageNewDoc - case cDocCut - GetErrorMessageOnAction = cMessageCutObj - case cDocPaste - GetErrorMessageOnAction = cMessagePasteObj case cDocSaveOpen8 GetErrorMessageOnAction = cMessageSaveOpen8Doc case cDocSaveOpenXML @@ -712,152 +697,6 @@ Function TestJava (FilterType as Integer) as boolean TestJava = not IsNull (oObj) End Function -Sub CutAndPaste (DocType as Integer, oDoc as Object) - Dim sText as String - Dim oWin as Object - Dim oText as Object - Dim oView as Object - Dim bCutState as boolean, bPasteState as boolean - Select Case ( DocType ) - case frmWriter - Dim oCursor as Object - - sText = "AutomaticText" - oText = oDoc.GetText - oCursor = oText.CreateTextCursor - oText.InsertString(oCursor, sText, true) ' Cursor selektiert den Text - oView = oDoc.getCurrentController - oView.Select(oCursor) - - if bMakeCutTest then - call CutText (oDoc) - - if oText.GetString = "" Then - bCutState = True - else - bCutState = False - end If - SetStatus (DocType, cDocCut, bCutState) - LogState (bCutState, GetDocFilter(DocType or cFltNewDoc)+" "+ cMessageCutObj, FileChannel) - LogState (bCutState, GetDocFilter(DocType or cFltNewDoc)+" "+ cMessageCutObj, MainFileChannel) - end if - - if bMakePasteTest and bMakeCutTest then - call PasteText (oDoc) - - if oText.GetString = sText Then - bPasteState = True - else - bPasteState = False - end If - SetStatus (DocType, cDocPaste, bPasteState) - LogState (bPasteState, GetDocFilter(DocType or cFltNewDoc)+" "+ cMessagePasteObj, FileChannel) - LogState (bPasteState, GetDocFilter(DocType or cFltNewDoc)+" "+ cMessagePasteObj, MainFileChannel) - end if - - case frmCalc - DIM oCell as Object - - sText = "AutomaticText" - oCell = oDoc.Sheets(0).GetCellByPosition(0, 0) - oCell.String = sText - oView = oDoc.getCurrentController - oView.Select(oCell) - - if bMakeCutTest then - call CutText (oDoc) - - if oCell.String = "" Then - bCutState = True - else - bCutState = False - end If - SetStatus (DocType, cDocCut, bCutState) - LogState (bCutState, GetDocFilter(DocType or cFltNewDoc)+" "+ cMessageCutObj, FileChannel) - LogState (bCutState, GetDocFilter(DocType or cFltNewDoc)+" "+ cMessageCutObj, MainFileChannel) - end if - - if bMakePasteTest and bMakeCutTest then - call PasteText (oDoc) - - if oCell.String = sText Then - bPasteState = True - else - bPasteState = False - end If - SetStatus (DocType, cDocPaste, bPasteState) - LogState (bPasteState, GetDocFilter(DocType or cFltNewDoc)+" "+ cMessagePasteObj, FileChannel) - LogState (bPasteState, GetDocFilter(DocType or cFltNewDoc)+" "+ cMessagePasteObj, MainFileChannel) - end if - case frmMessage - case frmImpress, frmDraw - Dim oPage as Object - Dim oRect as Object - Dim xSize as Object - Dim xPoint as Object - Dim bObjState as Boolean - - xSize = CreateUnoStruct ("com.sun.star.awt.Size") - xPoint = CreateUnoStruct ("com.sun.star.awt.Point") - xSize.Width = 2000 - xSize.Height = 2000 - xPoint.x = 10000 - xPoint.y = 10000 - oPage = oDoc.DrawPages(0) - - if DocType = frmImpress Then - oPage.Layout = 20 ' set page layot to none - end If - - oRect = oDoc.CreateInstance("com.sun.star.drawing.RectangleShape") - oRect.Size = xSize - oRect.Position = xPoint - oPage.add(oRect) - - oView = oDoc.getCurrentController - oView.Select(oRect) - - ' Prüft ob überhaupt ein Object angelegt wurde - if oPage.count = 1 Then - bObjState = True - else - bObjState = False - end If - - if bMakeCutTest then - call CutText (oDoc) - - if (oPage.count = 0) and bObjState Then - bCutState = True - else - bCutState = False - end If - SetStatus (DocType, cDocCut, bCutState) - LogState (bCutState, GetDocFilter(DocType or cFltNewDoc)+" "+ cMessageCutObj, FileChannel) - LogState (bCutState, GetDocFilter(DocType or cFltNewDoc)+" "+ cMessageCutObj, MainFileChannel) - end if - - wait (1000) 'wait after cut - - if bMakePasteTest and bMakeCutTest then - call PasteText (oDoc) - - if (oPage.count = 1) and bObjState Then - bPasteState = True - else - bPasteState = False - end If - SetStatus (DocType, cDocPaste, bPasteState) - LogState (bPasteState, GetDocFilter(DocType or cFltNewDoc)+" "+ cMessagePasteObj, FileChannel) - LogState (bPasteState, GetDocFilter(DocType or cFltNewDoc)+" "+ cMessagePasteObj, MainFileChannel) - end if - case frmMath - case frmImage - case frmHyperText - case frmChart - end Select -end Sub - Sub LoadLibrary( LibName as String ) dim args(1) diff --git a/smoketestoo_native/data/content.xml b/smoketestoo_native/data/content.xml index bc63d1d2c..dcd31b175 100644 --- a/smoketestoo_native/data/content.xml +++ b/smoketestoo_native/data/content.xml @@ -25,4 +25,4 @@ * for a copy of the LGPLv3 License. * **********************************************************************--> -stardiv.one.form.control.CommandButtonstardiv.one.form.control.CommandButtonstardiv.one.form.control.CommandButton +stardiv.one.form.control.CommandButtonstardiv.one.form.control.CommandButtonstardiv.one.form.control.CommandButton -- cgit v1.2.3 From 858ec8ff6718b7f8e00007199515dc3f5d01e3aa Mon Sep 17 00:00:00 2001 From: os Date: Mon, 10 Jan 2011 11:04:17 +0100 Subject: #i116322# disable binfilter file export: remove test of binary load/save --- smoketestoo_native/data/Test_10er.xml | 71 ++--------------------------------- 1 file changed, 4 insertions(+), 67 deletions(-) (limited to 'smoketestoo_native') diff --git a/smoketestoo_native/data/Test_10er.xml b/smoketestoo_native/data/Test_10er.xml index e19f0c73b..e98a7a836 100644 --- a/smoketestoo_native/data/Test_10er.xml +++ b/smoketestoo_native/data/Test_10er.xml @@ -39,7 +39,6 @@ const cTempFileName = "ttt" const cMessageSaveOpen8Doc = "Save/Open open Documents (8.0)" const cMessageSaveOpenXMLDoc = "Save/Open Document XML (6/7)" -const cMessageSaveOpen50Doc = "Save/Open Document 5.0" const cMessageNewDoc = "New Document" const cMessageCloseDoc = "Close Document" @@ -90,22 +89,6 @@ Sub DeleteAllSavedFiles() If FileExists (sFileName) then Kill (sFileName) End If - sFileName = sWorkPath+cTempFileName+"."+GetDocEndings(frmWriter or cFlt50) - If FileExists (sFileName) then - Kill (sFileName) - End If - sFileName = sWorkPath+cTempFileName+"."+GetDocEndings(frmCalc or cFlt50) - If FileExists (sFileName) then - Kill (sFileName) - End If - sFileName = sWorkPath+cTempFileName+"."+GetDocEndings(frmImpress or cFlt50) - If FileExists (sFileName) then - Kill (sFileName) - End If - sFileName = sWorkPath+cTempFileName+"."+GetDocEndings(frmDraw or cFlt50) - If FileExists (sFileName) then - Kill (sFileName) - End If End Sub Sub DeleteAllLogFiles() @@ -298,18 +281,12 @@ Sub WriteTests (sText as string, bTestAll as boolean, nFileChannel as integer) if bMakeSaveOpenXMLTest then sWriteStr = sWriteStr + ", save XML" end if - if bMakeSaveOpen50Test then - sWriteStr = sWriteStr + ", save 5.0" - end if if bMakeSaveOpen8Test then sWriteStr = sWriteStr + ", open 8.0" end if if bMakeSaveOpenXMLTest then sWriteStr = sWriteStr + ", open XML" end if - if bMakeSaveOpen50Test then - sWriteStr = sWriteStr + ", open 5.0" - end if end if sWriteStr = sWriteStr + ", close" @@ -343,7 +320,7 @@ end Sub Sub MakeDocTest (FilterType as Integer) Dim oDoc as Object - Dim sFileNameXML$, sFileName50$, sFileName8$ + Dim sFileNameXML$, sFileName8$ Dim bError as Boolean Dim nCurrentAction as Integer @@ -366,11 +343,6 @@ Sub MakeDocTest (FilterType as Integer) sFileNameXML = sWorkPathURL+cTempFileName+"."+GetDocEndings(FilterType or cFltXML) SaveDoc (sFileNameXML, oDoc, GetDocFilter(FilterType or cFltXML)) end if - nCurrentAction = cDocSaveOpen50 - if bMakeSaveOpen50Test and IsFilterAvailable (FilterType or cFlt50) then - sFileName50 = sWorkPathURL+cTempFileName+"."+GetDocEndings(FilterType or cFlt50) - SaveDoc (sFileName50, oDoc, GetDocFilter(FilterType or cFlt50)) - end if ' oDoc.dispose nCurrentAction = cDocClose oDoc.close (true) @@ -410,21 +382,6 @@ Sub MakeDocTest (FilterType as Integer) end If end if - nCurrentAction = cDocSaveOpen50 - if bMakeSaveOpen50Test and IsFilterAvailable (FilterType or cFlt50) then - oDoc = LoadDoc (sFileName50) - -' oDoc = Documents.open(sFileName) - LogState (not IsNull (oDoc),GetDocFilter(FilterType or cFltNewDoc)+" "+ cMessageSaveOpen50Doc, FileChannel) - LogState (not IsNull (oDoc),GetDocFilter(FilterType or cFltNewDoc)+" "+ cMessageSaveOpen50Doc, MainFileChannel) - SetStatus (FilterType, cDocSaveOpen50, not IsNull (oDoc)) - - if not IsNull (oDoc) then -' oDoc.dispose - nCurrentAction = cDocClose - oDoc.close (true) - end If - end if end If Print #FileChannel, "---" Close #FileChannel% @@ -545,16 +502,8 @@ Function GetDocEndings (DocType as Integer) as String GetDocEndings = "odp" 'PrÕsentation case frmDraw or cFlt8 GetDocEndings = "odg" 'Zeichen - case frmHyperText, frmHyperText or cFlt50, frmHyperText or cFltXML + case frmHyperText, frmHyperText or cFltXML GetDocEndings = "html" 'Hypertext-Dokument - case frmWriter or cFlt50 - GetDocEndings = "sdw" ' Textdokument 5.0 - case frmCalc or cFlt50 - GetDocEndings = "sdc" 'Tabellendokument 5.0 - case frmImpress or cFlt50 - GetDocEndings = "sdd" 'PrÕsentation 5.0 - case frmDraw or cFlt50 - GetDocEndings = "sda" 'Zeichen 5.0 case frmWriter or cFltXML GetDocEndings = "sxw" ' Textdokument case frmCalc or cFltXML @@ -592,18 +541,8 @@ Function GetDocFilter (DocType as Integer) as String case frmMath or cFltXML GetDocFilter = "StarOffice XML (Math)" 'Formel - case frmHyperText, frmHyperText or cFlt50, frmHyperText or cFltXML + case frmHyperText, frmHyperText or cFltXML GetDocFilter = "HTML" 'Hypertext-Dokument - case frmWriter or cFlt50 - GetDocFilter = "StarWriter 5.0" ' Textdokument 5.0 - case frmCalc or cFlt50 - GetDocFilter = "StarCalc 5.0" 'Tabellendokument 5.0 - case frmImpress or cFlt50 - GetDocFilter = "StarImpress 5.0" 'Präsentation 5.0 - case frmDraw or cFlt50 - GetDocFilter = "StarDraw 5.0" 'Zeichen 5.0 - case frmMath or cFlt50 - GetDocFilter = "StarMath 5.0" 'Formel 5.0 case frmWriter or cFltNewDoc GetDocFilter = "swriter" ' Textdokument @@ -667,8 +606,6 @@ Function GetErrorMessageOnAction (nAction as Integer) as String GetErrorMessageOnAction = cMessageSaveOpen8Doc case cDocSaveOpenXML GetErrorMessageOnAction = cMessageSaveOpenXMLDoc - case cDocSaveOpen50 - GetErrorMessageOnAction = cMessageSaveOpen50Doc case cDocClose GetErrorMessageOnAction = cMessageCloseDoc case else @@ -678,7 +615,7 @@ end Function Function IsFilterAvailable (FilterType as Integer) as boolean IsFilterAvailable = true - if ((FilterType = (frmHyperText or cFlt50)) or (FilterType = (frmHyperText or cFltXML))) then + if ((FilterType = (frmHyperText or cFltXML))) then IsFilterAvailable = false end if End Function -- cgit v1.2.3