LCOV - code coverage report
Current view: top level - libreoffice/sw/source/ui/inc - envlop.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 1 0.0 %
Date: 2012-12-27 Functions: 0 1 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 _ENVLOP_HXX
      20             : #define _ENVLOP_HXX
      21             : 
      22             : #include <svtools/svmedit.hxx>
      23             : #include <sfx2/tabdlg.hxx>
      24             : 
      25             : #include <vcl/fixed.hxx>
      26             : 
      27             : #include <vcl/edit.hxx>
      28             : 
      29             : #include <vcl/lstbox.hxx>
      30             : 
      31             : #include <vcl/button.hxx>
      32             : 
      33             : #include "envimg.hxx"
      34             : 
      35             : #define GetFldVal(rField)         (rField).Denormalize((rField).GetValue(FUNIT_TWIP))
      36             : #define SetFldVal(rField, lValue) (rField).SetValue((rField).Normalize(lValue), FUNIT_TWIP)
      37             : 
      38             : class SwEnvPage;
      39             : class SwEnvFmtPage;
      40             : class SwWrtShell;
      41             : class Printer;
      42             : 
      43             : // class SwEnvPreview ---------------------------------------------------------
      44             : class SwEnvPreview : public Window
      45             : {
      46             :     void Paint(const Rectangle&);
      47             : 
      48             : public:
      49             : 
      50             :      SwEnvPreview(SfxTabPage* pParent, const ResId& rResID);
      51             :     ~SwEnvPreview();
      52             : 
      53             : protected:
      54             :     virtual void DataChanged( const DataChangedEvent& rDCEvt );
      55             : };
      56             : 
      57             : // class SwEnvDlg -----------------------------------------------------------
      58             : class SwEnvDlg : public SfxTabDialog
      59             : {
      60             : friend class SwEnvPage;
      61             : friend class SwEnvFmtPage;
      62             : friend class SwEnvPrtPage;
      63             : friend class SwEnvPreview;
      64             : 
      65             :     String          sInsert;
      66             :     String          sChange;
      67             :     SwEnvItem       aEnvItem;
      68             :     SwWrtShell      *pSh;
      69             :     Printer         *pPrinter;
      70             :     SfxItemSet      *pAddresseeSet;
      71             :     SfxItemSet      *pSenderSet;
      72             : 
      73             :     virtual void    PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
      74             :     virtual short   Ok();
      75             : 
      76             : public:
      77             :      SwEnvDlg(Window* pParent, const SfxItemSet& rSet, SwWrtShell* pWrtSh, Printer* pPrt, sal_Bool bInsert);
      78             :     ~SwEnvDlg();
      79             : };
      80             : 
      81             : // class SwEnvPage ----------------------------------------------------------
      82             : class SwEnvPage : public SfxTabPage
      83             : {
      84             :     FixedText     aAddrText;
      85             :     MultiLineEdit aAddrEdit;
      86             :     FixedText     aDatabaseFT;
      87             :     ListBox       aDatabaseLB;
      88             :     FixedText     aTableFT;
      89             :     ListBox       aTableLB;
      90             :     ImageButton   aInsertBT;
      91             :     FixedText     aDBFieldFT;
      92             :     ListBox       aDBFieldLB;
      93             :     CheckBox      aSenderBox;
      94             :     MultiLineEdit aSenderEdit;
      95             :     SwEnvPreview  aPreview;
      96             : 
      97             :     SwWrtShell*   pSh;
      98             :     String        sActDBName;
      99             : 
     100             :      SwEnvPage(Window* pParent, const SfxItemSet& rSet);
     101             :     ~SwEnvPage();
     102             : 
     103             :     DECL_LINK( DatabaseHdl, ListBox * );
     104             :     DECL_LINK(FieldHdl, void *);
     105             :     DECL_LINK(SenderHdl, void *);
     106             : 
     107             :     void InitDatabaseBox();
     108             : 
     109           0 :     SwEnvDlg* GetParentSwEnvDlg() {return (SwEnvDlg*)GetParentDialog();}
     110             : 
     111             :     using SfxTabPage::ActivatePage;
     112             :     using SfxTabPage::DeactivatePage;
     113             : 
     114             : public:
     115             : 
     116             :     static SfxTabPage* Create(Window* pParent, const SfxItemSet& rSet);
     117             : 
     118             :     virtual void ActivatePage(const SfxItemSet& rSet);
     119             :     virtual int  DeactivatePage(SfxItemSet* pSet = 0);
     120             :             void FillItem(SwEnvItem& rItem);
     121             :     virtual sal_Bool FillItemSet(SfxItemSet& rSet);
     122             :     virtual void Reset(const SfxItemSet& rSet);
     123             : };
     124             : 
     125             : #endif
     126             : 
     127             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10