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

Generated by: LCOV version 1.10