LCOV - code coverage report
Current view: top level - cui/source/inc - page.hxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 3 0.0 %
Date: 2014-04-14 Functions: 0 2 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             : #ifndef INCLUDED_CUI_SOURCE_INC_PAGE_HXX
      20             : #define INCLUDED_CUI_SOURCE_INC_PAGE_HXX
      21             : 
      22             : #include <sfx2/tabdlg.hxx>
      23             : #include <vcl/field.hxx>
      24             : #include <vcl/fixed.hxx>
      25             : #include <vcl/group.hxx>
      26             : #include <vcl/lstbox.hxx>
      27             : #include <svtools/stdctrl.hxx>
      28             : #include <svx/pagectrl.hxx>
      29             : #include <svx/frmdirlbox.hxx>
      30             : #include <editeng/svxenum.hxx>
      31             : #include <i18nutil/paper.hxx>
      32             : #include <svx/flagsdef.hxx>
      33             : 
      34             : // class SvxPageDescPage -------------------------------------------------
      35             : /*
      36             :     [Description]
      37             :     TabPage for page settings (size, margins, ...)
      38             : 
      39             :     [Items]
      40             :     <SvxPageItem>:          <SID_ATTR_PAGE>
      41             :     <SvxSizeItem>:          <SID_ATTR_SIZE>
      42             :     <SvxSizeItem>:          <SID_ATTR_MAXSIZE>
      43             :     <SvxULSpaceItem>:       <SID_ATTR_LRSPACE>
      44             :     <SvxLRSpaceItem>:       <SID_ATTR_ULSPACE>
      45             :     <SfxAllEnumItem>:       <SID_ATTR_PAPERTRAY>
      46             :     <SvxPaperBinItem>:      <SID_ATTR_PAPERBIN>
      47             :     <SvxBoolItem>:          <SID_ATTR_EXT1>
      48             :     <SvxBoolItem>:          <SID_ATTR_EXT2>
      49             : 
      50             :     <SfxSetItem>:           <SID_ATTR_HEADERSET>
      51             :         <SfxBoolItem>:          <SID_ATTR_ON>
      52             :         <SfxBoolItem>:          <SID_ATTR_DYNAMIC>
      53             :         <SfxBoolItem>:          <SID_ATTR_SHARED>
      54             :         <SvxSizeItem>:          <SID_ATTR_SIZE>
      55             :         <SvxULSpaceItem>:       <SID_ATTR_ULSPACE>
      56             :         <SvxLRSpaceItem>:       <SID_ATTR_LRSPACE>
      57             : 
      58             :     <SfxSetItem>:           <SID_ATTR_FOOTERSET>
      59             :         <SfxBoolItem>:          <SID_ATTR_ON>
      60             :         <SfxBoolItem>:          <SID_ATTR_DYNAMIC>
      61             :         <SfxBoolItem>:          <SID_ATTR_SHARED>
      62             :         <SvxSizeItem>:          <SID_ATTR_SIZE>
      63             :         <SvxULSpaceItem>:       <SID_ATTR_ULSPACE>
      64             :         <SvxLRSpaceItem>:       <SID_ATTR_LRSPACE>
      65             : */
      66             : 
      67             : struct  SvxPage_Impl;
      68             : typedef sal_uInt16 MarginPosition;
      69             : 
      70             : class SvxPageDescPage : public SfxTabPage
      71             : {
      72             :     using TabPage::ActivatePage;
      73             :     using TabPage::DeactivatePage;
      74             : 
      75             :     // paper format
      76             :     ListBox*             m_pPaperSizeBox;
      77             : 
      78             :     MetricField*         m_pPaperWidthEdit;
      79             :     MetricField*         m_pPaperHeightEdit;
      80             : 
      81             :     FixedText*           m_pOrientationFT;
      82             :     RadioButton*         m_pPortraitBtn;
      83             :     RadioButton*         m_pLandscapeBtn;
      84             : 
      85             :     SvxPageWindow*       m_pBspWin;
      86             : 
      87             :     FixedText*           m_pTextFlowLbl;
      88             :     svx::FrameDirectionListBox*  m_pTextFlowBox;
      89             : 
      90             :     ListBox*             m_pPaperTrayBox;
      91             : 
      92             :     // Margins
      93             :     FixedText*           m_pLeftMarginLbl;
      94             :     MetricField*         m_pLeftMarginEdit;
      95             :     FixedText*           m_pRightMarginLbl;
      96             :     MetricField*         m_pRightMarginEdit;
      97             :     MetricField*         m_pTopMarginEdit;
      98             :     MetricField*         m_pBottomMarginEdit;
      99             : 
     100             :     // layout settings
     101             :     FixedText*           m_pPageText;
     102             :     ListBox*             m_pLayoutBox;
     103             :     ListBox*             m_pNumberFormatBox;
     104             : 
     105             :     //Extras Calc
     106             :     FixedText*           m_pTblAlignFT;
     107             :     CheckBox*            m_pHorzBox;
     108             :     CheckBox*            m_pVertBox;
     109             : 
     110             :     // Impress and Draw
     111             :     CheckBox*            m_pAdaptBox;
     112             : 
     113             :     //Register Writer
     114             :     CheckBox*            m_pRegisterCB;
     115             :     FixedText*           m_pRegisterFT;
     116             :     ListBox*             m_pRegisterLB;
     117             : 
     118             :     OUString             sStandardRegister;
     119             : 
     120             :     FixedText*           m_pInsideLbl;
     121             :     FixedText*           m_pOutsideLbl;
     122             :     FixedText*           m_pPrintRangeQueryText;
     123             : 
     124             :     long                nFirstLeftMargin;
     125             :     long                nFirstRightMargin;
     126             :     long                nFirstTopMargin;
     127             :     long                nFirstBottomMargin;
     128             :     long                nLastLeftMargin;
     129             :     long                nLastRightMargin;
     130             :     long                nLastTopMargin;
     131             :     long                nLastBottomMargin;
     132             : 
     133             :     Size                aMaxSize;
     134             :     sal_Bool                bLandscape;
     135             :     bool                bBorderModified;
     136             :     SvxModeType         eMode;
     137             :     Paper               ePaperStart;
     138             :     Paper               ePaperEnd;
     139             : 
     140             :     SvxPage_Impl*       pImpl;
     141             : 
     142             :     void                Init_Impl();
     143             :     DECL_LINK(LayoutHdl_Impl, void *);
     144             :     DECL_LINK(PaperBinHdl_Impl, void *);
     145             :     DECL_LINK(          SwapOrientation_Impl, RadioButton* );
     146             :     void                SwapFirstValues_Impl( bool bSet );
     147             :     DECL_LINK(BorderModify_Impl, void *);
     148             :     void                InitHeadFoot_Impl( const SfxItemSet& rSet );
     149             :     DECL_LINK(CenterHdl_Impl, void *);
     150             :     void                UpdateExample_Impl( bool bResetbackground = false );
     151             : 
     152             :     DECL_LINK(          PaperSizeSelect_Impl, ListBox* );
     153             :     DECL_LINK(PaperSizeModify_Impl, void *);
     154             : 
     155             :     DECL_LINK(          FrameDirectionModify_Impl, ListBox* );
     156             : 
     157             :     void                ResetBackground_Impl( const SfxItemSet& rSet );
     158             : 
     159             :     DECL_LINK(RangeHdl_Impl, void *);
     160             :     void                CalcMargin_Impl();
     161             : 
     162             :     DECL_LINK(          RegisterModify, CheckBox * );
     163             : 
     164             :     // page direction
     165             :     /** Disables vertical page direction entries in the text flow listbox. */
     166             :     void                DisableVerticalPageDir();
     167             : 
     168             :     bool                IsPrinterRangeOverflow( MetricField& rField, long nFirstMargin,
     169             :                                                 long nLastMargin, MarginPosition nPos );
     170             :     void                CheckMarginEdits( bool _bClear );
     171             :     bool                IsMarginOutOfRange();
     172             : 
     173             :     SvxPageDescPage( Window* pParent, const SfxItemSet& rSet );
     174             : 
     175             : protected:
     176             :     virtual void        ActivatePage( const SfxItemSet& rSet ) SAL_OVERRIDE;
     177             :     virtual int         DeactivatePage( SfxItemSet* pSet = 0 ) SAL_OVERRIDE;
     178             : 
     179             : public:
     180             :     static SfxTabPage*  Create( Window* pParent, const SfxItemSet& rSet );
     181             :     static sal_uInt16*      GetRanges();
     182             : 
     183             :     virtual bool        FillItemSet( SfxItemSet& rOutSet ) SAL_OVERRIDE;
     184             :     virtual void        Reset( const SfxItemSet& rSet ) SAL_OVERRIDE;
     185             :     virtual void        FillUserData() SAL_OVERRIDE;
     186             : 
     187             :     virtual ~SvxPageDescPage();
     188             : 
     189           0 :     void                SetMode( SvxModeType eMType ) { eMode = eMType; }
     190           0 :     void                SetPaperFormatRanges( Paper eStart, Paper eEnd )
     191           0 :                             { ePaperStart = eStart, ePaperEnd = eEnd; }
     192             : 
     193             :     void                SetCollectionList(const std::vector<OUString> &aList);
     194             :     virtual void        PageCreated (SfxAllItemSet aSet) SAL_OVERRIDE;
     195             : };
     196             : 
     197             : #endif // INCLUDED_CUI_SOURCE_INC_PAGE_HXX
     198             : 
     199             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10