LibreOffice Module editeng (master) 1
editobj.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#ifndef INCLUDED_EDITENG_EDITOBJ_HXX
21#define INCLUDED_EDITENG_EDITOBJ_HXX
22
23#include <svl/style.hxx>
25#include <editeng/macros.hxx>
27
28#include <com/sun/star/text/textfield/Type.hpp>
29
30#include <vector>
31#include <memory>
32
33class SfxItemPool;
34class SfxItemSet;
35class SvxFieldItem;
36class SvxFieldData;
37enum class OutlinerMode;
38struct EECharAttrib;
39typedef struct _xmlTextWriter* xmlTextWriterPtr;
40
41namespace editeng {
42
43class FieldUpdater;
44struct Section;
45
46}
47
48namespace svl {
49
50class SharedString;
51class SharedStringPool;
52
53}
54
56
58{
59public:
60 virtual ~EditTextObject();
61
67 virtual void NormalizeString( svl::SharedStringPool& rPool ) = 0;
68
69 virtual std::vector<svl::SharedString> GetSharedStrings() const = 0;
70
71 virtual const SfxItemPool* GetPool() const = 0;
72 virtual OutlinerMode GetUserType() const = 0; // For OutlinerMode, it can however not save in compatible format
73 virtual void SetUserType( OutlinerMode n ) = 0;
74
75 virtual bool IsEffectivelyVertical() const = 0;
76 virtual bool GetVertical() const = 0;
77 virtual bool IsTopToBottom() const = 0;
78 virtual void SetVertical( bool bVertical ) = 0;
79 virtual void SetRotation( TextRotation nRotation ) = 0;
80 virtual TextRotation GetRotation() const = 0;
81
82 virtual SvtScriptType GetScriptType() const = 0;
83
84 virtual std::unique_ptr<EditTextObject> Clone() const = 0;
85
86 virtual sal_Int32 GetParagraphCount() const = 0;
87
88 virtual OUString GetText(sal_Int32 nPara) const = 0;
89
90 virtual void ClearPortionInfo() = 0;
91
92 virtual bool HasOnlineSpellErrors() const = 0;
93
94 virtual void GetCharAttribs( sal_Int32 nPara, std::vector<EECharAttrib>& rLst ) const = 0;
95
96 virtual bool RemoveCharAttribs( sal_uInt16 nWhich ) = 0;
97
104 virtual void GetAllSections( std::vector<editeng::Section>& rAttrs ) const = 0;
105
106 virtual bool IsFieldObject() const = 0;
107 virtual const SvxFieldItem* GetField() const = 0;
108 virtual const SvxFieldData* GetFieldData(sal_Int32 nPara, size_t nPos, sal_Int32 nType) const = 0;
109 virtual bool HasField( sal_Int32 nType = css::text::textfield::Type::UNSPECIFIED ) const = 0;
110
111 virtual const SfxItemSet& GetParaAttribs(sal_Int32 nPara) const = 0;
112
113 virtual void GetStyleSheet(sal_Int32 nPara, OUString& rName, SfxStyleFamily& eFamily) const = 0;
114 virtual void SetStyleSheet(sal_Int32 nPara, const OUString& rName, const SfxStyleFamily& eFamily) = 0;
115 virtual bool ChangeStyleSheets(
116 std::u16string_view rOldName, SfxStyleFamily eOldFamily, const OUString& rNewName, SfxStyleFamily eNewFamily) = 0;
117 virtual void ChangeStyleSheetName(SfxStyleFamily eFamily, std::u16string_view rOldName, const OUString& rNewName) = 0;
118
120
121 virtual bool operator==( const EditTextObject& rCompare ) const = 0;
122
125 bool Equals( const EditTextObject& rCompare ) const;
126
127 // #i102062#
128 virtual bool isWrongListEqual(const EditTextObject& rCompare) const = 0;
129
130#if DEBUG_EDIT_ENGINE
131 virtual void Dump() const = 0;
132#endif
133 virtual void dumpAsXml(xmlTextWriterPtr pWriter) const = 0;
134};
135
136#endif // INCLUDED_EDITENG_EDITOBJ_HXX
137
138/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual bool GetVertical() const =0
virtual void dumpAsXml(xmlTextWriterPtr pWriter) const =0
virtual const SvxFieldData * GetFieldData(sal_Int32 nPara, size_t nPos, sal_Int32 nType) const =0
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
virtual bool operator==(const EditTextObject &rCompare) const =0
virtual ~EditTextObject()
virtual std::vector< svl::SharedString > GetSharedStrings() const =0
virtual bool IsFieldObject() const =0
virtual void SetStyleSheet(sal_Int32 nPara, const OUString &rName, const SfxStyleFamily &eFamily)=0
virtual OutlinerMode GetUserType() const =0
virtual void SetRotation(TextRotation nRotation)=0
virtual void GetAllSections(std::vector< editeng::Section > &rAttrs) const =0
Get all text sections in this content.
virtual TextRotation GetRotation() const =0
virtual void NormalizeString(svl::SharedStringPool &rPool)=0
Set paragraph strings to the shared string pool.
virtual bool HasField(sal_Int32 nType=css::text::textfield::Type::UNSPECIFIED) const =0
virtual bool isWrongListEqual(const EditTextObject &rCompare) const =0
virtual bool IsEffectivelyVertical() const =0
virtual editeng::FieldUpdater GetFieldUpdater()=0
virtual const SfxItemSet & GetParaAttribs(sal_Int32 nPara) const =0
virtual bool ChangeStyleSheets(std::u16string_view rOldName, SfxStyleFamily eOldFamily, const OUString &rNewName, SfxStyleFamily eNewFamily)=0
virtual bool HasOnlineSpellErrors() const =0
virtual SvtScriptType GetScriptType() const =0
virtual void ChangeStyleSheetName(SfxStyleFamily eFamily, std::u16string_view rOldName, const OUString &rNewName)=0
virtual bool RemoveCharAttribs(sal_uInt16 nWhich)=0
virtual void ClearPortionInfo()=0
virtual void GetCharAttribs(sal_Int32 nPara, std::vector< EECharAttrib > &rLst) const =0
virtual const SfxItemPool * GetPool() const =0
virtual std::unique_ptr< EditTextObject > Clone() const =0
virtual void SetUserType(OutlinerMode n)=0
virtual bool IsTopToBottom() const =0
virtual const SvxFieldItem * GetField() const =0
virtual void SetVertical(bool bVertical)=0
This item stores a field (SvxFieldData).
Definition: flditem.hxx:70
Wrapper for EditTextObject to handle updating of fields without exposing the internals of EditTextObj...
#define EDITENG_DLLPUBLIC
Definition: editengdllapi.h:28
struct _xmlTextWriter * xmlTextWriterPtr
Definition: editobj.hxx:39
TextRotation
Definition: editobj.hxx:55
struct _xmlTextWriter * xmlTextWriterPtr
SvtScriptType
NONE
OutlinerMode
Definition: outliner.hxx:563
SfxStyleFamily