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>
31 SfxItemSet maInputSet
;
34 class SwWrapDlg final
: private SwWrapDlgBase
, public SfxSingleTabDialogController
37 SwWrapDlg(weld::Window
* pParent
, const SfxItemSet
& rSet
, SwWrtShell
* pSh
, bool bDrawMode
);
40 // circulation TabPage
41 class SwWrapTabPage final
: public SfxTabPage
43 RndStdIds m_nAnchorId
;
44 sal_uInt16 m_nHtmlMode
;
55 std::unique_ptr
<weld::Image
> m_xNoWrapImg
;
56 std::unique_ptr
<weld::RadioButton
> m_xNoWrapRB
;
57 std::unique_ptr
<weld::Image
> m_xWrapLeftImg
;
58 std::unique_ptr
<weld::RadioButton
> m_xWrapLeftRB
;
59 std::unique_ptr
<weld::Image
> m_xWrapRightImg
;
60 std::unique_ptr
<weld::RadioButton
> m_xWrapRightRB
;
61 std::unique_ptr
<weld::Image
> m_xWrapParallelImg
;
62 std::unique_ptr
<weld::RadioButton
> m_xWrapParallelRB
;
63 std::unique_ptr
<weld::Image
> m_xWrapThroughImg
;
64 std::unique_ptr
<weld::RadioButton
> m_xWrapThroughRB
;
65 std::unique_ptr
<weld::Image
> m_xIdealWrapImg
;
66 std::unique_ptr
<weld::RadioButton
> m_xIdealWrapRB
;
69 std::unique_ptr
<weld::MetricSpinButton
> m_xLeftMarginED
;
70 std::unique_ptr
<weld::MetricSpinButton
> m_xRightMarginED
;
71 std::unique_ptr
<weld::MetricSpinButton
> m_xTopMarginED
;
72 std::unique_ptr
<weld::MetricSpinButton
> m_xBottomMarginED
;
75 std::unique_ptr
<weld::CheckButton
> m_xWrapAnchorOnlyCB
;
76 std::unique_ptr
<weld::CheckButton
> m_xWrapTransparentCB
;
77 std::unique_ptr
<weld::CheckButton
> m_xWrapOutlineCB
;
78 std::unique_ptr
<weld::CheckButton
> m_xWrapOutsideCB
;
79 std::unique_ptr
<weld::CheckButton
> m_xAllowOverlapCB
;
82 virtual void ActivatePage(const SfxItemSet
& rSet
) override
;
83 virtual DeactivateRC
DeactivatePage(SfxItemSet
*pSet
) override
;
85 DECL_LINK(RangeModifyHdl
, weld::MetricSpinButton
&, void);
86 DECL_LINK(WrapTypeHdl
, weld::Toggleable
&, void);
87 DECL_LINK(ContourHdl
, weld::Toggleable
&, void);
89 static const WhichRangesContainer s_aWrapPageRg
;
92 SwWrapTabPage(weld::Container
* pPage
, weld::DialogController
* pController
, const SfxItemSet
&rSet
);
93 static std::unique_ptr
<SfxTabPage
> Create(weld::Container
* pPage
, weld::DialogController
* pController
, const SfxItemSet
*rSet
);
94 virtual ~SwWrapTabPage() override
;
96 virtual bool FillItemSet(SfxItemSet
*rSet
) override
;
97 virtual void Reset(const SfxItemSet
*rSet
) override
;
99 static const WhichRangesContainer
& GetRanges() { return s_aWrapPageRg
; }
100 void SetNewFrame(bool bNewFrame
) { m_bNew
= bNewFrame
; }
101 void SetFormatUsed(bool bFormat
, bool bDrawMode
) { m_bFormat
= bFormat
; m_bDrawMode
= bDrawMode
; }
102 void SetShell(SwWrtShell
* pSh
) { m_pWrtSh
= pSh
; }
105 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */