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

Generated by: LCOV version 1.11