summaryrefslogtreecommitdiff
path: root/basic/source/uno/dlgcont.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'basic/source/uno/dlgcont.cxx')
-rw-r--r--basic/source/uno/dlgcont.cxx14
1 files changed, 3 insertions, 11 deletions
diff --git a/basic/source/uno/dlgcont.cxx b/basic/source/uno/dlgcont.cxx
index a9b28cebb1a1..6ba2ff153f31 100644
--- a/basic/source/uno/dlgcont.cxx
+++ b/basic/source/uno/dlgcont.cxx
@@ -17,6 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <com/sun/star/awt/UnoControlDialogModel.hpp>
#include <com/sun/star/container/XNameContainer.hpp>
#include <com/sun/star/xml/sax/Parser.hpp>
#include <com/sun/star/xml/sax/InputSource.hpp>
@@ -236,9 +237,7 @@ void SfxDialogLibraryContainer::storeLibrariesToStorage( const uno::Reference< e
if ( xISP.is() )
{
Reference< io::XInputStream > xInput( xISP->createInputStream() );
- Reference< XNameContainer > xDialogModel(
- mxContext->getServiceManager()->createInstanceWithContext("com.sun.star.awt.UnoControlDialogModel", mxContext),
- UNO_QUERY );
+ Reference< awt::XUnoControlDialogModel > xDialogModel = awt::UnoControlDialogModel::create( mxContext );
::xmlscript::importDialogModel( xInput, xDialogModel, mxContext, mxOwnerDocument );
std::vector< OUString > vEmbeddedImageURLs;
GraphicObject::InspectForGraphicObjectImageURL( Reference< XInterface >( xDialogModel, UNO_QUERY ), vEmbeddedImageURLs );
@@ -280,14 +279,7 @@ Any SAL_CALL SfxDialogLibraryContainer::importLibraryElement
Reference< XParser > xParser = xml::sax::Parser::create( mxContext );
- Reference< XNameContainer > xDialogModel(
- mxContext->getServiceManager()->createInstanceWithContext("com.sun.star.awt.UnoControlDialogModel", mxContext),
- UNO_QUERY );
- if( !xDialogModel.is() )
- {
- OSL_FAIL( "### couldn't create com.sun.star.awt.UnoControlDialogModel component\n" );
- return aRetAny;
- }
+ Reference< awt::XUnoControlDialogModel > xDialogModel = awt::UnoControlDialogModel::create( mxContext );
// Read from storage?
sal_Bool bStorage = xElementStream.is();