43#include <editeng/editeng.hxx>
46#include <com/sun/star/linguistic2/LinguServiceManager.hpp>
133 void addRange( SvxUnoTextRangeBase* pNewRange );
134 void removeRange( SvxUnoTextRangeBase* pOldRange );
159 mpModel (
pObject ? &
pObject->getSdrModelFromSdrObject() : nullptr ),
160 mbDataValid ( false ),
161 mbIsLocked ( false ),
162 mbNeedsUpdate ( false ),
163 mbOldUndoMode ( false ),
164 mbForwarderIsEditMode ( false ),
165 mbShapeIsEditMode ( false ),
166 mbNotificationsDisabled ( false ),
167 mbNotifyEditOutlinerSet ( false )
192 mpModel ( &rObject.getSdrModelFromSdrObject() ),
193 mbDataValid ( false ),
194 mbIsLocked ( false ),
195 mbNeedsUpdate ( false ),
196 mbOldUndoMode ( false ),
197 mbForwarderIsEditMode ( false ),
198 mbShapeIsEditMode ( true ),
199 mbNotificationsDisabled ( false ),
200 mbNotifyEditOutlinerSet ( false )
260 if (SfxHintId::Dying == rHint.
GetId())
268 else if (rHint.
GetId() == SfxHintId::ThisIsAnSdrHint)
311 sdr::table::Cell* pCellObj =
dynamic_cast< sdr::table::Cell*
>(
mpText );
312 if (pCellObj && xCell.get() != pCellObj)
376 else if (rHint.
GetId() == SfxHintId::SvxViewChanged)
480 bool bCreated =
false;
492 nOutlMode = OutlinerMode::OutlineObject;
515 css::uno::Reference< css::uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
519 css::uno::Reference< css::linguistic2::XHyphenator > xHyphenator =
m_xLinguServiceManager->getHyphenator();
520 if( xHyphenator.is() )
542 bool bTextEditActive(
false);
544 if( pOutlinerParaObject )
545 bTextEditActive =
true;
591 auto pCell =
dynamic_cast<sdr::table::Cell*
>(
mpText);
592 if (pCell && pCell->GetStyleSheet())
593 mpOutliner->SetStyleSheet( 0, pCell->GetStyleSheet());
666 bool bTextEditActive =
false;
670 bTextEditActive =
true;
780 &&
mpOutliner->GetEditEngine().GetTextLen( 1 ) == 0) )
799 assert(!
mbIsLocked &&
"cannot nest these loc() calls");
848 Point aPoint1( rPoint );
856 return mpWindow->LogicToPixel( aPoint2, aMapMode );
896 if( !mbNotificationsDisabled )
938 return mpImpl->GetTextForwarder();
944 return mpImpl->GetEditViewForwarder( bCreate );
981 return mpImpl->LogicToPixel( rPoint, rMapMode );
986 return mpImpl->PixelToLogic( rPoint, rMapMode );
991 mpImpl->addRange( pNewRange );
996 mpImpl->removeRange( pOldRange );
1001 return mpImpl->getRanges();
1006 mpImpl->UpdateOutliner();
bool SetUpdateLayout(bool bUpdate, bool bRestoring=false)
void EnableUndo(bool bEnable)
void SetOrigin(const Point &rOrigin)
bool IsEffectivelyVertical() const
TextRotation GetRotation() const
void SetNotifyHdl(const Link< EENotify &, void > &rLink)
SAL_WARN_UNUSED_RESULT Point LogicToLogic(const Point &rPtSource, const MapMode *pMapModeSource, const MapMode *pMapModeDest) const
constexpr tools::Long Y() const
tools::Long AdjustY(tools::Long nVertMove)
tools::Long AdjustX(tools::Long nHorzMove)
constexpr tools::Long X() const
SdrHintKind GetKind() const
const SdrObject * GetObject() const
std::unique_ptr< SdrOutliner > createOutliner(OutlinerMode nOutlinerMode)
MapUnit GetScaleUnit() const
SfxStyleSheetBasePool * GetStyleSheetPool() const
void disposeOutliner(std::unique_ptr< SdrOutliner > pOutliner)
virtual SdrEndTextEditKind SdrEndTextEdit(bool bDontDeleteReally=false)
const OutlinerView * GetTextEditOutlinerView() const
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)
const SdrOutliner * GetTextEditOutliner() const
void SetEmptyPresObj(bool bEpt)
virtual SdrInventor GetObjInventor() const
bool IsEmptyPresObj() const
virtual const tools::Rectangle & GetCurrentBoundRect() const
SdrModel & getSdrModelFromSdrObject() const
SfxStyleSheet * GetStyleSheet() const
void AddObjectUser(sdr::ObjectUser &rNewUser)
virtual SdrObjKind GetObjIdentifier() const
SdrPage * getSdrPageFromSdrObject() const
void RemoveObjectUser(sdr::ObjectUser &rOldUser)
bool IsMasterPage() const
virtual SfxStyleSheet * GetTextStyleSheetForObject(SdrObject *pObj) const
void UpdateOutlinerFormatting(SdrOutliner &rOutl, tools::Rectangle &rPaintRect) const
Update given Outliner equivalently to SdrTextObj::Paint()
bool IsTextEditActive() const
bool CanCreateEditOutlinerParaObject() const
virtual SdrText * getActiveText() const
returns the currently active text.
void NbcSetOutlinerParaObjectForText(std::optional< OutlinerParaObject > pTextObject, SdrText *pText)
virtual bool IsReallyEdited() const
returns true only if we are in edit mode and the user actually changed anything
std::optional< OutlinerParaObject > CreateEditOutlinerParaObject() const
SdrObjKind GetTextKind() const
virtual SdrText * getText(sal_Int32 nIndex) const override
returns the nth available text.
void SetupOutlinerFormatting(SdrOutliner &rOutl, tools::Rectangle &rPaintRect) const
Setup given Outliner equivalently to SdrTextObj::Paint()
OutlinerParaObject * GetOutlinerParaObject()
void Broadcast(const SfxHint &rHint)
void StartListening(SfxBroadcaster &rBroadcaster, DuplicateHandling eDuplicateHanding=DuplicateHandling::Unexpected)
void EndListening(SfxBroadcaster &rBroadcaster, bool bRemoveAllDuplicates=false)
static ::std::unique_ptr< SfxHint > EENotification2Hint(EENotify const *aNotify)
bool mbForwarderIsEditMode
virtual ~SvxTextEditSourceImpl() override
oslInterlockedCount maRefCount
SvxEditViewForwarder * GetEditViewForwarder(bool)
SvxTextForwarder * GetTextForwarder()
bool mbNotifyEditOutlinerSet
virtual void ObjectInDestruction(const SdrObject &rObject) override
DECL_LINK(NotifyHdl, EENotify &, void)
void removeRange(SvxUnoTextRangeBase *pOldRange)
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
SvxTextEditSourceImpl(SdrObject *pObject, SdrText *pText)
std::unique_ptr< SvxDrawOutlinerViewForwarder > mpViewForwarder
SvxTextForwarder * GetEditModeTextForwarder()
SvxUnoTextRangeBaseVec mvTextRanges
std::unique_ptr< SdrOutliner > mpOutliner
std::unique_ptr< SvxOutlinerForwarder > mpTextForwarder
void addRange(SvxUnoTextRangeBase *pNewRange)
VclPtr< const OutputDevice > mpWindow
Point PixelToLogic(const Point &, const MapMode &rMapMode)
Point LogicToPixel(const Point &, const MapMode &rMapMode)
bool mbNotificationsDisabled
const SvxUnoTextRangeBaseVec & getRanges() const
css::uno::Reference< css::linguistic2::XLinguServiceManager2 > m_xLinguServiceManager
SvxTextForwarder * GetBackgroundTextForwarder()
std::unique_ptr< SvxDrawOutlinerViewForwarder > CreateViewForwarder()
virtual SvxTextForwarder * GetTextForwarder() override
virtual SvxViewForwarder * GetViewForwarder() override
virtual void removeRange(SvxUnoTextRangeBase *pOldRange) override
virtual Point PixelToLogic(const Point &, const MapMode &) const override
virtual std::unique_ptr< SvxEditSource > Clone() const override
virtual ~SvxTextEditSource() override
virtual SfxBroadcaster & GetBroadcaster() const override
SvxTextEditSource(SdrObject *pObj, SdrText *pText)
virtual const SvxUnoTextRangeBaseVec & getRanges() const override
virtual void UpdateData() override
virtual SvxEditViewForwarder * GetEditViewForwarder(bool bCreate=false) override
virtual Point LogicToPixel(const Point &, const MapMode &) const override
virtual void addRange(SvxUnoTextRangeBase *pNewRange) override
virtual bool IsValid() const override
rtl::Reference< SvxTextEditSourceImpl > mpImpl
virtual Point LogicToPixel(const Point &rPoint, const MapMode &rMapMode) const=0
virtual Point PixelToLogic(const Point &rPoint, const MapMode &rMapMode) const=0
const sdr::table::CellRef & getActiveCell() const
The active table has the focus or is currently edited.
#define DBG_ASSERT(sCon, aError)
EmbeddedObjectRef * pObject
#define LINK(Instance, Class, Member)
SdrTextObj * DynCastSdrTextObj(SdrObject *pObj)
@ OutlineText
TitleText, special text object for StarDraw.
std::vector< SvxUnoTextRangeBase * > SvxUnoTextRangeBaseVec
IMPL_LINK(SvxTextEditSourceImpl, NotifyHdl, EENotify &, rNotify, void)
VclPtr< vcl::Window > mpWindow