LCOV - code coverage report
Current view: top level - cui/source/inc - postdlg.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 0 23 0.0 %
Date: 2015-06-13 12:38:46 Functions: 0 9 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 INCLUDED_CUI_SOURCE_INC_POSTDLG_HXX
      20             : #define INCLUDED_CUI_SOURCE_INC_POSTDLG_HXX
      21             : 
      22             : #include <vcl/button.hxx>
      23             : #include <vcl/edit.hxx>
      24             : #include <vcl/group.hxx>
      25             : #include <vcl/layout.hxx>
      26             : #include <svtools/stdctrl.hxx>
      27             : #include <sfx2/basedlgs.hxx>
      28             : #include <svtools/svmedit.hxx>
      29             : 
      30             : // class SvxPostItDialog -------------------------------------------------
      31             : /*
      32             :     [Description]
      33             :     In this dialog a note can be created or edited. If the
      34             :     application holds a list of notes, it can be iterated
      35             :     over this list with links.
      36             : 
      37             :     [Items]
      38             :     <SvxPostitAuthorItem><SID_ATTR_POSTIT_AUTHOR>
      39             :     <SvxPostitDateItem><SID_ATTR_POSTIT_DATE>
      40             :     <SvxPostitTextItem><SID_ATTR_POSTIT_TEXT>
      41             : */
      42             : 
      43             : class SvxPostItDialog : public SfxModalDialog
      44             : {
      45             : public:
      46             :     SvxPostItDialog(vcl::Window* pParent, const SfxItemSet& rCoreSet,
      47             :                      bool bPrevNext = false);
      48             :     virtual ~SvxPostItDialog();
      49             :     virtual void dispose() SAL_OVERRIDE;
      50             : 
      51             :     static const sal_uInt16*      GetRanges();
      52           0 :     const SfxItemSet*   GetOutputItemSet() const { return pOutSet; }
      53             : 
      54             :     Link<>              GetPrevHdl() const { return aPrevHdlLink; }
      55           0 :     void                SetPrevHdl( const Link<>& rLink )
      56           0 :                             { aPrevHdlLink = rLink; }
      57             :     Link<>              GetNextHdl() const { return aNextHdlLink; }
      58           0 :     void                SetNextHdl( const Link<>& rLink )
      59           0 :                             { aNextHdlLink = rLink; }
      60             : 
      61             :     void EnableTravel(bool bNext, bool bPrev);
      62           0 :     OUString GetNote()
      63             :     {
      64           0 :         return m_pEditED->GetText();
      65             :     }
      66           0 :     void SetNote(const OUString& rTxt)
      67             :     {
      68           0 :         m_pEditED->SetText(rTxt);
      69           0 :     }
      70             :     void ShowLastAuthor(const OUString& rAuthor, const OUString& rDate);
      71           0 :     void DontChangeAuthor()
      72             :     {
      73           0 :         m_pAuthorBtn->Enable(false);
      74           0 :     }
      75           0 :     void HideAuthor()
      76             :     {
      77           0 :         m_pInsertAuthor->Hide();
      78           0 :     }
      79           0 :     void SetReadonlyPostIt(bool bDisable)
      80             :     {
      81           0 :         m_pOKBtn->Enable( !bDisable );
      82           0 :         m_pEditED->SetReadOnly( bDisable );
      83           0 :         m_pAuthorBtn->Enable( !bDisable );
      84           0 :     }
      85           0 :     bool IsOkEnabled() const
      86             :     {
      87           0 :         return m_pOKBtn->IsEnabled();
      88             :     }
      89             : 
      90             : private:
      91             :     VclPtr<FixedText>          m_pLastEditFT;
      92             : 
      93             :     VclPtr<VclMultiLineEdit>   m_pEditED;
      94             : 
      95             :     VclPtr<VclContainer>       m_pInsertAuthor;
      96             :     VclPtr<PushButton>         m_pAuthorBtn;
      97             : 
      98             :     VclPtr<OKButton>           m_pOKBtn;
      99             : 
     100             :     VclPtr<PushButton>         m_pPrevBtn;
     101             :     VclPtr<PushButton>         m_pNextBtn;
     102             : 
     103             :     const SfxItemSet&   rSet;
     104             :     SfxItemSet*         pOutSet;
     105             : 
     106             :     Link<>              aPrevHdlLink;
     107             :     Link<>              aNextHdlLink;
     108             : 
     109             :     DECL_LINK(Stamp, void *);
     110             :     DECL_LINK(OKHdl, void *);
     111             :     DECL_LINK(PrevHdl, void *);
     112             :     DECL_LINK(NextHdl, void *);
     113             : };
     114             : 
     115             : #endif
     116             : 
     117             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11