LCOV - code coverage report
Current view: top level - sw/source/core/uibase/inc - column.hxx (source / functions) Hit Total Coverage
Test: commit 0e63ca4fde4e446f346e35849c756a30ca294aab Lines: 0 13 0.0 %
Date: 2014-04-11 Functions: 0 6 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             : 
      20             : #ifndef INCLUDED_SW_SOURCE_UI_INC_COLUMN_HXX
      21             : #define INCLUDED_SW_SOURCE_UI_INC_COLUMN_HXX
      22             : 
      23             : #include <vcl/fixed.hxx>
      24             : #include <vcl/field.hxx>
      25             : #include <vcl/image.hxx>
      26             : #include <vcl/group.hxx>
      27             : #include <vcl/lstbox.hxx>
      28             : #include <vcl/button.hxx>
      29             : #include <vcl/timer.hxx>
      30             : #include <svtools/ctrlbox.hxx>
      31             : #include <svtools/valueset.hxx>
      32             : #include <sfx2/basedlgs.hxx>
      33             : #include <sfx2/tabdlg.hxx>
      34             : #include <fmtclbl.hxx>
      35             : #include <colex.hxx>
      36             : #include <prcntfld.hxx>
      37             : 
      38             : const int nMaxCols = 99;
      39             : class SwColMgr;
      40             : class SwWrtShell;
      41             : class SwColumnPage;
      42             : 
      43             : class SwColumnDlg : public SfxModalDialog
      44             : {
      45             :     ListBox*            m_pApplyToLB;
      46             : 
      47             :     SwWrtShell&         rWrtShell;
      48             :     SwColumnPage*       pTabPage;
      49             :     SfxItemSet*         pPageSet;
      50             :     SfxItemSet*         pSectionSet;
      51             :     SfxItemSet*         pSelectionSet;
      52             :     SfxItemSet*         pFrameSet;
      53             : 
      54             :     long                nOldSelection;
      55             :     long                nSelectionWidth;
      56             :     long                nPageWidth;
      57             : 
      58             :     bool                bPageChanged : 1;
      59             :     bool                bSectionChanged : 1;
      60             :     bool                bSelSectionChanged : 1;
      61             :     bool                bFrameChanged : 1;
      62             : 
      63             :     DECL_LINK(ObjectHdl, ListBox*);
      64             :     DECL_LINK(OkHdl, void *);
      65             : 
      66             : public:
      67             :     SwColumnDlg(Window* pParent, SwWrtShell& rSh);
      68             :     virtual ~SwColumnDlg();
      69             : 
      70             :     SwWrtShell&     GetWrtShell()   { return rWrtShell; }
      71             : };
      72             : 
      73           0 : class ColumnValueSet : public ValueSet
      74             : {
      75             : public:
      76             :     ColumnValueSet(Window* pParent, const ResId& rResId)
      77             :         : ValueSet(pParent, rResId)
      78             :     {
      79             :     }
      80           0 :     ColumnValueSet(Window* pParent)
      81           0 :         : ValueSet(pParent, WB_TABSTOP | WB_ITEMBORDER | WB_DOUBLEBORDER)
      82             :     {
      83           0 :     }
      84             :     virtual void    UserDraw( const UserDrawEvent& rUDEvt ) SAL_OVERRIDE;
      85             :     virtual void    DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE;
      86             : };
      87             : 
      88             : /*--------------------------------------------------------------------
      89             :     Description:    column dialog now as TabPage
      90             :  --------------------------------------------------------------------*/
      91             : class SwColumnPage : public SfxTabPage
      92             : {
      93             :     NumericField*   m_pCLNrEdt;
      94             :     ColumnValueSet* m_pDefaultVS;
      95             :     CheckBox*       m_pBalanceColsCB;
      96             : 
      97             :     PushButton*     m_pBtnBack;
      98             :     FixedText*      m_pLbl1;
      99             :     PercentField aEd1;
     100             :     FixedText*      m_pLbl2;
     101             :     PercentField aEd2;
     102             :     FixedText*      m_pLbl3;
     103             :     PercentField aEd3;
     104             :     PushButton*     m_pBtnNext;
     105             :     PercentField aDistEd1;
     106             :     PercentField aDistEd2;
     107             :     CheckBox*       m_pAutoWidthBox;
     108             : 
     109             :     FixedText*      m_pLineTypeLbl;
     110             :     LineListBox*    m_pLineTypeDLB;
     111             :     FixedText*      m_pLineWidthLbl;
     112             :     MetricField*    m_pLineWidthEdit;
     113             :     FixedText*      m_pLineColorLbl;
     114             :     ColorListBox*   m_pLineColorDLB;
     115             :     FixedText*      m_pLineHeightLbl;
     116             :     MetricField*    m_pLineHeightEdit;
     117             :     FixedText*      m_pLinePosLbl;
     118             :     ListBox*        m_pLinePosDLB;
     119             : 
     120             :     FixedText*      m_pTextDirectionFT;
     121             :     ListBox*        m_pTextDirectionLB;
     122             : 
     123             :     // Example
     124             :     SwColExample*   m_pPgeExampleWN;
     125             :     SwColumnOnlyExample* m_pFrmExampleWN;
     126             : 
     127             :     SwColMgr*       pColMgr;
     128             : 
     129             :     sal_uInt16          nFirstVis;
     130             :     sal_uInt16          nCols;
     131             :     long            nColWidth[nMaxCols];
     132             :     long            nColDist[nMaxCols];
     133             :     sal_uInt16          nMinWidth;
     134             :     PercentField*   pModifiedField;
     135             : 
     136             :     std::map<MetricField*, PercentField*> m_aPercentFieldsMap;
     137             : 
     138             :     sal_Bool            bFormat;
     139             :     sal_Bool            bFrm;
     140             :     sal_Bool            bHtmlMode;
     141             :     bool            bLockUpdate;
     142             : 
     143             :     // Handler
     144             :     DECL_LINK( ColModify, NumericField * );
     145             :     DECL_LINK( GapModify, MetricField * );
     146             :     DECL_LINK( EdModify, MetricField * );
     147             :     DECL_LINK( AutoWidthHdl, CheckBox * );
     148             :     DECL_LINK( SetDefaultsHdl, ValueSet * );
     149             : 
     150             :     DECL_LINK(Up, void *);
     151             :     DECL_LINK(Down, void *);
     152             :     DECL_LINK( UpdateColMgr, void* );
     153             :     void Apply(Button *);
     154             :     void Timeout();
     155             : 
     156             :     void            Update();
     157             :     void            UpdateCols();
     158             :     void            Init();
     159             :     void            ResetColWidth();
     160             :     void            SetLabels( sal_uInt16 nVis );
     161             : 
     162             :     using SfxTabPage::ActivatePage;
     163             :     using SfxTabPage::DeactivatePage;
     164             : 
     165             :     virtual void    ActivatePage(const SfxItemSet& rSet) SAL_OVERRIDE;
     166             :     virtual int     DeactivatePage(SfxItemSet *pSet) SAL_OVERRIDE;
     167             : 
     168             :     SwColumnPage(Window *pParent, const SfxItemSet &rSet);
     169             : 
     170             :     void connectPercentField(PercentField &rWrap, const OString &rName);
     171             : 
     172             :     bool isLineNotNone() const;
     173             : 
     174             : public:
     175             :     virtual ~SwColumnPage();
     176             : 
     177             :     static SfxTabPage *Create(Window *pParent, const SfxItemSet &rSet);
     178             :     static sal_uInt16* GetRanges();
     179             : 
     180             :     virtual bool    FillItemSet(SfxItemSet &rSet) SAL_OVERRIDE;
     181             :     virtual void    Reset(const SfxItemSet &rSet) SAL_OVERRIDE;
     182             : 
     183             :     void SetFrmMode(sal_Bool bMod);
     184             :     void SetPageWidth(long nPageWidth);
     185             : 
     186           0 :     void SetFormatUsed(sal_Bool bFmt)
     187             :     {
     188           0 :         bFormat = bFmt;
     189           0 :     }
     190             : 
     191           0 :     void ShowBalance(sal_Bool bShow)
     192             :     {
     193           0 :         m_pBalanceColsCB->Show(bShow);
     194           0 :     }
     195             : 
     196             :     void SetInSection(sal_Bool bSet);
     197             : 
     198           0 :     void ActivateColumnControl()
     199             :     {
     200           0 :         m_pCLNrEdt->GrabFocus();
     201           0 :     }
     202             : };
     203             : 
     204             : #endif
     205             : 
     206             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10