45 #include <osl/diagnose.h>
50 #include <strings.hrc>
54 #define ShellClass_SwDrawShell
56 #include <swslots.hxx>
65 GetStaticInterface()->RegisterPopupMenu(
"draw");
67 GetStaticInterface()->RegisterObjectBar(
SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, ToolbarId::Draw_Toolbox_Sw);
69 GetStaticInterface()->RegisterChildWindow(SvxFontWorkChildWindow::GetChildWindowId());
101 if(dynamic_cast< SdrOle2Obj* >(pPickObj))
129 const bool bAsLink(aDlg.
IsAsLink());
134 if (
SdrGrafObj* pSdrGrafObj = dynamic_cast<SdrGrafObj*>(&rObject))
136 SdrGrafObj* pNewGrafObj(pSdrGrafObj->CloneSdrObject(pSdrGrafObj->getSdrModelFromSdrObject()));
147 bAsLink ? aDlg.
GetPath() : OUString());
149 pResult = pNewGrafObj;
153 pSdrView->
AddUndo(std::make_unique<SdrUndoAttrObj>(rObject));
177 sal_uInt16 nSlotId = rReq.
GetSlot();
190 case SID_OBJECT_ROTATE:
201 case SID_MOVE_SHAPE_HANDLE:
203 if (pArgs && pArgs->
Count() == 3)
210 const sal_uLong newPosX = newPosXTwips->GetValue();
211 const sal_uLong newPosY = newPosYTwips->GetValue();
216 case SID_BEZIER_EDIT:
224 GetView().AttrChangedNotify(
nullptr);
227 case SID_OBJECT_HELL:
238 case SID_OBJECT_HEAVEN:
269 case SID_FLIP_VERTICAL:
272 case SID_FLIP_HORIZONTAL:
283 pVFrame->
SetChildWindow(SvxFontWorkChildWindow::GetChildWindowId(),
284 static_cast<const SfxBoolItem&>((pArgs->
Get(SID_FONTWORK))).GetValue());
302 case SID_OPEN_XML_FILTERSETTINGS:
312 case SID_EXTRUSION_TOGGLE:
313 case SID_EXTRUSION_TILT_DOWN:
314 case SID_EXTRUSION_TILT_UP:
315 case SID_EXTRUSION_TILT_LEFT:
316 case SID_EXTRUSION_TILT_RIGHT:
317 case SID_EXTRUSION_3D_COLOR:
318 case SID_EXTRUSION_DEPTH:
319 case SID_EXTRUSION_DIRECTION:
320 case SID_EXTRUSION_PROJECTION:
321 case SID_EXTRUSION_LIGHTING_DIRECTION:
322 case SID_EXTRUSION_LIGHTING_INTENSITY:
323 case SID_EXTRUSION_SURFACE:
324 case SID_EXTRUSION_DEPTH_FLOATER:
325 case SID_EXTRUSION_DIRECTION_FLOATER:
326 case SID_EXTRUSION_LIGHTING_FLOATER:
327 case SID_EXTRUSION_SURFACE_FLOATER:
328 case SID_EXTRUSION_DEPTH_DIALOG:
333 case SID_FONTWORK_SHAPE:
334 case SID_FONTWORK_SHAPE_TYPE:
335 case SID_FONTWORK_ALIGNMENT:
336 case SID_FONTWORK_SAME_LETTER_HEIGHTS:
337 case SID_FONTWORK_CHARACTER_SPACING:
338 case SID_FONTWORK_KERN_CHARACTER_PAIRS:
339 case SID_FONTWORK_CHARACTER_SPACING_FLOATER:
340 case SID_FONTWORK_ALIGNMENT_FLOATER:
341 case SID_FONTWORK_CHARACTER_SPACING_DIALOG:
346 case SID_INSERT_GRAPHIC:
381 OSL_ENSURE(
false,
"wrong dispatcher");
405 case SID_OBJECT_HELL:
410 case SID_OBJECT_HEAVEN:
420 case SID_OBJECT_ROTATE:
430 case SID_BEZIER_EDIT:
435 case SID_FLIP_VERTICAL:
448 case SID_FLIP_HORIZONTAL:
467 const sal_uInt16
nId = SvxFontWorkChildWindow::GetChildWindowId();
473 case SID_INSERT_GRAPHIC:
487 bool bDisable =
true;
499 bDisable = pAny->get<OUString>().startsWith(
"fontwork-");
510 bool bDisable =
true;
539 sal_uInt32 nCheckStatus = 0;
564 GetView().AttrChangedNotify(
nullptr);
589 const bool bDeactivate(
SfxViewFrame * GetViewFrame() const
constexpr TypedWhichId< XFormTextHideFormItem > XATTR_FORMTXTHIDEFORM(XATTR_TEXT_FIRST+10)
static void execute(SdrView &rSdrView, SfxRequest const &rReq, SfxBindings &rBindings)
SwDrawShell(SwView &rView)
ErrCode GetGraphic(Graphic &) const
size_t GetMarkCount() const
virtual SdrEndTextEditKind SdrEndTextEdit(bool bDontDeleteReally=false)
#define SFX_IMPL_INTERFACE(Class, SuperClass)
void ReplaceObjectAtView(SdrObject *pOldObj, SdrPageView &rPV, SdrObject *pNewObj, bool bMark=true)
static void HandleOpenXmlFilterSettings(SfxRequest &)
static void destroy(SwFrameFormat *pShape)
Destroy a TextBox for a shape.
void MirrorSelection(bool bHorizontal)
Vertical if FALSE.
constexpr TypedWhichId< XFormTextOutlineItem > XATTR_FORMTXTOUTLINE(XATTR_TEXT_FIRST+5)
void SelectionToHeaven()
Above document.
void SetWrapMode(sal_uInt16 nSlot)
SwUndoId EndUndo(SwUndoId eUndoId=SwUndoId::EMPTY, const SwRewriter *pRewriter=nullptr)
Closes parenthesis of nUndoId, not used by UI.
bool checkForSelectedFontWork(SdrView const *pSdrView, sal_uInt32 &nCheckStatus)
void Done(bool bRemove=false)
SdrMark * GetMark(size_t nNum) const
void Execute(SfxRequest &)
void SetFrameDragSingles(bool bOn=true)
const SfxItemSet * GetArgs() const
void Invalidate(sal_uInt16 nId)
static void execute(SdrView *pSdrView, SfxRequest const &rReq, SfxBindings &rBindings)
virtual bool HasText() const override
constexpr TypedWhichId< XFormTextDistanceItem > XATTR_FORMTXTDISTANCE(XATTR_TEXT_FIRST+2)
Used by the UI to modify the document model.
void ToggleChildWindow(sal_uInt16)
void InsertPictureFromFile(SdrObject &rObject)
void UpdateWordCount(SfxShell *, sal_uInt16)
#define FN_REMOVE_TEXT_BOX
const SwView & GetView() const
constexpr TypedWhichId< SwDrawFrameFormat > RES_DRAWFRMFMT(159)
static void getState(SdrView const *pSdrView, SfxItemSet &rSet)
void SetGraphic(const Graphic &rGrf)
static bool isTextBox(const SwFrameFormat *pFormat, sal_uInt16 nType)
Is the frame format a text box?
bool MoveShapeHandle(const sal_uInt32 handleNum, const Point &aEndPoint)
bool IsRotateAllowed(bool b90Deg=false) const
virtual void SetChanged(bool bFlg=true)
constexpr TypedWhichId< XFormTextStyleItem > XATTR_FORMTXTSTYLE(XATTR_TEXT_FIRST)
SfxItemPool & GetPool() const
void GetFormTextState(SfxItemSet &rSet)
void SelectionToHell()
Below document.
void ExecFormText(SfxRequest const &rReq)
SdrObject * GetMarkedSdrObj() const
weld::Window * GetFrameWeld(const SfxFrame *pFrame)
void AddUndo(std::unique_ptr< SdrUndoAction > pUndo)
static void create(SwFrameFormat *pShape, bool bCopyText=false)
Create a TextBox for a shape.
#define FN_NUMBERING_OUTLINE_DLG
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
constexpr TypedWhichId< SdrCustomShapeGeometryItem > SDRATTR_CUSTOMSHAPE_GEOMETRY(SDRATTR_CUSTOMSHAPE_FIRST+2)
void GetState(SfxItemSet &)
size_t GetMarkedObjectCount() const
SfxBindings & GetBindings()
const SdrMarkList & GetMarkedObjectList() const
const T * GetArg(sal_uInt16 nSlotId) const
bool SetAttributes(const SfxItemSet &rSet, bool bReplaceAll=false)
SwUndoId StartUndo(SwUndoId eUndoId=SwUndoId::EMPTY, const SwRewriter *pRewriter=nullptr)
Undo: set up Undo parenthesis, return nUndoId of this parenthesis.
void SetMergedItemSetAndBroadcast(const SfxItemSet &rSet, bool bClearAllItems=false)
void ExecFormatFootnote()
static void getState(SdrView const *pSdrView, SfxItemSet &rSet)
bool IsDrawRotate() const
#define FN_WORDCOUNT_DIALOG
constexpr TypedWhichId< XFormTextShadowXValItem > XATTR_FORMTXTSHDWXVAL(XATTR_TEXT_FIRST+8)
OUString SwResId(const char *pId)
constexpr TypedWhichId< XFormTextShadowItem > XATTR_FORMTXTSHADOW(XATTR_TEXT_FIRST+6)
void SetName(const OUString &rName)
constexpr TypedWhichId< XFormTextAdjustItem > XATTR_FORMTXTADJUST(XATTR_TEXT_FIRST+1)
SdrObject * IsSingleFillableNonOLESelected()
#define FN_TOOL_HIERARCHIE
FlyProtectFlags IsSelObjProtected(FlyProtectFlags eType) const
Which Protection is set at selected object?
bool Disable(SfxItemSet &rSet, sal_uInt16 nWhich=0)
void SetGraphicLink(const OUString &rFileName)
#define SFX_OBJECTBAR_OBJECT
#define FN_FRAME_WRAPTHRU_TRANSP
SdrLayerID GetLayerId() const
1 Heaven, 0 Hell, SDRLAYER_NOTFOUND Ambiguous.
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
#define FN_FRAME_WRAPTHRU
sal_uInt16 GetSlot() const
static const OUString & GetContextName(const Context eContext)
constexpr TypedWhichId< XFormTextStartItem > XATTR_FORMTXTSTART(XATTR_TEXT_FIRST+3)
bool IsMirrorAllowed(bool b45Deg=false, bool b90Deg=false) const
virtual bool IsTextEdit() const final override
void DisableItem(sal_uInt16 nWhich)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
void ExecNumberingOutline(SfxItemPool &)
constexpr TypedWhichId< XFormTextShadowYValItem > XATTR_FORMTXTSHDWYVAL(XATTR_TEXT_FIRST+9)
SdrView * GetDrawViewWithValidMarkList()
void GetAttributes(SfxItemSet &rTargetSet, bool bOnlyHardAttr=false) const
void SetChildWindow(sal_uInt16 nId, bool bVisible, bool bSetFocus=true)
size_t IsObjSelected() const
SdrObject * GetMarkedObjectByIndex(size_t nNum) const
css::uno::Any * GetPropertyValueByName(const OUString &rPropName)
void SetDragMode(SdrDragMode eSdrDragMode)
Set DragMode (e.g. Rotate), but do nothing when frame is selected.
SdrPageView * GetSdrPageView() const
#define FN_FORMAT_FOOTNOTE_DLG
sal_uInt32 GetValue() const
const SfxItemPool & GetItemPool() const
bool MarkObj(const Point &rPnt, short nTol=-2, bool bToggle=false, bool bDeep=false)
constexpr TypedWhichId< XFormTextMirrorItem > XATTR_FORMTXTMIRROR(XATTR_TEXT_FIRST+4)
SdrModel * GetModel() const
void SetContextName(const OUString &rsContextName)
constexpr TypedWhichId< XFormTextShadowColorItem > XATTR_FORMTXTSHDWCOLOR(XATTR_TEXT_FIRST+7)