34#include <unoprnms.hxx>
77 throw uno::RuntimeException(
"SwXLineBreak: disposed or invalid",
nullptr);
86 m_pFormatLineBreak =
nullptr;
91 if (rHint.
GetId() == SfxHintId::Dying)
112 if (pLineBreakFormat)
116 if (!xLineBreak.is())
119 if (pLineBreakFormat)
136 return {
"com.sun.star.text.LineBreak" };
144 throw uno::RuntimeException();
147 auto pRange =
dynamic_cast<SwXTextRange*
>(xTextRange.get());
150 throw lang::IllegalArgumentException();
153 SwDoc& rNewDoc = pRange->GetDoc();
167 m_pImpl->m_pFormatLineBreak = pLineBreak;
168 m_pImpl->StartListening(pLineBreak->GetNotifier());
170 m_pImpl->m_bIsDescriptor =
false;
177 return m_pImpl->GetLineBreakFormatOrThrow().GetAnchor();
182 SAL_WARN(
"sw.uno",
"SwXLineBreak::dispose: not implemented");
199 static uno::Reference<beans::XPropertySetInfo> xRet
205 const css::uno::Any& rValue)
211 throw lang::IllegalArgumentException();
217 if (rValue >>= eValue)
224 m_pImpl->m_pFormatLineBreak->PutValue(rValue, 0);
240 beans::UnknownPropertyException aExcept;
241 aExcept.Message = rPropertyName;
247 auto eValue =
static_cast<sal_Int16
>(
m_pImpl->m_eClear);
252 aRet <<=
m_pImpl->m_pFormatLineBreak->GetEnumValue();
259 const uno::Reference<beans::XPropertyChangeListener>& )
261 SAL_WARN(
"sw.uno",
"SwXLineBreak::addPropertyChangeListener: not implemented");
266 const uno::Reference<beans::XPropertyChangeListener>& )
268 SAL_WARN(
"sw.uno",
"SwXLineBreak::removePropertyChangeListener: not implemented");
273 const uno::Reference<beans::XVetoableChangeListener>& )
275 SAL_WARN(
"sw.uno",
"SwXLineBreak::addVetoableChangeListener: not implemented");
280 const uno::Reference<beans::XVetoableChangeListener>& )
282 SAL_WARN(
"sw.uno",
"SwXLineBreak::removeVetoableChangeListener: not implemented");
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
bool StartListening(SvtBroadcaster &rBroadcaster)
IDocumentContentOperations const & getIDocumentContentOperations() const
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
SwNode & GetPointNode() const
const SwPosition * GetPoint() const
SwTextAttr subclass that tracks the location of the wrapped SwFormatLineBreak.
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 SfxItemPropertySet * GetPropertySet(sal_uInt16 PropertyId)
The inner part SwXLineBreak, which is deleted with a locked SolarMutex.
SwFormatLineBreak * m_pFormatLineBreak
Impl(SwFormatLineBreak *const pLineBreak)
void Notify(const SfxHint &rHint) override
SwLineBreakClear m_eClear
const SwFormatLineBreak & GetLineBreakFormatOrThrow() const
const SwFormatLineBreak * GetLineBreakFormat() const
UNO API wrapper around an SwFormatLineBreak, exposed as the com.sun.star.text.LineBreak service.
css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
void SAL_CALL addPropertyChangeListener(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
css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
css::uno::Any SAL_CALL getPropertyValue(const OUString &rPropertyName) override
::sw::UnoImplPtr< Impl > m_pImpl
void SAL_CALL addVetoableChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &xListener) override
void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
void SAL_CALL removePropertyChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
css::uno::Reference< css::text::XTextRange > SAL_CALL getAnchor() override
void SAL_CALL attach(const css::uno::Reference< css::text::XTextRange > &xTextRange) override
sal_Bool SAL_CALL supportsService(const OUString &rServiceName) override
void SAL_CALL setPropertyValue(const OUString &rPropertyName, const css::uno::Any &rValue) override
static rtl::Reference< SwXLineBreak > CreateXLineBreak(SwFormatLineBreak *pLineBreakFormat)
void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
OUString SAL_CALL getImplementationName() override
void SAL_CALL dispose() override
constexpr TypedWhichId< SwFormatLineBreak > RES_TXTATR_LINEBREAK(61)
#define SAL_WARN(area, stream)
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
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)
sal_Int32 GetContentIndex() const
SwUnoPropertyMapProvider aSwMapProvider
#define PROPERTY_MAP_LINEBREAK
constexpr OUStringLiteral UNO_NAME_CLEAR