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>
98 std::shared_ptr<SwContentControl> pContentControl = rContentControl.
GetContentControl();
99 if (
IsFrameSelected() && pContentControl && pContentControl->GetPicture())
102 if (pContentControl->GetShowingPlaceHolder())
109 aJson.
put(
"action",
"change-picture");
110 std::unique_ptr<char, o3tl::free_delete> pJson(aJson.
extractData());
117 SfxCallMode::SYNCHRON);
119 pContentControl->SetShowingPlaceHolder(
false);
128 if (bRet && pContentControl && pContentControl->GetCheckbox())
134 if (pContentControl->GetChecked())
136 aOldState = pContentControl->GetCheckedState();
137 aNewState = pContentControl->GetUncheckedState();
141 aOldState = pContentControl->GetUncheckedState();
142 aNewState = pContentControl->GetCheckedState();
151 pContentControl->SetReadWrite(
true);
153 pContentControl->SetChecked(!pContentControl->GetChecked());
155 pContentControl->SetReadWrite(
false);
161 else if (bRet && pContentControl && pContentControl->GetSelectedListItem())
164 size_t nSelectedListItem = *pContentControl->GetSelectedListItem();
167 OUString aNewState = pContentControl->GetListItems()[nSelectedListItem].ToString();
176 pContentControl->SetSelectedListItem(std::nullopt);
183 else if (bRet && pContentControl && pContentControl->GetSelectedDate())
188 OUString aNewState = pContentControl->GetDateString();
196 pContentControl->SetCurrentDateValue(*pContentControl->GetSelectedDate());
197 pContentControl->SetSelectedDate(std::nullopt);
244 static sal_uInt16
const aInval[] =
246 SID_ATTR_FILL_STYLE, SID_ATTR_FILL_COLOR, SID_ATTR_LINE_STYLE,
247 SID_ATTR_LINE_WIDTH, SID_ATTR_LINE_COLOR,
259 GetView().AttrChangedNotify(
nullptr);
347 if (pUnoCtrl && SdrInventor::FmForm == pUnoCtrl->
GetObjInventor())
349 const uno::Reference< awt::XControlModel >& xControlModel = pUnoCtrl->
GetUnoControlModel();
351 OSL_ENSURE( xControlModel.is(),
"UNO-Control without Model" );
352 if( !xControlModel.is() )
355 uno::Reference< beans::XPropertySet > xPropSet(xControlModel, uno::UNO_QUERY);
359 uno::Reference< beans::XPropertySetInfo > xInfo = xPropSet->getPropertySetInfo();
360 if(xInfo->hasPropertyByName(
"ButtonType" ))
362 aTmp = xPropSet->getPropertyValue(
"ButtonType" );
363 form::FormButtonType eTmpButtonType;
364 aTmp >>= eTmpButtonType;
365 if( form::FormButtonType_URL == eTmpButtonType)
368 aTmp = xPropSet->getPropertyValue(
"Label" );
370 if( (aTmp >>= uTmp) && !uTmp.isEmpty())
376 aTmp = xPropSet->getPropertyValue(
"TargetURL" );
377 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.
virtual SwUndoId EndUndo(SwUndoId const eUndoId, SwRewriter const *const pRewriter)=0
Closes undo block.
virtual SwUndoId StartUndo(SwUndoId const eUndoId, SwRewriter const *const pRewriter)=0
Opens undo block.
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()
SfxViewFrame * GetViewFrame() const
virtual void libreOfficeKitViewCallback(int nType, const char *pPayload) const override
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.
std::shared_ptr< SwContentControl > GetContentControl()
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)
bool GotoContentControl(const SwFormatContentControl &rContentControl)
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 &)
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)