31#include <svx/svxids.hrc>
34#include <osl/diagnose.h>
40#include <drawview.hxx>
44#define SC_MAXDRAGMOVE 3
50 rBindings.
Invalidate( SID_ATTR_CHAR_UNDERLINE );
55 rBindings.
Invalidate( SID_ATTR_CHAR_OVERLINE );
57 rBindings.
Invalidate( SID_ATTR_CHAR_BACK_COLOR );
59 rBindings.
Invalidate( SID_ATTR_CHAR_FONTHEIGHT );
60 rBindings.
Invalidate( SID_ATTR_PARA_ADJUST_LEFT );
61 rBindings.
Invalidate( SID_ATTR_PARA_ADJUST_RIGHT );
62 rBindings.
Invalidate( SID_ATTR_PARA_ADJUST_BLOCK );
63 rBindings.
Invalidate( SID_ATTR_PARA_ADJUST_CENTER);
68 rBindings.
Invalidate( SID_ATTR_PARA_LINESPACE_10 );
69 rBindings.
Invalidate( SID_ATTR_PARA_LINESPACE_15 );
70 rBindings.
Invalidate( SID_ATTR_PARA_LINESPACE_20 );
74 rBindings.
Invalidate( SID_TEXTDIRECTION_LEFT_TO_RIGHT );
75 rBindings.
Invalidate( SID_TEXTDIRECTION_TOP_TO_BOTTOM );
76 rBindings.
Invalidate( SID_ATTR_PARA_LEFT_TO_RIGHT );
77 rBindings.
Invalidate( SID_ATTR_PARA_RIGHT_TO_LEFT );
85 rBindings.
Invalidate( SID_ALIGN_ANY_JUSTIFIED );
89 rBindings.
Invalidate( SID_ATTR_CHAR_STRIKEOUT );
90 rBindings.
Invalidate( SID_ATTR_CHAR_SHADOWED );
117 bool bStraightEnter =
true;
129 bStraightEnter =
false;
136 bStraightEnter =
false;
191 bool bVertical = ( nSlotID == SID_DRAW_TEXT_VERTICAL );
195 pO->SetVertical( bVertical );
198 auto pOTemp = pO.get();
219 if(pHdl->
GetKind() != SdrHdlKind::Poly && pHdl->
GetKind() != SdrHdlKind::Circle)
412 bool bVertical = (SID_DRAW_TEXT_VERTICAL == nSlotID);
423 pText->SetVerticalWriting(
true);
430 pText->SetMergedItemSet(aSet);
444 rDisp.
Execute(SID_OBJECT_SELECT, SfxCallMode::SLOT | SfxCallMode::RECORD);
464 rDisp.
Execute(SID_OBJECT_SELECT, SfxCallMode::SLOT | SfxCallMode::RECORD);
483 bool bReturn =
false;
534 bool bCursorToEnd,
const KeyEvent* pInitialKey)
557 if (!(nSdrObjKind == SdrObjKind::Text ||
558 nSdrObjKind == SdrObjKind::TitleText ||
559 nSdrObjKind == SdrObjKind::OutlineText ||
575 bool bVertical = ( nSlotID == SID_DRAW_TEXT_VERTICAL );
579 pO->SetVertical( bVertical );
582 auto pOTemp = pO.get();
599 if ( !(pMousePixel || bCursorToEnd || pInitialKey) )
612 else if ( bCursorToEnd )
639 pText->SetLogicRect(rRectangle);
645 bool bVertical = (SID_DRAW_TEXT_VERTICAL == nID);
646 bool bMarquee = (SID_DRAW_TEXT_MARQUEE == nID);
648 pText->SetVerticalWriting(bVertical);
659 pText->SetMergedItemSet(aSet);
673 pObj->SetMergedItemSetAndBroadcast(aSet);
680 OSL_FAIL(
"Object is NO text object");
virtual bool BegDragObj(const Point &rPnt, OutputDevice *pOut, SdrHdl *pHdl, short nMinMov=-3, SdrDragMethod *pForcedMeth=nullptr) override
virtual void MovAction(const Point &rPnt) override
virtual bool KeyInput(const KeyEvent &rKEvt) override
bool IsEditingANote() const
bool IsSizingOrMovingNote(const MouseEvent &rMEvt) const
void SetMouseButtonCode(sal_uInt16 nNew)
void ForceScroll(const Point &aPixPos)
virtual void Deactivate()
ScTabViewShell & rViewShell
VclPtr< vcl::Window > pWindow
virtual void Activate() override
virtual ~FuText() override
virtual bool MouseMove(const MouseEvent &rMEvt) override
virtual bool MouseButtonDown(const MouseEvent &rMEvt) override
virtual rtl::Reference< SdrObject > CreateDefaultObject(const sal_uInt16 nID, const tools::Rectangle &rRectangle) override
void SetInEditMode(SdrObject *pObj=nullptr, const Point *pMousePixel=nullptr, bool bCursorToEnd=false, const KeyEvent *pInitialKey=nullptr)
FuText(ScTabViewShell &rViewSh, vcl::Window *pWin, ScDrawView *pView, SdrModel *pDoc, const SfxRequest &rReq)
std::unique_ptr< SdrOutliner > MakeOutliner()
virtual bool KeyInput(const KeyEvent &rKEvt) override
virtual bool MouseButtonUp(const MouseEvent &rMEvt) override
virtual void ForcePointer(const MouseEvent *pMEvt) override
virtual void Deactivate() override
static css::uno::Reference< css::linguistic2::XHyphenator > GetHyphenator()
sal_uInt16 GetClicks() const
sal_uInt16 GetButtons() const
const Point & GetPosPixel() const
bool IsEffectivelyVertical() const
void SetSelection(const ESelection &)
bool MouseButtonUp(const MouseEvent &)
bool PostKeyEvent(const KeyEvent &rKEvt, vcl::Window const *pFrameWin=nullptr)
bool MouseButtonDown(const MouseEvent &)
void SetHyphenator(css::uno::Reference< css::linguistic2::XHyphenator > const &xHyph)
constexpr tools::Long Y() const
constexpr tools::Long X() const
static bool IsNoteCaption(SdrObject *pObj)
Returns true, if the passed object is the caption of a cell note.
virtual bool SdrBeginTextEdit(SdrObject *pObj, SdrPageView *pPV=nullptr, vcl::Window *pWin=nullptr, bool bIsNewObj=false, SdrOutliner *pGivenOutliner=nullptr, OutlinerView *pGivenOutlinerView=nullptr, bool bDontDeleteOutliner=false, bool bOnlyOneView=false, bool bGrabFocus=true) override
void UnlockInternalLayer()
Unlocks the internal layer that contains caption objects of cell notes.
void SetDrawTextUndo(SfxUndoManager *pUndoMgr)
ScViewData & GetViewData()
void UpdateCopySourceOverlay()
void SetActivePointer(PointerStyle nPointer)
SfxDispatcher & GetDispatcher()
void SetPasteMode(ScPasteFlags nFlags)
bool BegCreateObj(const Point &rPnt, OutputDevice *pOut=nullptr, short nMinMov=-3)
void SetEditMode(SdrViewEditMode eMode)
bool EndCreateObj(SdrCreateCmd eCmd)
SdrInventor GetCurrentObjInventor() const
SdrObjKind GetCurrentObjIdentifier() const
void SetCreateMode(bool bOn=true)
virtual bool IsAction() const override
void SetCurrentObj(SdrObjKind nIdent, SdrInventor nInvent=SdrInventor::Default)
virtual void EndAction() override
bool EndDragObj(bool bCopy=false)
void ForceMarkedToAnotherPage()
SdrHdlKind GetKind() const
size_t GetMarkCount() const
SdrMark * GetMark(size_t nNum) const
void SetDragMode(SdrDragMode eMode)
SdrHdl * PickHandle(const Point &rPnt) const
const SdrMarkList & GetMarkedObjectList() const
bool AreObjectsMarked() const
void BegMarkObj(const Point &rPnt, bool bUnmark=false)
bool BegMarkPoints(const Point &rPnt, bool bUnmark=false)
SdrObject * PickObj(const Point &rPnt, short nTol, SdrPageView *&rpPV, SdrSearchOptions nOptions, SdrObject **ppRootObj, bool *pbHitPassDirect=nullptr) const
size_t GetHdlNum(SdrHdl const *pHdl) const
virtual bool MarkPoint(SdrHdl &rHdl, bool bUnmark=false)
bool IsPointMarkable(const SdrHdl &rHdl) const
void UnmarkAllObj(SdrPageView const *pPV=nullptr)
virtual bool HasMarkablePoints() const
SdrHdl * GetHdl(size_t nHdlNum) const
bool IsMarkedHit(const Point &rPnt, short nTol=-2) const
bool UnmarkPoint(SdrHdl &rHdl)
bool MarkObj(const Point &rPnt, short nTol=-2, bool bToggle=false, bool bDeep=false)
bool IsPointMarked(const SdrHdl &rHdl) const
SdrObject * GetMarkedSdrObj() const
const SfxItemPool & GetItemPool() const
const OutlinerView * GetTextEditOutlinerView() const
virtual bool IsTextEdit() const final override
static rtl::Reference< SdrObject > MakeNewObject(SdrModel &rSdrModel, SdrInventor nInventor, SdrObjKind nObjIdentifier, const tools::Rectangle *pSnapRect=nullptr)
const SfxPoolItem & GetMergedItem(const sal_uInt16 nWhich) const
virtual OutlinerParaObject * GetOutlinerParaObject() const
virtual bool HasTextEdit() const
void SetMergedItemSetAndBroadcast(const SfxItemSet &rSet, bool bClearAllItems=false)
virtual SdrObjKind GetObjIdentifier() const
virtual SdrLayerID GetLayer() const
SdrPageView * GetSdrPageView() const
sal_uInt16 getHitTolLog() const
virtual bool MouseButtonUp(const MouseEvent &rMEvt, OutputDevice *pWin) override
PointerStyle GetPreferredPointer(const Point &rMousePos, const OutputDevice *pOut, sal_uInt16 nModifier=0, bool bLeftDown=false) const
virtual bool MouseMove(const MouseEvent &rMEvt, OutputDevice *pWin) override
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)
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
sal_uInt16 GetSlot() const
SfxBindings & GetBindings()
SfxViewFrame & GetViewFrame() const
virtual void Start(bool bStartTimer=true) override
ESelection aNewSelection(GetSelection())
#define EE_PARA_NOT_FOUND
#define EE_INDEX_NOT_FOUND
constexpr TypedWhichId< SfxBoolItem > EE_PARA_HYPHENATE(EE_PARA_START+6)
static void lcl_UpdateHyphenator(Outliner &rOutliner, const SdrObject *pObj)
static void lcl_InvalidateAttribs(SfxBindings &rBindings)
#define SC_MAXDRAGMOVE
fusel,fuconstr,futext - combined!
constexpr SdrLayerID SC_LAYER_INTERN(2)
SdrOnOffItem makeSdrTextAutoGrowHeightItem(bool bAuto)
SdrOnOffItem makeSdrTextAutoGrowWidthItem(bool bAuto)
SVXCORE_DLLPUBLIC SdrTextObj * DynCastSdrTextObj(SdrObject *)