Coverage Report

Created: 2026-02-14 09:37

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libreoffice/sc/inc/inputopt.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
20
#pragma once
21
22
#include <unotools/configitem.hxx>
23
24
class ScInputOptions
25
{
26
private:
27
    sal_uInt16  nMoveDir;           // enum ScDirection
28
    bool        bMoveSelection;
29
    bool        bMoveKeepEdit;
30
    bool        bEnterEdit;
31
    bool        bExtendFormat;
32
    bool        bRangeFinder;
33
    bool        bExpandRefs;
34
    bool        mbSortRefUpdate;
35
    bool        bMarkHeader;
36
    bool        bUseTabCol;
37
    bool        bTextWysiwyg;
38
    bool        bReplCellsWarn;
39
    bool        bLegacyCellSelection;
40
    bool        bEnterPasteMode;
41
    bool        bWarnActiveSheet;
42
43
public:
44
                ScInputOptions();
45
46
0
    void        SetMoveDir(sal_uInt16 nNew)         { nMoveDir = nNew;       }
47
0
    sal_uInt16      GetMoveDir() const              { return nMoveDir;       }
48
0
    void        SetMoveSelection(bool bSet)     { bMoveSelection = bSet; }
49
0
    bool        GetMoveSelection() const        { return bMoveSelection; }
50
0
    void        SetEnterEdit(bool bSet)         { bEnterEdit = bSet;     }
51
0
    bool        GetEnterEdit() const            { return bEnterEdit;     }
52
0
    void        SetMoveKeepEdit(bool bSet)      { bMoveKeepEdit = bSet;  }
53
0
    bool        GetMoveKeepEdit() const         { return bMoveKeepEdit;  }
54
0
    void        SetExtendFormat(bool bSet)      { bExtendFormat = bSet;  }
55
0
    bool        GetExtendFormat() const         { return bExtendFormat;  }
56
0
    void        SetRangeFinder(bool bSet)       { bRangeFinder = bSet;   }
57
0
    bool        GetRangeFinder() const          { return bRangeFinder;   }
58
0
    void        SetExpandRefs(bool bSet)        { bExpandRefs = bSet;    }
59
2.68k
    bool        GetExpandRefs() const           { return bExpandRefs;    }
60
0
    void        SetSortRefUpdate(bool bSet)     { mbSortRefUpdate = bSet; }
61
0
    bool        GetSortRefUpdate() const        { return mbSortRefUpdate; }
62
0
    void        SetMarkHeader(bool bSet)        { bMarkHeader = bSet;    }
63
0
    bool        GetMarkHeader() const           { return bMarkHeader;    }
64
0
    void        SetUseTabCol(bool bSet)         { bUseTabCol = bSet;     }
65
0
    bool        GetUseTabCol() const            { return bUseTabCol;     }
66
0
    void        SetTextWysiwyg(bool bSet)       { bTextWysiwyg = bSet;   }
67
199k
    bool        GetTextWysiwyg() const          { return bTextWysiwyg;   }
68
0
    void        SetReplaceCellsWarn(bool bSet)  { bReplCellsWarn = bSet; }
69
0
    bool        GetReplaceCellsWarn() const     { return bReplCellsWarn; }
70
0
    void        SetLegacyCellSelection(bool bSet)   { bLegacyCellSelection = bSet; }
71
0
    bool        GetLegacyCellSelection() const      { return bLegacyCellSelection; }
72
0
    void        SetEnterPasteMode(bool bSet)    { bEnterPasteMode = bSet; }
73
0
    bool        GetEnterPasteMode() const       { return bEnterPasteMode; }
74
0
    void        SetWarnActiveSheet(bool bSet)    { bWarnActiveSheet = bSet; }
75
0
    bool        GetWarnActiveSheet() const       { return bWarnActiveSheet; }
76
};
77
78
// CfgItem for input options
79
80
class ScInputCfg final : private ScInputOptions,
81
                  public utl::ConfigItem
82
{
83
    static css::uno::Sequence<OUString> GetPropertyNames();
84
    void ReadCfg();
85
    virtual void    ImplCommit() override;
86
87
public:
88
            ScInputCfg();
89
90
202k
    const ScInputOptions& GetOptions() const { return *this; }
91
    void            SetOptions( const ScInputOptions& rNew );
92
93
    virtual void    Notify( const css::uno::Sequence<OUString>& aPropertyNames ) override;
94
};
95
96
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */