LCOV - code coverage report
Current view: top level - libreoffice/sc/source/ui/miscdlgs - lbseldlg.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 21 0.0 %
Date: 2012-12-27 Functions: 0 6 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             : 
      20             : 
      21             : #undef SC_DLLIMPLEMENTATION
      22             : 
      23             : 
      24             : 
      25             : //------------------------------------------------------------------
      26             : 
      27             : #include <vcl/msgbox.hxx>
      28             : 
      29             : #include "lbseldlg.hxx"
      30             : #include "scresid.hxx"
      31             : #include "miscdlgs.hrc"
      32             : 
      33             : 
      34             : //==================================================================
      35             : 
      36           0 : ScSelEntryDlg::ScSelEntryDlg(      Window*  pParent,
      37             :                                    sal_uInt16   nResId,
      38             :                              const String&  aTitle,
      39             :                              const String&  aLbTitle,
      40             :                              const std::vector<String> &rEntryList ) :
      41             :     ModalDialog     ( pParent, ScResId( nResId ) ),
      42             :     //
      43             :     aFlLbTitle      ( this, ScResId( FL_ENTRYLIST ) ),
      44             :     aLb             ( this, ScResId( LB_ENTRYLIST ) ),
      45             :     aBtnOk          ( this, ScResId( BTN_OK ) ),
      46             :     aBtnCancel      ( this, ScResId( BTN_CANCEL ) ),
      47           0 :     aBtnHelp        ( this, ScResId( BTN_HELP ) )
      48             : {
      49           0 :     SetText( aTitle );
      50           0 :     aFlLbTitle.SetText( aLbTitle );
      51           0 :     aLb.Clear();
      52           0 :     aLb.SetDoubleClickHdl( LINK( this, ScSelEntryDlg, DblClkHdl ) );
      53             : 
      54           0 :     std::vector<String>::const_iterator pIter;
      55           0 :     for ( pIter = rEntryList.begin(); pIter != rEntryList.end(); ++pIter )
      56           0 :         aLb.InsertEntry(*pIter);
      57             : 
      58           0 :     if ( aLb.GetEntryCount() > 0 )
      59           0 :         aLb.SelectEntryPos( 0 );
      60             : 
      61             :     //-------------
      62           0 :     FreeResource();
      63           0 : }
      64             : 
      65             : //------------------------------------------------------------------------
      66             : 
      67           0 : String ScSelEntryDlg::GetSelectEntry() const
      68             : {
      69           0 :     return aLb.GetSelectEntry();
      70             : }
      71             : 
      72             : //------------------------------------------------------------------------
      73             : 
      74           0 : IMPL_LINK_NOARG_INLINE_START(ScSelEntryDlg, DblClkHdl)
      75             : {
      76           0 :     EndDialog( RET_OK );
      77           0 :     return 0;
      78             : }
      79           0 : IMPL_LINK_NOARG_INLINE_END(ScSelEntryDlg, DblClkHdl)
      80             : 
      81             : //------------------------------------------------------------------------
      82             : 
      83           0 : ScSelEntryDlg::~ScSelEntryDlg()
      84             : {
      85           0 : }
      86             : 
      87             : 
      88             : 
      89             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10