summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-03-11 17:54:52 +0200
committerNoel Grandin <noel@peralex.com>2013-03-25 10:35:04 +0200
commit8172eaf8dcd2da6827f0a0445e98b947d0eac9be (patch)
treed2080c5bdf42fbbeb5d5cd3946dc0f0e574478b4
parent5b982b69363f0f067fe4a0f679528ce1c5a2eafc (diff)
fdo#46808, use service constructor
Change-Id: I349557ae5897ad668abab30b34b186e746b94c75
-rw-r--r--dbaccess/source/core/misc/sdbcoretools.cxx22
1 files changed, 9 insertions, 13 deletions
diff --git a/dbaccess/source/core/misc/sdbcoretools.cxx b/dbaccess/source/core/misc/sdbcoretools.cxx
index edee7a59faa3..490f1bb5957d 100644
--- a/dbaccess/source/core/misc/sdbcoretools.cxx
+++ b/dbaccess/source/core/misc/sdbcoretools.cxx
@@ -26,7 +26,7 @@
#include <com/sun/star/container/XChild.hpp>
#include <com/sun/star/util/XModifiable.hpp>
#include <com/sun/star/sdb/XDocumentDataSource.hpp>
-#include <com/sun/star/task/XInteractionRequestStringResolver.hpp>
+#include <com/sun/star/task/InteractionRequestStringResolver.hpp>
#include <com/sun/star/embed/XTransactedObject.hpp>
#include <com/sun/star/embed/ElementModes.hpp>
@@ -86,18 +86,14 @@ namespace dbaccess
try
{
- Reference< XInteractionRequestStringResolver > xStringResolver(
- _rContext->getServiceManager()->createInstanceWithContext("com.sun.star.task.InteractionRequestStringResolver", _rContext),
- UNO_QUERY );
- if ( xStringResolver.is() )
- {
- ::rtl::Reference< ::comphelper::OInteractionRequest > pRequest( new ::comphelper::OInteractionRequest( _rError ) );
- ::rtl::Reference< ::comphelper::OInteractionApprove > pApprove( new ::comphelper::OInteractionApprove );
- pRequest->addContinuation( pApprove.get() );
- Optional< ::rtl::OUString > aMessage = xStringResolver->getStringFromInformationalRequest( pRequest.get() );
- if ( aMessage.IsPresent )
- sDisplayMessage = aMessage.Value;
- }
+ Reference< XInteractionRequestStringResolver > xStringResolver = InteractionRequestStringResolver::create(_rContext);
+
+ ::rtl::Reference< ::comphelper::OInteractionRequest > pRequest( new ::comphelper::OInteractionRequest( _rError ) );
+ ::rtl::Reference< ::comphelper::OInteractionApprove > pApprove( new ::comphelper::OInteractionApprove );
+ pRequest->addContinuation( pApprove.get() );
+ Optional< ::rtl::OUString > aMessage = xStringResolver->getStringFromInformationalRequest( pRequest.get() );
+ if ( aMessage.IsPresent )
+ sDisplayMessage = aMessage.Value;
}
catch( const Exception& )
{