1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
22 #include <sfx2/tabdlg.hxx>
23 #include <svx/optgrid.hxx>
26 * Option-Tab-Page: Snap
28 class SdTpOptionsSnap final
: public SvxGridTabPage
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
;
35 virtual bool FillItemSet( SfxItemSet
* ) override
;
36 virtual void Reset( const SfxItemSet
* ) override
;
40 * Option-Tab-Page: Contents
42 class SdTpOptionsContents final
: public SfxTabPage
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
;
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
;
55 virtual bool FillItemSet( SfxItemSet
* ) override
;
56 virtual void Reset( const SfxItemSet
* ) override
;
60 * Option-Tab-Page: View
63 class SdTpOptionsMisc final
: public SfxTabPage
65 friend class SdModule
;
75 std::unique_ptr
<weld::CheckButton
> m_xCbxQuickEdit
;
76 std::unique_ptr
<weld::CheckButton
> m_xCbxPickThrough
;
78 std::unique_ptr
<weld::Frame
> m_xNewDocumentFrame
;
79 std::unique_ptr
<weld::CheckButton
> m_xCbxStartWithTemplate
;
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
;
86 std::unique_ptr
<weld::ComboBox
> m_xLbMetric
;
87 std::unique_ptr
<weld::MetricSpinButton
> m_xMtrFldTabstop
;
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
;
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
;
108 static OUString
GetScale( sal_Int32 nX
, sal_Int32 nY
);
109 static bool SetScale( std::u16string_view aScale
, sal_Int32
& rX
, sal_Int32
& rY
);
111 DECL_LINK( SelectMetricHdl_Impl
, weld::ComboBox
&, void );
113 /** Enable or disable the controls in the compatibility section of the
114 'general' tab page depending on whether there is at least one
117 void UpdateCompatibilityControls();
119 virtual void ActivatePage( const SfxItemSet
& rSet
) override
;
120 virtual DeactivateRC
DeactivatePage( SfxItemSet
* pSet
) override
;
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
;
127 virtual bool FillItemSet( SfxItemSet
* ) override
;
128 virtual void Reset( const SfxItemSet
* ) override
;
130 /** Hide Impress specific controls, make Draw specific controls visible
131 and arrange the visible controls. Do not call this method or the
132 <member>SetImpressMode()</member> method more than once.
136 /** Hide Draw specific controls, make Impress specific controls visible
137 and arrange the visible controls. Do not call this method or the
138 <member>SetDrawMode()</member> method more than once.
140 void SetImpressMode();
141 virtual void PageCreated(const SfxAllItemSet
& aSet
) override
;
144 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */