diff options
-rw-r--r-- | reportbuilder/Module_reportbuilder.mk | 1 | ||||
-rw-r--r-- | reportbuilder/Package_reportbuilder-templates.mk | 23 | ||||
-rw-r--r-- | reportbuilder/registry/data/org/openoffice/Office/Paths.xcu | 30 | ||||
-rw-r--r-- | scp2/source/ooo/module_reportbuilder.scp | 12 | ||||
-rw-r--r-- | wizards/com/sun/star/wizards/report/MANIFEST.MF | 1 | ||||
-rw-r--r-- | wizards/com/sun/star/wizards/report/ReportWizard.java | 37 |
6 files changed, 44 insertions, 60 deletions
diff --git a/reportbuilder/Module_reportbuilder.mk b/reportbuilder/Module_reportbuilder.mk index 08c3b0115788..aaa3e596e845 100644 --- a/reportbuilder/Module_reportbuilder.mk +++ b/reportbuilder/Module_reportbuilder.mk @@ -12,6 +12,7 @@ $(eval $(call gb_Module_Module,reportbuilder)) ifeq ($(ENABLE_REPORTBUILDER),TRUE) $(eval $(call gb_Module_add_targets,reportbuilder,\ Jar_reportbuilder \ + Package_reportbuilder-templates \ )) endif diff --git a/reportbuilder/Package_reportbuilder-templates.mk b/reportbuilder/Package_reportbuilder-templates.mk new file mode 100644 index 000000000000..54e6d7fc516b --- /dev/null +++ b/reportbuilder/Package_reportbuilder-templates.mk @@ -0,0 +1,23 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +# There is currently only a single, en-US, template that needs to be included in +# any installation set regardless of language settings, so keep this as a +# Package instead of an AllLangPackage (whose content would need to go into a +# language pack in scp2) for now. + +$(eval $(call gb_Package_Package,reportbuilder-templates,$(SRCDIR)/reportbuilder/template)) + +$(eval $(call gb_Package_set_outdir,reportbuilder-templates,$(INSTDIR))) + +$(eval $(call gb_Package_add_files_with_dir,reportbuilder-templates,share/template, \ + en-US/wizard/report/default.otr \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/reportbuilder/registry/data/org/openoffice/Office/Paths.xcu b/reportbuilder/registry/data/org/openoffice/Office/Paths.xcu deleted file mode 100644 index b8e8be859212..000000000000 --- a/reportbuilder/registry/data/org/openoffice/Office/Paths.xcu +++ /dev/null @@ -1,30 +0,0 @@ -<?xml version='1.0' encoding='UTF-8'?> -<!-- - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - --> - -<oor:component-data oor:package="org.openoffice.Office" oor:name="Paths" xmlns:install="http://openoffice.org/2004/installation" xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > <node oor:name="Paths"> - - <node oor:name="Template" oor:op="fuse"> - <node oor:name="InternalPaths"> - <node oor:name="%origin%/../../../../../template" oor:op="fuse"/> - </node> - </node> - - </node> -</oor:component-data> - diff --git a/scp2/source/ooo/module_reportbuilder.scp b/scp2/source/ooo/module_reportbuilder.scp index 67ffebf0cbae..1c5b0f3e187a 100644 --- a/scp2/source/ooo/module_reportbuilder.scp +++ b/scp2/source/ooo/module_reportbuilder.scp @@ -38,7 +38,9 @@ Module gid_Module_Reportbuilder gid_File_Lib_Rptui, gid_File_Lib_Rptxml, gid_File_Jar_Reportbuilder, - gid_File_Xcd_Reportbuilder); + gid_File_Jar_Reportbuilderwizard, + gid_File_Xcd_Reportbuilder, + gid_Filelist_ReportbuilderTemplates); End Directory gid_Dir_Share_Reportbuilder @@ -47,6 +49,7 @@ Directory gid_Dir_Share_Reportbuilder End STD_JAR_FILE( gid_File_Jar_Reportbuilder, reportbuilder ) +STD_JAR_FILE( gid_File_Jar_Reportbuilderwizard, reportbuilderwizard ) #if !defined SYSTEM_APACHE_COMMONS STD_JAR_FILE(gid_File_Jar_CommonsLogging, commons-logging-1.1.1) @@ -74,4 +77,11 @@ File gid_File_Xcd_Reportbuilder Styles = (PACKED); End +File gid_Filelist_ReportbuilderTemplates + TXT_FILE_BODY; + Dir = FILELIST_DIR; + Name = "reportbuilder-templates.filelist"; + Styles = (FILELIST); +End + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/wizards/com/sun/star/wizards/report/MANIFEST.MF b/wizards/com/sun/star/wizards/report/MANIFEST.MF index 1a4f8da6e3b0..2dda41ae35ed 100644 --- a/wizards/com/sun/star/wizards/report/MANIFEST.MF +++ b/wizards/com/sun/star/wizards/report/MANIFEST.MF @@ -1,2 +1,3 @@ +Class-Path: reportbuilderwizard.jar RegistrationClassName: com.sun.star.wizards.report.CallReportWizard UNO-Type-Path: diff --git a/wizards/com/sun/star/wizards/report/ReportWizard.java b/wizards/com/sun/star/wizards/report/ReportWizard.java index bae9152e6e45..c14a40bb840b 100644 --- a/wizards/com/sun/star/wizards/report/ReportWizard.java +++ b/wizards/com/sun/star/wizards/report/ReportWizard.java @@ -24,7 +24,6 @@ import com.sun.star.awt.XTextListener; import com.sun.star.beans.PropertyValue; import com.sun.star.container.XContentEnumerationAccess; -import com.sun.star.deployment.XPackageInformationProvider; import com.sun.star.lang.EventObject; import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.logging.XLogger; @@ -52,9 +51,6 @@ import com.sun.star.wizards.ui.TitlesComponent; import com.sun.star.wizards.ui.UIConsts; import com.sun.star.wizards.ui.UnoDialog; import java.lang.reflect.Method; -import java.net.URI; -import java.net.URL; -import java.net.URLClassLoader; import java.util.Map; public class ReportWizard extends DatabaseObjectWizard implements XTextListener @@ -398,19 +394,6 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener return e.hasMoreElements(); } - /** - * Return the path to the "com.sun.reportdesigner" extension - * @param _xMSF - * @return - */ - public static String getPathToExtension(XMultiServiceFactory _xMSF) - { - // Get the path to the extension and try to add the path to the class loader - final XComponentContext xComponentContext = Helper.getComponentContext(_xMSF); - final Object aSingleton = xComponentContext.getValueByName("/singletons/com.sun.star.deployment.PackageInformationProvider"); - XPackageInformationProvider xProvider = UnoRuntime.queryInterface(XPackageInformationProvider.class, aSingleton); - return xProvider.getPackageLocation("com.sun.reportdesigner"); - } private static XLogger m_xLogger; private static void initializeLogger(XMultiServiceFactory _xMSF) @@ -438,19 +421,16 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener if (isReportBuilderInstalled()) { - // Get the path to the extension and try to add the path to the class loader - String sLocation = getPathToExtension(xMSF); - // TODO: Umlaut in filename! - if (sLocation.length() > 0) + Class<?> a = null; + try + { + a = Class.forName("com.sun.star.wizards.reportbuilder.ReportBuilderImplementation"); + } + catch (ClassNotFoundException e) {} + if (a != null) { try { - URI aLocationURI = URI.create(sLocation + "/" + "reportbuilderwizard.jar"); - - URL[] aURLs = new URL[1]; - aURLs[0] = aLocationURI.toURL(); - URLClassLoader aClassLoader = new URLClassLoader(aURLs, this.getClass().getClassLoader()); - Class<?> a = aClassLoader.loadClass("com.sun.star.wizards.reportbuilder.ReportBuilderImplementation"); Method aMethod = a.getMethod("create", new Class[] { XMultiServiceFactory.class @@ -460,8 +440,7 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener } catch (Exception e) { - // Maybe problems in URI create() if a wrong char is used like '[' ']', ... - System.out.println("There could be a problem with the path '" + sLocation + "'"); + e.printStackTrace(); } } } |