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>
29 class SwWrapDlg final
: public SfxSingleTabDialogController
32 SwWrapDlg(weld::Window
* pParent
, const SfxItemSet
& rSet
, SwWrtShell
* pSh
, bool bDrawMode
);
35 // circulation TabPage
36 class SwWrapTabPage final
: public SfxTabPage
38 RndStdIds m_nAnchorId
;
39 sal_uInt16 m_nHtmlMode
;
50 std::unique_ptr
<weld::Image
> m_xNoWrapImg
;
51 std::unique_ptr
<weld::RadioButton
> m_xNoWrapRB
;
52 std::unique_ptr
<weld::Image
> m_xWrapLeftImg
;
53 std::unique_ptr
<weld::RadioButton
> m_xWrapLeftRB
;
54 std::unique_ptr
<weld::Image
> m_xWrapRightImg
;
55 std::unique_ptr
<weld::RadioButton
> m_xWrapRightRB
;
56 std::unique_ptr
<weld::Image
> m_xWrapParallelImg
;
57 std::unique_ptr
<weld::RadioButton
> m_xWrapParallelRB
;
58 std::unique_ptr
<weld::Image
> m_xWrapThroughImg
;
59 std::unique_ptr
<weld::RadioButton
> m_xWrapThroughRB
;
60 std::unique_ptr
<weld::Image
> m_xIdealWrapImg
;
61 std::unique_ptr
<weld::RadioButton
> m_xIdealWrapRB
;
64 std::unique_ptr
<weld::MetricSpinButton
> m_xLeftMarginED
;
65 std::unique_ptr
<weld::MetricSpinButton
> m_xRightMarginED
;
66 std::unique_ptr
<weld::MetricSpinButton
> m_xTopMarginED
;
67 std::unique_ptr
<weld::MetricSpinButton
> m_xBottomMarginED
;
70 std::unique_ptr
<weld::CheckButton
> m_xWrapAnchorOnlyCB
;
71 std::unique_ptr
<weld::CheckButton
> m_xWrapTransparentCB
;
72 std::unique_ptr
<weld::CheckButton
> m_xWrapOutlineCB
;
73 std::unique_ptr
<weld::CheckButton
> m_xWrapOutsideCB
;
74 std::unique_ptr
<weld::CheckButton
> m_xAllowOverlapCB
;
77 virtual void ActivatePage(const SfxItemSet
& rSet
) override
;
78 virtual DeactivateRC
DeactivatePage(SfxItemSet
*pSet
) override
;
80 DECL_LINK(RangeModifyHdl
, weld::MetricSpinButton
&, void);
81 DECL_LINK(WrapTypeHdl
, weld::Toggleable
&, void);
82 DECL_LINK(ContourHdl
, weld::Toggleable
&, void);
84 static const WhichRangesContainer s_aWrapPageRg
;
87 SwWrapTabPage(weld::Container
* pPage
, weld::DialogController
* pController
, const SfxItemSet
&rSet
);
88 static std::unique_ptr
<SfxTabPage
> Create(weld::Container
* pPage
, weld::DialogController
* pController
, const SfxItemSet
*rSet
);
89 virtual ~SwWrapTabPage() override
;
91 virtual bool FillItemSet(SfxItemSet
*rSet
) override
;
92 virtual void Reset(const SfxItemSet
*rSet
) override
;
94 static WhichRangesContainer
GetRanges() { return s_aWrapPageRg
; }
95 void SetNewFrame(bool bNewFrame
) { m_bNew
= bNewFrame
; }
96 void SetFormatUsed(bool bFormat
, bool bDrawMode
) { m_bFormat
= bFormat
; m_bDrawMode
= bDrawMode
; }
97 void SetShell(SwWrtShell
* pSh
) { m_pWrtSh
= pSh
; }
100 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */