25#include <com/sun/star/lang/XServiceInfo.hpp>
26#include <com/sun/star/beans/XPropertySet.hpp>
27#include <com/sun/star/container/XChild.hpp>
28#include <com/sun/star/container/XEnumerationAccess.hpp>
29#include <com/sun/star/text/XTextContent.hpp>
30#include <com/sun/star/text/XTextField.hpp>
31#include <com/sun/star/beans/XPropertySet.hpp>
50 :
public cppu::WeakImplHelper<css::lang::XServiceInfo, css::container::XEnumerationAccess,
51 css::text::XTextContent, css::text::XText,
52 css::beans::XPropertySet>
58 void AttachImpl(
const css::uno::Reference<css::text::XTextRange>& xTextRange,
67 const css::uno::Reference<css::text::XText>& xParentText,
68 std::unique_ptr<const TextRangeList_t> pPortions);
75 const css::uno::Reference<css::text::XText>& xParentText =
nullptr,
76 std::unique_ptr<const TextRangeList_t>&& pPortions
77 = std::unique_ptr<const TextRangeList_t>());
83 const css::uno::Reference<css::text::XText>&
GetParentText()
const;
91 void SAL_CALL
dispose()
override;
93 addEventListener(
const css::uno::Reference<css::lang::XEventListener>& xListener)
override;
95 removeEventListener(
const css::uno::Reference<css::lang::XEventListener>& xListener)
override;
102 css::uno::Reference<css::container::XEnumeration> SAL_CALL
createEnumeration()
override;
105 void SAL_CALL
attach(
const css::uno::Reference<css::text::XTextRange>& xTextRange)
override;
106 css::uno::Reference<css::text::XTextRange> SAL_CALL
getAnchor()
override;
109 css::uno::Reference<css::text::XText> SAL_CALL
getText()
override;
110 css::uno::Reference<css::text::XTextRange> SAL_CALL
getStart()
override;
111 css::uno::Reference<css::text::XTextRange> SAL_CALL
getEnd()
override;
113 void SAL_CALL
setString(
const OUString& rString)
override;
116 css::uno::Reference<css::text::XTextCursor> SAL_CALL
createTextCursor()
override;
118 const css::uno::Reference<css::text::XTextRange>& xTextPosition)
override;
119 void SAL_CALL
insertString(
const css::uno::Reference<css::text::XTextRange>& xRange,
120 const OUString& aString,
sal_Bool bAbsorb)
override;
122 sal_Int16 nControlCharacter,
sal_Bool bAbsorb)
override;
125 void SAL_CALL
insertTextContent(
const css::uno::Reference<css::text::XTextRange>& xRange,
126 const css::uno::Reference<css::text::XTextContent>& xContent,
129 removeTextContent(
const css::uno::Reference<css::text::XTextContent>& xContent)
override;
132 css::uno::Reference<css::beans::XPropertySetInfo> SAL_CALL
getPropertySetInfo()
override;
134 const css::uno::Any& rValue)
override;
135 css::uno::Any SAL_CALL
getPropertyValue(
const OUString& rPropertyName)
override;
137 const OUString& rPropertyName,
138 const css::uno::Reference<css::beans::XPropertyChangeListener>& xListener)
override;
140 const OUString& rPropertyName,
141 const css::uno::Reference<css::beans::XPropertyChangeListener>& xListener)
override;
143 const OUString& rPropertyName,
144 const css::uno::Reference<css::beans::XVetoableChangeListener>& xListener)
override;
146 const OUString& rPropertyName,
147 const css::uno::Reference<css::beans::XVetoableChangeListener>& xListener)
override;
160 sal_Int32 SAL_CALL
getCount()
override;
Stores the properties of a content control.
SfxPoolItem subclass that wraps an SwContentControl.
PaM is Point and Mark: a selection of the document model.
SwTextNode is a paragraph in the document model.
The inner part SwXContentControl, which is deleted with a locked SolarMutex.
UNO API wrapper around an SwContentControl, exposed as the com.sun.star.text.ContentControl service.
void SAL_CALL setString(const OUString &rString) override
SwXContentControl(SwDoc *pDoc, SwContentControl *pContentControl, const css::uno::Reference< css::text::XText > &xParentText, std::unique_ptr< const TextRangeList_t > pPortions)
void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
void SAL_CALL insertControlCharacter(const css::uno::Reference< css::text::XTextRange > &xRange, sal_Int16 nControlCharacter, sal_Bool bAbsorb) override
void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
css::uno::Reference< css::text::XTextCursor > SAL_CALL createTextCursorByRange(const css::uno::Reference< css::text::XTextRange > &xTextPosition) override
void SAL_CALL addVetoableChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &xListener) override
void SAL_CALL dispose() override
css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override
css::uno::Any SAL_CALL getPropertyValue(const OUString &rPropertyName) override
static rtl::Reference< SwXContentControl > CreateXContentControl(SwContentControl &rContentControl, const css::uno::Reference< css::text::XText > &xParentText=nullptr, std::unique_ptr< const TextRangeList_t > &&pPortions=std::unique_ptr< const TextRangeList_t >())
void SAL_CALL setPropertyValue(const OUString &rPropertyName, const css::uno::Any &rValue) override
sal_Bool SAL_CALL hasElements() override
void SAL_CALL removePropertyChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
void SAL_CALL removeVetoableChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &xListener) override
SwXContentControl(const SwXContentControl &)=delete
void SAL_CALL insertTextContent(const css::uno::Reference< css::text::XTextRange > &xRange, const css::uno::Reference< css::text::XTextContent > &xContent, sal_Bool bAbsorb) override
css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
OUString SAL_CALL getImplementationName() override
css::uno::Reference< css::text::XTextRange > SAL_CALL getAnchor() override
css::uno::Reference< css::text::XText > SAL_CALL getText() override
void SAL_CALL insertString(const css::uno::Reference< css::text::XTextRange > &xRange, const OUString &aString, sal_Bool bAbsorb) override
bool SetContentRange(SwTextNode *&rpNode, sal_Int32 &rStart, sal_Int32 &rEnd) const
Initializes params with position of the attribute content (without CH_TXTATR).
css::uno::Reference< css::text::XTextCursor > SAL_CALL createTextCursor() override
const css::uno::Reference< css::text::XText > & GetParentText() const
void SAL_CALL attach(const css::uno::Reference< css::text::XTextRange > &xTextRange) override
css::uno::Type SAL_CALL getElementType() override
void AttachImpl(const css::uno::Reference< css::text::XTextRange > &xTextRange, sal_uInt16 nWhich)
sal_Bool SAL_CALL supportsService(const OUString &rServiceName) override
css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
~SwXContentControl() override
sw::UnoImplPtr< Impl > m_pImpl
void SAL_CALL removeTextContent(const css::uno::Reference< css::text::XTextContent > &xContent) override
void SAL_CALL addPropertyChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
OUString SAL_CALL getString() override
SwXContentControl & operator=(const SwXContentControl &)=delete
css::uno::Reference< css::text::XTextRange > SAL_CALL getEnd() override
css::uno::Reference< css::text::XTextRange > SAL_CALL getStart() override
UNO wrapper around SwContentControlManager.
css::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) override
~SwXContentControls() override
sal_Bool SAL_CALL hasElements() override
SwXContentControls(SwDoc *pDoc)
css::uno::Type SAL_CALL getElementType() override
sal_Int32 SAL_CALL getCount() override
std::unique_ptr< T, UnoImplPtrDeleter< T > > UnoImplPtr
Smart pointer class ensuring that the pointed object is deleted with a locked SolarMutex.
std::deque< css::uno::Reference< css::text::XTextRange > > TextRangeList_t