25#include <osl/diagnose.h>
37#include <unoprnms.hxx>
47#include <com/sun/star/beans/SetPropertyTolerantFailed.hpp>
48#include <com/sun/star/beans/GetPropertyTolerantResult.hpp>
49#include <com/sun/star/beans/TolerantPropertySetResultType.hpp>
50#include <com/sun/star/beans/PropertyAttribute.hpp>
51#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
52#include <com/sun/star/text/WrapTextMode.hpp>
53#include <com/sun/star/text/TextContentAnchorType.hpp>
55#include <com/sun/star/drawing/BitmapMode.hpp>
72 explicit SwParaSelection(
SwCursor & rCursor);
78SwParaSelection::SwParaSelection(
SwCursor & rCursor)
81 if (m_rCursor.HasMark())
83 m_rCursor.DeleteMark();
86 if (m_rCursor.GetPoint()->GetContentIndex() != 0)
91 if (m_rCursor.GetPoint()->GetContentIndex() != m_rCursor.GetPointContentNode()->Len())
98SwParaSelection::~SwParaSelection()
100 if (m_rCursor.GetPoint()->GetContentIndex() != 0)
102 m_rCursor.DeleteMark();
113 bool &rAttrSetFetched );
132 SwTextNode*
const pTextNode =
nullptr, uno::Reference<text::XText> xParent =
nullptr,
133 const sal_Int32 nSelStart = -1,
const sal_Int32 nSelEnd = -1)
151 throw uno::RuntimeException(
"SwXParagraph: disposed or invalid",
nullptr);
164 const uno::Sequence< OUString >& rPropertyNames,
165 const uno::Sequence< uno::Any >& rValues);
170 uno::Sequence< uno::Any >
172 const uno::Sequence< OUString >& rPropertyNames);
181 uno::Sequence< beans::GetDirectPropertyTolerantResult >
183 const uno::Sequence< OUString >& rPropertyNames,
184 bool bDirectValuesOnly);
192 if(rHint.
GetId() == SfxHintId::Dying)
195 std::unique_lock aGuard(
m_Mutex);
205 uno::Reference<uno::XInterface>
const xThis(
m_wThis);
210 lang::EventObject
const ev(xThis);
222 uno::Reference< text::XText >
const & xParent,
224 const sal_Int32 nSelStart,
const sal_Int32 nSelEnd)
226 new
SwXParagraph::Impl(*this, &rTextNode, xParent, nSelStart, nSelEnd))
241 return m_pImpl->IsDescriptor();
246 uno::Reference< text::XText>
const& i_xParent,
247 const sal_Int32 nSelStart,
const sal_Int32 nSelEnd)
252 if (pTextNode && (-1 == nSelStart) && (-1 == nSelEnd))
262 uno::Reference<text::XText> xParentText(i_xParent);
263 if (!xParentText.is() && pTextNode)
269 ?
new SwXParagraph(xParentText, *pTextNode, nSelStart, nSelEnd)
272 xParagraph.set(pXPara);
274 if (pTextNode && (-1 == nSelStart) && (-1 == nSelEnd))
279 pXPara->
m_pImpl->m_wThis = xParagraph.get();
302 return "SwXParagraph";
311uno::Sequence< OUString > SAL_CALL
315 "com.sun.star.text.TextContent",
316 "com.sun.star.text.Paragraph",
317 "com.sun.star.style.CharacterProperties",
318 "com.sun.star.style.CharacterPropertiesAsian",
319 "com.sun.star.style.CharacterPropertiesComplex",
320 "com.sun.star.style.ParagraphProperties",
321 "com.sun.star.style.ParagraphPropertiesAsian",
322 "com.sun.star.style.ParagraphPropertiesComplex"
329 OSL_ENSURE(
m_pImpl->m_bIsDescriptor,
"Paragraph is not a descriptor");
333 m_pImpl->m_bIsDescriptor =
false;
335 m_pImpl->StartListening(rTextNode.GetNotifier());
337 m_pImpl->m_xParentText = &rParent;
338 if (!
m_pImpl->m_sText.isEmpty())
346uno::Reference< beans::XPropertySetInfo > SAL_CALL
351 static uno::Reference< beans::XPropertySetInfo > xRef =
352 m_pImpl->m_rPropSet.getPropertySetInfo();
361 m_pImpl->SetPropertyValues_Impl( { rPropertyName }, { rValue } );
368 uno::Sequence<OUString> aPropertyNames { rPropertyName };
369 const uno::Sequence< uno::Any > aRet =
370 m_pImpl->GetPropertyValues_Impl(aPropertyNames);
371 return aRet.getConstArray()[0];
375 const uno::Sequence< OUString >& rPropertyNames,
376 const uno::Sequence< uno::Any >& rValues )
382 SwParaSelection aParaSel( aCursor );
384 uno::Sequence< beans::PropertyValue > aValues( rPropertyNames.getLength() );
386 rPropertyNames.begin(), rPropertyNames.end(), rValues.begin(), aValues.getArray(),
389 if (SfxItemPropertyMapEntry const* const pEntry = rMap.getByName(name); !pEntry)
391 throw beans::UnknownPropertyException(
"Unknown property: " + name,
392 static_cast<cppu::OWeakObject*>(&m_rThis));
394 else if (pEntry->nFlags & beans::PropertyAttribute::READONLY)
396 throw beans::PropertyVetoException(
"Property is read-only: " + name,
397 static_cast<cppu::OWeakObject*>(&m_rThis));
405 const uno::Sequence< OUString >& rPropertyNames,
406 const uno::Sequence< uno::Any >& rValues )
408 if (rPropertyNames.getLength() != rValues.getLength())
409 throw lang::IllegalArgumentException(
"lengths do not match",
417 m_pImpl->SetPropertyValues_Impl( rPropertyNames, rValues );
419 catch (
const beans::UnknownPropertyException &rException)
423 lang::WrappedTargetException aWExc;
424 aWExc.TargetException <<= rException;
443 if(!aOriginalBrushItem->QueryValue(rAny, rEntry.
nMemberId))
445 OSL_ENSURE(
false,
"Error getting attribute from RES_BACKGROUND (!)");
455 rAny <<= drawing::BitmapMode_REPEAT;
459 rAny <<= drawing::BitmapMode_STRETCH;
463 rAny <<= drawing::BitmapMode_NO_REPEAT;
476 m_rPropSet.getPropertyValue(rEntry,
rSet, rAny);
485 rAny <<= static_cast<sal_Int16>(
nValue);
490 if(!(rEntry.
nMoreFlags & PropertyMoreFlags::METRIC_ITEM))
511 if(eMapUnit != MapUnit::Map100thMM)
519 const uno::Sequence< OUString > & rPropertyNames )
523 uno::Sequence< uno::Any > aValues(rPropertyNames.getLength());
524 SwPaM aPam( rTextNode );
526 const OUString* pPropertyNames = rPropertyNames.getConstArray();
529 for (sal_Int32 nProp = 0; nProp < rPropertyNames.getLength(); nProp++)
531 if (pPropertyNames[nProp] ==
"ParaMarkerAutoStyleSpan")
538 css::uno::Reference<css::beans::XPropertySet> xFakeSpan(
545 if (pPropertyNames[nProp] ==
"ODFExport_NodeIndex")
557 throw beans::UnknownPropertyException(
558 "Unknown property: " + pPropertyNames[nProp],
562 pValues[nProp], pPropertyNames[nProp], pEntry->
nWID))
564 beans::PropertyState eTemp;
566 *pEntry, aPam, &(
pValues[nProp]), eTemp, &rTextNode );
569 GetSinglePropertyValue_Impl(*pEntry, rAttrSet,
pValues[nProp]);
576uno::Sequence< uno::Any > SAL_CALL
580 uno::Sequence< uno::Any > aValues;
585 aValues =
m_pImpl->GetPropertyValues_Impl( rPropertyNames );
587 catch (beans::UnknownPropertyException &)
590 throw css::lang::WrappedTargetRuntimeException(
"Unknown property exception caught",
593 catch (lang::WrappedTargetException &)
596 throw css::lang::WrappedTargetRuntimeException(
"WrappedTargetException caught",
604 const uno::Sequence< OUString >& ,
605 const uno::Reference< beans::XPropertiesChangeListener >& )
607 OSL_FAIL(
"SwXParagraph::addPropertiesChangeListener(): not implemented");
611 const uno::Reference< beans::XPropertiesChangeListener >& )
613 OSL_FAIL(
"SwXParagraph::removePropertiesChangeListener(): not implemented");
617 const uno::Sequence< OUString >& ,
618 const uno::Reference< beans::XPropertiesChangeListener >& )
620 OSL_FAIL(
"SwXParagraph::firePropertiesChangeEvent(): not implemented");
625uno::Sequence< beans::SetPropertyTolerantFailed > SAL_CALL
627 const uno::Sequence< OUString >& rPropertyNames,
628 const uno::Sequence< uno::Any >& rValues )
632 if (rPropertyNames.getLength() != rValues.getLength())
634 throw lang::IllegalArgumentException();
643 const sal_Int32 nProps = rPropertyNames.getLength();
644 const OUString *pProp = rPropertyNames.getConstArray();
647 const uno::Any *pValue = rValues.getConstArray();
649 sal_Int32 nFailed = 0;
650 uno::Sequence< beans::SetPropertyTolerantFailed > aFailed( nProps );
651 beans::SetPropertyTolerantFailed *pFailed = aFailed.getArray();
655 m_pImpl->m_rPropSet.getPropertyMap();
659 SwParaSelection aParaSel( aCursor );
660 for (sal_Int32
i = 0;
i < nProps; ++
i)
664 pFailed[ nFailed ].Name = pProp[
i];
670 pFailed[ nFailed++ ].Result =
671 beans::TolerantPropertySetResultType::UNKNOWN_PROPERTY;
677 if (pEntry->
nFlags & beans::PropertyAttribute::READONLY)
679 pFailed[ nFailed++ ].Result =
680 beans::TolerantPropertySetResultType::PROPERTY_VETO;
685 aCursor,
m_pImpl->m_rPropSet, pProp[
i], pValue[
i]);
689 catch (beans::UnknownPropertyException &)
693 pFailed[ nFailed++ ].Result =
694 beans::TolerantPropertySetResultType::UNKNOWN_PROPERTY;
696 catch (lang::IllegalArgumentException &)
698 pFailed[ nFailed++ ].Result =
699 beans::TolerantPropertySetResultType::ILLEGAL_ARGUMENT;
701 catch (beans::PropertyVetoException &)
703 pFailed[ nFailed++ ].Result =
704 beans::TolerantPropertySetResultType::PROPERTY_VETO;
706 catch (lang::WrappedTargetException &)
708 pFailed[ nFailed++ ].Result =
709 beans::TolerantPropertySetResultType::WRAPPED_TARGET;
713 aFailed.realloc( nFailed );
717uno::Sequence< beans::GetPropertyTolerantResult > SAL_CALL
719 const uno::Sequence< OUString >& rPropertyNames )
723 const uno::Sequence< beans::GetDirectPropertyTolerantResult > aTmpRes(
724 m_pImpl->GetPropertyValuesTolerant_Impl( rPropertyNames,
false ) );
727 const sal_Int32 nLen = aTmpRes.getLength();
728 uno::Sequence< beans::GetPropertyTolerantResult > aRes( nLen );
729 std::copy(aTmpRes.begin(), aTmpRes.end(), aRes.getArray());
733uno::Sequence< beans::GetDirectPropertyTolerantResult > SAL_CALL
735 const uno::Sequence< OUString >& rPropertyNames )
739 return m_pImpl->GetPropertyValuesTolerant_Impl( rPropertyNames,
true );
742uno::Sequence< beans::GetDirectPropertyTolerantResult >
744 const uno::Sequence< OUString >& rPropertyNames,
745 bool bDirectValuesOnly )
757 sal_Int32 nProps = rPropertyNames.getLength();
759 uno::Sequence< beans::GetDirectPropertyTolerantResult > aResult( nProps );
760 beans::GetDirectPropertyTolerantResult *pResult = aResult.getArray();
766 for (
const OUString& rProp : rPropertyNames)
768 OSL_ENSURE( nIdx < nProps,
"index out of bounds" );
769 beans::GetDirectPropertyTolerantResult &rResult = pResult[nIdx];
773 rResult.Name = rProp;
780 beans::TolerantPropertySetResultType::UNKNOWN_PROPERTY;
786 bool bAttrSetFetched =
true;
788 rTextNode, &pAttrSet, *pEntry, bAttrSetFetched );
789 rResult.State = eState;
791 rResult.Result = beans::TolerantPropertySetResultType::UNKNOWN_FAILURE;
792 if (!bDirectValuesOnly ||
793 (beans::PropertyState_DIRECT_VALUE == eState))
799 aValue, rProp, pEntry->
nWID ) )
801 SwPaM aPam( rTextNode );
804 beans::PropertyState eTemp;
807 *pEntry, aPam, &aValue, eTemp, &rTextNode );
812 GetSinglePropertyValue_Impl(*pEntry, rValueAttrSet, aValue);
816 rResult.Value = aValue;
817 rResult.Result = beans::TolerantPropertySetResultType::SUCCESS;
822 OSL_ENSURE( nIdx < 1 || pResult[nIdx - 1].Result != beans::TolerantPropertySetResultType::UNKNOWN_FAILURE,
823 "unknown failure while retrieving property" );
827 catch (beans::UnknownPropertyException &)
831 rResult.Result = beans::TolerantPropertySetResultType::UNKNOWN_PROPERTY;
833 catch (lang::IllegalArgumentException &)
835 rResult.Result = beans::TolerantPropertySetResultType::ILLEGAL_ARGUMENT;
837 catch (beans::PropertyVetoException &)
839 rResult.Result = beans::TolerantPropertySetResultType::PROPERTY_VETO;
841 catch (lang::WrappedTargetException &)
843 rResult.Result = beans::TolerantPropertySetResultType::WRAPPED_TARGET;
848 aResult.realloc( nIdx );
854 uno::Any& rAny, std::u16string_view rPropertyName, sal_uInt16 nWID)
873 { uno::Sequence<text::TextContentAnchorType>
aTypes { text::TextContentAnchorType_AT_PARAGRAPH };
886 const uno::Reference< beans::XPropertyChangeListener >& )
888 OSL_FAIL(
"SwXParagraph::addPropertyChangeListener(): not implemented");
894 const uno::Reference< beans::XPropertyChangeListener >& )
896 OSL_FAIL(
"SwXParagraph::removePropertyChangeListener(): not implemented");
902 const uno::Reference< beans::XVetoableChangeListener >& )
904 OSL_FAIL(
"SwXParagraph::addVetoableChangeListener(): not implemented");
910 const uno::Reference< beans::XVetoableChangeListener >& )
912 OSL_FAIL(
"SwXParagraph::removeVetoableChangeListener(): not implemented");
919 bool &rAttrSetFetched)
921 beans::PropertyState eRet(beans::PropertyState_DEFAULT_VALUE);
923 if(!(*ppSet) && !rAttrSetFetched)
926 rAttrSetFetched =
true;
961 eRet = pFormat ? beans::PropertyState_DIRECT_VALUE : beans::PropertyState_AMBIGUOUS_VALUE;
969 eRet = !sVal.isEmpty() ? beans::PropertyState_DIRECT_VALUE
970 : beans::PropertyState_AMBIGUOUS_VALUE;
983 eRet = beans::PropertyState_DIRECT_VALUE;
987 eRet = beans::PropertyState_AMBIGUOUS_VALUE;
1001 eRet = beans::PropertyState_DIRECT_VALUE;
1011 if((*ppSet) && SfxItemState::SET == (*ppSet)->GetItemState(rEntry.
nWID,
false))
1013 eRet = beans::PropertyState_DIRECT_VALUE;
1020beans::PropertyState SAL_CALL
1029 m_pImpl->m_rPropSet.getPropertyMap().getByName(rPropertyName);
1032 throw beans::UnknownPropertyException(
1033 "Unknown property: " + rPropertyName,
1036 bool bDummy =
false;
1037 const beans::PropertyState eRet =
1042uno::Sequence< beans::PropertyState > SAL_CALL
1044 const uno::Sequence< OUString >& PropertyNames)
1050 const OUString* pNames = PropertyNames.getConstArray();
1051 uno::Sequence< beans::PropertyState > aRet(PropertyNames.getLength());
1052 beans::PropertyState* pStates = aRet.getArray();
1055 bool bAttrSetFetched =
false;
1057 for (sal_Int32
i = 0, nEnd = PropertyNames.getLength();
i < nEnd;
1058 ++
i, ++pStates, ++pNames)
1064 throw beans::UnknownPropertyException(
1065 "Unknown property: " + *pNames,
1069 if (bAttrSetFetched && !pSet &&
isATR(pEntry->
nWID))
1071 *pStates = beans::PropertyState_DEFAULT_VALUE;
1076 rTextNode, &pSet, *pEntry, bAttrSetFetched );
1100 SwParaSelection aParaSel( aCursor );
1102 m_pImpl->m_rPropSet.getPropertyMap().getByName( rPropertyName );
1105 throw beans::UnknownPropertyException(
1106 "Unknown property: " + rPropertyName,
1110 if (pEntry->
nFlags & beans::PropertyAttribute::READONLY)
1112 throw uno::RuntimeException(
1113 "Property is read-only: " + rPropertyName,
1118 const bool bDrawingLayerRange(XATTR_FILL_FIRST <= pEntry->nWID &&
XATTR_FILL_LAST >= pEntry->
nWID);
1120 if(bBelowFrameAtrEnd || bDrawingLayerRange)
1152 *pTemp->GetPoint() = aEnd;
1162 pTemp->GetDoc().ResetAttrs(*pTemp,
true, aWhichIds);
1185 m_pImpl->m_rPropSet.getPropertyMap().getByName(rPropertyName);
1188 throw beans::UnknownPropertyException(
1189 "Unknown property: " + rPropertyName,
1194 const bool bDrawingLayerRange(XATTR_FILL_FIRST <= pEntry->nWID &&
XATTR_FILL_LAST >= pEntry->
nWID);
1196 if(bBelowFrameAtrEnd || bDrawingLayerRange)
1212 throw uno::RuntimeException();
1215uno::Reference< text::XTextRange > SAL_CALL
1225 SwParaSelection aParaSel( aCursor );
1226 const uno::Reference< text::XTextRange > xRet =
1241 std::unique_lock aGuard2(
m_pImpl->m_Mutex);
1242 m_pImpl->m_EventListeners.disposeAndClear(aGuard2, ev);
1247 const uno::Reference< lang::XEventListener > & xListener)
1250 std::unique_lock aGuard(
m_pImpl->m_Mutex);
1251 m_pImpl->m_EventListeners.addInterface(aGuard, xListener);
1255 const uno::Reference< lang::XEventListener > & xListener)
1258 std::unique_lock aGuard(
m_pImpl->m_Mutex);
1259 m_pImpl->m_EventListeners.removeInterface(aGuard, xListener);
1262uno::Reference< container::XEnumeration > SAL_CALL
1269 SwPaM aPam ( rTextNode );
1270 const uno::Reference< container::XEnumeration > xRef =
1283 SwPaM aPam ( rTextNode );
1286 m_pImpl->m_nSelectionStartPos,
m_pImpl->m_nSelectionEndPos,
true);
1300uno::Reference< text::XText > SAL_CALL
1305 return m_pImpl->m_xParentText;
1308uno::Reference< text::XTextRange > SAL_CALL
1317 SwParaSelection aParaSel( aCursor );
1319 uno::Reference< text::XText > xParent =
getText();
1320 const uno::Reference< text::XTextRange > xRet =
1325uno::Reference< text::XTextRange > SAL_CALL
1334 SwParaSelection aParaSel( aCursor );
1336 uno::Reference< text::XText > xParent =
getText();
1337 const uno::Reference< text::XTextRange > xRet =
1351 SwParaSelection aParaSel( aCursor );
1354 else if (
m_pImpl->IsDescriptor())
1362 SAL_WARN(
"sw.uno",
"getString() for invalid paragraph called. Returning empty string.");
1380 if (pTextNode->
GetText().getLength()) {
1386 else if (
m_pImpl->IsDescriptor())
1392 throw uno::RuntimeException();
1396uno::Reference< container::XEnumeration > SAL_CALL
1401 if ( rServiceName !=
"com.sun.star.text.TextContent" )
1403 throw uno::RuntimeException();
1408 SwPaM aPam( rTextNode );
1409 uno::Reference< container::XEnumeration > xRet =
1414uno::Sequence< OUString > SAL_CALL
1417 uno::Sequence<OUString> aRet {
"com.sun.star.text.TextContent" };
1434 return pShell ? pShell->
GetModel() :
nullptr;
const PropertyValue * pValues
virtual bool DelFullPara(SwPaM &)=0
Delete full paragraphs.
const SfxPoolItem & GetDefaultItem(sal_uInt16 nWhich) const
virtual MapUnit GetMetric(sal_uInt16 nWhich) const
const SfxItemPropertyMapEntry * getByName(std::u16string_view rName) const
const SfxItemPropertyMap & getPropertyMap() const
SfxItemPool * GetPool() const
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
css::uno::Reference< css::frame::XModel3 > GetModel() const
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt8 nMemberId=0) const
bool StartListening(SvtBroadcaster &rBroadcaster)
const SwAttrSet & GetSwAttrSet() const
Does node has already its own auto-attributes? Access to SwAttrSet.
const SwAttrSet * GetpSwAttrSet() const
bool MovePara(SwWhichPara, SwMoveFnCollection const &)
IDocumentContentOperations const & getIDocumentContentOperations() 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.
std::shared_ptr< SwUnoCursor > CreateUnoCursor(const SwPosition &rPos, bool bTableCursor=false)
const SwAttrPool & GetAttrPool() const
SwDocShell * GetDocShell()
SwNodeOffset GetIndex() const
PaM is Point and Mark: a selection of the document model.
const SwPosition * GetMark() const
virtual void SetMark()
Unless this is called, the getter method of Mark will return Point.
const SwPosition * End() const
const SwPosition * GetPoint() const
const SwPosition * Start() const
SwTextNode is a paragraph in the document model.
SAL_DLLPRIVATE unotools::WeakReference< SwXParagraph > const & GetXParagraph() const
const SfxPoolItem & GetAttr(sal_uInt16 nWhich, bool bInParent=true) const
End: Data collected during idle time.
const OUString & GetText() const
SAL_DLLPRIVATE void SetXParagraph(rtl::Reference< SwXParagraph > const &xParagraph)
Impl(SwXParagraph &rThis, SwTextNode *const pTextNode=nullptr, uno::Reference< text::XText > xParent=nullptr, const sal_Int32 nSelStart=-1, const sal_Int32 nSelEnd=-1)
unotools::WeakReference< SwXParagraph > m_wThis
::comphelper::OInterfaceContainerHelper4< css::lang::XEventListener > m_EventListeners
SwTextNode & GetTextNodeOrThrow()
uno::Reference< text::XText > m_xParentText
void GetSinglePropertyValue_Impl(const SfxItemPropertyMapEntry &rEntry, const SfxItemSet &rSet, uno::Any &rAny) const
SwTextNode * GetTextNode()
bool IsDescriptor() const
sal_Int32 m_nSelectionEndPos
virtual void Notify(const SfxHint &rHint) override
void SetPropertyValues_Impl(const uno::Sequence< OUString > &rPropertyNames, const uno::Sequence< uno::Any > &rValues)
SfxItemPropertySet const & m_rPropSet
uno::Sequence< uno::Any > GetPropertyValues_Impl(const uno::Sequence< OUString > &rPropertyNames)
uno::Sequence< beans::GetDirectPropertyTolerantResult > GetPropertyValuesTolerant_Impl(const uno::Sequence< OUString > &rPropertyNames, bool bDirectValuesOnly)
sal_Int32 m_nSelectionStartPos
virtual css::uno::Reference< css::frame::XModel > GetModel() override
virtual void SAL_CALL setString(const OUString &rString) override
virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getEnd() override
virtual void SAL_CALL addPropertiesChangeListener(const css::uno::Sequence< OUString > &rPropertyNames, const css::uno::Reference< css::beans::XPropertiesChangeListener > &xListener) override
virtual css::uno::Sequence< css::beans::PropertyState > SAL_CALL getPropertyStates(const css::uno::Sequence< OUString > &rPropertyNames) override
virtual OUString SAL_CALL getImplementationName() override
virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getStart() override
virtual css::uno::Type SAL_CALL getElementType() override
virtual void SAL_CALL setPropertyValue(const OUString &rPropertyName, const css::uno::Any &rValue) override
virtual ~SwXParagraph() override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual void SAL_CALL setPropertyToDefault(const OUString &rPropertyName) override
void attachToText(SwXText &rParent, SwTextNode &rTextNode)
for SwXText
virtual OUString SAL_CALL getString() override
virtual css::uno::Sequence< OUString > SAL_CALL getAvailableServiceNames() override
virtual void SAL_CALL dispose() override
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
virtual ::sfx2::Metadatable * GetCoreObject() override
virtual void SAL_CALL addPropertyChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
::sw::UnoImplPtr< Impl > m_pImpl
virtual void SAL_CALL firePropertiesChangeEvent(const css::uno::Sequence< OUString > &rPropertyNames, const css::uno::Reference< css::beans::XPropertiesChangeListener > &xListener) override
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createContentEnumeration(const OUString &rServiceName) override
virtual css::uno::Reference< css::text::XText > SAL_CALL getText() override
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
virtual void SAL_CALL removePropertiesChangeListener(const css::uno::Reference< css::beans::XPropertiesChangeListener > &xListener) override
virtual css::uno::Sequence< css::uno::Any > SAL_CALL getPropertyValues(const css::uno::Sequence< OUString > &rPropertyNames) override
virtual css::uno::Sequence< css::beans::GetPropertyTolerantResult > SAL_CALL getPropertyValuesTolerant(const css::uno::Sequence< OUString > &rPropertyNames) override
virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
const SwTextNode * GetTextNode() const
virtual sal_Bool SAL_CALL hasElements() override
virtual css::beans::PropertyState SAL_CALL getPropertyState(const OUString &rPropertyName) override
virtual sal_Bool SAL_CALL supportsService(const OUString &rServiceName) override
bool IsDescriptor() const
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() 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 void SAL_CALL addVetoableChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &xListener) override
virtual css::uno::Any SAL_CALL getPropertyDefault(const OUString &rPropertyName) override
virtual void SAL_CALL attach(const css::uno::Reference< css::text::XTextRange > &xTextRange) override
static rtl::Reference< SwXParagraph > 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::GetDirectPropertyTolerantResult > SAL_CALL getDirectPropertyValuesTolerant(const css::uno::Sequence< OUString > &rPropertyNames) override
virtual void SAL_CALL setPropertyValues(const css::uno::Sequence< OUString > &rPropertyNames, const css::uno::Sequence< css::uno::Any > &rValues) override
rtl::Reference< SwXTextPortionEnumeration > createTextFieldsEnumeration()
tries to return less data, but may return more than just text fields
virtual void SAL_CALL removePropertyChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getAnchor() override
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &rPropertyName) override
void disposeAndClear(::std::unique_lock<::std::mutex > &rGuard, const css::lang::EventObject &rEvt)
sal_Int32 getLength(std::unique_lock< std::mutex > &rGuard) const
css::uno::Type const & get()
std::pair< const_iterator, bool > insert(Value &&x)
#define FN_UNO_ANCHOR_TYPE
#define FN_UNO_PARA_CONDITIONAL_STYLE_NAME
#define FN_UNO_PAGE_STYLE
#define FN_UNO_ANCHOR_TYPES
#define FN_UNO_PARA_STYLE
#define TOOLS_WARN_EXCEPTION(area, stream)
bool isATR(const sal_uInt16 nWhich)
constexpr sal_uInt16 RES_PARATR_BEGIN(RES_TXTATR_END)
constexpr sal_uInt16 RES_FRMATR_END(141)
constexpr TypedWhichId< SvxBrushItem > RES_BACKGROUND(111)
constexpr TypedWhichId< SwFormatAnchor > RES_ANCHOR(110)
constexpr TypedWhichId< SwFormatAutoFormat > RES_PARATR_LIST_AUTOFMT(87)
constexpr TypedWhichId< SwFormatSurround > RES_SURROUND(107)
#define SAL_WARN(area, stream)
if(aStr !=aBuf) UpdateName_Impl(m_xFollowLb.get()
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...
void GetCurPageStyle(SwPaM const &rPaM, OUString &rString)
void SetPropertyValue(SwPaM &rPaM, const SfxItemPropertySet &rPropSet, const OUString &rPropertyName, const css::uno::Any &rValue, const SetAttrMode nAttrMode=SetAttrMode::DEFAULT)
void SetPropertyValues(SwPaM &rPaM, const SfxItemPropertySet &rPropSet, const css::uno::Sequence< css::beans::PropertyValue > &rPropertyValues, const SetAttrMode nAttrMode=SetAttrMode::DEFAULT)
SwFormatColl * GetCurTextFormatColl(SwPaM &rPam, const bool bConditional)
void getNumberingProperty(SwPaM &rPam, PropertyState &eState, Any *pAny)
bool IsStartOfPara(SwPaM &rUnoCursor)
void SetString(SwCursor &rCursor, std::u16string_view aString)
bool getCursorPropertyValue(const SfxItemPropertyMapEntry &rEntry, SwPaM &rPam, Any *pAny, PropertyState &eState, const SwTextNode *pNode)
void GetTextFromPam(SwPaM &rPam, OUString &rBuffer, SwRootFrame const *pLayout=nullptr)
bool IsEndOfPara(SwPaM &rUnoCursor)
void resetCursorPropertyValue(const SfxItemPropertyMapEntry &rEntry, SwPaM &rPam)
void SelectPam(SwPaM &rPam, const bool bExpand)
css::beans::PropertyValue makePropertyValue(const OUString &rName, T &&rValue)
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 GetDefaultTextContentValue(css::uno::Any &rAny, std::u16string_view rPropertyName, sal_uInt16 nWID=0)
bool GoCurrPara(SwPaM &rPam, SwMoveFnCollection const &aPosPara)
SwMoveFnCollection const & fnParaStart
SwMoveFnCollection const & fnParaEnd
PropertyMoreFlags nMoreFlags
Marks a position in the document model.
void Assign(const SwNode &rNd, SwNodeOffset nDelta, sal_Int32 nContentOffset=0)
These all set both nNode and nContent.
void SetContent(sal_Int32 nContentIndex)
Set content index, only valid to call this if the position points to a SwContentNode subclass.
static rtl::Reference< SwXParaFrameEnumeration > Create(const SwPaM &rPaM, const enum ParaFrameMode eParaFrameMode, SwFrameFormat *const pFormat=nullptr)
UNDERLYING_TYPE get() const
SVXCORE_DLLPUBLIC std::unique_ptr< SvxBrushItem > getSvxBrushItemFromSourceSet(const SfxItemSet &rSourceSet, sal_uInt16 nBackgroundID, bool bSearchInParents=true, bool bXMLImportHack=false)
void SvxUnoConvertToMM(const MapUnit eSourceMapUnit, uno::Any &rMetric) noexcept
SwUnoPropertyMapProvider aSwMapProvider
#define OWN_ATTR_FILLBMP_MODE
#define PROPERTY_MAP_PARAGRAPH
#define MID_SURROUND_SURROUNDTYPE
#define MID_ANCHOR_ANCHORTYPE
@ PARAFRAME_PORTION_PARAGRAPH
static beans::PropertyState lcl_SwXParagraph_getPropertyState(const SwTextNode &rTextNode, const SwAttrSet **ppSet, const SfxItemPropertyMapEntry &rEntry, bool &rAttrSetFetched)
constexpr OUStringLiteral UNO_NAME_ANCHOR_TYPE
constexpr OUStringLiteral UNO_NAME_TEXT_WRAP
constexpr OUStringLiteral UNO_NAME_ANCHOR_TYPES
constexpr TypedWhichId< SfxMetricItem > XATTR_FILLBMP_SIZEX(XATTR_FILL_FIRST+9)
constexpr TypedWhichId< XFillBmpSizeYItem > XATTR_FILLBMP_SIZEY(XATTR_FILL_FIRST+10)
constexpr TypedWhichId< XFillBmpStretchItem > XATTR_FILLBMP_STRETCH(XATTR_FILL_FIRST+16)
constexpr sal_uInt16 XATTR_FILL_LAST(XATTR_FILLUSESLIDEBACKGROUND)
constexpr TypedWhichId< XFillBmpTileItem > XATTR_FILLBMP_TILE(XATTR_FILL_FIRST+7)