LCOV - code coverage report
Current view: top level - sw/source/core/uibase/inc - optpage.hxx (source / functions) Hit Total Coverage
Test: commit 0e63ca4fde4e446f346e35849c756a30ca294aab Lines: 0 6 0.0 %
Date: 2014-04-11 Functions: 0 7 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_SW_SOURCE_UI_INC_OPTPAGE_HXX
      20             : #define INCLUDED_SW_SOURCE_UI_INC_OPTPAGE_HXX
      21             : #include <sfx2/tabdlg.hxx>
      22             : 
      23             : #include <vcl/group.hxx>
      24             : 
      25             : #include <vcl/button.hxx>
      26             : 
      27             : #include <vcl/lstbox.hxx>
      28             : 
      29             : #include <vcl/field.hxx>
      30             : 
      31             : #include <vcl/fixed.hxx>
      32             : #include <svtools/ctrlbox.hxx>
      33             : #include <svx/fntctrl.hxx>
      34             : #include <fontcfg.hxx>
      35             : class SfxPrinter;
      36             : class SwStdFontConfig;
      37             : class SwWrtShell;
      38             : class FontList;
      39             : 
      40             : /*--------------------------------------------------------
      41             :  Tools->Options->Writer->View
      42             :  Tools->Options->Writer/Web->View
      43             : --------------------------------------------------------- */
      44             : class SwContentOptPage : public SfxTabPage
      45             : {
      46             :     CheckBox*   m_pCrossCB;
      47             : 
      48             :     CheckBox*   m_pHScrollBox;
      49             :     CheckBox*   m_pVScrollBox;
      50             :     CheckBox*   m_pAnyRulerCB;
      51             :     CheckBox*   m_pHRulerCBox;
      52             :     ListBox*    m_pHMetric;
      53             :     CheckBox*   m_pVRulerCBox;
      54             :     CheckBox*   m_pVRulerRightCBox;
      55             :     ListBox*    m_pVMetric;
      56             :     CheckBox*   m_pSmoothCBox;
      57             : 
      58             :     CheckBox*   m_pGrfCB;
      59             :     CheckBox*   m_pTblCB;
      60             :     CheckBox*   m_pDrwCB;
      61             :     CheckBox*   m_pFldNameCB;
      62             :     CheckBox*   m_pPostItCB;
      63             : 
      64             :     VclFrame*   m_pSettingsFrame;
      65             :     FixedText*  m_pSettingsLabel;
      66             :     FixedText*  m_pMetricLabel;
      67             :     ListBox*    m_pMetricLB;
      68             : 
      69             :     DECL_LINK(VertRulerHdl, CheckBox*);
      70             :     DECL_LINK(AnyRulerHdl, CheckBox*);
      71             : public:
      72             :                         SwContentOptPage( Window* pParent,
      73             :                                            const SfxItemSet& rSet );
      74             :                         virtual ~SwContentOptPage();
      75             : 
      76             :     static SfxTabPage*  Create( Window* pParent,
      77             :                                 const SfxItemSet& rAttrSet);
      78             : 
      79             :     virtual bool        FillItemSet( SfxItemSet& rSet ) SAL_OVERRIDE;
      80             :     virtual void        Reset( const SfxItemSet& rSet ) SAL_OVERRIDE;
      81             : 
      82             : };
      83             : 
      84             : /*--------------------------------------------------------
      85             :  TabPage printer settings additions
      86             : --------------------------------------------------------- */
      87           0 : class SwAddPrinterTabPage : public SfxTabPage
      88             : {
      89             :     CheckBox*       m_pGrfCB;
      90             :     CheckBox*       m_pCtrlFldCB;
      91             :     CheckBox*       m_pBackgroundCB;
      92             :     CheckBox*       m_pBlackFontCB;
      93             :     CheckBox*       m_pPrintHiddenTextCB;
      94             :     CheckBox*       m_pPrintTextPlaceholderCB;
      95             : 
      96             :     VclFrame*       m_pPagesFrame;
      97             :     CheckBox*       m_pLeftPageCB;
      98             :     CheckBox*       m_pRightPageCB;
      99             :     CheckBox*       m_pProspectCB;
     100             :     CheckBox*       m_pProspectCB_RTL;
     101             : 
     102             :     VclFrame*       m_pCommentsFrame;
     103             :     RadioButton*    m_pNoRB;
     104             :     RadioButton*    m_pOnlyRB;
     105             :     RadioButton*    m_pEndRB;
     106             :     RadioButton*    m_pEndPageRB;
     107             : 
     108             :     CheckBox*       m_pPrintEmptyPagesCB;
     109             :     CheckBox*       m_pPaperFromSetupCB;
     110             :     ListBox*        m_pFaxLB;
     111             : 
     112             :     OUString        sNone;
     113             : 
     114             :     sal_Bool        bAttrModified;
     115             :     sal_Bool        bPreview;
     116             : 
     117             :     void        Init();
     118             :                 DECL_LINK(AutoClickHdl, void *);
     119             :                 DECL_LINK(SelectHdl, void *);
     120             : 
     121             :                 SwAddPrinterTabPage( Window* pParent,
     122             :                                            const SfxItemSet& rSet );
     123             : public:
     124             : 
     125             :     static SfxTabPage*  Create( Window* pParent,
     126             :                                 const SfxItemSet& rAttrSet );
     127             : 
     128             :     virtual bool        FillItemSet( SfxItemSet& rSet ) SAL_OVERRIDE;
     129             :     virtual void        Reset( const SfxItemSet& rSet ) SAL_OVERRIDE;
     130             :     void                SetFax( const std::vector<OUString>& );
     131             :     void                SelectFax( const OUString& );
     132             :     void                SetPreview(sal_Bool bPrev);
     133             :     virtual void        PageCreated (SfxAllItemSet aSet) SAL_OVERRIDE;
     134             : 
     135             : };
     136             : 
     137             : class SwStdFontTabPage : public SfxTabPage
     138             : {
     139             :     FixedText*       pLabelFT;
     140             : 
     141             :     ComboBox*        pStandardBox;
     142             :     FontSizeBox*     pStandardHeightLB;
     143             :     ComboBox*        pTitleBox   ;
     144             :     FontSizeBox*     pTitleHeightLB;
     145             :     ComboBox*        pListBox    ;
     146             :     FontSizeBox*     pListHeightLB;
     147             :     ComboBox*        pLabelBox   ;
     148             :     FontSizeBox*     pLabelHeightLB;
     149             :     ComboBox*        pIdxBox     ;
     150             :     FontSizeBox*     pIndexHeightLB;
     151             :     CheckBox*        pDocOnlyCB  ;
     152             :     PushButton*      pStandardPB;
     153             : 
     154             :     OUString        sShellStd;
     155             :     OUString        sShellTitle;
     156             :     OUString        sShellList;
     157             :     OUString        sShellLabel;
     158             :     OUString        sShellIndex;
     159             : 
     160             :     SfxPrinter*         pPrt;
     161             :     FontList*           pFontList;
     162             :     SwStdFontConfig*    pFontConfig;
     163             :     SwWrtShell*         pWrtShell;
     164             :     LanguageType        eLanguage;
     165             :     // only defaults were there? they were signed with the boxes
     166             :     sal_Bool    bListDefault    :1;
     167             :     sal_Bool    bSetListDefault :1;
     168             :     sal_Bool    bLabelDefault   :1;
     169             :     sal_Bool    bSetLabelDefault :1;
     170             :     sal_Bool    bIdxDefault     :1;
     171             :     sal_Bool    bSetIdxDefault  :1;
     172             :     sal_Bool    bDeletePrinter :1;
     173             : 
     174             :     sal_Bool    bListHeightDefault    :1;
     175             :     sal_Bool    bSetListHeightDefault :1;
     176             :     sal_Bool    bLabelHeightDefault   :1;
     177             :     sal_Bool    bSetLabelHeightDefault :1;
     178             :     sal_Bool    bIndexHeightDefault     :1;
     179             :     sal_Bool    bSetIndexHeightDefault  :1;
     180             : 
     181             :     sal_uInt8 nFontGroup; //fontcfg.hxx: FONT_GROUP_[STANDARD|CJK|CTL]
     182             : 
     183             :     OUString sScriptWestern;
     184             :     OUString sScriptAsian;
     185             :     OUString sScriptComplex;
     186             : 
     187             :     DECL_LINK(StandardHdl, void *);
     188             :     DECL_LINK( ModifyHdl, ComboBox * );
     189             :     DECL_LINK( ModifyHeightHdl, FontSizeBox * );
     190             :     DECL_LINK( LoseFocusHdl, ComboBox * );
     191             : 
     192             :             SwStdFontTabPage( Window* pParent,
     193             :                                        const SfxItemSet& rSet );
     194             :             virtual ~SwStdFontTabPage();
     195             : 
     196             : public:
     197             :     static SfxTabPage*  Create( Window* pParent,
     198             :                                 const SfxItemSet& rAttrSet );
     199             : 
     200             :     virtual bool        FillItemSet( SfxItemSet& rSet ) SAL_OVERRIDE;
     201             :     virtual void        Reset( const SfxItemSet& rSet ) SAL_OVERRIDE;
     202             : 
     203           0 :     void    SetFontMode(sal_uInt8 nGroup) {nFontGroup = nGroup;}
     204             :     virtual void        PageCreated (SfxAllItemSet aSet) SAL_OVERRIDE;
     205             : };
     206             : 
     207             : class SwTableOptionsTabPage : public SfxTabPage
     208             : {
     209             :     CheckBox*    pHeaderCB;
     210             :     CheckBox*    pRepeatHeaderCB;
     211             :     CheckBox*    pDontSplitCB;
     212             :     CheckBox*    pBorderCB;
     213             : 
     214             :     CheckBox*    pNumFormattingCB;
     215             :     CheckBox*    pNumFmtFormattingCB;
     216             :     CheckBox*    pNumAlignmentCB;
     217             : 
     218             :     MetricField* pRowMoveMF;
     219             :     MetricField* pColMoveMF;
     220             : 
     221             :     MetricField* pRowInsertMF;
     222             :     MetricField* pColInsertMF;
     223             : 
     224             :     RadioButton* pFixRB;
     225             :     RadioButton* pFixPropRB;
     226             :     RadioButton* pVarRB;
     227             : 
     228             :     SwWrtShell* pWrtShell;
     229             :     sal_Bool        bHTMLMode;
     230             : 
     231             :     DECL_LINK(CheckBoxHdl, void *);
     232             : 
     233             :                 SwTableOptionsTabPage( Window* pParent,
     234             :                                            const SfxItemSet& rSet );
     235             :                 virtual ~SwTableOptionsTabPage();
     236             : 
     237             : public:
     238             : 
     239             :     static SfxTabPage*  Create( Window* pParent,
     240             :                                 const SfxItemSet& rAttrSet );
     241             : 
     242             :     virtual bool        FillItemSet( SfxItemSet& rSet ) SAL_OVERRIDE;
     243             :     virtual void        Reset( const SfxItemSet& rSet ) SAL_OVERRIDE;
     244             : 
     245           0 :     void SetWrtShell(SwWrtShell* pSh) {pWrtShell = pSh;}
     246             :     virtual void        PageCreated (SfxAllItemSet aSet) SAL_OVERRIDE;
     247             : 
     248             : };
     249             : 
     250             : /*--------------------------------------------------
     251             :  TabPage for ShadowCrsr
     252             : --------------------------------------------------*/
     253             : class SwShdwCrsrOptionsTabPage : public SfxTabPage
     254             : {
     255             :     //nonprinting characters
     256             :     CheckBox* m_pParaCB;
     257             :     CheckBox* m_pSHyphCB;
     258             :     CheckBox* m_pSpacesCB;
     259             :     CheckBox* m_pHSpacesCB;
     260             :     CheckBox* m_pTabCB;
     261             :     CheckBox* m_pBreakCB;
     262             :     CheckBox* m_pCharHiddenCB;
     263             :     CheckBox* m_pFldHiddenCB;
     264             :     CheckBox* m_pFldHiddenParaCB;
     265             : 
     266             :     VclFrame* m_pDirectCursorFrame;
     267             :     CheckBox* m_pOnOffCB;
     268             : 
     269             :     RadioButton* m_pFillMarginRB;
     270             :     RadioButton* m_pFillIndentRB;
     271             :     RadioButton* m_pFillTabRB;
     272             :     RadioButton* m_pFillSpaceRB;
     273             : 
     274             :     VclFrame* m_pCursorProtFrame;
     275             :     CheckBox* m_pCrsrInProtCB;
     276             : 
     277             :     CheckBox* m_pMathBaselineAlignmentCB;
     278             : 
     279             :     SwWrtShell *    m_pWrtShell;
     280             : 
     281             :     SwShdwCrsrOptionsTabPage( Window* pParent, const SfxItemSet& rSet );
     282             :     virtual ~SwShdwCrsrOptionsTabPage();
     283             : 
     284             : public:
     285             : 
     286             :     static SfxTabPage*  Create( Window* pParent, const SfxItemSet& rAttrSet );
     287             : 
     288             :     virtual bool        FillItemSet( SfxItemSet& rSet ) SAL_OVERRIDE;
     289             :     virtual void        Reset( const SfxItemSet& rSet ) SAL_OVERRIDE;
     290             : 
     291           0 :     void    SetWrtShell( SwWrtShell * pSh ) { m_pWrtShell = pSh; }
     292             :     virtual void        PageCreated( SfxAllItemSet aSet ) SAL_OVERRIDE;
     293             : };
     294             : 
     295             : /*-----------------------------------------------------------------------
     296             :     Description: mark preview
     297             :  -----------------------------------------------------------------------*/
     298             : class SwMarkPreview : public Window
     299             : {
     300             :     Size            m_aInitialSize;
     301             : 
     302             :     Color           m_aBgCol;           // background
     303             :     Color           m_aTransCol;        // transparency
     304             :     Color           m_aMarkCol;         // marks
     305             :     Color           m_aLineCol;         // general lines
     306             :     Color           m_aShadowCol;       // shadow
     307             :     Color           m_aTxtCol;          // text
     308             :     Color           m_aPrintAreaCol;    // frame for print area
     309             : 
     310             :     Rectangle       aPage;
     311             :     Rectangle       aLeftPagePrtArea;
     312             :     Rectangle       aRightPagePrtArea;
     313             : 
     314             :     sal_uInt16          nMarkPos;
     315             : 
     316             :     using OutputDevice::DrawRect;
     317             :     void            DrawRect(const Rectangle &rRect, const Color &rFillColor, const Color &rLineColor);
     318             : 
     319             :     void            Paint(const Rectangle&) SAL_OVERRIDE;
     320             :     void            PaintPage(const Rectangle &rRect);
     321             :     void            InitColors( void );
     322             : 
     323             : protected:
     324             :     virtual void    DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE;
     325             : 
     326             : public:
     327             :                     SwMarkPreview(Window* pParent, WinBits nWinBits);
     328             :     virtual         ~SwMarkPreview();
     329             : 
     330           0 :     inline void     SetColor(const Color& rCol) { m_aMarkCol = rCol; }
     331           0 :     inline void     SetMarkPos(sal_uInt16 nPos) { nMarkPos = nPos; }
     332             :     virtual Size    GetOptimalSize() const SAL_OVERRIDE;
     333             : };
     334             : 
     335             : /*-----------------------------------------------------------------------
     336             :     Description: redlining options
     337             :  -----------------------------------------------------------------------*/
     338             : class SwRedlineOptionsTabPage : public SfxTabPage
     339             : {
     340             :     ListBox*             pInsertLB;
     341             :     ColorListBox*        pInsertColorLB;
     342             :     SvxFontPrevWindow*   pInsertedPreviewWN;
     343             : 
     344             :     ListBox*             pDeletedLB;
     345             :     ColorListBox*        pDeletedColorLB;
     346             :     SvxFontPrevWindow*   pDeletedPreviewWN;
     347             : 
     348             :     ListBox*             pChangedLB;
     349             :     ColorListBox*        pChangedColorLB;
     350             :     SvxFontPrevWindow*   pChangedPreviewWN;
     351             : 
     352             :     ListBox*             pMarkPosLB;
     353             :     ColorListBox*        pMarkColorLB;
     354             :     SwMarkPreview*       pMarkPreviewWN;
     355             : 
     356             :     OUString             sAuthor;
     357             :     OUString             sNone;
     358             : 
     359             :     SwRedlineOptionsTabPage( Window* pParent, const SfxItemSet& rSet );
     360             :     virtual ~SwRedlineOptionsTabPage();
     361             : 
     362             :     DECL_LINK( AttribHdl, ListBox *pLB );
     363             :     DECL_LINK(ChangedMaskPrevHdl, void * = 0);
     364             :     DECL_LINK( ColorHdl, ColorListBox *pColorLB );
     365             : 
     366             :     void                InitFontStyle(SvxFontPrevWindow& rExampleWin);
     367             : 
     368             : public:
     369             : 
     370             :     static SfxTabPage*  Create( Window* pParent, const SfxItemSet& rAttrSet );
     371             : 
     372             :     virtual bool        FillItemSet( SfxItemSet& rSet ) SAL_OVERRIDE;
     373             :     virtual void        Reset( const SfxItemSet& rSet ) SAL_OVERRIDE;
     374             : };
     375             : 
     376             : /*-------------------------------------------------------
     377             :  TabPage test settings for SW
     378             : --------------------------------------------------------- */
     379             : 
     380             : #ifdef DBG_UTIL
     381             : 
     382             : class SwTestTabPage : public SfxTabPage
     383             : {
     384             : public:
     385             :                         SwTestTabPage( Window* pParent,
     386             :                                            const SfxItemSet& rSet );
     387             : 
     388             :     static SfxTabPage*  Create( Window* pParent,
     389             :                                 const SfxItemSet& rAttrSet );
     390             : 
     391             :     virtual bool        FillItemSet( SfxItemSet& rSet ) SAL_OVERRIDE;
     392             :     virtual void        Reset( const SfxItemSet& rSet ) SAL_OVERRIDE;
     393             : 
     394             : private:
     395             :     CheckBox* m_pTest1CBox;
     396             :     CheckBox* m_pTest2CBox;
     397             :     CheckBox* m_pTest3CBox;
     398             :     CheckBox* m_pTest4CBox;
     399             :     CheckBox* m_pTest5CBox;
     400             :     CheckBox* m_pTest6CBox;
     401             :     CheckBox* m_pTest7CBox;
     402             :     CheckBox* m_pTest8CBox;
     403             :     CheckBox* m_pTest9CBox;
     404             :     CheckBox* m_pTest10CBox;
     405             : 
     406             :     sal_Bool        bAttrModified;
     407             : 
     408             :     void        Init();
     409             :     DECL_LINK(AutoClickHdl, void *);
     410             : 
     411             : };
     412             : #endif // DBG_UTIL
     413             : 
     414             : class SwCompareOptionsTabPage : public SfxTabPage
     415             : {
     416             :     RadioButton*  m_pAutoRB;
     417             :     RadioButton*  m_pWordRB;
     418             :     RadioButton*  m_pCharRB;
     419             : 
     420             :     CheckBox*     m_pRsidCB;
     421             :     CheckBox*     m_pIgnoreCB;
     422             :     NumericField* m_pLenNF;
     423             : 
     424             :     SwCompareOptionsTabPage( Window* pParent, const SfxItemSet& rSet );
     425             :     virtual ~SwCompareOptionsTabPage();
     426             : 
     427             :     DECL_LINK(ComparisonHdl, void *);
     428             :     DECL_LINK(IgnoreHdl, void *);
     429             : 
     430             : public:
     431             : 
     432             :     static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet );
     433             : 
     434             :     virtual bool FillItemSet( SfxItemSet& rSet ) SAL_OVERRIDE;
     435             :     virtual void Reset( const SfxItemSet& rSet ) SAL_OVERRIDE;
     436             : };
     437             : 
     438             : #endif
     439             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10