LibreOffice Module svtools (master) 1
toolboxcontroller.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
21#include <com/sun/star/beans/PropertyAttribute.hpp>
22#include <com/sun/star/beans/PropertyValue.hpp>
23#include <com/sun/star/beans/XPropertySet.hpp>
24#include <com/sun/star/frame/XDispatchProvider.hpp>
25#include <com/sun/star/lang/DisposedException.hpp>
26#include <com/sun/star/lang/XMultiServiceFactory.hpp>
27#include <com/sun/star/frame/XLayoutManager.hpp>
28#include <com/sun/star/util/URLTransformer.hpp>
29#include <utility>
31#include <vcl/svapp.hxx>
33#include <vcl/toolbox.hxx>
34#include <vcl/weldutils.hxx>
37
39constexpr OUStringLiteral TOOLBARCONTROLLER_PROPNAME_SUPPORTSVISIBLE = u"SupportsVisible";
40
41
42using namespace ::cppu;
43using namespace css::awt;
44using namespace css::uno;
45using namespace css::util;
46using namespace css::beans;
47using namespace css::lang;
48using namespace css::frame;
49
50namespace svt
51{
52
54 const Reference< XComponentContext >& rxContext,
55 const Reference< XFrame >& xFrame,
56 OUString aCommandURL ) :
57 OPropertyContainer( GetBroadcastHelper() )
58 , m_bSupportVisible( false )
59 , m_bInitialized( false )
60 , m_bDisposed( false )
61 , m_bSidebar( false )
62 , m_nToolBoxId( SAL_MAX_UINT16 )
63 , m_xFrame( xFrame )
64 , m_xContext( rxContext )
65 , m_aCommandURL(std::move( aCommandURL ))
66 , m_aListenerContainer( m_aMutex )
67 , m_pToolbar(nullptr)
68 , m_pBuilder(nullptr)
69{
70 OSL_ASSERT( m_xContext.is() );
73 css::beans::PropertyAttribute::TRANSIENT | css::beans::PropertyAttribute::READONLY,
74 &m_bSupportVisible, cppu::UnoType<decltype(m_bSupportVisible)>::get());
75
76 try
77 {
78 m_xUrlTransformer = URLTransformer::create( rxContext );
79 }
80 catch(const Exception&)
81 {
82 }
83}
84
86 OPropertyContainer(GetBroadcastHelper())
87 , m_bSupportVisible(false)
88 , m_bInitialized( false )
89 , m_bDisposed( false )
90 , m_bSidebar( false )
91 , m_nToolBoxId( SAL_MAX_UINT16 )
92 , m_aListenerContainer( m_aMutex )
93 , m_pToolbar(nullptr)
94 , m_pBuilder(nullptr)
95{
98 css::beans::PropertyAttribute::TRANSIENT | css::beans::PropertyAttribute::READONLY,
100}
101
103{
104}
105
107{
108 SolarMutexGuard aSolarMutexGuard;
109 return m_xFrame;
110}
111
113{
114 SolarMutexGuard aSolarMutexGuard;
115 return m_xContext;
116}
117
119{
120 Reference< XLayoutManager > xLayoutManager;
122 {
123 SolarMutexGuard aSolarMutexGuard;
124 xPropSet.set( m_xFrame, UNO_QUERY );
125 }
126
127 if ( xPropSet.is() )
128 {
129 try
130 {
131 xLayoutManager.set(xPropSet->getPropertyValue("LayoutManager"),UNO_QUERY);
132 }
133 catch ( Exception& )
134 {
135 }
136 }
137
138 return xLayoutManager;
139}
140
141// XInterface
143{
144 css::uno::Any a(ToolboxController_Base::queryInterface(rType));
145 return a.hasValue() ? a : OPropertyContainer::queryInterface(rType);
146}
147
148void SAL_CALL ToolboxController::acquire() noexcept
149{
150 ToolboxController_Base::acquire();
151}
152
153void SAL_CALL ToolboxController::release() noexcept
154{
155 ToolboxController_Base::release();
156}
157
158css::uno::Sequence<css::uno::Type> ToolboxController::getTypes()
159{
160 return comphelper::concatSequences(ToolboxController_Base::getTypes(),
161 getBaseTypes());
162}
163
164void SAL_CALL ToolboxController::initialize( const Sequence< Any >& aArguments )
165{
166 SolarMutexGuard aSolarMutexGuard;
167
168 if ( m_bDisposed )
169 throw DisposedException();
170
171 if ( m_bInitialized )
172 return;
173
174 m_bInitialized = true;
175 m_bSupportVisible = false;
176 PropertyValue aPropValue;
177 for ( const auto& rArgument : aArguments )
178 {
179 if ( rArgument >>= aPropValue )
180 {
181 if ( aPropValue.Name == "Frame" )
182 m_xFrame.set(aPropValue.Value,UNO_QUERY);
183 else if ( aPropValue.Name == "CommandURL" )
184 aPropValue.Value >>= m_aCommandURL;
185 else if ( aPropValue.Name == "ServiceManager" )
186 {
187 Reference<XMultiServiceFactory> xMSF(aPropValue.Value, UNO_QUERY);
188 if (xMSF.is())
190 }
191 else if ( aPropValue.Name == "ParentWindow" )
192 m_xParentWindow.set(aPropValue.Value,UNO_QUERY);
193 else if ( aPropValue.Name == "ModuleIdentifier" )
194 aPropValue.Value >>= m_sModuleName;
195 else if ( aPropValue.Name == "Identifier" )
196 {
197 sal_uInt16 nTmp;
198 if (aPropValue.Value >>= nTmp)
200 }
201 else if ( aPropValue.Name == "IsSidebar" )
202 aPropValue.Value >>= m_bSidebar;
203 }
204 }
205
206 try
207 {
208 if ( !m_xUrlTransformer.is() && m_xContext.is() )
209 m_xUrlTransformer = URLTransformer::create( m_xContext );
210 }
211 catch(const Exception&)
212 {
213 }
214
215 if ( !m_aCommandURL.isEmpty() )
217
218 if (weld::TransportAsXWindow* pTunnel = dynamic_cast<weld::TransportAsXWindow*>(getParent().get()))
219 {
220 m_pToolbar = dynamic_cast<weld::Toolbar*>(pTunnel->getWidget());
221 assert(m_pToolbar && "must be a toolbar");
222 m_pBuilder = pTunnel->getBuilder();
223 }
224}
225
227{
228 {
229 SolarMutexGuard aSolarMutexGuard;
230 if ( m_bDisposed )
231 throw DisposedException();
232 }
233
234 // Bind all registered listeners to their dispatch objects
235 bindListener();
236}
237
238// XComponent
240{
241 Reference< XComponent > xThis(this);
242
243 {
244 SolarMutexGuard aSolarMutexGuard;
245 if ( m_bDisposed )
246 return;
247 }
248
249 css::lang::EventObject aEvent( xThis );
251
252 SolarMutexGuard aSolarMutexGuard;
253 Reference< XStatusListener > xStatusListener(this);
254 for (auto const& listener : m_aListenerMap)
255 {
256 try
257 {
258 Reference< XDispatch > xDispatch( listener.second );
259
260 css::util::URL aTargetURL;
261 aTargetURL.Complete = listener.first;
262 if ( m_xUrlTransformer.is() )
263 m_xUrlTransformer->parseStrict( aTargetURL );
264
265 if ( xDispatch.is() && xStatusListener.is() )
266 xDispatch->removeStatusListener( xStatusListener, aTargetURL );
267 }
268 catch ( Exception& )
269 {
270 }
271
272 }
273
274 m_bDisposed = true;
275}
276
278{
280}
281
283{
285}
286
287// XEventListener
288void SAL_CALL ToolboxController::disposing( const EventObject& Source )
289{
290 Reference< XInterface > xSource( Source.Source );
291
292 SolarMutexGuard aSolarMutexGuard;
293
294 if ( m_bDisposed )
295 return;
296
297 for (auto & listener : m_aListenerMap)
298 {
299 // Compare references and release dispatch references if they are equal.
300 Reference< XInterface > xIfac(listener.second, UNO_QUERY);
301 if ( xSource == xIfac )
302 listener.second.clear();
303 }
304
305 Reference< XInterface > xIfac( m_xFrame, UNO_QUERY );
306 if ( xIfac == xSource )
307 m_xFrame.clear();
308}
309
310// XStatusListener
311void SAL_CALL ToolboxController::statusChanged( const FeatureStateEvent& )
312{
313 // must be implemented by sub class
314}
315
316// XToolbarController
317void SAL_CALL ToolboxController::execute( sal_Int16 KeyModifier )
318{
320 OUString aCommandURL;
321
322 {
323 SolarMutexGuard aSolarMutexGuard;
324
325 if ( m_bDisposed )
326 throw DisposedException();
327
328 if ( m_bInitialized &&
329 m_xFrame.is() &&
330 !m_aCommandURL.isEmpty() )
331 {
332 aCommandURL = m_aCommandURL;
333 URLToDispatchMap::iterator pIter = m_aListenerMap.find( m_aCommandURL );
334 if ( pIter != m_aListenerMap.end() )
335 xDispatch = pIter->second;
336 }
337 }
338
339 if ( !xDispatch.is() )
340 return;
341
342 try
343 {
344 css::util::URL aTargetURL;
345
346 // Provide key modifier information to dispatch function
347 Sequence<PropertyValue> aArgs{ comphelper::makePropertyValue("KeyModifier", KeyModifier) };
348
349 aTargetURL.Complete = aCommandURL;
350 if ( m_xUrlTransformer.is() )
351 m_xUrlTransformer->parseStrict( aTargetURL );
352 xDispatch->dispatch( aTargetURL, aArgs );
353 }
354 catch ( DisposedException& )
355 {
356 }
357}
358
360{
361}
362
364{
365}
366
368{
369 return Reference< XWindow >();
370}
371
373{
374 return Reference< XWindow >();
375}
376
377void ToolboxController::addStatusListener( const OUString& aCommandURL )
378{
380 Reference< XStatusListener > xStatusListener;
381 css::util::URL aTargetURL;
382
383 {
384 SolarMutexGuard aSolarMutexGuard;
385 URLToDispatchMap::iterator pIter = m_aListenerMap.find( aCommandURL );
386
387 // Already in the list of status listener. Do nothing.
388 if ( pIter != m_aListenerMap.end() )
389 return;
390
391 // Check if we are already initialized. Implementation starts adding itself as status listener when
392 // initialize is called.
393 if ( !m_bInitialized )
394 {
395 // Put into the unordered_map of status listener. Will be activated when initialized is called
396 m_aListenerMap.emplace( aCommandURL, Reference< XDispatch >() );
397 return;
398 }
399 else
400 {
401 // Add status listener directly as initialize has already been called.
402 Reference< XDispatchProvider > xDispatchProvider( m_xFrame, UNO_QUERY );
403 if ( m_xContext.is() && xDispatchProvider.is() )
404 {
405 aTargetURL.Complete = aCommandURL;
406 if ( m_xUrlTransformer.is() )
407 m_xUrlTransformer->parseStrict( aTargetURL );
408 xDispatch = xDispatchProvider->queryDispatch( aTargetURL, OUString(), 0 );
409
410 xStatusListener = this;
411 URLToDispatchMap::iterator aIter = m_aListenerMap.find( aCommandURL );
412 if ( aIter != m_aListenerMap.end() )
413 {
414 Reference< XDispatch > xOldDispatch( aIter->second );
415 aIter->second = xDispatch;
416
417 try
418 {
419 if ( xOldDispatch.is() )
420 xOldDispatch->removeStatusListener( xStatusListener, aTargetURL );
421 }
422 catch ( Exception& )
423 {
424 }
425 }
426 else
427 m_aListenerMap.emplace( aCommandURL, xDispatch );
428 }
429 }
430 }
431
432 // Call without locked mutex as we are called back from dispatch implementation
433 try
434 {
435 if ( xDispatch.is() )
436 xDispatch->addStatusListener( xStatusListener, aTargetURL );
437 }
438 catch ( Exception& )
439 {
440 }
441}
442
443void ToolboxController::removeStatusListener( const OUString& aCommandURL )
444{
445 SolarMutexGuard aSolarMutexGuard;
446
447 URLToDispatchMap::iterator pIter = m_aListenerMap.find( aCommandURL );
448 if ( pIter == m_aListenerMap.end() )
449 return;
450
451 Reference< XDispatch > xDispatch( pIter->second );
452 Reference< XStatusListener > xStatusListener(this);
453 m_aListenerMap.erase( pIter );
454
455 try
456 {
457 css::util::URL aTargetURL;
458 aTargetURL.Complete = aCommandURL;
459 if ( m_xUrlTransformer.is() )
460 m_xUrlTransformer->parseStrict( aTargetURL );
461
462 if ( xDispatch.is() && xStatusListener.is() )
463 xDispatch->removeStatusListener( xStatusListener, aTargetURL );
464 }
465 catch ( Exception& )
466 {
467 }
468}
469
471{
472 std::vector< Listener > aDispatchVector;
473 Reference< XStatusListener > xStatusListener;
474
475 {
476 SolarMutexGuard aSolarMutexGuard;
477
478 if ( !m_bInitialized )
479 return;
480
481 // Collect all registered command URL's and store them temporary
482 Reference< XDispatchProvider > xDispatchProvider( m_xFrame, UNO_QUERY );
483 if ( m_xContext.is() && xDispatchProvider.is() )
484 {
485 xStatusListener = this;
486 for (auto & listener : m_aListenerMap)
487 {
488 css::util::URL aTargetURL;
489 aTargetURL.Complete = listener.first;
490 if ( m_xUrlTransformer.is() )
491 m_xUrlTransformer->parseStrict( aTargetURL );
492
493 Reference< XDispatch > xDispatch(listener.second);
494 if ( xDispatch.is() )
495 {
496 // We already have a dispatch object => we have to requery.
497 // Release old dispatch object and remove it as listener
498 try
499 {
500 xDispatch->removeStatusListener( xStatusListener, aTargetURL );
501 }
502 catch ( Exception& )
503 {
504 }
505 }
506
507 listener.second.clear();
508 xDispatch.clear();
509
510 // Query for dispatch object. Old dispatch will be released with this, too.
511 try
512 {
513 xDispatch = xDispatchProvider->queryDispatch( aTargetURL, OUString(), 0 );
514 }
515 catch ( Exception& )
516 {
517 }
518
519 // it may be a command alias
520 if (!xDispatch.is())
521 {
522 try
523 {
527
528 if (!sRealCommand.isEmpty())
529 {
530 aTargetURL.Complete = sRealCommand;
531 if ( m_xUrlTransformer.is() )
532 m_xUrlTransformer->parseStrict( aTargetURL );
533
534 xDispatch = xDispatchProvider->queryDispatch( aTargetURL, OUString(), 0 );
535 }
536 }
537 catch ( Exception& )
538 {
539 }
540 }
541
542 listener.second = xDispatch;
543
544 aDispatchVector.push_back( Listener( aTargetURL, xDispatch ) );
545 }
546 }
547 }
548
549 // Call without locked mutex as we are called back from dispatch implementation
550 if ( !xStatusListener.is() )
551 return;
552
553 try
554 {
555 for (Listener & rListener : aDispatchVector)
556 {
557 if ( rListener.xDispatch.is() )
558 rListener.xDispatch->addStatusListener( xStatusListener, rListener.aURL );
559 else if ( rListener.aURL.Complete == m_aCommandURL )
560 {
561 try
562 {
563 // Send status changed for the main URL, if we cannot get a valid dispatch object.
564 // UI disables the button. Catch exception as we release our mutex, it is possible
565 // that someone else already disposed this instance!
566 FeatureStateEvent aFeatureStateEvent;
567 aFeatureStateEvent.IsEnabled = false;
568 aFeatureStateEvent.FeatureURL = rListener.aURL;
569 aFeatureStateEvent.State = Any();
570 xStatusListener->statusChanged( aFeatureStateEvent );
571 }
572 catch ( Exception& )
573 {
574 }
575 }
576 }
577 }
578 catch ( Exception& )
579 {
580 }
581}
582
584{
585 SolarMutexGuard aSolarMutexGuard;
586
587 if ( !m_bInitialized )
588 return;
589
590 // Collect all registered command URL's and store them temporary
591 Reference< XDispatchProvider > xDispatchProvider( m_xFrame, UNO_QUERY );
592 if ( !(m_xContext.is() && xDispatchProvider.is()) )
593 return;
594
595 Reference< XStatusListener > xStatusListener(this);
596 for (auto & listener : m_aListenerMap)
597 {
598 css::util::URL aTargetURL;
599 aTargetURL.Complete = listener.first;
600 if ( m_xUrlTransformer.is() )
601 m_xUrlTransformer->parseStrict( aTargetURL );
602
603 Reference< XDispatch > xDispatch(listener.second);
604 if ( xDispatch.is() )
605 {
606 // We already have a dispatch object => we have to requery.
607 // Release old dispatch object and remove it as listener
608 try
609 {
610 xDispatch->removeStatusListener( xStatusListener, aTargetURL );
611 }
612 catch ( Exception& )
613 {
614 }
615 }
616 listener.second.clear();
617 }
618}
619
621{
622 bindListener();
623}
624
625void ToolboxController::updateStatus( const OUString& aCommandURL )
626{
628 Reference< XStatusListener > xStatusListener;
629 css::util::URL aTargetURL;
630
631 {
632 SolarMutexGuard aSolarMutexGuard;
633
634 if ( !m_bInitialized )
635 return;
636
637 // Try to find a dispatch object for the requested command URL
638 Reference< XDispatchProvider > xDispatchProvider( m_xFrame, UNO_QUERY );
639 xStatusListener = this;
640 if ( m_xContext.is() && xDispatchProvider.is() )
641 {
642 aTargetURL.Complete = aCommandURL;
643 if ( m_xUrlTransformer.is() )
644 m_xUrlTransformer->parseStrict( aTargetURL );
645 xDispatch = xDispatchProvider->queryDispatch( aTargetURL, OUString(), 0 );
646 }
647 }
648
649 if ( !(xDispatch.is() && xStatusListener.is()) )
650 return;
651
652 // Catch exception as we release our mutex, it is possible that someone else
653 // has already disposed this instance!
654 // Add/remove status listener to get an update status information from the
655 // requested command.
656 try
657 {
658 xDispatch->addStatusListener( xStatusListener, aTargetURL );
659 xDispatch->removeStatusListener( xStatusListener, aTargetURL );
660 }
661 catch ( Exception& )
662 {
663 }
664}
665
666
667void ToolboxController::dispatchCommand( const OUString& sCommandURL, const Sequence< PropertyValue >& rArgs, const OUString &sTarget )
668{
669 try
670 {
671 Reference< XDispatchProvider > xDispatchProvider( m_xFrame, UNO_QUERY_THROW );
672 URL aURL;
673 aURL.Complete = sCommandURL;
674 getURLTransformer()->parseStrict( aURL );
675
676 Reference< XDispatch > xDispatch( xDispatchProvider->queryDispatch( aURL, sTarget, 0 ), UNO_SET_THROW );
677
678 std::unique_ptr<DispatchInfo> pDispatchInfo(new DispatchInfo( xDispatch, std::move(aURL), rArgs ));
679 if ( Application::PostUserEvent( LINK(nullptr, ToolboxController, ExecuteHdl_Impl),
680 pDispatchInfo.get() ) )
681 pDispatchInfo.release();
682
683 }
684 catch( Exception& )
685 {
686 }
687}
688
689
690css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL ToolboxController::getPropertySetInfo()
691{
692 Reference<XPropertySetInfo> xInfo( createPropertySetInfo( getInfoHelper() ) );
693 return xInfo;
694}
695
697{
698 return *getArrayHelper();
699}
700
701
703{
704 css::uno::Sequence< Property > aProps;
705 describeProperties(aProps);
706 return new ::cppu::OPropertyArrayHelper(aProps);
707}
708
709sal_Bool SAL_CALL ToolboxController::convertFastPropertyValue( css::uno::Any& aConvertedValue ,
710 css::uno::Any& aOldValue ,
711 sal_Int32 nHandle ,
712 const css::uno::Any& aValue )
713{
714 switch (nHandle)
715 {
717 {
718 bool aNewValue(false);
719 aValue >>= aNewValue;
720 if (aNewValue != m_bSupportVisible)
721 {
722 aConvertedValue <<= aNewValue;
723 aOldValue <<= m_bSupportVisible;
724 return true;
725 }
726 return false;
727 }
728 }
729 return OPropertyContainer::convertFastPropertyValue(aConvertedValue, aOldValue, nHandle, aValue);
730}
731
733 sal_Int32 nHandle,
734 const css::uno::Any& aValue )
735{
736 OPropertyContainer::setFastPropertyValue_NoBroadcast(nHandle, aValue);
738 {
739 bool rValue(false);
740 if (( aValue >>= rValue ) && m_bInitialized)
741 m_bSupportVisible = rValue;
742 }
743}
744
745
746IMPL_STATIC_LINK( ToolboxController, ExecuteHdl_Impl, void*, p, void )
747{
748 DispatchInfo* pDispatchInfo = static_cast<DispatchInfo*>(p);
749 pDispatchInfo->mxDispatch->dispatch( pDispatchInfo->maURL, pDispatchInfo->maArgs );
750 delete pDispatchInfo;
751}
752
753void ToolboxController::enable( bool bEnable )
754{
755 ToolBox* pToolBox = nullptr;
756 ToolBoxItemId nItemId;
757 if( getToolboxId( nItemId, &pToolBox ) )
758 {
759 pToolBox->EnableItem( nItemId, bEnable );
760 }
761}
762
764{
765 if( (m_nToolBoxId != ToolBoxItemId(SAL_MAX_UINT16)) && (ppToolBox == nullptr) )
766 return false;
767
768 ToolBox* pToolBox = static_cast< ToolBox* >( VCLUnoHelper::GetWindow( getParent() ) );
769
770 if( (m_nToolBoxId == ToolBoxItemId(SAL_MAX_UINT16)) && pToolBox )
771 {
772 const ToolBox::ImplToolItems::size_type nCount = pToolBox->GetItemCount();
773 for ( ToolBox::ImplToolItems::size_type nPos = 0; nPos < nCount; ++nPos )
774 {
775 const ToolBoxItemId nItemId = pToolBox->GetItemId( nPos );
776 if ( pToolBox->GetItemCommand( nItemId ) == m_aCommandURL )
777 {
778 m_nToolBoxId = nItemId;
779 break;
780 }
781 }
782 }
783
784 if( ppToolBox )
785 *ppToolBox = pToolBox;
786
787 rItemId = m_nToolBoxId;
788
789 return (rItemId != ToolBoxItemId(SAL_MAX_UINT16)) && (( ppToolBox == nullptr) || (*ppToolBox != nullptr) );
790}
791//end
792
793} // svt
794
795/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Reference< XComponentContext > m_xContext
PropertiesInfo aProperties
css::uno::Reference< css::lang::XComponent > m_xFrame
AnyEventRef aEvent
static ImplSVEvent * PostUserEvent(const Link< void *, void > &rLink, void *pCaller=nullptr, bool bReferenceLink=false)
ToolBoxItemId GetItemId(ImplToolItems::size_type nPos) const
OUString GetItemCommand(ToolBoxItemId nItemId) const
void EnableItem(ToolBoxItemId nItemId, bool bEnable=true)
ImplToolItems::size_type GetItemCount() const
static vcl::Window * GetWindow(const css::uno::Reference< css::awt::XWindow > &rxWindow)
sal_Int32 removeInterface(const css::uno::Type &rKey, const css::uno::Reference< css::uno::XInterface > &rxIFace)
sal_Int32 addInterface(const css::uno::Type &rKey, const css::uno::Reference< css::uno::XInterface > &r)
void disposeAndClear(const css::lang::EventObject &rEvt)
void describeProperties(css::uno::Sequence< css::beans::Property > &_rProps) const
void registerProperty(const OUString &_rName, sal_Int32 _nHandle, sal_Int32 _nAttributes, void *_pPointerToMember, const css::uno::Type &_rMemberType)
static css::uno::Sequence< css::uno::Type > getBaseTypes()
void addStatusListener(const OUString &aCommandURL)
virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > &aListener) override
virtual void SAL_CALL dispose() override
void enable(bool bEnable)
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
virtual css::uno::Reference< css::awt::XWindow > SAL_CALL createItemWindow(const css::uno::Reference< css::awt::XWindow > &Parent) override
css::uno::Reference< css::awt::XWindow > m_xParentWindow
container for ALL Listener
virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
URLToDispatchMap m_aListenerMap
css::uno::Reference< css::frame::XFrame > getFrameInterface() const
const css::uno::Reference< css::uno::XComponentContext > & getContext() const
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &aType) override
virtual void SAL_CALL acquire() noexcept override
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
comphelper::OMultiTypeInterfaceContainerHelper2 m_aListenerContainer
virtual void SAL_CALL statusChanged(const css::frame::FeatureStateEvent &Event) override=0
const css::uno::Reference< css::util::XURLTransformer > & getURLTransformer() const
const css::uno::Reference< css::awt::XWindow > & getParent() const
virtual void SAL_CALL execute(sal_Int16 KeyModifier) override
css::uno::Reference< css::util::XURLTransformer > m_xUrlTransformer
virtual void SAL_CALL release() noexcept override
void dispatchCommand(const OUString &sCommandURL, const css::uno::Sequence< css::beans::PropertyValue > &rArgs, const OUString &rTarget=OUString())
virtual void SAL_CALL click() override
bool getToolboxId(ToolBoxItemId &rItemId, ToolBox **ppToolBox)
void removeStatusListener(const OUString &aCommandURL)
virtual void SAL_CALL update() override
virtual void SAL_CALL disposing(const css::lang::EventObject &Source) override
virtual ~ToolboxController() override
virtual void SAL_CALL setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, const css::uno::Any &rValue) override
virtual ::cppu::IPropertyArrayHelper &SAL_CALL getInfoHelper() override
virtual void SAL_CALL doubleClick() override
virtual ::cppu::IPropertyArrayHelper * createArrayHelper() const override
css::uno::Reference< css::frame::XLayoutManager > getLayoutManager() const
virtual sal_Bool SAL_CALL convertFastPropertyValue(css::uno::Any &rConvertedValue, css::uno::Any &rOldValue, sal_Int32 nHandle, const css::uno::Any &rValue) override
css::uno::Reference< css::uno::XComponentContext > m_xContext
css::uno::Reference< css::frame::XFrame > m_xFrame
virtual css::uno::Reference< css::awt::XWindow > SAL_CALL createPopupWindow() override
virtual void SAL_CALL initialize(const css::uno::Sequence< css::uno::Any > &aArguments) override
int nCount
Reference< XDispatch > xDispatch
URL aURL
float u
bool m_bDisposed
std::mutex m_aMutex
Sequence< PropertyValue > aArguments
void * p
uno_Any a
sal_uInt16 nPos
@ Exception
css::uno::Sequence< T > concatSequences(const css::uno::Sequence< T > &rS1, const Ss &... rSn)
Reference< XComponentContext > getComponentContext(Reference< XMultiServiceFactory > const &factory)
css::beans::PropertyValue makePropertyValue(const OUString &rName, T &&rValue)
Type
IMPL_STATIC_LINK(AddressBookSourceDialog, OnComboGetFocus, weld::Widget &, rBox, void)
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
Sequence< beans::PropertyValue > GetCommandProperties(const OUString &rsCommandName, const OUString &rsModuleName)
OUString GetRealCommandForCommand(const css::uno::Sequence< css::beans::PropertyValue > &rProperties)
OUString GetModuleIdentifier(const Reference< frame::XFrame > &rxFrame)
sal_Int32 nHandle
Reference< XFrame > xFrame
weld::Builder * m_pBuilder
const int TOOLBARCONTROLLER_PROPHANDLE_SUPPORTSVISIBLE
constexpr OUStringLiteral TOOLBARCONTROLLER_PROPNAME_SUPPORTSVISIBLE
#define SAL_MAX_UINT16
unsigned char sal_Bool
OUString aTargetURL