Coverage Report

Created: 2026-11-06 11:29

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libreoffice/editeng/source/editeng/eertfpar.hxx
Line
Count
Source
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
#include <vcl/mapmod.hxx>
23
24
#include <EditSelection.hxx>
25
26
class EditEngine;
27
28
class EditRTFParser final : public SvxRTFParser
29
{
30
private:
31
    EditSelection       aCurSel;
32
    EditEngine*         mpEditEngine;
33
    MapMode             aEditMapMode;
34
35
    sal_uInt16          nDefFont;
36
    bool                bLastActionInsertParaBreak;
37
38
    virtual void        InsertPara() override;
39
    virtual void        InsertText() override;
40
    virtual void        MovePos( bool bForward = true ) override;
41
    virtual void        SetEndPrevPara( std::optional<EditNodeIdx>& rpNodePos,
42
                                        sal_Int32& rCntPos ) override;
43
44
    virtual void        UnknownAttrToken( int nToken ) override;
45
    virtual void        NextToken( int nToken ) override;
46
    virtual void        SetAttrInDoc( SvxRTFItemStackType &rSet ) override;
47
    virtual bool        IsEndPara( EditNodeIdx* pNd, sal_Int32 nCnt ) const override;
48
    virtual void        CalcValue() override;
49
    void                CreateStyleSheets();
50
    SfxStyleSheet*      CreateStyleSheet( SvxRTFStyleType const * pRTFStyle );
51
    SvxRTFStyleType*    FindStyleSheet( std::u16string_view rName );
52
    void                AddRTFDefaultValues( const EditPaM& rStart, const EditPaM& rEnd );
53
    void                ReadField();
54
    void                SkipGroup();
55
56
public:
57
    EditRTFParser(SvStream& rIn, EditSelection aCurSel, SfxItemPool& rAttrPool, EditEngine* pEditEngine);
58
    virtual ~EditRTFParser() override;
59
60
    virtual SvParserState   CallParser() override;
61
62
1.24k
    EditPaM const &         GetCurPaM() const                   { return aCurSel.Max(); }
63
};
64
65
typedef tools::SvRef<EditRTFParser> EditRTFParserRef;
66
67
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */