LCOV - code coverage report
Current view: top level - cui/source/inc - postdlg.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 15 0.0 %
Date: 2012-08-25 Functions: 0 9 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 _SVX_POSTDLG_HXX
      29                 :            : #define _SVX_POSTDLG_HXX
      30                 :            : 
      31                 :            : #include <vcl/group.hxx>
      32                 :            : #include <vcl/button.hxx>
      33                 :            : #include <vcl/edit.hxx>
      34                 :            : #include <svtools/stdctrl.hxx>
      35                 :            : #include <sfx2/basedlgs.hxx>
      36                 :            : #include <svtools/svmedit.hxx>
      37                 :            : 
      38                 :            : // class SvxPostItDialog -------------------------------------------------
      39                 :            : /*
      40                 :            :     {k:\svx\prototyp\dialog\memo.bmp}
      41                 :            : 
      42                 :            :     [Description]
      43                 :            :     In this dialog a note can be created or edited. If the
      44                 :            :     application holds a list of notes, it can be iterated
      45                 :            :     over this list with links.
      46                 :            : 
      47                 :            :     [Items]
      48                 :            :     <SvxPostitAuthorItem><SID_ATTR_POSTIT_AUTHOR>
      49                 :            :     <SvxPostitDateItem><SID_ATTR_POSTIT_DATE>
      50                 :            :     <SvxPostitTextItem><SID_ATTR_POSTIT_TEXT>
      51                 :            : */
      52                 :            : 
      53                 :            : class SvxPostItDialog : public SfxModalDialog
      54                 :            : {
      55                 :            : public:
      56                 :            :     SvxPostItDialog( Window* pParent, const SfxItemSet& rCoreSet,
      57                 :            :                      sal_Bool bPrevNext = sal_False, sal_Bool bRedline = sal_False );
      58                 :            :     ~SvxPostItDialog();
      59                 :            : 
      60                 :            :     static sal_uInt16*      GetRanges();
      61                 :          0 :     const SfxItemSet*   GetOutputItemSet() const { return pOutSet; }
      62                 :            : 
      63                 :            :     Link                GetPrevHdl() const { return aPrevHdlLink; }
      64                 :          0 :     void                SetPrevHdl( const Link& rLink )
      65                 :          0 :                             { aPrevHdlLink = rLink; }
      66                 :            :     Link                GetNextHdl() const { return aNextHdlLink; }
      67                 :          0 :     void                SetNextHdl( const Link& rLink )
      68                 :          0 :                             { aNextHdlLink = rLink; }
      69                 :            : 
      70                 :            :     void                EnableTravel(sal_Bool bNext, sal_Bool bPrev);
      71                 :          0 :     inline String       GetNote() { return aEditED.GetText(); }
      72                 :          0 :     inline void         SetNote(const String& rTxt) { aEditED.SetText(rTxt); }
      73                 :            : 
      74                 :            :     void                ShowLastAuthor(const String& rAuthor, const String& rDate);
      75                 :          0 :     inline void         DontChangeAuthor()  { aAuthorBtn.Enable(sal_False); }
      76                 :          0 :     inline void         HideAuthor()        { aAuthorFT.Hide(); aAuthorBtn.Hide(); }
      77                 :          0 :     inline void         SetReadonlyPostIt(sal_Bool bDisable)
      78                 :            :                             {
      79                 :          0 :                                 aOKBtn.Enable( !bDisable );
      80                 :          0 :                                 aEditED.SetReadOnly( bDisable );
      81                 :          0 :                                 aAuthorBtn.Enable( !bDisable );
      82                 :          0 :                             }
      83                 :          0 :     inline sal_Bool         IsOkEnabled() const { return aOKBtn.IsEnabled(); }
      84                 :            : 
      85                 :            : private:
      86                 :            :     FixedLine           aPostItFL;
      87                 :            :     FixedText           aLastEditLabelFT;
      88                 :            :     FixedInfo           aLastEditFT;
      89                 :            : 
      90                 :            :     FixedText           aEditFT;
      91                 :            :     MultiLineEdit       aEditED;
      92                 :            : 
      93                 :            :     FixedText           aAuthorFT;
      94                 :            :     PushButton          aAuthorBtn;
      95                 :            : 
      96                 :            :     OKButton            aOKBtn;
      97                 :            :     CancelButton        aCancelBtn;
      98                 :            :     HelpButton          aHelpBtn;
      99                 :            : 
     100                 :            :     ImageButton         aPrevBtn;
     101                 :            :     ImageButton         aNextBtn;
     102                 :            : 
     103                 :            :     const SfxItemSet&   rSet;
     104                 :            :     SfxItemSet*         pOutSet;
     105                 :            : 
     106                 :            :     Link                aPrevHdlLink;
     107                 :            :     Link                aNextHdlLink;
     108                 :            : 
     109                 :            : #ifdef _SVX_POSTDLG_CXX
     110                 :            :     DECL_LINK(Stamp, void *);
     111                 :            :     DECL_LINK(OKHdl, void *);
     112                 :            :     DECL_LINK(PrevHdl, void *);
     113                 :            :     DECL_LINK(NextHdl, void *);
     114                 :            : #endif
     115                 :            : };
     116                 :            : 
     117                 :            : 
     118                 :            : #endif
     119                 :            : 
     120                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10