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 <vcl/button.hxx>
25 #include <vcl/fixed.hxx>
26 #include <vcl/field.hxx>
32 class SwWrapDlg
: public SfxNoLayoutSingleTabDialog
34 SwWrtShell
* pWrtShell
;
37 SwWrapDlg(Window
* pParent
, SfxItemSet
& rSet
, SwWrtShell
* pSh
, sal_Bool bDrawMode
);
40 inline SwWrtShell
* GetWrtShell() { return pWrtShell
; }
44 /*--------------------------------------------------------------------
45 Description: circulation TabPage
46 --------------------------------------------------------------------*/
48 class SwWrapTabPage
: public SfxTabPage
52 ImageRadioButton aNoWrapRB
;
53 ImageRadioButton aWrapLeftRB
;
54 ImageRadioButton aWrapRightRB
;
55 ImageRadioButton aWrapParallelRB
;
56 ImageRadioButton aWrapThroughRB
;
57 ImageRadioButton aIdealWrapRB
;
61 FixedText aLeftMarginFT
;
62 MetricField aLeftMarginED
;
63 FixedText aRightMarginFT
;
64 MetricField aRightMarginED
;
65 FixedText aTopMarginFT
;
66 MetricField aTopMarginED
;
67 FixedText aBottomMarginFT
;
68 MetricField aBottomMarginED
;
71 FixedLine aOptionsSepFL
;
73 CheckBox aWrapAnchorOnlyCB
;
74 CheckBox aWrapTransparentCB
;
75 CheckBox aWrapOutlineCB
;
76 CheckBox aWrapOutsideCB
;
80 sal_uInt16 nOldLeftMargin
;
81 sal_uInt16 nOldRightMargin
;
82 sal_uInt16 nOldUpperMargin
;
83 sal_uInt16 nOldLowerMargin
;
95 sal_Bool bContourImage
;
97 SwWrapTabPage(Window
*pParent
, const SfxItemSet
&rSet
);
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
;
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
;
124 inline void SetShell(SwWrtShell
* pSh
) { pWrtSh
= pSh
; }
130 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */