25 #include <osl/diagnose.h>
31 #include <unotext.hxx>
36 #include <unoprnms.hxx>
40 #include <osl/mutex.hxx>
45 #include <com/sun/star/beans/SetPropertyTolerantFailed.hpp>
46 #include <com/sun/star/beans/GetPropertyTolerantResult.hpp>
47 #include <com/sun/star/beans/TolerantPropertySetResultType.hpp>
48 #include <com/sun/star/beans/PropertyAttribute.hpp>
49 #include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
50 #include <com/sun/star/text/WrapTextMode.hpp>
51 #include <com/sun/star/text/TextContentAnchorType.hpp>
53 #include <com/sun/star/drawing/BitmapMode.hpp>
69 explicit SwParaSelection(
SwCursor & rCursor);
75 SwParaSelection::SwParaSelection(
SwCursor & rCursor)
78 if (m_rCursor.HasMark())
80 m_rCursor.DeleteMark();
83 if (m_rCursor.GetPoint()->nContent != 0)
88 if (m_rCursor.GetPoint()->nContent != m_rCursor.GetContentNode()->Len())
95 SwParaSelection::~SwParaSelection()
97 if (m_rCursor.GetPoint()->nContent != 0)
99 m_rCursor.DeleteMark();
110 bool &rAttrSetFetched );
131 SwTextNode*
const pTextNode =
nullptr, uno::Reference<text::XText>
const& xParent =
nullptr,
132 const sal_Int32 nSelStart = -1,
const sal_Int32 nSelEnd = -1)
134 , m_EventListeners(m_Mutex)
136 , m_bIsDescriptor(nullptr == pTextNode)
137 , m_nSelectionStartPos(nSelStart)
138 , m_nSelectionEndPos(nSelEnd)
139 , m_xParentText(xParent)
140 , m_pTextNode(pTextNode)
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 uno::Reference<uno::XInterface>
const xThis(
m_wThis);
200 lang::EventObject
const ev(xThis);
211 uno::Reference< text::XText >
const & xParent,
213 const sal_Int32 nSelStart,
const sal_Int32 nSelEnd)
215 new
SwXParagraph::Impl(*this, &rTextNode, xParent, nSelStart, nSelEnd))
230 return m_pImpl->IsDescriptor();
233 uno::Reference<text::XTextContent>
235 uno::Reference< text::XText>
const& i_xParent,
236 const sal_Int32 nSelStart,
const sal_Int32 nSelEnd)
240 uno::Reference<text::XTextContent> xParagraph;
241 if (pTextNode && (-1 == nSelStart) && (-1 == nSelEnd))
251 uno::Reference<text::XText> xParentText(i_xParent);
252 if (!xParentText.is() && pTextNode)
258 ?
new SwXParagraph(xParentText, *pTextNode, nSelStart, nSelEnd)
261 xParagraph.set(pXPara);
263 if (pTextNode && (-1 == nSelStart) && (-1 == nSelEnd))
268 pXPara->
m_pImpl->m_wThis = xParagraph;
291 return theSwXParagraphUnoTunnelId.
getSeq();
297 return ::sw::UnoTunnelImpl<SwXParagraph>(rId,
this);
303 return "SwXParagraph";
312 uno::Sequence< OUString > SAL_CALL
316 "com.sun.star.text.TextContent",
317 "com.sun.star.text.Paragraph",
318 "com.sun.star.style.CharacterProperties",
319 "com.sun.star.style.CharacterPropertiesAsian",
320 "com.sun.star.style.CharacterPropertiesComplex",
321 "com.sun.star.style.ParagraphProperties",
322 "com.sun.star.style.ParagraphPropertiesAsian",
323 "com.sun.star.style.ParagraphPropertiesComplex"
330 OSL_ENSURE(
m_pImpl->m_bIsDescriptor,
"Paragraph is not a descriptor");
334 m_pImpl->m_bIsDescriptor =
false;
337 rTextNode.
SetXParagraph(uno::Reference<text::XTextContent>(
this));
338 m_pImpl->m_xParentText = &rParent;
339 if (!
m_pImpl->m_sText.isEmpty())
347 uno::Reference< beans::XPropertySetInfo > SAL_CALL
352 static uno::Reference< beans::XPropertySetInfo > xRef =
353 m_pImpl->m_rPropSet.getPropertySetInfo();
362 uno::Sequence<OUString> aPropertyNames { rPropertyName };
363 uno::Sequence<uno::Any> aValues(1);
364 aValues.getArray()[0] = rValue;
365 m_pImpl->SetPropertyValues_Impl( aPropertyNames, aValues );
372 uno::Sequence<OUString> aPropertyNames { rPropertyName };
373 const uno::Sequence< uno::Any > aRet =
374 m_pImpl->GetPropertyValues_Impl(aPropertyNames);
375 return aRet.getConstArray()[0];
379 const uno::Sequence< OUString >& rPropertyNames,
380 const uno::Sequence< uno::Any >& rValues )
386 const OUString* pPropertyNames = rPropertyNames.getConstArray();
389 SwParaSelection aParaSel( aCursor );
391 uno::Sequence< beans::PropertyValue > aValues( rPropertyNames.getLength() );
392 for (sal_Int32 nProp = 0; nProp < rPropertyNames.getLength(); nProp++)
398 throw beans::UnknownPropertyException(
399 "Unknown property: " + pPropertyNames[nProp],
400 static_cast< cppu::OWeakObject * >(&
m_rThis));
402 if (pEntry->
nFlags & beans::PropertyAttribute::READONLY)
404 throw beans::PropertyVetoException(
405 "Property is read-only: " + pPropertyNames[nProp],
406 static_cast< cppu::OWeakObject * >(&
m_rThis));
408 aValues[nProp].Name = pPropertyNames[nProp];
409 aValues[nProp].Value = pValues[nProp];
415 const uno::Sequence< OUString >& rPropertyNames,
416 const uno::Sequence< uno::Any >& rValues )
423 m_pImpl->SetPropertyValues_Impl( rPropertyNames, rValues );
425 catch (
const beans::UnknownPropertyException &rException)
429 lang::WrappedTargetException aWExc;
430 aWExc.TargetException <<= rException;
449 if(!aOriginalBrushItem->QueryValue(rAny, rEntry.
nMemberId))
451 OSL_ENSURE(
false,
"Error getting attribute from RES_BACKGROUND (!)");
461 rAny <<= drawing::BitmapMode_REPEAT;
465 rAny <<= drawing::BitmapMode_STRETCH;
469 rAny <<= drawing::BitmapMode_NO_REPEAT;
482 m_rPropSet.getPropertyValue(rEntry, rSet, rAny);
491 rAny <<= static_cast<sal_Int16>(nValue);
496 if(!(rEntry.
nMoreFlags & PropertyMoreFlags::METRIC_ITEM))
517 if(eMapUnit != MapUnit::Map100thMM)
525 const uno::Sequence< OUString > & rPropertyNames )
529 uno::Sequence< uno::Any > aValues(rPropertyNames.getLength());
533 const OUString* pPropertyNames = rPropertyNames.getConstArray();
536 for (sal_Int32 nProp = 0; nProp < rPropertyNames.getLength(); nProp++)
542 throw beans::UnknownPropertyException(
543 "Unknown property: " + pPropertyNames[nProp],
544 static_cast< cppu::OWeakObject * >(&m_rThis));
547 pValues[nProp], pPropertyNames[nProp], pEntry->
nWID))
549 beans::PropertyState eTemp;
551 *pEntry, aPam, &(pValues[nProp]), eTemp, &rTextNode );
554 GetSinglePropertyValue_Impl(*pEntry, rAttrSet, pValues[nProp]);
561 uno::Sequence< uno::Any > SAL_CALL
565 uno::Sequence< uno::Any > aValues;
570 aValues =
m_pImpl->GetPropertyValues_Impl( rPropertyNames );
572 catch (beans::UnknownPropertyException &)
575 throw css::lang::WrappedTargetRuntimeException(
"Unknown property exception caught",
576 static_cast < cppu::OWeakObject * > (
this ), anyEx );
578 catch (lang::WrappedTargetException &)
581 throw css::lang::WrappedTargetRuntimeException(
"WrappedTargetException caught",
582 static_cast < cppu::OWeakObject * > (
this ), anyEx );
589 const uno::Sequence< OUString >& ,
590 const uno::Reference< beans::XPropertiesChangeListener >& )
592 OSL_FAIL(
"SwXParagraph::addPropertiesChangeListener(): not implemented");
596 const uno::Reference< beans::XPropertiesChangeListener >& )
598 OSL_FAIL(
"SwXParagraph::removePropertiesChangeListener(): not implemented");
602 const uno::Sequence< OUString >& ,
603 const uno::Reference< beans::XPropertiesChangeListener >& )
605 OSL_FAIL(
"SwXParagraph::firePropertiesChangeEvent(): not implemented");
610 uno::Sequence< beans::SetPropertyTolerantFailed > SAL_CALL
612 const uno::Sequence< OUString >& rPropertyNames,
613 const uno::Sequence< uno::Any >& rValues )
617 if (rPropertyNames.getLength() != rValues.getLength())
619 throw lang::IllegalArgumentException();
628 const sal_Int32 nProps = rPropertyNames.getLength();
629 const OUString *pProp = rPropertyNames.getConstArray();
632 const uno::Any *pValue = rValues.getConstArray();
634 sal_Int32 nFailed = 0;
635 uno::Sequence< beans::SetPropertyTolerantFailed > aFailed( nProps );
636 beans::SetPropertyTolerantFailed *pFailed = aFailed.getArray();
640 m_pImpl->m_rPropSet.getPropertyMap();
644 SwParaSelection aParaSel( aCursor );
645 for (sal_Int32
i = 0;
i < nProps; ++
i)
649 pFailed[ nFailed ].Name = pProp[
i];
655 pFailed[ nFailed++ ].Result =
656 beans::TolerantPropertySetResultType::UNKNOWN_PROPERTY;
662 if (pEntry->
nFlags & beans::PropertyAttribute::READONLY)
664 pFailed[ nFailed++ ].Result =
665 beans::TolerantPropertySetResultType::PROPERTY_VETO;
670 aCursor,
m_pImpl->m_rPropSet, pProp[i], pValue[i]);
674 catch (beans::UnknownPropertyException &)
678 pFailed[ nFailed++ ].Result =
679 beans::TolerantPropertySetResultType::UNKNOWN_PROPERTY;
681 catch (lang::IllegalArgumentException &)
683 pFailed[ nFailed++ ].Result =
684 beans::TolerantPropertySetResultType::ILLEGAL_ARGUMENT;
686 catch (beans::PropertyVetoException &)
688 pFailed[ nFailed++ ].Result =
689 beans::TolerantPropertySetResultType::PROPERTY_VETO;
691 catch (lang::WrappedTargetException &)
693 pFailed[ nFailed++ ].Result =
694 beans::TolerantPropertySetResultType::WRAPPED_TARGET;
698 aFailed.realloc( nFailed );
702 uno::Sequence< beans::GetPropertyTolerantResult > SAL_CALL
704 const uno::Sequence< OUString >& rPropertyNames )
708 uno::Sequence< beans::GetDirectPropertyTolerantResult > aTmpRes(
709 m_pImpl->GetPropertyValuesTolerant_Impl( rPropertyNames,
false ) );
712 const sal_Int32 nLen = aTmpRes.getLength();
713 uno::Sequence< beans::GetPropertyTolerantResult > aRes( nLen );
714 std::copy(aTmpRes.begin(), aTmpRes.end(), aRes.begin());
718 uno::Sequence< beans::GetDirectPropertyTolerantResult > SAL_CALL
720 const uno::Sequence< OUString >& rPropertyNames )
724 return m_pImpl->GetPropertyValuesTolerant_Impl( rPropertyNames,
true );
727 uno::Sequence< beans::GetDirectPropertyTolerantResult >
729 const uno::Sequence< OUString >& rPropertyNames,
730 bool bDirectValuesOnly )
742 sal_Int32 nProps = rPropertyNames.getLength();
744 uno::Sequence< beans::GetDirectPropertyTolerantResult > aResult( nProps );
745 beans::GetDirectPropertyTolerantResult *pResult = aResult.getArray();
751 for (
const OUString& rProp : rPropertyNames)
753 OSL_ENSURE( nIdx < nProps,
"index out of bounds" );
754 beans::GetDirectPropertyTolerantResult &rResult = pResult[nIdx];
758 rResult.Name = rProp;
765 beans::TolerantPropertySetResultType::UNKNOWN_PROPERTY;
771 bool bAttrSetFetched =
true;
773 rTextNode, &pAttrSet, *pEntry, bAttrSetFetched );
774 rResult.State = eState;
776 rResult.Result = beans::TolerantPropertySetResultType::UNKNOWN_FAILURE;
777 if (!bDirectValuesOnly ||
778 (beans::PropertyState_DIRECT_VALUE == eState))
784 aValue, rProp, pEntry->
nWID ) )
790 beans::PropertyState eTemp;
793 *pEntry, aPam, &aValue, eTemp, &rTextNode );
798 GetSinglePropertyValue_Impl(*pEntry, rValueAttrSet, aValue);
802 rResult.Value = aValue;
803 rResult.Result = beans::TolerantPropertySetResultType::SUCCESS;
808 OSL_ENSURE( nIdx < 1 || pResult[nIdx - 1].
Result != beans::TolerantPropertySetResultType::UNKNOWN_FAILURE,
809 "unknown failure while retrieving property" );
813 catch (beans::UnknownPropertyException &)
817 rResult.Result = beans::TolerantPropertySetResultType::UNKNOWN_PROPERTY;
819 catch (lang::IllegalArgumentException &)
821 rResult.Result = beans::TolerantPropertySetResultType::ILLEGAL_ARGUMENT;
823 catch (beans::PropertyVetoException &)
825 rResult.Result = beans::TolerantPropertySetResultType::PROPERTY_VETO;
827 catch (lang::WrappedTargetException &)
829 rResult.Result = beans::TolerantPropertySetResultType::WRAPPED_TARGET;
834 aResult.realloc( nIdx );
840 uno::Any& rAny, std::u16string_view rPropertyName, sal_uInt16 nWID)
859 { uno::Sequence<text::TextContentAnchorType>
aTypes(1);
860 text::TextContentAnchorType* pArray =
aTypes.getArray();
861 pArray[0] = text::TextContentAnchorType_AT_PARAGRAPH;
874 const uno::Reference< beans::XPropertyChangeListener >& )
876 OSL_FAIL(
"SwXParagraph::addPropertyChangeListener(): not implemented");
882 const uno::Reference< beans::XPropertyChangeListener >& )
884 OSL_FAIL(
"SwXParagraph::removePropertyChangeListener(): not implemented");
890 const uno::Reference< beans::XVetoableChangeListener >& )
892 OSL_FAIL(
"SwXParagraph::addVetoableChangeListener(): not implemented");
898 const uno::Reference< beans::XVetoableChangeListener >& )
900 OSL_FAIL(
"SwXParagraph::removeVetoableChangeListener(): not implemented");
907 bool &rAttrSetFetched)
909 beans::PropertyState eRet(beans::PropertyState_DEFAULT_VALUE);
911 if(!(*ppSet) && !rAttrSetFetched)
914 rAttrSetFetched =
true;
949 eRet = pFormat ? beans::PropertyState_DIRECT_VALUE : beans::PropertyState_AMBIGUOUS_VALUE;
957 eRet = !sVal.isEmpty() ? beans::PropertyState_DIRECT_VALUE
958 : beans::PropertyState_AMBIGUOUS_VALUE;
971 eRet = beans::PropertyState_DIRECT_VALUE;
975 eRet = beans::PropertyState_AMBIGUOUS_VALUE;
989 eRet = beans::PropertyState_DIRECT_VALUE;
999 if((*ppSet) && SfxItemState::SET == (*ppSet)->GetItemState(rEntry.
nWID,
false))
1001 eRet = beans::PropertyState_DIRECT_VALUE;
1008 beans::PropertyState SAL_CALL
1017 m_pImpl->m_rPropSet.getPropertyMap().getByName(rPropertyName);
1020 throw beans::UnknownPropertyException(
1021 "Unknown property: " + rPropertyName,
1022 static_cast<cppu::OWeakObject *>(
this));
1024 bool bDummy =
false;
1025 const beans::PropertyState eRet =
1030 uno::Sequence< beans::PropertyState > SAL_CALL
1032 const uno::Sequence< OUString >& PropertyNames)
1038 const OUString* pNames = PropertyNames.getConstArray();
1039 uno::Sequence< beans::PropertyState > aRet(PropertyNames.getLength());
1040 beans::PropertyState* pStates = aRet.getArray();
1043 bool bAttrSetFetched =
false;
1045 for (sal_Int32
i = 0, nEnd = PropertyNames.getLength();
i < nEnd;
1046 ++
i, ++pStates, ++pNames)
1052 throw beans::UnknownPropertyException(
1053 "Unknown property: " + *pNames,
1054 static_cast<cppu::OWeakObject *>(
this));
1057 if (bAttrSetFetched && !pSet &&
isATR(pEntry->
nWID))
1059 *pStates = beans::PropertyState_DEFAULT_VALUE;
1064 rTextNode, &pSet, *pEntry, bAttrSetFetched );
1080 if (rPropertyName == UNO_NAME_ANCHOR_TYPE ||
1081 rPropertyName == UNO_NAME_ANCHOR_TYPES ||
1088 SwParaSelection aParaSel( aCursor );
1090 m_pImpl->m_rPropSet.getPropertyMap().getByName( rPropertyName );
1093 throw beans::UnknownPropertyException(
1094 "Unknown property: " + rPropertyName,
1095 static_cast<cppu::OWeakObject *>(
this));
1098 if (pEntry->
nFlags & beans::PropertyAttribute::READONLY)
1100 throw uno::RuntimeException(
1101 "Property is read-only: " + rPropertyName,
1102 static_cast<cppu::OWeakObject *>(
this));
1106 const bool bDrawingLayerRange(XATTR_FILL_FIRST <= pEntry->nWID &&
XATTR_FILL_LAST >= pEntry->
nWID);
1108 if(bBelowFrameAtrEnd || bDrawingLayerRange)
1140 *pTemp->GetPoint() = aEnd;
1150 pTemp->GetDoc().ResetAttrs(*pTemp,
true, aWhichIds);
1173 m_pImpl->m_rPropSet.getPropertyMap().getByName(rPropertyName);
1176 throw beans::UnknownPropertyException(
1177 "Unknown property: " + rPropertyName,
1178 static_cast<cppu::OWeakObject *>(
this));
1182 const bool bDrawingLayerRange(XATTR_FILL_FIRST <= pEntry->nWID &&
XATTR_FILL_LAST >= pEntry->
nWID);
1184 if(bBelowFrameAtrEnd || bDrawingLayerRange)
1186 const SfxPoolItem& rDefItem = rTextNode.GetDoc().GetAttrPool().GetDefaultItem(pEntry->
nWID);
1201 throw uno::RuntimeException();
1204 uno::Reference< text::XTextRange > SAL_CALL
1214 SwParaSelection aParaSel( aCursor );
1215 const uno::Reference< text::XTextRange > xRet =
1228 pTextNode->GetDoc().getIDocumentContentOperations().DelFullPara(aCursor);
1229 lang::EventObject
const ev(static_cast< ::cppu::OWeakObject&>(*
this));
1230 m_pImpl->m_EventListeners.disposeAndClear(ev);
1235 const uno::Reference< lang::XEventListener > & xListener)
1238 m_pImpl->m_EventListeners.addInterface(xListener);
1242 const uno::Reference< lang::XEventListener > & xListener)
1245 m_pImpl->m_EventListeners.removeInterface(xListener);
1248 uno::Reference< container::XEnumeration > SAL_CALL
1256 SwPaM aPam ( aPos );
1257 const uno::Reference< container::XEnumeration > xRef =
1274 uno::Reference< text::XText > SAL_CALL
1279 return m_pImpl->m_xParentText;
1282 uno::Reference< text::XTextRange > SAL_CALL
1291 SwParaSelection aParaSel( aCursor );
1293 uno::Reference< text::XText > xParent =
getText();
1294 const uno::Reference< text::XTextRange > xRet =
1299 uno::Reference< text::XTextRange > SAL_CALL
1308 SwParaSelection aParaSel( aCursor );
1310 uno::Reference< text::XText > xParent =
getText();
1311 const uno::Reference< text::XTextRange > xRet =
1325 SwParaSelection aParaSel( aCursor );
1328 else if (
m_pImpl->IsDescriptor())
1336 SAL_WARN(
"sw.uno",
"getString() for invalid paragraph called. Returning empty string.");
1354 if (pTextNode->
GetText().getLength()) {
1360 else if (
m_pImpl->IsDescriptor())
1366 throw uno::RuntimeException();
1370 uno::Reference< container::XEnumeration > SAL_CALL
1375 if ( rServiceName !=
"com.sun.star.text.TextContent" )
1377 throw uno::RuntimeException();
1384 uno::Reference< container::XEnumeration > xRet =
1389 uno::Sequence< OUString > SAL_CALL
1392 uno::Sequence<OUString> aRet {
"com.sun.star.text.TextContent" };
1408 SwDocShell const*
const pShell( pTextNode->GetDoc().GetDocShell() );
1409 return pShell ? pShell->
GetModel() :
nullptr;
bool MovePara(SwWhichPara, SwMoveFnCollection const &)
const SfxItemPropertySimpleEntry * getByName(std::u16string_view rName) const
std::shared_ptr< SwUnoCursor > CreateUnoCursor(const SwPosition &rPos, bool bTableCursor=false)
constexpr TypedWhichId< SwFormatSurround > RES_SURROUND(101)
SwMoveFnCollection const & fnParaEnd
#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
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
void getNumberingProperty(SwPaM &rPam, PropertyState &eState, Any *pAny)
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
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
void resetCursorPropertyValue(const SfxItemPropertySimpleEntry &rEntry, SwPaM &rPam)
void disposeAndClear(const css::lang::EventObject &rEvt)
bool getCursorPropertyValue(const SfxItemPropertySimpleEntry &rEntry, SwPaM &rPam, Any *pAny, PropertyState &eState, const SwTextNode *pNode)
virtual css::uno::Sequence< css::beans::GetDirectPropertyTolerantResult > SAL_CALL getDirectPropertyValuesTolerant(const css::uno::Sequence< OUString > &rPropertyNames) override
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
css::uno::Reference< css::frame::XModel > GetModel() const
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
void SetString(SwCursor &rCursor, const OUString &rString)
::comphelper::OInterfaceContainerHelper2 m_EventListeners
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)
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)
void GetSinglePropertyValue_Impl(const SfxItemPropertySimpleEntry &rEntry, const SfxItemSet &rSet, uno::Any &rAny) const
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
virtual void SAL_CALL setPropertyValues(const css::uno::Sequence< OUString > &rPropertyNames, const css::uno::Sequence< css::uno::Any > &rValues) override
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
#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)
void SvxUnoConvertToMM(const MapUnit eSourceMapUnit, uno::Any &rMetric)
#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.
static beans::PropertyState lcl_SwXParagraph_getPropertyState(const SwTextNode &rTextNode, const SwAttrSet **ppSet, const SfxItemPropertySimpleEntry &rEntry, bool &rAttrSetFetched)
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
const css::uno::Sequence< sal_Int8 > & getSeq() const
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< SwFormatAnchor > RES_ANCHOR(104)
PropertyMoreFlags nMoreFlags