11d2dbeb0SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 31d2dbeb0SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 41d2dbeb0SAndrew Rist * or more contributor license agreements. See the NOTICE file 51d2dbeb0SAndrew Rist * distributed with this work for additional information 61d2dbeb0SAndrew Rist * regarding copyright ownership. The ASF licenses this file 71d2dbeb0SAndrew Rist * to you under the Apache License, Version 2.0 (the 81d2dbeb0SAndrew Rist * "License"); you may not use this file except in compliance 91d2dbeb0SAndrew Rist * with the License. You may obtain a copy of the License at 10cdf0e10cSrcweir * 111d2dbeb0SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12cdf0e10cSrcweir * 131d2dbeb0SAndrew Rist * Unless required by applicable law or agreed to in writing, 141d2dbeb0SAndrew Rist * software distributed under the License is distributed on an 151d2dbeb0SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 161d2dbeb0SAndrew Rist * KIND, either express or implied. See the License for the 171d2dbeb0SAndrew Rist * specific language governing permissions and limitations 181d2dbeb0SAndrew Rist * under the License. 19cdf0e10cSrcweir * 201d2dbeb0SAndrew Rist *************************************************************/ 211d2dbeb0SAndrew Rist 22cdf0e10cSrcweir #ifndef _WRAP_HXX 23cdf0e10cSrcweir #define _WRAP_HXX 24cdf0e10cSrcweir 25cdf0e10cSrcweir #include <sfx2/tabdlg.hxx> 26cdf0e10cSrcweir #include <sfx2/basedlgs.hxx> 27cdf0e10cSrcweir 28cdf0e10cSrcweir #ifndef _IMAGEBTN_HXX //autogen 29cdf0e10cSrcweir #include <vcl/button.hxx> 30cdf0e10cSrcweir #endif 31cdf0e10cSrcweir 32cdf0e10cSrcweir #ifndef _BUTTON_HXX //autogen 33cdf0e10cSrcweir #include <vcl/button.hxx> 34cdf0e10cSrcweir #endif 35cdf0e10cSrcweir 36cdf0e10cSrcweir #ifndef _FIXED_HXX //autogen 37cdf0e10cSrcweir #include <vcl/fixed.hxx> 38cdf0e10cSrcweir #endif 39cdf0e10cSrcweir 40cdf0e10cSrcweir #ifndef _FIELD_HXX //autogen 41cdf0e10cSrcweir #include <vcl/field.hxx> 42cdf0e10cSrcweir #endif 43cdf0e10cSrcweir 44cdf0e10cSrcweir class Window; 45cdf0e10cSrcweir class SfxItemSet; 46cdf0e10cSrcweir class SwWrtShell; 47cdf0e10cSrcweir 48cdf0e10cSrcweir class SwWrapDlg : public SfxSingleTabDialog 49cdf0e10cSrcweir { 50cdf0e10cSrcweir SwWrtShell* pWrtShell; 51cdf0e10cSrcweir 52cdf0e10cSrcweir public: 53cdf0e10cSrcweir SwWrapDlg(Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, sal_Bool bDrawMode); 54cdf0e10cSrcweir ~SwWrapDlg(); 55cdf0e10cSrcweir GetWrtShell()56cdf0e10cSrcweir inline SwWrtShell* GetWrtShell() { return pWrtShell; } 57cdf0e10cSrcweir }; 58cdf0e10cSrcweir 59cdf0e10cSrcweir 60cdf0e10cSrcweir /*-------------------------------------------------------------------- 61cdf0e10cSrcweir Beschreibung: Umlauf-TabPage 62cdf0e10cSrcweir --------------------------------------------------------------------*/ 63cdf0e10cSrcweir 64cdf0e10cSrcweir class SwWrapTabPage: public SfxTabPage 65cdf0e10cSrcweir { 66cdf0e10cSrcweir // WRAPPING 67cdf0e10cSrcweir FixedLine aWrapFLC; 68cdf0e10cSrcweir ImageRadioButton aNoWrapRB; 69cdf0e10cSrcweir ImageRadioButton aWrapLeftRB; 70cdf0e10cSrcweir ImageRadioButton aWrapRightRB; 71cdf0e10cSrcweir ImageRadioButton aWrapParallelRB; 72cdf0e10cSrcweir ImageRadioButton aWrapThroughRB; 73cdf0e10cSrcweir ImageRadioButton aIdealWrapRB; 74cdf0e10cSrcweir 75cdf0e10cSrcweir // MARGIN 76cdf0e10cSrcweir FixedLine aMarginFL; 77cdf0e10cSrcweir FixedText aLeftMarginFT; 78cdf0e10cSrcweir MetricField aLeftMarginED; 79cdf0e10cSrcweir FixedText aRightMarginFT; 80cdf0e10cSrcweir MetricField aRightMarginED; 81cdf0e10cSrcweir FixedText aTopMarginFT; 82cdf0e10cSrcweir MetricField aTopMarginED; 83cdf0e10cSrcweir FixedText aBottomMarginFT; 84cdf0e10cSrcweir MetricField aBottomMarginED; 85cdf0e10cSrcweir 86cdf0e10cSrcweir // OPTIONS 87cdf0e10cSrcweir FixedLine aOptionsSepFL; 88cdf0e10cSrcweir FixedLine aOptionsFL; 89cdf0e10cSrcweir CheckBox aWrapAnchorOnlyCB; 90cdf0e10cSrcweir CheckBox aWrapTransparentCB; 91cdf0e10cSrcweir CheckBox aWrapOutlineCB; 92cdf0e10cSrcweir CheckBox aWrapOutsideCB; 93cdf0e10cSrcweir 94cdf0e10cSrcweir ImageList aWrapIL; 95cdf0e10cSrcweir ImageList aWrapILH; 96cdf0e10cSrcweir 97cdf0e10cSrcweir sal_uInt16 nOldLeftMargin; 98cdf0e10cSrcweir sal_uInt16 nOldRightMargin; 99cdf0e10cSrcweir sal_uInt16 nOldUpperMargin; 100cdf0e10cSrcweir sal_uInt16 nOldLowerMargin; 101cdf0e10cSrcweir 102cdf0e10cSrcweir RndStdIds nAnchorId; 103cdf0e10cSrcweir sal_uInt16 nHtmlMode; 104cdf0e10cSrcweir 105cdf0e10cSrcweir Size aFrmSize; 106cdf0e10cSrcweir SwWrtShell* pWrtSh; 107cdf0e10cSrcweir 108cdf0e10cSrcweir sal_Bool bFormat; 109cdf0e10cSrcweir sal_Bool bNew; 110cdf0e10cSrcweir sal_Bool bHtmlMode; 111cdf0e10cSrcweir sal_Bool bDrawMode; 112cdf0e10cSrcweir sal_Bool bContourImage; 113cdf0e10cSrcweir 114cdf0e10cSrcweir SwWrapTabPage(Window *pParent, const SfxItemSet &rSet); 115cdf0e10cSrcweir ~SwWrapTabPage(); 116cdf0e10cSrcweir 117cdf0e10cSrcweir void ApplyImageList(); 118cdf0e10cSrcweir void EnableModes(const SfxItemSet& rSet); 119cdf0e10cSrcweir virtual void ActivatePage(const SfxItemSet& rSet); 120cdf0e10cSrcweir virtual int DeactivatePage(SfxItemSet *pSet); 121cdf0e10cSrcweir virtual void DataChanged( const DataChangedEvent& rDCEvt ); 122cdf0e10cSrcweir 123cdf0e10cSrcweir DECL_LINK( RangeModifyHdl, MetricField * ); 124cdf0e10cSrcweir DECL_LINK( WrapTypeHdl, ImageRadioButton * ); 125cdf0e10cSrcweir DECL_LINK( ContourHdl, CheckBox * ); 126cdf0e10cSrcweir 127cdf0e10cSrcweir using SfxTabPage::ActivatePage; 128cdf0e10cSrcweir using SfxTabPage::DeactivatePage; 129cdf0e10cSrcweir 130cdf0e10cSrcweir public: 131cdf0e10cSrcweir 132cdf0e10cSrcweir static SfxTabPage *Create(Window *pParent, const SfxItemSet &rSet); 133cdf0e10cSrcweir 134cdf0e10cSrcweir virtual sal_Bool FillItemSet(SfxItemSet &rSet); 135cdf0e10cSrcweir virtual void Reset(const SfxItemSet &rSet); 136cdf0e10cSrcweir 137cdf0e10cSrcweir static sal_uInt16* GetRanges(); SetNewFrame(sal_Bool bNewFrame)138cdf0e10cSrcweir inline void SetNewFrame(sal_Bool bNewFrame) { bNew = bNewFrame; } SetFormatUsed(sal_Bool bFmt,sal_Bool bDrw)139cdf0e10cSrcweir inline void SetFormatUsed(sal_Bool bFmt, sal_Bool bDrw) { bFormat = bFmt; 140cdf0e10cSrcweir bDrawMode = bDrw; } SetShell(SwWrtShell * pSh)141cdf0e10cSrcweir inline void SetShell(SwWrtShell* pSh) { pWrtSh = pSh; } 142cdf0e10cSrcweir }; 143cdf0e10cSrcweir 144cdf0e10cSrcweir #endif 145*256193c1Smseidel 146*256193c1Smseidel /* vim: set noet sw=4 ts=4: */ 147