diff options
author | Jan Holesovsky <kendy@suse.cz> | 2012-04-14 15:35:12 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2012-04-14 15:37:41 +0200 |
commit | 2a63c47b5b60551d44ee20983fd422d502e29be4 (patch) | |
tree | 6f1e3ecf064beddfc72315e2458a25ec67da9452 | |
parent | bca961b855c638bb6863a663972121d4414c64a7 (diff) |
Build svg2odf tool to be able to test the svg import.
-rw-r--r-- | Repository.mk | 1 | ||||
-rw-r--r-- | filter/Executable_svg2odf.mk | 47 | ||||
-rw-r--r-- | filter/Library_svgfilter.mk | 5 | ||||
-rw-r--r-- | filter/Module_filter.mk | 1 | ||||
-rw-r--r-- | filter/inc/filter/dllapi.h | 49 | ||||
-rw-r--r-- | filter/source/svg/svgreader.hxx | 6 |
6 files changed, 107 insertions, 2 deletions
diff --git a/Repository.mk b/Repository.mk index e46f6b192ce2..f0c59651bbaa 100644 --- a/Repository.mk +++ b/Repository.mk @@ -47,6 +47,7 @@ $(eval $(call gb_Helper_register_executables,NONE, \ saxparser \ so_checksum \ sp2bv \ + svg2odf \ svidl \ typesconfig \ xml2cmp \ diff --git a/filter/Executable_svg2odf.mk b/filter/Executable_svg2odf.mk new file mode 100644 index 000000000000..794edb95a6b5 --- /dev/null +++ b/filter/Executable_svg2odf.mk @@ -0,0 +1,47 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# 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 Jan Holesovsky <kendy@suse.cz>, SUSE +# (initial developer) +# +# 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. + +$(eval $(call gb_Executable_Executable,svg2odf)) + +$(eval $(call gb_Executable_set_targettype_gui,svg2odf,YES)) + +$(eval $(call gb_Executable_use_api,svg2odf,\ + offapi \ + udkapi \ +)) + +$(eval $(call gb_Executable_use_libraries,svg2odf,\ + svgfilter \ + $(gb_STDLIBS) \ +)) + +$(eval $(call gb_Executable_add_cxxobjects,svg2odf,\ + filter/source/svg/test/svg2odf \ + filter/source/svg/test/odfserializer \ +)) + +# vim: set ts=4 sw=4 et: diff --git a/filter/Library_svgfilter.mk b/filter/Library_svgfilter.mk index b5ebe23b3b91..c37938f90112 100644 --- a/filter/Library_svgfilter.mk +++ b/filter/Library_svgfilter.mk @@ -27,6 +27,11 @@ $(eval $(call gb_Library_add_defs,svgfilter,\ -DUSE_MODERN_SPIRIT \ )) +$(eval $(call gb_Library_set_include,svgfilter,\ + $$(INCLUDE) \ + -I$(SRCDIR)/filter/inc \ +)) + $(eval $(call gb_Library_use_api,svgfilter,\ udkapi \ offapi \ diff --git a/filter/Module_filter.mk b/filter/Module_filter.mk index 9bcfe3b76d0b..03f13e2379df 100644 --- a/filter/Module_filter.mk +++ b/filter/Module_filter.mk @@ -27,6 +27,7 @@ $(eval $(call gb_Module_add_targets,filter,\ AllLangResTarget_xsltdlg \ Configuration_filter \ CustomTarget_svg \ + Executable_svg2odf \ Library_PptImporter \ Library_egi \ Library_eme \ diff --git a/filter/inc/filter/dllapi.h b/filter/inc/filter/dllapi.h new file mode 100644 index 000000000000..16ff3055b2d4 --- /dev/null +++ b/filter/inc/filter/dllapi.h @@ -0,0 +1,49 @@ +/* -*- 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 _FILTER_DLLAPI_H +#define _FILTER_DLLAPI_H + +#include "sal/config.h" +#include "sal/types.h" + +#if defined FILTER_DLLIMPLEMENTATION +#define FILTER_DLLPUBLIC SAL_DLLPUBLIC_EXPORT +#else +#define FILTER_DLLPUBLIC SAL_DLLPUBLIC_IMPORT +#endif + +#if defined UNX && ! defined MACOS +#define FILTER_PLUGIN_PUBLIC FILTER_DLLPUBLIC +#else +#define FILTER_PLUGIN_PUBLIC SAL_DLLPRIVATE +#endif + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/filter/source/svg/svgreader.hxx b/filter/source/svg/svgreader.hxx index 67318f366f0d..ec250bc38175 100644 --- a/filter/source/svg/svgreader.hxx +++ b/filter/source/svg/svgreader.hxx @@ -27,6 +27,8 @@ #ifndef INCLUDED_SVGREADER_HXX #define INCLUDED_SVGREADER_HXX +#include <filter/dllapi.h> + #include <com/sun/star/uno/XComponentContext.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/xml/sax/XDocumentHandler.hpp> @@ -42,11 +44,11 @@ class SVGReader const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > m_xDocumentHandler; public: - SVGReader( const com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory>& xServiceFactory, + FILTER_DLLPUBLIC SVGReader( const com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory>& xServiceFactory, const com::sun::star::uno::Reference< com::sun::star::io::XInputStream >& xInputStream, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler >& xDocumentHandler ); - sal_Bool parseAndConvert(); + FILTER_DLLPUBLIC sal_Bool parseAndConvert(); }; } // namespace svgi |