LibreOffice Module sw (master) 1
|
#include <unoatxt.hxx>
Public Member Functions | |
SwXAutoTextEntry (SwGlossaries *, OUString aGroupName, OUString aEntryName) | |
virtual css::uno::Reference< css::text::XTextCursor > SAL_CALL | createTextCursor () override |
virtual css::uno::Reference< css::text::XTextCursor > SAL_CALL | createTextCursorByRange (const css::uno::Reference< css::text::XTextRange > &aTextPosition) override |
virtual void SAL_CALL | insertString (const css::uno::Reference< css::text::XTextRange > &xRange, const OUString &aString, sal_Bool bAbsorb) override |
virtual void SAL_CALL | insertControlCharacter (const css::uno::Reference< css::text::XTextRange > &xRange, sal_Int16 nControlCharacter, sal_Bool bAbsorb) override |
virtual void SAL_CALL | insertTextContent (const css::uno::Reference< css::text::XTextRange > &xRange, const css::uno::Reference< css::text::XTextContent > &xContent, sal_Bool bAbsorb) override |
virtual void SAL_CALL | removeTextContent (const css::uno::Reference< css::text::XTextContent > &xContent) override |
virtual css::uno::Reference< css::text::XText > SAL_CALL | getText () override |
virtual css::uno::Reference< css::text::XTextRange > SAL_CALL | getStart () override |
virtual css::uno::Reference< css::text::XTextRange > SAL_CALL | getEnd () override |
virtual OUString SAL_CALL | getString () override |
virtual void SAL_CALL | setString (const OUString &aString) override |
virtual void SAL_CALL | applyTo (const css::uno::Reference< css::text::XTextRange > &xRange) override |
virtual OUString SAL_CALL | getImplementationName () override |
virtual sal_Bool SAL_CALL | supportsService (const OUString &ServiceName) override |
virtual css::uno::Sequence< OUString > SAL_CALL | getSupportedServiceNames () override |
virtual css::uno::Reference< css::container::XNameReplace > SAL_CALL | getEvents () override |
void | Invalidate () |
const SwGlossaries * | GetGlossaries () const |
const OUString & | GetGroupName () const |
const OUString & | GetEntryName () const |
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 comphelper::WeakComponentImplHelper< css::text::XAutoTextEntry, css::lang::XServiceInfo, css::text::XText, css::document::XEventsSupplier > | |
virtual void SAL_CALL | acquire () noexcept override |
virtual void SAL_CALL | release () noexcept override |
virtual void SAL_CALL | dispose () noexcept final override |
virtual void SAL_CALL | addEventListener (css::uno::Reference< css::lang::XEventListener > const &rxListener) final override |
virtual void SAL_CALL | removeEventListener (css::uno::Reference< css::lang::XEventListener > const &rxListener) final override |
virtual css::uno::Any SAL_CALL | queryInterface (css::uno::Type const &rType) override |
virtual css::uno::Sequence< css::uno::Type > SAL_CALL | getTypes () override |
virtual css::uno::Sequence< sal_Int8 > SAL_CALL | getImplementationId () override |
Public Member Functions inherited from comphelper::WeakComponentImplHelperBase | |
virtual | ~WeakComponentImplHelperBase () override |
virtual void SAL_CALL | dispose () override |
virtual void SAL_CALL | addEventListener (css::uno::Reference< css::lang::XEventListener > const &rxListener) override |
virtual void SAL_CALL | removeEventListener (css::uno::Reference< css::lang::XEventListener > const &rxListener) override |
virtual css::uno::Any SAL_CALL | queryInterface (css::uno::Type const &rType) override |
virtual void | disposing (std::unique_lock< std::mutex > &) |
Public Member Functions inherited from comphelper::UnoImplBase | |
virtual | ~UnoImplBase () |
Private Member Functions | |
void | EnsureBodyText () |
void | GetBodyText () |
void | disposing (std::unique_lock< std::mutex > &) override |
void | implFlushDocument (bool _bCloseDoc=false) |
ensure that the current content (which may only be in-memory so far) is flushed to the auto text group file More... | |
virtual void | Notify (SfxBroadcaster &rBC, const SfxHint &rHint) override |
virtual | ~SwXAutoTextEntry () override |
Private Attributes | |
SwGlossaries * | m_pGlossaries |
OUString | m_sGroupName |
OUString | m_sEntryName |
SwDocShellRef | m_xDocSh |
rtl::Reference< SwXBodyText > | mxBodyText |
Additional Inherited Members | |
Protected Member Functions inherited from comphelper::WeakComponentImplHelperBase | |
void | throwIfDisposed (std::unique_lock< std::mutex > &) |
Protected Attributes inherited from comphelper::WeakComponentImplHelperBase | |
comphelper::OInterfaceContainerHelper4< css::lang::XEventListener > | maEventListeners |
Protected Attributes inherited from comphelper::UnoImplBase | |
std::mutex | m_aMutex |
bool | m_bDisposed |
Definition at line 145 of file unoatxt.hxx.
|
overrideprivatevirtual |
Definition at line 655 of file unoatxt.cxx.
References implFlushDocument().
SwXAutoTextEntry::SwXAutoTextEntry | ( | SwGlossaries * | pGlss, |
OUString | aGroupName, | ||
OUString | aEntryName | ||
) |
Definition at line 647 of file unoatxt.cxx.
References aEntryName.
|
overridevirtual |
Definition at line 812 of file unoatxt.cxx.
References SwXText::GetDoc(), SwXTextRange::GetDoc(), SwGlossaries::GetGroupDoc(), SwDoc::GetNodes(), SwXTextRange::GetPositions(), SwXText::getStart(), implFlushDocument(), SwDoc::InsertGlossary(), m_pGlossaries, m_sEntryName, and m_sGroupName.
|
overridevirtual |
Definition at line 730 of file unoatxt.cxx.
References EnsureBodyText(), and mxBodyText.
|
overridevirtual |
Definition at line 737 of file unoatxt.cxx.
References EnsureBodyText(), and mxBodyText.
|
overrideprivatevirtual |
Reimplemented from comphelper::WeakComponentImplHelperBase.
Definition at line 724 of file unoatxt.cxx.
References implFlushDocument().
|
inlineprivate |
Definition at line 162 of file unoatxt.hxx.
References GetBodyText(), and mxBodyText.
Referenced by createTextCursor(), createTextCursorByRange(), getEnd(), getStart(), getString(), insertControlCharacter(), insertString(), insertTextContent(), removeTextContent(), and setString().
|
private |
Definition at line 711 of file unoatxt.cxx.
References SwGlossaries::EditGroupDoc(), tools::SvRef< typename T >::is(), m_pGlossaries, m_sEntryName, m_sGroupName, m_xDocSh, mxBodyText, and SfxListener::StartListening().
Referenced by EnsureBodyText().
|
overridevirtual |
Definition at line 791 of file unoatxt.cxx.
References EnsureBodyText(), and mxBodyText.
|
inline |
Definition at line 221 of file unoatxt.hxx.
References m_sEntryName.
Referenced by SwAutoTextEventDescriptor::getByName(), and SwAutoTextEventDescriptor::replaceByName().
|
overridevirtual |
Definition at line 888 of file unoatxt.cxx.
|
inline |
Definition at line 219 of file unoatxt.hxx.
References m_pGlossaries.
Referenced by SwAutoTextEventDescriptor::getByName(), and SwAutoTextEventDescriptor::replaceByName().
|
inline |
Definition at line 220 of file unoatxt.hxx.
References m_sGroupName.
Referenced by SwAutoTextEventDescriptor::getByName(), and SwAutoTextEventDescriptor::replaceByName().
|
overridevirtual |
Definition at line 872 of file unoatxt.cxx.
|
overridevirtual |
Definition at line 784 of file unoatxt.cxx.
References EnsureBodyText(), and mxBodyText.
|
overridevirtual |
Definition at line 798 of file unoatxt.cxx.
References EnsureBodyText(), and mxBodyText.
|
overridevirtual |
Definition at line 882 of file unoatxt.cxx.
|
overridevirtual |
Definition at line 777 of file unoatxt.cxx.
|
private |
ensure that the current content (which may only be in-memory so far) is flushed to the auto text group file
If somebody modifies an auto text via this class, then this is not directly reflected to the respective glossaries file (on disk), instead we hold a copy of this text (in [p|x]BodyText). On the other hand, in applyTo, we do not work with this copy, but just tell the target for the application to insert the content which we're responsible for - and this target doesn't know about our copy, but only about the persistent version. So we need to ensure that before somebody else does something with our auto text, we flush our (in-memory) copy to disk.
Definition at line 663 of file unoatxt.cxx.
References tools::SvRef< typename T >::clear(), SfxListener::EndListening(), tools::SvRef< typename T >::is(), and m_xDocSh.
Referenced by applyTo(), disposing(), Notify(), and ~SwXAutoTextEntry().
|
overridevirtual |
Definition at line 752 of file unoatxt.cxx.
References EnsureBodyText(), and mxBodyText.
|
overridevirtual |
Definition at line 745 of file unoatxt.cxx.
References EnsureBodyText(), and mxBodyText.
|
overridevirtual |
Definition at line 760 of file unoatxt.cxx.
References EnsureBodyText(), and mxBodyText.
|
inline |
Definition at line 218 of file unoatxt.hxx.
References m_pGlossaries.
|
overrideprivatevirtual |
Reimplemented from SfxListener.
Definition at line 681 of file unoatxt.cxx.
References tools::SvRef< typename T >::clear(), SfxListener::EndListening(), tools::SvRef< typename T >::get(), SfxHint::GetId(), implFlushDocument(), m_xDocSh, and mxBodyText.
|
overridevirtual |
Definition at line 769 of file unoatxt.cxx.
References EnsureBodyText(), and mxBodyText.
|
overridevirtual |
Definition at line 805 of file unoatxt.cxx.
References EnsureBodyText(), and mxBodyText.
|
overridevirtual |
Definition at line 877 of file unoatxt.cxx.
References cppu::supportsService().
|
private |
Definition at line 155 of file unoatxt.hxx.
Referenced by applyTo(), GetBodyText(), GetGlossaries(), and Invalidate().
|
private |
Definition at line 157 of file unoatxt.hxx.
Referenced by applyTo(), GetBodyText(), and GetEntryName().
|
private |
Definition at line 156 of file unoatxt.hxx.
Referenced by applyTo(), GetBodyText(), and GetGroupName().
|
private |
Definition at line 158 of file unoatxt.hxx.
Referenced by GetBodyText(), implFlushDocument(), and Notify().
|
private |
Definition at line 160 of file unoatxt.hxx.
Referenced by createTextCursor(), createTextCursorByRange(), EnsureBodyText(), GetBodyText(), getEnd(), getStart(), getString(), insertControlCharacter(), insertString(), insertTextContent(), Notify(), removeTextContent(), and setString().