summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--comphelper/inc/comphelper/sequenceasvector.hxx11
-rw-r--r--sax/source/tools/fshelper.cxx11
-rw-r--r--toolkit/source/controls/grid/defaultgriddatamodel.cxx4
-rw-r--r--[-rwxr-xr-x]vcl/source/app/settings.cxx0
-rw-r--r--[-rwxr-xr-x]vcl/source/gdi/makefile.mk0
5 files changed, 17 insertions, 9 deletions
diff --git a/comphelper/inc/comphelper/sequenceasvector.hxx b/comphelper/inc/comphelper/sequenceasvector.hxx
index 263b68b24c7c..48dfe50b1645 100644
--- a/comphelper/inc/comphelper/sequenceasvector.hxx
+++ b/comphelper/inc/comphelper/sequenceasvector.hxx
@@ -86,6 +86,17 @@ class SequenceAsVector : public ::std::vector< TElementType >
{}
//---------------------------------------
+ /** @short creates a new vector with the given length.
+
+ @param nLength
+ the number of elements for the new vector.
+ */
+ explicit SequenceAsVector(sal_Int32 nLength) :
+ ::std::vector< TElementType >( static_cast< size_t >( nLength ) )
+ {
+ }
+
+ //---------------------------------------
/** @short creates a new deque from the given uno sequence.
@param lSource
diff --git a/sax/source/tools/fshelper.cxx b/sax/source/tools/fshelper.cxx
index 743f499fb4f0..6956e5b32bf3 100644
--- a/sax/source/tools/fshelper.cxx
+++ b/sax/source/tools/fshelper.cxx
@@ -12,8 +12,9 @@ namespace sax_fastparser {
FastSerializerHelper::FastSerializerHelper(const Reference< io::XOutputStream >& xOutputStream ) :
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 );
@@ -23,11 +24,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, ...)
diff --git a/toolkit/source/controls/grid/defaultgriddatamodel.cxx b/toolkit/source/controls/grid/defaultgriddatamodel.cxx
index 7ffafdf0ddb6..adc40b0426d7 100644
--- a/toolkit/source/controls/grid/defaultgriddatamodel.cxx
+++ b/toolkit/source/controls/grid/defaultgriddatamodel.cxx
@@ -198,7 +198,7 @@ void SAL_CALL DefaultGridDataModel::removeRow(::sal_Int32 index) throw (::com::s
::rtl::OUString headerName( (::rtl::OUString) rowHeaders[index] );
rowHeaders.erase(rowHeaders.begin() + index);
- Sequence< Any >& rowData ( (Sequence< Any >&)data[index] );
+ Sequence< Any > rowData ( (Sequence< Any >&)data[index] );
data.erase(data.begin() + index);
broadcast_remove( index, headerName, rowData);
}
@@ -241,7 +241,7 @@ void SAL_CALL DefaultGridDataModel::removeAll() throw (RuntimeException)
{
rowHeaders.clear();
data.clear();
- broadcast_remove( -1, ::rtl::OUString(), 0);
+ broadcast_remove( -1, ::rtl::OUString(), Sequence< Any >());
}
//---------------------------------------------------------------------
void SAL_CALL DefaultGridDataModel::setRowHeaderWidth(sal_Int32 _value) throw (::com::sun::star::uno::RuntimeException)
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index b91afbbae9fe..b91afbbae9fe 100755..100644
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
diff --git a/vcl/source/gdi/makefile.mk b/vcl/source/gdi/makefile.mk
index 77df20976c73..77df20976c73 100755..100644
--- a/vcl/source/gdi/makefile.mk
+++ b/vcl/source/gdi/makefile.mk