20#include <svx/svxids.hrc>
28#include <com/sun/star/form/FormButtonType.hpp>
29#include <com/sun/star/beans/XPropertySet.hpp>
30#include <osl/diagnose.h>
34#include <LibreOfficeKit/LibreOfficeKitEnums.h>
99 std::shared_ptr<SwContentControl> pContentControl = rContentControl.
GetContentControl();
100 if (
IsFrameSelected() && pContentControl && pContentControl->GetPicture())
103 if (pContentControl->GetShowingPlaceHolder())
110 aJson.
put(
"action",
"change-picture");
118 SfxCallMode::SYNCHRON);
120 pContentControl->SetShowingPlaceHolder(
false);
129 if (bRet && pContentControl && pContentControl->GetCheckbox())
135 if (pContentControl->GetChecked())
136 aNewState = bOnlyRefresh ? pContentControl->GetCheckedState()
137 : pContentControl->GetUncheckedState();
139 aNewState = bOnlyRefresh ? pContentControl->GetUncheckedState()
140 : pContentControl->GetCheckedState();
149 pContentControl->SetReadWrite(
true);
152 pContentControl->SetChecked(!pContentControl->GetChecked());
154 pContentControl->SetReadWrite(
false);
160 else if (bRet && pContentControl && pContentControl->GetSelectedListItem())
163 size_t nSelectedListItem = *pContentControl->GetSelectedListItem();
166 OUString aNewState = pContentControl->GetListItems()[nSelectedListItem].ToString();
174 pContentControl->SetReadWrite(
true);
176 pContentControl->SetSelectedListItem(std::nullopt);
178 pContentControl->SetReadWrite(
false);
184 else if (bRet && pContentControl && pContentControl->GetSelectedDate())
189 OUString aNewState = pContentControl->GetDateString();
197 pContentControl->SetCurrentDateValue(*pContentControl->GetSelectedDate());
198 pContentControl->SetSelectedDate(std::nullopt);
245 static sal_uInt16
const aInval[] =
247 SID_ATTR_FILL_STYLE, SID_ATTR_FILL_COLOR, SID_ATTR_LINE_STYLE,
248 SID_ATTR_LINE_WIDTH, SID_ATTR_LINE_COLOR,
260 GetView().AttrChangedNotify(
nullptr);
348 if (pUnoCtrl && SdrInventor::FmForm == pUnoCtrl->
GetObjInventor())
350 const uno::Reference< awt::XControlModel >& xControlModel = pUnoCtrl->
GetUnoControlModel();
352 OSL_ENSURE( xControlModel.is(),
"UNO-Control without Model" );
353 if( !xControlModel.is() )
356 uno::Reference< beans::XPropertySet > xPropSet(xControlModel, uno::UNO_QUERY);
360 uno::Reference< beans::XPropertySetInfo > xInfo = xPropSet->getPropertySetInfo();
361 if(xInfo->hasPropertyByName(
"ButtonType" ))
363 aTmp = xPropSet->getPropertyValue(
"ButtonType" );
364 form::FormButtonType eTmpButtonType;
365 aTmp >>= eTmpButtonType;
366 if( form::FormButtonType_URL == eTmpButtonType)
369 aTmp = xPropSet->getPropertyValue(
"Label" );
371 if( (aTmp >>= uTmp) && !uTmp.isEmpty())
377 aTmp = xPropSet->getPropertyValue(
"TargetURL" );
378 if( (aTmp >>= uTmp) && !uTmp.isEmpty())
wrapper iterator: wraps iterator of implementation while hiding MarkBase class; only IMark instances ...
virtual const_iterator_t findMark(const OUString &rMark) const =0
Finds a mark by name.
SdrMark * GetMark(size_t nNum) const
const SdrMarkList & GetMarkedObjectList() const
SdrObject * GetMarkedSdrObj() const
virtual SdrInventor GetObjInventor() const
const css::uno::Reference< css::awt::XControlModel > & GetUnoControlModel() const
void Invalidate(sal_uInt16 nId)
const SfxPoolItem * Execute(sal_uInt16 nSlot, SfxCallMode nCall=SfxCallMode::SLOT, const SfxPoolItem **pArgs=nullptr, sal_uInt16 nModi=0, const SfxPoolItem **pInternalArgs=nullptr)
SfxBindings & GetBindings()
SfxDispatcher * GetDispatcher()
virtual void libreOfficeKitViewCallback(int nType, const OString &pPayload) const override
SfxViewFrame & GetViewFrame() const
static void SetSearchLabel(const SearchLabel &rSL)
OUString GetCursorDescr() const
Returns textual description of the current selection.
bool IsMacroExecAllowed() const
bool GotoFieldmark(const ::sw::mark::IFieldmark *const pMark)
bool GotoMark(const ::sw::mark::IMark *const pMark)
bool GotoFormatField(const SwFormatField &rField)
bool GotoFormatContentControl(const SwFormatContentControl &rContentControl)
sal_uInt16 CallEvent(SvMacroItemId nEvent, const SwCallMouseEvent &rCallEvent, bool bChkPtr=false)
void ExecMacro(const SvxMacro &rMacro, OUString *pRet, SbxArray *pArgs)
bool IsFrameSelected() const
SfxPoolItem subclass that wraps an SwContentControl.
const std::shared_ptr< SwContentControl > & GetContentControl() const
void AddRule(SwUndoArg eWhat, const OUString &rWith)
const IDocumentMarkAccess * getIDocumentMarkAccess() const
Provides access to the document bookmark interface.
IDocumentUndoRedo const & GetIDocumentUndoRedo() const
Provides access to the document undo/redo interface.
SfxViewShell * GetSfxViewShell() const
bool IsSelFrameMode() const
SAL_DLLPRIVATE tools::Long SetCursorKillSel(const Point *, bool bProp)
void addCurrentPosition()
bool GotoFieldmark(::sw::mark::IFieldmark const *const pMark)
void GotoMark(const ::sw::mark::IMark *const pMark)
bool GetURLFromButton(OUString &rURL, OUString &rDescr) const
SAL_DLLPRIVATE bool MoveBookMark(BookMarkMove eFuncId, const ::sw::mark::IMark *const pMark=nullptr)
void Insert(const OUString &)
bool GotoContentControl(const SwFormatContentControl &rContentControl, bool bOnlyRefresh=false)
sal_uInt16 CallEvent(SvMacroItemId nEvent, const SwCallMouseEvent &rCallEvent, bool bCheckPtr=false)
void ExecMacro(const SvxMacro &rMacro, OUString *pRet=nullptr, SbxArray *pArgs=nullptr)
bool GotoField(const SwFormatField &rField)
virtual void DrawSelChanged() override
tools::Long ResetSelect(const Point *, bool)
const SwView & GetView() const
OUString SwResId(TranslateId aId)