LibreOffice Module editeng (master) 1
eertfpar.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#pragma once
20
21#include <editeng/svxrtf.hxx>
22
23#include <editdoc.hxx>
24
25class EditEngine;
26
27class EditRTFParser final : public SvxRTFParser
28{
29private:
33
34 sal_uInt16 nDefFont;
36
37 virtual void InsertPara() override;
38 virtual void InsertText() override;
39 virtual void MovePos( bool bForward = true ) override;
40 virtual void SetEndPrevPara( std::optional<EditNodeIdx>& rpNodePos,
41 sal_Int32& rCntPos ) override;
42
43 virtual void UnknownAttrToken( int nToken ) override;
44 virtual void NextToken( int nToken ) override;
45 virtual void SetAttrInDoc( SvxRTFItemStackType &rSet ) override;
46 virtual bool IsEndPara( EditNodeIdx* pNd, sal_Int32 nCnt ) const override;
47 virtual void CalcValue() override;
48 void CreateStyleSheets();
50 SvxRTFStyleType* FindStyleSheet( std::u16string_view rName );
51 void AddRTFDefaultValues( const EditPaM& rStart, const EditPaM& rEnd );
52 void ReadField();
53 void SkipGroup();
54
55public:
56 EditRTFParser(SvStream& rIn, EditSelection aCurSel, SfxItemPool& rAttrPool, EditEngine* pEditEngine);
57 virtual ~EditRTFParser() override;
58
59 virtual SvParserState CallParser() override;
60
61 EditPaM const & GetCurPaM() const { return aCurSel.Max(); }
62};
63
65
66/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void InsertPara() override
Definition: eertfpar.cxx:254
void ReadField()
Definition: eertfpar.cxx:513
EditSelection aCurSel
Definition: eertfpar.hxx:30
virtual ~EditRTFParser() override
Definition: eertfpar.cxx:78
bool bLastActionInsertParaBreak
Definition: eertfpar.hxx:35
virtual void SetEndPrevPara(std::optional< EditNodeIdx > &rpNodePos, sal_Int32 &rCntPos) override
Definition: eertfpar.cxx:275
void SkipGroup()
Definition: eertfpar.cxx:582
virtual void UnknownAttrToken(int nToken) override
Definition: eertfpar.cxx:229
EditRTFParser(SvStream &rIn, EditSelection aCurSel, SfxItemPool &rAttrPool, EditEngine *pEditEngine)
Definition: eertfpar.cxx:61
virtual bool IsEndPara(EditNodeIdx *pNd, sal_Int32 nCnt) const override
Definition: eertfpar.cxx:293
virtual void NextToken(int nToken) override
Definition: eertfpar.cxx:173
virtual void SetAttrInDoc(SvxRTFItemStackType &rSet) override
Definition: eertfpar.cxx:298
SvxRTFStyleType * FindStyleSheet(std::u16string_view rName)
Definition: eertfpar.cxx:439
EditPaM const & GetCurPaM() const
Definition: eertfpar.hxx:61
void CreateStyleSheets()
Definition: eertfpar.cxx:493
virtual void InsertText() override
Definition: eertfpar.cxx:242
EditEngine * mpEditEngine
Definition: eertfpar.hxx:31
virtual void CalcValue() override
Definition: eertfpar.cxx:506
virtual SvParserState CallParser() override
Definition: eertfpar.cxx:82
MapMode aEditMapMode
Definition: eertfpar.hxx:32
sal_uInt16 nDefFont
Definition: eertfpar.hxx:34
virtual void MovePos(bool bForward=true) override
Definition: eertfpar.cxx:265
SfxStyleSheet * CreateStyleSheet(SvxRTFStyleType const *pRTFStyle)
Definition: eertfpar.cxx:450
void AddRTFDefaultValues(const EditPaM &rStart, const EditPaM &rEnd)
Definition: eertfpar.cxx:148
EditPaM & Max()
Definition: editdoc.hxx:706
tools::SvRef< EditRTFParser > EditRTFParserRef
Definition: eertfpar.hxx:64
SvParserState