21 #include <com/sun/star/drawing/BitmapMode.hpp>
22 #include <com/sun/star/style/XStyle.hpp>
23 #include <com/sun/star/text/WritingMode.hpp>
24 #include <com/sun/star/table/TableBorder.hpp>
25 #include <com/sun/star/table/BorderLine2.hpp>
26 #include <com/sun/star/lang/Locale.hpp>
34 #include <libxml/xmlwriter.h>
63 using ::editeng::SvxBorderLine;
101 {
u"", 0, css::uno::Type(), 0, 0 }
105 return &aSvxCellPropertySet;
115 virtual ~CellTextProvider();
130 CellTextProvider::~CellTextProvider()
134 sal_Int32 CellTextProvider::getTextCount()
const
139 SdrText* CellTextProvider::getText(sal_Int32 nIndex)
const
143 return m_xCell.get();
166 std::unique_ptr<BaseProperties>
Clone(
SdrObject& rObj)
const override;
205 , maTextProvider(mxCell)
212 , maTextProvider(mxCell)
218 OSL_FAIL(
"CellProperties::Clone(), does not work yet!");
219 return std::unique_ptr<BaseProperties>(
new CellProperties(*
this, rObj,
nullptr));
234 if( !pParaObj &&
mxCell->GetOutlinerParaObject())
235 pParaObj = *
mxCell->GetOutlinerParaObject();
242 if(
mxCell->IsTextEditActive())
259 for(sal_Int32 nPara = 0; nPara < nParaCount; nPara++)
265 aSet.ClearItem(nDeletedWhich);
267 for (
const auto& rWhichId : aCharWhichIds)
275 if(!
mxCell->IsTextEditActive())
288 mxCell->SetOutlinerParaObject(std::move(pTemp));
305 bool bVertical(css::text::WritingMode_TB_RL == static_cast<const SvxWritingModeItem*>(pNewItem)->
GetValue());
313 if( !pParaObj &&
mxCell->GetOutlinerParaObject() )
314 pParaObj = *
mxCell->GetOutlinerParaObject();
329 if (!pParaObj &&
mxCell->GetOutlinerParaObject())
330 pParaObj = *
mxCell->GetOutlinerParaObject();
379 if( xCell->mxTable.is() )
381 xCell->mxTable->addEventListener( xCell );
388 SdrTableObj& rTableObj)
392 ,mpProperties( new
sdr::
properties::CellProperties( rTableObj, this ) )
393 ,mnCellContentType( CellContentType_EMPTY )
399 ,mxTable( rTableObj.getTable() )
408 if(
nullptr == GetEditSource())
414 Cell::~Cell() COVERITY_NOEXCEPT_FALSE
425 Reference< XEventListener > xThis(
this );
426 mxTable->removeEventListener( xThis );
439 mpProperties.reset();
440 SetOutlinerParaObject( std::nullopt );
444 void Cell::merge( sal_Int32 nColumnSpan, sal_Int32 nRowSpan )
456 void Cell::mergeContent(
const CellRef& xSourceCell )
458 SdrTableObj& rTableObj =
dynamic_cast< SdrTableObj&
>(
GetObject() );
460 if( !xSourceCell->hasText() )
463 SdrOutliner& rOutliner=rTableObj.ImpGetDrawOutliner();
468 rOutliner.
SetText(*GetOutlinerParaObject());
469 rOutliner.
AddText(*xSourceCell->GetOutlinerParaObject());
473 rOutliner.
SetText(*xSourceCell->GetOutlinerParaObject());
480 SetStyleSheet( GetStyleSheet(),
true );
484 void Cell::cloneFrom(
const CellRef& xCell )
488 replaceContentAndFormatting( xCell );
490 mnCellContentType = xCell->mnCellContentType;
492 msFormula = xCell->msFormula;
493 mfValue = xCell->mfValue;
494 mnError = xCell->mnError;
496 mbMerged = xCell->mbMerged;
504 void Cell::replaceContentAndFormatting(
const CellRef& xSourceCell )
506 if( !(xSourceCell.is() && mpProperties) )
509 mpProperties->SetMergedItemSet( xSourceCell->GetObjectItemSet() );
513 if(xSourceCell->GetOutlinerParaObject())
515 SetOutlinerParaObject( *xSourceCell->GetOutlinerParaObject() );
518 SdrTableObj& rTableObj =
dynamic_cast< SdrTableObj&
>(
GetObject() );
519 SdrTableObj& rSourceTableObj =
dynamic_cast< SdrTableObj&
>( xSourceCell->GetObject() );
521 if(&rSourceTableObj.getSdrModelFromSdrObject() != &rTableObj.getSdrModelFromSdrObject())
525 SetStyleSheet(
nullptr,
true );
530 void Cell::setMerged()
540 void Cell::copyFormatFrom(
const CellRef& xSourceCell )
542 if( !(xSourceCell.is() && mpProperties) )
545 mpProperties->SetMergedItemSet( xSourceCell->GetObjectItemSet() );
546 SdrTableObj& rTableObj =
dynamic_cast< SdrTableObj&
>(
GetObject() );
547 SdrTableObj& rSourceTableObj =
dynamic_cast< SdrTableObj&
>( xSourceCell->GetObject() );
549 if(&rSourceTableObj.getSdrModelFromSdrObject() != &rTableObj.getSdrModelFromSdrObject())
553 SetStyleSheet(
nullptr,
true );
560 void Cell::notifyModified()
563 mxTable->setModified(
true );
570 bool Cell::IsActiveCell()
const
573 SdrTableObj& rTableObj =
dynamic_cast< SdrTableObj&
>(
GetObject() );
574 if( rTableObj.getActiveCell().get() == this )
580 bool Cell::IsTextEditActive()
const
582 bool isActive =
false;
583 SdrTableObj& rTableObj =
dynamic_cast< SdrTableObj&
>(
GetObject() );
584 if(rTableObj.getActiveCell().get() == this )
586 if( rTableObj.CanCreateEditOutlinerParaObject() )
595 bool Cell::hasText()
const
605 if( rTextObj.
GetText(0).isEmpty() )
615 bool Cell::CanCreateEditOutlinerParaObject()
const
617 SdrTableObj& rTableObj =
dynamic_cast< SdrTableObj&
>(
GetObject() );
618 if( rTableObj.getActiveCell().get() == this )
619 return rTableObj.CanCreateEditOutlinerParaObject();
625 SdrTableObj& rTableObj =
dynamic_cast< SdrTableObj&
>(
GetObject() );
626 if( rTableObj.getActiveCell().get() == this )
627 return rTableObj.CreateEditOutlinerParaObject();
632 void Cell::SetStyleSheet(
SfxStyleSheet* pStyleSheet,
bool bDontRemoveHardAttr )
635 if( pStyleSheet && pStyleSheet->
GetFamily() != SfxStyleFamily::Frame )
638 if( mpProperties && (mpProperties->GetStyleSheet() != pStyleSheet) )
640 mpProperties->SetStyleSheet( pStyleSheet, bDontRemoveHardAttr,
true );
649 return mpProperties->GetObjectItemSet();
653 OSL_FAIL(
"Cell::GetObjectItemSet(), called without properties!");
662 mpProperties->SetObjectItem( rItem );
669 SetObjectItem(rItem);
675 return mpProperties->GetStyleSheet();
682 rAnchorRect.
SetLeft( maCellRect.Left() + GetTextLeftDistance() );
683 rAnchorRect.
SetRight( maCellRect.Right() - GetTextRightDistance() );
684 rAnchorRect.
SetTop( maCellRect.Top() + GetTextUpperDistance() );
685 rAnchorRect.
SetBottom( maCellRect.Bottom() - GetTextLowerDistance() );
689 void Cell::SetMergedItemSetAndBroadcast(
const SfxItemSet& rSet,
bool bClearAllItems)
693 mpProperties->SetMergedItemSetAndBroadcast(rSet, bClearAllItems);
699 sal_Int32 Cell::calcPreferredWidth(
const Size aSize )
702 return getMinimumWidth();
704 Outliner& rOutliner=
static_cast< SdrTableObj&
>(
GetObject() ).ImpGetDrawOutliner();
707 ForceOutlinerParaObject( OutlinerMode::TextObject );
709 if( GetOutlinerParaObject() )
710 rOutliner.
SetText(*GetOutlinerParaObject());
715 return GetTextLeftDistance() + GetTextRightDistance() + nPreferredWidth;
718 sal_Int32 Cell::getMinimumWidth()
const
720 return GetTextLeftDistance() + GetTextRightDistance() + 100;
724 sal_Int32 Cell::getMinimumHeight()
729 SdrTableObj& rTableObj =
dynamic_cast< SdrTableObj&
>(
GetObject() );
730 sal_Int32 nMinimumHeight = 0;
733 TakeTextAnchorRect( aTextRect );
737 SdrOutliner* pEditOutliner = rTableObj.GetCellTextEditOutliner( *
this );
745 Outliner& rOutliner=rTableObj.ImpGetDrawOutliner();
748 ForceOutlinerParaObject( OutlinerMode::TextObject );
750 if( GetOutlinerParaObject() )
752 rOutliner.
SetText(*GetOutlinerParaObject());
758 nMinimumHeight += GetTextUpperDistance() + GetTextLowerDistance();
759 return nMinimumHeight;
801 bool bNullTextObject = !pTextObject;
805 if( bNullTextObject )
806 ForceOutlinerParaObject( OutlinerMode::TextObject );
821 if (pTableObj && pTableObj->IsTextEditActive())
822 pTableObj->
AddUndo(
new CellUndo(pTableObj, xCell));
838 return CloneProperties(mpProperties.get(),rNewObj,rNewCell);
845 Any SAL_CALL Cell::queryInterface(
const Type & rType )
848 return Any( Reference< XMergeableCell >(
this ) );
851 return Any( Reference< XCell >(
this ) );
854 return Any( Reference< XLayoutConstrains >(
this ) );
857 return Any( Reference< XEventListener >(
this ) );
860 if( aRet.hasValue() )
863 return ::cppu::OWeakObject::queryInterface( rType );
867 void SAL_CALL Cell::acquire() noexcept
873 void SAL_CALL Cell::release() noexcept
882 Sequence< Type > SAL_CALL Cell::getTypes( )
893 return css::uno::Sequence<sal_Int8>();
897 css::awt::Size SAL_CALL Cell::getMinimumSize()
899 return css::awt::Size( getMinimumWidth(), getMinimumHeight() );
903 css::awt::Size SAL_CALL Cell::getPreferredSize()
905 return getMinimumSize();
909 css::awt::Size SAL_CALL Cell::calcAdjustedSize(
const css::awt::Size& aNewSize )
918 sal_Int32 SAL_CALL Cell::getRowSpan()
924 sal_Int32 SAL_CALL Cell::getColumnSpan()
939 OUString SAL_CALL Cell::getFormula( )
945 void SAL_CALL Cell::setFormula(
const OUString& aFormula )
947 if( msFormula != aFormula )
949 msFormula = aFormula;
954 double SAL_CALL Cell::getValue( )
960 void SAL_CALL Cell::setValue(
double nValue )
962 if( mfValue != nValue )
965 mnCellContentType = CellContentType_VALUE;
970 CellContentType SAL_CALL Cell::getType()
972 return mnCellContentType;
976 sal_Int32 SAL_CALL Cell::getError( )
989 if( pMap->
aType != aAny.getValueType() )
994 sal_Int32 nValue = 0;
996 aAny <<= static_cast<sal_Int16>(
nValue);
1000 OSL_FAIL(
"GetAnyForItem() Returnvalue has wrong Type!" );
1007 Reference< XPropertySetInfo > SAL_CALL Cell::getPropertySetInfo()
1009 return mpPropSet->getPropertySetInfo();
1013 void SAL_CALL Cell::setPropertyValue(
const OUString& rPropertyName,
const Any& rValue )
1017 if(mpProperties ==
nullptr)
1018 throw DisposedException();
1023 if( (pMap->
nFlags & PropertyAttribute::READONLY ) != 0 )
1024 throw PropertyVetoException();
1026 switch( pMap->
nWID )
1030 Reference< XStyle > xStyle;
1031 if( !( rValue >>= xStyle ) )
1032 throw IllegalArgumentException();
1035 SetStyleSheet( pStyle,
true );
1040 auto pBorder = o3tl::tryAccess<TableBorder>(rValue);
1046 SvxBorderLine aLine;
1049 aBox.SetLine(bSet ? &aLine :
nullptr, SvxBoxItemLine::TOP);
1050 aBoxInfo.SetValid(SvxBoxInfoItemValidFlags::TOP, pBorder->IsTopLineValid);
1053 aBox.SetLine(bSet ? &aLine :
nullptr, SvxBoxItemLine::BOTTOM);
1054 aBoxInfo.SetValid(SvxBoxInfoItemValidFlags::BOTTOM, pBorder->IsBottomLineValid);
1057 aBox.SetLine(bSet ? &aLine :
nullptr, SvxBoxItemLine::LEFT);
1058 aBoxInfo.SetValid(SvxBoxInfoItemValidFlags::LEFT, pBorder->IsLeftLineValid);
1061 aBox.SetLine(bSet ? &aLine :
nullptr, SvxBoxItemLine::RIGHT);
1062 aBoxInfo.SetValid(SvxBoxInfoItemValidFlags::RIGHT, pBorder->IsRightLineValid);
1065 aBoxInfo.SetLine(bSet ? &aLine :
nullptr, SvxBoxInfoItemLine::HORI);
1066 aBoxInfo.SetValid(SvxBoxInfoItemValidFlags::HORI, pBorder->IsHorizontalLineValid);
1069 aBoxInfo.SetLine(bSet ? &aLine :
nullptr, SvxBoxInfoItemLine::VERT);
1070 aBoxInfo.SetValid(SvxBoxInfoItemValidFlags::VERT, pBorder->IsVerticalLineValid);
1072 aBox.SetAllDistances(pBorder->Distance);
1073 aBoxInfo.SetValid(SvxBoxInfoItemValidFlags::DISTANCE, pBorder->IsDistanceValid);
1075 mpProperties->SetObjectItem(aBox);
1076 mpProperties->SetObjectItem(aBoxInfo);
1082 if(!(rValue >>= eMode) )
1084 sal_Int32 nMode = 0;
1085 if(!(rValue >>= nMode))
1086 throw IllegalArgumentException();
1092 mpProperties->SetObjectItem(
XFillBmpTileItem( eMode == BitmapMode_REPEAT ) );
1097 sal_Int32 nRotVal = 0;
1098 if (!(rValue >>= nRotVal))
1099 throw IllegalArgumentException();
1101 if (nRotVal != 27000 && nRotVal != 9000 && nRotVal != 0)
1102 throw IllegalArgumentException();
1110 aSet.
Put(mpProperties->GetItem(pMap->
nWID));
1112 bool bSpecial =
false;
1114 switch( pMap->
nWID )
1127 if( rValue >>= aApiName )
1146 aSet.
Put(
GetObject().getSdrModelFromSdrObject().GetItemPool().GetDefaultItem(pMap->
nWID));
1156 GetObject().getSdrModelFromSdrObject().SetChanged();
1157 mpProperties->SetMergedItemSetAndBroadcast( aSet );
1162 throw UnknownPropertyException( rPropertyName, static_cast<cppu::OWeakObject*>(
this));
1166 Any SAL_CALL Cell::getPropertyValue(
const OUString& PropertyName )
1170 if(mpProperties ==
nullptr)
1171 throw DisposedException();
1176 switch( pMap->
nWID )
1180 return Any( Reference< XStyle >( dynamic_cast< SfxUnoStyleSheet* >( GetStyleSheet() ) ) );
1187 TableBorder aTableBorder;
1189 aTableBorder.IsTopLineValid = rBoxInfoItem.
IsValid(SvxBoxInfoItemValidFlags::TOP);
1191 aTableBorder.IsBottomLineValid = rBoxInfoItem.
IsValid(SvxBoxInfoItemValidFlags::BOTTOM);
1193 aTableBorder.IsLeftLineValid = rBoxInfoItem.
IsValid(SvxBoxInfoItemValidFlags::LEFT);
1195 aTableBorder.IsRightLineValid = rBoxInfoItem.
IsValid(SvxBoxInfoItemValidFlags::RIGHT );
1197 aTableBorder.IsHorizontalLineValid = rBoxInfoItem.
IsValid(SvxBoxInfoItemValidFlags::HORI);
1199 aTableBorder.IsVerticalLineValid = rBoxInfoItem.
IsValid(SvxBoxInfoItemValidFlags::VERT);
1201 aTableBorder.IsDistanceValid = rBoxInfoItem.
IsValid(SvxBoxInfoItemValidFlags::DISTANCE);
1203 return Any( aTableBorder );
1211 return Any( BitmapMode_REPEAT );
1215 return Any( BitmapMode_STRETCH );
1219 return Any( BitmapMode_NO_REPEAT );
1225 return Any(sal_Int32(to<Degree100>(rTextRotate.
GetValue())));
1230 aSet.
Put(mpProperties->GetItem(pMap->
nWID));
1239 aSet.
Put(
GetObject().getSdrModelFromSdrObject().GetItemPool().GetDefaultItem(pMap->
nWID));
1243 aAny = GetAnyForItem( aSet, pMap );
1250 throw UnknownPropertyException( PropertyName, static_cast<cppu::OWeakObject*>(
this));
1254 void SAL_CALL Cell::addPropertyChangeListener(
const OUString& ,
const Reference< XPropertyChangeListener >& )
1259 void SAL_CALL Cell::removePropertyChangeListener(
const OUString& ,
const Reference< XPropertyChangeListener >& )
1264 void SAL_CALL Cell::addVetoableChangeListener(
const OUString& ,
const Reference< XVetoableChangeListener >& )
1269 void SAL_CALL Cell::removeVetoableChangeListener(
const OUString& ,
const Reference< XVetoableChangeListener >& )
1277 void SAL_CALL Cell::setPropertyValues(
const Sequence< OUString >& aPropertyNames,
const Sequence< Any >& aValues )
1281 if(mpProperties ==
nullptr)
1282 throw DisposedException();
1284 const sal_Int32
nCount = aPropertyNames.getLength();
1286 const OUString* pNames = aPropertyNames.getConstArray();
1287 const Any*
pValues = aValues.getConstArray();
1289 for( sal_Int32 nIdx = 0; nIdx < nCount; nIdx++, pNames++, pValues++ )
1295 catch( UnknownPropertyException& )
1311 if(mpProperties ==
nullptr)
1312 throw DisposedException();
1314 const sal_Int32 nCount = aPropertyNames.getLength();
1315 Sequence< Any > aRet( nCount );
1316 Any* pValue = aRet.getArray();
1318 for(
const OUString& rName : aPropertyNames )
1324 catch( UnknownPropertyException& )
1339 void SAL_CALL Cell::addPropertiesChangeListener(
const Sequence< OUString >& ,
const Reference< XPropertiesChangeListener >& )
1344 void SAL_CALL Cell::removePropertiesChangeListener(
const Reference< XPropertiesChangeListener >& )
1349 void SAL_CALL Cell::firePropertiesChangeEvent(
const Sequence< OUString >& ,
const Reference< XPropertiesChangeListener >& )
1357 PropertyState SAL_CALL Cell::getPropertyState(
const OUString& PropertyName )
1361 if(mpProperties ==
nullptr)
1362 throw DisposedException();
1368 PropertyState eState;
1369 switch( pMap->
nWID )
1373 const SfxItemSet& rSet = mpProperties->GetMergedItemSet();
1377 if( bStretch || bTile )
1379 eState = PropertyState_DIRECT_VALUE;
1383 eState = PropertyState_DEFAULT_VALUE;
1389 return PropertyState_DIRECT_VALUE;
1393 const SfxItemSet& rSet = mpProperties->GetMergedItemSet();
1395 return PropertyState_DEFAULT_VALUE;
1397 return PropertyState_DIRECT_VALUE;
1401 const SfxItemSet& rSet = mpProperties->GetMergedItemSet();
1405 case SfxItemState::SET:
1406 eState = PropertyState_DIRECT_VALUE;
1408 case SfxItemState::DEFAULT:
1409 eState = PropertyState_DEFAULT_VALUE;
1412 eState = PropertyState_AMBIGUOUS_VALUE;
1417 if( PropertyState_DIRECT_VALUE == eState )
1419 switch( pMap->
nWID )
1430 if( ( pItem ==
nullptr ) || pItem->
GetName().isEmpty() )
1431 eState = PropertyState_DEFAULT_VALUE;
1445 if( pItem ==
nullptr )
1446 eState = PropertyState_DEFAULT_VALUE;
1450 if (pMap->
nMemberId == MID_COLOR_THEME_INDEX)
1455 eState = PropertyState_DEFAULT_VALUE;
1458 else if (pMap->
nMemberId == MID_COLOR_LUM_MOD)
1463 eState = PropertyState_DEFAULT_VALUE;
1466 else if (pMap->
nMemberId == MID_COLOR_LUM_OFF)
1471 eState = PropertyState_DEFAULT_VALUE;
1480 throw UnknownPropertyException(PropertyName);
1484 Sequence< PropertyState > SAL_CALL Cell::getPropertyStates(
const Sequence< OUString >& aPropertyName )
1488 if(mpProperties ==
nullptr)
1489 throw DisposedException();
1491 const sal_Int32 nCount = aPropertyName.getLength();
1492 Sequence< PropertyState > aRet( nCount );
1494 std::transform(aPropertyName.begin(), aPropertyName.end(), aRet.getArray(),
1495 [
this](
const OUString& rName) -> PropertyState {
1498 return getPropertyState( rName );
1502 return PropertyState_AMBIGUOUS_VALUE;
1510 void SAL_CALL Cell::setPropertyToDefault(
const OUString& PropertyName )
1514 if(mpProperties ==
nullptr)
1515 throw DisposedException();
1520 switch( pMap->
nWID )
1540 mpProperties->ClearObjectItem( pMap->
nWID );
1544 GetObject().getSdrModelFromSdrObject().SetChanged();
1547 throw UnknownPropertyException( PropertyName, static_cast<cppu::OWeakObject*>(
this));
1551 Any SAL_CALL Cell::getPropertyDefault(
const OUString& aPropertyName )
1555 if(mpProperties ==
nullptr)
1556 throw DisposedException();
1561 switch( pMap->
nWID )
1564 return Any( BitmapMode_NO_REPEAT );
1568 Reference< XStyle > xStyle;
1569 return Any( xStyle );
1574 TableBorder aBorder;
1575 return Any( aBorder );
1583 aSet.
Put(
GetObject().getSdrModelFromSdrObject().GetItemPool().GetDefaultItem(pMap->
nWID));
1584 return GetAnyForItem( aSet, pMap );
1589 throw UnknownPropertyException( aPropertyName, static_cast<cppu::OWeakObject*>(
this));
1596 void SAL_CALL Cell::setAllPropertiesToDefault()
1611 ESelection aSelection( 0, 0, EE_PARA_ALL, EE_TEXTPOS_ALL);
1617 SetOutlinerParaObject(std::move(pTemp));
1624 for(
const OUString& rName : aPropertyNames)
1625 setPropertyToDefault( rName );
1629 Sequence< Any > SAL_CALL Cell::getPropertyDefaults(
const Sequence< OUString >& aPropertyNames )
1631 sal_Int32 nCount = aPropertyNames.getLength();
1632 Sequence< Any > aDefaults( nCount );
1634 std::transform(aPropertyNames.begin(), aPropertyNames.end(), aDefaults.getArray(),
1635 [
this](
const OUString& rName) -> Any {
return getPropertyDefault(rName); });
1644 void SAL_CALL Cell::insertTextContent(
const Reference< XTextRange >& xRange,
const Reference< XTextContent >& xContent,
sal_Bool bAbsorb )
1651 void SAL_CALL Cell::removeTextContent(
const Reference< XTextContent >& xContent )
1661 void SAL_CALL Cell::insertString(
const Reference< XTextRange >& xRange,
const OUString& aString,
sal_Bool bAbsorb )
1668 void SAL_CALL Cell::insertControlCharacter(
const Reference< XTextRange >& xRange, sal_Int16 nControlCharacter,
sal_Bool bAbsorb )
1678 OUString SAL_CALL Cell::getString( )
1685 void SAL_CALL Cell::setString(
const OUString& aString )
1692 void SAL_CALL Cell::disposing(
const EventObject& )
1698 void Cell::dumpAsXml(
xmlTextWriterPtr pWriter, sal_Int32 nRow, sal_Int32 nCol)
const
1700 (
void)xmlTextWriterStartElement(pWriter, BAD_CAST(
"Cell"));
1701 (
void)xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST(
"row"),
"%" SAL_PRIdINT32, nRow);
1702 (
void)xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST(
"col"),
"%" SAL_PRIdINT32, nCol);
1706 mpProperties->dumpAsXml(pWriter);
1707 (
void)xmlTextWriterEndElement(pWriter);
constexpr TypedWhichId< SvxTextRotateItem > SDRATTR_TABLE_TEXT_ROTATION(SDRATTR_TABLE_FIRST+4)
constexpr TypedWhichId< SdrOnOffItem > SDRATTR_TEXT_AUTOGROWHEIGHT(SDRATTR_MISC_FIRST+2)
uno::Any SvxItemPropertySet_getPropertyValue(const SfxItemPropertyMapEntry *pMap, const SfxItemSet &rSet)
static css::table::BorderLine2 SvxLineToLine(const editeng::SvxBorderLine *pLine, bool bConvert)
constexpr TypedWhichId< SdrTextHorzAdjustItem > SDRATTR_TEXT_HORZADJUST(SDRATTR_MISC_FIRST+13)
constexpr TypedWhichId< XLineEndItem > XATTR_LINEEND(XATTR_LINE_FIRST+5)
constexpr sal_uInt16 SDRATTR_TABLE_FIRST(SDRATTR_CUSTOMSHAPE_LAST+1)
constexpr TypedWhichId< XLineStartItem > XATTR_LINESTART(XATTR_LINE_FIRST+4)
struct _xmlTextWriter * xmlTextWriterPtr
constexpr OUStringLiteral UNO_NAME_TEXT_HORZADJUST
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
static constexpr auto Items
virtual void SAL_CALL insertControlCharacter(const css::uno::Reference< css::text::XTextRange > &xRange, sal_Int16 nControlCharacter, sal_Bool bAbsorb) override
constexpr TypedWhichId< SdrOnOffItem > SDRATTR_TEXT_AUTOGROWWIDTH(SDRATTR_MISC_FIRST+12)
void SetPaperSize(const Size &rSize)
const editeng::SvxBorderLine * GetVert() const
SvxBoxInfoItem & rBoxInfoItem
constexpr OUStringLiteral UNO_NAME_TEXT_UPPERDIST
sdr::table::CellRef mxCell
constexpr sal_uInt16 EE_ITEMS_END(EE_FEATURE_END)
sal_uInt32 GetTextHeight() const
#define SVX_UNOEDIT_OUTLINER_PROPERTIES
sal_Int32 GetParagraphCount() const
virtual const SfxItemSet & GetObjectItemSet() const override
virtual void SAL_CALL acquire() SAL_NOEXCEPT SAL_OVERRIDE
virtual void SAL_CALL setString(const OUString &aString) override
constexpr TypedWhichId< XLineDashItem > XATTR_LINEDASH(XATTR_LINE_FIRST+1)
constexpr TypedWhichId< XFillHatchItem > XATTR_FILLHATCH(XATTR_FILL_FIRST+3)
const editeng::SvxBorderLine * GetRight() const
SfxStyleFamily GetFamily() const
constexpr sal_uInt16 SDRATTR_MISC_LAST(SDRATTR_TEXT_CHAINNEXTNAME)
virtual const tools::Rectangle & GetSnapRect() const override
virtual sal_Int32 getTextCount() const =0
Return the number of texts available for this object.
sal_Int16 GetLumOff() const
#define OWN_ATTR_FILLBMP_MODE
const svx::ITextProvider & getTextProvider() const override
Get the TextProvider related to our SdrObject.
constexpr sal_uInt16 SDRATTR_START(XATTR_START)
SdrOnOffItem makeSdrTextAutoGrowHeightItem(bool bAuto)
constexpr OUStringLiteral UNO_NAME_TEXT_VERTADJUST
constexpr OUStringLiteral UNO_NAME_TEXT_LEFTDIST
Degree10 GetValue() const
SvxThemeColor & GetThemeColor()
#define OWN_ATTR_TABLEBORDER
rtl::Reference< Cell > CellRef
bool getPropertyValue(ValueType &rValue, css::uno::Reference< css::beans::XPropertySet > const &xPropSet, OUString const &propName)
void AddUndo(std::unique_ptr< SdrUndoAction > pUndo)
const SfxItemSet & GetObjectItemSet() const
constexpr TypedWhichId< SdrOnOffItem > SDRATTR_TEXT_WORDWRAP(SDRATTR_MISC_FIRST+24)
virtual css::uno::Any SAL_CALL queryAggregation(const css::uno::Type &rType)
SfxItemSet const & GetParaAttribs(sal_Int32 nPara) const
void RemoveCharAttribs(sal_Int32 nPara, sal_uInt16 nWhich=0)
This interface provides access to text object(s) in an SdrObject.
void ItemSetChanged(o3tl::span< const SfxPoolItem *const > aChangedItems, sal_uInt16 nDeletedWhich) override
SdrOnOffItem makeSdrTextAutoGrowWidthItem(bool bAuto)
SVX_DLLPRIVATE SdrOutliner * GetTextEditOutliner() const
constexpr TypedWhichId< SdrMetricItem > SDRATTR_TEXT_LOWERDIST(SDRATTR_MISC_FIRST+7)
void SetParaAttribs(sal_Int32 nPara, const SfxItemSet &)
constexpr OUStringLiteral UNO_NAME_TEXT_WORDWRAP
void SetRotation(TextRotation nRotation)
constexpr TypedWhichId< SvxBoxInfoItem > SDRATTR_TABLE_BORDER_INNER(SDRATTR_TABLE_FIRST+1)
void RemoveAttribs(const ESelection &rSelection, bool bRemoveParaAttribs, sal_uInt16 nWhich)
std::unique_ptr< BaseProperties > Clone(SdrObject &rObj) const override
const editeng::SvxBorderLine * GetHori() const
constexpr TypedWhichId< SvxWritingModeItem > SDRATTR_TEXTDIRECTION(SDRATTR_NOTPERSIST_FIRST+34)
const editeng::SvxBorderLine * GetTop() const
std::vector< sal_uInt16 > GetAllCharPropIds(const SfxItemSet &rSet)
const EditTextObject & GetTextObject() const
#define TOOLS_WARN_EXCEPTION(area, stream)
constexpr TypedWhichId< XFillGradientItem > XATTR_FILLGRADIENT(XATTR_FILL_FIRST+2)
void SetText(const OutlinerParaObject &)
const editeng::SvxBorderLine * GetLeft() const
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
constexpr TypedWhichId< XFillBitmapItem > XATTR_FILLBITMAP(XATTR_FILL_FIRST+4)
bool IsUndoEnabled() const
returns true if undo is currently enabled This returns false if undo was disabled using EnableUndo( f...
constexpr OUStringLiteral UNO_NAME_TEXT_RIGHTDIST
void SetVertical(bool bNew)
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
constexpr TypedWhichId< SdrTextVertAdjustItem > SDRATTR_TEXT_VERTADJUST(SDRATTR_MISC_FIRST+8)
virtual OUString GetText(sal_Int32 nPara) const =0
constexpr TypedWhichId< SdrMetricItem > SDRATTR_TEXT_LEFTDIST(SDRATTR_MISC_FIRST+4)
constexpr sal_uInt16 EE_ITEMS_START(OWN_ATTR_VALUE_END+1)
SdrModel & getSdrModelFromSdrObject() const
void ItemChange(const sal_uInt16 nWhich, const SfxPoolItem *pNewItem=nullptr) override
virtual css::uno::Reference< css::embed::XEmbeddedObject > GetObject() override
virtual void SAL_CALL removeTextContent(const css::uno::Reference< css::text::XTextContent > &xContent) override
css::uno::Type const & get()
CellProperties(SdrObject &rObj, sdr::table::Cell *pCell)
std::optional< OutlinerParaObject > CreateParaObject(sal_Int32 nStartPara=0, sal_Int32 nParaCount=EE_PARA_ALL) const
bool setPropertyValue(uno::Sequence< beans::PropertyValue > &aProp, const OUString &aName, const uno::Any &aValue)
css::uno::Sequence< T > concatSequences(const css::uno::Sequence< T > &rS1, const Ss &...rSn)
SfxItemPool * GetPool() const
const EditEngine & GetEditEngine() const
constexpr TypedWhichId< SdrMetricItem > SDRATTR_TEXT_UPPERDIST(SDRATTR_MISC_FIRST+6)
bool IsValid(SvxBoxInfoItemValidFlags nValid) const
static SfxUnoStyleSheet * getUnoStyleSheet(const css::uno::Reference< css::style::XStyle > &xStyle)
constexpr TypedWhichId< SvxBoxItem > SDRATTR_TABLE_BORDER(SDRATTR_TABLE_FIRST+0)
constexpr TypedWhichId< XFillColorItem > XATTR_FILLCOLOR(XATTR_FILL_FIRST+1)
const PropertyValue * pValues
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
constexpr sal_uInt16 SDRATTR_SHADOW_LAST(SDRATTR_SHADOWBLUR)
void AddUndo(SdrUndoAction *pUndo)
Add an undo action that should be on the undo stack after ending text edit.
static const SvxItemPropertySet * ImplGetSvxCellPropertySet()
constexpr sal_uInt16 SDRATTR_TABLE_LAST(SDRATTR_TABLE_TEXT_ROTATION)
void SetMaxAutoPaperSize(const Size &rSz)
constexpr TypedWhichId< XFillFloatTransparenceItem > XATTR_FILLFLOATTRANSPARENCE(XATTR_FILL_FIRST+11)
virtual void SAL_CALL insertString(const css::uno::Reference< css::text::XTextRange > &xRange, const OUString &aString, sal_Bool bAbsorb) override
static SdrItemPool & GetGlobalDrawObjectItemPool()
constexpr TypedWhichId< SdrMetricItem > SDRATTR_TEXT_RIGHTDIST(SDRATTR_MISC_FIRST+5)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
virtual OUString SAL_CALL getString() override
void SetObjectItemSet(const SfxItemSet &rSet)
constexpr TypedWhichId< XFillBmpStretchItem > XATTR_FILLBMP_STRETCH(XATTR_FILL_FIRST+16)
virtual sal_Int32 GetParagraphCount() const =0
#define SVX_UNOEDIT_PARA_PROPERTIES
bool IsTopToBottom() const
void AddText(const OutlinerParaObject &, bool bAppend=false)
constexpr TypedWhichId< XFillBmpTileItem > XATTR_FILLBMP_TILE(XATTR_FILL_FIRST+7)
bool SetUpdateLayout(bool bUpdate)
void SvxItemPropertySet_setPropertyValue(const SfxItemPropertyMapEntry *pMap, const uno::Any &rVal, SfxItemSet &rSet)
const CellTextProvider maTextProvider
std::optional< SfxItemSet > mxItemSet
void setHeight(tools::Long nHeight)
sal_Int16 GetThemeIndex() const
virtual void SetSnapRect(const tools::Rectangle &rRect)
void dumpAsXml(xmlTextWriterPtr pWriter) const
OUString const & GetName() const
const SdrObject & GetSdrObject() const
virtual void SetOutlinerParaObject(std::optional< OutlinerParaObject > pTextObject)
SfxItemSet CreateObjectSpecificItemSet(SfxItemPool &rPool) override
bool SetFillAttribute(sal_uInt16 nWID, const OUString &rName)
constexpr OUStringLiteral UNO_NAME_TEXT_LOWERDIST
const SvxItemPropertySet * ImplGetSvxUnoOutlinerTextCursorSvxPropertySet()
void ForceDefaultAttributes() override
virtual void ItemSetChanged(o3tl::span< const SfxPoolItem *const > aChangedItems, sal_uInt16 nDeletedWhich) override
virtual void SAL_CALL release() SAL_NOEXCEPT SAL_OVERRIDE
#define EE_PARA_MAX_COUNT
virtual void SetVerticalWriting(bool bVertical) override
sal_uInt16 GetSmallestDistance() const
constexpr sal_uInt16 SDRATTR_MISC_FIRST(SDRATTR_CAPTION_LAST+1)
const SfxPoolItem * GetItem(sal_uInt16 nWhich, bool bSearchInParent=true) const
constexpr OUStringLiteral UNO_NAME_TEXT_WRITINGMODE
SdrOutliner & ImpGetDrawOutliner() const
const editeng::SvxBorderLine * GetBottom() const
virtual void ItemChange(const sal_uInt16 nWhich, const SfxPoolItem *pNewItem=nullptr) override
sal_Int16 GetLumMod() const
#define SVX_UNOEDIT_CHAR_PROPERTIES
static bool IsWhich(sal_uInt16 nId)
static bool LineToSvxLine(const css::table::BorderLine &rLine, editeng::SvxBorderLine &rSvxLine, bool bConvert)
virtual SdrText * getText(sal_Int32 nIndex) const =0
Return the nth available text.
bool m_bDetectedRangeSegmentation false