1*c4eee24dSAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*c4eee24dSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*c4eee24dSAndrew Rist * or more contributor license agreements. See the NOTICE file 5*c4eee24dSAndrew Rist * distributed with this work for additional information 6*c4eee24dSAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*c4eee24dSAndrew Rist * to you under the Apache License, Version 2.0 (the 8*c4eee24dSAndrew Rist * "License"); you may not use this file except in compliance 9*c4eee24dSAndrew Rist * with the License. You may obtain a copy of the License at 10*c4eee24dSAndrew Rist * 11*c4eee24dSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*c4eee24dSAndrew Rist * 13*c4eee24dSAndrew Rist * Unless required by applicable law or agreed to in writing, 14*c4eee24dSAndrew Rist * software distributed under the License is distributed on an 15*c4eee24dSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*c4eee24dSAndrew Rist * KIND, either express or implied. See the License for the 17*c4eee24dSAndrew Rist * specific language governing permissions and limitations 18*c4eee24dSAndrew Rist * under the License. 19*c4eee24dSAndrew Rist * 20*c4eee24dSAndrew Rist *************************************************************/ 21*c4eee24dSAndrew Rist 22*c4eee24dSAndrew Rist 23cdf0e10cSrcweir #ifndef _SVX_SWPOSSIZETABPAGE_HXX 24cdf0e10cSrcweir #define _SVX_SWPOSSIZETABPAGE_HXX 25cdf0e10cSrcweir 26cdf0e10cSrcweir #include <sfx2/tabdlg.hxx> 27cdf0e10cSrcweir #include <vcl/fixed.hxx> 28cdf0e10cSrcweir #include <vcl/field.hxx> 29cdf0e10cSrcweir #include <vcl/lstbox.hxx> 30cdf0e10cSrcweir #include <svx/swframeposstrings.hxx> 31cdf0e10cSrcweir #include <svx/swframeexample.hxx> 32cdf0e10cSrcweir 33cdf0e10cSrcweir /*-- 01.03.2004 15:45:01--------------------------------------------------- 34cdf0e10cSrcweir SvxSwPosSizeTabPage - position and size page for Writer drawing objects 35cdf0e10cSrcweir -----------------------------------------------------------------------*/ 36cdf0e10cSrcweir struct FrmMap; 37cdf0e10cSrcweir class SdrView; 38cdf0e10cSrcweir class SvxSwPosSizeTabPage : public SfxTabPage 39cdf0e10cSrcweir { 40cdf0e10cSrcweir using TabPage::DeactivatePage; 41cdf0e10cSrcweir 42cdf0e10cSrcweir FixedLine m_aSizeFL; 43cdf0e10cSrcweir FixedText m_aWidthFT; 44cdf0e10cSrcweir MetricField m_aWidthMF; 45cdf0e10cSrcweir FixedText m_aHeightFT; 46cdf0e10cSrcweir MetricField m_aHeightMF; 47cdf0e10cSrcweir CheckBox m_aKeepRatioCB; 48cdf0e10cSrcweir 49cdf0e10cSrcweir FixedLine m_aSeparatorFL; 50cdf0e10cSrcweir 51cdf0e10cSrcweir FixedLine m_aAnchorFL; 52cdf0e10cSrcweir RadioButton m_aToPageRB; 53cdf0e10cSrcweir RadioButton m_aToParaRB; 54cdf0e10cSrcweir RadioButton m_aToCharRB; 55cdf0e10cSrcweir RadioButton m_aAsCharRB; 56cdf0e10cSrcweir RadioButton m_aToFrameRB; 57cdf0e10cSrcweir 58cdf0e10cSrcweir FixedLine m_aProtectionFL; 59cdf0e10cSrcweir TriStateBox m_aPositionCB; 60cdf0e10cSrcweir TriStateBox m_aSizeCB; 61cdf0e10cSrcweir 62cdf0e10cSrcweir FixedLine m_aPositionFL; 63cdf0e10cSrcweir FixedText m_aHoriFT; 64cdf0e10cSrcweir ListBox m_aHoriLB; 65cdf0e10cSrcweir FixedText m_aHoriByFT; 66cdf0e10cSrcweir MetricField m_aHoriByMF; 67cdf0e10cSrcweir FixedText m_aHoriToFT; 68cdf0e10cSrcweir ListBox m_aHoriToLB; 69cdf0e10cSrcweir 70cdf0e10cSrcweir CheckBox m_aHoriMirrorCB; 71cdf0e10cSrcweir 72cdf0e10cSrcweir FixedText m_aVertFT; 73cdf0e10cSrcweir ListBox m_aVertLB; 74cdf0e10cSrcweir FixedText m_aVertByFT; 75cdf0e10cSrcweir MetricField m_aVertByMF; 76cdf0e10cSrcweir FixedText m_aVertToFT; 77cdf0e10cSrcweir ListBox m_aVertToLB; 78cdf0e10cSrcweir 79cdf0e10cSrcweir CheckBox m_aFollowCB; 80cdf0e10cSrcweir 81cdf0e10cSrcweir SvxSwFrameExample m_aExampleWN; 82cdf0e10cSrcweir 83cdf0e10cSrcweir Link m_aValidateLink; 84cdf0e10cSrcweir 85cdf0e10cSrcweir //'string provider' 86cdf0e10cSrcweir SvxSwFramePosString m_aFramePosString; 87cdf0e10cSrcweir 88cdf0e10cSrcweir Rectangle m_aRect; //size of all selected objects 89cdf0e10cSrcweir Rectangle m_aWorkArea; 90cdf0e10cSrcweir Point m_aAnchorPos; 91cdf0e10cSrcweir 92cdf0e10cSrcweir FrmMap* m_pVMap; 93cdf0e10cSrcweir FrmMap* m_pHMap; 94cdf0e10cSrcweir const SdrView* m_pSdrView; 95cdf0e10cSrcweir 96cdf0e10cSrcweir // initial values 97cdf0e10cSrcweir short m_nOldH; 98cdf0e10cSrcweir short m_nOldHRel; 99cdf0e10cSrcweir short m_nOldV; 100cdf0e10cSrcweir short m_nOldVRel; 101cdf0e10cSrcweir 102cdf0e10cSrcweir double m_fWidthHeightRatio; //width-to-height ratio to support the KeepRatio button 103cdf0e10cSrcweir sal_uInt16 m_nHtmlMode; 104cdf0e10cSrcweir bool m_bHtmlMode; 105cdf0e10cSrcweir bool m_bAtHoriPosModified; 106cdf0e10cSrcweir bool m_bAtVertPosModified; 107cdf0e10cSrcweir bool m_bIsVerticalFrame; 108cdf0e10cSrcweir bool m_bPositioningDisabled; 109cdf0e10cSrcweir bool m_bIsMultiSelection; 110cdf0e10cSrcweir bool m_bIsInRightToLeft; 111cdf0e10cSrcweir 112cdf0e10cSrcweir 113cdf0e10cSrcweir 114cdf0e10cSrcweir DECL_LINK( RangeModifyHdl, Edit * ); 115cdf0e10cSrcweir DECL_LINK( AnchorTypeHdl, RadioButton * ); 116cdf0e10cSrcweir DECL_LINK( PosHdl, ListBox * ); 117cdf0e10cSrcweir DECL_LINK( RelHdl, ListBox * ); 118cdf0e10cSrcweir DECL_LINK( MirrorHdl, CheckBox * ); 119cdf0e10cSrcweir DECL_LINK( ModifyHdl, Edit * ); 120cdf0e10cSrcweir DECL_LINK( ProtectHdl, TriStateBox *); 121cdf0e10cSrcweir 122cdf0e10cSrcweir void InitPos(short nAnchorType, sal_uInt16 nH, sal_uInt16 nHRel, 123cdf0e10cSrcweir sal_uInt16 nV, sal_uInt16 nVRel, 124cdf0e10cSrcweir long nX, long nY); 125cdf0e10cSrcweir sal_uInt16 GetMapPos(FrmMap *pMap, ListBox &rAlignLB); 126cdf0e10cSrcweir short GetAlignment(FrmMap *pMap, sal_uInt16 nMapPos, ListBox &rAlignLB, ListBox &rRelationLB); 127cdf0e10cSrcweir short GetRelation(FrmMap *pMap, ListBox &rRelationLB); 128cdf0e10cSrcweir short GetAnchorType(bool* pbHasChanged = 0); 129cdf0e10cSrcweir sal_uLong FillRelLB(FrmMap *pMap, sal_uInt16 nLBSelPos, sal_uInt16 nAlign, sal_uInt16 nRel, ListBox &rLB, FixedText &rFT); 130cdf0e10cSrcweir sal_uInt16 FillPosLB(FrmMap *pMap, sal_uInt16 nAlign, const sal_uInt16 _nRel, ListBox &rLB); 131cdf0e10cSrcweir 132cdf0e10cSrcweir void UpdateExample(); 133cdf0e10cSrcweir 134cdf0e10cSrcweir public: 135cdf0e10cSrcweir SvxSwPosSizeTabPage( Window* pParent, const SfxItemSet& rInAttrs ); 136cdf0e10cSrcweir ~SvxSwPosSizeTabPage(); 137cdf0e10cSrcweir 138cdf0e10cSrcweir static SfxTabPage* Create( Window*, const SfxItemSet& ); 139cdf0e10cSrcweir static sal_uInt16* GetRanges(); 140cdf0e10cSrcweir 141cdf0e10cSrcweir virtual sal_Bool FillItemSet( SfxItemSet& ); 142cdf0e10cSrcweir virtual void Reset( const SfxItemSet & ); 143cdf0e10cSrcweir 144cdf0e10cSrcweir virtual int DeactivatePage( SfxItemSet* pSet ); 145cdf0e10cSrcweir 146cdf0e10cSrcweir void EnableAnchorTypes(sal_uInt16 nAnchorEnable); 147cdf0e10cSrcweir SetValidateFramePosLink(const Link & rLink)148cdf0e10cSrcweir void SetValidateFramePosLink( const Link& rLink ) 149cdf0e10cSrcweir {m_aValidateLink = rLink;} 150cdf0e10cSrcweir 151cdf0e10cSrcweir void SetView( const SdrView* pSdrView ); 152cdf0e10cSrcweir }; 153cdf0e10cSrcweir 154cdf0e10cSrcweir #endif 155