On 03/22/2012 01:11 PM, Noel Grandin wrote:
Diff attached.
[...]
@@ -258,12 +259,7 @@ void SAL_CALL ResultSetImplHelper::connectToCache(
try
{
xStubFactory
- = uno::Reference<
-
com::sun::star::ucb::XCachedDynamicResultSetStubFactory >(
- m_xSMgr->createInstance(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
-
"com.sun.star.ucb.CachedDynamicResultSetStubFactory" )) ),
- uno::UNO_QUERY );
+ =
com::sun::star::ucb::CachedDynamicResultSetStubFactory.create();
Note that UNO service constructors, in the C++ and Java language
bindings, take the XComponentContext as an additional first argument.
In your example, ResultSetImplHelper does not have a component context
around, only an XMultiServiceFactory m_xSMgr (because it is old code,
written before the XComponentContext/XMultiComponentFactory concept
replaced the now-obsolete XMultiServiceFactory concept).
As a quick fix, you can pass comphelper::getProcessComponentContext()
(#include "comphelper/processfactory.hxx") into create(), but you
unfortunately cannot even commit that, as it violates module
dependencies (comphelper depends on ucbhelper, so ucbhelper cannot
depend on comphelper). The right fix is to change the
ResultSetImplHelper constructor and adapt all its uses accordingly.
Did I speak about an odyssey? ;)
Stephan
_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.