LCOV - code coverage report
Current view: top level - libreoffice/sc/source/ui/miscdlgs - delcldlg.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 33 0.0 %
Date: 2012-12-27 Functions: 0 4 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 "delcldlg.hxx"
      28             : #include "scresid.hxx"
      29             : #include "miscdlgs.hrc"
      30             : 
      31             : 
      32             : static sal_uInt8 nDelItemChecked=0;
      33             : 
      34             : //==================================================================
      35             : 
      36           0 : ScDeleteCellDlg::ScDeleteCellDlg( Window* pParent, sal_Bool bDisallowCellMove ) :
      37             :     ModalDialog     ( pParent, ScResId( RID_SCDLG_DELCELL ) ),
      38             :     //
      39             :     aFlFrame        ( this, ScResId( FL_FRAME ) ),
      40             :     aBtnCellsUp     ( this, ScResId( BTN_CELLSUP ) ),
      41             :     aBtnCellsLeft   ( this, ScResId( BTN_CELLSLEFT ) ),
      42             :     aBtnDelRows     ( this, ScResId( BTN_DELROWS ) ),
      43             :     aBtnDelCols     ( this, ScResId( BTN_DELCOLS ) ),
      44             :     aBtnOk          ( this, ScResId( BTN_OK ) ),
      45             :     aBtnCancel      ( this, ScResId( BTN_CANCEL ) ),
      46           0 :     aBtnHelp        ( this, ScResId( BTN_HELP ) )
      47             : {
      48             : 
      49           0 :     if (bDisallowCellMove)
      50             :     {
      51           0 :         aBtnCellsUp.Disable();
      52           0 :         aBtnCellsLeft.Disable();
      53             : 
      54           0 :         switch(nDelItemChecked)
      55             :         {
      56           0 :             case 2: aBtnDelRows.Check();break;
      57           0 :             case 3: aBtnDelCols.Check();break;
      58           0 :             default:aBtnDelRows.Check();break;
      59             :         }
      60             :     }
      61             :     else
      62             :     {
      63           0 :         switch(nDelItemChecked)
      64             :         {
      65           0 :             case 0: aBtnCellsUp.Check();break;
      66           0 :             case 1: aBtnCellsLeft.Check();break;
      67           0 :             case 2: aBtnDelRows.Check();break;
      68           0 :             case 3: aBtnDelCols.Check();break;
      69             :         }
      70             :     }
      71             : 
      72           0 :     FreeResource();
      73           0 : }
      74             : 
      75             : //------------------------------------------------------------------------
      76             : 
      77           0 : DelCellCmd ScDeleteCellDlg::GetDelCellCmd() const
      78             : {
      79           0 :     DelCellCmd nReturn = DEL_NONE;
      80             : 
      81           0 :     if ( aBtnCellsUp.IsChecked()   )
      82             :     {
      83           0 :         nDelItemChecked=0;
      84           0 :         nReturn = DEL_CELLSUP;
      85             :     }
      86           0 :     else if ( aBtnCellsLeft.IsChecked() )
      87             :     {
      88           0 :         nDelItemChecked=1;
      89           0 :         nReturn = DEL_CELLSLEFT;
      90             :     }
      91           0 :     else if ( aBtnDelRows.IsChecked()   )
      92             :     {
      93           0 :         nDelItemChecked=2;
      94           0 :         nReturn = DEL_DELROWS;
      95             :     }
      96           0 :     else if ( aBtnDelCols.IsChecked()   )
      97             :     {
      98           0 :         nDelItemChecked=3;
      99           0 :         nReturn = DEL_DELCOLS;
     100             :     }
     101             : 
     102           0 :     return nReturn;
     103             : }
     104             : 
     105           0 : ScDeleteCellDlg::~ScDeleteCellDlg()
     106             : {
     107           0 : }
     108             : 
     109             : 
     110             : 
     111             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10