Coverage Report

Created: 2026-07-10 11:04

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libreoffice/sw/source/uibase/docvw/romenu.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 <editeng/brushitem.hxx>
23
#include <toolkit/awt/vclxmenu.hxx>
24
#include <vcl/builder.hxx>
25
#include <vcl/graph.hxx>
26
#include <vcl/menu.hxx>
27
28
class SwView;
29
class SfxDispatcher;
30
31
class SwReadOnlyPopup
32
{
33
    VclBuilder m_aBuilder;
34
    ScopedVclPtr<PopupMenu> m_xMenu;
35
    sal_uInt16 m_nReadonlyOpenurl;
36
    sal_uInt16 m_nReadonlyOpendoc;
37
    sal_uInt16 m_nReadonlyEditdoc;
38
    sal_uInt16 m_nReadonlySelectionMode;
39
    sal_uInt16 m_nReadonlyReload;
40
    sal_uInt16 m_nReadonlyReloadFrame;
41
    sal_uInt16 m_nReadonlySourceview;
42
    sal_uInt16 m_nReadonlyBrowseBackward;
43
    sal_uInt16 m_nReadonlyBrowseForward;
44
    sal_uInt16 m_nReadonlySaveGraphic;
45
    sal_uInt16 m_nReadonlyGraphictogallery;
46
    sal_uInt16 m_nReadonlyTogallerylink;
47
    sal_uInt16 m_nReadonlyTogallerycopy;
48
    sal_uInt16 m_nReadonlySaveBackground;
49
    sal_uInt16 m_nReadonlyBackgroundtogallery;
50
    sal_uInt16 m_nReadonlyBackgroundTogallerylink;
51
    sal_uInt16 m_nReadonlyBackgroundTogallerycopy;
52
    sal_uInt16 m_nReadonlyCopylink;
53
    sal_uInt16 m_nReadonlyLoadGraphic;
54
    sal_uInt16 m_nReadonlyGraphicoff;
55
    sal_uInt16 m_nReadonlyFullscreen;
56
    sal_uInt16 m_nReadonlyCopyField;
57
    sal_uInt16 m_nReadonlyCopy;
58
59
    SwView &    m_rView;
60
    std::unique_ptr<SvxBrushItem> m_xBrushItem;
61
                Graphic m_aGraphic;
62
    OUString    m_sURL,
63
                m_sTargetFrameName;
64
    OUString    m_sGrfName;
65
    std::vector<OUString> m_aThemeList;
66
    bool        m_bGrfToGalleryAsLnk;
67
68
    void Check( sal_uInt16 nMID, sal_uInt16 nSID, SfxDispatcher const &rDis );
69
    OUString SaveGraphic( sal_uInt16 nId );
70
71
public:
72
    SwReadOnlyPopup(const Point &rDPos, SwView &rV);
73
0
    rtl::Reference<VCLXPopupMenu> CreateMenuInterface() { return new VCLXPopupMenu(m_xMenu); }
74
    ~SwReadOnlyPopup();
75
76
    void Execute(vcl::Window& rWin, const Point& rPPos);
77
    void Execute(vcl::Window& rWin, sal_uInt16 nId);
78
};
79
80
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */