LCOV - code coverage report
Current view: top level - include/sfx2 - passwd.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 0 23 0.0 %
Date: 2014-11-03 Functions: 0 11 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_SFX2_PASSWD_HXX
      20             : #define INCLUDED_SFX2_PASSWD_HXX
      21             : 
      22             : #include <sal/config.h>
      23             : #include <sfx2/dllapi.h>
      24             : #include <vcl/button.hxx>
      25             : #include <vcl/dialog.hxx>
      26             : #include <vcl/edit.hxx>
      27             : #include <vcl/fixed.hxx>
      28             : #include <vcl/layout.hxx>
      29             : #include <sfx2/app.hxx>
      30             : 
      31             : // defines ---------------------------------------------------------------
      32             : 
      33             : #define SHOWEXTRAS_NONE      ((sal_uInt16)0x0000)
      34             : #define SHOWEXTRAS_USER      ((sal_uInt16)0x0001)
      35             : #define SHOWEXTRAS_CONFIRM   ((sal_uInt16)0x0002)
      36             : #define SHOWEXTRAS_PASSWORD2 ((sal_uInt16)0x0004)
      37             : #define SHOWEXTRAS_CONFIRM2  ((sal_uInt16)0x0008)
      38             : #define SHOWEXTRAS_ALL       ((sal_uInt16)(SHOWEXTRAS_USER | SHOWEXTRAS_CONFIRM))
      39             : 
      40             : // class SfxPasswordDialog -----------------------------------------------
      41             : 
      42           0 : class SFX2_DLLPUBLIC SfxPasswordDialog : public ModalDialog
      43             : {
      44             : private:
      45             :     VclFrame*       mpPassword1Box;
      46             :     FixedText*      mpUserFT;
      47             :     Edit*           mpUserED;
      48             :     FixedText*      mpPassword1FT;
      49             :     Edit*           mpPassword1ED;
      50             :     FixedText*      mpConfirm1FT;
      51             :     Edit*           mpConfirm1ED;
      52             : 
      53             :     VclFrame*       mpPassword2Box;
      54             :     FixedText*      mpPassword2FT;
      55             :     Edit*           mpPassword2ED;
      56             :     FixedText*      mpConfirm2FT;
      57             :     Edit*           mpConfirm2ED;
      58             : 
      59             :     FixedText*      mpMinLengthFT;
      60             : 
      61             :     OKButton*       mpOKBtn;
      62             : 
      63             :     OUString        maMinLenPwdStr;
      64             :     OUString        maMinLenPwdStr1;
      65             :     OUString        maEmptyPwdStr;
      66             :     OUString        maMainPwdStr;
      67             :     sal_uInt16      mnMinLen;
      68             :     sal_uInt16      mnExtras;
      69             : 
      70             :     bool            mbAsciiOnly;
      71             :     DECL_DLLPRIVATE_LINK(EditModifyHdl, Edit*);
      72             :     DECL_DLLPRIVATE_LINK(OKHdl, void *);
      73             : 
      74             :     void            SetPasswdText();
      75             : 
      76             : public:
      77             :     SfxPasswordDialog(vcl::Window* pParent, const OUString* pGroupText = NULL);
      78             : 
      79           0 :     OUString GetUser() const
      80             :     {
      81           0 :         return mpUserED->GetText();
      82             :     }
      83           0 :     OUString GetPassword() const
      84             :     {
      85           0 :         return mpPassword1ED->GetText();
      86             :     }
      87           0 :     OUString GetConfirm() const
      88             :     {
      89           0 :         return mpConfirm1ED->GetText();
      90             :     }
      91           0 :     OUString GetPassword2() const
      92             :     {
      93           0 :         return mpPassword2ED->GetText();
      94             :     }
      95           0 :     OUString GetConfirm2() const
      96             :     {
      97           0 :         return mpConfirm2ED->GetText();
      98             :     }
      99           0 :     void SetGroup2Text(const OUString& i_rText)
     100             :     {
     101           0 :         mpPassword2Box->set_label(i_rText);
     102           0 :     }
     103             :     void SetMinLen(sal_uInt16 Len);
     104           0 :     void SetEditHelpId(const OString& rId)
     105             :     {
     106           0 :         mpPassword1ED->SetHelpId( rId );
     107           0 :     }
     108           0 :     void ShowExtras(sal_uInt16 nExtras)
     109             :     {
     110           0 :         mnExtras = nExtras;
     111           0 :     }
     112           0 :     void AllowAsciiOnly(bool i_bAsciiOnly = true)
     113             :     {
     114           0 :         mbAsciiOnly = i_bAsciiOnly;
     115           0 :     }
     116             : 
     117             :     void ShowMinLengthText(bool bShow);
     118             : 
     119             :     virtual short Execute() SAL_OVERRIDE;
     120             : };
     121             : 
     122             : #endif // INCLUDED_SFX2_PASSWD_HXX
     123             : 
     124             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10