21#include <com/sun/star/text/ControlCharacter.hpp>
22#include <com/sun/star/text/XTextField.hpp>
23#include <com/sun/star/text/TextRangeSelection.hpp>
24#include <com/sun/star/lang/Locale.hpp>
25#include <com/sun/star/beans/PropertyAttribute.hpp>
26#include <com/sun/star/container/XNameContainer.hpp>
51#include <initializer_list>
55using namespace ::
cppu;
60ESelection toESelection(
const text::TextRangeSelection& rSel)
64 aESel.
nStartPos = rSel.Start.PositionInParagraph;
66 aESel.
nEndPos = rSel.End.PositionInParagraph;
72#define QUERYINT( xint ) \
73 if( rType == cppu::UnoType<xint>::get() ) \
74 return uno::Any(uno::Reference< xint >(this))
79 return &aTextCursorSvxPropertySet;
96 return aSvxTextPortionPropertyMap;
101 return &aSvxTextPortionPropertySet;
107 return &aSvxTextPortionSfxPropertySet;
123 return aSvxUnoOutlinerTextCursorPropertyMap;
128 return &aTextCursorSfxPropertySet;
137 DBG_ASSERT( pForwarder,
"I need a valid SvxTextForwarder!" );
140 sal_Int32 nParaCount = pForwarder->GetParagraphCount();
144 rSel =
ESelection( 0,0, nParaCount, pForwarder->GetTextLen( nParaCount ));
150 DBG_ASSERT( pForwarder,
"I need a valid SvxTextForwarder!" );
164 if( rSel.nStartPara < aMaxSelection.
nStartPara )
167 rSel.nStartPos = aMaxSelection.
nStartPos;
169 else if( rSel.nStartPara > aMaxSelection.
nEndPara )
171 rSel.nStartPara = aMaxSelection.
nEndPara;
172 rSel.nStartPos = aMaxSelection.
nEndPos;
174 else if( rSel.nStartPos > pForwarder->GetTextLen( rSel.nStartPara ) )
176 rSel.nStartPos = pForwarder->GetTextLen( rSel.nStartPara );
180 if( rSel.nEndPara < aMaxSelection.
nStartPara )
185 else if( rSel.nEndPara > aMaxSelection.
nEndPara )
187 rSel.nEndPara = aMaxSelection.
nEndPara;
188 rSel.nEndPos = aMaxSelection.
nEndPos;
190 else if( rSel.nEndPos > pForwarder->GetTextLen( rSel.nEndPara ) )
192 rSel.nEndPos = pForwarder->GetTextLen( rSel.nEndPara );
219 DBG_ASSERT(pSource,
"SvxUnoTextRangeBase: I need a valid SvxEditSource!");
221 mpEditSource = pSource->
Clone();
222 if (mpEditSource !=
nullptr)
226 SetSelection( aSelection );
228 mpEditSource->addRange(
this );
232SvxUnoTextRangeBase::SvxUnoTextRangeBase(
const SvxUnoTextRangeBase& rRange)
235, beans::XMultiPropertySet()
236, beans::XMultiPropertyStates()
237, beans::XPropertyState()
238, lang::XServiceInfo()
239,
text::XTextRangeCompare()
241,
osl::DebugBase<SvxUnoTextRangeBase>()
242, mpPropSet(rRange.getPropertySet())
246 if (rRange.mpEditSource)
247 mpEditSource = rRange.mpEditSource->Clone();
249 SvxTextForwarder* pForwarder = mpEditSource ? mpEditSource->GetTextForwarder() :
nullptr;
252 maSelection = rRange.maSelection;
257 mpEditSource->addRange(
this );
260SvxUnoTextRangeBase::~SvxUnoTextRangeBase() noexcept
263 mpEditSource->removeRange(
this );
266void SvxUnoTextRangeBase::SetEditSource(
SvxEditSource* pSource )
noexcept
268 DBG_ASSERT(pSource,
"SvxUnoTextRangeBase: I need a valid SvxEditSource!");
269 DBG_ASSERT(mpEditSource==
nullptr,
"SvxUnoTextRangeBase::SetEditSource called while SvxEditSource already set" );
271 mpEditSource.reset( pSource );
276 mpEditSource->addRange(
this );
281void SvxUnoTextRangeBase::attachField( std::unique_ptr<SvxFieldData> pData )
noexcept
285 SvxTextForwarder* pForwarder = mpEditSource ? mpEditSource->GetTextForwarder() :
nullptr;
293void SvxUnoTextRangeBase::SetSelection(
const ESelection& rSelection )
noexcept
297 maSelection = rSelection;
303uno::Reference< text::XTextRange > SAL_CALL SvxUnoTextRangeBase::getStart()
307 uno::Reference< text::XTextRange > xRange;
309 SvxTextForwarder* pForwarder = mpEditSource ? mpEditSource->GetTextForwarder() :
nullptr;
314 SvxUnoTextBase* pText = comphelper::getFromUnoTunnel<SvxUnoTextBase>( getText() );
317 throw uno::RuntimeException();
325 pRange->SetSelection( aNewSel );
331uno::Reference< text::XTextRange > SAL_CALL SvxUnoTextRangeBase::getEnd()
335 uno::Reference< text::XTextRange > xRet;
337 SvxTextForwarder* pForwarder = mpEditSource ? mpEditSource->GetTextForwarder() :
nullptr;
342 SvxUnoTextBase* pText = comphelper::getFromUnoTunnel<SvxUnoTextBase>( getText() );
345 throw uno::RuntimeException();
353 pNew->SetSelection( aNewSel );
358OUString SAL_CALL SvxUnoTextRangeBase::getString()
362 SvxTextForwarder* pForwarder = mpEditSource ? mpEditSource->GetTextForwarder() :
nullptr;
367 return pForwarder->
GetText( maSelection );
375void SAL_CALL SvxUnoTextRangeBase::setString(
const OUString& aString)
379 SvxTextForwarder* pForwarder = mpEditSource ? mpEditSource->GetTextForwarder() :
nullptr;
388 mpEditSource->UpdateData();
395 sal_Int32 nLen = aConverted.getLength();
397 GoRight( nLen,
true );
401uno::Reference< beans::XPropertySetInfo > SAL_CALL SvxUnoTextRangeBase::getPropertySetInfo()
403 return mpPropSet->getPropertySetInfo();
406void SAL_CALL SvxUnoTextRangeBase::setPropertyValue(
const OUString& PropertyName,
const uno::Any& aValue)
410 text::TextRangeSelection aSel = aValue.get<text::TextRangeSelection>();
411 SetSelection(toESelection(aSel));
416 _setPropertyValue( PropertyName, aValue );
419void SvxUnoTextRangeBase::_setPropertyValue(
const OUString& PropertyName,
const uno::Any& aValue, sal_Int32 nPara )
423 SvxTextForwarder* pForwarder = mpEditSource ? mpEditSource->GetTextForwarder() :
nullptr;
436 OUString aStyle = aValue.get<OUString>();
442 nPara = aSel.nStartPara;
443 nEndPara = aSel.nEndPara;
451 while( nPara <= nEndPara )
457 else if ( nPara == -1 && !bParaAttrib )
461 SfxItemSet aNewSet( *aOldSet.GetPool(), aOldSet.GetRanges() );
474 nPara = aSel.nStartPara;
475 nEndPara = aSel.nEndPara;
483 while( nPara <= nEndPara )
493 GetEditSource()->UpdateData();
498 throw beans::UnknownPropertyException(PropertyName);
503 if(!SetPropertyValueHelper( pMap, rValue, rNewSet, &rSelection, GetEditSource() ))
518 awt::FontDescriptor aDesc;
529 uno::Reference< container::XIndexReplace > xRule;
530 return !aValue.
hasValue() || ((aValue >>= xRule) && !xRule.is());
536 if(pForwarder && pSelection)
538 sal_Int16 nLevel = sal_Int16();
539 if( aValue >>= nLevel )
543 throw lang::IllegalArgumentException();
546 return nLevel < -1 || nLevel > 9;
554 if(pForwarder && pSelection)
556 sal_Int16 nStartValue = -1;
557 if( aValue >>= nStartValue )
568 if(pForwarder && pSelection)
570 bool bParaIsNumberingRestart =
false;
571 if( aValue >>= bParaIsNumberingRestart )
582 if( aValue >>= bBullet )
595 throw lang::IllegalArgumentException();
598uno::Any SAL_CALL SvxUnoTextRangeBase::getPropertyValue(
const OUString& PropertyName)
603 text::TextRangeSelection aSel;
605 aSel.Start.PositionInParagraph = rSel.
nStartPos;
607 aSel.End.PositionInParagraph = rSel.
nEndPos;
611 return _getPropertyValue( PropertyName );
614uno::Any SvxUnoTextRangeBase::_getPropertyValue(
const OUString& PropertyName, sal_Int32 nPara )
620 SvxTextForwarder* pForwarder = mpEditSource ? mpEditSource->GetTextForwarder() :
nullptr;
626 std::optional<SfxItemSet> oAttribs;
633 oAttribs->ClearInvalidItems();
641 throw beans::UnknownPropertyException(PropertyName);
653 uno::Reference< text::XTextRange > xAnchor(
this );
656 std::optional<Color> pTColor;
657 std::optional<Color> pFColor;
658 std::optional<FontLineStyle> pFldLineStyle;
663 uno::Reference< text::XTextField > xField(
new SvxUnoTextField( xAnchor, aPresentation, pData ) );
671 rAny <<= OUString(
"TextField");
675 rAny <<= OUString(
"Text");
681 rAny <<= GetEditSource()->GetTextForwarder()->GetStyleSheet(maSelection.nStartPara);
686 if(!GetPropertyValueHelper( *
const_cast<SfxItemSet*
>(&rSet), pMap, rAny, &maSelection, GetEditSource() ))
697 awt::FontDescriptor aDesc;
706 if( eState != SfxItemState::SET && eState != SfxItemState::DEFAULT)
707 throw uno::RuntimeException();
711 if( pBulletItem ==
nullptr )
712 throw uno::RuntimeException();
721 if(pForwarder && pSelection)
732 if(pForwarder && pSelection)
739 if(pForwarder && pSelection)
748 if( eState == SfxItemState::SET || eState == SfxItemState::DEFAULT )
766void SAL_CALL SvxUnoTextRangeBase::addPropertyChangeListener(
const OUString& ,
const uno::Reference< beans::XPropertyChangeListener >& ) {}
767void SAL_CALL SvxUnoTextRangeBase::removePropertyChangeListener(
const OUString& ,
const uno::Reference< beans::XPropertyChangeListener >& ) {}
768void SAL_CALL SvxUnoTextRangeBase::addVetoableChangeListener(
const OUString& ,
const uno::Reference< beans::XVetoableChangeListener >& ) {}
769void SAL_CALL SvxUnoTextRangeBase::removeVetoableChangeListener(
const OUString& ,
const uno::Reference< beans::XVetoableChangeListener >& ) {}
772void SAL_CALL SvxUnoTextRangeBase::setPropertyValues(
const uno::Sequence< OUString >& aPropertyNames,
const uno::Sequence< uno::Any >& aValues )
774 _setPropertyValues( aPropertyNames, aValues );
777void SvxUnoTextRangeBase::_setPropertyValues(
const uno::Sequence< OUString >& aPropertyNames,
const uno::Sequence< uno::Any >& aValues, sal_Int32 nPara )
779 if (aPropertyNames.getLength() != aValues.getLength())
780 throw lang::IllegalArgumentException(
"lengths do not match",
781 static_cast<css::beans::XPropertySet*
>(
this), -1);
785 SvxTextForwarder* pForwarder = mpEditSource ? mpEditSource->GetTextForwarder() :
nullptr;
793 const OUString* pPropertyNames = aPropertyNames.getConstArray();
795 sal_Int32
nCount = aPropertyNames.getLength();
797 sal_Int32 nEndPara = nPara;
798 sal_Int32 nTempPara = nPara;
800 if( nTempPara == -1 )
802 nTempPara = aSel.nStartPara;
803 nEndPara = aSel.nEndPara;
806 std::optional<SfxItemSet> pOldAttrSet;
807 std::optional<SfxItemSet> pNewAttrSet;
809 std::optional<SfxItemSet> pOldParaSet;
810 std::optional<SfxItemSet> pNewParaSet;
812 std::optional<OUString> aStyleName;
824 aStyleName.emplace((*pValues).get<OUString>());
826 else if( (nPara == -1) && !bParaAttrib )
830 pOldAttrSet.emplace( pForwarder->
GetAttribs( aSel ) );
831 pNewAttrSet.emplace( *pOldAttrSet->GetPool(), pOldAttrSet->GetRanges() );
839 if( pNewAttrSet->GetItemState( pMap->
nWID,
true, &pItem ) == SfxItemState::SET )
841 pOldAttrSet->Put( *pItem );
850 pOldParaSet.emplace( rSet );
851 pNewParaSet.emplace( *pOldParaSet->GetPool(), pOldParaSet->GetRanges() );
859 if( pNewParaSet->GetItemState( pMap->
nWID,
true, &pItem ) == SfxItemState::SET )
861 pOldParaSet->Put( *pItem );
869 bool bNeedsUpdate =
false;
871 if( pNewParaSet || aStyleName )
873 if( pNewParaSet->Count() )
875 while( nTempPara <= nEndPara )
878 aSet.Put( *pNewParaSet );
893 if( pNewAttrSet->Count() )
903 GetEditSource()->UpdateData();
906uno::Sequence< uno::Any > SAL_CALL SvxUnoTextRangeBase::getPropertyValues(
const uno::Sequence< OUString >& aPropertyNames )
908 return _getPropertyValues( aPropertyNames );
911uno::Sequence< uno::Any > SvxUnoTextRangeBase::_getPropertyValues(
const uno::Sequence< OUString >& aPropertyNames, sal_Int32 nPara )
915 sal_Int32
nCount = aPropertyNames.getLength();
918 uno::Sequence< uno::Any > aValues( nCount );
920 SvxTextForwarder* pForwarder = mpEditSource ? mpEditSource->GetTextForwarder() :
nullptr;
923 std::optional<SfxItemSet> oAttribs;
929 oAttribs->ClearInvalidItems();
931 const OUString* pPropertyNames = aPropertyNames.getConstArray();
947void SAL_CALL SvxUnoTextRangeBase::addPropertiesChangeListener(
const uno::Sequence< OUString >& ,
const uno::Reference< beans::XPropertiesChangeListener >& )
951void SAL_CALL SvxUnoTextRangeBase::removePropertiesChangeListener(
const uno::Reference< beans::XPropertiesChangeListener >& )
955void SAL_CALL SvxUnoTextRangeBase::firePropertiesChangeEvent(
const uno::Sequence< OUString >& ,
const uno::Reference< beans::XPropertiesChangeListener >& )
960beans::PropertyState SAL_CALL SvxUnoTextRangeBase::getPropertyState(
const OUString& PropertyName )
962 return _getPropertyState( PropertyName );
969beans::PropertyState SvxUnoTextRangeBase::_getPropertyState(
const SfxItemPropertyMapEntry* pMap, sal_Int32 nPara)
973 SvxTextForwarder* pForwarder = mpEditSource ? mpEditSource->GetTextForwarder() :
nullptr;
977 bool bItemStateSet(
false);
990 switch( eTempItemState )
992 case SfxItemState::DISABLED:
993 case SfxItemState::DONTCARE:
994 eItemState = SfxItemState::DONTCARE;
995 bItemStateSet =
true;
998 case SfxItemState::DEFAULT:
1001 eItemState = SfxItemState::DEFAULT;
1002 bItemStateSet =
true;
1006 case SfxItemState::SET:
1007 if( !bItemStateSet )
1009 eItemState = SfxItemState::SET;
1010 bItemStateSet =
true;
1014 throw beans::UnknownPropertyException();
1025 eItemState = SfxItemState::SET;
1026 bItemStateSet =
true;
1037 bItemStateSet =
true;
1044 switch( eItemState )
1046 case SfxItemState::DONTCARE:
1047 case SfxItemState::DISABLED:
1048 return beans::PropertyState_AMBIGUOUS_VALUE;
1049 case SfxItemState::SET:
1050 return beans::PropertyState_DIRECT_VALUE;
1051 case SfxItemState::DEFAULT:
1052 return beans::PropertyState_DEFAULT_VALUE;
1058 throw beans::UnknownPropertyException();
1061beans::PropertyState SvxUnoTextRangeBase::_getPropertyState(std::u16string_view PropertyName, sal_Int32 nPara )
1065 return _getPropertyState( mpPropSet->getPropertyMapEntry( PropertyName ), nPara);
1068uno::Sequence< beans::PropertyState > SAL_CALL SvxUnoTextRangeBase::getPropertyStates(
const uno::Sequence< OUString >& aPropertyName )
1070 return _getPropertyStates( aPropertyName );
1073uno::Sequence< beans::PropertyState > SvxUnoTextRangeBase::_getPropertyStates(
const uno::Sequence< OUString >& PropertyName, sal_Int32 nPara )
1075 uno::Sequence< beans::PropertyState > aRet( PropertyName.getLength() );
1077 SvxTextForwarder* pForwarder = mpEditSource ? mpEditSource->GetTextForwarder() :
nullptr;
1080 std::optional<SfxItemSet> pSet;
1092 beans::PropertyState* pState = aRet.getArray();
1093 for(
const OUString& rName : PropertyName )
1096 if( !_getOnePropertyStates(&*pSet, pMap, *pState++) )
1098 throw beans::UnknownPropertyException(rName);
1111 bool bItemStateSet(
false);
1113 bool bUnknownPropertyFound =
false;
1114 switch( pMap->
nWID )
1123 switch( eTempItemState )
1125 case SfxItemState::DISABLED:
1126 case SfxItemState::DONTCARE:
1127 eItemState = SfxItemState::DONTCARE;
1128 bItemStateSet =
true;
1131 case SfxItemState::DEFAULT:
1132 if( !bItemStateSet )
1134 eItemState = SfxItemState::DEFAULT;
1135 bItemStateSet =
true;
1139 case SfxItemState::SET:
1140 if( !bItemStateSet )
1142 eItemState = SfxItemState::SET;
1143 bItemStateSet =
true;
1147 bUnknownPropertyFound =
true;
1159 eItemState = SfxItemState::SET;
1160 bItemStateSet =
true;
1167 bItemStateSet =
true;
1172 if( bUnknownPropertyFound )
1187 eItemState = SfxItemState::DEFAULT;
1192 sal_Int16 nLumMod = 10000;
1196 nLumMod = rTransform.mnValue;
1198 if (nLumMod == 10000)
1200 eItemState = SfxItemState::DEFAULT;
1206 sal_Int16 nLumOff = 0;
1210 nLumOff = rTransform.mnValue;
1214 eItemState = SfxItemState::DEFAULT;
1221 eItemState = SfxItemState::DEFAULT;
1227 switch( eItemState )
1229 case SfxItemState::SET:
1230 rState = beans::PropertyState_DIRECT_VALUE;
1232 case SfxItemState::DEFAULT:
1233 rState = beans::PropertyState_DEFAULT_VALUE;
1238 rState = beans::PropertyState_AMBIGUOUS_VALUE;
1243 rState = beans::PropertyState_AMBIGUOUS_VALUE;
1248void SAL_CALL SvxUnoTextRangeBase::setPropertyToDefault(
const OUString& PropertyName )
1250 _setPropertyToDefault( PropertyName );
1253void SvxUnoTextRangeBase::_setPropertyToDefault(
const OUString& PropertyName, sal_Int32 nPara )
1257 SvxTextForwarder* pForwarder = mpEditSource ? mpEditSource->GetTextForwarder() :
nullptr;
1265 _setPropertyToDefault( pForwarder, pMap, nPara );
1270 throw beans::UnknownPropertyException(PropertyName);
1293 aSet.InvalidateItem( pMap->
nWID );
1301 GetEditSource()->UpdateData();
1308uno::Any SAL_CALL SvxUnoTextRangeBase::getPropertyDefault(
const OUString& aPropertyName )
1312 SvxTextForwarder* pForwarder = mpEditSource ? mpEditSource->GetTextForwarder() :
nullptr;
1320 switch( pMap->
nWID )
1350 throw beans::UnknownPropertyException(aPropertyName);
1354void SAL_CALL SvxUnoTextRangeBase::setAllPropertiesToDefault()
1358 SvxTextForwarder* pForwarder = mpEditSource ? mpEditSource->GetTextForwarder() :
nullptr;
1364 _setPropertyToDefault( pForwarder, entry, -1 );
1369void SAL_CALL SvxUnoTextRangeBase::setPropertiesToDefault(
const uno::Sequence< OUString >& aPropertyNames )
1371 for(
const OUString& rName : aPropertyNames )
1373 setPropertyToDefault( rName );
1377uno::Sequence< uno::Any > SAL_CALL SvxUnoTextRangeBase::getPropertyDefaults(
const uno::Sequence< OUString >& aPropertyNames )
1379 uno::Sequence< uno::Any > ret( aPropertyNames.getLength() );
1380 uno::Any* pDefaults = ret.getArray();
1382 for(
const OUString& rName : aPropertyNames )
1384 *pDefaults++ = getPropertyDefault( rName );
1391void SvxUnoTextRangeBase::CollapseToStart() noexcept
1395 maSelection.nEndPara = maSelection.nStartPara;
1396 maSelection.nEndPos = maSelection.nStartPos;
1399void SvxUnoTextRangeBase::CollapseToEnd() noexcept
1403 maSelection.nStartPara = maSelection.nEndPara;
1404 maSelection.nStartPos = maSelection.nEndPos;
1407bool SvxUnoTextRangeBase::IsCollapsed() noexcept
1411 return ( maSelection.nStartPara == maSelection.nEndPara &&
1412 maSelection.nStartPos == maSelection.nEndPos );
1415bool SvxUnoTextRangeBase::GoLeft(sal_Int32 nCount,
bool Expand)
noexcept
1420 sal_Int32 nNewPos = maSelection.nEndPos;
1421 sal_Int32 nNewPar = maSelection.nEndPara;
1425 while ( nCount > nNewPos && bOk )
1432 pForwarder = mpEditSource->GetTextForwarder();
1442 nNewPos = nNewPos -
nCount;
1443 maSelection.nStartPara = nNewPar;
1444 maSelection.nStartPos = nNewPos;
1453bool SvxUnoTextRangeBase::GoRight(sal_Int32 nCount,
bool Expand)
noexcept
1463 sal_Int32 nNewPos = maSelection.nEndPos +
nCount;
1464 sal_Int32 nNewPar = maSelection.nEndPara;
1468 sal_Int32 nThisLen = pForwarder->
GetTextLen( nNewPar );
1469 while ( nNewPos > nThisLen && bOk )
1471 if ( nNewPar + 1 >= nParCount )
1475 nNewPos -= nThisLen+1;
1477 nThisLen = pForwarder->
GetTextLen( nNewPar );
1483 maSelection.nEndPara = nNewPar;
1484 maSelection.nEndPos = nNewPos;
1493void SvxUnoTextRangeBase::GotoStart(
bool Expand)
noexcept
1495 maSelection.nStartPara = 0;
1496 maSelection.nStartPos = 0;
1502void SvxUnoTextRangeBase::GotoEnd(
bool Expand)
noexcept
1506 SvxTextForwarder* pForwarder = mpEditSource ? mpEditSource->GetTextForwarder() :
nullptr;
1514 maSelection.nEndPara = nPar;
1515 maSelection.nEndPos = pForwarder->
GetTextLen( nPar );
1522sal_Bool SAL_CALL SvxUnoTextRangeBase::supportsService(
const OUString& ServiceName )
1527uno::Sequence< OUString > SAL_CALL SvxUnoTextRangeBase::getSupportedServiceNames()
1529 return getSupportedServiceNames_Static();
1532uno::Sequence< OUString > SvxUnoTextRangeBase::getSupportedServiceNames_Static()
1534 return {
"com.sun.star.style.CharacterProperties",
1535 "com.sun.star.style.CharacterPropertiesComplex",
1536 "com.sun.star.style.CharacterPropertiesAsian" };
1540sal_Int16 SAL_CALL SvxUnoTextRangeBase::compareRegionStarts(
const uno::Reference< text::XTextRange >& xR1,
const uno::Reference< text::XTextRange >& xR2 )
1542 SvxUnoTextRangeBase* pR1 = comphelper::getFromUnoTunnel<SvxUnoTextRangeBase>( xR1 );
1543 SvxUnoTextRangeBase* pR2 = comphelper::getFromUnoTunnel<SvxUnoTextRangeBase>( xR2 );
1545 if( (pR1 ==
nullptr) || (pR2 ==
nullptr) )
1546 throw lang::IllegalArgumentException();
1564sal_Int16 SAL_CALL SvxUnoTextRangeBase::compareRegionEnds(
const uno::Reference< text::XTextRange >& xR1,
const uno::Reference< text::XTextRange >& xR2 )
1566 SvxUnoTextRangeBase* pR1 = comphelper::getFromUnoTunnel<SvxUnoTextRangeBase>( xR1 );
1567 SvxUnoTextRangeBase* pR2 = comphelper::getFromUnoTunnel<SvxUnoTextRangeBase>( xR2 );
1569 if( (pR1 ==
nullptr) || (pR2 ==
nullptr) )
1570 throw lang::IllegalArgumentException();
1590 mbPortion( bPortion )
1603 return uno::Any(uno::Reference< beans::XMultiPropertyStates >(
this));
1605 return uno::Any(uno::Reference< beans::XPropertySet >(
this));
1606 else QUERYINT( beans::XPropertyState );
1607 else QUERYINT( text::XTextRangeCompare );
1609 return uno::Any(uno::Reference< beans::XMultiPropertySet >(
this));
1610 else QUERYINT( lang::XServiceInfo );
1611 else QUERYINT( lang::XTypeProvider );
1614 return OWeakAggObject::queryAggregation( rType );
1619 return OWeakAggObject::queryInterface(rType);
1625 OWeakAggObject::acquire();
1631 OWeakAggObject::release();
1638 static const uno::Sequence< uno::Type > TYPES {
1653 return css::uno::Sequence<sal_Int8>();
1665 return "SvxUnoTextRange";
1672 : SvxUnoTextRangeBase(_pSet)
1677 : SvxUnoTextRangeBase(pSource, _pSet)
1681 ::GetSelection( aSelection, GetEditSource()->GetTextForwarder() );
1682 SetSelection( aSelection );
1686: SvxUnoTextRangeBase( rText )
1687,
text::XTextAppend()
1689, container::XEnumerationAccess()
1690,
text::XTextRangeMover()
1691, lang::XTypeProvider()
1706 return uno::Any(uno::Reference< text::XTextRange >(
static_cast<text::XText*
>(
this)));
1707 QUERYINT(container::XEnumerationAccess );
1708 QUERYINT( container::XElementAccess );
1709 QUERYINT( beans::XMultiPropertyStates );
1711 QUERYINT( beans::XMultiPropertySet );
1713 QUERYINT( text::XTextRangeCompare );
1718 QUERYINT( text::XParagraphAppend );
1719 QUERYINT( text::XTextPortionAppend );
1730 static const uno::Sequence< uno::Type > TYPES {
1751 return css::uno::Sequence<sal_Int8>();
1757 pCursor->SetSelection( rSel );
1773 uno::Reference< text::XTextCursor > xCursor;
1775 if( aTextPosition.is() )
1777 SvxUnoTextRangeBase* pRange = comphelper::getFromUnoTunnel<SvxUnoTextRangeBase>( aTextPosition );
1792 SvxUnoTextRangeBase* pRange = comphelper::getFromUnoTunnel<SvxUnoTextRange>( xRange );
1802 pRange->CollapseToEnd();
1804 pRange->setString( aString );
1806 pRange->CollapseToEnd();
1808 if (GetEditSource())
1811 ::GetSelection( aSelection, GetEditSource()->GetTextForwarder() );
1812 SetSelection( aSelection );
1820 SvxTextForwarder* pForwarder = GetEditSource() ? GetEditSource()->GetTextForwarder() :
nullptr;
1827 SetSelection( aSelection );
1829 switch( nControlCharacter )
1831 case text::ControlCharacter::PARAGRAPH_BREAK:
1837 case text::ControlCharacter::LINE_BREAK:
1839 SvxUnoTextRangeBase* pRange = comphelper::getFromUnoTunnel<SvxUnoTextRange>( xRange );
1858 GetEditSource()->UpdateData();
1864 pRange->SetSelection( aRange );
1868 case text::ControlCharacter::APPEND_PARAGRAPH:
1870 SvxUnoTextRangeBase* pRange = comphelper::getFromUnoTunnel<SvxUnoTextRange>( xRange );
1881 pRange->SetSelection( aRange );
1882 static constexpr OUStringLiteral
CR =
u"\x0D";
1883 pRange->setString(
CR );
1890 pRange->SetSelection( aRange );
1897 throw lang::IllegalArgumentException();
1906 SvxTextForwarder* pForwarder = GetEditSource() ? GetEditSource()->GetTextForwarder() :
nullptr;
1910 uno::Reference<beans::XPropertySet> xPropSet(xRange, uno::UNO_QUERY);
1912 throw lang::IllegalArgumentException();
1915 text::TextRangeSelection aSel = aAny.get<text::TextRangeSelection>();
1917 aSel.Start = aSel.End;
1921 throw lang::IllegalArgumentException();
1925 GetEditSource()->UpdateData();
1927 uno::Reference<beans::XPropertySet> xPropSetContent(xContent, uno::UNO_QUERY);
1928 if (!xPropSetContent.is())
1929 throw lang::IllegalArgumentException();
1933 aSel.End.PositionInParagraph += 1;
1934 aSel.Start.PositionInParagraph = aSel.End.PositionInParagraph;
1948 if (GetEditSource())
1951 ::GetSelection( aSelection, GetEditSource()->GetTextForwarder() );
1952 SetSelection( aSelection );
1955 return static_cast<text::XText*
>(
this);
1960 return SvxUnoTextRangeBase::getStart();
1965 return SvxUnoTextRangeBase::getEnd();
1970 return SvxUnoTextRangeBase::getString();
1975 SvxUnoTextRangeBase::setString(aString);
1984 if (!GetEditSource())
1985 return uno::Reference< container::XEnumeration >();
1990 ::GetSelection( aSelection, GetEditSource()->GetTextForwarder() );
2029 const uno::Sequence< beans::PropertyValue >& rPropertyValues,
2034 for (
const beans::PropertyValue& rProp : rPropertyValues)
2038 throw beans::UnknownPropertyException(
"Unknown property: " + rProp.Name );
2044 if (pEntry->
nFlags & beans::PropertyAttribute::READONLY)
2046 throw uno::RuntimeException(
"Property is read-only: " + rProp.Name );
2051 awt::FontDescriptor aDesc;
2052 if (rProp.Value >>= aDesc)
2059 sal_Int16 nStartValue = -1;
2060 if( !(rProp.Value >>= nStartValue) )
2061 throw lang::IllegalArgumentException();
2070 bool bParaIsNumberingRestart =
false;
2071 if( !(rProp.Value >>= bParaIsNumberingRestart) )
2072 throw lang::IllegalArgumentException();
2083 const uno::Sequence< beans::PropertyValue >& ,
2084 const uno::Reference< text::XTextRange >& )
2086 uno::Reference< text::XTextRange > xRet;
2091 const uno::Sequence< beans::PropertyValue >& rCharAndParaProps )
2095 uno::Reference< text::XTextRange > xRet;
2101 DBG_ASSERT( nParaCount > 0,
"paragraph count is 0 or negative" );
2105 sal_Int32 nPara = nParaCount - 1;
2114 pRange->SetSelection( aSel );
2120 const OUString& rText,
2121 const uno::Sequence< beans::PropertyValue >& rCharAndParaProps,
2122 const uno::Reference< text::XTextRange>& rTextRange )
2126 uno::Reference< text::XTextRange > xRet;
2128 if (!rTextRange.is())
2131 SvxUnoTextRangeBase* pRange = comphelper::getFromUnoTunnel<SvxUnoTextRange>(rTextRange);
2140 pRange->setString(rText);
2142 ESelection aSelection(pRange->GetSelection());
2153 pNewRange->SetSelection(aSelection);
2154 for(
const beans::PropertyValue& rProp : rCharAndParaProps )
2155 pNewRange->setPropertyValue( rProp.Name, rProp.Value );
2162 const OUString& rText,
2163 const uno::Sequence< beans::PropertyValue >& rCharAndParaProps )
2169 uno::Reference< text::XTextRange > xRet;
2173 DBG_ASSERT( nParaCount > 0,
"paragraph count is 0 or negative" );
2174 sal_Int32 nPara = nParaCount - 1;
2178 sal_Int32 nEnd = pTextForwarder->
GetTextLen( nPara );
2181 ESelection aSel( nPara, nStart, nPara, nEnd );
2191 pRange->SetSelection( aSel );
2192 for(
const beans::PropertyValue& rProp : rCharAndParaProps )
2193 pRange->setPropertyValue( rProp.Name, rProp.Value );
2199 const uno::Reference< text::XTextCopy >& xSource )
2202 uno::Reference< lang::XUnoTunnel > xUT( xSource, uno::UNO_QUERY );
2205 if( !pTextForwarder )
2207 if (
auto pSource = comphelper::getFromUnoTunnel<SvxUnoTextBase>(xUT))
2209 SvxEditSource *pSourceEditSource = pSource->GetEditSource();
2211 if( pSourceTextForwarder )
2213 pTextForwarder->
CopyText( *pSourceTextForwarder );
2219 uno::Reference< text::XText > xSourceText( xSource, uno::UNO_QUERY );
2220 if( xSourceText.is() )
2230 return "SvxUnoTextBase";
2241 SvxUnoTextRangeBase::getSupportedServiceNames_Static(),
2242 std::initializer_list<std::u16string_view>{
u"com.sun.star.text.Text" });
2245const uno::Sequence< sal_Int8 > & SvxUnoTextBase::getUnoTunnelId() noexcept
2248 return theSvxUnoTextBaseUnoTunnelId.
getSeq();
2251sal_Int64 SAL_CALL SvxUnoTextBase::getSomething(
const uno::Sequence< sal_Int8 >& rId )
2282 aAny = OWeakAggObject::queryAggregation( rType );
2289 return OWeakAggObject::queryInterface( rType );
2294 OWeakAggObject::acquire();
2299 OWeakAggObject::release();
2310 return css::uno::Sequence<sal_Int8>();
2316 return theSvxUnoTextUnoTunnelId.
getSeq();
2395 return SfxItemState::UNKNOWN;
2400 return SfxItemState::UNKNOWN;
2525 return nNewDepth == 0;
const PropertyValue * pValues
static SfxItemPool & GetGlobalItemPool()
const SfxPoolItem & GetDefaultItem(sal_uInt16 nWhich) const
static bool IsWhich(sal_uInt16 nId)
const SfxItemPropertyMapEntry * getByName(std::u16string_view rName) const
void setPropertyValue(const SfxItemPropertyMapEntry &rEntry, const css::uno::Any &aVal, SfxItemSet &rSet) const
const SfxItemPropertyMap & getPropertyMap() const
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
const SfxPoolItem * GetItem(sal_uInt16 nWhich, bool bSearchInParent=true) const
SfxItemSet CloneAsValue(bool bItems=true, SfxItemPool *pToPool=nullptr) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
SvxColorItem item describes a color.
model::ComplexColor const & getComplexColor() const
virtual tools::Rectangle GetCharBounds(sal_Int32 nPara, sal_Int32 nIndex) const override
Query the bounding rectangle of the given character.
virtual void UpdateData() override
Write back data to model.
virtual EBulletInfo GetBulletInfo(sal_Int32 nPara) const override
Query information regarding bullets for given paragraph on the underlying edit engine.
virtual bool SetDepth(sal_Int32 nPara, sal_Int16 nNewDepth) override
Set the outline depth of given paragraph.
virtual bool GetWordIndices(sal_Int32 nPara, sal_Int32 nIndex, sal_Int32 &nStart, sal_Int32 &nEnd) const override
Get the start and the end index of the word at the given index.
virtual OUString GetText(const ESelection &rSel) const override
virtual sal_Int32 GetFieldCount(sal_Int32 nPara) const override
Query number of fields in the underlying edit engine.
virtual sal_Int32 GetLineCount(sal_Int32 nPara) const override
Query number of lines in the formatted paragraph.
virtual MapMode GetMapMode() const override
Query the map mode of the underlying EditEngine/Outliner.
virtual sal_Int32 AppendTextPortion(sal_Int32 nPara, const OUString &rText, const SfxItemSet &rSet) override
virtual sal_Int16 GetDepth(sal_Int32 nPara) const override
Get the outline depth of given paragraph.
virtual OutputDevice * GetRefDevice() const override
Query the reference output device of the underlying EditEngine/Outliner.
virtual void AppendParagraph() override
virtual void GetPortions(sal_Int32 nPara, std::vector< sal_Int32 > &rList) const override
virtual void QuickInsertLineBreak(const ESelection &rSel) override
virtual bool Delete(const ESelection &) override
Delete given text range and reformat text.
virtual const SfxItemSet * GetEmptyItemSetPtr() override
virtual ~SvxDummyTextSource() override
SfxItemState GetItemState(const ESelection &rSel, sal_uInt16 nWhich) const override
virtual sal_Int32 GetLineNumberAtIndex(sal_Int32 nPara, sal_Int32 nIndex) const override
Query the line number for an index in the paragraphs text.
virtual OUString GetStyleSheet(sal_Int32 nPara) const override
virtual void SetParaAttribs(sal_Int32 nPara, const SfxItemSet &rSet) override
virtual sal_Int32 GetTextLen(sal_Int32 nParagraph) const override
virtual tools::Rectangle GetParaBounds(sal_Int32 nPara) const override
Query the bounding rectangle of the given paragraph.
virtual SfxItemSet GetAttribs(const ESelection &rSel, EditEngineAttribs nOnlyHardAttrib=EditEngineAttribs::All) const override
virtual OUString CalcFieldValue(const SvxFieldItem &rField, sal_Int32 nPara, sal_Int32 nPos, std::optional< Color > &rpTxtColor, std::optional< Color > &rpFldColor, std::optional< FontLineStyle > &rpFldLineStyle) override
virtual void FieldClicked(const SvxFieldItem &rField) override
virtual bool IsValid() const override
Query state of forwarder.
virtual bool InsertText(const OUString &, const ESelection &) override
Insert/Replace given text in given range and reformat text.
virtual void QuickSetAttribs(const SfxItemSet &rSet, const ESelection &rSel) override
virtual sal_Int32 GetParagraphCount() const override
virtual void QuickInsertField(const SvxFieldItem &rFld, const ESelection &rSel) override
virtual bool GetIndexAtPoint(const Point &, sal_Int32 &nPara, sal_Int32 &nIndex) const override
Query paragraph and character index of the character at the given point.
virtual void GetLineBoundaries(sal_Int32 &rStart, sal_Int32 &rEnd, sal_Int32 nParagraph, sal_Int32 nLine) const override
Query bounds of line in paragraph.
virtual bool GetAttributeRun(sal_Int32 &nStartIndex, sal_Int32 &nEndIndex, sal_Int32 nPara, sal_Int32 nIndex, bool bInCell=false) const override
Query range of similar attributes.
virtual std::unique_ptr< SvxEditSource > Clone() const override
Returns a new reference to the same object. This is a shallow copy.
virtual void QuickInsertText(const OUString &rText, const ESelection &rSel) override
virtual bool QuickFormatDoc(bool bFull=false) override
Updates the formatting.
virtual void RemoveAttribs(const ESelection &rSelection) override
virtual void SetStyleSheet(sal_Int32 nPara, const OUString &rStyleName) override
virtual sal_Int32 GetLineLen(sal_Int32 nPara, sal_Int32 nLine) const override
Query line length.
virtual void CopyText(const SvxTextForwarder &rSource) override
virtual LanguageType GetLanguage(sal_Int32, sal_Int32) const override
Query language of character at given position on the underlying edit engine.
virtual SfxItemSet GetParaAttribs(sal_Int32 nPara) const override
virtual SfxItemPool * GetPool() const override
virtual SvxTextForwarder * GetTextForwarder() override
Query the text forwarder.
virtual EFieldInfo GetFieldInfo(sal_Int32 nPara, sal_uInt16 nField) const override
Query information for given field number in the underlying edit engine.
Wrapper class for unified EditEngine/Outliner access.
virtual SvxTextForwarder * GetTextForwarder()=0
Query the text forwarder.
virtual void UpdateData()=0
Write back data to model.
virtual std::unique_ptr< SvxEditSource > Clone() const =0
Returns a new reference to the same object. This is a shallow copy.
static SvxFieldData * Create(const css::uno::Reference< css::text::XTextContent > &xContent)
This item stores a field (SvxFieldData).
const SvxFieldData * GetField() const
static void setPropertyValue(const SfxItemPropertyMapEntry *pMap, const css::uno::Any &rVal, SfxItemSet &rSet, bool bDontConvertNegativeValues)
static css::uno::Any getPropertyValue(const SfxItemPropertyMapEntry *pMap, const SfxItemSet &rSet, bool bSearchInParent, bool bDontConvertNegativeValues)
const SvxNumRule & GetNumRule() const
Contains an EditEngine or an Outliner and unifies access to them.
virtual void QuickInsertText(const OUString &rText, const ESelection &rSel)=0
virtual void SetNumberingStartValue(sal_Int32 nPara, sal_Int32 nNumberingStartValue)
virtual void QuickInsertLineBreak(const ESelection &rSel)=0
virtual void SetStyleSheet(sal_Int32 nPara, const OUString &rStyleName)=0
virtual void QuickSetAttribs(const SfxItemSet &rSet, const ESelection &rSel)=0
virtual bool SetDepth(sal_Int32 nPara, sal_Int16 nNewDepth)=0
Set the outline depth of given paragraph.
virtual const SfxItemSet * GetEmptyItemSetPtr()=0
virtual SfxItemSet GetAttribs(const ESelection &rSel, EditEngineAttribs nOnlyHardAttrib=EditEngineAttribs::All) const =0
virtual sal_Int32 GetNumberingStartValue(sal_Int32 nPara)
virtual void CopyText(const SvxTextForwarder &rSource)=0
virtual void RemoveAttribs(const ESelection &rSelection)=0
virtual sal_Int16 GetDepth(sal_Int32 nPara) const =0
Get the outline depth of given paragraph.
virtual SfxItemSet GetParaAttribs(sal_Int32 nPara) const =0
virtual void AppendParagraph()=0
virtual SfxItemPool * GetPool() const =0
virtual OUString CalcFieldValue(const SvxFieldItem &rField, sal_Int32 nPara, sal_Int32 nPos, std::optional< Color > &rpTxtColor, std::optional< Color > &rpFldColor, std::optional< FontLineStyle > &rpFldLineStyle)=0
virtual sal_Int32 AppendTextPortion(sal_Int32 nPara, const OUString &rText, const SfxItemSet &rSet)=0
virtual sal_Int32 GetTextLen(sal_Int32 nParagraph) const =0
virtual OUString GetText(const ESelection &rSel) const =0
virtual void SetParaAttribs(sal_Int32 nPara, const SfxItemSet &rSet)=0
virtual sal_Int32 GetParagraphCount() const =0
virtual bool IsParaIsNumberingRestart(sal_Int32 nPara)
virtual void SetParaIsNumberingRestart(sal_Int32 nPara, bool bParaIsNumberingRestart)
virtual void QuickInsertField(const SvxFieldItem &rFld, const ESelection &rSel)=0
virtual SfxItemState GetItemState(const ESelection &rSel, sal_uInt16 nWhich) const =0
static css::uno::Any getPropertyDefault(SfxItemPool *pPool)
static void FillItemSet(const css::awt::FontDescriptor &rDesc, SfxItemSet &rSet)
static void setPropertyToDefault(SfxItemSet &rSet)
static void FillFromItemSet(const SfxItemSet &rSet, css::awt::FontDescriptor &rDesc)
virtual css::uno::Reference< css::text::XText > SAL_CALL getText() override
virtual OUString SAL_CALL getImplementationName() override
css::uno::Reference< css::text::XText > xParentText
virtual void SAL_CALL copyText(const css::uno::Reference< css::text::XTextCopy > &xSource) override
virtual void SAL_CALL removeTextContent(const css::uno::Reference< css::text::XTextContent > &xContent) override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual ~SvxUnoTextBase() noexcept override
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override
SvxUnoTextBase(const SvxItemPropertySet *_pSet)
virtual sal_Bool SAL_CALL hasElements() override
static css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames_Static()
virtual css::uno::Reference< css::text::XTextCursor > SAL_CALL createTextCursor() override
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
virtual void SAL_CALL insertString(const css::uno::Reference< css::text::XTextRange > &xRange, const OUString &aString, sal_Bool bAbsorb) override
virtual css::uno::Reference< css::text::XTextRange > SAL_CALL finishParagraphInsert(const css::uno::Sequence< css::beans::PropertyValue > &CharacterAndParagraphProperties, const css::uno::Reference< css::text::XTextRange > &xInsertPosition) override
virtual css::uno::Type SAL_CALL getElementType() override
virtual void SAL_CALL insertTextContent(const css::uno::Reference< css::text::XTextRange > &xRange, const css::uno::Reference< css::text::XTextContent > &xContent, sal_Bool bAbsorb) override
virtual void SAL_CALL setString(const OUString &aString) override
virtual css::uno::Reference< css::text::XTextRange > SAL_CALL appendTextPortion(const OUString &Text, const css::uno::Sequence< css::beans::PropertyValue > &CharacterAndParagraphProperties) override
virtual css::uno::Any SAL_CALL queryAggregation(const css::uno::Type &rType)
virtual void SAL_CALL insertControlCharacter(const css::uno::Reference< css::text::XTextRange > &xRange, sal_Int16 nControlCharacter, sal_Bool bAbsorb) override
virtual OUString SAL_CALL getString() override
virtual css::uno::Reference< css::text::XTextCursor > SAL_CALL createTextCursorByRange(const css::uno::Reference< css::text::XTextRange > &aTextPosition) override
virtual css::uno::Reference< css::text::XTextRange > SAL_CALL insertTextPortion(const OUString &Text, const css::uno::Sequence< css::beans::PropertyValue > &CharacterAndParagraphProperties, const css::uno::Reference< css::text::XTextRange > &rTextRange) override
virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getEnd() override
virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getStart() override
css::uno::Reference< css::text::XTextCursor > createTextCursorBySelection(const ESelection &rSel)
virtual css::uno::Reference< css::text::XTextRange > SAL_CALL finishParagraph(const css::uno::Sequence< css::beans::PropertyValue > &CharacterAndParagraphProperties) override
virtual void SAL_CALL moveTextRange(const css::uno::Reference< css::text::XTextRange > &xRange, sal_Int16 nParagraphs) override
virtual ~SvxUnoText() noexcept override
virtual void SAL_CALL acquire() noexcept override
virtual sal_Int64 SAL_CALL getSomething(const css::uno::Sequence< sal_Int8 > &aIdentifier) override
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
virtual css::uno::Any SAL_CALL queryAggregation(const css::uno::Type &rType) override
virtual void SAL_CALL release() noexcept override
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId() noexcept
SvxUnoText(const SvxItemPropertySet *_pSet) noexcept
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
const css::uno::Sequence< sal_Int8 > & getSeq() const
css::uno::Type const & get()
ThemeColorType meSchemeType
std::vector< Transformation > const & getTransformations() const
#define DBG_ASSERT(sCon, aError)
#define EE_PARA_MAX_COUNT
constexpr TypedWhichId< SvxFieldItem > EE_FEATURE_FIELD(EE_FEATURE_NOTCONV+1)
constexpr TypedWhichId< SfxBoolItem > EE_PARA_BULLETSTATE(EE_PARA_START+9)
constexpr TypedWhichId< SvxUnderlineItem > EE_CHAR_UNDERLINE(EE_CHAR_START+5)
constexpr TypedWhichId< SvxFontHeightItem > EE_CHAR_FONTHEIGHT(EE_CHAR_START+2)
constexpr sal_uInt16 EE_PARA_START(EE_ITEMS_START+0)
constexpr TypedWhichId< SvxWeightItem > EE_CHAR_WEIGHT(EE_CHAR_START+4)
constexpr sal_uInt16 EE_ITEMS_END(EE_FEATURE_END)
constexpr TypedWhichId< SvxColorItem > EE_CHAR_COLOR(EE_CHAR_START+0)
constexpr TypedWhichId< SvXMLAttrContainerItem > EE_PARA_XMLATTRIBS(EE_PARA_START+1)
constexpr TypedWhichId< SvxCrossedOutItem > EE_CHAR_STRIKEOUT(EE_CHAR_START+6)
constexpr TypedWhichId< SvxPostureItem > EE_CHAR_ITALIC(EE_CHAR_START+7)
constexpr TypedWhichId< SfxInt16Item > EE_PARA_OUTLLEVEL(EE_PARA_START+11)
constexpr sal_uInt16 EE_PARA_END(EE_PARA_START+19)
constexpr TypedWhichId< SvxCaseMapItem > EE_CHAR_CASEMAP(EE_CHAR_START+30)
constexpr TypedWhichId< SvXMLAttrContainerItem > EE_CHAR_XMLATTRIBS(EE_CHAR_START+28)
constexpr TypedWhichId< SvxNumBulletItem > EE_PARA_NUMBULLET(EE_PARA_START+5)
constexpr sal_uInt16 EE_ITEMS_START(OWN_ATTR_VALUE_END+1)
constexpr TypedWhichId< SvxWordLineModeItem > EE_CHAR_WLM(EE_CHAR_START+13)
constexpr TypedWhichId< SvxFontItem > EE_CHAR_FONTINFO(EE_CHAR_START+1)
EditEngineAttribs
values for: SfxItemSet GetAttribs( const ESelection& rSel, EditEngineAttribs nOnlyHardAttrib = EditEn...
@ OnlyHard
returns all attributes even when they are not set
#define LANGUAGE_DONTKNOW
TOOLS_DLLPUBLIC OString convertLineEnd(const OString &rIn, LineEnd eLineEnd)
#define MID_COLOR_LUM_MOD
#define MID_COMPLEX_COLOR
#define MID_COLOR_THEME_INDEX
#define MID_COLOR_LUM_OFF
std::unique_ptr< sal_Int32[]> pData
class SAL_NO_VTABLE XPropertySet
css::uno::Sequence< T > concatSequences(const css::uno::Sequence< T > &rS1, const Ss &... rSn)
sal_Int64 getSomethingImpl(const css::uno::Sequence< sal_Int8 > &rId, T *pThis, FallbackToGetSomethingOf< Base >={})
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
VBAHELPER_DLLPUBLIC bool setPropertyValue(css::uno::Sequence< css::beans::PropertyValue > &aProp, const OUString &aName, const css::uno::Any &aValue)
bool getPropertyValue(ValueType &rValue, css::uno::Reference< css::beans::XPropertySet > const &xPropSet, OUString const &propName)
constexpr OUStringLiteral UNO_TC_PROP_ANCHOR
constexpr OUStringLiteral UNO_TR_PROP_SELECTION
css::uno::Reference< css::container::XIndexReplace > SvxCreateNumRule(const SvxNumRule &rRule)
const sal_uInt16 aSvxUnoFontDescriptorWhichMap[]
o3tl::span< const SfxItemPropertyMapEntry > ImplGetSvxTextPortionPropertyMap()
const SvxItemPropertySet * ImplGetSvxTextPortionSvxPropertySet()
UNO3_GETIMPLEMENTATION_IMPL(SvxUnoTextRangeBase)
void CheckSelection(struct ESelection &rSel, SvxTextForwarder const *pForwarder) noexcept
static void SvxPropertyValuesToItemSet(SfxItemSet &rItemSet, const uno::Sequence< beans::PropertyValue > &rPropertyValues, const SfxItemPropertySet *pPropSet, SvxTextForwarder *pForwarder, sal_Int32 nPara)
static const SfxItemPropertySet * ImplGetSvxTextPortionSfxPropertySet()
static const SfxItemPropertySet * ImplGetSvxUnoOutlinerTextCursorSfxPropertySet()
o3tl::span< const SfxItemPropertyMapEntry > ImplGetSvxUnoOutlinerTextCursorPropertyMap()
const SvxItemPropertySet * ImplGetSvxUnoOutlinerTextCursorSvxPropertySet()
void GetSelection(struct ESelection &rSel, SvxTextForwarder const *pForwarder) noexcept
#define SVX_UNOEDIT_OUTLINER_PROPERTIES
#define SVX_UNOEDIT_CHAR_PROPERTIES
#define WID_PARAISNUMBERINGRESTART
#define SVX_UNOEDIT_PARA_PROPERTIES
#define WID_NUMBERINGSTARTVALUE
#define WID_PARASTYLENAME
#define SVX_UNOEDIT_FONT_PROPERTIES