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 <sfx2/basedlgs.hxx>
24 #include <svx/swframetypes.hxx>
26 namespace vcl
{ class Window
; }
30 class SwWrapDlg
: public SfxSingleTabDialogController
33 SwWrapDlg(weld::Window
* pParent
, SfxItemSet
& rSet
, SwWrtShell
* pSh
, bool bDrawMode
);
36 // circulation TabPage
37 class SwWrapTabPage
: public SfxTabPage
39 RndStdIds m_nAnchorId
;
40 sal_uInt16 m_nHtmlMode
;
51 std::unique_ptr
<weld::RadioButton
> m_xNoWrapRB
;
52 std::unique_ptr
<weld::RadioButton
> m_xWrapLeftRB
;
53 std::unique_ptr
<weld::RadioButton
> m_xWrapRightRB
;
54 std::unique_ptr
<weld::RadioButton
> m_xWrapParallelRB
;
55 std::unique_ptr
<weld::RadioButton
> m_xWrapThroughRB
;
56 std::unique_ptr
<weld::RadioButton
> m_xIdealWrapRB
;
59 std::unique_ptr
<weld::MetricSpinButton
> m_xLeftMarginED
;
60 std::unique_ptr
<weld::MetricSpinButton
> m_xRightMarginED
;
61 std::unique_ptr
<weld::MetricSpinButton
> m_xTopMarginED
;
62 std::unique_ptr
<weld::MetricSpinButton
> m_xBottomMarginED
;
65 std::unique_ptr
<weld::CheckButton
> m_xWrapAnchorOnlyCB
;
66 std::unique_ptr
<weld::CheckButton
> m_xWrapTransparentCB
;
67 std::unique_ptr
<weld::CheckButton
> m_xWrapOutlineCB
;
68 std::unique_ptr
<weld::CheckButton
> m_xWrapOutsideCB
;
69 std::unique_ptr
<weld::CheckButton
> m_xAllowOverlapCB
;
72 virtual void ActivatePage(const SfxItemSet
& rSet
) override
;
73 virtual DeactivateRC
DeactivatePage(SfxItemSet
*pSet
) override
;
75 DECL_LINK(RangeModifyHdl
, weld::MetricSpinButton
&, void);
76 DECL_LINK(WrapTypeHdl
, weld::ToggleButton
&, void);
77 DECL_LINK(ContourHdl
, weld::ToggleButton
&, void);
79 static const sal_uInt16 m_aWrapPageRg
[];
82 SwWrapTabPage(weld::Container
* pPage
, weld::DialogController
* pController
, const SfxItemSet
&rSet
);
83 static std::unique_ptr
<SfxTabPage
> Create(weld::Container
* pPage
, weld::DialogController
* pController
, const SfxItemSet
*rSet
);
84 virtual ~SwWrapTabPage() override
;
86 virtual bool FillItemSet(SfxItemSet
*rSet
) override
;
87 virtual void Reset(const SfxItemSet
*rSet
) override
;
89 static const sal_uInt16
* GetRanges() { return m_aWrapPageRg
; }
90 void SetNewFrame(bool bNewFrame
) { m_bNew
= bNewFrame
; }
91 void SetFormatUsed(bool bFormat
, bool bDrawMode
) { m_bFormat
= bFormat
; m_bDrawMode
= bDrawMode
; }
92 void SetShell(SwWrtShell
* pSh
) { m_pWrtSh
= pSh
; }
95 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */