LibreOffice Module scripting (master) 1
dlgprov.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20
21#include "dlgprov.hxx"
22#include "dlgevtatt.hxx"
23#include <com/sun/star/awt/UnoControlDialog.hpp>
24#include <com/sun/star/awt/Toolkit.hpp>
25#include <com/sun/star/awt/XControlContainer.hpp>
26#include <com/sun/star/awt/XWindowPeer.hpp>
27#include <com/sun/star/beans/theIntrospection.hpp>
28#include <com/sun/star/beans/XPropertySet.hpp>
29#include <com/sun/star/document/XEmbeddedScripts.hpp>
30#include <com/sun/star/lang/XMultiComponentFactory.hpp>
31#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
32#include <com/sun/star/io/XInputStreamProvider.hpp>
33#include <com/sun/star/resource/XStringResourceSupplier.hpp>
34#include <com/sun/star/resource/XStringResourceManager.hpp>
35#include <com/sun/star/script/XLibraryContainer.hpp>
36#include <com/sun/star/ucb/SimpleFileAccess.hpp>
37#include <com/sun/star/uri/XUriReference.hpp>
38#include <com/sun/star/uri/UriReferenceFactory.hpp>
39#include <com/sun/star/uri/XVndSunStarScriptUrl.hpp>
40#include <com/sun/star/uri/XVndSunStarExpandUrl.hpp>
41#include <com/sun/star/util/theMacroExpander.hpp>
42
45#include <sfx2/app.hxx>
47#include <tools/urlobj.hxx>
49#include <util/MiscUtils.hxx>
50#include <vcl/settings.hxx>
51#include <vcl/svapp.hxx>
53
54using namespace ::com::sun::star;
55using namespace awt;
56using namespace lang;
57using namespace uno;
58using namespace script;
59using namespace beans;
60using namespace document;
61using namespace ::sf_misc;
62
63namespace dlgprov
64{
65
67 {
68 INetURLObject aInetObj( i_sURL );
69 OUString aDlgName = aInetObj.GetBase();
70 aInetObj.removeSegment();
71 OUString aDlgLocation = aInetObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
72 css::lang::Locale aLocale = Application::GetSettings().GetUILanguageTag().getLocale();
73
75
76 Sequence<Any> aArgs{ Any(aDlgLocation),
77 Any(true), // bReadOnly
78 Any(aLocale),
79 Any(aDlgName),
80 Any(OUString()),
81 Any(xDummyHandler) };
82
83 Reference< XMultiComponentFactory > xSMgr_( i_xContext->getServiceManager(), UNO_SET_THROW );
84 // TODO: Ctor
85 Reference< resource::XStringResourceManager > xStringResourceManager( xSMgr_->createInstanceWithContext
86 ( "com.sun.star.resource.StringResourceWithLocation",
87 i_xContext ), UNO_QUERY );
88 if( xStringResourceManager.is() )
89 {
90 Reference< XInitialization > xInit( xStringResourceManager, UNO_QUERY );
91 if( xInit.is() )
92 xInit->initialize( aArgs );
93 }
94 return xStringResourceManager;
95 }
97 {
98 Reference< XMultiComponentFactory > xSMgr_( i_xContext->getServiceManager(), UNO_SET_THROW );
99 Reference< container::XNameContainer > xControlModel( xSMgr_->createInstanceWithContext("com.sun.star.awt.UnoControlDialogModel", i_xContext ), UNO_QUERY_THROW );
100 return xControlModel;
101 }
103 const Reference< io::XInputStream >& xInput,
104 const Reference< frame::XModel >& xModel,
105 const Reference< resource::XStringResourceManager >& xStringResourceManager,
106 const Any &aDialogSourceURL)
107 {
109
110 Reference< beans::XPropertySet > xDlgPropSet( xDialogModel, UNO_QUERY );
111 xDlgPropSet->setPropertyValue( "DialogSourceURL", aDialogSourceURL );
112
113 // #TODO we really need to detect the source of the Dialog, is it
114 // the dialog. E.g. if the dialog was created from basic ( then we just
115 // can't tell where its from )
116 // If we are happy to always substitute the form model for the awt
117 // one then maybe the presence of a document model is enough to trigger
118 // swapping out the models ( or perhaps we only want to do this
119 // for vba mode ) there are a number of feasible and valid possibilities
120 ::xmlscript::importDialogModel( xInput, xDialogModel, i_xContext, xModel );
121
122 // Set resource property
123 if( xStringResourceManager.is() )
124 {
125 Reference< beans::XPropertySet > xDlgPSet( xDialogModel, UNO_QUERY );
126 Any aStringResourceManagerAny;
127 aStringResourceManagerAny <<= xStringResourceManager;
128 xDlgPSet->setPropertyValue( "ResourceResolver", aStringResourceManagerAny );
129 }
130
131 return xDialogModel;
132 }
133
134 // mutex
135
136
137 ::osl::Mutex& getMutex()
138 {
139 static ::osl::Mutex s_aMutex;
140
141 return s_aMutex;
142 }
143
144
145 // DialogProviderImpl
146
147
149 :m_xContext( rxContext )
150 {
151 }
152
153
155 {
156 }
157
158
160 ( const Reference< container::XNameContainer >& xDialogLib )
161 {
163 if( xDialogLib.is() )
164 {
165 Reference< resource::XStringResourceSupplier > xStringResourceSupplier( xDialogLib, UNO_QUERY );
166 if( xStringResourceSupplier.is() )
167 {
169 xStringResourceResolver = xStringResourceSupplier->getStringResource();
170
171 xStringResourceManager =
172 Reference< resource::XStringResourceManager >( xStringResourceResolver, UNO_QUERY );
173 }
174 }
175 return xStringResourceManager;
176 }
177
179 const Reference< io::XInputStream >& xInput,
180 const Reference< resource::XStringResourceManager >& xStringResourceManager,
181 const Any &aDialogSourceURL)
182 {
183 return lcl_createDialogModel(m_xContext,xInput,m_xModel,xStringResourceManager,aDialogSourceURL);
184 }
185
187 {
188 if (!m_BasicInfo)
189 // shouldn't get here
190 throw RuntimeException("No information to create dialog" );
192
193 Any aDialogSourceURL((OUString()));
194 Reference< XControlModel > xCtrlModel( createDialogModel( m_BasicInfo->mxInput, xStringResourceManager, aDialogSourceURL ), UNO_QUERY_THROW );
195 return xCtrlModel;
196 }
197
199 {
200
201 OUString aURL( sURL );
202
203 // parse URL
204 // TODO: use URL parsing class
205 // TODO: decoding of location
206
207 Reference< uri::XUriReferenceFactory > xFac ( uri::UriReferenceFactory::create( m_xContext ) );
208
209 // i75778: Support non-script URLs
212
213 // Accept file URL to single dialog
214 bool bSingleDialog = false;
215
216 Reference< util::XMacroExpander > xMacroExpander =
217 util::theMacroExpander::get(m_xContext);
218
220 for (;;)
221 {
222 uriRef = xFac->parse( aURL );
223 if ( !uriRef.is() )
224 {
225 OUString errorMsg = "DialogProviderImpl::getDialogModel: failed to parse URI: " + aURL;
226 throw IllegalArgumentException( errorMsg, Reference< XInterface >(), 1 );
227 }
228 Reference < uri::XVndSunStarExpandUrl > sxUri( uriRef, UNO_QUERY );
229 if( !sxUri.is() )
230 break;
231
232 aURL = sxUri->expand( xMacroExpander );
233 }
234
235 Reference < uri::XVndSunStarScriptUrl > sfUri( uriRef, UNO_QUERY );
236 if( !sfUri.is() )
237 {
238 bSingleDialog = true;
239
240 // Try any other URL with SimpleFileAccess
241 Reference< ucb::XSimpleFileAccess3 > xSFI = ucb::SimpleFileAccess::create(m_xContext);
242
243 try
244 {
245 xInput = xSFI->openFileRead( aURL );
246 }
247 catch( Exception& )
248 {}
249 }
250 else
251 {
252 OUString sDescription = sfUri->getName();
253
254 sal_Int32 nIndex = 0;
255
256 OUString sLibName = sDescription.getToken( 0, '.', nIndex );
257 OUString sDlgName;
258 if ( nIndex != -1 )
259 sDlgName = sDescription.getToken( 0, '.', nIndex );
260
261 OUString sLocation = sfUri->getParameter( "location" );
262
263
264 // get dialog library container
265 // TODO: dialogs in packages
266 Reference< XLibraryContainer > xLibContainer;
267
268 if ( sLocation == "application" )
269 {
270 xLibContainer = SfxGetpApp()->GetDialogContainer();
271 }
272 else if ( sLocation == "document" )
273 {
274 Reference< XEmbeddedScripts > xDocumentScripts( m_xModel, UNO_QUERY );
275 if ( xDocumentScripts.is() )
276 {
277 xLibContainer = xDocumentScripts->getDialogLibraries();
278 OSL_ENSURE( xLibContainer.is(),
279 "DialogProviderImpl::createDialogModel: invalid dialog container!" );
280 }
281 }
282 else
283 {
284 const Sequence< OUString > aOpenDocsTdocURLs( MiscUtils::allOpenTDocUrls( m_xContext ) );
285 for ( auto const & tdocURL : aOpenDocsTdocURLs )
286 {
287 Reference< frame::XModel > xModel( MiscUtils::tDocUrlToModel( tdocURL ) );
288 OSL_ENSURE( xModel.is(), "DialogProviderImpl::createDialogModel: invalid document model!" );
289 if ( !xModel.is() )
290 continue;
291
292 OUString sDocURL = xModel->getURL();
293 if ( sDocURL.isEmpty() )
294 {
295 sDocURL = ::comphelper::NamedValueCollection::getOrDefault( xModel->getArgs(), u"Title", sDocURL );
296 }
297
298 if ( sLocation != sDocURL )
299 continue;
300
301 Reference< XEmbeddedScripts > xDocumentScripts( m_xModel, UNO_QUERY );
302 if ( !xDocumentScripts.is() )
303 continue;
304
305 xLibContainer = xDocumentScripts->getDialogLibraries();
306 OSL_ENSURE( xLibContainer.is(),
307 "DialogProviderImpl::createDialogModel: invalid dialog container!" );
308 }
309 }
310
311 // get input stream provider
313 if ( !xLibContainer.is() )
314 {
315 throw IllegalArgumentException(
316 "DialogProviderImpl::getDialog: library container not found!",
318 }
319
320 // load dialog library
321 if ( !xLibContainer->isLibraryLoaded( sLibName ) )
322 xLibContainer->loadLibrary( sLibName );
323
324 // get dialog library
325 if ( xLibContainer->hasByName( sLibName ) )
326 {
327 Any aElement = xLibContainer->getByName( sLibName );
328 aElement >>= xDialogLib;
329 }
330
331 if ( !xDialogLib.is() )
332 {
333 throw IllegalArgumentException(
334 "DialogProviderImpl::getDialogModel: library not found!",
336 }
337
338 // get input stream provider
339 if ( xDialogLib->hasByName( sDlgName ) )
340 {
341 Any aElement = xDialogLib->getByName( sDlgName );
342 aElement >>= xISP;
343 }
344
345 if ( !xISP.is() )
346 {
347 throw IllegalArgumentException(
348 "DialogProviderImpl::getDialogModel: dialog not found!",
350 }
351
352
353
354 if ( xISP.is() )
355 xInput = xISP->createInputStream();
356 msDialogLibName = sLibName;
357 }
358
359 // import dialog model
361 if ( xInput.is() && m_xContext.is() )
362 {
364 if( bSingleDialog )
365 {
366 xStringResourceManager = lcl_getStringResourceManager(m_xContext,aURL);
367 }
368 else if( xDialogLib.is() )
369 {
370 xStringResourceManager = getStringResourceFromDialogLibrary( xDialogLib );
371 }
372
373 Any aDialogSourceURLAny;
374 aDialogSourceURLAny <<= aURL;
375
376 Reference< container::XNameContainer > xDialogModel( createDialogModel( xInput , xStringResourceManager, aDialogSourceURLAny ), UNO_SET_THROW);
377
378 xCtrlModel.set( xDialogModel, UNO_QUERY );
379 }
380 return xCtrlModel;
381 }
382
383
385 ( const Reference< XControlModel >& rxDialogModel, const Reference< XWindowPeer >& xParent )
386 {
387 OSL_ENSURE( rxDialogModel.is(), "DialogProviderImpl::getDialogControl: no dialog model" );
388
389 Reference< XUnoControlDialog > xDialogControl;
390
391 if ( m_xContext.is() )
392 {
393 xDialogControl = UnoControlDialog::create( m_xContext );
394
395 // set the model
396 if ( rxDialogModel.is() )
397 xDialogControl->setModel( rxDialogModel );
398
399 // set visible
400 xDialogControl->setVisible( false );
401
402 // get the parent of the dialog control
404 if( xParent.is() )
405 {
406 xPeer = xParent;
407 }
408 else if ( m_xModel.is() )
409 {
410 Reference< frame::XController > xController = m_xModel->getCurrentController();
411 if ( xController.is() )
412 {
414 if ( xFrame.is() )
415 xPeer.set( xFrame->getContainerWindow(), UNO_QUERY );
416 }
417 }
418
419 // create a peer
420 Reference< XToolkit> xToolkit( Toolkit::create( m_xContext ), UNO_QUERY_THROW );
421 xDialogControl->createPeer( xToolkit, xPeer );
422 }
423
424 return xDialogControl;
425 }
426
427
429 const Reference< XControl >& rxControl,
430 const Reference< XInterface >& rxHandler,
431 const Reference< XIntrospectionAccess >& rxIntrospectionAccess,
432 bool bDialogProviderMode )
433 {
434 if ( !rxControl.is() )
435 return;
436
437 Reference< XControlContainer > xControlContainer( rxControl, UNO_QUERY );
438
439 if ( !xControlContainer.is() )
440 return;
441
442 Sequence< Reference< XControl > > aControls = xControlContainer->getControls();
443 const Reference< XControl >* pControls = aControls.getConstArray();
444 sal_Int32 nControlCount = aControls.getLength();
445
446 Sequence< Reference< XInterface > > aObjects( nControlCount + 1 );
447 Reference< XInterface >* pObjects = aObjects.getArray();
448 for ( sal_Int32 i = 0; i < nControlCount; ++i )
449 {
450 pObjects[i].set( pControls[i], UNO_QUERY );
451 }
452
453 // also add the dialog control itself to the sequence
454 pObjects[nControlCount].set( rxControl, UNO_QUERY );
455
456 Reference<XScriptEventsAttacher> xScriptEventsAttacher
458 m_xContext, m_xModel, rxControl, rxHandler, rxIntrospectionAccess,
459 bDialogProviderMode,
460 (m_BasicInfo ? m_BasicInfo->mxBasicRTLListener : nullptr), msDialogLibName);
461
462 Any aHelper;
463 xScriptEventsAttacher->attachEvents( aObjects, Reference< XScriptListener >(), aHelper );
464 }
465
467 {
468 Reference< XIntrospectionAccess > xIntrospectionAccess;
470
471 if( !rxHandler.is() )
472 return xIntrospectionAccess;
473
474 if( !xIntrospection.is() )
475 {
476 // Get introspection service
477 xIntrospection = theIntrospection::get( m_xContext );
478 }
479
480 // Do introspection
481 try
482 {
483 Any aHandlerAny;
484 aHandlerAny <<= rxHandler;
485 xIntrospectionAccess = xIntrospection->inspect( aHandlerAny );
486 }
487 catch( RuntimeException& )
488 {
489 xIntrospectionAccess.clear();
490 }
491 return xIntrospectionAccess;
492 }
493
494
495 // XServiceInfo
496
497
499 {
500 return "com.sun.star.comp.scripting.DialogProvider";
501 }
502
503 sal_Bool DialogProviderImpl::supportsService( const OUString& rServiceName )
504 {
505 return cppu::supportsService(this, rServiceName);
506 }
507
509 {
510 return { "com.sun.star.awt.DialogProvider",
511 "com.sun.star.awt.DialogProvider2",
512 "com.sun.star.awt.ContainerWindowProvider" };
513 }
514
515
516 // XInitialization
517
518
520 {
521 ::osl::MutexGuard aGuard( getMutex() );
522
523 if ( aArguments.getLength() == 1 )
524 {
525 aArguments[0] >>= m_xModel;
526
527 if ( !m_xModel.is() )
528 {
529 throw RuntimeException( "DialogProviderImpl::initialize: invalid argument format!" );
530 }
531 }
532 else if ( aArguments.getLength() == 4 )
533 {
534 // call from RTL_Impl_CreateUnoDialog
535 aArguments[0] >>= m_xModel;
536 m_BasicInfo.reset( new BasicRTLParams );
537 m_BasicInfo->mxInput.set( aArguments[ 1 ], UNO_QUERY_THROW );
538 // allow null mxDlgLib, a document dialog instantiated from
539 // from application basic is unable to provide ( or find ) it's
540 // Library
541 aArguments[ 2 ] >>= m_BasicInfo->mxDlgLib;
542 // leave the possibility to optionally allow the old dialog creation
543 // to use the new XScriptListener ( which converts the old style macro
544 // to a SF url )
545 m_BasicInfo->mxBasicRTLListener.set( aArguments[ 3 ], UNO_QUERY);
546 }
547 else if ( aArguments.getLength() > 4 )
548 {
549 throw RuntimeException( "DialogProviderImpl::initialize: invalid number of arguments!" );
550 }
551 }
552
553
554 // XDialogProvider
555
556
557 constexpr OUStringLiteral aDecorationPropName = u"Decoration";
558
560 const OUString& URL, const Reference< XInterface >& xHandler,
561 const Reference< XWindowPeer >& xParent, bool bDialogProviderMode )
562 {
563 // if the dialog is located in a document, the document must already be open!
564
565 ::osl::MutexGuard aGuard( getMutex() );
566
567
568 // m_xHandler = xHandler;
569
570 //Reference< XDialog > xDialog;
573 try
574 {
575 // add support for basic RTL_FUNCTION
576 if (m_BasicInfo)
577 xCtrlMod = createDialogModelForBasic();
578 else
579 {
580 OSL_ENSURE( !URL.isEmpty(), "DialogProviderImpl::getDialog: no URL!" );
581 xCtrlMod = createDialogModel( URL );
582 }
583 }
584 catch ( const RuntimeException& ) { throw; }
585 catch ( const Exception& )
586 {
587 const Any aError( ::cppu::getCaughtException() );
588 throw WrappedTargetRuntimeException( OUString(), *this, aError );
589 }
590 if ( xCtrlMod.is() )
591 {
592 // i83963 Force decoration
593 if( bDialogProviderMode )
594 {
595 uno::Reference< beans::XPropertySet > xDlgModPropSet( xCtrlMod, uno::UNO_QUERY );
596 if( xDlgModPropSet.is() )
597 {
598 try
599 {
600 bool bDecoration = true;
601 Any aDecorationAny = xDlgModPropSet->getPropertyValue( aDecorationPropName );
602 aDecorationAny >>= bDecoration;
603 if( !bDecoration )
604 {
605 xDlgModPropSet->setPropertyValue( aDecorationPropName, Any( true ) );
606 xDlgModPropSet->setPropertyValue( "Title", Any( OUString() ) );
607 }
608 }
609 catch( UnknownPropertyException& )
610 {}
611 }
612 }
613
614 xCtrl.set( createDialogControl( xCtrlMod, xParent ) );
615 if ( xCtrl.is() )
616 {
617 Reference< XIntrospectionAccess > xIntrospectionAccess = inspectHandler( xHandler );
618 attachControlEvents( xCtrl, xHandler, xIntrospectionAccess, bDialogProviderMode );
619 }
620 }
621
622 return xCtrl;
623 }
624
626 {
627 Reference< XInterface > xDummyHandler;
628 Reference< XWindowPeer > xDummyPeer;
629 Reference < XControl > xControl = DialogProviderImpl::createDialogImpl( URL, xDummyHandler, xDummyPeer, true );
630 Reference< XDialog > xDialog( xControl, UNO_QUERY );
631 return xDialog;
632 }
633
635 const OUString& URL, const Reference< XInterface >& xHandler )
636 {
637 if( !xHandler.is() )
638 {
639 throw IllegalArgumentException(
640 "DialogProviderImpl::createDialogWithHandler: Invalid xHandler!",
642 }
643 Reference< XWindowPeer > xDummyPeer;
644 Reference < XControl > xControl = DialogProviderImpl::createDialogImpl( URL, xHandler, xDummyPeer, true );
645 Reference< XDialog > xDialog( xControl, UNO_QUERY );
646 return xDialog;
647 }
648
650 const OUString& URL, const Sequence< NamedValue >& Arguments )
651 {
653
654 Reference< XWindowPeer > xParentPeer;
655 if ( aArguments.has( "ParentWindow" ) )
656 {
657 const Any& aParentWindow( aArguments.get( "ParentWindow" ) );
658 if ( !( aParentWindow >>= xParentPeer ) )
659 {
660 const Reference< XControl > xParentControl( aParentWindow, UNO_QUERY );
661 if ( xParentControl.is() )
662 xParentPeer = xParentControl->getPeer();
663 }
664 }
665
666 const Reference< XInterface > xHandler( aArguments.get( "EventHandler" ), UNO_QUERY );
667
668 Reference < XControl > xControl = DialogProviderImpl::createDialogImpl( URL, xHandler, xParentPeer, true );
669 Reference< XDialog > xDialog( xControl, UNO_QUERY );
670 return xDialog;
671 }
672
674 const OUString& URL, const OUString&,
675 const Reference< XWindowPeer >& xParent, const Reference< XInterface >& xHandler )
676 {
677 if( !xParent.is() )
678 {
679 throw IllegalArgumentException(
680 "DialogProviderImpl::createContainerWindow: Invalid xParent!",
682 }
683 Reference < XControl > xControl = DialogProviderImpl::createDialogImpl( URL, xHandler, xParent, false );
684 Reference< XWindow> xWindow( xControl, UNO_QUERY );
685 return xWindow;
686 }
687
688
689 // component operations
690
691
692 extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
694 css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const&)
695 {
696 return cppu::acquire(new DialogProviderImpl(context));
697 }
698
699} // namespace dlgprov
700
701
702/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Reference< XComponentContext > m_xContext
SfxApplication * SfxGetpApp()
sal_Int16 script
const LanguageTag & GetUILanguageTag() const
static const AllSettings & GetSettings()
OUString GetMainURL(DecodeMechanism eMechanism, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
bool removeSegment(sal_Int32 nIndex=LAST_SEGMENT, bool bIgnoreFinalSlash=true)
OUString GetBase() const
const css::lang::Locale & getLocale(bool bResolveSystem=true) const
css::script::XLibraryContainer * GetDialogContainer()
VALUE_TYPE getOrDefault(const OUString &_rValueName, const VALUE_TYPE &_rDefault) const
virtual css::uno::Reference< css::awt::XDialog > SAL_CALL createDialogWithHandler(const OUString &URL, const css::uno::Reference< css::uno::XInterface > &xHandler) override
Definition: dlgprov.cxx:634
virtual css::uno::Reference< css::awt::XDialog > SAL_CALL createDialogWithArguments(const OUString &URL, const css::uno::Sequence< css::beans::NamedValue > &Arguments) override
Definition: dlgprov.cxx:649
virtual css::uno::Reference< css::awt::XWindow > SAL_CALL createContainerWindow(const OUString &URL, const OUString &WindowType, const css::uno::Reference< css::awt::XWindowPeer > &xParent, const css::uno::Reference< css::uno::XInterface > &xHandler) override
Definition: dlgprov.cxx:673
css::uno::Reference< css::awt::XControlModel > createDialogModelForBasic()
Definition: dlgprov.cxx:186
css::uno::Reference< css::awt::XControlModel > createDialogModel(const OUString &sURL)
Definition: dlgprov.cxx:198
DialogProviderImpl(const css::uno::Reference< css::uno::XComponentContext > &rxContext)
Definition: dlgprov.cxx:148
css::uno::Reference< css::awt::XControl > createDialogImpl(const OUString &URL, const css::uno::Reference< css::uno::XInterface > &xHandler, const css::uno::Reference< css::awt::XWindowPeer > &xParent, bool bDialogProviderMode)
Definition: dlgprov.cxx:559
virtual void SAL_CALL initialize(const css::uno::Sequence< css::uno::Any > &aArguments) override
Definition: dlgprov.cxx:519
virtual OUString SAL_CALL getImplementationName() override
Definition: dlgprov.cxx:498
css::uno::Reference< css::awt::XUnoControlDialog > createDialogControl(const css::uno::Reference< css::awt::XControlModel > &rxDialogModel, const css::uno::Reference< css::awt::XWindowPeer > &xParent)
Definition: dlgprov.cxx:385
void attachControlEvents(const css::uno::Reference< css::awt::XControl > &rxControlContainer, const css::uno::Reference< css::uno::XInterface > &rxHandler, const css::uno::Reference< css::beans::XIntrospectionAccess > &rxIntrospectionAccess, bool bDialogProviderMode)
Definition: dlgprov.cxx:428
virtual css::uno::Reference< css::awt::XDialog > SAL_CALL createDialog(const OUString &URL) override
Definition: dlgprov.cxx:625
css::uno::Reference< css::uno::XComponentContext > m_xContext
Definition: dlgprov.hxx:79
css::uno::Reference< css::frame::XModel > m_xModel
Definition: dlgprov.hxx:80
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: dlgprov.cxx:508
css::uno::Reference< css::beans::XIntrospectionAccess > inspectHandler(const css::uno::Reference< css::uno::XInterface > &rxHandler)
Definition: dlgprov.cxx:466
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
Definition: dlgprov.cxx:503
virtual ~DialogProviderImpl() override
Definition: dlgprov.cxx:154
std::unique_ptr< BasicRTLParams > m_BasicInfo
Definition: dlgprov.hxx:78
URL aURL
float u
Any aHelper
Sequence< PropertyValue > aArguments
sal_Int32 nIndex
Reference< XIntrospection > xIntrospection
@ Exception
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
anonymous implementation namespace
constexpr OUStringLiteral aDecorationPropName
Definition: dlgprov.cxx:557
Reference< container::XNameContainer > lcl_createControlModel(const Reference< XComponentContext > &i_xContext)
Definition: dlgprov.cxx:96
Reference< resource::XStringResourceManager > lcl_getStringResourceManager(const Reference< XComponentContext > &i_xContext, std::u16string_view i_sURL)
Definition: dlgprov.cxx:66
::osl::Mutex & getMutex()
Definition: dlgprov.cxx:137
Reference< container::XNameContainer > lcl_createDialogModel(const Reference< XComponentContext > &i_xContext, const Reference< io::XInputStream > &xInput, const Reference< frame::XModel > &xModel, const Reference< resource::XStringResourceManager > &xStringResourceManager, const Any &aDialogSourceURL)
Definition: dlgprov.cxx:102
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * scripting_DialogProviderImpl_get_implementation(css::uno::XComponentContext *context, css::uno::Sequence< css::uno::Any > const &)
Definition: dlgprov.cxx:693
static Reference< resource::XStringResourceManager > getStringResourceFromDialogLibrary(const Reference< container::XNameContainer > &xDialogLib)
Definition: dlgprov.cxx:160
int i
Reference< XController > xController
Reference< XFrame > xFrame
Reference< XModel > xModel
unsigned char sal_Bool