1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_EDITENG_OUTLOBJ_HXX
21 #define INCLUDED_EDITENG_OUTLOBJ_HXX
23 #include <editeng/paragraphdata.hxx>
24 #include <editeng/editengdllapi.h>
25 #include <rtl/ustring.hxx>
26 #include <svl/poolitem.hxx>
27 #include <svl/style.hxx>
28 #include <o3tl/cow_wrapper.hxx>
32 enum class OutlinerMode
;
33 enum class TextRotation
;
36 * This is the guts of OutlinerParaObject, refcounted and shared among
37 * multiple instances of OutlinerParaObject.
39 struct OutlinerParaObjData
42 std::unique_ptr
<EditTextObject
> mpEditTextObject
;
43 ParagraphDataVector maParagraphDataVector
;
47 OutlinerParaObjData( std::unique_ptr
<EditTextObject
> pEditTextObject
, const ParagraphDataVector
& rParagraphDataVector
, bool bIsEditDoc
);
49 OutlinerParaObjData( const OutlinerParaObjData
& r
);
51 OutlinerParaObjData( OutlinerParaObjData
&& r
) = default;
53 // assignment operator
54 OutlinerParaObjData
& operator=(const OutlinerParaObjData
& rCandidate
) = delete;
57 ~OutlinerParaObjData();
59 bool operator==(const OutlinerParaObjData
& rCandidate
) const;
62 bool isWrongListEqual(const OutlinerParaObjData
& rCompare
) const;
65 class EDITENG_DLLPUBLIC OutlinerParaObject
67 ::o3tl::cow_wrapper
< OutlinerParaObjData
> mpImpl
;
70 // constructors/destructor
71 OutlinerParaObject(std::unique_ptr
<EditTextObject
>, const ParagraphDataVector
&, bool bIsEditDoc
);
72 OutlinerParaObject( std::unique_ptr
<EditTextObject
> );
73 OutlinerParaObject( const OutlinerParaObject
&);
74 ~OutlinerParaObject();
76 // assignment operator
77 OutlinerParaObject
& operator=(const OutlinerParaObject
& rCandidate
);
80 bool operator==(const OutlinerParaObject
& rCandidate
) const;
83 bool isWrongListEqual(const OutlinerParaObject
& rCompare
) const;
85 // outliner mode access
86 OutlinerMode
GetOutlinerMode() const;
87 void SetOutlinerMode(OutlinerMode nNew
);
90 bool IsVertical() const;
91 bool GetDirectVertical() const;
92 bool IsTopToBottom() const;
93 void SetVertical(bool bNew
);
94 void SetRotation(TextRotation nRotation
);
95 TextRotation
GetRotation() const;
98 sal_Int32
Count() const;
99 sal_Int16
GetDepth(sal_Int32 nPara
) const;
100 const EditTextObject
& GetTextObject() const;
101 const ParagraphData
& GetParagraphData(sal_Int32 nIndex
) const;
103 // portion info support
104 void ClearPortionInfo();
106 // StyleSheet support
107 bool ChangeStyleSheets(const OUString
& rOldName
, SfxStyleFamily eOldFamily
,
108 const OUString
& rNewName
, SfxStyleFamily eNewFamily
);
109 void ChangeStyleSheetName(SfxStyleFamily eFamily
, const OUString
& rOldName
,
110 const OUString
& rNewName
);
111 void SetStyleSheets(sal_uInt16 nLevel
, const OUString
& rNewName
,
112 const SfxStyleFamily
& rNewFamily
);
114 void dumpAsXml(xmlTextWriterPtr pWriter
) const;
119 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */