LibreOffice Module sd (master) 1
tpoption.hxx
Go to the documentation of this file.
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 <sfx2/tabdlg.hxx>
23#include <svx/optgrid.hxx>
24
28class SdTpOptionsSnap final : public SvxGridTabPage
29{
30public:
31 SdTpOptionsSnap(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs);
32 static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* );
33 virtual ~SdTpOptionsSnap() override;
34
35 virtual bool FillItemSet( SfxItemSet* ) override;
36 virtual void Reset( const SfxItemSet * ) override;
37};
38
42class SdTpOptionsContents final : public SfxTabPage
43{
44private:
45 std::unique_ptr<weld::CheckButton> m_xCbxRuler;
46 std::unique_ptr<weld::CheckButton> m_xCbxDragStripes;
47 std::unique_ptr<weld::CheckButton> m_xCbxHandlesBezier;
48 std::unique_ptr<weld::CheckButton> m_xCbxMoveOutline;
49
50public:
51 SdTpOptionsContents(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs);
52 static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* );
53 virtual ~SdTpOptionsContents() override;
54
55 virtual bool FillItemSet( SfxItemSet* ) override;
56 virtual void Reset( const SfxItemSet * ) override;
57};
58
63class SdTpOptionsMisc final : public SfxTabPage
64{
65 friend class SdModule;
66
67private:
68 sal_uInt32 nWidth;
69 sal_uInt32 nHeight;
70 OUString aInfo1;
71 OUString aInfo2;
72
74
75 std::unique_ptr<weld::CheckButton> m_xCbxQuickEdit;
76 std::unique_ptr<weld::CheckButton> m_xCbxPickThrough;
77
78 std::unique_ptr<weld::Frame> m_xNewDocumentFrame;
79 std::unique_ptr<weld::CheckButton> m_xCbxStartWithTemplate;
80
81 std::unique_ptr<weld::CheckButton> m_xCbxMasterPageCache;
82 std::unique_ptr<weld::CheckButton> m_xCbxCopy;
83 std::unique_ptr<weld::CheckButton> m_xCbxMarkedHitMovesAlways;
84 std::unique_ptr<weld::Frame> m_xPresentationFrame;
85
86 std::unique_ptr<weld::ComboBox> m_xLbMetric;
87 std::unique_ptr<weld::MetricSpinButton> m_xMtrFldTabstop;
88
89 std::unique_ptr<weld::CheckButton> m_xCbxEnableSdremote;
90 std::unique_ptr<weld::CheckButton> m_xCbxEnablePresenterScreen;
91 std::unique_ptr<weld::CheckButton> m_xCbxPresenterScreenFullScreen;
92 std::unique_ptr<weld::CheckButton> m_xCbxCompatibility;
93
94 //Scale
95 std::unique_ptr<weld::Frame> m_xScaleFrame;
96 std::unique_ptr<weld::ComboBox> m_xCbScale;
97 std::unique_ptr<weld::Label> m_xNewDocLb;
98 std::unique_ptr<weld::Label> m_xFiInfo1;
99 std::unique_ptr<weld::MetricSpinButton> m_xMtrFldOriginalWidth;
100 std::unique_ptr<weld::Label> m_xWidthLb;
101 std::unique_ptr<weld::Label> m_xHeightLb;
102 std::unique_ptr<weld::Label> m_xFiInfo2;
103 std::unique_ptr<weld::MetricSpinButton> m_xMtrFldOriginalHeight;
104 std::unique_ptr<weld::CheckButton> m_xCbxDistort;
105 std::unique_ptr<weld::MetricSpinButton> m_xMtrFldInfo1;
106 std::unique_ptr<weld::MetricSpinButton> m_xMtrFldInfo2;
107
108 static OUString GetScale( sal_Int32 nX, sal_Int32 nY );
109 static bool SetScale( std::u16string_view aScale, sal_Int32& rX, sal_Int32& rY );
110
111 DECL_LINK( SelectMetricHdl_Impl, weld::ComboBox&, void );
112
118
119 virtual void ActivatePage( const SfxItemSet& rSet ) override;
120 virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
121
122public:
123 SdTpOptionsMisc(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs);
124 static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* );
125 virtual ~SdTpOptionsMisc() override;
126
127 virtual bool FillItemSet( SfxItemSet* ) override;
128 virtual void Reset( const SfxItemSet * ) override;
129
134 void SetDrawMode();
135
140 void SetImpressMode();
141 virtual void PageCreated(const SfxAllItemSet& aSet) override;
142};
143
144/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Option-Tab-Page: Contents.
Definition: tpoption.hxx:43
std::unique_ptr< weld::CheckButton > m_xCbxMoveOutline
Definition: tpoption.hxx:48
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *)
Definition: tpoption.cxx:159
std::unique_ptr< weld::CheckButton > m_xCbxDragStripes
Definition: tpoption.hxx:46
virtual bool FillItemSet(SfxItemSet *) override
Definition: tpoption.cxx:122
std::unique_ptr< weld::CheckButton > m_xCbxRuler
Definition: tpoption.hxx:45
virtual ~SdTpOptionsContents() override
Definition: tpoption.cxx:118
SdTpOptionsContents(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rInAttrs)
Definition: tpoption.cxx:109
std::unique_ptr< weld::CheckButton > m_xCbxHandlesBezier
Definition: tpoption.hxx:47
virtual void Reset(const SfxItemSet *) override
Definition: tpoption.cxx:144
Option-Tab-Page: View.
Definition: tpoption.hxx:64
std::unique_ptr< weld::Label > m_xHeightLb
Definition: tpoption.hxx:101
std::unique_ptr< weld::CheckButton > m_xCbxMarkedHitMovesAlways
Definition: tpoption.hxx:83
virtual ~SdTpOptionsMisc() override
Definition: tpoption.cxx:262
std::unique_ptr< weld::MetricSpinButton > m_xMtrFldInfo2
Definition: tpoption.hxx:106
std::unique_ptr< weld::CheckButton > m_xCbxPickThrough
Definition: tpoption.hxx:76
SdTpOptionsMisc(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rInAttrs)
Definition: tpoption.cxx:173
virtual void ActivatePage(const SfxItemSet &rSet) override
Definition: tpoption.cxx:266
MapUnit ePoolUnit
Definition: tpoption.hxx:73
std::unique_ptr< weld::CheckButton > m_xCbxEnablePresenterScreen
Definition: tpoption.hxx:90
std::unique_ptr< weld::ComboBox > m_xLbMetric
Definition: tpoption.hxx:86
std::unique_ptr< weld::MetricSpinButton > m_xMtrFldTabstop
Definition: tpoption.hxx:87
std::unique_ptr< weld::CheckButton > m_xCbxCopy
Definition: tpoption.hxx:82
std::unique_ptr< weld::CheckButton > m_xCbxMasterPageCache
Definition: tpoption.hxx:81
std::unique_ptr< weld::CheckButton > m_xCbxQuickEdit
Definition: tpoption.hxx:75
sal_uInt32 nHeight
Definition: tpoption.hxx:69
std::unique_ptr< weld::CheckButton > m_xCbxEnableSdremote
Definition: tpoption.hxx:89
std::unique_ptr< weld::Label > m_xWidthLb
Definition: tpoption.hxx:100
virtual bool FillItemSet(SfxItemSet *) override
Definition: tpoption.cxx:329
std::unique_ptr< weld::Label > m_xFiInfo2
Definition: tpoption.hxx:102
void SetImpressMode()
Hide Draw specific controls, make Impress specific controls visible and arrange the visible controls.
Definition: tpoption.cxx:487
std::unique_ptr< weld::Label > m_xNewDocLb
Definition: tpoption.hxx:97
std::unique_ptr< weld::CheckButton > m_xCbxCompatibility
Definition: tpoption.hxx:92
std::unique_ptr< weld::CheckButton > m_xCbxPresenterScreenFullScreen
Definition: tpoption.hxx:91
std::unique_ptr< weld::Frame > m_xScaleFrame
Definition: tpoption.hxx:95
std::unique_ptr< weld::CheckButton > m_xCbxDistort
Definition: tpoption.hxx:104
std::unique_ptr< weld::MetricSpinButton > m_xMtrFldOriginalHeight
Definition: tpoption.hxx:103
std::unique_ptr< weld::Frame > m_xPresentationFrame
Definition: tpoption.hxx:84
void SetDrawMode()
Hide Impress specific controls, make Draw specific controls visible and arrange the visible controls.
Definition: tpoption.cxx:496
std::unique_ptr< weld::MetricSpinButton > m_xMtrFldOriginalWidth
Definition: tpoption.hxx:99
OUString aInfo1
Definition: tpoption.hxx:70
virtual void PageCreated(const SfxAllItemSet &aSet) override
Definition: tpoption.cxx:600
static bool SetScale(std::u16string_view aScale, sal_Int32 &rX, sal_Int32 &rY)
Definition: tpoption.cxx:524
sal_uInt32 nWidth
Definition: tpoption.hxx:68
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *)
Definition: tpoption.cxx:468
DECL_LINK(SelectMetricHdl_Impl, weld::ComboBox &, void)
std::unique_ptr< weld::Frame > m_xNewDocumentFrame
Definition: tpoption.hxx:78
std::unique_ptr< weld::MetricSpinButton > m_xMtrFldInfo1
Definition: tpoption.hxx:105
std::unique_ptr< weld::Label > m_xFiInfo1
Definition: tpoption.hxx:98
std::unique_ptr< weld::CheckButton > m_xCbxStartWithTemplate
Definition: tpoption.hxx:79
virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override
Definition: tpoption.cxx:306
void UpdateCompatibilityControls()
Enable or disable the controls in the compatibility section of the 'general' tab page depending on wh...
Definition: tpoption.cxx:553
virtual void Reset(const SfxItemSet *) override
Definition: tpoption.cxx:393
std::unique_ptr< weld::ComboBox > m_xCbScale
Definition: tpoption.hxx:96
OUString aInfo2
Definition: tpoption.hxx:71
static OUString GetScale(sal_Int32 nX, sal_Int32 nY)
Definition: tpoption.cxx:519
Option-Tab-Page: Snap.
Definition: tpoption.hxx:29
virtual void Reset(const SfxItemSet *) override
Definition: tpoption.cxx:78
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *)
Definition: tpoption.cxx:98
virtual bool FillItemSet(SfxItemSet *) override
Definition: tpoption.cxx:55
virtual ~SdTpOptionsSnap() override
Definition: tpoption.cxx:51
SdTpOptionsSnap(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rInAttrs)
Definition: tpoption.cxx:45
MapUnit
DeactivateRC