LCOV - code coverage report
Current view: top level - sfx2/source/dialog - inputdlg.cxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 1 26 3.8 %
Date: 2015-06-13 12:38:46 Functions: 2 9 22.2 %
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             : 
      10             : #include "inputdlg.hxx"
      11             : 
      12             : #include <sfx2/sfxresid.hxx>
      13             : #include <vcl/button.hxx>
      14             : #include <vcl/edit.hxx>
      15             : #include <vcl/fixed.hxx>
      16             : 
      17           0 : InputDialog::InputDialog(const OUString &rLabelText, vcl::Window *pParent)
      18           0 :     : ModalDialog(pParent, "InputDialog", "sfx/ui/inputdialog.ui")
      19             : {
      20           0 :     get(m_pEntry, "entry");
      21           0 :     get(m_pLabel, "label");
      22           0 :     get(m_pOK, "ok");
      23           0 :     get(m_pCancel, "cancel");
      24           0 :     m_pLabel->SetText(rLabelText);
      25           0 :     m_pOK->SetClickHdl(LINK(this,InputDialog,ClickHdl));
      26           0 :     m_pCancel->SetClickHdl(LINK(this,InputDialog,ClickHdl));
      27           0 : }
      28             : 
      29           0 : InputDialog::~InputDialog()
      30             : {
      31           0 :     disposeOnce();
      32           0 : }
      33             : 
      34           0 : void InputDialog::dispose()
      35             : {
      36           0 :     m_pEntry.clear();
      37           0 :     m_pLabel.clear();
      38           0 :     m_pOK.clear();
      39           0 :     m_pCancel.clear();
      40           0 :     ModalDialog::dispose();
      41           0 : }
      42             : 
      43           0 : OUString InputDialog::getEntryText() const
      44             : {
      45           0 :     return m_pEntry->GetText();
      46             : }
      47             : 
      48           0 : IMPL_LINK(InputDialog,ClickHdl,PushButton*, pButton)
      49             : {
      50           0 :     EndDialog(pButton == m_pOK ? RET_OK : RET_CANCEL);
      51           0 :     return 0;
      52         648 : }
      53             : 
      54             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
      55             : 
      56             : 

Generated by: LCOV version 1.11