LibreOffice Module svx (master) 1
|
@descr More...
Public Member Functions | |
SvxTextEditSourceImpl (SdrObject *pObject, SdrText *pText) | |
SvxTextEditSourceImpl (SdrObject &rObject, SdrText *pText, SdrView &rView, const OutputDevice &rWindow) | |
virtual | ~SvxTextEditSourceImpl () override |
void | acquire () |
void | release () |
virtual void | Notify (SfxBroadcaster &rBC, const SfxHint &rHint) override |
SvxTextForwarder * | GetTextForwarder () |
SvxEditViewForwarder * | GetEditViewForwarder (bool) |
void | UpdateData () |
void | addRange (SvxUnoTextRangeBase *pNewRange) |
void | removeRange (SvxUnoTextRangeBase *pOldRange) |
const SvxUnoTextRangeBaseVec & | getRanges () const |
void | lock () |
void | unlock () |
bool | IsValid () const |
Point | LogicToPixel (const Point &, const MapMode &rMapMode) |
Point | PixelToLogic (const Point &, const MapMode &rMapMode) |
DECL_LINK (NotifyHdl, EENotify &, void) | |
virtual void | ObjectInDestruction (const SdrObject &rObject) override |
void | UpdateOutliner () |
Public Member Functions inherited from SfxListener | |
SfxListener () | |
SfxListener (const SfxListener &rCopy) | |
virtual | ~SfxListener () COVERITY_NOEXCEPT_FALSE |
void | StartListening (SfxBroadcaster &rBroadcaster, DuplicateHandling eDuplicateHanding=DuplicateHandling::Unexpected) |
void | EndListening (SfxBroadcaster &rBroadcaster, bool bRemoveAllDuplicates=false) |
void | EndListeningAll () |
bool | IsListening (SfxBroadcaster &rBroadcaster) const |
sal_uInt16 | GetBroadcasterCount () const |
SfxBroadcaster * | GetBroadcasterJOE (sal_uInt16 nNo) const |
virtual void | Notify (SfxBroadcaster &rBC, const SfxHint &rHint) |
void | RemoveBroadcaster_Impl (SfxBroadcaster &rBC) |
virtual bool | IsSdrView () const |
Public Member Functions inherited from SfxBroadcaster | |
SfxBroadcaster () | |
SfxBroadcaster (const SfxBroadcaster &rBC) | |
virtual | ~SfxBroadcaster () COVERITY_NOEXCEPT_FALSE |
void | Broadcast (const SfxHint &rHint) |
bool | HasListeners () const |
size_t | GetListenerCount () const |
void | ForAllListeners (std::function< bool(SfxListener *)> f) const |
virtual void | ObjectInDestruction (const SdrObject &rObject)=0 |
Private Member Functions | |
SvxTextForwarder * | GetBackgroundTextForwarder () |
SvxTextForwarder * | GetEditModeTextForwarder () |
std::unique_ptr< SvxDrawOutlinerViewForwarder > | CreateViewForwarder () |
void | SetupOutliner () |
bool | HasView () const |
bool | IsEditMode () const |
void | dispose () |
Private Attributes | |
oslInterlockedCount | maRefCount |
SdrObject * | mpObject |
SdrText * | mpText |
SdrView * | mpView |
VclPtr< const OutputDevice > | mpWindow |
SdrModel * | mpModel |
std::unique_ptr< SdrOutliner > | mpOutliner |
std::unique_ptr< SvxOutlinerForwarder > | mpTextForwarder |
std::unique_ptr< SvxDrawOutlinerViewForwarder > | mpViewForwarder |
css::uno::Reference< css::linguistic2::XLinguServiceManager2 > | m_xLinguServiceManager |
Point | maTextOffset |
bool | mbDataValid |
bool | mbIsLocked |
bool | mbNeedsUpdate |
bool | mbOldUndoMode |
bool | mbForwarderIsEditMode |
bool | mbShapeIsEditMode |
bool | mbNotificationsDisabled |
bool | mbNotifyEditOutlinerSet |
SvxUnoTextRangeBaseVec | mvTextRanges |
Additional Inherited Members | |
Protected Member Functions inherited from SfxBroadcaster | |
void | Forward (SfxBroadcaster &rBC, const SfxHint &rHint) |
Protected Member Functions inherited from sdr::ObjectUser | |
~ObjectUser () | |
@descr
This class essentially provides the text and view forwarders. If no SdrView is given, this class handles the UNO objects, which are currently not concerned with view issues. In this case, GetViewForwarder() always returns NULL and the underlying EditEngine of the SvxTextForwarder is a background one (i.e. not the official DrawOutliner, but one created exclusively for this object, with no relation to a view).
If a SdrView is given at construction time, the caller is responsible for destroying this object when the view becomes invalid (the views cannot notify). If GetViewForwarder(sal_True) is called, the underlying shape is put into edit mode, the view forwarder returned encapsulates the OutlinerView and the next call to GetTextForwarder() yields a forwarder encapsulating the actual DrawOutliner. Thus, changes on that Outliner are immediately reflected on the screen. If the object leaves edit mode, the old behaviour is restored.
Definition at line 76 of file unoshtxt.cxx.
Definition at line 153 of file unoshtxt.cxx.
References SdrObject::AddObjectUser(), DBG_ASSERT, DynCastSdrTextObj(), SdrTextObj::getText(), mpModel, mpObject, mpObject, mpText, mpView, mpWindow, pObject, and SfxListener::StartListening().
SvxTextEditSourceImpl::SvxTextEditSourceImpl | ( | SdrObject & | rObject, |
SdrText * | pText, | ||
SdrView & | rView, | ||
const OutputDevice & | rWindow | ||
) |
Definition at line 186 of file unoshtxt.cxx.
References SdrObject::AddObjectUser(), DynCastSdrTextObj(), SdrTextObj::getText(), IsEditMode(), mbShapeIsEditMode, mpModel, mpObject, mpObject, mpText, mpView, mpView, mpWindow, and SfxListener::StartListening().
|
overridevirtual |
Definition at line 218 of file unoshtxt.cxx.
References DBG_ASSERT, dispose(), mbIsLocked, mpObject, and SdrObject::RemoveObjectUser().
void SvxTextEditSourceImpl::acquire | ( | ) |
Definition at line 243 of file unoshtxt.cxx.
References maRefCount.
void SvxTextEditSourceImpl::addRange | ( | SvxUnoTextRangeBase * | pNewRange | ) |
Definition at line 228 of file unoshtxt.cxx.
References mvTextRanges.
|
private |
Definition at line 679 of file unoshtxt.cxx.
References DynCastSdrTextObj(), SdrObject::GetCurrentBoundRect(), SdrObjEditView::GetTextEditOutliner(), SdrObjEditView::GetTextEditOutlinerView(), LINK, mbNotifyEditOutlinerSet, mpObject, mpView, Outliner::SetNotifyHdl(), and tools::Rectangle::TopLeft().
Referenced by GetEditViewForwarder().
SvxTextEditSourceImpl::DECL_LINK | ( | NotifyHdl | , |
EENotify & | , | ||
void | |||
) |
|
private |
Definition at line 392 of file unoshtxt.cxx.
References SdrModel::disposeOutliner(), SfxListener::EndListening(), SdrObjEditView::GetTextEditOutliner(), mbNotifyEditOutlinerSet, mpModel, mpObject, mpOutliner, mpTextForwarder, mpView, mpViewForwarder, mpWindow, SdrObject::RemoveObjectUser(), and Outliner::SetNotifyHdl().
Referenced by Notify(), ObjectInDestruction(), and ~SvxTextEditSourceImpl().
|
private |
Definition at line 478 of file unoshtxt.cxx.
References aStr, SdrTextObj::CreateEditOutlinerParaObject(), SdrModel::createOutliner(), Default, DynCastSdrTextObj(), EditEngine::EnableUndo(), SdrTextObj::getActiveText(), SdrObject::GetObjIdentifier(), SdrObject::GetObjInventor(), SdrText::GetOutlinerParaObject(), OutlinerParaObject::GetRotation(), SdrObject::getSdrModelFromSdrObject(), SdrObject::getSdrPageFromSdrObject(), SdrObject::GetStyleSheet(), SdrModel::GetStyleSheetPool(), SdrTextObj::GetTextKind(), SdrPage::GetTextStyleSheetForObject(), OutlinerParaObject::GetVertical(), HasView(), OutlinerParaObject::IsEffectivelyVertical(), SdrObject::IsEmptyPresObj(), utl::ConfigManager::IsFuzzing(), SdrObject::IsInserted(), SdrPage::IsMasterPage(), SdrTextObj::IsReallyEdited(), SdrTextObj::IsTextFrame(), LINK, m_xLinguServiceManager, mbDataValid, mbForwarderIsEditMode, mbIsLocked, mbNotificationsDisabled, mbOldUndoMode, mpModel, mpObject, mpOutliner, mpText, mpTextForwarder, OutlineText, SdrObject::SetEmptyPresObj(), EditEngine::SetUpdateLayout(), and SetupOutliner().
Referenced by GetTextForwarder().
|
private |
Definition at line 616 of file unoshtxt.cxx.
References Default, SdrObject::GetObjIdentifier(), SdrObject::GetObjInventor(), SdrObjEditView::GetTextEditOutliner(), HasView(), mbForwarderIsEditMode, mpObject, mpTextForwarder, mpView, and OutlineText.
Referenced by GetTextForwarder().
SvxEditViewForwarder * SvxTextEditSourceImpl::GetEditViewForwarder | ( | bool | bCreate | ) |
Definition at line 700 of file unoshtxt.cxx.
References CreateViewForwarder(), DynCastSdrTextObj(), SdrObject::getSdrModelFromSdrObject(), IsEditMode(), SdrTextObj::IsTextEditActive(), mpModel, mpObject, mpTextForwarder, mpView, mpViewForwarder, SdrObjEditView::SdrBeginTextEdit(), SdrObjEditView::SdrEndTextEdit(), and UpdateData().
Referenced by LogicToPixel(), and PixelToLogic().
|
inline |
Definition at line 135 of file unoshtxt.cxx.
References mvTextRanges.
SvxTextForwarder * SvxTextEditSourceImpl::GetTextForwarder | ( | ) |
Definition at line 633 of file unoshtxt.cxx.
References SdrTextObj::CanCreateEditOutlinerParaObject(), DynCastSdrTextObj(), SdrTextObj::getActiveText(), GetBackgroundTextForwarder(), GetEditModeTextForwarder(), SdrObject::getSdrModelFromSdrObject(), HasView(), IsEditMode(), mbDataValid, mbForwarderIsEditMode, mbIsLocked, mpModel, mpObject, mpText, and mpTextForwarder.
|
inlineprivate |
Definition at line 108 of file unoshtxt.cxx.
References mpView.
Referenced by GetBackgroundTextForwarder(), GetEditModeTextForwarder(), GetTextForwarder(), Notify(), and UpdateData().
|
inlineprivate |
Definition at line 109 of file unoshtxt.cxx.
References DynCastSdrTextObj(), SdrTextObj::IsTextEditActive(), mbShapeIsEditMode, and mpObject.
Referenced by GetEditViewForwarder(), GetTextForwarder(), LogicToPixel(), PixelToLogic(), SvxTextEditSourceImpl(), and UpdateData().
bool SvxTextEditSourceImpl::IsValid | ( | ) | const |
Definition at line 826 of file unoshtxt.cxx.
References mpView, and mpWindow.
Referenced by LogicToPixel(), and PixelToLogic().
void SvxTextEditSourceImpl::lock | ( | ) |
Definition at line 796 of file unoshtxt.cxx.
References EditEngine::EnableUndo(), mbIsLocked, mbOldUndoMode, mpOutliner, and EditEngine::SetUpdateLayout().
Definition at line 831 of file unoshtxt.cxx.
References Point::AdjustX(), Point::AdjustY(), GetEditViewForwarder(), SdrModel::GetScaleUnit(), IsEditMode(), IsValid(), OutputDevice::LogicToLogic(), SvxViewForwarder::LogicToPixel(), maTextOffset, mpModel, mpWindow, MapMode::SetOrigin(), Point::X(), and Point::Y().
|
overridevirtual |
Reimplemented from SfxListener.
Definition at line 255 of file unoshtxt.cxx.
References BeginEdit, SfxBroadcaster::Broadcast(), dispose(), EndEdit, sdr::table::SdrTableObj::getActiveCell(), SfxHint::GetId(), SdrHint::GetKind(), SdrHint::GetObject(), SdrObjEditView::GetTextEditOutliner(), HasView(), LINK, mbDataValid, mbForwarderIsEditMode, mbNotifyEditOutlinerSet, mbShapeIsEditMode, ModelCleared, mpObject, mpText, mpTextForwarder, mpView, mpViewForwarder, ObjectChange, and Outliner::SetNotifyHdl().
|
overridevirtual |
Implements sdr::ObjectUser.
Definition at line 384 of file unoshtxt.cxx.
References SfxBroadcaster::Broadcast(), dispose(), and mpObject.
Definition at line 862 of file unoshtxt.cxx.
References Point::AdjustX(), Point::AdjustY(), GetEditViewForwarder(), SdrModel::GetScaleUnit(), IsEditMode(), IsValid(), OutputDevice::LogicToLogic(), maTextOffset, mpModel, mpWindow, SvxViewForwarder::PixelToLogic(), MapMode::SetOrigin(), Point::X(), and Point::Y().
void SvxTextEditSourceImpl::release | ( | ) |
Definition at line 249 of file unoshtxt.cxx.
References maRefCount.
void SvxTextEditSourceImpl::removeRange | ( | SvxUnoTextRangeBase * | pOldRange | ) |
Definition at line 236 of file unoshtxt.cxx.
References mvTextRanges.
|
private |
Definition at line 436 of file unoshtxt.cxx.
References DynCastSdrTextObj(), SdrObject::GetCurrentBoundRect(), maTextOffset, mpObject, mpOutliner, SdrTextObj::SetupOutlinerFormatting(), and tools::Rectangle::TopLeft().
Referenced by GetBackgroundTextForwarder().
void SvxTextEditSourceImpl::unlock | ( | ) |
Definition at line 809 of file unoshtxt.cxx.
References EditEngine::EnableUndo(), mbIsLocked, mbNeedsUpdate, mbOldUndoMode, mpOutliner, EditEngine::SetUpdateLayout(), and UpdateData().
void SvxTextEditSourceImpl::UpdateData | ( | ) |
Definition at line 758 of file unoshtxt.cxx.
References DynCastSdrTextObj(), HasView(), IsEditMode(), SdrObject::IsEmptyPresObj(), mbIsLocked, mbNeedsUpdate, mpObject, mpOutliner, mpText, SdrTextObj::NbcSetOutlinerParaObjectForText(), and SdrObject::SetEmptyPresObj().
Referenced by GetEditViewForwarder(), and unlock().
void SvxTextEditSourceImpl::UpdateOutliner | ( | ) |
Definition at line 457 of file unoshtxt.cxx.
References DynCastSdrTextObj(), SdrObject::GetCurrentBoundRect(), maTextOffset, mpObject, mpOutliner, tools::Rectangle::TopLeft(), and SdrTextObj::UpdateOutlinerFormatting().
|
private |
Definition at line 89 of file unoshtxt.cxx.
Referenced by GetBackgroundTextForwarder().
|
private |
Definition at line 79 of file unoshtxt.cxx.
|
private |
Definition at line 90 of file unoshtxt.cxx.
Referenced by LogicToPixel(), PixelToLogic(), SetupOutliner(), and UpdateOutliner().
|
private |
Definition at line 91 of file unoshtxt.cxx.
Referenced by GetBackgroundTextForwarder(), GetTextForwarder(), and Notify().
|
private |
Definition at line 95 of file unoshtxt.cxx.
Referenced by GetBackgroundTextForwarder(), GetEditModeTextForwarder(), GetTextForwarder(), and Notify().
|
private |
Definition at line 92 of file unoshtxt.cxx.
Referenced by GetBackgroundTextForwarder(), GetTextForwarder(), lock(), unlock(), UpdateData(), and ~SvxTextEditSourceImpl().
|
private |
Definition at line 93 of file unoshtxt.cxx.
Referenced by unlock(), and UpdateData().
|
private |
Definition at line 97 of file unoshtxt.cxx.
Referenced by GetBackgroundTextForwarder().
|
private |
Definition at line 98 of file unoshtxt.cxx.
Referenced by CreateViewForwarder(), dispose(), and Notify().
|
private |
Definition at line 94 of file unoshtxt.cxx.
Referenced by GetBackgroundTextForwarder(), lock(), and unlock().
|
private |
Definition at line 96 of file unoshtxt.cxx.
Referenced by IsEditMode(), Notify(), and SvxTextEditSourceImpl().
|
private |
Definition at line 85 of file unoshtxt.cxx.
Referenced by dispose(), GetBackgroundTextForwarder(), GetEditViewForwarder(), GetTextForwarder(), LogicToPixel(), PixelToLogic(), and SvxTextEditSourceImpl().
|
private |
Definition at line 81 of file unoshtxt.cxx.
Referenced by CreateViewForwarder(), dispose(), GetBackgroundTextForwarder(), GetEditModeTextForwarder(), GetEditViewForwarder(), GetTextForwarder(), IsEditMode(), Notify(), ObjectInDestruction(), SetupOutliner(), SvxTextEditSourceImpl(), UpdateData(), UpdateOutliner(), and ~SvxTextEditSourceImpl().
|
private |
Definition at line 86 of file unoshtxt.cxx.
Referenced by dispose(), GetBackgroundTextForwarder(), lock(), SetupOutliner(), unlock(), UpdateData(), and UpdateOutliner().
|
private |
Definition at line 82 of file unoshtxt.cxx.
Referenced by GetBackgroundTextForwarder(), GetTextForwarder(), Notify(), SvxTextEditSourceImpl(), and UpdateData().
|
private |
Definition at line 87 of file unoshtxt.cxx.
Referenced by dispose(), GetBackgroundTextForwarder(), GetEditModeTextForwarder(), GetEditViewForwarder(), GetTextForwarder(), and Notify().
|
private |
Definition at line 83 of file unoshtxt.cxx.
Referenced by CreateViewForwarder(), dispose(), GetEditModeTextForwarder(), GetEditViewForwarder(), HasView(), IsValid(), Notify(), and SvxTextEditSourceImpl().
|
private |
Definition at line 88 of file unoshtxt.cxx.
Referenced by dispose(), GetEditViewForwarder(), and Notify().
|
private |
Definition at line 84 of file unoshtxt.cxx.
Referenced by dispose(), IsValid(), LogicToPixel(), and PixelToLogic().
|
private |
Definition at line 100 of file unoshtxt.cxx.
Referenced by addRange(), getRanges(), and removeRange().