LCOV - code coverage report
Current view: top level - libreoffice/sw/source/ui/inc - frmpage.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 6 0.0 %
Date: 2012-12-27 Functions: 0 6 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       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/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      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 .
      18             :  */
      19             : 
      20             : #ifndef _FRMPAGE_HXX
      21             : #define _FRMPAGE_HXX
      22             : 
      23             : #include <vcl/fixed.hxx>
      24             : #include <vcl/button.hxx>
      25             : #include <vcl/lstbox.hxx>
      26             : #include <vcl/field.hxx>
      27             : #include <sfx2/tabdlg.hxx>
      28             : #include <svx/swframeposstrings.hxx>
      29             : #include <swtypes.hxx>
      30             : #include <bmpwin.hxx>
      31             : #include <svx/swframeexample.hxx>
      32             : #include <prcntfld.hxx>
      33             : #include <globals.hrc>
      34             : 
      35             : namespace sfx2{class FileDialogHelper;}
      36             : class SwWrtShell;
      37             : struct FrmMap;
      38             : // OD 12.11.2003 #i22341#
      39             : struct SwPosition;
      40             : 
      41             : /*--------------------------------------------------------------------
      42             :      Description:   frame dialog
      43             :  --------------------------------------------------------------------*/
      44             : class SwFrmPage: public SfxTabPage
      45             : {
      46             :     // size
      47             :     FixedLine       aSizeFL;
      48             :     FixedText       aWidthFT;
      49             :     FixedText       aWidthAutoFT;
      50             :     PercentField    aWidthED;
      51             :     CheckBox        aRelWidthCB;
      52             :     CheckBox        aAutoWidthCB;
      53             :     FixedText       aHeightFT;
      54             :     FixedText       aHeightAutoFT;
      55             :     PercentField    aHeightED;
      56             :     CheckBox        aRelHeightCB;
      57             :     CheckBox        aAutoHeightCB;
      58             :     CheckBox        aFixedRatioCB;
      59             :     PushButton      aRealSizeBT;
      60             : 
      61             :     // anchor
      62             :     FixedLine       aTypeSepFL;
      63             :     FixedLine       aTypeFL;
      64             :     RadioButton     aAnchorAtPageRB;
      65             :     RadioButton     aAnchorAtParaRB;
      66             :     RadioButton     aAnchorAtCharRB;
      67             :     RadioButton     aAnchorAsCharRB;
      68             :     RadioButton     aAnchorAtFrameRB;
      69             : 
      70             :     // position
      71             :     FixedLine       aPositionFL;
      72             :     FixedText       aHorizontalFT;
      73             :     ListBox         aHorizontalDLB;
      74             :     FixedText       aAtHorzPosFT;
      75             :     MetricField     aAtHorzPosED;
      76             :     FixedText       aHoriRelationFT;
      77             :     ListBox         aHoriRelationLB;
      78             :     CheckBox        aMirrorPagesCB;
      79             :     FixedText       aVerticalFT;
      80             :     ListBox         aVerticalDLB;
      81             :     FixedText       aAtVertPosFT;
      82             :     MetricField     aAtVertPosED;
      83             :     FixedText       aVertRelationFT;
      84             :     ListBox         aVertRelationLB;
      85             :     // OD 02.10.2003 #i18732# - check box for new option 'FollowTextFlow'
      86             :     CheckBox        aFollowTextFlowCB;
      87             : 
      88             :     // example
      89             :     SvxSwFrameExample   aExampleWN;
      90             : 
      91             :     //'string provider'
      92             :     SvxSwFramePosString aFramePosString;
      93             : 
      94             :     sal_Bool            bAtHorzPosModified;
      95             :     sal_Bool            bAtVertPosModified;
      96             : 
      97             :     sal_Bool            bFormat;
      98             :     sal_Bool            bNew;
      99             :     sal_Bool            bNoModifyHdl;
     100             :     sal_Bool            bIsVerticalFrame;  //current frame is in vertical environment - strings are exchanged
     101             :     // --> OD 2009-08-31 #mongolianlayou#
     102             :     sal_Bool            bIsVerticalL2R;
     103             :     sal_Bool            bIsInRightToLeft; // current frame is in right-to-left environment - strings are exchanged
     104             :     sal_Bool            bHtmlMode;
     105             :     sal_uInt16          nHtmlMode;
     106             :     sal_uInt16          nDlgType;
     107             :     Size            aGrfSize;
     108             :     Size            aWrap;
     109             :     SwTwips         nUpperBorder;
     110             :     SwTwips         nLowerBorder;
     111             :     double          fWidthHeightRatio; //width-to-height ratio to support the KeepRatio button
     112             : 
     113             :     // OD 12.11.2003 #i22341# - keep content position of character for
     114             :     // to character anchored objects.
     115             :     const SwPosition* mpToCharCntntPos;
     116             : 
     117             :     // old alignment
     118             :     short        nOldH;
     119             :     short    nOldHRel;
     120             :     short        nOldV;
     121             :     short    nOldVRel;
     122             : 
     123             :     FrmMap* pVMap;
     124             :     FrmMap* pHMap;
     125             : 
     126             :     bool    m_bAllowVertPositioning;
     127             :     bool    m_bIsMathOLE;
     128             :     bool    m_bIsMathBaselineAlignment;
     129             : 
     130             :     virtual void    ActivatePage(const SfxItemSet& rSet);
     131             :     virtual int     DeactivatePage(SfxItemSet *pSet);
     132             : 
     133             : 
     134             :     DECL_LINK(RangeModifyHdl, void *);
     135             :     DECL_LINK(AnchorTypeHdl, void *);
     136             :     DECL_LINK( PosHdl, ListBox * );
     137             :     DECL_LINK( RelHdl, ListBox * );
     138             :     void            InitPos(RndStdIds eId, sal_uInt16 nH, sal_uInt16 nHRel,
     139             :                             sal_uInt16 nV,  sal_uInt16 nVRel,
     140             :                             long   nX,  long   nY);
     141             : 
     142             :     DECL_LINK(RealSizeHdl, void *);
     143             :     DECL_LINK( RelSizeClickHdl, CheckBox * );
     144             :     DECL_LINK(MirrorHdl, void *);
     145             : 
     146             :     DECL_LINK( AutoWidthClickHdl, void* );
     147             :     DECL_LINK( AutoHeightClickHdl, void* );
     148             : 
     149             :     // update example
     150             :     void            UpdateExample();
     151             :     DECL_LINK( ModifyHdl, Edit * );
     152             : 
     153             :     void            Init(const SfxItemSet& rSet, sal_Bool bReset = sal_False);
     154             :     // OD 12.11.2003 #i22341# - adjustment to handle maps, that are ambigous
     155             :     //                          in the alignment.
     156             :     sal_uInt16          FillPosLB( const FrmMap* _pMap,
     157             :                                const sal_uInt16 _nAlign,
     158             :                                const sal_uInt16 _nRel,
     159             :                                ListBox& _rLB );
     160             :     // OD 14.11.2003 #i22341# - adjustment to handle maps, that are ambigous
     161             :     //                          in their string entries.
     162             :     sal_uLong           FillRelLB( const FrmMap* _pMap,
     163             :                                const sal_uInt16 _nLBSelPos,
     164             :                                const sal_uInt16 _nAlign,
     165             :                                sal_uInt16 _nRel,
     166             :                                ListBox& _rLB,
     167             :                                FixedText& _rFT );
     168             :     sal_uInt16          GetMapPos( const FrmMap *pMap, ListBox &rAlignLB );
     169             :     short           GetAlignment(FrmMap *pMap, sal_uInt16 nMapPos, ListBox &rAlignLB, ListBox &rRelationLB);
     170             :     short           GetRelation(FrmMap *pMap, ListBox &rRelationLB);
     171             :     RndStdIds       GetAnchor();
     172             : 
     173             :     void            EnableGraficMode( void );   // hides auto check boxes and re-org controls for "Real Size" button
     174             : 
     175             :     SwFrmPage(Window *pParent, const SfxItemSet &rSet);
     176             :     ~SwFrmPage();
     177             : 
     178             :     SwWrtShell *getFrmDlgParentShell();
     179             : 
     180             :     using SfxTabPage::ActivatePage;
     181             :     using SfxTabPage::DeactivatePage;
     182             : 
     183             : public:
     184             : 
     185             :     static SfxTabPage *Create(Window *pParent, const SfxItemSet &rSet);
     186             :     static sal_uInt16* GetRanges();
     187             : 
     188             :     virtual sal_Bool FillItemSet(SfxItemSet &rSet);
     189             :     virtual void Reset(const SfxItemSet &rSet);
     190             : 
     191           0 :     void            SetNewFrame(sal_Bool bNewFrame) { bNew      = bNewFrame; }
     192             :     void            SetFormatUsed(sal_Bool bFmt);
     193           0 :     void            SetFrmType(sal_uInt16 nType)    { nDlgType  = nType;     }
     194           0 :     inline sal_Bool     IsInGraficMode( void )      { return nDlgType == DLG_FRM_GRF || nDlgType == DLG_FRM_OLE; }
     195             :     void            EnableVerticalPositioning( bool bEnable );
     196             : };
     197             : 
     198             : class SwGrfExtPage: public SfxTabPage
     199             : {
     200             :     // mirror
     201             :     FixedLine       aMirrorFL;
     202             :     CheckBox        aMirrorVertBox;
     203             :     CheckBox        aMirrorHorzBox;
     204             :     RadioButton     aAllPagesRB;
     205             :     RadioButton     aLeftPagesRB;
     206             :     RadioButton     aRightPagesRB;
     207             :     BmpWindow       aBmpWin;
     208             : 
     209             :     FixedLine       aConnectFL;
     210             :     FixedText       aConnectFT;
     211             :     Edit            aConnectED;
     212             :     PushButton      aBrowseBT;
     213             : 
     214             :     String          aFilterName;
     215             :     String          aGrfName, aNewGrfName;
     216             : 
     217             :     ::sfx2::FileDialogHelper*     pGrfDlg;
     218             : 
     219             :     sal_Bool            bHtmlMode;
     220             : 
     221             :     // handler for mirroring
     222             :     DECL_LINK(MirrorHdl, void *);
     223             :     DECL_LINK(BrowseHdl, void *);
     224             : 
     225             :     virtual void    ActivatePage(const SfxItemSet& rSet);
     226             :     SwGrfExtPage(Window *pParent, const SfxItemSet &rSet);
     227             :     ~SwGrfExtPage();
     228             : 
     229             :     using SfxTabPage::ActivatePage;
     230             :     using SfxTabPage::DeactivatePage;
     231             : 
     232             : public:
     233             : 
     234             :     static SfxTabPage *Create(Window *pParent, const SfxItemSet &rSet);
     235             : 
     236             :     virtual sal_Bool FillItemSet(SfxItemSet &rSet);
     237             :     virtual void Reset(const SfxItemSet &rSet);
     238             :     virtual int  DeactivatePage(SfxItemSet *pSet);
     239             : };
     240             : 
     241             : class SwFrmURLPage : public SfxTabPage
     242             : {
     243             :     // hyperlink
     244             :     FixedLine       aHyperLinkFL;
     245             :     FixedText       aURLFT;
     246             :     Edit            aURLED;
     247             :     PushButton      aSearchPB;
     248             :     FixedText       aNameFT;
     249             :     Edit            aNameED;
     250             :     FixedText       aFrameFT;
     251             :     ComboBox        aFrameCB;
     252             : 
     253             :     // image map
     254             :     FixedLine       aImageFL;
     255             :     CheckBox        aServerCB;
     256             :     CheckBox        aClientCB;
     257             : 
     258             :     DECL_LINK(InsertFileHdl, void *);
     259             : 
     260             : 
     261             :     SwFrmURLPage(Window *pParent, const SfxItemSet &rSet);
     262             :     ~SwFrmURLPage();
     263             : 
     264             :     using SfxTabPage::ActivatePage;
     265             :     using SfxTabPage::DeactivatePage;
     266             : 
     267             : public:
     268             : 
     269             :     static SfxTabPage *Create(Window *pParent, const SfxItemSet &rSet);
     270             : 
     271             :     virtual sal_Bool FillItemSet(SfxItemSet &rSet);
     272             :     virtual void Reset(const SfxItemSet &rSet);
     273             : };
     274             : 
     275             : class SwFrmAddPage : public SfxTabPage
     276             : {
     277             :       FixedLine   aNamesFL;
     278             :     FixedText   aNameFT;
     279             :     Edit        aNameED;
     280             :     FixedText   aAltNameFT;
     281             :     Edit        aAltNameED;
     282             :     FixedText   aPrevFT;
     283             :     ListBox     aPrevLB;
     284             :     FixedText   aNextFT;
     285             :     ListBox     aNextLB;
     286             :         FixedLine   aProtectFL;
     287             : 
     288             :     CheckBox    aProtectContentCB;
     289             :     CheckBox    aProtectFrameCB;
     290             :     CheckBox    aProtectSizeCB;
     291             :     FixedLine   aExtFL;
     292             : 
     293             :     CheckBox    aEditInReadonlyCB;
     294             :     CheckBox    aPrintFrameCB;
     295             :     FixedText   aTextFlowFT;
     296             :     ListBox     aTextFlowLB;
     297             : 
     298             : 
     299             :     SwWrtShell* pWrtSh;
     300             : 
     301             :     sal_uInt16      nDlgType;
     302             :     sal_Bool        bHtmlMode;
     303             :     sal_Bool        bFormat;
     304             :     sal_Bool        bNew;
     305             : 
     306             :     DECL_LINK(EditModifyHdl, void *);
     307             :     DECL_LINK(ChainModifyHdl, ListBox*);
     308             : 
     309             :     SwFrmAddPage(Window *pParent, const SfxItemSet &rSet);
     310             :     ~SwFrmAddPage();
     311             : 
     312             : public:
     313             : 
     314             :     static SfxTabPage*  Create(Window *pParent, const SfxItemSet &rSet);
     315             :     static sal_uInt16*      GetRanges();
     316             : 
     317             :     virtual sal_Bool FillItemSet(SfxItemSet &rSet);
     318             :     virtual void Reset(const SfxItemSet &rSet);
     319             : 
     320             :     void            SetFormatUsed(sal_Bool bFmt);
     321           0 :     void            SetFrmType(sal_uInt16 nType) { nDlgType = nType; }
     322           0 :     void            SetNewFrame(sal_Bool bNewFrame) { bNew  = bNewFrame; }
     323           0 :     void            SetShell(SwWrtShell* pSh) { pWrtSh  = pSh; }
     324             : 
     325             : };
     326             : 
     327             : #endif // _FRMPAGE_HXX
     328             : 
     329             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10