bump product version to 4.1.6.2
[LibreOffice.git] / sw / source / ui / inc / wrap.hxx
blob684ef6cca0d999cfa28f5c6d7b5cac82d07a4456
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 .
19 #ifndef _WRAP_HXX
20 #define _WRAP_HXX
22 #include <sfx2/tabdlg.hxx>
23 #include <sfx2/basedlgs.hxx>
24 #include <vcl/button.hxx>
25 #include <vcl/fixed.hxx>
26 #include <vcl/field.hxx>
28 class Window;
29 class SfxItemSet;
30 class SwWrtShell;
32 class SwWrapDlg : public SfxNoLayoutSingleTabDialog
34 SwWrtShell* pWrtShell;
36 public:
37 SwWrapDlg(Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, sal_Bool bDrawMode);
38 ~SwWrapDlg();
40 inline SwWrtShell* GetWrtShell() { return pWrtShell; }
44 /*--------------------------------------------------------------------
45 Description: circulation TabPage
46 --------------------------------------------------------------------*/
48 class SwWrapTabPage: public SfxTabPage
50 // WRAPPING
51 FixedLine aWrapFLC;
52 ImageRadioButton aNoWrapRB;
53 ImageRadioButton aWrapLeftRB;
54 ImageRadioButton aWrapRightRB;
55 ImageRadioButton aWrapParallelRB;
56 ImageRadioButton aWrapThroughRB;
57 ImageRadioButton aIdealWrapRB;
59 // MARGIN
60 FixedLine aMarginFL;
61 FixedText aLeftMarginFT;
62 MetricField aLeftMarginED;
63 FixedText aRightMarginFT;
64 MetricField aRightMarginED;
65 FixedText aTopMarginFT;
66 MetricField aTopMarginED;
67 FixedText aBottomMarginFT;
68 MetricField aBottomMarginED;
70 // OPTIONS
71 FixedLine aOptionsSepFL;
72 FixedLine aOptionsFL;
73 CheckBox aWrapAnchorOnlyCB;
74 CheckBox aWrapTransparentCB;
75 CheckBox aWrapOutlineCB;
76 CheckBox aWrapOutsideCB;
78 ImageList aWrapIL;
80 sal_uInt16 nOldLeftMargin;
81 sal_uInt16 nOldRightMargin;
82 sal_uInt16 nOldUpperMargin;
83 sal_uInt16 nOldLowerMargin;
85 RndStdIds nAnchorId;
86 sal_uInt16 nHtmlMode;
88 Size aFrmSize;
89 SwWrtShell* pWrtSh;
91 sal_Bool bFormat;
92 sal_Bool bNew;
93 sal_Bool bHtmlMode;
94 sal_Bool bDrawMode;
95 sal_Bool bContourImage;
97 SwWrapTabPage(Window *pParent, const SfxItemSet &rSet);
98 ~SwWrapTabPage();
100 void ApplyImageList();
101 void EnableModes(const SfxItemSet& rSet);
102 virtual void ActivatePage(const SfxItemSet& rSet);
103 virtual int DeactivatePage(SfxItemSet *pSet);
104 virtual void DataChanged( const DataChangedEvent& rDCEvt );
106 DECL_LINK( RangeModifyHdl, MetricField * );
107 DECL_LINK( WrapTypeHdl, ImageRadioButton * );
108 DECL_LINK(ContourHdl, void *);
110 using SfxTabPage::ActivatePage;
111 using SfxTabPage::DeactivatePage;
113 public:
115 static SfxTabPage *Create(Window *pParent, const SfxItemSet &rSet);
117 virtual sal_Bool FillItemSet(SfxItemSet &rSet);
118 virtual void Reset(const SfxItemSet &rSet);
120 static sal_uInt16* GetRanges();
121 inline void SetNewFrame(sal_Bool bNewFrame) { bNew = bNewFrame; }
122 inline void SetFormatUsed(sal_Bool bFmt, sal_Bool bDrw) { bFormat = bFmt;
123 bDrawMode = bDrw; }
124 inline void SetShell(SwWrtShell* pSh) { pWrtSh = pSh; }
127 #endif
130 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */