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>
36#include <libxml/xmlwriter.h>
67using ::editeng::SvxBorderLine;
109 return &aSvxCellPropertySet;
116 : m_xCell(
std::move(xCell))
161 , maTextProvider(mxCell)
168 , maTextProvider(mxCell)
178 OSL_FAIL(
"CellProperties::Clone(), does not work yet!");
179 return std::unique_ptr<BaseProperties>(
new CellProperties(*
this, rObj,
nullptr));
194 if( !pParaObj &&
mxCell->GetOutlinerParaObject())
195 pParaObj = *
mxCell->GetOutlinerParaObject();
202 if(
mxCell->IsTextEditActive())
219 for(sal_Int32 nPara = 0; nPara < nParaCount; nPara++)
227 for (
const auto& rWhichId : aCharWhichIds)
235 if(!
mxCell->IsTextEditActive())
248 mxCell->SetOutlinerParaObject(std::move(pTemp));
273 if( !pEditParaObj &&
mxCell->GetOutlinerParaObject() )
288 if (!pEditParaObj &&
mxCell->GetOutlinerParaObject())
339 if( xCell->mxTable.is() )
341 xCell->mxTable->addEventListener( xCell );
348 SdrTableObj& rTableObj)
352 ,mpProperties( new
sdr::
properties::CellProperties( rTableObj, this ) )
353 ,mnCellContentType( CellContentType_EMPTY )
359 ,mxTable( rTableObj.getTable() )
368 if(
nullptr == GetEditSource())
374Cell::~Cell() COVERITY_NOEXCEPT_FALSE
385 Reference< XEventListener > xThis(
this );
386 mxTable->removeEventListener( xThis );
399 mpProperties.reset();
400 SetOutlinerParaObject( std::nullopt );
404void Cell::merge( sal_Int32 nColumnSpan, sal_Int32 nRowSpan )
416void Cell::mergeContent(
const CellRef& xSourceCell )
418 SdrTableObj& rTableObj =
dynamic_cast< SdrTableObj&
>(
GetObject() );
420 if( !xSourceCell->hasText() )
423 SdrOutliner& rOutliner=rTableObj.ImpGetDrawOutliner();
428 rOutliner.
SetText(*GetOutlinerParaObject());
429 rOutliner.
AddText(*xSourceCell->GetOutlinerParaObject());
433 rOutliner.
SetText(*xSourceCell->GetOutlinerParaObject());
440 SetStyleSheet( GetStyleSheet(),
true );
444void Cell::cloneFrom(
const CellRef& xCell )
448 replaceContentAndFormatting( xCell );
450 mnCellContentType = xCell->mnCellContentType;
452 msFormula = xCell->msFormula;
453 mfValue = xCell->mfValue;
454 mnError = xCell->mnError;
456 mbMerged = xCell->mbMerged;
464void Cell::replaceContentAndFormatting(
const CellRef& xSourceCell )
466 if( !(xSourceCell.is() && mpProperties) )
469 mpProperties->SetMergedItemSet( xSourceCell->GetObjectItemSet() );
473 if(xSourceCell->GetOutlinerParaObject())
475 SetOutlinerParaObject( *xSourceCell->GetOutlinerParaObject() );
478 SdrTableObj& rTableObj =
dynamic_cast< SdrTableObj&
>(
GetObject() );
479 SdrTableObj& rSourceTableObj =
dynamic_cast< SdrTableObj&
>( xSourceCell->GetObject() );
481 if(&rSourceTableObj.getSdrModelFromSdrObject() != &rTableObj.getSdrModelFromSdrObject())
485 SetStyleSheet(
nullptr,
true );
490void Cell::setMerged()
500void Cell::copyFormatFrom(
const CellRef& xSourceCell )
502 if( !(xSourceCell.is() && mpProperties) )
505 mpProperties->SetMergedItemSet( xSourceCell->GetObjectItemSet() );
506 SdrTableObj& rTableObj =
dynamic_cast< SdrTableObj&
>(
GetObject() );
507 SdrTableObj& rSourceTableObj =
dynamic_cast< SdrTableObj&
>( xSourceCell->GetObject() );
509 if(&rSourceTableObj.getSdrModelFromSdrObject() != &rTableObj.getSdrModelFromSdrObject())
513 SetStyleSheet(
nullptr,
true );
520void Cell::notifyModified()
523 mxTable->setModified(
true );
530bool Cell::IsActiveCell()
const
533 SdrTableObj& rTableObj =
dynamic_cast< SdrTableObj&
>(
GetObject() );
534 if( rTableObj.getActiveCell().get() == this )
540bool Cell::IsTextEditActive()
const
543 SdrTableObj& rTableObj =
dynamic_cast< SdrTableObj&
>(
GetObject() );
544 if(rTableObj.getActiveCell().get() == this )
546 if( rTableObj.CanCreateEditOutlinerParaObject() )
555bool Cell::hasText()
const
565 if( rTextObj.
GetText(0).isEmpty() )
575bool Cell::CanCreateEditOutlinerParaObject()
const
577 SdrTableObj& rTableObj =
dynamic_cast< SdrTableObj&
>(
GetObject() );
578 if( rTableObj.getActiveCell().get() == this )
579 return rTableObj.CanCreateEditOutlinerParaObject();
585 SdrTableObj& rTableObj =
dynamic_cast< SdrTableObj&
>(
GetObject() );
586 if( rTableObj.getActiveCell().get() == this )
587 return rTableObj.CreateEditOutlinerParaObject();
592void Cell::SetStyleSheet(
SfxStyleSheet* pStyleSheet,
bool bDontRemoveHardAttr )
595 if( pStyleSheet && pStyleSheet->
GetFamily() != SfxStyleFamily::Frame )
598 if( mpProperties && (mpProperties->GetStyleSheet() != pStyleSheet) )
600 mpProperties->SetStyleSheet( pStyleSheet, bDontRemoveHardAttr,
true );
609 return mpProperties->GetObjectItemSet();
613 OSL_FAIL(
"Cell::GetObjectItemSet(), called without properties!");
622 mpProperties->SetObjectItem( rItem );
629 SetObjectItem(rItem);
635 return mpProperties->GetStyleSheet();
642 rAnchorRect.
SetLeft( maCellRect.Left() + GetTextLeftDistance() );
643 rAnchorRect.
SetRight( maCellRect.Right() - GetTextRightDistance() );
644 rAnchorRect.
SetTop( maCellRect.Top() + GetTextUpperDistance() );
645 rAnchorRect.
SetBottom( maCellRect.Bottom() - GetTextLowerDistance() );
649void Cell::SetMergedItemSetAndBroadcast(
const SfxItemSet& rSet,
bool bClearAllItems)
653 mpProperties->SetMergedItemSetAndBroadcast(rSet, bClearAllItems);
659sal_Int32 Cell::calcPreferredWidth(
const Size aSize )
662 return getMinimumWidth();
664 Outliner& rOutliner=
static_cast< SdrTableObj&
>(
GetObject() ).ImpGetDrawOutliner();
667 ForceOutlinerParaObject( OutlinerMode::TextObject );
669 if( GetOutlinerParaObject() )
670 rOutliner.
SetText(*GetOutlinerParaObject());
675 return GetTextLeftDistance() + GetTextRightDistance() + nPreferredWidth;
678sal_Int32 Cell::getMinimumWidth()
const
680 return GetTextLeftDistance() + GetTextRightDistance() + 100;
684sal_Int32 Cell::getMinimumHeight()
689 SdrTableObj& rTableObj =
dynamic_cast< SdrTableObj&
>(
GetObject() );
690 sal_Int32 nMinimumHeight = 0;
693 TakeTextAnchorRect( aTextRect );
697 SdrOutliner* pEditOutliner = rTableObj.GetCellTextEditOutliner( *
this );
705 Outliner& rOutliner=rTableObj.ImpGetDrawOutliner();
708 ForceOutlinerParaObject( OutlinerMode::TextObject );
710 if( GetOutlinerParaObject() )
712 rOutliner.
SetText(*GetOutlinerParaObject());
718 nMinimumHeight += GetTextUpperDistance() + GetTextLowerDistance();
719 return nMinimumHeight;
761 bool bNullTextObject = !pTextObject;
765 if( bNullTextObject )
766 ForceOutlinerParaObject( OutlinerMode::TextObject );
781 if (pTableObj && pTableObj->IsTextEditActive())
782 pTableObj->
AddUndo(
new CellUndo(pTableObj, xCell));
797Any SAL_CALL Cell::queryInterface(
const Type & rType )
800 return Any( Reference< XMergeableCell >(
this ) );
803 return Any( Reference< XCell >(
this ) );
806 return Any( Reference< XLayoutConstrains >(
this ) );
809 return Any( Reference< XEventListener >(
this ) );
812 if( aRet.hasValue() )
815 return ::cppu::OWeakObject::queryInterface( rType );
819void SAL_CALL Cell::acquire() noexcept
825void SAL_CALL Cell::release() noexcept
834Sequence< Type > SAL_CALL Cell::getTypes( )
845 return css::uno::Sequence<sal_Int8>();
849css::awt::Size SAL_CALL Cell::getMinimumSize()
851 return css::awt::Size( getMinimumWidth(), getMinimumHeight() );
855css::awt::Size SAL_CALL Cell::getPreferredSize()
857 return getMinimumSize();
861css::awt::Size SAL_CALL Cell::calcAdjustedSize(
const css::awt::Size& aNewSize )
870sal_Int32 SAL_CALL Cell::getRowSpan()
876sal_Int32 SAL_CALL Cell::getColumnSpan()
891OUString SAL_CALL Cell::getFormula( )
897void SAL_CALL Cell::setFormula(
const OUString& aFormula )
899 if( msFormula != aFormula )
901 msFormula = aFormula;
906double SAL_CALL Cell::getValue( )
912void SAL_CALL Cell::setValue(
double nValue )
917 mnCellContentType = CellContentType_VALUE;
922CellContentType SAL_CALL Cell::getType()
924 return mnCellContentType;
928sal_Int32 SAL_CALL Cell::getError( )
941 if( pMap->
aType != aAny.getValueType() )
948 aAny <<= static_cast<sal_Int16>(
nValue);
952 OSL_FAIL(
"GetAnyForItem() Returnvalue has wrong Type!" );
959Reference< XPropertySetInfo > SAL_CALL Cell::getPropertySetInfo()
961 return mpPropSet->getPropertySetInfo();
965void SAL_CALL Cell::setPropertyValue(
const OUString& rPropertyName,
const Any& rValue )
969 if(mpProperties ==
nullptr)
970 throw DisposedException();
975 if( (pMap->
nFlags & PropertyAttribute::READONLY ) != 0 )
976 throw PropertyVetoException();
982 Reference< XStyle > xStyle;
983 if( !( rValue >>= xStyle ) )
984 throw IllegalArgumentException();
987 SetStyleSheet( pStyle,
true );
992 auto pBorder = o3tl::tryAccess<TableBorder>(rValue);
1001 aBox.SetLine(bSet ? &aLine :
nullptr, SvxBoxItemLine::TOP);
1002 aBoxInfo.SetValid(SvxBoxInfoItemValidFlags::TOP, pBorder->IsTopLineValid);
1005 aBox.SetLine(bSet ? &aLine :
nullptr, SvxBoxItemLine::BOTTOM);
1006 aBoxInfo.SetValid(SvxBoxInfoItemValidFlags::BOTTOM, pBorder->IsBottomLineValid);
1009 aBox.SetLine(bSet ? &aLine :
nullptr, SvxBoxItemLine::LEFT);
1010 aBoxInfo.SetValid(SvxBoxInfoItemValidFlags::LEFT, pBorder->IsLeftLineValid);
1013 aBox.SetLine(bSet ? &aLine :
nullptr, SvxBoxItemLine::RIGHT);
1014 aBoxInfo.SetValid(SvxBoxInfoItemValidFlags::RIGHT, pBorder->IsRightLineValid);
1017 aBoxInfo.SetLine(bSet ? &aLine :
nullptr, SvxBoxInfoItemLine::HORI);
1018 aBoxInfo.SetValid(SvxBoxInfoItemValidFlags::HORI, pBorder->IsHorizontalLineValid);
1021 aBoxInfo.SetLine(bSet ? &aLine :
nullptr, SvxBoxInfoItemLine::VERT);
1022 aBoxInfo.SetValid(SvxBoxInfoItemValidFlags::VERT, pBorder->IsVerticalLineValid);
1024 aBox.SetAllDistances(pBorder->Distance);
1025 aBoxInfo.SetValid(SvxBoxInfoItemValidFlags::DISTANCE, pBorder->IsDistanceValid);
1027 mpProperties->SetObjectItem(aBox);
1028 mpProperties->SetObjectItem(aBoxInfo);
1034 if(!(rValue >>= eMode) )
1036 sal_Int32 nMode = 0;
1037 if(!(rValue >>= nMode))
1038 throw IllegalArgumentException();
1044 mpProperties->SetObjectItem(
XFillBmpTileItem( eMode == BitmapMode_REPEAT ) );
1049 sal_Int32 nRotVal = 0;
1050 if (!(rValue >>= nRotVal))
1051 throw IllegalArgumentException();
1053 if (nRotVal != 27000 && nRotVal != 9000 && nRotVal != 0)
1054 throw IllegalArgumentException();
1061 if (mpGrabBagItem ==
nullptr)
1064 mpGrabBagItem->PutValue(rValue, 0);
1070 aSet.
Put(mpProperties->GetItem(pMap->
nWID));
1072 bool bSpecial =
false;
1074 switch( pMap->
nWID )
1087 if( rValue >>= aApiName )
1100 if( !SvxUnoTextRangeBase::SetPropertyValueHelper( pMap, rValue, aSet ))
1106 aSet.
Put(
GetObject().getSdrModelFromSdrObject().GetItemPool().GetDefaultItem(pMap->
nWID));
1116 GetObject().getSdrModelFromSdrObject().SetChanged();
1117 mpProperties->SetMergedItemSetAndBroadcast( aSet );
1122 throw UnknownPropertyException( rPropertyName, getXWeak());
1126Any SAL_CALL Cell::getPropertyValue(
const OUString& PropertyName )
1130 if(mpProperties ==
nullptr)
1131 throw DisposedException();
1136 switch( pMap->
nWID )
1140 return Any( Reference< XStyle >(
dynamic_cast< SfxUnoStyleSheet*
>( GetStyleSheet() ) ) );
1147 TableBorder aTableBorder;
1157 aTableBorder.IsHorizontalLineValid =
rBoxInfoItem.
IsValid(SvxBoxInfoItemValidFlags::HORI);
1163 return Any( aTableBorder );
1171 return Any( BitmapMode_REPEAT );
1175 return Any( BitmapMode_STRETCH );
1179 return Any( BitmapMode_NO_REPEAT );
1185 return Any(sal_Int32(to<Degree100>(rTextRotate.
GetValue())));
1189 if (mpGrabBagItem !=
nullptr)
1191 Any aGrabBagSequence;
1192 mpGrabBagItem->QueryValue(aGrabBagSequence);
1193 return aGrabBagSequence;
1196 return Any{css::uno::Sequence<css::beans::PropertyValue>()};
1201 aSet.
Put(mpProperties->GetItem(pMap->
nWID));
1204 if(!SvxUnoTextRangeBase::GetPropertyValueHelper( aSet, pMap, aAny ))
1210 aSet.
Put(
GetObject().getSdrModelFromSdrObject().GetItemPool().GetDefaultItem(pMap->
nWID));
1214 aAny = GetAnyForItem( aSet, pMap );
1221 throw UnknownPropertyException( PropertyName, getXWeak());
1225void SAL_CALL Cell::addPropertyChangeListener(
const OUString& ,
const Reference< XPropertyChangeListener >& )
1230void SAL_CALL Cell::removePropertyChangeListener(
const OUString& ,
const Reference< XPropertyChangeListener >& )
1235void SAL_CALL Cell::addVetoableChangeListener(
const OUString& ,
const Reference< XVetoableChangeListener >& )
1240void SAL_CALL Cell::removeVetoableChangeListener(
const OUString& ,
const Reference< XVetoableChangeListener >& )
1248void SAL_CALL Cell::setPropertyValues(
const Sequence< OUString >& aPropertyNames,
const Sequence< Any >& aValues )
1252 if(mpProperties ==
nullptr)
1253 throw DisposedException();
1255 const sal_Int32
nCount = aPropertyNames.getLength();
1256 if (nCount != aValues.getLength())
1257 throw css::lang::IllegalArgumentException(
"lengths do not match",
1260 const OUString* pNames = aPropertyNames.getConstArray();
1261 const Any*
pValues = aValues.getConstArray();
1263 for( sal_Int32 nIdx = 0; nIdx <
nCount; nIdx++, pNames++,
pValues++ )
1269 catch( UnknownPropertyException& )
1281Sequence< Any > SAL_CALL Cell::getPropertyValues(
const Sequence< OUString >& aPropertyNames )
1285 if(mpProperties ==
nullptr)
1286 throw DisposedException();
1288 const sal_Int32
nCount = aPropertyNames.getLength();
1289 Sequence< Any > aRet( nCount );
1290 Any* pValue = aRet.getArray();
1292 for(
const OUString& rName : aPropertyNames )
1298 catch( UnknownPropertyException& )
1313void SAL_CALL Cell::addPropertiesChangeListener(
const Sequence< OUString >& ,
const Reference< XPropertiesChangeListener >& )
1318void SAL_CALL Cell::removePropertiesChangeListener(
const Reference< XPropertiesChangeListener >& )
1323void SAL_CALL Cell::firePropertiesChangeEvent(
const Sequence< OUString >& ,
const Reference< XPropertiesChangeListener >& )
1331PropertyState SAL_CALL Cell::getPropertyState(
const OUString& PropertyName )
1335 if(mpProperties ==
nullptr)
1336 throw DisposedException();
1342 PropertyState eState;
1343 switch( pMap->
nWID )
1351 if( bStretch || bTile )
1353 eState = PropertyState_DIRECT_VALUE;
1357 eState = PropertyState_DEFAULT_VALUE;
1363 return PropertyState_DIRECT_VALUE;
1369 return PropertyState_DEFAULT_VALUE;
1371 return PropertyState_DIRECT_VALUE;
1379 case SfxItemState::SET:
1380 eState = PropertyState_DIRECT_VALUE;
1382 case SfxItemState::DEFAULT:
1383 eState = PropertyState_DEFAULT_VALUE;
1386 eState = PropertyState_AMBIGUOUS_VALUE;
1391 if( PropertyState_DIRECT_VALUE == eState )
1393 switch( pMap->
nWID )
1404 if( ( pItem ==
nullptr ) || pItem->
GetName().isEmpty() )
1405 eState = PropertyState_DEFAULT_VALUE;
1419 if( pItem ==
nullptr )
1420 eState = PropertyState_DEFAULT_VALUE;
1424 if (pMap->
nMemberId == MID_COLOR_THEME_INDEX)
1430 eState = PropertyState_DEFAULT_VALUE;
1433 else if (pMap->
nMemberId == MID_COLOR_LUM_MOD)
1436 sal_Int16 nLumMod = 10000;
1437 for (
auto const& rTransform : pColor->getComplexColor().getTransformations())
1440 nLumMod = rTransform.mnValue;
1442 if (nLumMod == 10000)
1444 eState = PropertyState_DEFAULT_VALUE;
1447 else if (pMap->
nMemberId == MID_COLOR_LUM_OFF)
1450 sal_Int16 nLumOff = 0;
1451 for (
auto const& rTransform : pColor->getComplexColor().getTransformations())
1454 nLumOff = rTransform.mnValue;
1458 eState = PropertyState_DEFAULT_VALUE;
1461 else if (pMap->
nMemberId == MID_COMPLEX_COLOR)
1466 eState = PropertyState_DEFAULT_VALUE;
1471 if (pMap->
nMemberId == MID_COMPLEX_COLOR)
1476 eState = PropertyState_DEFAULT_VALUE;
1486 throw UnknownPropertyException(PropertyName);
1490Sequence< PropertyState > SAL_CALL Cell::getPropertyStates(
const Sequence< OUString >& aPropertyName )
1494 if(mpProperties ==
nullptr)
1495 throw DisposedException();
1497 const sal_Int32
nCount = aPropertyName.getLength();
1498 Sequence< PropertyState > aRet( nCount );
1500 std::transform(aPropertyName.begin(), aPropertyName.end(), aRet.getArray(),
1501 [
this](
const OUString& rName) -> PropertyState {
1504 return getPropertyState( rName );
1508 return PropertyState_AMBIGUOUS_VALUE;
1516void SAL_CALL Cell::setPropertyToDefault(
const OUString& PropertyName )
1520 if(mpProperties ==
nullptr)
1521 throw DisposedException();
1526 switch( pMap->
nWID )
1546 mpProperties->ClearObjectItem( pMap->
nWID );
1550 GetObject().getSdrModelFromSdrObject().SetChanged();
1553 throw UnknownPropertyException( PropertyName, getXWeak());
1557Any SAL_CALL Cell::getPropertyDefault(
const OUString& aPropertyName )
1561 if(mpProperties ==
nullptr)
1562 throw DisposedException();
1567 switch( pMap->
nWID )
1570 return Any( BitmapMode_NO_REPEAT );
1574 Reference< XStyle > xStyle;
1575 return Any( xStyle );
1580 TableBorder aBorder;
1581 return Any( aBorder );
1589 aSet.
Put(
GetObject().getSdrModelFromSdrObject().GetItemPool().GetDefaultItem(pMap->
nWID));
1590 return GetAnyForItem( aSet, pMap );
1595 throw UnknownPropertyException( aPropertyName, getXWeak());
1602void SAL_CALL Cell::setAllPropertiesToDefault()
1617 ESelection aSelection( 0, 0, EE_PARA_ALL, EE_TEXTPOS_ALL);
1623 SetOutlinerParaObject(std::move(pTemp));
1628void SAL_CALL Cell::setPropertiesToDefault(
const Sequence< OUString >& aPropertyNames )
1630 for(
const OUString& rName : aPropertyNames)
1631 setPropertyToDefault( rName );
1635Sequence< Any > SAL_CALL Cell::getPropertyDefaults(
const Sequence< OUString >& aPropertyNames )
1637 sal_Int32
nCount = aPropertyNames.getLength();
1638 Sequence< Any > aDefaults( nCount );
1640 std::transform(aPropertyNames.begin(), aPropertyNames.end(), aDefaults.getArray(),
1641 [
this](
const OUString& rName) -> Any { return getPropertyDefault(rName); });
1650void SAL_CALL Cell::insertTextContent(
const Reference< XTextRange >& xRange,
const Reference< XTextContent >& xContent,
sal_Bool bAbsorb )
1657void SAL_CALL Cell::removeTextContent(
const Reference< XTextContent >& xContent )
1667void SAL_CALL Cell::insertString(
const Reference< XTextRange >& xRange,
const OUString& aString,
sal_Bool bAbsorb )
1674void SAL_CALL Cell::insertControlCharacter(
const Reference< XTextRange >& xRange, sal_Int16 nControlCharacter,
sal_Bool bAbsorb )
1684OUString SAL_CALL Cell::getString( )
1691void SAL_CALL Cell::setString(
const OUString& aString )
1698void SAL_CALL Cell::disposing(
const EventObject& )
1704void Cell::dumpAsXml(
xmlTextWriterPtr pWriter, sal_Int32 nRow, sal_Int32 nCol)
const
1706 (void)xmlTextWriterStartElement(pWriter, BAD_CAST(
"Cell"));
1707 (void)xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST(
"row"),
"%" SAL_PRIdINT32, nRow);
1708 (void)xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST(
"col"),
"%" SAL_PRIdINT32, nCol);
1712 mpProperties->dumpAsXml(pWriter);
1713 (void)xmlTextWriterEndElement(pWriter);
const PropertyValue * pValues
static const SvxItemPropertySet * ImplGetSvxCellPropertySet()
virtual sal_Int32 GetParagraphCount() const=0
virtual OUString GetText(sal_Int32 nPara) const=0
OUString const & GetName() const
const EditTextObject & GetTextObject() const
void SetVertical(bool bNew)
void SetRotation(TextRotation nRotation)
void SetMaxAutoPaperSize(const Size &rSz)
void SetText(const OutlinerParaObject &)
const EditEngine & GetEditEngine() const
void AddText(const OutlinerParaObject &, bool bAppend=false)
std::optional< OutlinerParaObject > CreateParaObject(sal_Int32 nStartPara=0, sal_Int32 nParaCount=EE_PARA_ALL) const
void SetPaperSize(const Size &rSize)
bool SetUpdateLayout(bool bUpdate)
void SetParaAttribs(sal_Int32 nPara, const SfxItemSet &)
void RemoveAttribs(const ESelection &rSelection, bool bRemoveParaAttribs, sal_uInt16 nWhich)
SfxItemSet const & GetParaAttribs(sal_Int32 nPara) const
sal_uInt32 GetTextHeight() const
void RemoveCharAttribs(sal_Int32 nPara, sal_uInt16 nWhich=0)
sal_Int32 GetParagraphCount() const
virtual const tools::Rectangle & GetSnapRect() const override
void AddUndo(std::unique_ptr< SdrUndoAction > pUndo)
bool IsUndoEnabled() const
returns true if undo is currently enabled This returns false if undo was disabled using EnableUndo( f...
static SdrItemPool & GetGlobalDrawObjectItemPool()
void SetObjectItemSet(const SfxItemSet &rSet)
SdrModel & getSdrModelFromSdrObject() const
virtual void SetSnapRect(const tools::Rectangle &rRect)
const SfxItemSet & GetObjectItemSet() const
SdrOutliner & ImpGetDrawOutliner() const
SVX_DLLPRIVATE SdrOutliner * GetTextEditOutliner() const
void dumpAsXml(xmlTextWriterPtr pWriter) const
virtual void SetOutlinerParaObject(std::optional< OutlinerParaObject > pTextObject)
static bool IsWhich(sal_uInt16 nId)
SfxItemPool * GetPool() const
sal_uInt16 ClearItem(sal_uInt16 nWhich=0)
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
const SfxPoolItem * GetItem(sal_uInt16 nWhich, bool bSearchInParent=true) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
SfxStyleFamily GetFamily() const
static SfxUnoStyleSheet * getUnoStyleSheet(const css::uno::Reference< css::style::XStyle > &xStyle)
void setHeight(tools::Long nHeight)
bool IsValid(SvxBoxInfoItemValidFlags nValid) const
const editeng::SvxBorderLine * GetHori() const
const editeng::SvxBorderLine * GetVert() const
static bool LineToSvxLine(const css::table::BorderLine &rLine, editeng::SvxBorderLine &rSvxLine, bool bConvert)
const editeng::SvxBorderLine * GetTop() const
sal_uInt16 GetSmallestDistance() const
const editeng::SvxBorderLine * GetRight() const
static css::table::BorderLine2 SvxLineToLine(const editeng::SvxBorderLine *pLine, bool bConvert)
const editeng::SvxBorderLine * GetLeft() const
const editeng::SvxBorderLine * GetBottom() const
bool SetFillAttribute(sal_uInt16 nWID, const OUString &rName)
Degree10 GetValue() const
bool IsTopToBottom() const
virtual void SAL_CALL removeTextContent(const css::uno::Reference< css::text::XTextContent > &xContent) 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 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::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 void SAL_CALL acquire() SAL_NOEXCEPT SAL_OVERRIDE
virtual void SAL_CALL release() SAL_NOEXCEPT SAL_OVERRIDE
css::uno::Type const & get()
virtual void ItemSetChanged(o3tl::span< const SfxPoolItem *const > aChangedItems, sal_uInt16 nDeletedWhich) override
virtual void ItemChange(const sal_uInt16 nWhich, const SfxPoolItem *pNewItem=nullptr) override
virtual const SfxItemSet & GetObjectItemSet() const override
const SdrObject & GetSdrObject() const
SfxItemSet CreateObjectSpecificItemSet(SfxItemPool &rPool) override
void ItemChange(const sal_uInt16 nWhich, const SfxPoolItem *pNewItem=nullptr) override
const CellTextProvider maTextProvider
std::unique_ptr< BaseProperties > Clone(SdrObject &rObj) const override
sdr::table::CellRef mxCell
CellProperties(SdrObject &rObj, ::sdr::table::Cell *pCell)
const svx::ITextProvider & getTextProvider() const override
Get the TextProvider related to our SdrObject.
void ForceDefaultAttributes() override
void ItemSetChanged(o3tl::span< const SfxPoolItem *const > aChangedItems, sal_uInt16 nDeletedWhich) override
virtual ~CellTextProvider()
virtual SdrText * getText(sal_Int32 nIndex) const override
Return the nth available text.
const sdr::table::CellRef m_xCell
virtual sal_Int32 getTextCount() const override
Return the number of texts available for this object.
CellTextProvider(sdr::table::CellRef xCell)
std::optional< SfxItemSet > mxItemSet
void AddUndo(SdrUndoAction *pUndo)
Add an undo action that should be on the undo stack after ending text edit.
virtual void SetVerticalWriting(bool bVertical) override
This interface provides access to text object(s) in an SdrObject.
#define TOOLS_WARN_EXCEPTION(area, stream)
virtual css::uno::Reference< css::embed::XEmbeddedObject > GetObject() override
#define EE_PARA_MAX_COUNT
constexpr sal_uInt16 EE_ITEMS_END(EE_FEATURE_END)
constexpr sal_uInt16 EE_ITEMS_START(OWN_ATTR_VALUE_END+1)
struct _xmlTextWriter * xmlTextWriterPtr
css::uno::Sequence< T > concatSequences(const css::uno::Sequence< T > &rS1, const Ss &... rSn)
VBAHELPER_DLLPUBLIC bool setPropertyValue(css::uno::Sequence< css::beans::PropertyValue > &aProp, const OUString &aName, const css::uno::Any &aValue)
rtl::Reference< Cell > CellRef
bool getPropertyValue(ValueType &rValue, css::uno::Reference< css::beans::XPropertySet > const &xPropSet, OUString const &propName)
static constexpr auto Items
SdrOnOffItem makeSdrTextAutoGrowHeightItem(bool bAuto)
SdrOnOffItem makeSdrTextAutoGrowWidthItem(bool bAuto)
constexpr TypedWhichId< SdrOnOffItem > SDRATTR_TEXT_AUTOGROWWIDTH(SDRATTR_MISC_FIRST+12)
constexpr sal_uInt16 SDRATTR_TABLE_FIRST(SDRATTR_CUSTOMSHAPE_LAST+1)
constexpr TypedWhichId< SdrMetricItem > SDRATTR_TEXT_LEFTDIST(SDRATTR_MISC_FIRST+4)
constexpr sal_uInt16 SDRATTR_START(XATTR_START)
constexpr sal_uInt16 SDRATTR_MISC_LAST(SDRATTR_TEXT_CLIPVERTOVERFLOW)
constexpr TypedWhichId< SvxBoxInfoItem > SDRATTR_TABLE_BORDER_INNER(SDRATTR_TABLE_FIRST+1)
constexpr TypedWhichId< SdrTextHorzAdjustItem > SDRATTR_TEXT_HORZADJUST(SDRATTR_MISC_FIRST+13)
constexpr sal_uInt16 SDRATTR_MISC_FIRST(SDRATTR_CAPTION_LAST+1)
constexpr TypedWhichId< SvxTextRotateItem > SDRATTR_TABLE_TEXT_ROTATION(SDRATTR_TABLE_FIRST+4)
constexpr TypedWhichId< SdrOnOffItem > SDRATTR_TEXT_AUTOGROWHEIGHT(SDRATTR_MISC_FIRST+2)
constexpr TypedWhichId< SdrOnOffItem > SDRATTR_TEXT_WORDWRAP(SDRATTR_MISC_FIRST+24)
constexpr TypedWhichId< SdrTextVertAdjustItem > SDRATTR_TEXT_VERTADJUST(SDRATTR_MISC_FIRST+8)
constexpr sal_uInt16 SDRATTR_TABLE_LAST(SDRATTR_TABLE_CELL_GRABBAG)
constexpr TypedWhichId< SvxBoxItem > SDRATTR_TABLE_BORDER(SDRATTR_TABLE_FIRST+0)
constexpr TypedWhichId< SdrMetricItem > SDRATTR_TEXT_RIGHTDIST(SDRATTR_MISC_FIRST+5)
constexpr TypedWhichId< SfxGrabBagItem > SDRATTR_TABLE_CELL_GRABBAG(SDRATTR_TABLE_FIRST+5)
constexpr sal_uInt16 SDRATTR_SHADOW_LAST(SDRATTR_SHADOWALIGNMENT)
constexpr TypedWhichId< SdrMetricItem > SDRATTR_TEXT_LOWERDIST(SDRATTR_MISC_FIRST+7)
constexpr TypedWhichId< SvxWritingModeItem > SDRATTR_TEXTDIRECTION(SDRATTR_NOTPERSIST_FIRST+34)
constexpr TypedWhichId< SdrMetricItem > SDRATTR_TEXT_UPPERDIST(SDRATTR_MISC_FIRST+6)
std::vector< sal_uInt16 > GetAllCharPropIds(const SfxItemSet &rSet)
SvxBoxInfoItem & rBoxInfoItem
constexpr OUStringLiteral UNO_NAME_TEXT_LOWERDIST
constexpr OUStringLiteral UNO_NAME_TEXT_UPPERDIST
constexpr OUStringLiteral UNO_NAME_TEXT_HORZADJUST
constexpr OUStringLiteral UNO_NAME_TEXT_WORDWRAP
constexpr OUStringLiteral UNO_NAME_TEXT_VERTADJUST
constexpr OUStringLiteral UNO_NAME_TEXT_LEFTDIST
constexpr OUStringLiteral UNO_NAME_TEXT_WRITINGMODE
constexpr OUStringLiteral UNO_NAME_TEXT_RIGHTDIST
void SvxItemPropertySet_setPropertyValue(const SfxItemPropertyMapEntry *pMap, const uno::Any &rVal, SfxItemSet &rSet)
uno::Any SvxItemPropertySet_getPropertyValue(const SfxItemPropertyMapEntry *pMap, const SfxItemSet &rSet)
#define OWN_ATTR_TABLEBORDER
#define OWN_ATTR_FILLBMP_MODE
const SvxItemPropertySet * ImplGetSvxUnoOutlinerTextCursorSvxPropertySet()
#define SVX_UNOEDIT_OUTLINER_PROPERTIES
#define SVX_UNOEDIT_CHAR_PROPERTIES
#define SVX_UNOEDIT_PARA_PROPERTIES
constexpr TypedWhichId< XFillColorItem > XATTR_FILLCOLOR(XATTR_FILL_FIRST+1)
constexpr TypedWhichId< XLineColorItem > XATTR_LINECOLOR(XATTR_LINE_FIRST+3)
constexpr TypedWhichId< XLineDashItem > XATTR_LINEDASH(XATTR_LINE_FIRST+1)
constexpr TypedWhichId< XLineEndItem > XATTR_LINEEND(XATTR_LINE_FIRST+5)
constexpr TypedWhichId< XLineStartItem > XATTR_LINESTART(XATTR_LINE_FIRST+4)
constexpr TypedWhichId< XFillBmpStretchItem > XATTR_FILLBMP_STRETCH(XATTR_FILL_FIRST+16)
constexpr TypedWhichId< XFillHatchItem > XATTR_FILLHATCH(XATTR_FILL_FIRST+3)
constexpr TypedWhichId< XFillBmpTileItem > XATTR_FILLBMP_TILE(XATTR_FILL_FIRST+7)
constexpr TypedWhichId< XFillBitmapItem > XATTR_FILLBITMAP(XATTR_FILL_FIRST+4)
constexpr TypedWhichId< XFillFloatTransparenceItem > XATTR_FILLFLOATTRANSPARENCE(XATTR_FILL_FIRST+11)
constexpr TypedWhichId< XFillGradientItem > XATTR_FILLGRADIENT(XATTR_FILL_FIRST+2)