LCOV - code coverage report
Current view: top level - cui/source/inc - page.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 0 4 0.0 %
Date: 2014-11-03 Functions: 0 3 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             : //UUUU 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             : private:
      76             :     // paper format
      77             :     ListBox*             m_pPaperSizeBox;
      78             : 
      79             :     MetricField*         m_pPaperWidthEdit;
      80             :     MetricField*         m_pPaperHeightEdit;
      81             : 
      82             :     FixedText*           m_pOrientationFT;
      83             :     RadioButton*         m_pPortraitBtn;
      84             :     RadioButton*         m_pLandscapeBtn;
      85             : 
      86             :     SvxPageWindow*       m_pBspWin;
      87             : 
      88             :     FixedText*           m_pTextFlowLbl;
      89             :     svx::FrameDirectionListBox*  m_pTextFlowBox;
      90             : 
      91             :     ListBox*             m_pPaperTrayBox;
      92             : 
      93             :     // Margins
      94             :     FixedText*           m_pLeftMarginLbl;
      95             :     MetricField*         m_pLeftMarginEdit;
      96             :     FixedText*           m_pRightMarginLbl;
      97             :     MetricField*         m_pRightMarginEdit;
      98             :     MetricField*         m_pTopMarginEdit;
      99             :     MetricField*         m_pBottomMarginEdit;
     100             : 
     101             :     // layout settings
     102             :     FixedText*           m_pPageText;
     103             :     ListBox*             m_pLayoutBox;
     104             :     ListBox*             m_pNumberFormatBox;
     105             : 
     106             :     //Extras Calc
     107             :     FixedText*           m_pTblAlignFT;
     108             :     CheckBox*            m_pHorzBox;
     109             :     CheckBox*            m_pVertBox;
     110             : 
     111             :     // Impress and Draw
     112             :     CheckBox*            m_pAdaptBox;
     113             : 
     114             :     //Register Writer
     115             :     CheckBox*            m_pRegisterCB;
     116             :     FixedText*           m_pRegisterFT;
     117             :     ListBox*             m_pRegisterLB;
     118             : 
     119             :     OUString             sStandardRegister;
     120             : 
     121             :     FixedText*           m_pInsideLbl;
     122             :     FixedText*           m_pOutsideLbl;
     123             :     FixedText*           m_pPrintRangeQueryText;
     124             : 
     125             :     long                nFirstLeftMargin;
     126             :     long                nFirstRightMargin;
     127             :     long                nFirstTopMargin;
     128             :     long                nFirstBottomMargin;
     129             :     long                nLastLeftMargin;
     130             :     long                nLastRightMargin;
     131             :     long                nLastTopMargin;
     132             :     long                nLastBottomMargin;
     133             : 
     134             :     bool                bLandscape;
     135             :     bool                bBorderModified;
     136             :     SvxModeType         eMode;
     137             :     Paper               ePaperStart;
     138             :     Paper               ePaperEnd;
     139             : 
     140             :     //UUUU SvxPage_Impl*        pImpl;
     141             :     MarginPosition      m_nPos;
     142             :     Printer*            mpDefPrinter;
     143             : 
     144             :     bool                mbDelPrinter : 1;
     145             : 
     146             :     //UUUU
     147             :     bool mbEnableDrawingLayerFillStyles : 1;
     148             : 
     149             :     void                Init_Impl();
     150             :     DECL_LINK(LayoutHdl_Impl, void *);
     151             :     DECL_LINK(PaperBinHdl_Impl, void *);
     152             :     DECL_LINK(          SwapOrientation_Impl, RadioButton* );
     153             :     void                SwapFirstValues_Impl( bool bSet );
     154             :     DECL_LINK(BorderModify_Impl, void *);
     155             :     void                InitHeadFoot_Impl( const SfxItemSet& rSet );
     156             :     DECL_LINK(CenterHdl_Impl, void *);
     157             :     void                UpdateExample_Impl( bool bResetbackground = false );
     158             : 
     159             :     DECL_LINK(          PaperSizeSelect_Impl, ListBox* );
     160             :     DECL_LINK(PaperSizeModify_Impl, void *);
     161             : 
     162             :     DECL_LINK(          FrameDirectionModify_Impl, ListBox* );
     163             : 
     164             :     void                ResetBackground_Impl( const SfxItemSet& rSet );
     165             : 
     166             :     DECL_LINK(RangeHdl_Impl, void *);
     167             :     void                CalcMargin_Impl();
     168             : 
     169             :     DECL_LINK(          RegisterModify, CheckBox * );
     170             : 
     171             :     // page direction
     172             :     /** Disables vertical page direction entries in the text flow listbox. */
     173             :     void                DisableVerticalPageDir();
     174             : 
     175             :     bool                IsPrinterRangeOverflow( MetricField& rField, long nFirstMargin,
     176             :                                                 long nLastMargin, MarginPosition nPos );
     177             :     void                CheckMarginEdits( bool _bClear );
     178             :     bool                IsMarginOutOfRange();
     179             : 
     180             :     SvxPageDescPage( vcl::Window* pParent, const SfxItemSet& rSet );
     181             : 
     182             :     //UUUU
     183           0 :     void EnableDrawingLayerFillStyles(bool bNew) { mbEnableDrawingLayerFillStyles = bNew; }
     184             : 
     185             : protected:
     186             :     virtual void        ActivatePage( const SfxItemSet& rSet ) SAL_OVERRIDE;
     187             :     virtual int         DeactivatePage( SfxItemSet* pSet = 0 ) SAL_OVERRIDE;
     188             : 
     189             : public:
     190             :     static SfxTabPage*  Create( vcl::Window* pParent, const SfxItemSet* rSet );
     191             :     static const sal_uInt16*      GetRanges();
     192             : 
     193             :     virtual bool        FillItemSet( SfxItemSet* rOutSet ) SAL_OVERRIDE;
     194             :     virtual void        Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
     195             :     virtual void        FillUserData() SAL_OVERRIDE;
     196             : 
     197             :     virtual ~SvxPageDescPage();
     198             : 
     199           0 :     void                SetMode( SvxModeType eMType ) { eMode = eMType; }
     200           0 :     void                SetPaperFormatRanges( Paper eStart, Paper eEnd )
     201           0 :                             { ePaperStart = eStart, ePaperEnd = eEnd; }
     202             : 
     203             :     void                SetCollectionList(const std::vector<OUString> &aList);
     204             :     virtual void        PageCreated(const SfxAllItemSet& aSet) SAL_OVERRIDE;
     205             : };
     206             : 
     207             : #endif // INCLUDED_CUI_SOURCE_INC_PAGE_HXX
     208             : 
     209             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10