LCOV - code coverage report
Current view: top level - libreoffice/sw/source/ui/table - tablepg.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 1 0.0 %
Date: 2012-12-27 Functions: 0 2 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 _SWTABLEPG_HXX
      20             : #define _SWTABLEPG_HXX
      21             : #include <sfx2/tabdlg.hxx>
      22             : #include <vcl/fixed.hxx>
      23             : #include <vcl/button.hxx>
      24             : #include <vcl/lstbox.hxx>
      25             : #include <actctrl.hxx>
      26             : #include "prcntfld.hxx"
      27             : #include "swtypes.hxx"
      28             : #include "textcontrolcombo.hxx"
      29             : 
      30             : class SwWrtShell;
      31             : class SwTableRep;
      32             : 
      33             : struct TColumn
      34             : {
      35             :     SwTwips nWidth;
      36             :     sal_Bool    bVisible;
      37             : };
      38             : 
      39           0 : class SwFormatTablePage : public SfxTabPage
      40             : {
      41             :     FixedLine        aOptionsFL;
      42             :     FixedText       aNameFT;
      43             :     TableNameEdit   aNameED;
      44             :     FixedText       aWidthFT;
      45             :     PercentField    aWidthMF;
      46             :     CheckBox        aRelWidthCB;
      47             : 
      48             :     FixedLine        aPosFL;
      49             :     RadioButton     aFullBtn;
      50             :     RadioButton     aLeftBtn;
      51             :     RadioButton     aFromLeftBtn;
      52             :     RadioButton     aRightBtn;
      53             :     RadioButton     aCenterBtn;
      54             :     RadioButton     aFreeBtn;
      55             : 
      56             :     FixedLine       aDistFL;
      57             :     FixedText       aLeftFT;
      58             :     PercentField    aLeftMF;
      59             :     FixedText       aRightFT;
      60             :     PercentField    aRightMF;
      61             :     FixedText       aTopFT;
      62             :     MetricField     aTopMF;
      63             :     FixedText       aBottomFT;
      64             :     MetricField     aBottomMF;
      65             : 
      66             :     FixedLine       aPropertiesFL;
      67             :     FixedText       aTextDirectionFT;
      68             :     ListBox         aTextDirectionLB;
      69             : 
      70             :     SwTableRep*     pTblData;
      71             :     SwTwips         nSaveWidth;
      72             :     SwTwips         nMinTableWidth;
      73             :     sal_uInt16          nOldAlign;
      74             :     sal_Bool            bModified;
      75             :     sal_Bool            bFull:1;
      76             :     sal_Bool            bHtmlMode : 1;
      77             : 
      78             :     void        Init();
      79             :     void        ModifyHdl( Edit* pEdit );
      80             : 
      81             :     DECL_LINK( AutoClickHdl, CheckBox * );
      82             :     DECL_LINK( RelWidthClickHdl, CheckBox * );
      83             :     void RightModify();
      84             :     DECL_LINK( UpDownLoseFocusHdl, MetricField * );
      85             : 
      86             :     using TabPage::ActivatePage;
      87             :     using TabPage::DeactivatePage;
      88             : 
      89             : public:
      90             :     SwFormatTablePage( Window* pParent, const SfxItemSet& rSet );
      91             : 
      92             :     static SfxTabPage*  Create( Window* pParent, const SfxItemSet& rAttrSet);
      93             :     virtual sal_Bool        FillItemSet( SfxItemSet& rSet );
      94             :     virtual void        Reset( const SfxItemSet& rSet );
      95             :     virtual void        ActivatePage( const SfxItemSet& rSet );
      96             :     virtual int         DeactivatePage( SfxItemSet* pSet = 0 );
      97             : };
      98             : 
      99             : /*-------------------------------------------------------
     100             :  TabPage Format/Tabelle/Spalten
     101             : --------------------------------------------------------- */
     102             : #define MET_FIELDS 6 //Anzahl der verwendeten MetricFields
     103             : 
     104             : class SwTableColumnPage : public SfxTabPage
     105             : {
     106             :     CheckBox        aModifyTableCB;
     107             :     CheckBox        aProportionalCB;
     108             :     FixedText       aSpaceFT;
     109             :     MetricField     aSpaceED;
     110             :      FixedLine        aColFL;
     111             :     ImageButton     aUpBtn;
     112             :     FixedText       aFT1;
     113             :     PercentField    aMF1;
     114             :     FixedText       aFT2;
     115             :     PercentField    aMF2;
     116             :     FixedText       aFT3;
     117             :     PercentField    aMF3;
     118             :     FixedText       aFT4;
     119             :     PercentField    aMF4;
     120             :     FixedText       aFT5;
     121             :     PercentField    aMF5;
     122             :     FixedText       aFT6;
     123             :     PercentField    aMF6;
     124             :     ImageButton     aDownBtn;
     125             : 
     126             :     SwTableRep*     pTblData;
     127             :     PercentField*   pFieldArr[MET_FIELDS];
     128             :     FixedText*      pTextArr[MET_FIELDS];
     129             :     SwTwips         nTableWidth;
     130             :     SwTwips         nMinWidth;
     131             :     sal_uInt16          nNoOfCols;
     132             :     sal_uInt16          nNoOfVisibleCols;
     133             :     //Breite merken, wenn auf autom. Ausrichtung gestellt wird
     134             :     sal_uInt16          aValueTbl[MET_FIELDS];//primaere Zuordnung der MetricFields
     135             :     sal_Bool            bModified:1;
     136             :     sal_Bool            bModifyTbl:1;
     137             :     sal_Bool            bPercentMode:1;
     138             : 
     139             :     void        Init(sal_Bool bWeb);
     140             :     DECL_LINK( AutoClickHdl, CheckBox * );
     141             :     void        ModifyHdl( PercentField* pEdit );
     142             :     DECL_LINK( UpHdl, PercentField * );
     143             :     DECL_LINK( DownHdl, PercentField * );
     144             :     DECL_LINK( LoseFocusHdl, PercentField * );
     145             :     DECL_LINK( ModeHdl, CheckBox * );
     146             :     void        UpdateCols( sal_uInt16 nAktPos );
     147             :     SwTwips     GetVisibleWidth(sal_uInt16 nPos);
     148             :     void        SetVisibleWidth(sal_uInt16 nPos, SwTwips nNewWidth);
     149             : 
     150             :     using TabPage::ActivatePage;
     151             :     using TabPage::DeactivatePage;
     152             : 
     153             : public:
     154             :     SwTableColumnPage( Window* pParent, const SfxItemSet& rSet );
     155             :     ~SwTableColumnPage();
     156             : 
     157             :     static SfxTabPage*  Create( Window* pParent, const SfxItemSet& rAttrSet);
     158             :     virtual sal_Bool        FillItemSet( SfxItemSet& rSet );
     159             :     virtual void        Reset( const SfxItemSet& rSet );
     160             :     virtual void        ActivatePage( const SfxItemSet& rSet );
     161             :     virtual int         DeactivatePage( SfxItemSet* pSet = 0 );
     162             : 
     163             : };
     164             : 
     165             : class SwTextFlowPage : public SfxTabPage
     166             : {
     167             :     FixedLine       aFlowFL;
     168             :     CheckBox        aPgBrkCB;
     169             :     RadioButton     aPgBrkRB;
     170             :     RadioButton     aColBrkRB;
     171             :     RadioButton     aPgBrkBeforeRB;
     172             :     RadioButton     aPgBrkAfterRB;
     173             :     CheckBox        aPageCollCB;
     174             :     ListBox         aPageCollLB;
     175             :     FixedText       aPageNoFT;
     176             :     NumericField    aPageNoNF;
     177             :     CheckBox        aSplitCB;
     178             :     TriStateBox     aSplitRowCB;
     179             :     CheckBox        aKeepCB;
     180             :     CheckBox        aHeadLineCB;
     181             :     FixedText       aRepeatHeaderFT;    // "dummy" to build before and after FT
     182             :     FixedText       aRepeatHeaderBeforeFT;
     183             :     NumericField    aRepeatHeaderNF;
     184             :     FixedText       aRepeatHeaderAfterFT;
     185             :     TextControlCombo    aRepeatHeaderCombo;
     186             :     FixedText       aTextDirectionFT;
     187             :     ListBox         aTextDirectionLB;
     188             : 
     189             :     FixedLine       aVertOrientFL;
     190             :     FixedText       aVertOrientFT;
     191             :     ListBox         aVertOrientLB;
     192             : 
     193             :     SwWrtShell*     pShell;
     194             : 
     195             :     sal_Bool            bPageBreak;
     196             :     sal_Bool            bHtmlMode;
     197             : 
     198             : 
     199             :     DECL_LINK(PageBreakHdl_Impl, void *);
     200             :     DECL_LINK(ApplyCollClickHdl_Impl, void *);
     201             :     DECL_LINK( PageBreakPosHdl_Impl, RadioButton* );
     202             :     DECL_LINK( PageBreakTypeHdl_Impl, RadioButton* );
     203             :     DECL_LINK( SplitHdl_Impl, CheckBox* );
     204             :     DECL_LINK( SplitRowHdl_Impl, TriStateBox* );
     205             :     DECL_LINK( HeadLineCBClickHdl, void* p = 0 );
     206             : 
     207             : 
     208             :     SwTextFlowPage( Window* pParent, const SfxItemSet& rSet );
     209             :     ~SwTextFlowPage();
     210             : 
     211             : public:
     212             :     static SfxTabPage*  Create( Window* pParent, const SfxItemSet& rAttrSet);
     213             :     virtual sal_Bool        FillItemSet( SfxItemSet& rSet );
     214             :     virtual void        Reset( const SfxItemSet& rSet );
     215             : 
     216             :     void                SetShell(SwWrtShell* pSh);
     217             : 
     218             :     void                DisablePageBreak();
     219             : };
     220             : 
     221             : #endif
     222             : 
     223             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10