Coverage Report

Created: 2026-05-16 09:25

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libreoffice/sd/source/ui/animations/CustomAnimationDialog.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 <vcl/weld/Builder.hxx>
23
#include <vcl/weld/DialogController.hxx>
24
#include <vcl/weld/Notebook.hxx>
25
#include <vcl/weld/weld.hxx>
26
27
namespace sd {
28
29
// property handles
30
const sal_Int32 nHandleSound = 0;
31
const sal_Int32 nHandleHasAfterEffect = 1;
32
const sal_Int32 nHandleIterateType = 2;
33
const sal_Int32 nHandleIterateInterval = 3;
34
const sal_Int32 nHandleStart = 4;
35
const sal_Int32 nHandleBegin = 5;
36
const sal_Int32 nHandleDuration = 6;
37
const sal_Int32 nHandleRepeat = 7;
38
const sal_Int32 nHandleRewind = 8;
39
const sal_Int32 nHandleEnd = 9;
40
const sal_Int32 nHandleAfterEffectOnNextEffect = 10;
41
const sal_Int32 nHandleDimColor = 11;
42
const sal_Int32 nHandleMaxParaDepth = 12;
43
const sal_Int32 nHandlePresetId = 13;
44
const sal_Int32 nHandleProperty1Type = 14;
45
const sal_Int32 nHandleProperty1Value = 15;
46
const sal_Int32 nHandleProperty2Type = 16;
47
const sal_Int32 nHandleProperty2Value = 17;
48
49
const sal_Int32 nHandleAccelerate = 18;
50
const sal_Int32 nHandleDecelerate = 19;
51
const sal_Int32 nHandleAutoReverse = 20;
52
const sal_Int32 nHandleTrigger = 21;
53
54
const sal_Int32 nHandleHasText = 22;
55
const sal_Int32 nHandleTextGrouping = 23;
56
const sal_Int32 nHandleAnimateForm = 24;
57
const sal_Int32 nHandleTextGroupingAuto = 25;
58
const sal_Int32 nHandleTextReverse = 26;
59
60
const sal_Int32 nHandleCurrentPage = 27;
61
const sal_Int32 nHandleSoundURL = 28;
62
const sal_Int32 nHandleSoundVolume = 29;
63
const sal_Int32 nHandleSoundEndAfterSlide = 30;
64
65
const sal_Int32 nHandleCommand = 31;
66
67
const sal_Int32 nHandleHasVisibleShape = 32;
68
69
const sal_Int32 nPropertyTypeNone = 0;
70
const sal_Int32 nPropertyTypeDirection = 1;
71
const sal_Int32 nPropertyTypeSpokes = 2;
72
const sal_Int32 nPropertyTypeFirstColor = 3;
73
const sal_Int32 nPropertyTypeSecondColor = 4;
74
const sal_Int32 nPropertyTypeZoom = 5;
75
const sal_Int32 nPropertyTypeFillColor = 6;
76
const sal_Int32 nPropertyTypeColorStyle = 7;
77
const sal_Int32 nPropertyTypeFont = 8;
78
const sal_Int32 nPropertyTypeCharHeight = 9;
79
const sal_Int32 nPropertyTypeCharColor = 10;
80
const sal_Int32 nPropertyTypeCharHeightStyle = 11;
81
const sal_Int32 nPropertyTypeCharDecoration = 12;
82
const sal_Int32 nPropertyTypeLineColor = 13;
83
const sal_Int32 nPropertyTypeRotate = 14;
84
const sal_Int32 nPropertyTypeColor = 15;
85
const sal_Int32 nPropertyTypeAccelerate = 16;
86
const sal_Int32 nPropertyTypeDecelerate = 17;
87
const sal_Int32 nPropertyTypeAutoReverse = 18;
88
const sal_Int32 nPropertyTypeTransparency = 19;
89
const sal_Int32 nPropertyTypeFontStyle = 20;
90
const sal_Int32 nPropertyTypeScale = 21;
91
92
class SdPropertySubControl
93
{
94
public:
95
    explicit SdPropertySubControl(weld::Container* pParent);
96
    virtual ~SdPropertySubControl();
97
98
    virtual             css::uno::Any getValue() = 0;
99
    virtual             void setValue( const css::uno::Any& rValue, const OUString& rPresetId ) = 0;
100
101
    static std::unique_ptr<SdPropertySubControl>
102
                        create( sal_Int32 nType,
103
                                weld::Label* pLabel,
104
                                weld::Container* pParent,
105
                                weld::Window* pTopLevel,
106
                                const css::uno::Any& rValue,
107
                                const OUString& rPresetId,
108
                                const Link<LinkParamNone*,void>& rModifyHdl );
109
110
protected:
111
    std::unique_ptr<weld::Builder> mxBuilder;
112
    std::unique_ptr<weld::Container> mxContainer;
113
    weld::Container* mpParent;
114
};
115
116
class CustomAnimationDurationTabPage;
117
class CustomAnimationEffectTabPage;
118
class CustomAnimationTextAnimTabPage;
119
class STLPropertySet;
120
121
class CustomAnimationDialog : public weld::GenericDialogController
122
{
123
public:
124
    CustomAnimationDialog(weld::Window* pParent, std::unique_ptr<STLPropertySet> pSet, const OUString& Page);
125
    virtual ~CustomAnimationDialog() override;
126
127
    STLPropertySet* getResultSet();
128
0
    STLPropertySet* getPropertySet() const { return mxSet.get(); }
129
130
    static std::unique_ptr<STLPropertySet> createDefaultSet();
131
132
private:
133
    std::unique_ptr<STLPropertySet> mxSet;
134
    std::unique_ptr<STLPropertySet> mxResultSet;
135
136
    std::unique_ptr<weld::Notebook> mxTabControl;
137
    std::unique_ptr<CustomAnimationDurationTabPage> mxDurationTabPage;
138
    std::unique_ptr<CustomAnimationEffectTabPage> mxEffectTabPage;
139
    std::unique_ptr<CustomAnimationTextAnimTabPage> mxTextAnimTabPage;
140
};
141
142
}
143
144
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */