50#include <com/sun/star/frame/XModel.hpp>
51#include <com/sun/star/lang/NoSupportException.hpp>
52#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
53#include <com/sun/star/rdf/Statement.hpp>
54#include <com/sun/star/rdf/URI.hpp>
55#include <com/sun/star/rdf/URIs.hpp>
56#include <com/sun/star/rdf/XLiteral.hpp>
57#include <com/sun/star/rdf/XRepositorySupplier.hpp>
58#include <com/sun/star/lang/DisposedException.hpp>
99 uno::Reference<uno::XInterface>
const xThis(
m_wThis);
104 lang::EventObject
const ev(xThis);
105 std::unique_lock aGuard(
m_Mutex);
111 if(rHint.
GetId() == SfxHintId::Dying)
143 xMark->m_pImpl->m_wThis = xMark.get();
150 return "SwXReferenceMark";
159uno::Sequence< OUString > SAL_CALL
163 "com.sun.star.text.TextContent",
164 "com.sun.star.text.ReferenceMark"
170template<
typename T>
struct NotContainedIn
172 std::vector<T>
const& m_rVector;
173 explicit NotContainedIn(std::vector<T>
const& rVector)
174 : m_rVector(rVector) { }
175 bool operator() (T
const& rT) {
176 return std::find(m_rVector.begin(), m_rVector.end(), rT)
195 const bool bForceExpandHints( !bMark && pCursor && pCursor->
IsAtEndOfMeta() );
201 std::vector<SwTextAttr *> oldMarks;
221 std::vector<SwTextAttr *>
const newMarks(
224 std::vector<SwTextAttr *>::const_iterator
const iter(
225 std::find_if(newMarks.begin(), newMarks.end(),
226 NotContainedIn<SwTextAttr *>(oldMarks)));
227 assert(newMarks.end() != iter);
228 if (newMarks.end() != iter)
243 throw uno::RuntimeException(
244 "SwXReferenceMark::InsertRefMark(): cannot insert attribute",
nullptr);
259 throw uno::RuntimeException();
262 OTextCursorHelper* pCursor =
dynamic_cast<OTextCursorHelper*
>(xTextRange.get());
263 SwDoc *
const pDocument =
264 pRange ? &pRange->
GetDoc() : (pCursor ? pCursor->GetDoc() :
nullptr);
267 throw lang::IllegalArgumentException();
274 m_pImpl->m_bIsDescriptor =
false;
278uno::Reference< text::XTextRange > SAL_CALL
287 if (pNewMark && (pNewMark ==
m_pImpl->m_pMarkFormat))
290 m_pImpl->m_pMarkFormat->GetTextRefMark();
296 std::optional<SwPaM> pPam;
297 if ( pTextMark->
End() )
298 pPam.emplace( rTextNode, *pTextMark->
End(),
301 pPam.emplace( rTextNode, pTextMark->
GetStart());
304 *
m_pImpl->m_pDoc, *pPam->Start(), pPam->End());
318 if (pNewMark && (pNewMark ==
m_pImpl->m_pMarkFormat))
321 m_pImpl->m_pMarkFormat->GetTextRefMark();
327 const sal_Int32 nStt = pTextMark->
GetStart();
328 const sal_Int32 nEnd = pTextMark->
End()
332 SwPaM aPam( rTextNode, nStt, rTextNode, nEnd );
333 m_pImpl->m_pDoc->getIDocumentContentOperations().DeleteAndJoin( aPam );
337 else if (
m_pImpl->m_bIsDescriptor)
344 const uno::Reference< lang::XEventListener > & xListener)
347 std::unique_lock aGuard(
m_pImpl->m_Mutex);
348 m_pImpl->m_EventListeners.addInterface(aGuard, xListener);
352 const uno::Reference< lang::XEventListener > & xListener)
355 std::unique_lock aGuard(
m_pImpl->m_Mutex);
356 m_pImpl->m_EventListeners.removeInterface(aGuard, xListener);
365 throw uno::RuntimeException();
381 ||
m_pImpl->m_pDoc->GetRefMark(rName))
383 throw uno::RuntimeException();
387 if ((rName !=
m_pImpl->m_sMarkName)
388 && pCurMark && (pCurMark ==
m_pImpl->m_pMarkFormat))
392 m_pImpl->m_pMarkFormat->GetTextRefMark();
398 const sal_Int32 nStt = pTextMark->
GetStart();
399 const sal_Int32 nEnd = pTextMark->
End()
403 SwPaM aPam( rTextNode, nStt, rTextNode, nEnd );
405 m_pImpl->m_pDoc->getIDocumentContentOperations().DeleteAndJoin( aPam );
410 m_pImpl->InsertRefMark( aPam,
nullptr );
417uno::Reference< beans::XPropertySetInfo > SAL_CALL
422 static uno::Reference< beans::XPropertySetInfo > xRef =
431 throw lang::IllegalArgumentException();
441 throw beans::UnknownPropertyException(rPropertyName);
448 const uno::Reference< beans::XPropertyChangeListener >& )
450 OSL_FAIL(
"SwXReferenceMark::addPropertyChangeListener(): not implemented");
455 const uno::Reference< beans::XPropertyChangeListener >& )
457 OSL_FAIL(
"SwXReferenceMark::removePropertyChangeListener(): not implemented");
462 const uno::Reference< beans::XVetoableChangeListener >& )
464 OSL_FAIL(
"SwXReferenceMark::addVetoableChangeListener(): not implemented");
469 const uno::Reference< beans::XVetoableChangeListener >& )
471 OSL_FAIL(
"SwXReferenceMark::removeVetoableChangeListener(): not implemented");
481 virtual void PrepareForAttach(uno::Reference< text::XTextRange > & xRange,
482 const SwPaM & rPam)
override;
484 virtual bool CheckForOwnMemberMeta(
const SwPaM & rPam,
const bool bAbsorb)
override;
500 virtual uno::Sequence< sal_Int8 > SAL_CALL
501 getImplementationId()
override;
506 const ::css::uno::Reference< ::css::text::XTextRange >& aTextPosition )
override;
520 dynamic_cast<SwXText*
>(m_rMeta.GetParentText().get()));
521 return pParent ? pParent->GetStartNode() :
nullptr;
524void SwXMetaText::PrepareForAttach( uno::Reference<text::XTextRange> & xRange,
528 xRange =
static_cast<text::XWordCursor*
>(
533bool SwXMetaText::CheckForOwnMemberMeta(
const SwPaM & rPam,
const bool bAbsorb)
535 return m_rMeta.CheckForOwnMemberMeta(rPam, bAbsorb);
544 sal_Int32 nMetaStart;
547 m_rMeta.SetContentRange(pTextNode, nMetaStart, nMetaEnd) );
557uno::Sequence<sal_Int8> SAL_CALL
558SwXMetaText::getImplementationId()
560 return css::uno::Sequence<sal_Int8>();
566SwXMetaText::createXTextCursorByRange(
567 const uno::Reference<text::XTextRange> & xTextPosition)
570 xCursor->gotoRange(xTextPosition,
false);
597 uno::Reference<text::XText> xParentText,
598 std::unique_ptr<TextRangeList_t const> pPortions)
603 ,
m_xText(new SwXMetaText(rDoc, rThis))
609 inline const ::sw::Meta*
GetMeta()
const;
625 m_pTextPortions.reset();
626 if(rHint.
GetId() != SfxHintId::Dying && rHint.
GetId() != SfxHintId::Deinitializing)
629 m_bIsDisposed =
true;
631 m_xText->Invalidate();
632 uno::Reference<uno::XInterface>
const xThis(m_wThis);
637 lang::EventObject
const ev(xThis);
638 std::unique_lock aGuard(m_Mutex);
639 m_EventListeners.disposeAndClear(aGuard, ev);
648 uno::Reference<text::XText>
const& xParentText,
649 std::unique_ptr<TextRangeList_t const> pPortions)
650 :
m_pImpl( new
SwXMeta::Impl(*this, *pDoc, pMeta, xParentText,
std::move(pPortions)) )
670 xMeta->m_pImpl->m_wThis = xMeta.get();
676 uno::Reference<text::XText>
const& i_xParent,
677 std::unique_ptr<TextRangeList_t const> && pPortions)
689 xMeta->m_pImpl->m_pTextPortions = std::move(pPortions);
691 if (xMeta->m_pImpl->m_xParentText.get() != i_xParent.get())
693 SAL_WARN(
"sw.uno",
"SwXMeta with different parent?");
694 xMeta->m_pImpl->m_xParentText.set(i_xParent);
702 SAL_WARN_IF(!pTextNode,
"sw.uno",
"CreateXMeta: no text node?");
703 if (!pTextNode) {
return nullptr; }
704 uno::Reference<text::XText> xParentText(i_xParent);
705 if (!xParentText.is())
708 SAL_WARN_IF(!pTextAttr,
"sw.uno",
"CreateXMeta: no text attr?");
709 if (!pTextAttr) {
return nullptr; }
710 const SwPosition aPos(*pTextNode, pTextAttr->GetStart());
713 if (!xParentText.is()) {
return nullptr; }
717 std::move(pPortions))
719 std::move(pPortions));
723 xMeta->m_pImpl->m_wThis = xMeta.get();
728 SwTextNode *& rpNode, sal_Int32 & rStart, sal_Int32 & rEnd )
const
741 rEnd = *pTextAttr->
End();
752 sal_Int32 nMetaStart;
754 const bool bSuccess(
SetContentRange(pTextNode, nMetaStart, nMetaEnd) );
755 OSL_ENSURE(bSuccess,
"no pam?");
757 throw lang::DisposedException();
760 if (&pStartPos->
GetNode() != pTextNode)
762 throw lang::IllegalArgumentException(
763 "trying to insert into a nesting text content, but start "
764 "of text range not in same paragraph as text content",
767 bool bForceExpandHints(
false);
771 if ((nStartPos < nMetaStart) || (nStartPos > nMetaEnd))
773 throw lang::IllegalArgumentException(
774 "trying to insert into a nesting text content, but start "
775 "of text range not inside text content",
778 else if (nStartPos == nMetaEnd)
780 bForceExpandHints =
true;
785 if (&pEndPos->
GetNode() != pTextNode)
787 throw lang::IllegalArgumentException(
788 "trying to insert into a nesting text content, but end "
789 "of text range not in same paragraph as text content",
795 if ((nEndPos < nMetaStart) || (nEndPos > nMetaEnd))
797 throw lang::IllegalArgumentException(
798 "trying to insert into a nesting text content, but end "
799 "of text range not inside text content",
802 else if (nEndPos == nMetaEnd)
804 bForceExpandHints =
true;
807 return bForceExpandHints;
823uno::Sequence< OUString > SAL_CALL
827 "com.sun.star.text.TextContent",
828 "com.sun.star.text.InContentMetadata"
835 uno::Reference< lang::XEventListener>
const & xListener )
838 std::unique_lock aGuard(
m_pImpl->m_Mutex);
839 m_pImpl->m_EventListeners.addInterface(aGuard, xListener);
844 uno::Reference< lang::XEventListener>
const & xListener )
847 std::unique_lock aGuard(
m_pImpl->m_Mutex);
848 m_pImpl->m_EventListeners.removeInterface(aGuard, xListener);
858 m_pImpl->m_pTextPortions.reset();
860 std::unique_lock aGuard(
m_pImpl->m_Mutex);
861 m_pImpl->m_EventListeners.disposeAndClear(aGuard, ev);
863 m_pImpl->m_xText->Invalidate();
865 else if (!
m_pImpl->m_bIsDisposed)
868 sal_Int32 nMetaStart;
871 OSL_ENSURE(bSuccess,
"no pam?");
875 SwPaM aPam( *pTextNode, nMetaStart - 1, *pTextNode, nMetaEnd );
880 assert(
m_pImpl->m_bIsDisposed);
887 const sal_uInt16 i_nWhich)
893 throw lang::DisposedException();
897 throw uno::RuntimeException(
898 "SwXMeta::attach(): already attached",
903 OTextCursorHelper *
const pCursor(
dynamic_cast<OTextCursorHelper*
>(i_xTextRange.get()));
904 if (!pRange && !pCursor)
906 throw lang::IllegalArgumentException(
907 "SwXMeta::attach(): argument not supported type",
912 pRange ? &pRange->
GetDoc() : pCursor->GetDoc());
915 throw lang::IllegalArgumentException(
916 "SwXMeta::attach(): argument has no SwDoc",
927 const bool bForceExpandHints(pTextCursor && pTextCursor->
IsAtEndOfMeta());
933 const std::shared_ptr< ::sw::Meta> pMeta( (
RES_TXTATR_META == i_nWhich)
934 ? std::make_shared< ::sw::Meta>(
nullptr )
935 : std::shared_ptr< ::sw::Meta>(
939 SwTextAttr *
const pTextAttr( pMeta->GetTextAttr() );
942 throw lang::IllegalArgumentException(
943 "SwXMeta::attach(): cannot create meta: range invalid?",
948 OSL_FAIL(
"meta inserted, but has no text attribute?");
949 throw uno::RuntimeException(
950 "SwXMeta::attach(): cannot create meta",
955 m_pImpl->m_pMeta = pMeta.get();
956 m_pImpl->StartListening(pMeta->GetNotifier());
957 pMeta->SetXMeta(
this);
961 m_pImpl->m_bIsDescriptor =
false;
971uno::Reference< text::XTextRange > SAL_CALL
978 throw lang::DisposedException();
982 throw uno::RuntimeException(
983 "SwXMeta::getAnchor(): not inserted",
988 sal_Int32 nMetaStart;
991 OSL_ENSURE(bSuccess,
"no pam?");
994 throw lang::DisposedException(
995 "SwXMeta::getAnchor(): not attached",
1005uno::Reference< text::XText > SAL_CALL
1011uno::Reference< text::XTextRange > SAL_CALL
1015 return m_pImpl->m_xText->getStart();
1018uno::Reference< text::XTextRange > SAL_CALL
1022 return m_pImpl->m_xText->getEnd();
1029 return m_pImpl->m_xText->getString();
1036 return m_pImpl->m_xText->setString(rString);
1040uno::Reference< text::XTextCursor > SAL_CALL
1044 return m_pImpl->m_xText->createTextCursor();
1047uno::Reference< text::XTextCursor > SAL_CALL
1049 const uno::Reference<text::XTextRange> & xTextPosition)
1052 return m_pImpl->m_xText->createTextCursorByRange(xTextPosition);
1057 const OUString& rString,
sal_Bool bAbsorb)
1060 return m_pImpl->m_xText->insertString(xRange, rString, bAbsorb);
1065 sal_Int16 nControlCharacter,
sal_Bool bAbsorb)
1068 return m_pImpl->m_xText->insertControlCharacter(xRange, nControlCharacter,
1075 const uno::Reference<text::XTextContent> & xContent,
sal_Bool bAbsorb)
1078 return m_pImpl->m_xText->insertTextContent(xRange, xContent, bAbsorb);
1083 const uno::Reference< text::XTextContent > & xContent)
1086 return m_pImpl->m_xText->removeTextContent(xContent);
1090uno::Reference< uno::XInterface > SAL_CALL
1095 sal_Int32 nMetaStart;
1097 bool const bSuccess(
SetContentRange(pTextNode, nMetaStart, nMetaEnd) );
1098 OSL_ENSURE(bSuccess,
"no pam?");
1099 if (!bSuccess) {
throw lang::DisposedException(); }
1103 uno::Reference<text::XTextContent>
const xRet(
1112 throw lang::NoSupportException(
"setting parent not supported", *
this);
1125 return m_pImpl->m_pMeta !=
nullptr;
1129uno::Reference< container::XEnumeration > SAL_CALL
1136 throw lang::DisposedException();
1140 throw uno::RuntimeException(
1141 "createEnumeration(): not inserted",
1146 sal_Int32 nMetaStart;
1148 const bool bSuccess(
SetContentRange(pTextNode, nMetaStart, nMetaEnd));
1149 OSL_ENSURE(bSuccess,
"no pam?");
1151 throw lang::DisposedException();
1153 SwPaM aPam(*pTextNode, nMetaStart);
1155 if (!
m_pImpl->m_pTextPortions)
1181 return pShell ? pShell->
GetModel() :
nullptr;
1193 uno::Reference<text::XText>
const& xParentText,
1194 std::unique_ptr<TextRangeList_t const> pPortions)
1197 assert(
dynamic_cast< ::
sw::MetaField*
>(pMeta) &&
"SwXMetaField created for wrong hint!");
1213 return "SwXMetaField";
1222uno::Sequence< OUString > SAL_CALL
1226 "com.sun.star.text.TextContent",
1227 "com.sun.star.text.TextField",
1228 "com.sun.star.text.textfield.MetadataField"
1235 uno::Reference< lang::XEventListener>
const & xListener )
1242 uno::Reference< lang::XEventListener>
const & xListener )
1260uno::Reference< text::XTextRange > SAL_CALL
1267uno::Reference< beans::XPropertySetInfo > SAL_CALL
1272 static uno::Reference< beans::XPropertySetInfo > xRef(
1280 const OUString& rPropertyName,
const uno::Any& rValue)
1287 throw lang::DisposedException();
1289 if ( rPropertyName ==
"NumberFormat" )
1291 sal_Int32 nNumberFormat(0);
1292 if (rValue >>= nNumberFormat)
1297 else if ( rPropertyName ==
"IsFixedLanguage" )
1307 throw beans::UnknownPropertyException(rPropertyName);
1318 throw lang::DisposedException();
1322 if ( rPropertyName ==
"NumberFormat" )
1327 else if ( rPropertyName ==
"IsFixedLanguage" )
1333 throw beans::UnknownPropertyException(rPropertyName);
1342 const uno::Reference< beans::XPropertyChangeListener >& )
1344 OSL_FAIL(
"SwXMetaField::addPropertyChangeListener(): not implemented");
1350 const uno::Reference< beans::XPropertyChangeListener >& )
1352 OSL_FAIL(
"SwXMetaField::removePropertyChangeListener(): not implemented");
1358 const uno::Reference< beans::XVetoableChangeListener >& )
1360 OSL_FAIL(
"SwXMetaField::addVetoableChangeListener(): not implemented");
1366 const uno::Reference< beans::XVetoableChangeListener >& )
1368 OSL_FAIL(
"SwXMetaField::removeVetoableChangeListener(): not implemented");
1371static uno::Reference<rdf::XURI>
const&
1374 static uno::Reference< uno::XComponentContext > xContext(
1375 ::comphelper::getProcessComponentContext());
1376 static uno::Reference< rdf::XURI > xOdfPrefix(
1377 rdf::URI::createKnown(xContext, rdf::URIs::ODF_PREFIX),
1378 uno::UNO_SET_THROW);
1379 static uno::Reference< rdf::XURI > xOdfSuffix(
1380 rdf::URI::createKnown(xContext, rdf::URIs::ODF_SUFFIX),
1381 uno::UNO_SET_THROW);
1382 static uno::Reference< rdf::XURI > xOdfShading(
1383 rdf::URI::createKnown(xContext, rdf::URIs::LO_EXT_SHADING),
1384 uno::UNO_SET_THROW);
1387 case rdf::URIs::ODF_PREFIX:
1389 case rdf::URIs::ODF_SUFFIX:
1398 uno::Reference<rdf::XRepository>
const & xRepository,
1399 uno::Reference<rdf::XResource>
const & xMetaField,
1400 uno::Reference<rdf::XURI>
const & xPredicate)
1402 const uno::Reference<container::XEnumeration> xEnum(
1403 xRepository->getStatements(xMetaField, xPredicate,
nullptr),
1404 uno::UNO_SET_THROW);
1405 while (xEnum->hasMoreElements()) {
1406 rdf::Statement stmt;
1407 if (!(xEnum->nextElement() >>= stmt)) {
1408 throw uno::RuntimeException();
1410 const uno::Reference<rdf::XLiteral> xObject(stmt.Object,
1412 if (!xObject.is())
continue;
1413 if (xEnum->hasMoreElements()) {
1414 SAL_INFO(
"sw.uno",
"ignoring other odf:Prefix/odf:Suffix statements");
1416 return xObject->getValue();
1423 const uno::Reference<frame::XModel>& xModel,
1424 const uno::Reference<rdf::XMetadatable>& xMetaField,
1425 OUString *
const o_pPrefix, OUString *
const o_pSuffix, OUString *
const o_pShadingColor)
1428 const uno::Reference<rdf::XRepositorySupplier> xRS(
1429 xModel, uno::UNO_QUERY_THROW);
1430 const uno::Reference<rdf::XRepository> xRepo(
1431 xRS->getRDFRepository(), uno::UNO_SET_THROW);
1432 const uno::Reference<rdf::XResource> xMeta(
1433 xMetaField, uno::UNO_QUERY_THROW);
1442 if (o_pShadingColor)
1446 }
catch (uno::RuntimeException &) {
1448 }
catch (
const uno::Exception &) {
1450 throw lang::WrappedTargetRuntimeException(
"getPrefixAndSuffix: exception",
nullptr, anyEx);
1472 return prefix + content + suffix;
virtual bool DeleteAndJoin(SwPaM &, SwDeleteFlags flags=SwDeleteFlags::Default)=0
complete delete of a given PaM
virtual bool InsertPoolItem(const SwPaM &rRg, const SfxPoolItem &, const SetAttrMode nFlags=SetAttrMode::DEFAULT, SwRootFrame const *pLayout=nullptr, SwTextAttr **ppNewTextAttr=nullptr)=0
Insert an attribute.
css::uno::Reference< css::beans::XPropertySetInfo > const & getPropertySetInfo() const
css::uno::Reference< css::frame::XModel3 > GetModel() const
bool StartListening(SvtBroadcaster &rBroadcaster)
IDocumentContentOperations const & getIDocumentContentOperations() const
::sw::MetaFieldManager & GetMetaFieldManager()
SwDocShell * GetDocShell()
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
SwNodes & GetNodes()
Node is in which nodes-array/doc?
PaM is Point and Mark: a selection of the document model.
const SwPosition * GetMark() const
SwNode & GetPointNode() const
const SwPosition * End() const
const SwPosition * GetPoint() const
const SwPosition * Start() const
bool HasMark() const
A PaM marks a selection if Point and Mark are distinct positions.
Starts a section of nodes in the document model.
A wrapper around SfxPoolItem to store the start position of (usually) a text portion,...
const SwFormatRefMark & GetRefMark() const
const sal_Int32 * End() const
sal_Int32 GetStart() const
SwTextNode is a paragraph in the document model.
std::vector< SwTextAttr * > GetTextAttrsAt(sal_Int32 const nIndex, sal_uInt16 const nWhich) const
get the innermost text attributes covering position nIndex.
SwTextAttr * GetTextAttrForCharAt(const sal_Int32 nIndex, const sal_uInt16 nWhich=RES_TXTATR_END) const
get the text attribute at position nIndex which owns the dummy character CH_TXTATR_* at that position...
const SwTextNode & GetTextNode() const
const SfxItemPropertySet * GetPropertySet(sal_uInt16 PropertyId)
unotools::WeakReference< SwXReferenceMark > m_wThis
void InsertRefMark(SwPaM &rPam, SwXTextCursor const *const pCursor)
Impl(SwDoc *const pDoc, SwFormatRefMark *const pRefMark)
virtual void Notify(const SfxHint &) override
const SwFormatRefMark * m_pMarkFormat
::comphelper::OInterfaceContainerHelper4< css::lang::XEventListener > m_EventListeners
virtual OUString SAL_CALL getName() override
virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getAnchor() override
virtual ~SwXReferenceMark() override
virtual void SAL_CALL setName(const OUString &rName) override
virtual void SAL_CALL setPropertyValue(const OUString &rPropertyName, const css::uno::Any &rValue) override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual void SAL_CALL dispose() override
static rtl::Reference< SwXReferenceMark > CreateXReferenceMark(SwDoc &rDoc, SwFormatRefMark *pMarkFormat)
virtual void SAL_CALL removePropertyChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
::sw::UnoImplPtr< Impl > m_pImpl
virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
SwXReferenceMark(SwDoc *const pDoc, SwFormatRefMark *const pMark)
virtual void SAL_CALL removeVetoableChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &xListener) override
virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
virtual void SAL_CALL attach(const css::uno::Reference< css::text::XTextRange > &xTextRange) override
virtual void SAL_CALL addPropertyChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
virtual sal_Bool SAL_CALL supportsService(const OUString &rServiceName) override
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &rPropertyName) override
virtual OUString SAL_CALL getImplementationName() override
virtual void SAL_CALL addVetoableChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &xListener) override
bool IsAtEndOfMeta() const
void disposeAndClear(::std::unique_lock<::std::mutex > &rGuard, const css::lang::EventObject &rEvt)
virtual void SAL_CALL acquire() SAL_NOEXCEPT SAL_OVERRIDE
virtual void SAL_CALL release() SAL_NOEXCEPT SAL_OVERRIDE
css::uno::Type const & get()
static SwNode * GetStartNode(SwOutlineNodes const *pOutlNds, int nOutlineLevel, SwOutlineNodes::size_type *nOutl)
constexpr TypedWhichId< SwFormatMeta > RES_TXTATR_METAFIELD(49)
constexpr TypedWhichId< SwFormatRefMark > RES_TXTATR_REFMARK(RES_TXTATR_WITHEND_BEGIN)
constexpr TypedWhichId< SwFormatMeta > RES_TXTATR_META(48)
#define SAL_WARN_IF(condition, area, stream)
#define SAL_WARN(area, stream)
#define SAL_INFO(area, stream)
uno::Reference< text::XTextContent > GetNestedTextContent(SwTextNode const &rTextNode, sal_Int32 const nIndex, bool const bParent)
OUString getString(const Any &_rAny)
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
Any SAL_CALL getCaughtException()
uno::Reference< text::XText > CreateParentXText(SwDoc &rDoc, const SwPosition &rPos)
bool XTextRangeToSwPaM(SwUnoInternalPaM &rToFill, const uno::Reference< text::XTextRange > &xTextRange, ::sw::TextRangeMode const eMode)
bool GetDefaultTextContentValue(css::uno::Any &rAny, std::u16string_view rPropertyName, sal_uInt16 nWID=0)
Marks a position in the document model.
sal_Int32 GetContentIndex() const
Reference< XModel > xModel
@ FORCEHINTEXPAND
Force hint expand (only matters for hints with CH_TXTATR).
SwUnoPropertyMapProvider aSwMapProvider
#define PROPERTY_MAP_PARAGRAPH_EXTENSIONS
#define PROPERTY_MAP_METAFIELD
static OUString lcl_getPrefixOrSuffix(uno::Reference< rdf::XRepository > const &xRepository, uno::Reference< rdf::XResource > const &xMetaField, uno::Reference< rdf::XURI > const &xPredicate)
void getPrefixAndSuffix(const uno::Reference< frame::XModel > &xModel, const uno::Reference< rdf::XMetadatable > &xMetaField, OUString *const o_pPrefix, OUString *const o_pSuffix, OUString *const o_pShadingColor)
static uno::Reference< rdf::XURI > const & lcl_getURI(const sal_Int16 eKnown)