39const short PADDING_LENGTH_FOR_STYLE_FAMILY = 5;
41const char PADDING_CHARACTER_FOR_STYLE_FAMILY =
' ';
60 if (!bWdtGrow && !bHgtGrow)
78 Size aMaxSiz(100000, 100000);
90 if (nMaxWdt == 0 || nMaxWdt > aMaxSiz.
Width())
91 nMaxWdt = aMaxSiz.
Width();
102 if (nMaxHgt == 0 || nMaxHgt > aMaxSiz.
Height())
103 nMaxHgt = aMaxSiz.
Height();
115 if (aNewSize.
Width() < 2)
117 if (aNewSize.
Height() < 2)
134 nWdt = aSiz2.
Width() + 1;
136 nHgt = aSiz2.
Height() + 1;
150 if (pOutlinerParaObject)
152 rOutliner.
SetText(*pOutlinerParaObject);
159 nWdt = aSiz2.
Width() + 1;
161 nHgt = aSiz2.
Height() + 1;
192 if (!bWdtGrow && !bHgtGrow)
231 aD1 -= aOldRect.TopLeft();
235 rR.
Move(aD2.
X(), aD2.
Y());
249 if (
auto pRectObj =
dynamic_cast<SdrRectObj *
>(
this)) {
250 pRectObj->SetXPolyDirty();
252 if (
auto pCaptionObj =
dynamic_cast<SdrCaptionObj *
>(
this)) {
253 pCaptionObj->ImpRecalcTail();
267 if (
auto pRectObj =
dynamic_cast<SdrRectObj *
>(
this)) {
268 pRectObj->SetXPolyDirty();
270 bool bScPostIt =
false;
271 if (
auto pCaptionObj =
dynamic_cast<SdrCaptionObj *
>(
this)) {
272 pCaptionObj->ImpRecalcTail();
275 bScPostIt = pCaptionObj->GetSpecialTextBoxShadow();
284 const bool bSuppressChangeWhenEditOnOverlay(
289 if (!bSuppressChangeWhenEditOnOverlay || bScPostIt)
303 if (pStylePool==
nullptr)
306 std::vector<OUString> aStyleNames;
308 if (pOutlinerParaObject!=
nullptr)
319 for(sal_Int32 nParaNum(0); nParaNum < nParaCnt; nParaNum++)
323 if (!aStyleName.isEmpty())
328 sal_uInt32 nNum(aStyleNames.size());
330 while(!bFnd && nNum > 0)
334 bFnd = aStyleName == aStyleNames[nNum];
339 aStyleNames.push_back(aStyleName);
347 while (!aStyleNames.empty()) {
348 OUString
aName = aStyleNames.back();
349 aStyleNames.pop_back();
355 aStyleSheets.
insert(pStyle);
365 if (aStyleSheets.
find(pStyle)==aStyleSheets.
end()) {
385 while( --nText >= 0 )
390 if(pOutlinerParaObject)
400 pOutliner->
SetText(*pOutlinerParaObject);
404 for(
const auto& rWhichId : rCharWhichIds )
427 bool bHasText =
false;
434 bHasText = (nParaCount > 1) || (!rETO.
GetText( 0 ).isEmpty());
442 OUStringBuffer aFam = OUString::number(
static_cast<sal_Int32
>(family));
445 styleName +=
"|" + aFam;
450 std::u16string_view familyString = styleName.substr(styleName.size() - PADDING_LENGTH_FOR_STYLE_FAMILY);
452 sal_uInt16 nFam =
static_cast<sal_uInt16
>(
o3tl::toInt32(familyString));
virtual sal_Int32 GetParagraphCount() const=0
virtual void GetStyleSheet(sal_Int32 nPara, OUString &rName, SfxStyleFamily &eFamily) const=0
virtual OUString GetText(sal_Int32 nPara) const=0
double mfCosRotationAngle
double mfSinRotationAngle
Degree100 m_nRotationAngle
const EditTextObject & GetTextObject() const
void SetMaxAutoPaperSize(const Size &rSz)
void SetText(const OutlinerParaObject &)
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 SetFixedCellHeight(bool bUseFixedCellHeight)
void RemoveAttribs(const ESelection &rSelection, bool bRemoveParaAttribs, sal_uInt16 nWhich)
sal_uInt32 GetTextHeight() const
sal_Int32 GetParagraphCount() const
constexpr tools::Long Y() const
constexpr tools::Long X() const
const SfxPoolItem & GetMergedItem(const sal_uInt16 nWhich) const
void BroadcastObjectChange() const
SdrModel & getSdrModelFromSdrObject() const
SdrObjUserCall * m_pUserCall
SfxStyleSheet * GetStyleSheet() const
void SendUserCall(SdrUserCallType eUserCall, const tools::Rectangle &rBoundRect) const
virtual void SetChanged()
virtual const tools::Rectangle & GetLastBoundRect() const
virtual void SetBoundAndSnapRectsDirty(bool bNotMyself=false, bool bRecursive=true)
Rectangle objects (rectangle, circle, ...)
SdrTextHorzAdjust GetTextHorizontalAdjust() const
void RemoveOutlinerCharacterAttribs(const std::vector< sal_uInt16 > &rCharWhichIds)
iterates over the paragraphs of a given SdrObject and removes all hard set character attributes with ...
virtual bool IsAutoGrowWidth() const
tools::Long GetMaxTextFrameHeight() const
tools::Rectangle const & getRectangle() const
static SfxStyleFamily ReadFamilyFromStyleName(std::u16string_view styleName)
Reads the style family from a style name to which the family has been appended.
tools::Long GetTextLowerDistance() const
Bottom inner spacing to borders.
SdrOutliner & ImpGetDrawOutliner() const
void ImpSetTextStyleSheetListeners()
tools::Long GetMinTextFrameHeight() const
bool IsFitToSize() const
returns true if the old feature for fitting shape content should into shape is enabled....
bool IsInEditMode() const
virtual SdrText * getActiveText() const
returns the currently active text.
SdrOutliner * mpEditingOutliner
static void AppendFamilyToStyleName(OUString &styleName, SfxStyleFamily family)
Appends the style family to a provided style name.
tools::Long GetMaxTextFrameWidth() const
virtual OutlinerParaObject * GetOutlinerParaObject() const override
void NbcSetOutlinerParaObjectForText(std::optional< OutlinerParaObject > pTextObject, SdrText *pText)
tools::Long GetTextLeftDistance() const
Left inner spacing to borders
virtual bool IsAutoGrowHeight() const
tools::Long GetTextRightDistance() const
Right inner spacing to borders
virtual bool NbcAdjustTextFrameWidthAndHeight(bool bHgt=true, bool bWdt=true)
SdrTextAniDirection GetTextAniDirection() const
virtual bool HasText() const override
static bool HasTextImpl(SdrOutliner const *pOutliner)
returns false if the given pointer is NULL or if the given SdrOutliner contains no text.
virtual sal_Int32 getTextCount() const override
returns the number of texts available for this object.
virtual bool AdjustTextFrameWidthAndHeight()
tools::Long GetMinTextFrameWidth() const
SdrTextVertAdjust GetTextVerticalAdjust() const
virtual SdrText * getText(sal_Int32 nIndex) const override
returns the nth available text.
SdrTextAniKind GetTextAniKind() const
SVX_DLLPRIVATE SdrOutliner * GetTextEditOutliner() const
void setRectangle(tools::Rectangle const &rRectangle)
tools::Long GetTextUpperDistance() const
Top inner spacing to borders.
OutlinerParaObject * GetOutlinerParaObject()
void StartListening(SfxBroadcaster &rBroadcaster, DuplicateHandling eDuplicateHanding=DuplicateHandling::Unexpected)
SfxBroadcaster * GetBroadcasterJOE(sal_uInt16 nNo) const
sal_uInt16 GetBroadcasterCount() const
void EndListening(SfxBroadcaster &rBroadcaster, bool bRemoveAllDuplicates=false)
virtual SfxStyleSheetBase * Find(const OUString &, SfxStyleFamily eFam, SfxStyleSearchBits n=SfxStyleSearchBits::All)
constexpr tools::Long Height() const
tools::Long AdjustHeight(tools::Long n)
void setWidth(tools::Long nWidth)
tools::Long AdjustWidth(tools::Long n)
void setHeight(tools::Long nHeight)
constexpr tools::Long Width() const
const_iterator find(const Value &x) const
const_iterator end() const
std::pair< const_iterator, bool > insert(Value &&x)
OString stripEnd(const OString &rIn, char c)
OStringBuffer & padToLength(OStringBuffer &rBuffer, sal_Int32 nLength, char cFill='\0')
sal_Int32 toInt32(std::u16string_view str, sal_Int16 radix=10)
@ SDRTEXTVERTADJUST_BOTTOM
@ SDRTEXTHORZADJUST_RIGHT
SdrTextAniKind
Animation type for text frame.
@ Slide
scroll back and forth
@ Alternate
scroll through
constexpr TypedWhichId< SdrTextFixedCellHeightItem > SDRATTR_TEXT_USEFIXEDCELLHEIGHT(SDRATTR_MISC_FIRST+23)
void RotatePoint(Point &rPnt, const Point &rRef, double sn, double cs)