39 const short PADDING_LENGTH_FOR_STYLE_FAMILY = 5;
41 const 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());
247 if (
auto pRectObj = dynamic_cast<SdrRectObj *>(
this)) {
248 pRectObj->SetXPolyDirty();
250 if (
auto pCaptionObj = dynamic_cast<SdrCaptionObj *>(
this)) {
251 pCaptionObj->ImpRecalcTail();
265 if (
auto pRectObj = dynamic_cast<SdrRectObj *>(
this)) {
266 pRectObj->SetXPolyDirty();
268 bool bScPostIt =
false;
269 if (
auto pCaptionObj = dynamic_cast<SdrCaptionObj *>(
this)) {
270 pCaptionObj->ImpRecalcTail();
273 bScPostIt = pCaptionObj->GetSpecialTextBoxShadow();
282 const bool bSuppressChangeWhenEditOnOverlay(
287 if (!bSuppressChangeWhenEditOnOverlay || bScPostIt)
301 if (pStylePool==
nullptr)
304 std::vector<OUString> aStyleNames;
306 if (pOutlinerParaObject!=
nullptr)
317 for(sal_Int32 nParaNum(0); nParaNum < nParaCnt; nParaNum++)
321 if (!aStyleName.isEmpty())
326 sal_uInt32 nNum(aStyleNames.size());
328 while(!bFnd && nNum > 0)
332 bFnd = aStyleName == aStyleNames[nNum];
337 aStyleNames.push_back(aStyleName);
345 while (!aStyleNames.empty()) {
346 OUString
aName = aStyleNames.back();
347 aStyleNames.pop_back();
353 aStyleSheets.
insert(pStyle);
363 if (aStyleSheets.
find(pStyle)==aStyleSheets.
end()) {
383 while( --nText >= 0 )
388 if(pOutlinerParaObject)
398 pOutliner->
SetText(*pOutlinerParaObject);
402 for(
const auto& rWhichId : rCharWhichIds )
425 bool bHasText =
false;
432 bHasText = (nParaCount > 1) || (!rETO.
GetText( 0 ).isEmpty());
441 aFam.append(static_cast<sal_Int32>(family));
444 styleName +=
"|" + aFam.makeStringAndClear();
449 std::u16string_view familyString = styleName.subView(styleName.getLength() - PADDING_LENGTH_FOR_STYLE_FAMILY);
451 sal_uInt16 nFam =
static_cast<sal_uInt16
>(
o3tl::toInt32(familyString));
OString stripEnd(const OString &rIn, char c)
tools::Long GetTextLowerDistance() const
Bottom inner spacing to borders.
virtual bool IsAutoGrowHeight() 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 NbcAdjustTextFrameWidthAndHeight(bool bHgt=true, bool bWdt=true)
void setWidth(tools::Long nWidth)
virtual SdrText * getText(sal_Int32 nIndex) const override
returns the nth available text.
void SetPaperSize(const Size &rSize)
tools::Long GetTextLeftDistance() const
Left inner spacing to borders.
double mfSinRotationAngle
bool IsInEditMode() const
SdrTextAniKind GetTextAniKind() const
const_iterator find(const Value &x) const
SfxBroadcaster * GetBroadcasterJOE(sal_uInt16 nNo) const
sal_uInt32 GetTextHeight() const
sal_Int32 GetParagraphCount() const
tools::Long GetMinTextFrameHeight() const
virtual bool HasText() const override
SdrTextAniKind
Animation type for text frame.
tools::Long GetMaxTextFrameHeight() const
constexpr tools::Long Width() const
OutlinerParaObject * GetOutlinerParaObject()
SfxStyleSheet * GetStyleSheet() const
void SetFixedCellHeight(bool bUseFixedCellHeight)
static void AppendFamilyToStyleName(OUString &styleName, SfxStyleFamily family)
Appends the style family to a provided style name.
tools::Long GetMaxTextFrameWidth() const
virtual bool IsAutoGrowWidth() const
SVX_DLLPRIVATE SdrOutliner * GetTextEditOutliner() const
sal_uInt16 GetBroadcasterCount() const
virtual void SetBoundAndSnapRectsDirty(bool bNotMyself=false, bool bRecursive=true)
void RemoveAttribs(const ESelection &rSelection, bool bRemoveParaAttribs, sal_uInt16 nWhich)
void NbcSetOutlinerParaObjectForText(std::optional< OutlinerParaObject > pTextObject, SdrText *pText)
SdrTextHorzAdjust GetTextHorizontalAdjust() const
const EditTextObject & GetTextObject() const
SdrTextVertAdjust GetTextVerticalAdjust() const
void SetText(const OutlinerParaObject &)
bool IsFitToSize() const
returns true if the old feature for fitting shape content should into shape is enabled. implies IsAutoFit()==false!
SdrOutliner * mpEditingOutliner
void BroadcastObjectChange() const
virtual OUString GetText(sal_Int32 nPara) const =0
SdrModel & getSdrModelFromSdrObject() const
SdrObjUserCall * m_pUserCall
void StartListening(SfxBroadcaster &rBroadcaster, DuplicateHandling eDuplicateHanding=DuplicateHandling::Unexpected)
const_iterator end() const
sal_Int32 toInt32(std::u16string_view str, sal_Int16 radix=10)
virtual SdrText * getActiveText() const
returns the currently active text.
const SfxPoolItem & GetMergedItem(const sal_uInt16 nWhich) const
std::optional< OutlinerParaObject > CreateParaObject(sal_Int32 nStartPara=0, sal_Int32 nParaCount=EE_PARA_ALL) const
tools::Long GetMinTextFrameWidth() const
static SfxStyleFamily ReadFamilyFromStyleName(const OUString &styleName)
Reads the style family from a style name to which the family has been appended.
tools::Long GetTextRightDistance() const
Right inner spacing to borders.
virtual const tools::Rectangle & GetLastBoundRect() const
void RotatePoint(Point &rPnt, const Point &rRef, double sn, double cs)
tools::Long GetTextUpperDistance() const
Top inner spacing to borders.
void SetMaxAutoPaperSize(const Size &rSz)
constexpr tools::Long Height() const
virtual OutlinerParaObject * GetOutlinerParaObject() const override
virtual bool AdjustTextFrameWidthAndHeight()
virtual sal_Int32 GetParagraphCount() const =0
tools::Long AdjustWidth(tools::Long n)
double mfCosRotationAngle
void EndListening(SfxBroadcaster &rBroadcaster, bool bRemoveAllDuplicates=false)
void ImpSetTextStyleSheetListeners()
bool SetUpdateLayout(bool bUpdate)
SdrTextAniDirection GetTextAniDirection() const
tools::Long AdjustHeight(tools::Long n)
constexpr TypedWhichId< SdrTextFixedCellHeightItem > SDRATTR_TEXT_USEFIXEDCELLHEIGHT(SDRATTR_MISC_FIRST+23)
void setHeight(tools::Long nHeight)
virtual sal_Int32 getTextCount() const override
returns the number of texts available for this object.
virtual void GetStyleSheet(sal_Int32 nPara, OUString &rName, SfxStyleFamily &eFamily) const =0
std::pair< const_iterator, bool > insert(Value &&x)
virtual void SetChanged()
virtual SfxStyleSheetBase * Find(const OUString &, SfxStyleFamily eFam, SfxStyleSearchBits n=SfxStyleSearchBits::All)
SdrOutliner & ImpGetDrawOutliner() const
static bool HasTextImpl(SdrOutliner const *pOutliner)
returns false if the given pointer is NULL or if the given SdrOutliner contains no text...
void SendUserCall(SdrUserCallType eUserCall, const tools::Rectangle &rBoundRect) const
OStringBuffer & padToLength(OStringBuffer &rBuffer, sal_Int32 nLength, char cFill= '\0')