Coverage Report

Created: 2026-06-30 11:14

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libreoffice/sd/source/ui/dlg/PaneChildWindows.cxx
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
#include <PaneChildWindows.hxx>
21
#include <titledockwin.hxx>
22
#include <ViewShellBase.hxx>
23
#include <framework/FrameworkHelper.hxx>
24
#include <app.hrc>
25
#include <strings.hrc>
26
#include <sdresid.hxx>
27
28
#include <sfx2/bindings.hxx>
29
#include <sfx2/chalign.hxx>
30
#include <sfx2/dispatch.hxx>
31
32
namespace sd {
33
34
35
SFX_IMPL_DOCKINGWINDOW_WITHID(LeftPaneImpressChildWindow, SID_LEFT_PANE_IMPRESS)
36
SFX_IMPL_DOCKINGWINDOW_WITHID(BottomPaneImpressChildWindow, SID_BOTTOM_PANE_IMPRESS)
37
SFX_IMPL_DOCKINGWINDOW_WITHID(LeftPaneDrawChildWindow, SID_LEFT_PANE_DRAW)
38
39
//===== PaneChildWindow =======================================================
40
PaneChildWindow::PaneChildWindow (
41
    vcl::Window* pParentWindow,
42
    sal_uInt16 nId,
43
    SfxBindings* pBindings,
44
    SfxChildWinInfo* pInfo,
45
    TranslateId pTitleBarResId,
46
    SfxChildAlignment eAlignment)
47
0
    : SfxChildWindow (pParentWindow, nId)
48
0
{
49
0
    SetWindow( VclPtr<TitledDockingWindow>::Create(
50
0
        pBindings,
51
0
        this,
52
0
        pParentWindow,
53
0
        SdResId(pTitleBarResId)));
54
0
    SetAlignment(eAlignment);
55
0
    SfxDockingWindow* pDockingWindow = static_cast<SfxDockingWindow*>(GetWindow());
56
0
    pDockingWindow->EnableInput();
57
0
    pDockingWindow->Initialize(pInfo);
58
0
    SetHideNotDelete(true);
59
60
0
    ViewShellBase* pBase = ViewShellBase::GetViewShellBase(pBindings->GetDispatcher()->GetFrame());
61
0
    if (pBase != nullptr)
62
0
    {
63
0
        framework::FrameworkHelper::Instance(*pBase)->UpdateConfiguration();
64
0
    }
65
0
}
66
67
PaneChildWindow::~PaneChildWindow()
68
0
{
69
0
    ViewShellBase* pBase = nullptr;
70
0
    TitledDockingWindow* pDockingWindow = dynamic_cast<TitledDockingWindow*>(GetWindow());
71
0
    if (pDockingWindow != nullptr)
72
0
        pBase = ViewShellBase::GetViewShellBase(
73
0
            pDockingWindow->GetBindings().GetDispatcher()->GetFrame());
74
0
    if (pBase != nullptr)
75
0
        framework::FrameworkHelper::Instance(*pBase)->UpdateConfiguration();
76
0
}
77
78
//===== LeftPaneImpressChildWindow ============================================
79
LeftPaneImpressChildWindow::LeftPaneImpressChildWindow (
80
    vcl::Window* pParentWindow,
81
    sal_uInt16 nId,
82
    SfxBindings* pBindings,
83
    SfxChildWinInfo* pInfo)
84
0
    : PaneChildWindow(
85
0
        pParentWindow,
86
0
        nId,
87
0
        pBindings,
88
0
        pInfo,
89
0
        STR_LEFT_PANE_IMPRESS_TITLE,
90
0
        SfxChildAlignment::LEFT)
91
0
{
92
0
}
93
94
//===== BottomPaneImpressChildWindow ============================================
95
BottomPaneImpressChildWindow::BottomPaneImpressChildWindow (
96
    vcl::Window* pParentWindow,
97
    sal_uInt16 nId,
98
    SfxBindings* pBindings,
99
    SfxChildWinInfo* pInfo)
100
0
    : PaneChildWindow(
101
0
        pParentWindow,
102
0
        nId,
103
0
        pBindings,
104
0
        pInfo,
105
0
        STR_NOTES_MODE, // TODO this isn't a specific translatable string for this view.
106
0
        SfxChildAlignment::BOTTOM)
107
0
{
108
0
}
109
110
//===== LeftPaneDrawChildWindow ===============================================
111
LeftPaneDrawChildWindow::LeftPaneDrawChildWindow (
112
    vcl::Window* pParentWindow,
113
    sal_uInt16 nId,
114
    SfxBindings* pBindings,
115
    SfxChildWinInfo* pInfo)
116
0
    : PaneChildWindow(
117
0
        pParentWindow,
118
0
        nId,
119
0
        pBindings,
120
0
        pInfo,
121
0
        STR_LEFT_PANE_DRAW_TITLE,
122
0
        SfxChildAlignment::LEFT)
123
0
{
124
0
}
125
126
} // end of namespace ::sd
127
128
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */