45#include <osl/diagnose.h>
54#define ShellClass_SwDrawShell
65 GetStaticInterface()->RegisterPopupMenu(
"draw");
67 GetStaticInterface()->RegisterObjectBar(
SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, ToolbarId::Draw_Toolbox_Sw);
69 GetStaticInterface()->RegisterChildWindow(SvxFontWorkChildWindow::GetChildWindowId());
129 const bool bAsLink(aDlg.
IsAsLink());
138 pNewGrafObj->SetGraphic(aGraphic);
146 pNewGrafObj->SetGraphicLink(
147 bAsLink ? aDlg.
GetPath() : OUString());
149 pResult = pNewGrafObj.get();
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)
211 const sal_uLong newPosX = newPosXTwips->GetValue();
212 const sal_uLong newPosY = newPosYTwips->GetValue();
213 const Point mPoint(newPosX, newPosY);
220 if (handle->
GetKind() == SdrHdlKind::Anchor || handle->
GetKind() == SdrHdlKind::Anchor_TR)
226 pSdrView->
MoveShapeHandle(handleNum, mPoint, OrdNum ? OrdNum->GetValue() : -1);
230 case SID_BEZIER_EDIT:
238 GetView().AttrChangedNotify(
nullptr);
241 case SID_OBJECT_HELL:
252 case SID_OBJECT_HEAVEN:
283 case SID_FLIP_VERTICAL:
286 case SID_FLIP_HORIZONTAL:
297 rVFrame.
SetChildWindow(SvxFontWorkChildWindow::GetChildWindowId(),
316 case SID_OPEN_XML_FILTERSETTINGS:
326 case SID_EXTRUSION_TOGGLE:
327 case SID_EXTRUSION_TILT_DOWN:
328 case SID_EXTRUSION_TILT_UP:
329 case SID_EXTRUSION_TILT_LEFT:
330 case SID_EXTRUSION_TILT_RIGHT:
331 case SID_EXTRUSION_3D_COLOR:
332 case SID_EXTRUSION_DEPTH:
333 case SID_EXTRUSION_DIRECTION:
334 case SID_EXTRUSION_PROJECTION:
335 case SID_EXTRUSION_LIGHTING_DIRECTION:
336 case SID_EXTRUSION_LIGHTING_INTENSITY:
337 case SID_EXTRUSION_SURFACE:
338 case SID_EXTRUSION_DEPTH_FLOATER:
339 case SID_EXTRUSION_DIRECTION_FLOATER:
340 case SID_EXTRUSION_LIGHTING_FLOATER:
341 case SID_EXTRUSION_SURFACE_FLOATER:
342 case SID_EXTRUSION_DEPTH_DIALOG:
347 case SID_FONTWORK_SHAPE:
348 case SID_FONTWORK_SHAPE_TYPE:
349 case SID_FONTWORK_ALIGNMENT:
350 case SID_FONTWORK_SAME_LETTER_HEIGHTS:
351 case SID_FONTWORK_CHARACTER_SPACING:
352 case SID_FONTWORK_KERN_CHARACTER_PAIRS:
353 case SID_FONTWORK_CHARACTER_SPACING_FLOATER:
354 case SID_FONTWORK_ALIGNMENT_FLOATER:
355 case SID_FONTWORK_CHARACTER_SPACING_DIALOG:
360 case SID_INSERT_GRAPHIC:
395 OSL_ENSURE(
false,
"wrong dispatcher");
419 case SID_OBJECT_HELL:
424 case SID_OBJECT_HEAVEN:
434 case SID_OBJECT_ROTATE:
444 case SID_BEZIER_EDIT:
449 case SID_FLIP_VERTICAL:
462 case SID_FLIP_HORIZONTAL:
481 const sal_uInt16
nId = SvxFontWorkChildWindow::GetChildWindowId();
487 case SID_INSERT_GRAPHIC:
501 bool bDisable =
true;
513 bDisable = pAny->get<OUString>().startsWith(
"fontwork-");
524 bool bDisable =
true;
578 GetView().AttrChangedNotify(
nullptr);
603 const bool bDeactivate(
sal_uInt32 GetValue() const
css::uno::Any * GetPropertyValueByName(const OUString &rPropName)
void ReplaceObjectAtView(SdrObject *pOldObj, SdrPageView &rPV, SdrObject *pNewObj, bool bMark=true)
void AddUndo(std::unique_ptr< SdrUndoAction > pUndo)
bool IsRotateAllowed(bool b90Deg=false) const
bool IsMirrorAllowed(bool b45Deg=false, bool b90Deg=false) const
SdrHdl * GetHdl(size_t nNum) const
SdrHdlKind GetKind() const
size_t GetMarkCount() const
SdrMark * GetMark(size_t nNum) const
void SetFrameDragSingles(bool bOn=true)
const SdrMarkList & GetMarkedObjectList() const
SdrObject * GetMarkedObjectByIndex(size_t nNum) const
const SdrHdlList & GetHdlList() const
size_t GetMarkedObjectCount() const
bool MarkObj(const Point &rPnt, short nTol=-2, bool bToggle=false, bool bDeep=false)
SdrObject * GetMarkedSdrObj() const
virtual void SetChanged(bool bFlg=true)
const SfxItemPool & GetItemPool() const
virtual SdrEndTextEditKind SdrEndTextEdit(bool bDontDeleteReally=false)
virtual void ModelHasChanged() override
virtual bool IsTextEdit() const final override
static rtl::Reference< T > Clone(T const &rObj, SdrModel &rTargetModel)
void SetMergedItemSetAndBroadcast(const SfxItemSet &rSet, bool bClearAllItems=false)
SdrPageView * GetSdrPageView() const
SdrModel & GetModel() const
virtual bool HasText() const override
bool SetAttributes(const SfxItemSet &rSet, bool bReplaceAll=false)
bool MoveShapeHandle(const sal_uInt32 handleNum, const Point &aEndPoint, const sal_Int32 aObjectOrdNum=-1)
void GetAttributes(SfxItemSet &rTargetSet, bool bOnlyHardAttr=false) const
void Invalidate(sal_uInt16 nId)
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
void DisableItem(sal_uInt16 nWhich)
sal_uInt16 GetSlot() const
const SfxItemSet * GetArgs() const
const T * GetArg(sal_uInt16 nSlotId) const
void Done(bool bRemove=false)
SfxItemPool & GetPool() const
void SetContextName(const OUString &rsContextName)
static void HandleOpenXmlFilterSettings(SfxRequest &)
void SetName(const OUString &rName)
void ToggleChildWindow(sal_uInt16)
SfxBindings & GetBindings()
void SetChildWindow(sal_uInt16 nId, bool bVisible, bool bSetFocus=true)
SfxViewFrame & GetViewFrame() const
ErrCode GetGraphic(Graphic &) const
void SetWrapMode(sal_uInt16 nSlot)
bool Disable(SfxItemSet &rSet, sal_uInt16 nWhich=0)
SdrObject * IsSingleFillableNonOLESelected()
void GetState(SfxItemSet &)
void ExecFormText(SfxRequest const &rReq)
SwDrawShell(SwView &rView)
void InsertPictureFromFile(SdrObject &rObject)
void GetFormTextState(SfxItemSet &rSet)
void Execute(SfxRequest &)
SwUndoId StartUndo(SwUndoId eUndoId=SwUndoId::EMPTY, const SwRewriter *pRewriter=nullptr)
Undo: set up Undo parenthesis, return nUndoId of this parenthesis.
SwUndoId EndUndo(SwUndoId eUndoId=SwUndoId::EMPTY, const SwRewriter *pRewriter=nullptr)
Closes parenthesis of nUndoId, not used by UI.
void SelectionToHell()
Below document.
FlyProtectFlags IsSelObjProtected(FlyProtectFlags eType) const
Which Protection is set at selected object?
void SelectionToHeaven()
Above document.
Point FindAnchorPos(const Point &rAbsPos, bool bMoveIt=false)
void SetDragMode(SdrDragMode eSdrDragMode)
Set DragMode (e.g. Rotate), but do nothing when frame is selected.
void MirrorSelection(bool bHorizontal)
Vertical if FALSE.
SdrLayerID GetLayerId() const
1 Heaven, 0 Hell, SDRLAYER_NOTFOUND Ambiguous.
size_t IsObjSelected() const
static void create(SwFrameFormat *pShape, SdrObject *pObject, bool bCopyText=false)
Create a TextBox for a shape.
static bool isTextBox(const SwFrameFormat *pFormat, sal_uInt16 nType, const SdrObject *pObject=nullptr)
Is the frame format a text box?
static void destroy(const SwFrameFormat *pShape, const SdrObject *pObject)
Destroy a TextBox for a shape.
SdrView * GetDrawViewWithValidMarkList()
void ExecNumberingOutline(SfxItemPool &)
void UpdateWordCount(SfxShell *, sal_uInt16)
void ExecFormatFootnote()
bool IsDrawRotate() const
Used by the UI to modify the document model.
const SwView & GetView() const
static void execute(SdrView *pSdrView, SfxRequest const &rReq, SfxBindings &rBindings)
static void getState(SdrView const *pSdrView, SfxItemSet &rSet)
static void getState(SdrView const *pSdrView, SfxItemSet &rSet)
static void execute(SdrView &rSdrView, SfxRequest const &rReq, SfxBindings &rBindings)
static const OUString & GetContextName(const Context eContext)
#define FN_FRAME_WRAPTHRU_TRANSP
#define FN_FORMAT_FOOTNOTE_DLG
#define FN_TOOL_HIERARCHIE
#define FN_NUMBERING_OUTLINE_DLG
#define FN_WORDCOUNT_DIALOG
#define FN_REMOVE_TEXT_BOX
#define FN_FRAME_WRAPTHRU
weld::Window * GetFrameWeld(const SfxFrame *pFrame)
@ Parent
Check only parents.
constexpr TypedWhichId< SwDrawFrameFormat > RES_DRAWFRMFMT(165)
bool checkForSelectedFontWork(SdrView const *pSdrView)
#define SFX_OBJECTBAR_OBJECT
#define SFX_IMPL_INTERFACE(Class, SuperClass)
constexpr TypedWhichId< SdrCustomShapeGeometryItem > SDRATTR_CUSTOMSHAPE_GEOMETRY(SDRATTR_CUSTOMSHAPE_FIRST+2)
SVXCORE_DLLPUBLIC SdrTextObj * DynCastSdrTextObj(SdrObject *)
OUString SwResId(TranslateId aId)
constexpr TypedWhichId< XFormTextMirrorItem > XATTR_FORMTXTMIRROR(XATTR_TEXT_FIRST+4)
constexpr TypedWhichId< XFormTextStyleItem > XATTR_FORMTXTSTYLE(XATTR_TEXT_FIRST)
constexpr TypedWhichId< XFormTextStartItem > XATTR_FORMTXTSTART(XATTR_TEXT_FIRST+3)
constexpr TypedWhichId< XFormTextShadowYValItem > XATTR_FORMTXTSHDWYVAL(XATTR_TEXT_FIRST+9)
constexpr TypedWhichId< XFormTextHideFormItem > XATTR_FORMTXTHIDEFORM(XATTR_TEXT_FIRST+10)
constexpr TypedWhichId< XFormTextDistanceItem > XATTR_FORMTXTDISTANCE(XATTR_TEXT_FIRST+2)
constexpr TypedWhichId< XFormTextShadowItem > XATTR_FORMTXTSHADOW(XATTR_TEXT_FIRST+6)
constexpr TypedWhichId< XFormTextOutlineItem > XATTR_FORMTXTOUTLINE(XATTR_TEXT_FIRST+5)
constexpr TypedWhichId< XFormTextShadowXValItem > XATTR_FORMTXTSHDWXVAL(XATTR_TEXT_FIRST+8)
constexpr TypedWhichId< XFormTextShadowColorItem > XATTR_FORMTXTSHDWCOLOR(XATTR_TEXT_FIRST+7)
constexpr TypedWhichId< XFormTextAdjustItem > XATTR_FORMTXTADJUST(XATTR_TEXT_FIRST+1)