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;
290 class theSwXParagraphUnoTunnelId :
public rtl::Static< UnoTunnelIdInit, theSwXParagraphUnoTunnelId > {};
301 return ::sw::UnoTunnelImpl<SwXParagraph>(rId,
this);
307 return "SwXParagraph";
316 uno::Sequence< OUString > SAL_CALL
320 "com.sun.star.text.TextContent",
321 "com.sun.star.text.Paragraph",
322 "com.sun.star.style.CharacterProperties",
323 "com.sun.star.style.CharacterPropertiesAsian",
324 "com.sun.star.style.CharacterPropertiesComplex",
325 "com.sun.star.style.ParagraphProperties",
326 "com.sun.star.style.ParagraphPropertiesAsian",
327 "com.sun.star.style.ParagraphPropertiesComplex"
334 OSL_ENSURE(
m_pImpl->m_bIsDescriptor,
"Paragraph is not a descriptor");
338 m_pImpl->m_bIsDescriptor =
false;
341 rTextNode.
SetXParagraph(uno::Reference<text::XTextContent>(
this));
342 m_pImpl->m_xParentText = &rParent;
343 if (!
m_pImpl->m_sText.isEmpty())
351 uno::Reference< beans::XPropertySetInfo > SAL_CALL
356 static uno::Reference< beans::XPropertySetInfo > xRef =
357 m_pImpl->m_rPropSet.getPropertySetInfo();
366 uno::Sequence<OUString> aPropertyNames { rPropertyName };
367 uno::Sequence<uno::Any> aValues(1);
368 aValues.getArray()[0] = rValue;
369 m_pImpl->SetPropertyValues_Impl( aPropertyNames, aValues );
376 uno::Sequence<OUString> aPropertyNames { rPropertyName };
377 const uno::Sequence< uno::Any > aRet =
378 m_pImpl->GetPropertyValues_Impl(aPropertyNames);
379 return aRet.getConstArray()[0];
383 const uno::Sequence< OUString >& rPropertyNames,
384 const uno::Sequence< uno::Any >& rValues )
390 const OUString* pPropertyNames = rPropertyNames.getConstArray();
393 SwParaSelection aParaSel( aCursor );
395 uno::Sequence< beans::PropertyValue > aValues( rPropertyNames.getLength() );
396 for (sal_Int32 nProp = 0; nProp < rPropertyNames.getLength(); nProp++)
402 throw beans::UnknownPropertyException(
403 "Unknown property: " + pPropertyNames[nProp],
404 static_cast< cppu::OWeakObject * >(&
m_rThis));
406 if (pEntry->
nFlags & beans::PropertyAttribute::READONLY)
408 throw beans::PropertyVetoException(
409 "Property is read-only: " + pPropertyNames[nProp],
410 static_cast< cppu::OWeakObject * >(&
m_rThis));
412 aValues[nProp].Name = pPropertyNames[nProp];
413 aValues[nProp].Value = pValues[nProp];
419 const uno::Sequence< OUString >& rPropertyNames,
420 const uno::Sequence< uno::Any >& rValues )
427 m_pImpl->SetPropertyValues_Impl( rPropertyNames, rValues );
429 catch (
const beans::UnknownPropertyException &rException)
433 lang::WrappedTargetException aWExc;
434 aWExc.TargetException <<= rException;
453 if(!aOriginalBrushItem->QueryValue(rAny, rEntry.
nMemberId))
455 OSL_ENSURE(
false,
"Error getting attribute from RES_BACKGROUND (!)");
465 rAny <<= drawing::BitmapMode_REPEAT;
469 rAny <<= drawing::BitmapMode_STRETCH;
473 rAny <<= drawing::BitmapMode_NO_REPEAT;
486 m_rPropSet.getPropertyValue(rEntry, rSet, rAny);
495 rAny <<= static_cast<sal_Int16>(nValue);
500 if(!(rEntry.
nMoreFlags & PropertyMoreFlags::METRIC_ITEM))
521 if(eMapUnit != MapUnit::Map100thMM)
529 const uno::Sequence< OUString > & rPropertyNames )
533 uno::Sequence< uno::Any > aValues(rPropertyNames.getLength());
537 const OUString* pPropertyNames = rPropertyNames.getConstArray();
540 for (sal_Int32 nProp = 0; nProp < rPropertyNames.getLength(); nProp++)
546 throw beans::UnknownPropertyException(
547 "Unknown property: " + pPropertyNames[nProp],
548 static_cast< cppu::OWeakObject * >(&m_rThis));
551 pValues[nProp], pPropertyNames[nProp], pEntry->
nWID))
553 beans::PropertyState eTemp;
555 *pEntry, aPam, &(pValues[nProp]), eTemp, &rTextNode );
558 GetSinglePropertyValue_Impl(*pEntry, rAttrSet, pValues[nProp]);
565 uno::Sequence< uno::Any > SAL_CALL
569 uno::Sequence< uno::Any > aValues;
574 aValues =
m_pImpl->GetPropertyValues_Impl( rPropertyNames );
576 catch (beans::UnknownPropertyException &)
579 throw css::lang::WrappedTargetRuntimeException(
"Unknown property exception caught",
580 static_cast < cppu::OWeakObject * > (
this ), anyEx );
582 catch (lang::WrappedTargetException &)
585 throw css::lang::WrappedTargetRuntimeException(
"WrappedTargetException caught",
586 static_cast < cppu::OWeakObject * > (
this ), anyEx );
593 const uno::Sequence< OUString >& ,
594 const uno::Reference< beans::XPropertiesChangeListener >& )
596 OSL_FAIL(
"SwXParagraph::addPropertiesChangeListener(): not implemented");
600 const uno::Reference< beans::XPropertiesChangeListener >& )
602 OSL_FAIL(
"SwXParagraph::removePropertiesChangeListener(): not implemented");
606 const uno::Sequence< OUString >& ,
607 const uno::Reference< beans::XPropertiesChangeListener >& )
609 OSL_FAIL(
"SwXParagraph::firePropertiesChangeEvent(): not implemented");
614 uno::Sequence< beans::SetPropertyTolerantFailed > SAL_CALL
616 const uno::Sequence< OUString >& rPropertyNames,
617 const uno::Sequence< uno::Any >& rValues )
621 if (rPropertyNames.getLength() != rValues.getLength())
623 throw lang::IllegalArgumentException();
632 const sal_Int32 nProps = rPropertyNames.getLength();
633 const OUString *pProp = rPropertyNames.getConstArray();
636 const uno::Any *pValue = rValues.getConstArray();
638 sal_Int32 nFailed = 0;
639 uno::Sequence< beans::SetPropertyTolerantFailed > aFailed( nProps );
640 beans::SetPropertyTolerantFailed *pFailed = aFailed.getArray();
644 m_pImpl->m_rPropSet.getPropertyMap();
648 SwParaSelection aParaSel( aCursor );
649 for (sal_Int32
i = 0;
i < nProps; ++
i)
653 pFailed[ nFailed ].Name = pProp[
i];
659 pFailed[ nFailed++ ].Result =
660 beans::TolerantPropertySetResultType::UNKNOWN_PROPERTY;
666 if (pEntry->
nFlags & beans::PropertyAttribute::READONLY)
668 pFailed[ nFailed++ ].Result =
669 beans::TolerantPropertySetResultType::PROPERTY_VETO;
674 aCursor,
m_pImpl->m_rPropSet, pProp[i], pValue[i]);
678 catch (beans::UnknownPropertyException &)
682 pFailed[ nFailed++ ].Result =
683 beans::TolerantPropertySetResultType::UNKNOWN_PROPERTY;
685 catch (lang::IllegalArgumentException &)
687 pFailed[ nFailed++ ].Result =
688 beans::TolerantPropertySetResultType::ILLEGAL_ARGUMENT;
690 catch (beans::PropertyVetoException &)
692 pFailed[ nFailed++ ].Result =
693 beans::TolerantPropertySetResultType::PROPERTY_VETO;
695 catch (lang::WrappedTargetException &)
697 pFailed[ nFailed++ ].Result =
698 beans::TolerantPropertySetResultType::WRAPPED_TARGET;
702 aFailed.realloc( nFailed );
706 uno::Sequence< beans::GetPropertyTolerantResult > SAL_CALL
708 const uno::Sequence< OUString >& rPropertyNames )
712 uno::Sequence< beans::GetDirectPropertyTolerantResult > aTmpRes(
713 m_pImpl->GetPropertyValuesTolerant_Impl( rPropertyNames,
false ) );
716 const sal_Int32 nLen = aTmpRes.getLength();
717 uno::Sequence< beans::GetPropertyTolerantResult > aRes( nLen );
718 std::copy(aTmpRes.begin(), aTmpRes.end(), aRes.begin());
722 uno::Sequence< beans::GetDirectPropertyTolerantResult > SAL_CALL
724 const uno::Sequence< OUString >& rPropertyNames )
728 return m_pImpl->GetPropertyValuesTolerant_Impl( rPropertyNames,
true );
731 uno::Sequence< beans::GetDirectPropertyTolerantResult >
733 const uno::Sequence< OUString >& rPropertyNames,
734 bool bDirectValuesOnly )
746 sal_Int32 nProps = rPropertyNames.getLength();
748 uno::Sequence< beans::GetDirectPropertyTolerantResult > aResult( nProps );
749 beans::GetDirectPropertyTolerantResult *pResult = aResult.getArray();
755 for (
const OUString& rProp : rPropertyNames)
757 OSL_ENSURE( nIdx < nProps,
"index out of bounds" );
758 beans::GetDirectPropertyTolerantResult &rResult = pResult[nIdx];
762 rResult.Name = rProp;
769 beans::TolerantPropertySetResultType::UNKNOWN_PROPERTY;
775 bool bAttrSetFetched =
true;
777 rTextNode, &pAttrSet, *pEntry, bAttrSetFetched );
778 rResult.State = eState;
780 rResult.Result = beans::TolerantPropertySetResultType::UNKNOWN_FAILURE;
781 if (!bDirectValuesOnly ||
782 (beans::PropertyState_DIRECT_VALUE == eState))
788 aValue, rProp, pEntry->
nWID ) )
794 beans::PropertyState eTemp;
797 *pEntry, aPam, &aValue, eTemp, &rTextNode );
802 GetSinglePropertyValue_Impl(*pEntry, rValueAttrSet, aValue);
806 rResult.Value = aValue;
807 rResult.Result = beans::TolerantPropertySetResultType::SUCCESS;
812 OSL_ENSURE( nIdx < 1 || pResult[nIdx - 1].
Result != beans::TolerantPropertySetResultType::UNKNOWN_FAILURE,
813 "unknown failure while retrieving property" );
817 catch (beans::UnknownPropertyException &)
821 rResult.Result = beans::TolerantPropertySetResultType::UNKNOWN_PROPERTY;
823 catch (lang::IllegalArgumentException &)
825 rResult.Result = beans::TolerantPropertySetResultType::ILLEGAL_ARGUMENT;
827 catch (beans::PropertyVetoException &)
829 rResult.Result = beans::TolerantPropertySetResultType::PROPERTY_VETO;
831 catch (lang::WrappedTargetException &)
833 rResult.Result = beans::TolerantPropertySetResultType::WRAPPED_TARGET;
838 aResult.realloc( nIdx );
844 uno::Any& rAny, std::u16string_view rPropertyName, sal_uInt16 nWID)
863 { uno::Sequence<text::TextContentAnchorType>
aTypes(1);
864 text::TextContentAnchorType* pArray =
aTypes.getArray();
865 pArray[0] = text::TextContentAnchorType_AT_PARAGRAPH;
878 const uno::Reference< beans::XPropertyChangeListener >& )
880 OSL_FAIL(
"SwXParagraph::addPropertyChangeListener(): not implemented");
886 const uno::Reference< beans::XPropertyChangeListener >& )
888 OSL_FAIL(
"SwXParagraph::removePropertyChangeListener(): not implemented");
894 const uno::Reference< beans::XVetoableChangeListener >& )
896 OSL_FAIL(
"SwXParagraph::addVetoableChangeListener(): not implemented");
902 const uno::Reference< beans::XVetoableChangeListener >& )
904 OSL_FAIL(
"SwXParagraph::removeVetoableChangeListener(): not implemented");
911 bool &rAttrSetFetched)
913 beans::PropertyState eRet(beans::PropertyState_DEFAULT_VALUE);
915 if(!(*ppSet) && !rAttrSetFetched)
918 rAttrSetFetched =
true;
953 eRet = pFormat ? beans::PropertyState_DIRECT_VALUE : beans::PropertyState_AMBIGUOUS_VALUE;
961 eRet = !sVal.isEmpty() ? beans::PropertyState_DIRECT_VALUE
962 : beans::PropertyState_AMBIGUOUS_VALUE;
975 eRet = beans::PropertyState_DIRECT_VALUE;
979 eRet = beans::PropertyState_AMBIGUOUS_VALUE;
993 eRet = beans::PropertyState_DIRECT_VALUE;
1003 if((*ppSet) && SfxItemState::SET == (*ppSet)->GetItemState(rEntry.
nWID,
false))
1005 eRet = beans::PropertyState_DIRECT_VALUE;
1012 beans::PropertyState SAL_CALL
1021 m_pImpl->m_rPropSet.getPropertyMap().getByName(rPropertyName);
1024 throw beans::UnknownPropertyException(
1025 "Unknown property: " + rPropertyName,
1026 static_cast<cppu::OWeakObject *>(
this));
1028 bool bDummy =
false;
1029 const beans::PropertyState eRet =
1034 uno::Sequence< beans::PropertyState > SAL_CALL
1036 const uno::Sequence< OUString >& PropertyNames)
1042 const OUString* pNames = PropertyNames.getConstArray();
1043 uno::Sequence< beans::PropertyState > aRet(PropertyNames.getLength());
1044 beans::PropertyState* pStates = aRet.getArray();
1047 bool bAttrSetFetched =
false;
1049 for (sal_Int32
i = 0, nEnd = PropertyNames.getLength();
i < nEnd;
1050 ++
i, ++pStates, ++pNames)
1056 throw beans::UnknownPropertyException(
1057 "Unknown property: " + *pNames,
1058 static_cast<cppu::OWeakObject *>(
this));
1061 if (bAttrSetFetched && !pSet &&
isATR(pEntry->
nWID))
1063 *pStates = beans::PropertyState_DEFAULT_VALUE;
1068 rTextNode, &pSet, *pEntry, bAttrSetFetched );
1084 if (rPropertyName == UNO_NAME_ANCHOR_TYPE ||
1085 rPropertyName == UNO_NAME_ANCHOR_TYPES ||
1092 SwParaSelection aParaSel( aCursor );
1094 m_pImpl->m_rPropSet.getPropertyMap().getByName( rPropertyName );
1097 throw beans::UnknownPropertyException(
1098 "Unknown property: " + rPropertyName,
1099 static_cast<cppu::OWeakObject *>(
this));
1102 if (pEntry->
nFlags & beans::PropertyAttribute::READONLY)
1104 throw uno::RuntimeException(
1105 "Property is read-only: " + rPropertyName,
1106 static_cast<cppu::OWeakObject *>(
this));
1110 const bool bDrawingLayerRange(XATTR_FILL_FIRST <= pEntry->nWID &&
XATTR_FILL_LAST >= pEntry->
nWID);
1112 if(bBelowFrameAtrEnd || bDrawingLayerRange)
1144 *pTemp->GetPoint() = aEnd;
1154 pTemp->GetDoc().ResetAttrs(*pTemp,
true, aWhichIds);
1177 m_pImpl->m_rPropSet.getPropertyMap().getByName(rPropertyName);
1180 throw beans::UnknownPropertyException(
1181 "Unknown property: " + rPropertyName,
1182 static_cast<cppu::OWeakObject *>(
this));
1186 const bool bDrawingLayerRange(XATTR_FILL_FIRST <= pEntry->nWID &&
XATTR_FILL_LAST >= pEntry->
nWID);
1188 if(bBelowFrameAtrEnd || bDrawingLayerRange)
1190 const SfxPoolItem& rDefItem = rTextNode.GetDoc().GetAttrPool().GetDefaultItem(pEntry->
nWID);
1205 throw uno::RuntimeException();
1208 uno::Reference< text::XTextRange > SAL_CALL
1218 SwParaSelection aParaSel( aCursor );
1219 const uno::Reference< text::XTextRange > xRet =
1232 pTextNode->GetDoc().getIDocumentContentOperations().DelFullPara(aCursor);
1233 lang::EventObject
const ev(static_cast< ::cppu::OWeakObject&>(*
this));
1234 m_pImpl->m_EventListeners.disposeAndClear(ev);
1239 const uno::Reference< lang::XEventListener > & xListener)
1242 m_pImpl->m_EventListeners.addInterface(xListener);
1246 const uno::Reference< lang::XEventListener > & xListener)
1249 m_pImpl->m_EventListeners.removeInterface(xListener);
1252 uno::Reference< container::XEnumeration > SAL_CALL
1260 SwPaM aPam ( aPos );
1261 const uno::Reference< container::XEnumeration > xRef =
1278 uno::Reference< text::XText > SAL_CALL
1283 return m_pImpl->m_xParentText;
1286 uno::Reference< text::XTextRange > SAL_CALL
1295 SwParaSelection aParaSel( aCursor );
1297 uno::Reference< text::XText > xParent =
getText();
1298 const uno::Reference< text::XTextRange > xRet =
1303 uno::Reference< text::XTextRange > SAL_CALL
1312 SwParaSelection aParaSel( aCursor );
1314 uno::Reference< text::XText > xParent =
getText();
1315 const uno::Reference< text::XTextRange > xRet =
1329 SwParaSelection aParaSel( aCursor );
1332 else if (
m_pImpl->IsDescriptor())
1340 SAL_WARN(
"sw.uno",
"getString() for invalid paragraph called. Returning empty string.");
1358 if (pTextNode->
GetText().getLength()) {
1364 else if (
m_pImpl->IsDescriptor())
1370 throw uno::RuntimeException();
1374 uno::Reference< container::XEnumeration > SAL_CALL
1379 if ( rServiceName !=
"com.sun.star.text.TextContent" )
1381 throw uno::RuntimeException();
1388 uno::Reference< container::XEnumeration > xRet =
1393 uno::Sequence< OUString > SAL_CALL
1396 uno::Sequence<OUString> aRet {
"com.sun.star.text.TextContent" };
1412 SwDocShell const*
const pShell( pTextNode->GetDoc().GetDocShell() );
1413 return pShell ? pShell->
GetModel() :
nullptr;
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
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)
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.
static SwXParaFrameEnumeration * Create(const SwPaM &rPaM, const enum ParaFrameMode eParaFrameMode, SwFrameFormat *const pFormat=nullptr)
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)
constexpr sal_uInt16 RES_FRMATR_END(131)
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
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
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