LCOV - code coverage report
Current view: top level - sw/source/ui/envelp - labfmt.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 6 0.0 %
Date: 2012-08-25 Functions: 0 4 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 _LABFMT_HXX
      29                 :            : #define _LABFMT_HXX
      30                 :            : 
      31                 :            : #include "swuilabimp.hxx"
      32                 :            : #include "labimg.hxx"
      33                 :            : #include <vcl/msgbox.hxx>
      34                 :            : class SwLabFmtPage;
      35                 :            : 
      36                 :            : // class SwLabPreview -------------------------------------------------------
      37                 :            : 
      38                 :            : class SwLabPreview : public Window
      39                 :            : {
      40                 :            :     long lOutWPix;
      41                 :            :     long lOutHPix;
      42                 :            :     long lOutWPix23;
      43                 :            :     long lOutHPix23;
      44                 :            : 
      45                 :            :     Color aGrayColor;
      46                 :            : 
      47                 :            :     String aHDistStr;
      48                 :            :     String aVDistStr;
      49                 :            :     String aWidthStr;
      50                 :            :     String aHeightStr;
      51                 :            :     String aLeftStr;
      52                 :            :     String aUpperStr;
      53                 :            :     String aColsStr;
      54                 :            :     String aRowsStr;
      55                 :            :     String aPWidthStr;
      56                 :            :     String aPHeightStr;
      57                 :            : 
      58                 :            :     long lHDistWidth;
      59                 :            :     long lVDistWidth;
      60                 :            :     long lHeightWidth;
      61                 :            :     long lLeftWidth;
      62                 :            :     long lUpperWidth;
      63                 :            :     long lColsWidth;
      64                 :            :     long PRowsWidth;
      65                 :            :     long lPWidthWidth;
      66                 :            :     long lPHeightWidth;
      67                 :            : 
      68                 :            :     long lXWidth;
      69                 :            :     long lXHeight;
      70                 :            : 
      71                 :            :     SwLabItem aItem;
      72                 :            : 
      73                 :            :     void Paint(const Rectangle&);
      74                 :            : 
      75                 :            :     void DrawArrow(const Point& rP1, const Point& rP2, sal_Bool bArrow);
      76                 :            : 
      77                 :            :     using Window::GetParent;
      78                 :            :     SwLabFmtPage* GetParent() {return (SwLabFmtPage*) Window::GetParent();}
      79                 :            : 
      80                 :            :     using Window::Update;
      81                 :            : 
      82                 :            : public:
      83                 :            : 
      84                 :            :      SwLabPreview(const SwLabFmtPage* pParent, const ResId& rResID);
      85                 :            :     ~SwLabPreview();
      86                 :            : 
      87                 :            :     void Update(const SwLabItem& rItem);
      88                 :            : };
      89                 :            : 
      90                 :            : // class SwLabFmtPage -------------------------------------------------------
      91                 :            : 
      92                 :            : class SwLabFmtPage : public SfxTabPage
      93                 :            : {
      94                 :            :     FixedInfo       aMakeFI;
      95                 :            :     FixedInfo       aTypeFI;
      96                 :            :     SwLabPreview aPreview;
      97                 :            :     FixedText    aHDistText;
      98                 :            :     MetricField  aHDistField;
      99                 :            :     FixedText    aVDistText;
     100                 :            :     MetricField  aVDistField;
     101                 :            :     FixedText    aWidthText;
     102                 :            :     MetricField  aWidthField;
     103                 :            :     FixedText    aHeightText;
     104                 :            :     MetricField  aHeightField;
     105                 :            :     FixedText    aLeftText;
     106                 :            :     MetricField  aLeftField;
     107                 :            :     FixedText    aUpperText;
     108                 :            :     MetricField  aUpperField;
     109                 :            :     FixedText    aColsText;
     110                 :            :     NumericField aColsField;
     111                 :            :     FixedText    aRowsText;
     112                 :            :     NumericField aRowsField;
     113                 :            :     FixedText    aPWidthText;
     114                 :            :     MetricField  aPWidthField;
     115                 :            :     FixedText    aPHeightText;
     116                 :            :     MetricField  aPHeightField;
     117                 :            :     PushButton   aSavePB;
     118                 :            : 
     119                 :            :     Timer aPreviewTimer;
     120                 :            :     sal_Bool  bModified;
     121                 :            : 
     122                 :            :     SwLabItem    aItem;
     123                 :            : 
     124                 :            :      SwLabFmtPage(Window* pParent, const SfxItemSet& rSet);
     125                 :            :     ~SwLabFmtPage();
     126                 :            : 
     127                 :            :     DECL_LINK(ModifyHdl, void *);
     128                 :            :     DECL_LINK(PreviewHdl, void *);
     129                 :            :     DECL_LINK( LoseFocusHdl, Control * );
     130                 :            :     DECL_LINK(SaveHdl, void *);
     131                 :            : 
     132                 :            :     void ChangeMinMax();
     133                 :            : 
     134                 :            :     using TabPage::ActivatePage;
     135                 :            :     using TabPage::DeactivatePage;
     136                 :            :     using Window::GetParent;
     137                 :            : 
     138                 :            : public:
     139                 :            : 
     140                 :            :     static SfxTabPage* Create(Window* pParent, const SfxItemSet& rSet);
     141                 :            : 
     142                 :            :     virtual void ActivatePage(const SfxItemSet& rSet);
     143                 :            :     virtual int  DeactivatePage(SfxItemSet* pSet = 0);
     144                 :            :             void FillItem(SwLabItem& rItem);
     145                 :            :     virtual sal_Bool FillItemSet(SfxItemSet& rSet);
     146                 :            :     virtual void Reset(const SfxItemSet& rSet);
     147                 :            : 
     148                 :          0 :     SwLabDlg* GetParent() {return (SwLabDlg*) SfxTabPage::GetParent()->GetParent();}
     149                 :            : };
     150                 :            : 
     151                 :          0 : class SwSaveLabelDlg : public ModalDialog
     152                 :            : {
     153                 :            :     FixedLine       aOptionsFL;
     154                 :            :     FixedText       aMakeFT;
     155                 :            :     ComboBox        aMakeCB;
     156                 :            :     FixedText       aTypeFT;
     157                 :            :     Edit            aTypeED;
     158                 :            : 
     159                 :            :     OKButton        aOKPB;
     160                 :            :     CancelButton    aCancelPB;
     161                 :            :     HelpButton      aHelpPB;
     162                 :            : 
     163                 :            :     QueryBox        aQueryMB;
     164                 :            : 
     165                 :            :     sal_Bool        bSuccess;
     166                 :            :     SwLabFmtPage*   pLabPage;
     167                 :            :     SwLabRec&       rLabRec;
     168                 :            : 
     169                 :            :     DECL_LINK(OkHdl, void *);
     170                 :            :     DECL_LINK(ModifyHdl, void *);
     171                 :            : 
     172                 :            : public:
     173                 :            :     SwSaveLabelDlg(SwLabFmtPage* pParent, SwLabRec& rRec);
     174                 :            : 
     175                 :          0 :     void    SetLabel(const rtl::OUString& rMake, const rtl::OUString& rType)
     176                 :            :         {
     177                 :          0 :             aMakeCB.SetText(String(rMake));
     178                 :          0 :             aTypeED.SetText(String(rType));
     179                 :          0 :         }
     180                 :            :     sal_Bool GetLabel(SwLabItem& rItem);
     181                 :            : };
     182                 :            : #endif
     183                 :            : 
     184                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10