summaryrefslogtreecommitdiff
path: root/sax/source/tools
diff options
context:
space:
mode:
Diffstat (limited to 'sax/source/tools')
-rw-r--r--sax/source/tools/converter.cxx4
-rw-r--r--sax/source/tools/fshelper.cxx11
2 files changed, 6 insertions, 9 deletions
diff --git a/sax/source/tools/converter.cxx b/sax/source/tools/converter.cxx
index fd93521261de..5dceeb38ab0d 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, ...)