26#include <osl/diagnose.h>
30#include <libxml/xmlwriter.h>
33 mpEditTextObject(
std::move(pEditTextObject)),
34 maParagraphDataVector(
std::move(rParagraphDataVector)),
35 mbIsEditDoc(bIsEditDoc)
42 mpEditTextObject(r.mpEditTextObject->
Clone()),
43 maParagraphDataVector(r.maParagraphDataVector),
44 mbIsEditDoc(r.mbIsEditDoc)
65 std::unique_ptr<EditTextObject> xTextObj,
ParagraphDataVector&& rParagraphDataVector,
bool bIsEditDoc ) :
81 mpImpl(std::move(r.mpImpl))
97 mpImpl = std::move(r.mpImpl);
119 return mpImpl->mpEditTextObject->GetUserType();
126 const ::o3tl::cow_wrapper< OutlinerParaObjData >* pImpl = &
mpImpl;
127 if ( ( *pImpl )->mpEditTextObject->GetUserType() != nNew )
129 mpImpl->mpEditTextObject->SetUserType(nNew);
135 return mpImpl->mpEditTextObject->IsEffectivelyVertical();
140 return mpImpl->mpEditTextObject->GetVertical();
145 return mpImpl->mpEditTextObject->IsTopToBottom();
150 const ::o3tl::cow_wrapper< OutlinerParaObjData >* pImpl = &
mpImpl;
151 if ( ( *pImpl )->mpEditTextObject->IsEffectivelyVertical() != bNew)
153 mpImpl->mpEditTextObject->SetVertical(bNew);
158 mpImpl->mpEditTextObject->SetRotation(nRotation);
163 return mpImpl->mpEditTextObject->GetRotation();
168 size_t nSize =
mpImpl->maParagraphDataVector.size();
171 SAL_WARN(
"editeng",
"OutlinerParaObject::Count - overflow " << nSize);
174 return static_cast<sal_Int32
>(nSize);
181 return mpImpl->maParagraphDataVector[nPara].getDepth();
191 return *
mpImpl->mpEditTextObject;
202 OSL_FAIL(
"OutlinerParaObject::GetParagraphData: Access out of range (!)");
204 return aEmptyParagraphData;
210 mpImpl->mpEditTextObject->ClearPortionInfo();
216 return mpImpl->mpEditTextObject->ChangeStyleSheets(rOldName, eOldFamily, rNewName, eNewFamily);
220 std::u16string_view rOldName,
const OUString& rNewName)
222 mpImpl->mpEditTextObject->ChangeStyleSheetName(eFamily, rOldName, rNewName);
232 sal_Int32 nDecrementer(
nCount);
234 while(nDecrementer > 0)
236 if(
GetDepth(--nDecrementer) == nLevel)
238 mpImpl->mpEditTextObject->SetStyleSheet(nDecrementer, rNewName, rNewFamily);
246 (void)xmlTextWriterStartElement(pWriter, BAD_CAST(
"OutlinerParaObject"));
247 (void)xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST(
"ptr"),
"%p",
this);
248 mpImpl->mpEditTextObject->dumpAsXml(pWriter);
251 (void)xmlTextWriterEndElement(pWriter);
bool isWrongListEqual(const OutlinerParaObject &rCompare) const
const ParagraphData & GetParagraphData(sal_Int32 nIndex) const
void SetOutlinerMode(OutlinerMode nNew)
void dumpAsXml(xmlTextWriterPtr pWriter) const
const EditTextObject & GetTextObject() const
bool ChangeStyleSheets(std::u16string_view rOldName, SfxStyleFamily eOldFamily, const OUString &rNewName, SfxStyleFamily eNewFamily)
bool operator==(const OutlinerParaObject &rCandidate) const
void SetVertical(bool bNew)
OutlinerParaObject & operator=(const OutlinerParaObject &rCandidate)
void ChangeStyleSheetName(SfxStyleFamily eFamily, std::u16string_view rOldName, const OUString &rNewName)
bool IsTopToBottom() const
sal_Int16 GetDepth(sal_Int32 nPara) const
bool IsEffectivelyVertical() const
void SetStyleSheets(sal_uInt16 nLevel, const OUString &rNewName, const SfxStyleFamily &rNewFamily)
OutlinerMode GetOutlinerMode() const
::o3tl::cow_wrapper< OutlinerParaObjData > mpImpl
TextRotation GetRotation() const
void SetRotation(TextRotation nRotation)
OutlinerParaObject(std::nullopt_t) noexcept
void dumpAsXml(xmlTextWriterPtr pWriter) const
bool same_object(const cow_wrapper &rOther) const
#define EE_PARA_MAX_COUNT
struct _xmlTextWriter * xmlTextWriterPtr
#define SAL_WARN(area, stream)
constexpr std::enable_if_t< std::is_signed_v< T >, std::make_unsigned_t< T > > make_unsigned(T value)
css::uno::Reference< css::animations::XAnimationNode > Clone(const css::uno::Reference< css::animations::XAnimationNode > &xSourceNode, const SdPage *pSource=nullptr, const SdPage *pTarget=nullptr)
::std::vector< ParagraphData > ParagraphDataVector
This is the guts of OutlinerParaObject, refcounted and shared among multiple instances of OutlinerPar...
bool operator==(const OutlinerParaObjData &rCandidate) const
bool isWrongListEqual(const OutlinerParaObjData &rCompare) const
ParagraphDataVector maParagraphDataVector
std::unique_ptr< EditTextObject > mpEditTextObject
OutlinerParaObjData(std::unique_ptr< EditTextObject > pEditTextObject, ParagraphDataVector &&rParagraphDataVector, bool bIsEditDoc)