25 #include <osl/diagnose.h>
31 #include <unotext.hxx>
36 #include <unoprnms.hxx>
44 #include <com/sun/star/beans/SetPropertyTolerantFailed.hpp>
45 #include <com/sun/star/beans/GetPropertyTolerantResult.hpp>
46 #include <com/sun/star/beans/TolerantPropertySetResultType.hpp>
47 #include <com/sun/star/beans/PropertyAttribute.hpp>
48 #include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
49 #include <com/sun/star/text/WrapTextMode.hpp>
50 #include <com/sun/star/text/TextContentAnchorType.hpp>
52 #include <com/sun/star/drawing/BitmapMode.hpp>
68 explicit SwParaSelection(
SwCursor & rCursor);
74 SwParaSelection::SwParaSelection(
SwCursor & rCursor)
77 if (m_rCursor.HasMark())
79 m_rCursor.DeleteMark();
82 if (m_rCursor.GetPoint()->nContent != 0)
87 if (m_rCursor.GetPoint()->nContent != m_rCursor.GetContentNode()->Len())
94 SwParaSelection::~SwParaSelection()
96 if (m_rCursor.GetPoint()->nContent != 0)
98 m_rCursor.DeleteMark();
109 bool &rAttrSetFetched );
128 SwTextNode*
const pTextNode =
nullptr, uno::Reference<text::XText>
const& xParent =
nullptr,
129 const sal_Int32 nSelStart = -1,
const sal_Int32 nSelEnd = -1)
132 , m_bIsDescriptor(nullptr == pTextNode)
133 , m_nSelectionStartPos(nSelStart)
134 , m_nSelectionEndPos(nSelEnd)
135 , m_xParentText(xParent)
136 , m_pTextNode(pTextNode)
147 throw uno::RuntimeException(
"SwXParagraph: disposed or invalid",
nullptr);
160 const uno::Sequence< OUString >& rPropertyNames,
161 const uno::Sequence< uno::Any >& rValues);
166 uno::Sequence< uno::Any >
168 const uno::Sequence< OUString >& rPropertyNames);
177 uno::Sequence< beans::GetDirectPropertyTolerantResult >
179 const uno::Sequence< OUString >& rPropertyNames,
180 bool bDirectValuesOnly);
188 if(rHint.
GetId() == SfxHintId::Dying)
191 uno::Reference<uno::XInterface>
const xThis(
m_wThis);
196 lang::EventObject
const ev(xThis);
197 std::unique_lock aGuard(
m_Mutex);
208 uno::Reference< text::XText >
const & xParent,
210 const sal_Int32 nSelStart,
const sal_Int32 nSelEnd)
212 new
SwXParagraph::Impl(*this, &rTextNode, xParent, nSelStart, nSelEnd))
227 return m_pImpl->IsDescriptor();
230 uno::Reference<text::XTextContent>
232 uno::Reference< text::XText>
const& i_xParent,
233 const sal_Int32 nSelStart,
const sal_Int32 nSelEnd)
237 uno::Reference<text::XTextContent> xParagraph;
238 if (pTextNode && (-1 == nSelStart) && (-1 == nSelEnd))
248 uno::Reference<text::XText> xParentText(i_xParent);
249 if (!xParentText.is() && pTextNode)
255 ?
new SwXParagraph(xParentText, *pTextNode, nSelStart, nSelEnd)
258 xParagraph.set(pXPara);
260 if (pTextNode && (-1 == nSelStart) && (-1 == nSelEnd))
265 pXPara->
m_pImpl->m_wThis = xParagraph;
288 return theSwXParagraphUnoTunnelId.
getSeq();
294 return comphelper::getSomethingImpl<SwXParagraph>(rId,
this);
300 return "SwXParagraph";
309 uno::Sequence< OUString > SAL_CALL
313 "com.sun.star.text.TextContent",
314 "com.sun.star.text.Paragraph",
315 "com.sun.star.style.CharacterProperties",
316 "com.sun.star.style.CharacterPropertiesAsian",
317 "com.sun.star.style.CharacterPropertiesComplex",
318 "com.sun.star.style.ParagraphProperties",
319 "com.sun.star.style.ParagraphPropertiesAsian",
320 "com.sun.star.style.ParagraphPropertiesComplex"
327 OSL_ENSURE(
m_pImpl->m_bIsDescriptor,
"Paragraph is not a descriptor");
331 m_pImpl->m_bIsDescriptor =
false;
334 rTextNode.
SetXParagraph(uno::Reference<text::XTextContent>(
this));
335 m_pImpl->m_xParentText = &rParent;
336 if (!
m_pImpl->m_sText.isEmpty())
344 uno::Reference< beans::XPropertySetInfo > SAL_CALL
349 static uno::Reference< beans::XPropertySetInfo > xRef =
350 m_pImpl->m_rPropSet.getPropertySetInfo();
359 m_pImpl->SetPropertyValues_Impl( { rPropertyName }, { rValue } );
366 uno::Sequence<OUString> aPropertyNames { rPropertyName };
367 const uno::Sequence< uno::Any > aRet =
368 m_pImpl->GetPropertyValues_Impl(aPropertyNames);
369 return aRet.getConstArray()[0];
373 const uno::Sequence< OUString >& rPropertyNames,
374 const uno::Sequence< uno::Any >& rValues )
380 const OUString* pPropertyNames = rPropertyNames.getConstArray();
383 SwParaSelection aParaSel( aCursor );
385 uno::Sequence< beans::PropertyValue > aValues( rPropertyNames.getLength() );
386 auto aValuesRange = asNonConstRange(aValues);
387 for (sal_Int32 nProp = 0; nProp < rPropertyNames.getLength(); nProp++)
393 throw beans::UnknownPropertyException(
394 "Unknown property: " + pPropertyNames[nProp],
395 static_cast< cppu::OWeakObject * >(&
m_rThis));
397 if (pEntry->
nFlags & beans::PropertyAttribute::READONLY)
399 throw beans::PropertyVetoException(
400 "Property is read-only: " + pPropertyNames[nProp],
401 static_cast< cppu::OWeakObject * >(&
m_rThis));
403 aValuesRange[nProp].Name = pPropertyNames[nProp];
404 aValuesRange[nProp].Value = pValues[nProp];
410 const uno::Sequence< OUString >& rPropertyNames,
411 const uno::Sequence< uno::Any >& rValues )
418 m_pImpl->SetPropertyValues_Impl( rPropertyNames, rValues );
420 catch (
const beans::UnknownPropertyException &rException)
424 lang::WrappedTargetException aWExc;
425 aWExc.TargetException <<= rException;
444 if(!aOriginalBrushItem->QueryValue(rAny, rEntry.
nMemberId))
446 OSL_ENSURE(
false,
"Error getting attribute from RES_BACKGROUND (!)");
456 rAny <<= drawing::BitmapMode_REPEAT;
460 rAny <<= drawing::BitmapMode_STRETCH;
464 rAny <<= drawing::BitmapMode_NO_REPEAT;
477 m_rPropSet.getPropertyValue(rEntry, rSet, rAny);
486 rAny <<= static_cast<sal_Int16>(nValue);
491 if(!(rEntry.
nMoreFlags & PropertyMoreFlags::METRIC_ITEM))
512 if(eMapUnit != MapUnit::Map100thMM)
520 const uno::Sequence< OUString > & rPropertyNames )
524 uno::Sequence< uno::Any > aValues(rPropertyNames.getLength());
528 const OUString* pPropertyNames = rPropertyNames.getConstArray();
531 for (sal_Int32 nProp = 0; nProp < rPropertyNames.getLength(); nProp++)
537 throw beans::UnknownPropertyException(
538 "Unknown property: " + pPropertyNames[nProp],
539 static_cast< cppu::OWeakObject * >(&m_rThis));
542 pValues[nProp], pPropertyNames[nProp], pEntry->
nWID))
544 beans::PropertyState eTemp;
546 *pEntry, aPam, &(pValues[nProp]), eTemp, &rTextNode );
549 GetSinglePropertyValue_Impl(*pEntry, rAttrSet, pValues[nProp]);
556 uno::Sequence< uno::Any > SAL_CALL
560 uno::Sequence< uno::Any > aValues;
565 aValues =
m_pImpl->GetPropertyValues_Impl( rPropertyNames );
567 catch (beans::UnknownPropertyException &)
570 throw css::lang::WrappedTargetRuntimeException(
"Unknown property exception caught",
571 static_cast < cppu::OWeakObject * > (
this ), anyEx );
573 catch (lang::WrappedTargetException &)
576 throw css::lang::WrappedTargetRuntimeException(
"WrappedTargetException caught",
577 static_cast < cppu::OWeakObject * > (
this ), anyEx );
584 const uno::Sequence< OUString >& ,
585 const uno::Reference< beans::XPropertiesChangeListener >& )
587 OSL_FAIL(
"SwXParagraph::addPropertiesChangeListener(): not implemented");
591 const uno::Reference< beans::XPropertiesChangeListener >& )
593 OSL_FAIL(
"SwXParagraph::removePropertiesChangeListener(): not implemented");
597 const uno::Sequence< OUString >& ,
598 const uno::Reference< beans::XPropertiesChangeListener >& )
600 OSL_FAIL(
"SwXParagraph::firePropertiesChangeEvent(): not implemented");
605 uno::Sequence< beans::SetPropertyTolerantFailed > SAL_CALL
607 const uno::Sequence< OUString >& rPropertyNames,
608 const uno::Sequence< uno::Any >& rValues )
612 if (rPropertyNames.getLength() != rValues.getLength())
614 throw lang::IllegalArgumentException();
623 const sal_Int32 nProps = rPropertyNames.getLength();
624 const OUString *pProp = rPropertyNames.getConstArray();
627 const uno::Any *pValue = rValues.getConstArray();
629 sal_Int32 nFailed = 0;
630 uno::Sequence< beans::SetPropertyTolerantFailed > aFailed( nProps );
631 beans::SetPropertyTolerantFailed *pFailed = aFailed.getArray();
635 m_pImpl->m_rPropSet.getPropertyMap();
639 SwParaSelection aParaSel( aCursor );
640 for (sal_Int32
i = 0;
i < nProps; ++
i)
644 pFailed[ nFailed ].Name = pProp[
i];
650 pFailed[ nFailed++ ].Result =
651 beans::TolerantPropertySetResultType::UNKNOWN_PROPERTY;
657 if (pEntry->
nFlags & beans::PropertyAttribute::READONLY)
659 pFailed[ nFailed++ ].Result =
660 beans::TolerantPropertySetResultType::PROPERTY_VETO;
665 aCursor,
m_pImpl->m_rPropSet, pProp[i], pValue[i]);
669 catch (beans::UnknownPropertyException &)
673 pFailed[ nFailed++ ].Result =
674 beans::TolerantPropertySetResultType::UNKNOWN_PROPERTY;
676 catch (lang::IllegalArgumentException &)
678 pFailed[ nFailed++ ].Result =
679 beans::TolerantPropertySetResultType::ILLEGAL_ARGUMENT;
681 catch (beans::PropertyVetoException &)
683 pFailed[ nFailed++ ].Result =
684 beans::TolerantPropertySetResultType::PROPERTY_VETO;
686 catch (lang::WrappedTargetException &)
688 pFailed[ nFailed++ ].Result =
689 beans::TolerantPropertySetResultType::WRAPPED_TARGET;
693 aFailed.realloc( nFailed );
697 uno::Sequence< beans::GetPropertyTolerantResult > SAL_CALL
699 const uno::Sequence< OUString >& rPropertyNames )
703 const uno::Sequence< beans::GetDirectPropertyTolerantResult > aTmpRes(
704 m_pImpl->GetPropertyValuesTolerant_Impl( rPropertyNames,
false ) );
707 const sal_Int32 nLen = aTmpRes.getLength();
708 uno::Sequence< beans::GetPropertyTolerantResult > aRes( nLen );
709 std::copy(aTmpRes.begin(), aTmpRes.end(), aRes.getArray());
713 uno::Sequence< beans::GetDirectPropertyTolerantResult > SAL_CALL
715 const uno::Sequence< OUString >& rPropertyNames )
719 return m_pImpl->GetPropertyValuesTolerant_Impl( rPropertyNames,
true );
722 uno::Sequence< beans::GetDirectPropertyTolerantResult >
724 const uno::Sequence< OUString >& rPropertyNames,
725 bool bDirectValuesOnly )
737 sal_Int32 nProps = rPropertyNames.getLength();
739 uno::Sequence< beans::GetDirectPropertyTolerantResult > aResult( nProps );
740 beans::GetDirectPropertyTolerantResult *pResult = aResult.getArray();
746 for (
const OUString& rProp : rPropertyNames)
748 OSL_ENSURE( nIdx < nProps,
"index out of bounds" );
749 beans::GetDirectPropertyTolerantResult &rResult = pResult[nIdx];
753 rResult.Name = rProp;
760 beans::TolerantPropertySetResultType::UNKNOWN_PROPERTY;
766 bool bAttrSetFetched =
true;
768 rTextNode, &pAttrSet, *pEntry, bAttrSetFetched );
769 rResult.State = eState;
771 rResult.Result = beans::TolerantPropertySetResultType::UNKNOWN_FAILURE;
772 if (!bDirectValuesOnly ||
773 (beans::PropertyState_DIRECT_VALUE == eState))
779 aValue, rProp, pEntry->
nWID ) )
785 beans::PropertyState eTemp;
788 *pEntry, aPam, &aValue, eTemp, &rTextNode );
793 GetSinglePropertyValue_Impl(*pEntry, rValueAttrSet, aValue);
797 rResult.Value = aValue;
798 rResult.Result = beans::TolerantPropertySetResultType::SUCCESS;
803 OSL_ENSURE( nIdx < 1 || pResult[nIdx - 1].
Result != beans::TolerantPropertySetResultType::UNKNOWN_FAILURE,
804 "unknown failure while retrieving property" );
808 catch (beans::UnknownPropertyException &)
812 rResult.Result = beans::TolerantPropertySetResultType::UNKNOWN_PROPERTY;
814 catch (lang::IllegalArgumentException &)
816 rResult.Result = beans::TolerantPropertySetResultType::ILLEGAL_ARGUMENT;
818 catch (beans::PropertyVetoException &)
820 rResult.Result = beans::TolerantPropertySetResultType::PROPERTY_VETO;
822 catch (lang::WrappedTargetException &)
824 rResult.Result = beans::TolerantPropertySetResultType::WRAPPED_TARGET;
829 aResult.realloc( nIdx );
835 uno::Any& rAny, std::u16string_view rPropertyName, sal_uInt16 nWID)
854 { uno::Sequence<text::TextContentAnchorType>
aTypes { text::TextContentAnchorType_AT_PARAGRAPH };
867 const uno::Reference< beans::XPropertyChangeListener >& )
869 OSL_FAIL(
"SwXParagraph::addPropertyChangeListener(): not implemented");
875 const uno::Reference< beans::XPropertyChangeListener >& )
877 OSL_FAIL(
"SwXParagraph::removePropertyChangeListener(): not implemented");
883 const uno::Reference< beans::XVetoableChangeListener >& )
885 OSL_FAIL(
"SwXParagraph::addVetoableChangeListener(): not implemented");
891 const uno::Reference< beans::XVetoableChangeListener >& )
893 OSL_FAIL(
"SwXParagraph::removeVetoableChangeListener(): not implemented");
900 bool &rAttrSetFetched)
902 beans::PropertyState eRet(beans::PropertyState_DEFAULT_VALUE);
904 if(!(*ppSet) && !rAttrSetFetched)
907 rAttrSetFetched =
true;
932 eRet = beans::PropertyState_DIRECT_VALUE;
958 eRet = pFormat ? beans::PropertyState_DIRECT_VALUE : beans::PropertyState_AMBIGUOUS_VALUE;
966 eRet = !sVal.isEmpty() ? beans::PropertyState_DIRECT_VALUE
967 : beans::PropertyState_AMBIGUOUS_VALUE;
980 eRet = beans::PropertyState_DIRECT_VALUE;
984 eRet = beans::PropertyState_AMBIGUOUS_VALUE;
998 eRet = beans::PropertyState_DIRECT_VALUE;
1008 if((*ppSet) && SfxItemState::SET == (*ppSet)->GetItemState(rEntry.
nWID,
false))
1010 eRet = beans::PropertyState_DIRECT_VALUE;
1017 beans::PropertyState SAL_CALL
1026 m_pImpl->m_rPropSet.getPropertyMap().getByName(rPropertyName);
1029 throw beans::UnknownPropertyException(
1030 "Unknown property: " + rPropertyName,
1031 static_cast<cppu::OWeakObject *>(
this));
1033 bool bDummy =
false;
1034 const beans::PropertyState eRet =
1039 uno::Sequence< beans::PropertyState > SAL_CALL
1041 const uno::Sequence< OUString >& PropertyNames)
1047 const OUString* pNames = PropertyNames.getConstArray();
1048 uno::Sequence< beans::PropertyState > aRet(PropertyNames.getLength());
1049 beans::PropertyState* pStates = aRet.getArray();
1052 bool bAttrSetFetched =
false;
1054 for (sal_Int32
i = 0, nEnd = PropertyNames.getLength();
i < nEnd;
1055 ++
i, ++pStates, ++pNames)
1061 throw beans::UnknownPropertyException(
1062 "Unknown property: " + *pNames,
1063 static_cast<cppu::OWeakObject *>(
this));
1066 if (bAttrSetFetched && !pSet &&
isATR(pEntry->
nWID))
1068 *pStates = beans::PropertyState_DEFAULT_VALUE;
1073 rTextNode, &pSet, *pEntry, bAttrSetFetched );
1089 if (rPropertyName == UNO_NAME_ANCHOR_TYPE ||
1090 rPropertyName == UNO_NAME_ANCHOR_TYPES ||
1097 SwParaSelection aParaSel( aCursor );
1099 m_pImpl->m_rPropSet.getPropertyMap().getByName( rPropertyName );
1102 throw beans::UnknownPropertyException(
1103 "Unknown property: " + rPropertyName,
1104 static_cast<cppu::OWeakObject *>(
this));
1107 if (pEntry->
nFlags & beans::PropertyAttribute::READONLY)
1109 throw uno::RuntimeException(
1110 "Property is read-only: " + rPropertyName,
1111 static_cast<cppu::OWeakObject *>(
this));
1115 const bool bDrawingLayerRange(XATTR_FILL_FIRST <= pEntry->nWID &&
XATTR_FILL_LAST >= pEntry->
nWID);
1117 if(bBelowFrameAtrEnd || bDrawingLayerRange)
1149 *pTemp->GetPoint() = aEnd;
1159 pTemp->GetDoc().ResetAttrs(*pTemp,
true, aWhichIds);
1182 m_pImpl->m_rPropSet.getPropertyMap().getByName(rPropertyName);
1185 throw beans::UnknownPropertyException(
1186 "Unknown property: " + rPropertyName,
1187 static_cast<cppu::OWeakObject *>(
this));
1191 const bool bDrawingLayerRange(XATTR_FILL_FIRST <= pEntry->nWID &&
XATTR_FILL_LAST >= pEntry->
nWID);
1193 if(bBelowFrameAtrEnd || bDrawingLayerRange)
1195 const SfxPoolItem& rDefItem = rTextNode.GetDoc().GetAttrPool().GetDefaultItem(pEntry->
nWID);
1210 throw uno::RuntimeException();
1213 uno::Reference< text::XTextRange > SAL_CALL
1223 SwParaSelection aParaSel( aCursor );
1224 const uno::Reference< text::XTextRange > xRet =
1237 pTextNode->GetDoc().getIDocumentContentOperations().DelFullPara(aCursor);
1238 lang::EventObject
const ev(static_cast< ::cppu::OWeakObject&>(*
this));
1239 std::unique_lock aGuard2(
m_pImpl->m_Mutex);
1240 m_pImpl->m_EventListeners.disposeAndClear(aGuard2, ev);
1245 const uno::Reference< lang::XEventListener > & xListener)
1248 std::unique_lock aGuard(
m_pImpl->m_Mutex);
1249 m_pImpl->m_EventListeners.addInterface(aGuard, xListener);
1253 const uno::Reference< lang::XEventListener > & xListener)
1256 std::unique_lock aGuard(
m_pImpl->m_Mutex);
1257 m_pImpl->m_EventListeners.removeInterface(aGuard, xListener);
1260 uno::Reference< container::XEnumeration > SAL_CALL
1268 SwPaM aPam ( aPos );
1269 const uno::Reference< container::XEnumeration > xRef =
1286 uno::Reference< text::XText > SAL_CALL
1291 return m_pImpl->m_xParentText;
1294 uno::Reference< text::XTextRange > SAL_CALL
1303 SwParaSelection aParaSel( aCursor );
1305 uno::Reference< text::XText > xParent =
getText();
1306 const uno::Reference< text::XTextRange > xRet =
1311 uno::Reference< text::XTextRange > SAL_CALL
1320 SwParaSelection aParaSel( aCursor );
1322 uno::Reference< text::XText > xParent =
getText();
1323 const uno::Reference< text::XTextRange > xRet =
1337 SwParaSelection aParaSel( aCursor );
1340 else if (
m_pImpl->IsDescriptor())
1348 SAL_WARN(
"sw.uno",
"getString() for invalid paragraph called. Returning empty string.");
1366 if (pTextNode->
GetText().getLength()) {
1372 else if (
m_pImpl->IsDescriptor())
1378 throw uno::RuntimeException();
1382 uno::Reference< container::XEnumeration > SAL_CALL
1387 if ( rServiceName !=
"com.sun.star.text.TextContent" )
1389 throw uno::RuntimeException();
1396 uno::Reference< container::XEnumeration > xRet =
1401 uno::Sequence< OUString > SAL_CALL
1404 uno::Sequence<OUString> aRet {
"com.sun.star.text.TextContent" };
1420 SwDocShell const*
const pShell( pTextNode->GetDoc().GetDocShell() );
1421 return pShell ? pShell->
GetModel() :
nullptr;
void disposeAndClear(::std::unique_lock<::std::mutex > &rGuard, const css::lang::EventObject &rEvt)
bool MovePara(SwWhichPara, SwMoveFnCollection const &)
std::shared_ptr< SwUnoCursor > CreateUnoCursor(const SwPosition &rPos, bool bTableCursor=false)
constexpr TypedWhichId< SwFormatSurround > RES_SURROUND(101)
SwMoveFnCollection const & fnParaEnd
void GetSinglePropertyValue_Impl(const SfxItemPropertyMapEntry &rEntry, const SfxItemSet &rSet, uno::Any &rAny) const
#define MID_SURROUND_SURROUNDTYPE
virtual css::uno::Sequence< css::uno::Any > SAL_CALL getPropertyValues(const css::uno::Sequence< OUString > &rPropertyNames) override
Marks a position in the document model.
void attachToText(SwXText &rParent, SwTextNode &rTextNode)
for SwXText
bool getCursorPropertyValue(const SfxItemPropertyMapEntry &rEntry, SwPaM &rPam, Any *pAny, PropertyState &eState, const SwTextNode *pNode)
virtual sal_Bool SAL_CALL supportsService(const OUString &rServiceName) override
virtual void SAL_CALL setPropertyValue(const OUString &rPropertyName, const css::uno::Any &rValue) override
const OUString & GetText() const
bool GoCurrPara(SwPaM &rPam, SwMoveFnCollection const &aPosPara)
Impl(SwXParagraph &rThis, SwTextNode *const pTextNode=nullptr, uno::Reference< text::XText > const &xParent=nullptr, const sal_Int32 nSelStart=-1, const sal_Int32 nSelEnd=-1)
std::unique_ptr< SvxBrushItem > getSvxBrushItemFromSourceSet(const SfxItemSet &rSourceSet, sal_uInt16 nBackgroundID, bool bSearchInParents, bool bXMLImportHack)
constexpr TypedWhichId< SfxMetricItem > XATTR_FILLBMP_SIZEX(XATTR_FILL_FIRST+9)
virtual void SAL_CALL addPropertiesChangeListener(const css::uno::Sequence< OUString > &rPropertyNames, const css::uno::Reference< css::beans::XPropertiesChangeListener > &xListener) override
static css::uno::Reference< css::text::XTextContent > CreateXParagraph(SwDoc &rDoc, SwTextNode *pTextNode, css::uno::Reference< css::text::XText > const &xParentText=nullptr, const sal_Int32 nSelStart=-1, const sal_Int32 nSelEnd=-1)
virtual css::uno::Sequence< css::beans::GetPropertyTolerantResult > SAL_CALL getPropertyValuesTolerant(const css::uno::Sequence< OUString > &rPropertyNames) override
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createContentEnumeration(const OUString &rServiceName) override
const SwPosition * GetMark() const
virtual void SAL_CALL removePropertyChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
uno::WeakReference< uno::XInterface > m_wThis
bool HasContinueList() const
Is it possible that this numbering has multiple lists?
void getNumberingProperty(SwPaM &rPam, PropertyState &eState, Any *pAny)
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
css::uno::Reference< css::frame::XModel3 > GetModel() const
bool isATR(const sal_uInt16 nWhich)
constexpr sal_uInt16 RES_FRMATR_END(133)
SwMoveFnCollection const & fnParaStart
virtual css::uno::Any SAL_CALL getPropertyDefault(const OUString &rPropertyName) override
virtual css::uno::Sequence< css::beans::GetDirectPropertyTolerantResult > SAL_CALL getDirectPropertyValuesTolerant(const css::uno::Sequence< OUString > &rPropertyNames) override
::comphelper::OInterfaceContainerHelper4< css::lang::XEventListener > m_EventListeners
virtual sal_Bool SAL_CALL hasElements() override
void SetPropertyValues(SwPaM &rPaM, const SfxItemPropertySet &rPropSet, const css::uno::Sequence< css::beans::PropertyValue > &rPropertyValues, const SetAttrMode nAttrMode=SetAttrMode::DEFAULT)
SAL_DLLPRIVATE css::uno::WeakReference< css::text::XTextContent > const & GetXParagraph() const
void resetCursorPropertyValue(const SfxItemPropertyMapEntry &rEntry, SwPaM &rPam)
virtual void SAL_CALL removeVetoableChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &xListener) override
bool SelectPaM(SwPaM &rPaM)
make rPaM select the paragraph
#define UNO_NAME_TEXT_WRAP
const SfxItemPropertyMapEntry * getByName(std::u16string_view rName) const
void SetString(SwCursor &rCursor, const OUString &rString)
virtual MapUnit GetMetric(sal_uInt16 nWhich) const
virtual css::uno::Reference< css::frame::XModel > GetModel() override
sal_Int32 m_nSelectionEndPos
virtual OUString SAL_CALL getString() override
constexpr sal_uInt16 RES_PARATR_BEGIN(RES_TXTATR_END)
Any SAL_CALL getCaughtException()
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt8 nMemberId=0) const
void ResetAttrs(const SwPaM &rRg, bool bTextAttr=true, const o3tl::sorted_vector< sal_uInt16 > &rAttrs=o3tl::sorted_vector< sal_uInt16 >(), const bool bSendDataChangedEvents=true, SwRootFrame const *pLayout=nullptr)
Reset attributes.
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
virtual ::sfx2::Metadatable * GetCoreObject() override
::sw::UnoImplPtr< Impl > m_pImpl
void GetTextFromPam(SwPaM &rPam, OUString &rBuffer, SwRootFrame const *pLayout=nullptr)
#define FN_UNO_PARA_CONDITIONAL_STYLE_NAME
virtual void SAL_CALL addPropertyChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
virtual css::uno::Sequence< css::beans::SetPropertyTolerantFailed > SAL_CALL setPropertyValuesTolerant(const css::uno::Sequence< OUString > &rPropertyNames, const css::uno::Sequence< css::uno::Any > &rValues) override
virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getAnchor() override
void SelectPam(SwPaM &rPam, const bool bExpand)
const css::uno::Sequence< sal_Int8 > & getSeq() const
static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId()
uno::Sequence< uno::Any > GetPropertyValues_Impl(const uno::Sequence< OUString > &rPropertyNames)
#define FN_UNO_PAGE_STYLE
PaM is Point and Mark: a selection of the document model.
const SwAttrSet * GetpSwAttrSet() const
virtual void SAL_CALL addVetoableChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &xListener) override
bool GetDefaultTextContentValue(css::uno::Any &rAny, std::u16string_view rPropertyName, sal_uInt16 nWID=0)
bool IsEndOfPara(SwPaM &rUnoCursor)
#define MID_ANCHOR_ANCHORTYPE
#define TOOLS_WARN_EXCEPTION(area, stream)
virtual void Notify(const SfxHint &rHint) override
const SwPosition * GetPoint() const
virtual void SAL_CALL setString(const OUString &rString) override
SwTextNode * GetTextNode()
bool IsDescriptor() const
bool needToMapFillItemsToSvxBrushItemTypes(const SfxItemSet &rSet, sal_uInt16 const nMID)
helper to check if fill style is set to color or bitmap and thus formerly used SvxBrushItem parts nee...
virtual ~SwXParagraph() override
bool IsStartOfPara(SwPaM &rUnoCursor)
const SfxItemPropertyMap & getPropertyMap() const
SwNumRule * GetNumRule(bool bInParent=true) const
Returns numbering rule of this text node.
virtual void SAL_CALL setPropertyValues(const css::uno::Sequence< OUString > &rPropertyNames, const css::uno::Sequence< css::uno::Any > &rValues) override
PropertyMoreFlags nMoreFlags
virtual OUString SAL_CALL getImplementationName() override
css::uno::Type const & get()
bool StartListening(SvtBroadcaster &rBroadcaster)
SfxItemPool * GetPool() const
virtual void SAL_CALL dispose() override
const SwPosition * Start() const
virtual void SAL_CALL removePropertiesChangeListener(const css::uno::Reference< css::beans::XPropertiesChangeListener > &xListener) override
virtual sal_Int64 SAL_CALL getSomething(const css::uno::Sequence< sal_Int8 > &rIdentifier) override
virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getEnd() override
SvtBroadcaster & GetNotifier()
virtual void SAL_CALL attach(const css::uno::Reference< css::text::XTextRange > &xTextRange) override
uno::Sequence< beans::GetDirectPropertyTolerantResult > GetPropertyValuesTolerant_Impl(const uno::Sequence< OUString > &rPropertyNames, bool bDirectValuesOnly)
const PropertyValue * pValues
SwTextNode is a paragraph in the document model.
#define PROPERTY_MAP_PARAGRAPH
#define OWN_ATTR_FILLBMP_MODE
void SetPropertyValues_Impl(const uno::Sequence< OUString > &rPropertyNames, const uno::Sequence< uno::Any > &rValues)
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &rPropertyName) override
constexpr TypedWhichId< SvxBrushItem > RES_BACKGROUND(105)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
#define UNO_NAME_ANCHOR_TYPE
constexpr TypedWhichId< XFillBmpStretchItem > XATTR_FILLBMP_STRETCH(XATTR_FILL_FIRST+16)
virtual css::uno::Type SAL_CALL getElementType() override
void SvxUnoConvertToMM(const MapUnit eSourceMapUnit, uno::Any &rMetric) noexcept
#define FN_UNO_ANCHOR_TYPE
SwTextNode & GetTextNodeOrThrow()
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
void SetPropertyValue(SwPaM &rPaM, const SfxItemPropertySet &rPropSet, const OUString &rPropertyName, const css::uno::Any &rValue, const SetAttrMode nAttrMode=SetAttrMode::DEFAULT)
const SwPosition * End() const
bool IsDescriptor() const
constexpr TypedWhichId< XFillBmpTileItem > XATTR_FILLBMP_TILE(XATTR_FILL_FIRST+7)
const SwTextNode * GetTextNode() const
virtual void SAL_CALL firePropertiesChangeEvent(const css::uno::Sequence< OUString > &rPropertyNames, const css::uno::Reference< css::beans::XPropertiesChangeListener > &xListener) override
SwUnoPropertyMapProvider aSwMapProvider
static rtl::Reference< SwXParaFrameEnumeration > Create(const SwPaM &rPaM, const enum ParaFrameMode eParaFrameMode, SwFrameFormat *const pFormat=nullptr)
#define FN_UNO_ANCHOR_TYPES
const SwAttrSet & GetSwAttrSet() const
Does node has already its own auto-attributes? Access to SwAttrSet.
virtual css::uno::Reference< css::text::XText > SAL_CALL getText() override
SwFormatColl * GetCurTextFormatColl(SwPaM &rPam, const bool bConditional)
void GetCurPageStyle(SwPaM const &rPaM, OUString &rString)
SfxItemPropertySet const & m_rPropSet
virtual css::uno::Sequence< css::beans::PropertyState > SAL_CALL getPropertyStates(const css::uno::Sequence< OUString > &rPropertyNames) override
virtual void SAL_CALL setPropertyToDefault(const OUString &rPropertyName) override
#define UNO_NAME_ANCHOR_TYPES
#define SAL_WARN(area, stream)
constexpr sal_uInt16 XATTR_FILL_LAST(XATTR_FILLBACKGROUND)
virtual void SetMark()
Unless this is called, the getter method of Mark will return Point.
sal_Int32 m_nSelectionStartPos
std::pair< const_iterator, bool > insert(Value &&x)
virtual css::beans::PropertyState SAL_CALL getPropertyState(const OUString &rPropertyName) override
virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
static beans::PropertyState lcl_SwXParagraph_getPropertyState(const SwTextNode &rTextNode, const SwAttrSet **ppSet, const SfxItemPropertyMapEntry &rEntry, bool &rAttrSetFetched)
SAL_DLLPRIVATE void SetXParagraph(css::uno::Reference< css::text::XTextContent > const &xParagraph)
constexpr TypedWhichId< XFillBmpSizeYItem > XATTR_FILLBMP_SIZEY(XATTR_FILL_FIRST+10)
virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getStart() override
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override
uno::Reference< text::XText > CreateParentXText(SwDoc &rDoc, const SwPosition &rPos)
virtual css::uno::Sequence< OUString > SAL_CALL getAvailableServiceNames() override
#define FN_UNO_PARA_STYLE
uno::Reference< text::XText > m_xParentText
constexpr TypedWhichId< SfxStringItem > RES_PARATR_LIST_ID(RES_PARATR_LIST_BEGIN)
constexpr TypedWhichId< SwFormatAnchor > RES_ANCHOR(104)