LibreOffice Module sw (master)
1
|
#include <unoatxt.hxx>
Public Member Functions | |
SwXAutoTextEntry (SwGlossaries *, const OUString &rGroupName, const OUString &rEntryName) | |
virtual sal_Int64 SAL_CALL | getSomething (const css::uno::Sequence< sal_Int8 > &aIdentifier) override |
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 |
![]() | |
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 |
void | RemoveBroadcaster_Impl (SfxBroadcaster &rBC) |
Static Public Member Functions | |
static const css::uno::Sequence< sal_Int8 > & | getUnoTunnelId () |
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 |
Definition at line 152 of file unoatxt.hxx.
|
overrideprivatevirtual |
Definition at line 677 of file unoatxt.cxx.
References implFlushDocument().
SwXAutoTextEntry::SwXAutoTextEntry | ( | SwGlossaries * | pGlss, |
const OUString & | rGroupName, | ||
const OUString & | rEntryName | ||
) |
Definition at line 669 of file unoatxt.cxx.
|
overridevirtual |
Definition at line 834 of file unoatxt.cxx.
References SwXTextRange::GetDoc(), SwGlossaries::GetGroupDoc(), SwXTextRange::GetPositions(), implFlushDocument(), m_pGlossaries, m_sEntryName, and m_sGroupName.
|
overridevirtual |
Definition at line 752 of file unoatxt.cxx.
References EnsureBodyText(), and mxBodyText.
|
overridevirtual |
Definition at line 759 of file unoatxt.cxx.
References EnsureBodyText(), and mxBodyText.
|
overrideprivate |
Definition at line 746 of file unoatxt.cxx.
References implFlushDocument().
|
inlineprivate |
Definition at line 170 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 733 of file unoatxt.cxx.
References SwGlossaries::EditGroupDoc(), SwDocShell::GetDoc(), tools::SvRef< T >::is(), m_pGlossaries, m_sEntryName, m_sGroupName, m_xDocSh, mxBodyText, and SfxListener::StartListening().
Referenced by EnsureBodyText().
|
overridevirtual |
Definition at line 813 of file unoatxt.cxx.
References EnsureBodyText(), and mxBodyText.
|
inline |
Definition at line 234 of file unoatxt.hxx.
References m_sEntryName.
Referenced by SwAutoTextEventDescriptor::getByName(), and SwAutoTextEventDescriptor::replaceByName().
|
overridevirtual |
Definition at line 910 of file unoatxt.cxx.
|
inline |
Definition at line 232 of file unoatxt.hxx.
References m_pGlossaries.
Referenced by SwAutoTextEventDescriptor::getByName(), and SwAutoTextEventDescriptor::replaceByName().
|
inline |
Definition at line 233 of file unoatxt.hxx.
References m_sGroupName.
Referenced by SwAutoTextEventDescriptor::getByName(), and SwAutoTextEventDescriptor::replaceByName().
|
overridevirtual |
Definition at line 894 of file unoatxt.cxx.
|
overridevirtual |
Definition at line 664 of file unoatxt.cxx.
References comphelper::getSomethingImpl().
|
overridevirtual |
Definition at line 806 of file unoatxt.cxx.
References EnsureBodyText(), and mxBodyText.
|
overridevirtual |
Definition at line 820 of file unoatxt.cxx.
References EnsureBodyText(), and mxBodyText.
|
overridevirtual |
Definition at line 904 of file unoatxt.cxx.
|
overridevirtual |
Definition at line 799 of file unoatxt.cxx.
|
static |
Definition at line 658 of file unoatxt.cxx.
References comphelper::UnoIdInit::getSeq().
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 685 of file unoatxt.cxx.
References tools::SvRef< T >::clear(), SfxObjectShell::DoClose(), SfxListener::EndListening(), SwDocShell::GetDoc(), SwDoc::getIDocumentState(), tools::SvRef< T >::is(), IDocumentState::IsModified(), m_xDocSh, and SwDocShell::Save().
Referenced by applyTo(), disposing(), Notify(), and ~SwXAutoTextEntry().
|
overridevirtual |
Definition at line 774 of file unoatxt.cxx.
References EnsureBodyText(), and mxBodyText.
|
overridevirtual |
Definition at line 767 of file unoatxt.cxx.
References EnsureBodyText(), and mxBodyText.
|
overridevirtual |
Definition at line 782 of file unoatxt.cxx.
References EnsureBodyText(), and mxBodyText.
|
inline |
Definition at line 231 of file unoatxt.hxx.
|
overrideprivatevirtual |
Reimplemented from SfxListener.
Definition at line 703 of file unoatxt.cxx.
References tools::SvRef< T >::clear(), SfxListener::EndListening(), tools::SvRef< T >::get(), SfxHint::GetId(), implFlushDocument(), m_xDocSh, and mxBodyText.
|
overridevirtual |
Definition at line 791 of file unoatxt.cxx.
References EnsureBodyText(), and mxBodyText.
|
overridevirtual |
Definition at line 827 of file unoatxt.cxx.
References EnsureBodyText(), and mxBodyText.
|
overridevirtual |
Definition at line 899 of file unoatxt.cxx.
References cppu::supportsService().
|
private |
Definition at line 163 of file unoatxt.hxx.
Referenced by applyTo(), GetBodyText(), and GetGlossaries().
|
private |
Definition at line 165 of file unoatxt.hxx.
Referenced by applyTo(), GetBodyText(), and GetEntryName().
|
private |
Definition at line 164 of file unoatxt.hxx.
Referenced by applyTo(), GetBodyText(), and GetGroupName().
|
private |
Definition at line 166 of file unoatxt.hxx.
Referenced by GetBodyText(), implFlushDocument(), and Notify().
|
private |
Definition at line 168 of file unoatxt.hxx.
Referenced by createTextCursor(), createTextCursorByRange(), EnsureBodyText(), GetBodyText(), getEnd(), getStart(), getString(), insertControlCharacter(), insertString(), insertTextContent(), Notify(), removeTextContent(), and setString().