LCOV - code coverage report
Current view: top level - sw/source/uibase/inc - column.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 0 13 0.0 %
Date: 2014-11-03 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_UIBASE_INC_COLUMN_HXX
      21             : #define INCLUDED_SW_SOURCE_UIBASE_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(vcl::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(vcl::Window* pParent, const ResId& rResId)
      77             :         : ValueSet(pParent, rResId)
      78             :     {
      79             :     }
      80           0 :     ColumnValueSet(vcl::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             : // column dialog now as TabPage
      89             : class SwColumnPage : public SfxTabPage
      90             : {
      91             :     NumericField*   m_pCLNrEdt;
      92             :     ColumnValueSet* m_pDefaultVS;
      93             :     CheckBox*       m_pBalanceColsCB;
      94             : 
      95             :     PushButton*     m_pBtnBack;
      96             :     FixedText*      m_pLbl1;
      97             :     PercentField aEd1;
      98             :     FixedText*      m_pLbl2;
      99             :     PercentField aEd2;
     100             :     FixedText*      m_pLbl3;
     101             :     PercentField aEd3;
     102             :     PushButton*     m_pBtnNext;
     103             :     PercentField aDistEd1;
     104             :     PercentField aDistEd2;
     105             :     CheckBox*       m_pAutoWidthBox;
     106             : 
     107             :     FixedText*      m_pLineTypeLbl;
     108             :     LineListBox*    m_pLineTypeDLB;
     109             :     FixedText*      m_pLineWidthLbl;
     110             :     MetricField*    m_pLineWidthEdit;
     111             :     FixedText*      m_pLineColorLbl;
     112             :     ColorListBox*   m_pLineColorDLB;
     113             :     FixedText*      m_pLineHeightLbl;
     114             :     MetricField*    m_pLineHeightEdit;
     115             :     FixedText*      m_pLinePosLbl;
     116             :     ListBox*        m_pLinePosDLB;
     117             : 
     118             :     FixedText*      m_pTextDirectionFT;
     119             :     ListBox*        m_pTextDirectionLB;
     120             : 
     121             :     // Example
     122             :     SwColExample*   m_pPgeExampleWN;
     123             :     SwColumnOnlyExample* m_pFrmExampleWN;
     124             : 
     125             :     SwColMgr*       pColMgr;
     126             : 
     127             :     sal_uInt16          nFirstVis;
     128             :     sal_uInt16          nCols;
     129             :     long            nColWidth[nMaxCols];
     130             :     long            nColDist[nMaxCols];
     131             :     sal_uInt16          nMinWidth;
     132             :     PercentField*   pModifiedField;
     133             : 
     134             :     std::map<MetricField*, PercentField*> m_aPercentFieldsMap;
     135             : 
     136             :     bool            bFormat;
     137             :     bool            bFrm;
     138             :     bool            bHtmlMode;
     139             :     bool            bLockUpdate;
     140             : 
     141             :     // Handler
     142             :     DECL_LINK( ColModify, NumericField * );
     143             :     DECL_LINK( GapModify, MetricField * );
     144             :     DECL_LINK( EdModify, MetricField * );
     145             :     DECL_LINK( AutoWidthHdl, CheckBox * );
     146             :     DECL_LINK( SetDefaultsHdl, ValueSet * );
     147             : 
     148             :     DECL_LINK(Up, void *);
     149             :     DECL_LINK(Down, void *);
     150             :     DECL_LINK( UpdateColMgr, void* );
     151             :     void Apply(Button *);
     152             :     void Timeout();
     153             : 
     154             :     void            Update();
     155             :     void            UpdateCols();
     156             :     void            Init();
     157             :     void            ResetColWidth();
     158             :     void            SetLabels( sal_uInt16 nVis );
     159             : 
     160             :     using SfxTabPage::ActivatePage;
     161             :     using SfxTabPage::DeactivatePage;
     162             : 
     163             :     virtual void    ActivatePage(const SfxItemSet& rSet) SAL_OVERRIDE;
     164             :     virtual int     DeactivatePage(SfxItemSet *pSet) SAL_OVERRIDE;
     165             : 
     166             :     SwColumnPage(vcl::Window *pParent, const SfxItemSet &rSet);
     167             : 
     168             :     void connectPercentField(PercentField &rWrap, const OString &rName);
     169             : 
     170             :     bool isLineNotNone() const;
     171             : 
     172             : public:
     173             :     virtual ~SwColumnPage();
     174             : 
     175             :     static SfxTabPage *Create(vcl::Window *pParent, const SfxItemSet *rSet);
     176             :     static const sal_uInt16* GetRanges();
     177             : 
     178             :     virtual bool    FillItemSet(SfxItemSet *rSet) SAL_OVERRIDE;
     179             :     virtual void    Reset(const SfxItemSet *rSet) SAL_OVERRIDE;
     180             : 
     181             :     void SetFrmMode(bool bMod);
     182             :     void SetPageWidth(long nPageWidth);
     183             : 
     184           0 :     void SetFormatUsed(bool bFmt)
     185             :     {
     186           0 :         bFormat = bFmt;
     187           0 :     }
     188             : 
     189           0 :     void ShowBalance(bool bShow)
     190             :     {
     191           0 :         m_pBalanceColsCB->Show(bShow);
     192           0 :     }
     193             : 
     194             :     void SetInSection(bool bSet);
     195             : 
     196           0 :     void ActivateColumnControl()
     197             :     {
     198           0 :         m_pCLNrEdt->GrabFocus();
     199           0 :     }
     200             : };
     201             : 
     202             : #endif
     203             : 
     204             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10