LCOV - code coverage report
Current view: top level - cui/source/inc - page.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 3 0.0 %
Date: 2012-08-25 Functions: 0 2 0.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2                 :            : /*************************************************************************
       3                 :            :  *
       4                 :            :  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       5                 :            :  *
       6                 :            :  * Copyright 2000, 2010 Oracle and/or its affiliates.
       7                 :            :  *
       8                 :            :  * OpenOffice.org - a multi-platform office productivity suite
       9                 :            :  *
      10                 :            :  * This file is part of OpenOffice.org.
      11                 :            :  *
      12                 :            :  * OpenOffice.org is free software: you can redistribute it and/or modify
      13                 :            :  * it under the terms of the GNU Lesser General Public License version 3
      14                 :            :  * only, as published by the Free Software Foundation.
      15                 :            :  *
      16                 :            :  * OpenOffice.org is distributed in the hope that it will be useful,
      17                 :            :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      18                 :            :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      19                 :            :  * GNU Lesser General Public License version 3 for more details
      20                 :            :  * (a copy is included in the LICENSE file that accompanied this code).
      21                 :            :  *
      22                 :            :  * You should have received a copy of the GNU Lesser General Public License
      23                 :            :  * version 3 along with OpenOffice.org.  If not, see
      24                 :            :  * <http://www.openoffice.org/license.html>
      25                 :            :  * for a copy of the LGPLv3 License.
      26                 :            :  *
      27                 :            :  ************************************************************************/
      28                 :            : #ifndef _SVX_PAGE_HXX
      29                 :            : #define _SVX_PAGE_HXX
      30                 :            : 
      31                 :            : 
      32                 :            : #include <sfx2/tabdlg.hxx>
      33                 :            : #include <vcl/field.hxx>
      34                 :            : #include <vcl/fixed.hxx>
      35                 :            : #include <vcl/group.hxx>
      36                 :            : #include <vcl/lstbox.hxx>
      37                 :            : #include <svtools/stdctrl.hxx>
      38                 :            : #include <svx/pagectrl.hxx>
      39                 :            : #include <svx/frmdirlbox.hxx>
      40                 :            : #include <editeng/svxenum.hxx>
      41                 :            : #include <i18nutil/paper.hxx>
      42                 :            : #include <svx/flagsdef.hxx>
      43                 :            : 
      44                 :            : // class SvxPageDescPage -------------------------------------------------
      45                 :            : 
      46                 :            : /*  {k:\svx\prototyp\dialog\page.bmp}
      47                 :            : 
      48                 :            :     [Description]
      49                 :            :     TabPage for page settings (size, margins, ...)
      50                 :            : 
      51                 :            :     [Items]
      52                 :            :     <SvxPageItem>:          <SID_ATTR_PAGE>
      53                 :            :     <SvxSizeItem>:          <SID_ATTR_SIZE>
      54                 :            :     <SvxSizeItem>:          <SID_ATTR_MAXSIZE>
      55                 :            :     <SvxULSpaceItem>:       <SID_ATTR_LRSPACE>
      56                 :            :     <SvxLRSpaceItem>:       <SID_ATTR_ULSPACE>
      57                 :            :     <SfxAllEnumItem>:       <SID_ATTR_PAPERTRAY>
      58                 :            :     <SvxPaperBinItem>:      <SID_ATTR_PAPERBIN>
      59                 :            :     <SvxBoolItem>:          <SID_ATTR_EXT1>
      60                 :            :     <SvxBoolItem>:          <SID_ATTR_EXT2>
      61                 :            : 
      62                 :            :     <SfxSetItem>:           <SID_ATTR_HEADERSET>
      63                 :            :         <SfxBoolItem>:          <SID_ATTR_ON>
      64                 :            :         <SfxBoolItem>:          <SID_ATTR_DYNAMIC>
      65                 :            :         <SfxBoolItem>:          <SID_ATTR_SHARED>
      66                 :            :         <SvxSizeItem>:          <SID_ATTR_SIZE>
      67                 :            :         <SvxULSpaceItem>:       <SID_ATTR_ULSPACE>
      68                 :            :         <SvxLRSpaceItem>:       <SID_ATTR_LRSPACE>
      69                 :            : 
      70                 :            :     <SfxSetItem>:           <SID_ATTR_FOOTERSET>
      71                 :            :         <SfxBoolItem>:          <SID_ATTR_ON>
      72                 :            :         <SfxBoolItem>:          <SID_ATTR_DYNAMIC>
      73                 :            :         <SfxBoolItem>:          <SID_ATTR_SHARED>
      74                 :            :         <SvxSizeItem>:          <SID_ATTR_SIZE>
      75                 :            :         <SvxULSpaceItem>:       <SID_ATTR_ULSPACE>
      76                 :            :         <SvxLRSpaceItem>:       <SID_ATTR_LRSPACE>
      77                 :            : */
      78                 :            : 
      79                 :            : struct  SvxPage_Impl;
      80                 :            : typedef sal_uInt16 MarginPosition;
      81                 :            : 
      82                 :            : class SvxPageDescPage : public SfxTabPage
      83                 :            : {
      84                 :            :     using TabPage::ActivatePage;
      85                 :            :     using TabPage::DeactivatePage;
      86                 :            : 
      87                 :            :     // paper format
      88                 :            :     FixedLine           aPaperSizeFl;
      89                 :            :     FixedText           aPaperFormatText;
      90                 :            :     ListBox             aPaperSizeBox;
      91                 :            : 
      92                 :            :     FixedText           aPaperWidthText;
      93                 :            :     MetricField         aPaperWidthEdit;
      94                 :            :     FixedText           aPaperHeightText;
      95                 :            :     MetricField         aPaperHeightEdit;
      96                 :            : 
      97                 :            :     FixedText           aOrientationFT;
      98                 :            :     RadioButton         aPortraitBtn;
      99                 :            :     RadioButton         aLandscapeBtn;
     100                 :            : 
     101                 :            :     SvxPageWindow       aBspWin;
     102                 :            : 
     103                 :            :     FixedText                   aTextFlowLbl;
     104                 :            :     svx::FrameDirectionListBox  aTextFlowBox;
     105                 :            : 
     106                 :            :     FixedText           aPaperTrayLbl;
     107                 :            :     ListBox             aPaperTrayBox;
     108                 :            : 
     109                 :            :     // Margins
     110                 :            :     FixedLine           aMarginFl;
     111                 :            :     FixedText           aLeftMarginLbl;
     112                 :            :     MetricField         aLeftMarginEdit;
     113                 :            :     FixedText           aRightMarginLbl;
     114                 :            :     MetricField         aRightMarginEdit;
     115                 :            :     FixedText           aTopMarginLbl;
     116                 :            :     MetricField         aTopMarginEdit;
     117                 :            :     FixedText           aBottomMarginLbl;
     118                 :            :     MetricField         aBottomMarginEdit;
     119                 :            : 
     120                 :            :     FixedLine           aBottomSeparatorFl;
     121                 :            :     // layout settings
     122                 :            :     FixedLine           aLayoutFL;
     123                 :            :     FixedText           aPageText;
     124                 :            :     ListBox             aLayoutBox;
     125                 :            :     FixedText           aNumberFormatText;
     126                 :            :     ListBox             aNumberFormatBox;
     127                 :            : 
     128                 :            : 
     129                 :            :     //Extras Calc
     130                 :            :     FixedText           aTblAlignFT;
     131                 :            :     CheckBox            aHorzBox;
     132                 :            :     CheckBox            aVertBox;
     133                 :            : 
     134                 :            :     // Impress and Draw
     135                 :            :     CheckBox            aAdaptBox;
     136                 :            : 
     137                 :            :     //Register Writer
     138                 :            :     CheckBox            aRegisterCB;
     139                 :            :     FixedText           aRegisterFT;
     140                 :            :     ListBox             aRegisterLB;
     141                 :            : 
     142                 :            :     String              sStandardRegister;
     143                 :            : 
     144                 :            :     String              aInsideText;
     145                 :            :     String              aOutsideText;
     146                 :            :     String              aLeftText;
     147                 :            :     String              aRightText;
     148                 :            :     String              aPrintRangeQueryText;
     149                 :            : 
     150                 :            :     long                nFirstLeftMargin;
     151                 :            :     long                nFirstRightMargin;
     152                 :            :     long                nFirstTopMargin;
     153                 :            :     long                nFirstBottomMargin;
     154                 :            :     long                nLastLeftMargin;
     155                 :            :     long                nLastRightMargin;
     156                 :            :     long                nLastTopMargin;
     157                 :            :     long                nLastBottomMargin;
     158                 :            : 
     159                 :            :     Size                aMaxSize;
     160                 :            :     sal_Bool                bLandscape;
     161                 :            :     bool                bBorderModified;
     162                 :            :     SvxModeType         eMode;
     163                 :            :     Paper               ePaperStart;
     164                 :            :     Paper               ePaperEnd;
     165                 :            : 
     166                 :            :     SvxPage_Impl*       pImpl;
     167                 :            : 
     168                 :            : #ifdef _SVX_PAGE_CXX
     169                 :            :     void                Init_Impl();
     170                 :            :     DECL_LINK(LayoutHdl_Impl, void *);
     171                 :            :     DECL_LINK(PaperBinHdl_Impl, void *);
     172                 :            :     DECL_LINK(          SwapOrientation_Impl, RadioButton* );
     173                 :            :     void                SwapFirstValues_Impl( bool bSet );
     174                 :            :     DECL_LINK(BorderModify_Impl, void *);
     175                 :            :     void                InitHeadFoot_Impl( const SfxItemSet& rSet );
     176                 :            :     DECL_LINK(CenterHdl_Impl, void *);
     177                 :            :     void                UpdateExample_Impl( bool bResetbackground = false );
     178                 :            : 
     179                 :            :     DECL_LINK(          PaperSizeSelect_Impl, ListBox* );
     180                 :            :     DECL_LINK(PaperSizeModify_Impl, void *);
     181                 :            : 
     182                 :            :     DECL_LINK(          FrameDirectionModify_Impl, ListBox* );
     183                 :            : 
     184                 :            :     void                ResetBackground_Impl( const SfxItemSet& rSet );
     185                 :            : 
     186                 :            :     DECL_LINK(RangeHdl_Impl, void *);
     187                 :            :     void                CalcMargin_Impl();
     188                 :            : 
     189                 :            :     DECL_LINK(          RegisterModify, CheckBox * );
     190                 :            : 
     191                 :            :     // page direction
     192                 :            :     /** Disables vertical page direction entries in the text flow listbox. */
     193                 :            :     void                DisableVerticalPageDir();
     194                 :            : 
     195                 :            :     bool                IsPrinterRangeOverflow( MetricField& rField, long nFirstMargin,
     196                 :            :                                                 long nLastMargin, MarginPosition nPos );
     197                 :            :     void                CheckMarginEdits( bool _bClear );
     198                 :            :     bool                IsMarginOutOfRange();
     199                 :            : #endif
     200                 :            : 
     201                 :            :     SvxPageDescPage( Window* pParent, const SfxItemSet& rSet );
     202                 :            : 
     203                 :            : protected:
     204                 :            :     virtual void        ActivatePage( const SfxItemSet& rSet );
     205                 :            :     virtual int         DeactivatePage( SfxItemSet* pSet = 0 );
     206                 :            : 
     207                 :            : public:
     208                 :            :     static SfxTabPage*  Create( Window* pParent, const SfxItemSet& rSet );
     209                 :            :     static sal_uInt16*      GetRanges();
     210                 :            : 
     211                 :            :     virtual sal_Bool        FillItemSet( SfxItemSet& rOutSet );
     212                 :            :     virtual void        Reset( const SfxItemSet& rSet );
     213                 :            :     virtual void        FillUserData();
     214                 :            : 
     215                 :            :     virtual ~SvxPageDescPage();
     216                 :            : 
     217                 :          0 :     void                SetMode( SvxModeType eMType ) { eMode = eMType; }
     218                 :          0 :     void                SetPaperFormatRanges( Paper eStart, Paper eEnd )
     219                 :          0 :                             { ePaperStart = eStart, ePaperEnd = eEnd; }
     220                 :            : 
     221                 :            :     void                SetCollectionList(const std::vector<String> &aList);
     222                 :            :     virtual void        PageCreated (SfxAllItemSet aSet);
     223                 :            : };
     224                 :            : 
     225                 :            : #endif // #ifndef _SVX_PAGE_HXX
     226                 :            : 
     227                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10