1/**************************************************************
| 1/**************************************************************
|
2 *
| 2 *
|
3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at
| 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at
|
10 *
| 10 *
|
11 * http://www.apache.org/licenses/LICENSE-2.0
| 11 * http://www.apache.org/licenses/LICENSE-2.0
|
12 *
| 12 *
|
13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License.
| 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License.
|
19 *
| 19 *
|
20 *************************************************************/ 21
| 20 *************************************************************/ 21
|
| 22 23
|
22#ifndef _SW_SIDEBAR_PAGE_MARGIN_CONTROL_HXX_ 23#define _SW_SIDEBAR_PAGE_MARGIN_CONTROL_HXX_ 24 25#include <svx/sidebar/PopupControl.hxx> 26 27#include <tools/fldunit.hxx> 28#include <svl/poolitem.hxx> 29#include <svx/rulritem.hxx> 30#include <unotools/viewoptions.hxx> 31#include <vcl/fixed.hxx> 32#include <vcl/field.hxx> 33#include <svtools/unitconv.hxx> 34#include <vector> 35
| 24#ifndef _SW_SIDEBAR_PAGE_MARGIN_CONTROL_HXX_ 25#define _SW_SIDEBAR_PAGE_MARGIN_CONTROL_HXX_ 26 27#include <svx/sidebar/PopupControl.hxx> 28 29#include <tools/fldunit.hxx> 30#include <svl/poolitem.hxx> 31#include <svx/rulritem.hxx> 32#include <unotools/viewoptions.hxx> 33#include <vcl/fixed.hxx> 34#include <vcl/field.hxx> 35#include <svtools/unitconv.hxx> 36#include <vector> 37
|
36#define SWPAGE_NARROW_VALUE 720 37#define SWPAGE_NORMAL_VALUE 1136 38#define SWPAGE_WIDE_VALUE1 1440 39#define SWPAGE_WIDE_VALUE2 2880 40#define SWPAGE_WIDE_VALUE3 1800
| 38#define SWPAGE_NARROW_VALUE 720 39#define SWPAGE_NORMAL_VALUE 1136 40#define SWPAGE_WIDE_VALUE1 1440 41#define SWPAGE_WIDE_VALUE2 2880 42#define SWPAGE_WIDE_VALUE3 1800
|
41 42 43namespace svx { namespace sidebar {
| 43 44 45namespace svx { namespace sidebar {
|
44 class ValueSetWithTextControl;
| 46 class ValueSetWithTextControl;
|
45} } 46 47static const long MINBODY = 284; //0.5 cm in twips 48 49namespace sw { namespace sidebar { 50 51class PagePropertyPanel; 52 53 54class PageMarginControl
| 47} } 48 49static const long MINBODY = 284; //0.5 cm in twips 50 51namespace sw { namespace sidebar { 52 53class PagePropertyPanel; 54 55 56class PageMarginControl
|
55 : public ::svx::sidebar::PopupControl
| 57 : public ::svx::sidebar::PopupControl
|
56{ 57public:
| 58{ 59public:
|
58 PageMarginControl( 59 Window* pParent, 60 PagePropertyPanel& rPanel, 61 const SvxLongLRSpaceItem& aPageLRMargin, 62 const SvxLongULSpaceItem& aPageULMargin, 63 const bool bMirrored, 64 const Size aPageSize, 65 const sal_Bool bLandscape, 66 const FieldUnit eFUnit, 67 const SfxMapUnit eUnit ); 68 ~PageMarginControl(void);
| 60 PageMarginControl( 61 Window* pParent, 62 PagePropertyPanel& rPanel, 63 const SvxLongLRSpaceItem& aPageLRMargin, 64 const SvxLongULSpaceItem& aPageULMargin, 65 const bool bMirrored, 66 const Size aPageSize, 67 const sal_Bool bLandscape, 68 const FieldUnit eFUnit, 69 const SfxMapUnit eUnit ); 70 ~PageMarginControl(void);
|
69 70private:
| 71 72private:
|
71 ::svx::sidebar::ValueSetWithTextControl* mpMarginValueSet;
| 73 ::svx::sidebar::ValueSetWithTextControl* mpMarginValueSet;
|
72
| 74
|
73 FixedText maCustom; 74 FixedText maLeft; 75 FixedText maInner; 76 MetricField maLeftMarginEdit; 77 FixedText maRight; 78 FixedText maOuter; 79 MetricField maRightMarginEdit; 80 FixedText maTop; 81 MetricField maTopMarginEdit; 82 FixedText maBottom; 83 MetricField maBottomMarginEdit;
| 75 FixedText maCustom; 76 FixedText maLeft; 77 FixedText maInner; 78 MetricField maLeftMarginEdit; 79 FixedText maRight; 80 FixedText maOuter; 81 MetricField maRightMarginEdit; 82 FixedText maTop; 83 MetricField maTopMarginEdit; 84 FixedText maBottom; 85 MetricField maBottomMarginEdit;
|
84
| 86
|
85 // hidden metric field 86 MetricField maWidthHeightField;
| 87 // hidden metric field 88 MetricField maWidthHeightField;
|
87
| 89
|
88 long mnPageLeftMargin; 89 long mnPageRightMargin; 90 long mnPageTopMargin; 91 long mnPageBottomMargin; 92 bool mbMirrored;
| 90 long mnPageLeftMargin; 91 long mnPageRightMargin; 92 long mnPageTopMargin; 93 long mnPageBottomMargin; 94 bool mbMirrored;
|
93
| 95
|
94 const SfxMapUnit meUnit;
| 96 const SfxMapUnit meUnit;
|
95
| 97
|
96 bool mbUserCustomValuesAvailable; 97 long mnUserCustomPageLeftMargin; 98 long mnUserCustomPageRightMargin; 99 long mnUserCustomPageTopMargin; 100 long mnUserCustomPageBottomMargin; 101 bool mbUserCustomMirrored;
| 98 bool mbUserCustomValuesAvailable; 99 long mnUserCustomPageLeftMargin; 100 long mnUserCustomPageRightMargin; 101 long mnUserCustomPageTopMargin; 102 long mnUserCustomPageBottomMargin; 103 bool mbUserCustomMirrored;
|
102
| 104
|
103 bool mbCustomValuesUsed;
| 105 bool mbCustomValuesUsed;
|
104
| 106
|
105 PagePropertyPanel& mrPagePropPanel;
| 107 PagePropertyPanel& mrPagePropPanel;
|
106
| 108
|
107 DECL_LINK( ImplMarginHdl, void* ); 108 DECL_LINK( ModifyLRMarginHdl, MetricField* ); 109 DECL_LINK( ModifyULMarginHdl, MetricField* );
| 109 DECL_LINK( ImplMarginHdl, void* ); 110 DECL_LINK( ModifyLRMarginHdl, MetricField* ); 111 DECL_LINK( ModifyULMarginHdl, MetricField* );
|
110
| 112
|
111 void SetMetricFieldMaxValues( const Size aPageSize );
| 113 void SetMetricFieldMaxValues( const Size aPageSize );
|
112
| 114
|
113 bool GetUserCustomValues(); 114 void StoreUserCustomValues();
| 115 bool GetUserCustomValues(); 116 void StoreUserCustomValues();
|
115
| 117
|
116 void FillValueSet( 117 const bool bLandscape, 118 const bool bUserCustomValuesAvailable ); 119 void SelectValueSetItem();
| 118 void FillValueSet( 119 const bool bLandscape, 120 const bool bUserCustomValuesAvailable ); 121 void SelectValueSetItem();
|
120}; 121 122} } // end of namespace sw::sidebar 123 124#endif
| 122}; 123 124} } // end of namespace sw::sidebar 125 126#endif
|
| 127 128/* vim: set noet sw=4 ts=4: */
|
| |