26#include <editeng/editeng.hxx>
28#include <svx/svxids.hrc>
31#include <com/sun/star/beans/XPropertySet.hpp>
32#include <com/sun/star/frame/XDispatchProvider.hpp>
33#include <com/sun/star/container/XChild.hpp>
34#include <com/sun/star/awt/XFocusListener.hpp>
35#include <com/sun/star/awt/XMouseListener.hpp>
36#include <com/sun/star/awt/XWindow.hpp>
37#include <com/sun/star/util/URLTransformer.hpp>
86 SID_CLIPBOARD_FORMAT_ITEMS,
93 SID_ATTR_CHAR_POSTURE,
95 SID_ATTR_CHAR_SHADOWED,
96 SID_ATTR_CHAR_WORDLINEMODE,
97 SID_ATTR_CHAR_CONTOUR,
98 SID_ATTR_CHAR_STRIKEOUT,
99 SID_ATTR_CHAR_UNDERLINE,
100 SID_ATTR_CHAR_FONTHEIGHT,
102 SID_ATTR_CHAR_KERNING,
103 SID_ATTR_CHAR_LANGUAGE,
104 SID_ATTR_CHAR_ESCAPEMENT,
105 SID_ATTR_PARA_ADJUST,
106 SID_ATTR_PARA_ADJUST_LEFT,
107 SID_ATTR_PARA_ADJUST_RIGHT,
108 SID_ATTR_PARA_ADJUST_CENTER,
109 SID_ATTR_PARA_ADJUST_BLOCK,
110 SID_ATTR_PARA_LINESPACE,
111 SID_ATTR_PARA_LINESPACE_10,
112 SID_ATTR_PARA_LINESPACE_15,
113 SID_ATTR_PARA_LINESPACE_20,
116 SID_ATTR_CHAR_AUTOKERN,
117 SID_SET_SUPER_SCRIPT,
123 SID_ATTR_CHAR_SCALEWIDTH,
124 SID_ATTR_CHAR_RELIEF,
125 SID_ATTR_PARA_LEFT_TO_RIGHT,
126 SID_ATTR_PARA_RIGHT_TO_LEFT,
127 SID_ATTR_CHAR_OVERLINE,
137 SID_ATTR_PARA_HANGPUNCTUATION,
138 SID_ATTR_PARA_FORBIDDEN_RULES,
139 SID_ATTR_PARA_SCRIPTSPACE,
140 SID_ATTR_CHAR_LATIN_LANGUAGE,
141 SID_ATTR_CHAR_CJK_LANGUAGE,
142 SID_ATTR_CHAR_CTL_LANGUAGE,
143 SID_ATTR_CHAR_LATIN_FONT,
144 SID_ATTR_CHAR_CJK_FONT,
145 SID_ATTR_CHAR_CTL_FONT,
146 SID_ATTR_CHAR_LATIN_FONTHEIGHT,
147 SID_ATTR_CHAR_CJK_FONTHEIGHT,
148 SID_ATTR_CHAR_CTL_FONTHEIGHT,
149 SID_ATTR_CHAR_LATIN_WEIGHT,
150 SID_ATTR_CHAR_CJK_WEIGHT,
151 SID_ATTR_CHAR_CTL_WEIGHT,
152 SID_ATTR_CHAR_LATIN_POSTURE,
153 SID_ATTR_CHAR_CJK_POSTURE,
154 SID_ATTR_CHAR_CTL_POSTURE,
155 SID_ATTR_CHAR_EMPHASISMARK,
159 typedef ::cppu::WeakImplHelper < css::awt::XFocusListener
177 virtual void SAL_CALL
focusGained(
const css::awt::FocusEvent& e )
override;
178 virtual void SAL_CALL
focusLost(
const css::awt::FocusEvent& e )
override;
179 virtual void SAL_CALL
disposing(
const EventObject& Source )
override;
184 :m_pObserver( _pObserver )
185 ,m_xWindow( _rxControl, UNO_QUERY )
188 DBG_ASSERT(
m_xWindow.is(),
"FmFocusListenerAdapter::FmFocusListenerAdapter: invalid control!" );
243 typedef ::cppu::WeakImplHelper < css::awt::XMouseListener
261 virtual void SAL_CALL
mousePressed(
const css::awt::MouseEvent& e )
override;
262 virtual void SAL_CALL
mouseReleased(
const css::awt::MouseEvent& e )
override;
263 virtual void SAL_CALL
mouseEntered(
const css::awt::MouseEvent& e )
override;
264 virtual void SAL_CALL
mouseExited(
const css::awt::MouseEvent& e )
override;
265 virtual void SAL_CALL
disposing(
const EventObject& Source )
override;
269 :m_pObserver( _pObserver )
270 ,m_xWindow( _rxControl, UNO_QUERY )
273 DBG_ASSERT(
m_xWindow.is(),
"FmMouseListenerAdapter::FmMouseListenerAdapter: invalid control!" );
312 if ( _rEvent.PopupTrigger )
351 void lcl_translateUnoStateToItem(
SfxSlotId _nSlot,
const Any& _rUnoState,
SfxItemSet& _rSet )
354 if ( !_rUnoState.hasValue() )
356 if ( ( _nSlot != SID_CUT )
357 && ( _nSlot != SID_COPY )
358 && ( _nSlot != SID_PASTE )
366 switch ( _rUnoState.getValueType().getTypeClass() )
368 case TypeClass_BOOLEAN:
371 _rUnoState >>= bState;
372 if ( _nSlot == SID_ATTR_PARA_SCRIPTSPACE )
381 Sequence< PropertyValue > aComplexState;
382 if ( _rUnoState >>= aComplexState )
384 if ( !aComplexState.hasElements() )
390 const SfxPoolItem* pTransformed = aAllItems.GetItem( nWhich );
391 OSL_ENSURE( pTransformed,
"lcl_translateUnoStateToItem: non-empty parameter sequence leading to empty item?" );
393 _rSet.
Put( *pTransformed );
400 OSL_FAIL(
"lcl_translateUnoStateToItem: invalid state!" );
408 OUString lcl_getUnoSlotName(
SfxSlotId _nSlotId )
424 case SID_ATTR_PARA_HANGPUNCTUATION: sUnoName =
".uno:AllowHangingPunctuation";
break;
425 case SID_ATTR_PARA_FORBIDDEN_RULES: sUnoName =
".uno:ApplyForbiddenCharacterRules";
break;
426 case SID_ATTR_PARA_SCRIPTSPACE: sUnoName =
".uno:UseScriptSpacing";
break;
430 if (sUnoName.isEmpty())
432 SAL_WARN(
"svx",
"lcl_getUnoSlotName: invalid slot id, or invalid slot, or no UNO name! "
433 "(slot id: " << _nSlotId <<
")");
439 bool lcl_determineReadOnly(
const Reference< css::awt::XControl >& _rxControl )
441 bool bIsReadOnlyModel =
true;
444 Reference< XPropertySet > xModelProps;
445 if ( _rxControl.is() )
446 xModelProps.set(_rxControl->getModel(), css::uno::UNO_QUERY);
447 Reference< XPropertySetInfo > xModelPropInfo;
448 if ( xModelProps.is() )
449 xModelPropInfo = xModelProps->getPropertySetInfo();
451 if ( !xModelPropInfo.is() || !xModelPropInfo->hasPropertyByName(
FM_PROP_READONLY ) )
452 bIsReadOnlyModel =
true;
460 catch(
const Exception& )
464 return bIsReadOnlyModel;
468 vcl::Window* lcl_getWindow(
const Reference< css::awt::XControl >& _rxControl )
473 Reference< css::awt::XWindowPeer > xControlPeer;
474 if ( _rxControl.is() )
475 xControlPeer = _rxControl->getPeer();
476 if ( xControlPeer.is() )
479 catch(
const Exception& )
488 bool lcl_isRichText(
const Reference< css::awt::XControl >& _rxControl )
490 if ( !_rxControl.is() )
493 bool bIsRichText =
false;
496 Reference< XPropertySet > xModelProps( _rxControl->getModel(), UNO_QUERY );
497 Reference< XPropertySetInfo > xPSI;
498 if ( xModelProps.is() )
499 xPSI = xModelProps->getPropertySetInfo();
500 OUString sRichTextPropertyName =
"RichText";
501 if ( xPSI.is() && xPSI->hasPropertyByName( sRichTextPropertyName ) )
503 OSL_VERIFY( xModelProps->getPropertyValue( sRichTextPropertyName ) >>= bIsRichText );
506 catch(
const Exception& )
516 :m_bActiveControl( false )
517 ,m_bActiveControlIsReadOnly( true )
518 ,m_bActiveControlIsRichText( false )
519 ,m_pViewFrame( _pFrame )
521 ,m_aClipboardInvalidation(
"svx FmTextControlShell m_aClipboardInvalidation")
522 ,m_bNeedClipboardInvalidation( true )
537 if ( m_bNeedClipboardInvalidation )
539 SAL_INFO(
"svx.form",
"invalidating clipboard slots" );
540 m_rBindings.Invalidate( SID_CUT );
541 m_rBindings.Invalidate( SID_COPY );
542 m_rBindings.Invalidate( SID_PASTE );
543 m_bNeedClipboardInvalidation =
false;
552 for (
const auto& rFeature : _rDispatchers)
555#if OSL_DEBUG_LEVEL > 0
556 OUString sUnoSlotName;
558 sUnoSlotName = lcl_getUnoSlotName( nSlotId );
560 sUnoSlotName =
"<unknown>";
561 OString sUnoSlotNameAscii =
"\"" +
566 if ( _bTranslateLatin )
581 case SID_ATTR_CHAR_LATIN_FONT: nSlotId = SID_ATTR_CHAR_FONT;
break;
582 case SID_ATTR_CHAR_LATIN_FONTHEIGHT:nSlotId = SID_ATTR_CHAR_FONTHEIGHT;
break;
583 case SID_ATTR_CHAR_LATIN_LANGUAGE: nSlotId = SID_ATTR_CHAR_LANGUAGE;
break;
584 case SID_ATTR_CHAR_LATIN_POSTURE: nSlotId = SID_ATTR_CHAR_POSTURE;
break;
585 case SID_ATTR_CHAR_LATIN_WEIGHT: nSlotId = SID_ATTR_CHAR_WEIGHT;
break;
590 bool bIsInPool = rPool.
IsInRange( nWhich );
593#if OSL_DEBUG_LEVEL > 0
594 bool bFeatureIsEnabled = rFeature.second->isFeatureEnabled();
595 OString
sMessage =
"found a feature state for " + sUnoSlotNameAscii;
596 if ( !bFeatureIsEnabled )
601 lcl_translateUnoStateToItem( nSlotId, rFeature.second->getFeatureState(), _rSet );
603#if OSL_DEBUG_LEVEL > 0
606 SAL_WARN(
"svx.form",
"found a feature state for " << sUnoSlotNameAscii <<
", but could not translate it into an item!" );
616 DBG_ASSERT( pFontList,
"FmTextControlShell::executeAttributeDialog: no font list item!" );
621 pPool->FreezeIdRanges();
622 std::optional< SfxItemSet > xPureItems((
SfxItemSet( *pPool ) ));
625 std::optional<SfxAllItemSet> xCurrentItems((
SfxAllItemSet( *xPureItems ) ));
634 std::unique_ptr<SfxTabDialogController> xDialog;
636 xDialog = std::make_unique<TextControlCharAttribDialog>(rReq.
GetFrameWeld(), *xCurrentItems, *pFontList);
638 xDialog = std::make_unique<TextControlParaAttribDialog>(rReq.
GetFrameWeld(), *xCurrentItems);
639 if (
RET_OK == xDialog->run() )
641 const SfxItemSet& rModifiedItems = *xDialog->GetOutputItemSet();
642 for (
WhichId nWhich = pPool->GetFirstWhich(); nWhich <= pPool->GetLastWhich(); ++nWhich )
644 if ( rModifiedItems.
GetItemState( nWhich ) == SfxItemState::SET )
646 SfxSlotId nSlotForItemSet = pPool->GetSlotId( nWhich );
650 SfxSlotId nSlotForDispatcher = nSlotForItemSet;
651 switch ( nSlotForDispatcher )
653 case SID_ATTR_CHAR_FONT: nSlotForDispatcher = SID_ATTR_CHAR_LATIN_FONT;
break;
654 case SID_ATTR_CHAR_FONTHEIGHT:nSlotForDispatcher = SID_ATTR_CHAR_LATIN_FONTHEIGHT;
break;
655 case SID_ATTR_CHAR_LANGUAGE: nSlotForDispatcher = SID_ATTR_CHAR_LATIN_LANGUAGE;
break;
656 case SID_ATTR_CHAR_POSTURE: nSlotForDispatcher = SID_ATTR_CHAR_LATIN_POSTURE;
break;
657 case SID_ATTR_CHAR_WEIGHT: nSlotForDispatcher = SID_ATTR_CHAR_LATIN_WEIGHT;
break;
661 ControlFeatures::const_iterator aFeaturePos =
m_aControlFeatures.find( nSlotForDispatcher );
666 aFeaturePos = aAdditionalFestures.find( nSlotForDispatcher );
667 bFound = aFeaturePos != aAdditionalFestures.end( );
672 Sequence< PropertyValue > aArgs;
675 xPureItems->Put( *pModifiedItem );
677 xPureItems->ClearItem( nWhich );
679 if ( ( nSlotForItemSet == SID_ATTR_PARA_HANGPUNCTUATION )
680 || ( nSlotForItemSet == SID_ATTR_PARA_FORBIDDEN_RULES )
681 || ( nSlotForItemSet == SID_ATTR_PARA_SCRIPTSPACE )
686 DBG_ASSERT( !aArgs.hasElements(),
"FmTextControlShell::executeAttributeDialog: these are no UNO slots - are they?" );
689 DBG_ASSERT( pBoolItem,
"FmTextControlShell::executeAttributeDialog: no bool item?!" );
698 aFeaturePos->second->dispatch( aArgs );
700 #if OSL_DEBUG_LEVEL > 0
703 OUString sUnoSlotName = lcl_getUnoSlotName( nSlotForItemSet );
704 if ( sUnoSlotName.isEmpty() )
705 sUnoSlotName =
"unknown (no SfxSlot)";
706 SAL_WARN(
"svx",
"FmTextControShell::executeAttributeDialog: Could not handle the following item:"
707 "\n SlotID: " << nSlotForItemSet
708 <<
"\n WhichID: " << nWhich
709 <<
"\n UNO name: " << sUnoSlotName );
714 rReq.
Done( rModifiedItems );
718 xCurrentItems.reset();
754 if ( SID_CUT == _nSlot )
763 OUString sClipboardContent;
770 OSL_FAIL(
"FmTextControlShell::executeClipboardSlot: invalid slot!" );
810 DBG_ASSERT( aFeaturePos !=
m_aControlFeatures.end(),
"FmTextControShell::ExecuteTextAttribute: I have no such dispatcher, and cannot handle it at all!" );
820 case SID_ATTR_CHAR_STRIKEOUT:
821 case SID_ATTR_CHAR_UNDERLINE:
822 case SID_ATTR_CHAR_OVERLINE:
826 lcl_translateUnoStateToItem( nSlot, aFeaturePos->second->getFeatureState(), aToggled );
829 if ( ( SID_ATTR_CHAR_UNDERLINE == nSlot ) || ( SID_ATTR_CHAR_OVERLINE == nSlot ) )
832 DBG_ASSERT( pTextLine,
"FmTextControlShell::ExecuteTextAttribute: ooops - no underline/overline item!" );
836 if ( SID_ATTR_CHAR_UNDERLINE == nSlot ) {
846 DBG_ASSERT( pCrossedOut,
"FmTextControlShell::ExecuteTextAttribute: ooops - no CrossedOut item!" );
860 case SID_ATTR_CHAR_FONTHEIGHT:
861 case SID_ATTR_CHAR_FONT:
862 case SID_ATTR_CHAR_POSTURE:
863 case SID_ATTR_CHAR_WEIGHT:
864 case SID_ATTR_CHAR_SHADOWED:
865 case SID_ATTR_CHAR_CONTOUR:
866 case SID_SET_SUPER_SCRIPT:
867 case SID_SET_SUB_SCRIPT:
870 Sequence< PropertyValue > aArgs;
873 aFeaturePos->second->dispatch( aArgs );
878 if ( aFeaturePos->second->isFeatureEnabled() )
879 aFeaturePos->second->dispatch();
893 if ( ( nSlot == SID_ATTR_PARA_LEFT_TO_RIGHT )
894 || ( nSlot == SID_ATTR_PARA_RIGHT_TO_LEFT )
908 if ( aFeaturePos->second->isFeatureEnabled() )
909 lcl_translateUnoStateToItem( nSlot, aFeaturePos->second->getFeatureState(), _rSet );
915 bool bDisable =
false;
917 bool bNeedWriteableControl =
false;
918 bool bNeedTextComponent =
false;
919 bool bNeedSelection =
false;
926 bNeedWriteableControl =
true;
930 bNeedSelection =
true;
931 bNeedTextComponent =
true;
932 bNeedWriteableControl =
true;
933 SAL_INFO(
"svx.form",
"need to invalidate again" );
940 if ( pActiveControlVCLWindow )
943 bDisable |= !aDataHelper.
HasFormat( SotClipboardFormatId::STRING );
948 bNeedTextComponent =
true;
949 bNeedWriteableControl =
true;
954 bNeedTextComponent =
true;
955 bNeedSelection =
true;
959 bNeedTextComponent =
true;
967 SAL_WARN_IF( bNeedSelection && !bNeedTextComponent,
"svx.form",
"FmTextControlShell::GetTextAttributeState: bNeedSelection should imply bNeedTextComponent!" );
969 if ( !bDisable && bNeedWriteableControl )
972 if ( !bDisable && bNeedTextComponent )
975 if ( !bDisable && bNeedSelection )
978 bDisable |= aSelection.Min == aSelection.Max;
1016#if OSL_DEBUG_LEVEL > 0
1017 SAL_INFO(
"svx.form",
"0x" << OUString::number(
reinterpret_cast<sal_IntPtr
>(_rxController.get()), 16 ));
1020 DBG_ASSERT( _rxController.is(),
"FmTextControlShell::formActivated: invalid controller!" );
1021 if ( !_rxController.is() )
1042 SAL_INFO(
"svx.form",
"0x" << OUString::number(
reinterpret_cast<sal_IntPtr
>(_rxController.get()), 16 ));
1053 OSL_PRECOND( _rxController.is(),
"FmTextControlShell::startControllerListening: invalid controller!" );
1054 if ( !_rxController.is() )
1057 OSL_PRECOND( !
isControllerListening(),
"FmTextControlShell::startControllerListening: already listening!" );
1064 const Sequence< Reference< css::awt::XControl > > aControls( _rxController->getControls() );
1068 std::transform(aControls.begin(), aControls.end(), std::back_inserter(
m_aControlObservers),
1070 return FocusListenerAdapter( new FmFocusListenerAdapter( rControl, this ) ); });
1083 OSL_PRECOND(
isControllerListening(),
"FmTextControlShell::stopControllerListening: inconsistence!" );
1088 rpObserver->dispose();
1102 rFeature.second->dispose();
1115 SAL_INFO(
"svx.form",
"stopping timer for clipboard invalidation" );
1144#if OSL_DEBUG_LEVEL > 0
1146 Sequence< Reference< css::awt::XControl > > aActiveControls;
1150 bool bFoundThisControl =
false;
1152 const Reference< css::awt::XControl >* pControls = aActiveControls.getConstArray();
1153 const Reference< css::awt::XControl >* pControlsEnd = pControls + aActiveControls.getLength();
1154 for ( ; ( pControls != pControlsEnd ) && !bFoundThisControl; ++pControls )
1156 if ( *pControls == _rxControl )
1157 bFoundThisControl =
true;
1159 DBG_ASSERT( bFoundThisControl,
"FmTextControlShell::controlActivated: only controls which belong to the active controller can be activated!" );
1180 SAL_INFO(
"svx.form",
"starting timer for clipboard invalidation" );
1216 Reference< XDispatchProvider > xProvider( _rxControl, UNO_QUERY );
1218 DBG_ASSERT( pApplication,
"FmTextControlShell::fillFeatureDispatchers: no SfxApplication!" );
1219 if ( xProvider.is() && pApplication )
1221 SfxSlotId* pSlots = _pZeroTerminatedSlots;
1226 _rDispatchers.emplace( *pSlots, pDispatcher );
1236 OSL_PRECOND( _rxProvider.is() && _pApplication,
"FmTextControlShell::implGetFeatureDispatcher: invalid arg(s)!" );
1238 aFeatureURL.Complete = lcl_getUnoSlotName( _nSlot );
1243 m_xURLTransformer = util::URLTransformer::create( ::comphelper::getProcessComponentContext() );
1252 Reference< XDispatch > xDispatcher = _rxProvider->queryDispatch( aFeatureURL, OUString(), 0xFF );
1253 if ( xDispatcher.is() )
1270 Reference< css::awt::XControl > xControl( _rEvent.Source, UNO_QUERY );
1272#if OSL_DEBUG_LEVEL > 0
1273 SAL_INFO(
"svx.form",
"0x" << OUString::number(
reinterpret_cast<sal_IntPtr
>(xControl.get()), 16 ));
1276 DBG_ASSERT( xControl.is(),
"FmTextControlShell::focusGained: suspicious focus event!" );
1277 if ( xControl.is() )
1284 Reference< css::awt::XControl > xControl( _rEvent.Source, UNO_QUERY );
1286#if OSL_DEBUG_LEVEL > 0
1287 SAL_INFO(
"svx.form",
"0x" << OUString::number(
reinterpret_cast<sal_IntPtr
>(xControl.get()), 16 ));
SfxApplication * SfxGetpApp()
static rtl::Reference< SfxItemPool > CreatePool()
void Update(sal_uInt16 nId)
SfxDispatcher * GetDispatcher() const
void Invalidate(sal_uInt16 nId)
void ExecutePopup(const OUString &rResName, vcl::Window *pWin=nullptr, const Point *pPos=nullptr)
sal_uInt16 GetWhich(sal_uInt16 nSlot, bool bDeep=true) const
bool IsInRange(sal_uInt16 nWhich) const
SfxItemPool * GetPool() const
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
const SfxPoolItem * GetItem(sal_uInt16 nWhich, bool bSearchInParent=true) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
void DisableItem(sal_uInt16 nWhich)
void InvalidateItem(sal_uInt16 nWhich)
sal_uInt16 GetSlot() const
const SfxItemSet * GetArgs() const
weld::Window * GetFrameWeld() const
void Done(bool bRemove=false)
const SfxPoolItem * GetItem(sal_uInt16 nSlotId) const
static SfxSlotPool & GetSlotPool(SfxViewFrame *pFrame=nullptr)
const SfxSlot * GetSlot(sal_uInt16 nId) const
SFX2_DLLPUBLIC OUString GetCommand() const
virtual SfxObjectShell * GetObjectShell() override
static bool IsCTLFontEnabled()
FontStrikeout GetStrikeout() const
FontLineStyle GetLineStyle() const
void SetTimeout(sal_uInt64 nTimeoutMs)
void SetInvokeHandler(const Link< Timer *, void > &rLink)
virtual void Start(bool bStartTimer=true) override
static TransferableDataHelper CreateFromSystemClipboard(vcl::Window *pWindow)
bool HasFormat(SotClipboardFormatId nFormat) const
static vcl::Window * GetWindow(const css::uno::Reference< css::awt::XWindow > &rxWindow)
static SVT_DLLPUBLIC bool PasteString(OUString &_rContent, vcl::Window *_pWindow)
static SVT_DLLPUBLIC void CopyString(const OUString &_rContent, vcl::Window *_pWindow)
FmFocusListenerAdapter(const Reference< css::awt::XControl > &_rxControl, IFocusObserver *_pObserver)
virtual void SAL_CALL focusGained(const css::awt::FocusEvent &e) override
virtual void SAL_CALL disposing(const EventObject &Source) override
IFocusObserver * m_pObserver
virtual void SAL_CALL focusLost(const css::awt::FocusEvent &e) override
virtual ~FmFocusListenerAdapter() override
Reference< css::awt::XWindow > m_xWindow
virtual void SAL_CALL mouseExited(const css::awt::MouseEvent &e) override
virtual void SAL_CALL mousePressed(const css::awt::MouseEvent &e) override
IContextRequestObserver * m_pObserver
virtual ~FmMouseListenerAdapter() override
virtual void SAL_CALL mouseReleased(const css::awt::MouseEvent &e) override
Reference< css::awt::XWindow > m_xWindow
virtual void SAL_CALL mouseEntered(const css::awt::MouseEvent &e) override
FmMouseListenerAdapter(const Reference< css::awt::XControl > &_rxControl, IContextRequestObserver *_pObserver)
virtual void SAL_CALL disposing(const EventObject &Source) override
ControlFeatures m_aControlFeatures
void controlDeactivated()
to be called when the currently active control has been deactivated
css::uno::Reference< css::awt::XTextComponent > m_xActiveTextComponent
SfxBindings & m_rBindings
::std::map< SfxSlotId, ControlFeature > ControlFeatures
Link< LinkParamNone *, void > m_aControlActivationHandler
AutoTimer m_aClipboardInvalidation
void stopControllerListening()
stops listening at the active controller @precond we have an active controller currently
void GetTextAttributeState(SfxItemSet &_rSet)
void ExecuteTextAttribute(SfxRequest &_rReq)
void Invalidate(SfxSlotId _nSlot)
static void transferFeatureStatesToItemSet(ControlFeatures &_rDispatchers, SfxAllItemSet &_rSet, bool _bTranslateLatin)
creates SfxPoolItes for all features in the given set, and puts them into the given SfxAllItemSet
bool m_bNeedClipboardInvalidation
void implClearActiveControlRef()
css::uno::Reference< css::form::runtime::XFormController > m_xActiveController
::std::vector< FocusListenerAdapter > FocusListenerAdapters
void controlActivated(const css::uno::Reference< css::awt::XControl > &_rxControl)
to be called when a control has been activated
css::uno::Reference< css::util::XURLTransformer > m_xURLTransformer
void designModeChanged()
notifies the instance that the design mode has changed
SfxViewFrame * m_pViewFrame
bool IsActiveControl(bool _bCountRichTextOnly=false) const
void formActivated(const css::uno::Reference< css::form::runtime::XFormController > &_rxController)
to be called when a form in our document has been activated
bool m_bActiveControlIsRichText
MouseListenerAdapter m_aContextMenuObserver
void startControllerListening(const css::uno::Reference< css::form::runtime::XFormController > &_rxController)
starts listening at all controls of the given controller for focus events @precond we don't have an a...
FocusListenerAdapters m_aControlObservers
void ForgetActiveControl()
virtual ~FmTextControlShell()
FmTextControlShell(SfxViewFrame *_pFrame)
virtual void focusGained(const css::awt::FocusEvent &_rEvent) override
css::uno::Reference< css::awt::XControl > m_xActiveControl
virtual void focusLost(const css::awt::FocusEvent &_rEvent) override
virtual void contextMenuRequested() override
void executeAttributeDialog(AttributeSet _eSet, SfxRequest &_rReq)
bool m_bActiveControlIsReadOnly
rtl::Reference< FmTextControlFeature > implGetFeatureDispatcher(const css::uno::Reference< css::frame::XDispatchProvider > &_rxProvider, SfxApplication const *_pApplication, SfxSlotId _nSlot)
void fillFeatureDispatchers(const css::uno::Reference< css::awt::XControl > &_rxControl, SfxSlotId *_pZeroTerminatedSlots, ControlFeatures &_rDispatchers)
void executeClipboardSlot(SfxSlotId _nSlot)
bool isControllerListening() const
void formDeactivated(const css::uno::Reference< css::form::runtime::XFormController > &_rxController)
to be called when a form in our document has been deactivated
rtl::Reference< FmMouseListenerAdapter > MouseListenerAdapter
virtual void contextMenuRequested()=0
virtual void focusGained(const css::awt::FocusEvent &_rEvent)=0
virtual void focusLost(const css::awt::FocusEvent &_rEvent)=0
#define DBG_ASSERT(sCon, aError)
#define DBG_UNHANDLED_EXCEPTION(...)
virtual SfxBindings & GetBindings() override
constexpr OUStringLiteral FM_PROP_READONLY
Sequence< PropertyValue > aArguments
#define LINK(Instance, Class, Member)
#define SAL_WARN_IF(condition, area, stream)
#define SAL_WARN(area, stream)
#define SAL_INFO(area, stream)
css::beans::PropertyValue makePropertyValue(const OUString &rName, T &&rValue)
OString OUStringToOString(std::u16string_view str, ConnectionSettings const *settings)
static SfxSlotId pDialogSlots[]
static SfxSlotId pTextControlSlots[]
::cppu::WeakImplHelper< css::awt::XMouseListener > FmMouseListenerAdapter_Base
::cppu::WeakImplHelper< css::awt::XFocusListener > FmFocusListenerAdapter_Base
IMPL_LINK_NOARG(SuggestionDisplay, SelectSuggestionValueSetHdl, ValueSet *, void)
SFX2_DLLPUBLIC void TransformParameters(sal_uInt16 nSlotId, const css::uno::Sequence< css::beans::PropertyValue > &seqArgs, SfxAllItemSet &aSet, const SfxSlot *pSlot=nullptr)
SFX2_DLLPUBLIC void TransformItems(sal_uInt16 nSlotId, const SfxItemSet &aSet, css::uno::Sequence< css::beans::PropertyValue > &seqArgs, const SfxSlot *pSlot=nullptr)