1 /************************************************************** 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 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 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. 19 * 20 *************************************************************/ 21 22 23 #ifndef _SVX_PAGE_HXX 24 #define _SVX_PAGE_HXX 25 26 27 #include <sfx2/tabdlg.hxx> 28 #include <vcl/field.hxx> 29 #include <vcl/fixed.hxx> 30 #include <vcl/group.hxx> 31 #include <vcl/lstbox.hxx> 32 #include <svtools/stdctrl.hxx> 33 #include <svx/pagectrl.hxx> 34 #include <svx/frmdirlbox.hxx> 35 #include <editeng/svxenum.hxx> 36 #include <i18npool/paper.hxx> 37 #include <svx/flagsdef.hxx> 38 39 // enum ------------------------------------------------------------------ 40 41 //CHINA001 enum SvxModeType 42 //CHINA001 { 43 //CHINA001 SVX_PAGE_MODE_STANDARD, 44 //CHINA001 SVX_PAGE_MODE_CENTER, 45 //CHINA001 SVX_PAGE_MODE_PRESENTATION 46 //CHINA001 }; 47 48 // class SvxPageDescPage ------------------------------------------------- 49 50 /* {k:\svx\prototyp\dialog\page.bmp} 51 52 [Beschreibung] 53 TabPage zur Einstellung einer Seite (Groesse, Raender, ...) 54 55 [Items] 56 <SvxPageItem>: <SID_ATTR_PAGE> 57 <SvxSizeItem>: <SID_ATTR_SIZE> 58 <SvxSizeItem>: <SID_ATTR_MAXSIZE> 59 <SvxULSpaceItem>: <SID_ATTR_LRSPACE> 60 <SvxLRSpaceItem>: <SID_ATTR_ULSPACE> 61 <SfxAllEnumItem>: <SID_ATTR_PAPERTRAY> 62 <SvxPaperBinItem>: <SID_ATTR_PAPERBIN> 63 <SvxBoolItem>: <SID_ATTR_EXT1> 64 <SvxBoolItem>: <SID_ATTR_EXT2> 65 66 <SfxSetItem>: <SID_ATTR_HEADERSET> 67 <SfxBoolItem>: <SID_ATTR_ON> 68 <SfxBoolItem>: <SID_ATTR_DYNAMIC> 69 <SfxBoolItem>: <SID_ATTR_SHARED> 70 <SvxSizeItem>: <SID_ATTR_SIZE> 71 <SvxULSpaceItem>: <SID_ATTR_ULSPACE> 72 <SvxLRSpaceItem>: <SID_ATTR_LRSPACE> 73 74 <SfxSetItem>: <SID_ATTR_FOOTERSET> 75 <SfxBoolItem>: <SID_ATTR_ON> 76 <SfxBoolItem>: <SID_ATTR_DYNAMIC> 77 <SfxBoolItem>: <SID_ATTR_SHARED> 78 <SvxSizeItem>: <SID_ATTR_SIZE> 79 <SvxULSpaceItem>: <SID_ATTR_ULSPACE> 80 <SvxLRSpaceItem>: <SID_ATTR_LRSPACE> 81 */ 82 83 //UUUU struct SvxPage_Impl; 84 typedef sal_uInt16 MarginPosition; 85 86 class SvxPageDescPage : public SfxTabPage 87 { 88 using TabPage::ActivatePage; 89 using TabPage::DeactivatePage; 90 91 private: 92 // paper format 93 FixedLine aPaperSizeFl; 94 FixedText aPaperFormatText; 95 ListBox aPaperSizeBox; 96 97 FixedText aPaperWidthText; 98 MetricField aPaperWidthEdit; 99 FixedText aPaperHeightText; 100 MetricField aPaperHeightEdit; 101 102 FixedText aOrientationFT; 103 RadioButton aPortraitBtn; 104 RadioButton aLandscapeBtn; 105 106 SvxPageWindow aBspWin; 107 108 FixedText aTextFlowLbl; 109 svx::FrameDirectionListBox aTextFlowBox; 110 111 FixedText aPaperTrayLbl; 112 ListBox aPaperTrayBox; 113 114 // Margins 115 FixedLine aMarginFl; 116 FixedText aLeftMarginLbl; 117 MetricField aLeftMarginEdit; 118 FixedText aRightMarginLbl; 119 MetricField aRightMarginEdit; 120 FixedText aTopMarginLbl; 121 MetricField aTopMarginEdit; 122 FixedText aBottomMarginLbl; 123 MetricField aBottomMarginEdit; 124 125 FixedLine aBottomSeparatorFl; 126 // layout settings 127 FixedLine aLayoutFL; 128 FixedText aPageText; 129 ListBox aLayoutBox; 130 FixedText aNumberFormatText; 131 ListBox aNumberFormatBox; 132 133 134 //Extras Calc 135 FixedText aTblAlignFT; 136 CheckBox aHorzBox; 137 CheckBox aVertBox; 138 139 // Impress and Draw 140 CheckBox aAdaptBox; 141 142 //Register Writer 143 CheckBox aRegisterCB; 144 FixedText aRegisterFT; 145 ListBox aRegisterLB; 146 147 String sStandardRegister; 148 149 String aInsideText; 150 String aOutsideText; 151 String aLeftText; 152 String aRightText; 153 String aPrintRangeQueryText; 154 155 long nFirstLeftMargin; 156 long nFirstRightMargin; 157 long nFirstTopMargin; 158 long nFirstBottomMargin; 159 long nLastLeftMargin; 160 long nLastRightMargin; 161 long nLastTopMargin; 162 long nLastBottomMargin; 163 164 Size aMaxSize; 165 sal_Bool bLandscape; 166 FASTBOOL bBorderModified; 167 SvxModeType eMode; 168 Paper ePaperStart; 169 Paper ePaperEnd; 170 171 //UUUU SvxPage_Impl* pImpl; 172 MarginPosition m_nPos; 173 Printer* mpDefPrinter; 174 175 bool mbDelPrinter : 1; 176 177 //UUUU 178 bool mbEnableDrawingLayerFillStyles : 1; 179 180 #ifdef _SVX_PAGE_CXX 181 void Init_Impl(); 182 DECL_LINK( LayoutHdl_Impl, ListBox* ); 183 DECL_LINK( PaperBinHdl_Impl, ListBox* ); 184 DECL_LINK( SwapOrientation_Impl, RadioButton* ); 185 void SwapFirstValues_Impl( FASTBOOL bSet ); 186 DECL_LINK( BorderModify_Impl, MetricField* ); 187 void InitHeadFoot_Impl( const SfxItemSet& rSet ); 188 DECL_LINK( CenterHdl_Impl, CheckBox* ); 189 void UpdateExample_Impl( bool bResetbackground = false ); 190 191 // Papiergroesse 192 DECL_LINK( PaperSizeSelect_Impl, ListBox* ); 193 DECL_LINK( PaperSizeModify_Impl, Edit* ); 194 195 DECL_LINK( FrameDirectionModify_Impl, ListBox* ); 196 197 // Hintergrund 198 void ResetBackground_Impl( const SfxItemSet& rSet ); 199 200 // Grenzwerte 201 DECL_LINK( RangeHdl_Impl, Edit* ); 202 void CalcMargin_Impl(); 203 204 // Registerhaltigkeit 205 DECL_LINK( RegisterModify, CheckBox * ); 206 207 // page direction 208 /** Disables vertical page direction entries in the text flow listbox. */ 209 void DisableVerticalPageDir(); 210 211 bool IsPrinterRangeOverflow( MetricField& rField, long nFirstMargin, 212 long nLastMargin, MarginPosition nPos ); 213 void CheckMarginEdits( bool _bClear ); 214 bool IsMarginOutOfRange(); 215 #endif 216 217 SvxPageDescPage( Window* pParent, const SfxItemSet& rSet ); 218 219 //UUUU EnableDrawingLayerFillStyles(bool bNew)220 void EnableDrawingLayerFillStyles(bool bNew) { mbEnableDrawingLayerFillStyles = bNew; } 221 222 protected: 223 virtual void ActivatePage( const SfxItemSet& rSet ); 224 virtual int DeactivatePage( SfxItemSet* pSet = 0 ); 225 226 public: 227 static SfxTabPage* Create( Window* pParent, const SfxItemSet& rSet ); 228 static sal_uInt16* GetRanges(); 229 230 virtual sal_Bool FillItemSet( SfxItemSet& rOutSet ); 231 virtual void Reset( const SfxItemSet& rSet ); 232 virtual void FillUserData(); 233 234 virtual ~SvxPageDescPage(); 235 SetMode(SvxModeType eMType)236 void SetMode( SvxModeType eMType ) { eMode = eMType; } SetPaperFormatRanges(Paper eStart,Paper eEnd)237 void SetPaperFormatRanges( Paper eStart, Paper eEnd ) 238 { ePaperStart = eStart, ePaperEnd = eEnd; } 239 240 void SetCollectionList(const List* pList); 241 virtual void PageCreated (SfxAllItemSet aSet); //add CHINA001 242 }; 243 244 #endif // #ifndef _SVX_PAGE_HXX 245 246