LibreOffice Module sw (master) 1
wrap.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 <sfx2/basedlgs.hxx>
24#include <svx/swframetypes.hxx>
25
26class SfxItemSet;
27class SwWrtShell;
28
30{
31public:
32 SwWrapDlg(weld::Window* pParent, const SfxItemSet& rSet, SwWrtShell* pSh, bool bDrawMode);
33};
34
35// circulation TabPage
36class SwWrapTabPage final : public SfxTabPage
37{
39 sal_uInt16 m_nHtmlMode;
40
42
44 bool m_bNew;
48
49 // WRAPPING
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;
62
63 // MARGIN
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;
68
69 // OPTIONS
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;
75
76 void SetImages();
77 virtual void ActivatePage(const SfxItemSet& rSet) override;
78 virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override;
79
80 DECL_LINK(RangeModifyHdl, weld::MetricSpinButton&, void);
81 DECL_LINK(WrapTypeHdl, weld::Toggleable&, void);
82 DECL_LINK(ContourHdl, weld::Toggleable&, void);
83
85
86public:
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;
90
91 virtual bool FillItemSet(SfxItemSet *rSet) override;
92 virtual void Reset(const SfxItemSet *rSet) override;
93
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; }
98};
99
100/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SwWrapDlg(weld::Window *pParent, const SfxItemSet &rSet, SwWrtShell *pSh, bool bDrawMode)
Definition: wrap.cxx:53
DECL_LINK(WrapTypeHdl, weld::Toggleable &, void)
std::unique_ptr< weld::MetricSpinButton > m_xLeftMarginED
Definition: wrap.hxx:64
bool m_bFormat
Definition: wrap.hxx:43
virtual void ActivatePage(const SfxItemSet &rSet) override
Definition: wrap.cxx:375
std::unique_ptr< weld::Image > m_xWrapLeftImg
Definition: wrap.hxx:52
SwWrapTabPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
Definition: wrap.cxx:64
static const WhichRangesContainer s_aWrapPageRg
Definition: wrap.hxx:84
std::unique_ptr< weld::MetricSpinButton > m_xBottomMarginED
Definition: wrap.hxx:67
bool m_bContourImage
Definition: wrap.hxx:47
std::unique_ptr< weld::MetricSpinButton > m_xTopMarginED
Definition: wrap.hxx:66
bool m_bNew
Definition: wrap.hxx:44
std::unique_ptr< weld::RadioButton > m_xWrapThroughRB
Definition: wrap.hxx:59
std::unique_ptr< weld::Image > m_xNoWrapImg
Definition: wrap.hxx:50
SwWrtShell * m_pWrtSh
Definition: wrap.hxx:41
RndStdIds m_nAnchorId
Definition: wrap.hxx:38
sal_uInt16 m_nHtmlMode
Definition: wrap.hxx:39
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
Definition: wrap.cxx:119
virtual void Reset(const SfxItemSet *rSet) override
Definition: wrap.cxx:124
static WhichRangesContainer GetRanges()
Definition: wrap.hxx:94
std::unique_ptr< weld::Image > m_xIdealWrapImg
Definition: wrap.hxx:60
void SetNewFrame(bool bNewFrame)
Definition: wrap.hxx:95
std::unique_ptr< weld::Image > m_xWrapRightImg
Definition: wrap.hxx:54
void SetShell(SwWrtShell *pSh)
Definition: wrap.hxx:97
std::unique_ptr< weld::CheckButton > m_xAllowOverlapCB
Definition: wrap.hxx:74
std::unique_ptr< weld::CheckButton > m_xWrapTransparentCB
Definition: wrap.hxx:71
std::unique_ptr< weld::RadioButton > m_xWrapParallelRB
Definition: wrap.hxx:57
std::unique_ptr< weld::Image > m_xWrapParallelImg
Definition: wrap.hxx:56
virtual ~SwWrapTabPage() override
Definition: wrap.cxx:115
std::unique_ptr< weld::RadioButton > m_xNoWrapRB
Definition: wrap.hxx:51
virtual bool FillItemSet(SfxItemSet *rSet) override
Definition: wrap.cxx:262
void SetImages()
Definition: wrap.cxx:609
DECL_LINK(ContourHdl, weld::Toggleable &, void)
void SetFormatUsed(bool bFormat, bool bDrawMode)
Definition: wrap.hxx:96
bool m_bHtmlMode
Definition: wrap.hxx:45
std::unique_ptr< weld::RadioButton > m_xWrapLeftRB
Definition: wrap.hxx:53
std::unique_ptr< weld::MetricSpinButton > m_xRightMarginED
Definition: wrap.hxx:65
std::unique_ptr< weld::Image > m_xWrapThroughImg
Definition: wrap.hxx:58
std::unique_ptr< weld::RadioButton > m_xIdealWrapRB
Definition: wrap.hxx:61
std::unique_ptr< weld::RadioButton > m_xWrapRightRB
Definition: wrap.hxx:55
DECL_LINK(RangeModifyHdl, weld::MetricSpinButton &, void)
virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override
Definition: wrap.cxx:549
std::unique_ptr< weld::CheckButton > m_xWrapOutsideCB
Definition: wrap.hxx:73
bool m_bDrawMode
Definition: wrap.hxx:46
std::unique_ptr< weld::CheckButton > m_xWrapAnchorOnlyCB
Definition: wrap.hxx:70
std::unique_ptr< weld::CheckButton > m_xWrapOutlineCB
Definition: wrap.hxx:72
Used by the UI to modify the document model.
Definition: wrtsh.hxx:97
static SfxItemSet & rSet
RndStdIds
DeactivateRC