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/style.hxx>
27 #include <o3tl/cow_wrapper.hxx>
31 enum class OutlinerMode
;
34 * This is the guts of OutlinerParaObject, refcounted and shared among
35 * multiple instances of OutlinerParaObject.
37 struct OutlinerParaObjData
40 std::unique_ptr
<EditTextObject
> mpEditTextObject
;
41 ParagraphDataVector maParagraphDataVector
;
45 OutlinerParaObjData( std::unique_ptr
<EditTextObject
> pEditTextObject
, const ParagraphDataVector
& rParagraphDataVector
, bool bIsEditDoc
);
47 OutlinerParaObjData( const OutlinerParaObjData
& r
);
49 // assignment operator
50 OutlinerParaObjData
& operator=(const OutlinerParaObjData
& rCandidate
) = delete;
53 ~OutlinerParaObjData();
55 bool operator==(const OutlinerParaObjData
& rCandidate
) const;
58 bool isWrongListEqual(const OutlinerParaObjData
& rCompare
) const;
61 class EDITENG_DLLPUBLIC OutlinerParaObject
63 ::o3tl::cow_wrapper
< OutlinerParaObjData
> mpImpl
;
66 // constructors/destructor
67 OutlinerParaObject( const EditTextObject
&, const ParagraphDataVector
&, bool bIsEditDoc
);
68 OutlinerParaObject( const EditTextObject
&);
69 OutlinerParaObject( std::unique_ptr
<EditTextObject
> );
70 OutlinerParaObject( const OutlinerParaObject
&);
71 ~OutlinerParaObject();
73 // assignment operator
74 OutlinerParaObject
& operator=(const OutlinerParaObject
& rCandidate
);
77 bool operator==(const OutlinerParaObject
& rCandidate
) const;
80 bool isWrongListEqual(const OutlinerParaObject
& rCompare
) const;
82 // outliner mode access
83 OutlinerMode
GetOutlinerMode() const;
84 void SetOutlinerMode(OutlinerMode nNew
);
87 bool IsVertical() const;
88 bool IsTopToBottom() const;
89 void SetVertical(bool bNew
, bool bTopToBottom
= true);
92 sal_Int32
Count() const;
93 sal_Int16
GetDepth(sal_Int32 nPara
) const;
94 const EditTextObject
& GetTextObject() const;
95 const ParagraphData
& GetParagraphData(sal_Int32 nIndex
) const;
97 // portion info support
98 void ClearPortionInfo();
100 // StyleSheet support
101 bool ChangeStyleSheets(const OUString
& rOldName
, SfxStyleFamily eOldFamily
,
102 const OUString
& rNewName
, SfxStyleFamily eNewFamily
);
103 void ChangeStyleSheetName(SfxStyleFamily eFamily
, const OUString
& rOldName
,
104 const OUString
& rNewName
);
105 void SetStyleSheets(sal_uInt16 nLevel
, const OUString
& rNewName
,
106 const SfxStyleFamily
& rNewFamily
);
108 void dumpAsXml(xmlTextWriterPtr pWriter
) const;
113 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */