summaryrefslogtreecommitdiff
path: root/sax
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2011-03-18 15:55:08 +0100
committerJan Holesovsky <kendy@suse.cz>2011-03-18 15:55:08 +0100
commit4fdd55226d2972e3a256426db3122ac23b0615c6 (patch)
tree23f5b3a68382d6d3b8db0cb5e2537ed74a228d7c /sax
parentc3d5444d84e18fa82235bb9d419861ac5e54f544 (diff)
parente1028d9225bc47922c387aa462887c7643bc6c40 (diff)
Merge remote-tracking branch 'origin/integration/dev300_m101'
Conflicts: comphelper/source/misc/servicedecl.cxx i18npool/source/breakiterator/breakiteratorImpl.cxx l10ntools/scripts/localize.pl svl/source/items/itemset.cxx svl/source/memtools/svarray.cxx svl/source/numbers/zformat.cxx svtools/source/brwbox/brwbox1.cxx tools/source/stream/strmwnt.cxx vcl/inc/vcl/graphite_adaptors.hxx vcl/inc/vcl/graphite_layout.hxx vcl/inc/vcl/graphite_serverfont.hxx vcl/source/control/imgctrl.cxx vcl/source/gdi/outdev.cxx vcl/source/gdi/outdev3.cxx vcl/source/glyphs/gcach_ftyp.cxx vcl/source/glyphs/graphite_adaptors.cxx vcl/source/glyphs/graphite_layout.cxx vcl/source/window/winproc.cxx vcl/unx/source/fontmanager/fontconfig.cxx
Diffstat (limited to 'sax')
-rw-r--r--sax/prj/build.lst2
-rw-r--r--sax/prj/d.lst3
-rw-r--r--sax/qa/cppunit/makefile.mk7
-rw-r--r--sax/source/expatwrap/makefile.mk11
-rw-r--r--sax/source/expatwrap/sax.component37
-rw-r--r--sax/source/expatwrap/sax_expat.cxx31
-rw-r--r--sax/source/fastparser/facreg.cxx28
-rw-r--r--sax/source/fastparser/fastsax.component37
-rw-r--r--sax/source/fastparser/makefile.mk7
-rw-r--r--sax/source/tools/converter.cxx4
-rw-r--r--sax/source/tools/fshelper.cxx11
11 files changed, 108 insertions, 70 deletions
diff --git a/sax/prj/build.lst b/sax/prj/build.lst
index 653d77ce9e25..849700087ae7 100644
--- a/sax/prj/build.lst
+++ b/sax/prj/build.lst
@@ -1,4 +1,4 @@
-ax sax : offapi cppuhelper EXPAT:expat comphelper NULL
+ax sax : offapi cppuhelper EXPAT:expat comphelper LIBXSLT:libxslt NULL
ax sax usr1 - all ax_mkout NULL
ax sax\source\expatwrap nmake - all ax_expatwrap NULL
ax sax\source\tools nmake - all ax_tools NULL
diff --git a/sax/prj/d.lst b/sax/prj/d.lst
index c9e466d440e1..86617b9f3ed2 100644
--- a/sax/prj/d.lst
+++ b/sax/prj/d.lst
@@ -2,6 +2,9 @@
..\%__SRC%\lib\*.so %_DEST%\lib%_EXT%\*.so
..\%__SRC%\lib\*.dylib %_DEST%\lib%_EXT%\*.dylib
..\%__SRC%\lib\*.lib %_DEST%\lib%_EXT%\*.lib
+..\%__SRC%\misc\fastsax.component %_DEST%\xml%_EXT%\fastsax.component
+..\%__SRC%\misc\sax.component %_DEST%\xml%_EXT%\sax.component
+..\%__SRC%\misc\sax.inbuild.component %_DEST%\xml%_EXT%\sax.inbuild.component
mkdir: %_DEST%\inc%_EXT%\sax
mkdir: %_DEST%\inc%_EXT%\sax\tools
diff --git a/sax/qa/cppunit/makefile.mk b/sax/qa/cppunit/makefile.mk
index e06eca25a737..b28f0cbac2ab 100644
--- a/sax/qa/cppunit/makefile.mk
+++ b/sax/qa/cppunit/makefile.mk
@@ -35,6 +35,13 @@ ENABLE_EXCEPTIONS=TRUE
.INCLUDE : settings.mk
+#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
+
CFLAGSCXX += $(CPPUNIT_CFLAGS)
DLLPRE = # no leading "lib" on .so files
diff --git a/sax/source/expatwrap/makefile.mk b/sax/source/expatwrap/makefile.mk
index bcb73b0443ac..6e1348c0d403 100644
--- a/sax/source/expatwrap/makefile.mk
+++ b/sax/source/expatwrap/makefile.mk
@@ -72,5 +72,16 @@ DEF1NAME= $(SHL1TARGET)
.INCLUDE : target.mk
+ALLTAR : $(MISC)/sax.component $(MISC)/sax.inbuild.component
+$(MISC)/sax.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ sax.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt sax.component
+$(MISC)/sax.inbuild.component .ERRREMOVE : \
+ $(SOLARENV)/bin/createcomponent.xslt sax.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_INBUILD_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt sax.component
diff --git a/sax/source/expatwrap/sax.component b/sax/source/expatwrap/sax.component
new file mode 100644
index 000000000000..5e6699d9dd33
--- /dev/null
+++ b/sax/source/expatwrap/sax.component
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* 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.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.comp.extensions.xml.sax.ParserExpat">
+ <service name="com.sun.star.xml.sax.Parser"/>
+ </implementation>
+ <implementation name="com.sun.star.extensions.xml.sax.Writer">
+ <service name="com.sun.star.xml.sax.Writer"/>
+ </implementation>
+</component>
diff --git a/sax/source/expatwrap/sax_expat.cxx b/sax/source/expatwrap/sax_expat.cxx
index f1e5470da9bd..114d29bea648 100644
--- a/sax/source/expatwrap/sax_expat.cxx
+++ b/sax/source/expatwrap/sax_expat.cxx
@@ -1035,37 +1035,6 @@ void SAL_CALL component_getImplementationEnvironment(
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
-
-sal_Bool SAL_CALL component_writeInfo(
- void * /*pServiceManager*/, void * pRegistryKey )
-{
- if (pRegistryKey)
- {
- try
- {
- Reference< XRegistryKey > xKey(
- reinterpret_cast< XRegistryKey * >( pRegistryKey ) );
-
- Reference< XRegistryKey > xNewKey = xKey->createKey(
- OUString(RTL_CONSTASCII_USTRINGPARAM( "/" IMPLEMENTATION_NAME "/UNO/SERVICES" )) );
- xNewKey->createKey( OUString(RTL_CONSTASCII_USTRINGPARAM( SERVICE_NAME )) );
-
- xNewKey = xKey->createKey( OUString(RTL_CONSTASCII_USTRINGPARAM("/")) +
- SaxWriter_getImplementationName()+
- OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")) );
- xNewKey->createKey( SaxWriter_getServiceName() );
-
- return sal_True;
- }
- catch (InvalidRegistryException &)
- {
- OSL_ENSURE( sal_False, "### InvalidRegistryException!" );
- }
- }
- return sal_False;
-}
-
-
void * SAL_CALL component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ )
{
diff --git a/sax/source/fastparser/facreg.cxx b/sax/source/fastparser/facreg.cxx
index bd66ab30c79e..af05616854c1 100644
--- a/sax/source/fastparser/facreg.cxx
+++ b/sax/source/fastparser/facreg.cxx
@@ -41,34 +41,6 @@ void SAL_CALL component_getImplementationEnvironment(
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
-
-sal_Bool SAL_CALL component_writeInfo(
- void * /*pServiceManager*/, void * pRegistryKey )
-{
- if (pRegistryKey)
- {
- try
- {
- Reference< XRegistryKey > xKey( reinterpret_cast< XRegistryKey * >( pRegistryKey ) );
-
- Reference< XRegistryKey > xNewKey( xKey->createKey(
- OUString(RTL_CONSTASCII_USTRINGPARAM( "/" PARSER_IMPLEMENTATION_NAME "/UNO/SERVICES" )) ) );
- xNewKey->createKey( OUString(RTL_CONSTASCII_USTRINGPARAM( PARSER_SERVICE_NAME )) );
-
- Reference< XRegistryKey > xNewKey1( xKey->createKey(
- OUString(RTL_CONSTASCII_USTRINGPARAM( "/" SERIALIZER_IMPLEMENTATION_NAME "/UNO/SERVICES" )) ) );
- xNewKey1->createKey( OUString(RTL_CONSTASCII_USTRINGPARAM( SERIALIZER_SERVICE_NAME )) );
-
- return sal_True;
- }
- catch (InvalidRegistryException &)
- {
- OSL_ENSURE( sal_False, "### InvalidRegistryException!" );
- }
- }
- return sal_False;
-}
-
void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ )
{
void * pRet = 0;
diff --git a/sax/source/fastparser/fastsax.component b/sax/source/fastparser/fastsax.component
new file mode 100644
index 000000000000..a184a76d2d83
--- /dev/null
+++ b/sax/source/fastparser/fastsax.component
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* 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.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.comp.extensions.xml.sax.FastParser">
+ <service name="com.sun.star.xml.sax.FastParser"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.extensions.xml.sax.FastSerializer">
+ <service name="com.sun.star.xml.sax.FastSerializer"/>
+ </implementation>
+</component>
diff --git a/sax/source/fastparser/makefile.mk b/sax/source/fastparser/makefile.mk
index 7f70b7aee7bf..d8f9378c19b9 100644
--- a/sax/source/fastparser/makefile.mk
+++ b/sax/source/fastparser/makefile.mk
@@ -70,5 +70,10 @@ DEF1NAME= $(SHL1TARGET)
.INCLUDE : target.mk
+ALLTAR : $(MISC)/fastsax.component
-
+$(MISC)/fastsax.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ fastsax.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt fastsax.component
diff --git a/sax/source/tools/converter.cxx b/sax/source/tools/converter.cxx
index fd4c1de5a509..efa9f1687d7f 100644
--- a/sax/source/tools/converter.cxx
+++ b/sax/source/tools/converter.cxx
@@ -67,7 +67,7 @@ bool Converter::convertMeasure( sal_Int32& rValue,
bool bNeg = false;
double nVal = 0;
- sal_Int32 nPos = 0L;
+ sal_Int32 nPos = 0;
sal_Int32 nLen = rString.getLength();
// skip white space
@@ -393,7 +393,7 @@ bool Converter::convertNumber( sal_Int32& rValue,
bool bNeg = false;
rValue = 0;
- sal_Int32 nPos = 0L;
+ sal_Int32 nPos = 0;
sal_Int32 nLen = rString.getLength();
// skip white space
diff --git a/sax/source/tools/fshelper.cxx b/sax/source/tools/fshelper.cxx
index 88b15a00be71..239096ae8a05 100644
--- a/sax/source/tools/fshelper.cxx
+++ b/sax/source/tools/fshelper.cxx
@@ -13,8 +13,9 @@ namespace sax_fastparser {
FastSerializerHelper::FastSerializerHelper(const Reference< io::XOutputStream >& xOutputStream, bool bWriteHeader ) :
mpSerializer(new FastSaxSerializer())
{
- Reference< lang::XMultiServiceFactory > xFactory = comphelper::getProcessServiceFactory();
- mxTokenHandler = Reference<xml::sax::XFastTokenHandler> ( xFactory->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.xml.sax.FastTokenHandler") ) ), UNO_QUERY_THROW );
+ Reference< XComponentContext > xContext( ::comphelper::getProcessComponentContext(), UNO_SET_THROW );
+ Reference< lang::XMultiComponentFactory > xFactory( xContext->getServiceManager(), UNO_SET_THROW );
+ mxTokenHandler.set( xFactory->createInstanceWithContext( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.xml.sax.FastTokenHandler") ), xContext ), UNO_QUERY_THROW );
mpSerializer->setFastTokenHandler( mxTokenHandler );
mpSerializer->setOutputStream( xOutputStream );
@@ -25,11 +26,7 @@ FastSerializerHelper::FastSerializerHelper(const Reference< io::XOutputStream >&
FastSerializerHelper::~FastSerializerHelper()
{
mpSerializer->endDocument();
-
- if (mpSerializer) {
- delete mpSerializer;
- mpSerializer = NULL;
- }
+ delete mpSerializer;
}
void FastSerializerHelper::startElement(const char* elementName, ...)