LCOV - code coverage report
Current view: top level - sw/source/uibase/inc - frmpage.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 0 6 0.0 %
Date: 2014-11-03 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 INCLUDED_SW_SOURCE_UIBASE_INC_FRMPAGE_HXX
      21             : #define INCLUDED_SW_SOURCE_UIBASE_INC_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             : // frame dialog
      42             : class SwFrmPage: public SfxTabPage
      43             : {
      44             :     // size
      45             :     FixedText*       m_pWidthFT;
      46             :     FixedText*       m_pWidthAutoFT;
      47             :     PercentField m_aWidthED;
      48             :     CheckBox*        m_pRelWidthCB;
      49             :     ListBox*         m_pRelWidthRelationLB;
      50             :     CheckBox*        m_pAutoWidthCB;
      51             : 
      52             :     FixedText*       m_pHeightFT;
      53             :     FixedText*       m_pHeightAutoFT;
      54             :     PercentField m_aHeightED;
      55             :     CheckBox*        m_pRelHeightCB;
      56             :     ListBox*         m_pRelHeightRelationLB;
      57             :     CheckBox*        m_pAutoHeightCB;
      58             : 
      59             :     CheckBox*        m_pFixedRatioCB;
      60             :     PushButton*      m_pRealSizeBT;
      61             : 
      62             :     // anchor
      63             :     VclContainer*    m_pAnchorFrame;
      64             :     RadioButton*     m_pAnchorAtPageRB;
      65             :     RadioButton*     m_pAnchorAtParaRB;
      66             :     RadioButton*     m_pAnchorAtCharRB;
      67             :     RadioButton*     m_pAnchorAsCharRB;
      68             :     RadioButton*     m_pAnchorAtFrameRB;
      69             : 
      70             :     // position
      71             :     FixedText*       m_pHorizontalFT;
      72             :     ListBox*         m_pHorizontalDLB;
      73             :     FixedText*       m_pAtHorzPosFT;
      74             :     MetricField*     m_pAtHorzPosED;
      75             :     FixedText*       m_pHoriRelationFT;
      76             :     ListBox*         m_pHoriRelationLB;
      77             : 
      78             :     CheckBox*        m_pMirrorPagesCB;
      79             : 
      80             :     FixedText*       m_pVerticalFT;
      81             :     ListBox*         m_pVerticalDLB;
      82             :     FixedText*       m_pAtVertPosFT;
      83             :     MetricField*     m_pAtVertPosED;
      84             :     FixedText*       m_pVertRelationFT;
      85             :     ListBox*         m_pVertRelationLB;
      86             :     // #i18732# - check box for new option 'FollowTextFlow'
      87             :     CheckBox*        m_pFollowTextFlowCB;
      88             : 
      89             :     // example
      90             :     SvxSwFrameExample*  m_pExampleWN;
      91             : 
      92             :     //'string provider'
      93             :     SvxSwFramePosString aFramePosString;
      94             : 
      95             :     bool            bAtHorzPosModified;
      96             :     bool            bAtVertPosModified;
      97             : 
      98             :     bool            bFormat;
      99             :     bool            bNew;
     100             :     bool            bNoModifyHdl;
     101             :     bool            bIsVerticalFrame;  //current frame is in vertical environment - strings are exchanged
     102             :     // --> OD 2009-08-31 #mongolianlayou#
     103             :     bool            bIsVerticalL2R;
     104             :     bool            bIsInRightToLeft; // current frame is in right-to-left environment - strings are exchanged
     105             :     bool            bHtmlMode;
     106             :     sal_uInt16          nHtmlMode;
     107             :     OString         sDlgType;
     108             :     Size            aGrfSize;
     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             :     sal_Int16 nOldH;
     119             :     sal_Int16 nOldHRel;
     120             :     sal_Int16 nOldV;
     121             :     sal_Int16 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) SAL_OVERRIDE;
     131             :     virtual int     DeactivatePage(SfxItemSet *pSet) SAL_OVERRIDE;
     132             : 
     133             :     DECL_LINK(RangeModifyHdl, void *);
     134             :     DECL_LINK(AnchorTypeHdl, void *);
     135             :     DECL_LINK( PosHdl, ListBox * );
     136             :     DECL_LINK( RelHdl, ListBox * );
     137             :     void            InitPos(RndStdIds eId, sal_Int16 nH, sal_Int16 nHRel,
     138             :                             sal_Int16 nV, sal_Int16 nVRel,
     139             :                             long   nX,  long   nY);
     140             : 
     141             :     DECL_LINK(RealSizeHdl, void *);
     142             :     DECL_LINK( RelSizeClickHdl, CheckBox * );
     143             :     DECL_LINK(MirrorHdl, void *);
     144             : 
     145             :     DECL_LINK( AutoWidthClickHdl, void* );
     146             :     DECL_LINK( AutoHeightClickHdl, void* );
     147             : 
     148             :     // update example
     149             :     void            UpdateExample();
     150             :     DECL_LINK( ModifyHdl, Edit * );
     151             : 
     152             :     void            Init(const SfxItemSet& rSet, bool bReset = false);
     153             :     // OD 12.11.2003 #i22341# - adjustment to handle maps, that are ambigous
     154             :     //                          in the alignment.
     155             :     sal_Int32       FillPosLB( const FrmMap* _pMap,
     156             :                                const sal_Int16 _nAlign,
     157             :                                const sal_Int16 _nRel,
     158             :                                ListBox& _rLB );
     159             :     // OD 14.11.2003 #i22341# - adjustment to handle maps, that are ambigous
     160             :     //                          in their string entries.
     161             :     sal_uLong       FillRelLB( const FrmMap* _pMap,
     162             :                                const sal_uInt16 _nLBSelPos,
     163             :                                const sal_Int16 _nAlign,
     164             :                                const sal_Int16 _nRel,
     165             :                                ListBox& _rLB,
     166             :                                FixedText& _rFT );
     167             :     sal_Int32       GetMapPos( const FrmMap *pMap, ListBox &rAlignLB );
     168             :     sal_Int16       GetAlignment(FrmMap *pMap, sal_Int32 nMapPos, ListBox &rAlignLB, ListBox &rRelationLB);
     169             :     sal_Int16       GetRelation(FrmMap *pMap, ListBox &rRelationLB);
     170             :     RndStdIds       GetAnchor();
     171             : 
     172             :     void setOptimalFrmWidth();
     173             :     void setOptimalRelWidth();
     174             : 
     175             :     void            EnableGraficMode( void );   // hides auto check boxes and re-org controls for "Real Size" button
     176             : 
     177             :     SwFrmPage(vcl::Window *pParent, const SfxItemSet &rSet);
     178             :     virtual ~SwFrmPage();
     179             : 
     180             :     SwWrtShell *getFrmDlgParentShell();
     181             : 
     182             :     using SfxTabPage::ActivatePage;
     183             :     using SfxTabPage::DeactivatePage;
     184             : 
     185             : public:
     186             : 
     187             :     static SfxTabPage *Create(vcl::Window *pParent, const SfxItemSet *rSet);
     188             :     static const sal_uInt16* GetRanges();
     189             : 
     190             :     virtual bool FillItemSet(SfxItemSet *rSet) SAL_OVERRIDE;
     191             :     virtual void Reset(const SfxItemSet *rSet) SAL_OVERRIDE;
     192             : 
     193           0 :     void            SetNewFrame(bool bNewFrame) { bNew      = bNewFrame; }
     194             :     void            SetFormatUsed(bool bFmt);
     195           0 :     void            SetFrmType(const OString &rType) { sDlgType  = rType; }
     196           0 :     inline bool     IsInGraficMode( void ) { return sDlgType == "PictureDialog" || sDlgType == "ObjectDialog"; }
     197             :     void            EnableVerticalPositioning( bool bEnable );
     198             : };
     199             : 
     200             : class SwGrfExtPage: public SfxTabPage
     201             : {
     202             :     // mirror
     203             :     VclContainer*   m_pMirror;
     204             :     CheckBox*       m_pMirrorVertBox;
     205             :     CheckBox*       m_pMirrorHorzBox;
     206             :     RadioButton*    m_pAllPagesRB;
     207             :     RadioButton*    m_pLeftPagesRB;
     208             :     RadioButton*    m_pRightPagesRB;
     209             :     BmpWindow*      m_pBmpWin;
     210             : 
     211             :     Edit*           m_pConnectED;
     212             :     PushButton*     m_pBrowseBT;
     213             : 
     214             :     OUString        aFilterName;
     215             :     OUString        aGrfName, aNewGrfName;
     216             : 
     217             :     ::sfx2::FileDialogHelper*     pGrfDlg;
     218             : 
     219             :     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) SAL_OVERRIDE;
     226             :     SwGrfExtPage(vcl::Window *pParent, const SfxItemSet &rSet);
     227             :     virtual ~SwGrfExtPage();
     228             : 
     229             :     using SfxTabPage::ActivatePage;
     230             :     using SfxTabPage::DeactivatePage;
     231             : 
     232             : public:
     233             : 
     234             :     static SfxTabPage *Create(vcl::Window *pParent, const SfxItemSet *rSet);
     235             : 
     236             :     virtual bool FillItemSet(SfxItemSet *rSet) SAL_OVERRIDE;
     237             :     virtual void Reset(const SfxItemSet *rSet) SAL_OVERRIDE;
     238             :     virtual int  DeactivatePage(SfxItemSet *pSet) SAL_OVERRIDE;
     239             : };
     240             : 
     241             : class SwFrmURLPage : public SfxTabPage
     242             : {
     243             :     // hyperlink
     244             :     Edit*            pURLED;
     245             :     PushButton*      pSearchPB;
     246             :     Edit*            pNameED;
     247             :     ComboBox*        pFrameCB;
     248             : 
     249             :     // image map
     250             :     CheckBox*        pServerCB;
     251             :     CheckBox*        pClientCB;
     252             : 
     253             :     DECL_LINK(InsertFileHdl, void *);
     254             : 
     255             :     SwFrmURLPage(vcl::Window *pParent, const SfxItemSet &rSet);
     256             :     virtual ~SwFrmURLPage();
     257             : 
     258             :     using SfxTabPage::ActivatePage;
     259             :     using SfxTabPage::DeactivatePage;
     260             : 
     261             : public:
     262             : 
     263             :     static SfxTabPage *Create(vcl::Window *pParent, const SfxItemSet *rSet);
     264             : 
     265             :     virtual bool FillItemSet(SfxItemSet *rSet) SAL_OVERRIDE;
     266             :     virtual void Reset(const SfxItemSet *rSet) SAL_OVERRIDE;
     267             : };
     268             : 
     269             : class SwFrmAddPage : public SfxTabPage
     270             : {
     271             :     VclContainer* pNameFrame;
     272             :     FixedText*    pNameFT;
     273             :     Edit*         pNameED;
     274             :     FixedText*    pAltNameFT;
     275             :     Edit*         pAltNameED;
     276             :     FixedText*    pPrevFT;
     277             :     ListBox*      pPrevLB;
     278             :     FixedText*    pNextFT;
     279             :     ListBox*      pNextLB;
     280             : 
     281             :     VclContainer* pProtectFrame;
     282             :     CheckBox*     pProtectContentCB;
     283             :     CheckBox*     pProtectFrameCB;
     284             :     CheckBox*     pProtectSizeCB;
     285             : 
     286             :     VclContainer* m_pContentAlignFrame;
     287             :     ListBox*      m_pVertAlignLB;
     288             : 
     289             :     VclContainer* pPropertiesFrame;
     290             :     CheckBox*     pEditInReadonlyCB;
     291             :     CheckBox*     pPrintFrameCB;
     292             :     FixedText*    pTextFlowFT;
     293             :     ListBox*      pTextFlowLB;
     294             : 
     295             :     SwWrtShell*   pWrtSh;
     296             : 
     297             :     OString       sDlgType;
     298             :     bool      bHtmlMode;
     299             :     bool      bFormat;
     300             :     bool      bNew;
     301             : 
     302             :     DECL_LINK(EditModifyHdl, void *);
     303             :     DECL_LINK(ChainModifyHdl, ListBox*);
     304             : 
     305             :     SwFrmAddPage(vcl::Window *pParent, const SfxItemSet &rSet);
     306             :     virtual ~SwFrmAddPage();
     307             : 
     308             : public:
     309             : 
     310             :     static SfxTabPage*  Create(vcl::Window *pParent, const SfxItemSet *rSet);
     311             :     static const sal_uInt16*      GetRanges();
     312             : 
     313             :     virtual bool FillItemSet(SfxItemSet *rSet) SAL_OVERRIDE;
     314             :     virtual void Reset(const SfxItemSet *rSet) SAL_OVERRIDE;
     315             : 
     316             :     void            SetFormatUsed(bool bFmt);
     317           0 :     void            SetFrmType(const OString &rType) { sDlgType = rType; }
     318           0 :     void            SetNewFrame(bool bNewFrame) { bNew  = bNewFrame; }
     319           0 :     void            SetShell(SwWrtShell* pSh) { pWrtSh  = pSh; }
     320             : 
     321             : };
     322             : 
     323             : #endif // INCLUDED_SW_SOURCE_UIBASE_INC_FRMPAGE_HXX
     324             : 
     325             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10