summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Repository.mk1
-rw-r--r--sax/Library_expwrap.mk17
-rw-r--r--sax/Library_fastsax.mk18
-rw-r--r--sax/Library_sax.mk13
-rw-r--r--sax/Module_sax.mk1
-rw-r--r--sax/StaticLibrary_sax_shared.mk23
-rw-r--r--sax/inc/fastserializer.hxx (renamed from sax/source/tools/fastserializer.hxx)0
-rw-r--r--sax/inc/sax/tools/attributemap.hxx62
-rw-r--r--sax/inc/sax/tools/saxobject.hxx44
-rw-r--r--sax/inc/sax/tools/tokenmap.hxx58
-rw-r--r--sax/inc/xml2utf.hxx14
-rw-r--r--sax/source/expatwrap/attrlistimpl.hxx2
-rw-r--r--sax/source/fastparser/facreg.cxx2
-rw-r--r--sax/source/tools/fastserializer.cxx2
-rw-r--r--sax/source/tools/fshelper.cxx2
15 files changed, 59 insertions, 200 deletions
diff --git a/Repository.mk b/Repository.mk
index df57a96ca4c2..cadf342562d3 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -648,6 +648,7 @@ $(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \
ssleay32 \
ooopathutils \
sample \
+ sax_shared \
simplemapi \
shell_xmlparser \
shell_xmlparser_x64 \
diff --git a/sax/Library_expwrap.mk b/sax/Library_expwrap.mk
index 9710431c2337..39b83b7c4816 100644
--- a/sax/Library_expwrap.mk
+++ b/sax/Library_expwrap.mk
@@ -11,6 +11,10 @@ $(eval $(call gb_Library_Library,expwrap))
$(eval $(call gb_Library_set_componentfile,expwrap,sax/source/expatwrap/expwrap))
+$(eval $(call gb_Library_set_include,expwrap,\
+ -I$(SRCDIR)/sax/inc \
+ $$(INCLUDE) \
+))
$(eval $(call gb_Library_use_sdk_api,expwrap))
@@ -22,20 +26,17 @@ $(eval $(call gb_Library_use_libraries,expwrap,\
cppu \
cppuhelper \
sal \
- sax \
$(gb_STDLIBS) \
))
-
-$(eval $(call gb_Library_set_include,expwrap,\
- -I$(SRCDIR)/sax/inc \
- $$(INCLUDE) \
+$(eval $(call gb_Library_use_static_libraries,expwrap,\
+ sax_shared \
))
$(eval $(call gb_Library_add_exception_objects,expwrap,\
- sax/source/expatwrap/attrlistimpl \
- sax/source/expatwrap/sax_expat \
- sax/source/expatwrap/saxwriter \
+ sax/source/expatwrap/attrlistimpl \
+ sax/source/expatwrap/sax_expat \
+ sax/source/expatwrap/saxwriter \
))
# vim: set noet sw=4 ts=4:
diff --git a/sax/Library_fastsax.mk b/sax/Library_fastsax.mk
index 212752bdc47b..f87a22cc6656 100644
--- a/sax/Library_fastsax.mk
+++ b/sax/Library_fastsax.mk
@@ -11,10 +11,15 @@ $(eval $(call gb_Library_Library,fastsax))
$(eval $(call gb_Library_set_componentfile,fastsax,sax/source/fastparser/fastsax))
+$(eval $(call gb_Library_set_include,fastsax,\
+ -I$(SRCDIR)/sax/inc \
+ $$(INCLUDE) \
+))
+
$(eval $(call gb_Library_use_sdk_api,fastsax))
$(eval $(call gb_Library_use_externals,fastsax,\
- expat_utf8 \
+ expat_utf8 \
zlib \
))
@@ -22,18 +27,17 @@ $(eval $(call gb_Library_use_libraries,fastsax,\
cppu \
cppuhelper \
sal \
- sax \
+ sax \
$(gb_STDLIBS) \
))
-$(eval $(call gb_Library_set_include,fastsax,\
- -I$(SRCDIR)/sax/inc \
- $$(INCLUDE) \
+$(eval $(call gb_Library_use_static_libraries,fastsax,\
+ sax_shared \
))
$(eval $(call gb_Library_add_exception_objects,fastsax,\
- sax/source/fastparser/facreg \
- sax/source/fastparser/fastparser \
+ sax/source/fastparser/facreg \
+ sax/source/fastparser/fastparser \
))
# vim: set noet sw=4 ts=4:
diff --git a/sax/Library_sax.mk b/sax/Library_sax.mk
index 690bff77d22f..3dc8942795a1 100644
--- a/sax/Library_sax.mk
+++ b/sax/Library_sax.mk
@@ -13,6 +13,11 @@ $(eval $(call gb_Library_use_package,sax,\
sax_inc \
))
+$(eval $(call gb_Library_set_include,sax,\
+ -I$(SRCDIR)/sax/inc \
+ $$(INCLUDE) \
+))
+
$(eval $(call gb_Library_use_sdk_api,sax))
$(eval $(call gb_Library_use_libraries,sax,\
@@ -23,20 +28,14 @@ $(eval $(call gb_Library_use_libraries,sax,\
$(gb_STDLIBS) \
))
-$(eval $(call gb_Library_set_include,sax,\
- -I$(SRCDIR)/sax/inc \
- $$(INCLUDE) \
-))
-
$(eval $(call gb_Library_add_defs,sax,\
-DSAX_DLLIMPLEMENTATION \
))
$(eval $(call gb_Library_add_exception_objects,sax,\
- sax/source/expatwrap/xml2utf \
sax/source/tools/converter \
sax/source/tools/fastattribs \
- sax/source/tools/fastserializer \
+ sax/source/tools/fastserializer \
sax/source/tools/fshelper \
))
diff --git a/sax/Module_sax.mk b/sax/Module_sax.mk
index 2ad7bf175338..a867c753cba7 100644
--- a/sax/Module_sax.mk
+++ b/sax/Module_sax.mk
@@ -14,6 +14,7 @@ $(eval $(call gb_Module_add_targets,sax,\
Library_fastsax \
Library_sax \
Package_inc \
+ StaticLibrary_sax_shared \
))
$(eval $(call gb_Module_add_check_targets,sax,\
diff --git a/sax/StaticLibrary_sax_shared.mk b/sax/StaticLibrary_sax_shared.mk
new file mode 100644
index 000000000000..cdbc3c88843f
--- /dev/null
+++ b/sax/StaticLibrary_sax_shared.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/.
+#
+
+$(eval $(call gb_StaticLibrary_StaticLibrary,sax_shared))
+
+$(eval $(call gb_StaticLibrary_set_include,sax_shared,\
+ -I$(SRCDIR)/sax/inc \
+ $$(INCLUDE) \
+))
+
+$(eval $(call gb_StaticLibrary_use_sdk_api,sax_shared))
+
+$(eval $(call gb_StaticLibrary_add_exception_objects,sax_shared,\
+ sax/source/expatwrap/xml2utf \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/sax/source/tools/fastserializer.hxx b/sax/inc/fastserializer.hxx
index 765cafb90dd2..765cafb90dd2 100644
--- a/sax/source/tools/fastserializer.hxx
+++ b/sax/inc/fastserializer.hxx
diff --git a/sax/inc/sax/tools/attributemap.hxx b/sax/inc/sax/tools/attributemap.hxx
deleted file mode 100644
index 7797ef3aef45..000000000000
--- a/sax/inc/sax/tools/attributemap.hxx
+++ /dev/null
@@ -1,62 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * 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 .
- */
-
-#ifndef _SAX_ATTRIBUTEMAP_HXX_
-#define _SAX_ATTRIBUTEMAP_HXX_
-
-#include <map>
-#include "sax/tools/tokenmap.hxx"
-
-namespace sax
-{
- class SaxTokenMap;
-
- typedef std::map< sal_uInt32, rtl::OString > AttributeMapBase;
-
- /** a map for a set of xml attributes, identified with integer tokens.
- Attribute values are stored in utf-8 encoding. */
- class SAX_DLLPUBLIC AttributeMap : public AttributeMapBase
- {
- public:
- AttributeMap( const SaxTokenMap& rTokenMap );
- ~AttributeMap();
-
- /** returns a unicode string, if the token does not exists the string is empty */
- ::rtl::OUString getString( SaxToken nToken ) const;
-
- /** returns true if the attribute with the token nToken is part of this map */
- bool has( SaxToken nToken ) const;
-
- /** converts the attribute with the token nToken to sal_Int32 or returns
- nDefault if this attribute does not exists */
- sal_Int32 getInt32( SaxToken nToken, sal_Int32 nDefault = 0 ) const;
-
- /** converts the attribute with the token nToken to a token or returns
- nDefault if this attribute does not exists */
- sal_uInt32 getToken( SaxToken nToken, SaxToken nDefault ) const;
-
- private:
- const SaxTokenMap& mrTokenMap;
- };
-
-}
-
-#endif // _SAX_ATTRIBUTEMAP_HXX_
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sax/inc/sax/tools/saxobject.hxx b/sax/inc/sax/tools/saxobject.hxx
deleted file mode 100644
index f1fe1182be78..000000000000
--- a/sax/inc/sax/tools/saxobject.hxx
+++ /dev/null
@@ -1,44 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * 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 .
- */
-
-#ifndef _SAX_OBJECT_HXX_
-#define _SAX_OBJECT_HXX_
-
-#include <sal/types.h>
-#include "sax/saxdllapi.h"
-
-namespace sax
-{
-
- /** simple base class to allow refcounting with rtl::Reference or css::uno::Reference */
- class SAX_DLLPUBLIC SaxObject
- {
- public:
- SaxObject();
- virtual ~SaxObject();
- virtual void SAL_CALL acquire() throw ();
- virtual void SAL_CALL release() throw ();
- private:
- sal_uInt32 mnRefCount;
- };
-}
-
-#endif // _SAX_OBJECT_HXX_
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sax/inc/sax/tools/tokenmap.hxx b/sax/inc/sax/tools/tokenmap.hxx
deleted file mode 100644
index 20cbaef41244..000000000000
--- a/sax/inc/sax/tools/tokenmap.hxx
+++ /dev/null
@@ -1,58 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * 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 .
- */
-
-#ifndef _SAX_TOKENMAP_HXX_
-#define _SAX_TOKENMAP_HXX_
-
-#include <rtl/ref.hxx>
-#include <rtl/ustring.hxx>
-#include "sax/tools/saxobject.hxx"
-
-namespace sax
-{
- /** type for a token identifier */
- typedef sal_uInt32 SaxToken;
-
- /** this class maps a set of ascii/utf-8 strings to token identifier */
- class SAX_DLLPUBLIC SaxTokenMap : public SaxObject
- {
- public:
- /** constant do indicate an unknown token */
- const static SaxToken InvalidToken = (SaxToken)-1;
-
- /** returns the token identifier for the given ascii string or SaxTokenMap::InvalidToken */
- virtual SaxToken GetToken( const sal_Char* pChar, sal_uInt32 nLength = 0 ) const = 0;
-
- /** returns the token identifier for the given unicode string or SaxTokenMap::InvalidToken */
- virtual SaxToken GetToken( const ::rtl::OUString& rToken ) const = 0;
-
- /** returns the unicode string for the given token identifier */
- virtual const ::rtl::OUString& GetToken( SaxToken nToken ) const = 0;
-
- /** returns if the given unicode string equals the given token identifier */
- bool IsToken( const ::rtl::OUString& rToken, SaxToken nToken ) const { return GetToken( rToken ) == nToken; }
- };
-
- /** reference type to a SaxTokenMap */
- typedef rtl::Reference< SaxTokenMap > SaxTokenMapRef;
-}
-
-#endif // _SAX_TOKENMAP_HXX_
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sax/inc/xml2utf.hxx b/sax/inc/xml2utf.hxx
index d1d2e89210bc..9a6ee23e6ca3 100644
--- a/sax/inc/xml2utf.hxx
+++ b/sax/inc/xml2utf.hxx
@@ -17,17 +17,11 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <sax/saxdllapi.h>
+#include <sal/types.h>
-
-/*
-*
-* Text2UnicodeConverter
-*
-**/
namespace sax_expatwrap {
-class SAX_DLLPUBLIC Text2UnicodeConverter
+class Text2UnicodeConverter
{
public:
@@ -53,7 +47,7 @@ private:
* Unicode2TextConverter
*
**-----------------------------------------*/
-class SAX_DLLPUBLIC Unicode2TextConverter
+class Unicode2TextConverter
{
public:
Unicode2TextConverter( rtl_TextEncoding encoding );
@@ -84,7 +78,7 @@ private:
* XMLFile2UTFConverter
*
**-----------------------------------------*/
-class SAX_DLLPUBLIC XMLFile2UTFConverter
+class XMLFile2UTFConverter
{
public:
XMLFile2UTFConverter( ):
diff --git a/sax/source/expatwrap/attrlistimpl.hxx b/sax/source/expatwrap/attrlistimpl.hxx
index 17dc31c78852..52187f9826cd 100644
--- a/sax/source/expatwrap/attrlistimpl.hxx
+++ b/sax/source/expatwrap/attrlistimpl.hxx
@@ -32,7 +32,7 @@ namespace sax_expatwrap
struct AttributeList_impl;
//FIXME
-class /*SAX_DLLPUBLIC*/ AttributeList :
+class AttributeList :
public ::cppu::WeakImplHelper2<
::com::sun::star::xml::sax::XAttributeList,
::com::sun::star::util::XCloneable >
diff --git a/sax/source/fastparser/facreg.cxx b/sax/source/fastparser/facreg.cxx
index 28129108dccd..c3590b6ef3fd 100644
--- a/sax/source/fastparser/facreg.cxx
+++ b/sax/source/fastparser/facreg.cxx
@@ -21,7 +21,7 @@
#include <cppuhelper/weak.hxx>
#include <cppuhelper/implbase2.hxx>
-#include "../tools/fastserializer.hxx"
+#include <fastserializer.hxx>
#include "fastparser.hxx"
using namespace sax_fastparser;
diff --git a/sax/source/tools/fastserializer.cxx b/sax/source/tools/fastserializer.cxx
index bd84747cb527..ffdbaec63ff5 100644
--- a/sax/source/tools/fastserializer.cxx
+++ b/sax/source/tools/fastserializer.cxx
@@ -17,7 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include "fastserializer.hxx"
+#include <fastserializer.hxx>
#include <rtl/ustrbuf.hxx>
#include <comphelper/sequenceasvector.hxx>
diff --git a/sax/source/tools/fshelper.cxx b/sax/source/tools/fshelper.cxx
index ffb3506c175d..8888fc791a89 100644
--- a/sax/source/tools/fshelper.cxx
+++ b/sax/source/tools/fshelper.cxx
@@ -18,7 +18,7 @@
*/
#include <sax/fshelper.hxx>
-#include "fastserializer.hxx"
+#include <fastserializer.hxx>
#include <com/sun/star/xml/sax/XFastTokenHandler.hpp>
#include <comphelper/processfactory.hxx>
#include <rtl/ustrbuf.hxx>