LCOV - code coverage report
Current view: top level - sc/source/ui/miscdlgs - delcldlg.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 33 0.0 %
Date: 2012-08-25 Functions: 0 4 0.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2                 :            : /*************************************************************************
       3                 :            :  *
       4                 :            :  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       5                 :            :  *
       6                 :            :  * Copyright 2000, 2010 Oracle and/or its affiliates.
       7                 :            :  *
       8                 :            :  * OpenOffice.org - a multi-platform office productivity suite
       9                 :            :  *
      10                 :            :  * This file is part of OpenOffice.org.
      11                 :            :  *
      12                 :            :  * OpenOffice.org is free software: you can redistribute it and/or modify
      13                 :            :  * it under the terms of the GNU Lesser General Public License version 3
      14                 :            :  * only, as published by the Free Software Foundation.
      15                 :            :  *
      16                 :            :  * OpenOffice.org is distributed in the hope that it will be useful,
      17                 :            :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      18                 :            :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      19                 :            :  * GNU Lesser General Public License version 3 for more details
      20                 :            :  * (a copy is included in the LICENSE file that accompanied this code).
      21                 :            :  *
      22                 :            :  * You should have received a copy of the GNU Lesser General Public License
      23                 :            :  * version 3 along with OpenOffice.org.  If not, see
      24                 :            :  * <http://www.openoffice.org/license.html>
      25                 :            :  * for a copy of the LGPLv3 License.
      26                 :            :  *
      27                 :            :  ************************************************************************/
      28                 :            : 
      29                 :            : 
      30                 :            : #undef SC_DLLIMPLEMENTATION
      31                 :            : 
      32                 :            : 
      33                 :            : 
      34                 :            : //------------------------------------------------------------------
      35                 :            : 
      36                 :            : #include "delcldlg.hxx"
      37                 :            : #include "scresid.hxx"
      38                 :            : #include "miscdlgs.hrc"
      39                 :            : 
      40                 :            : 
      41                 :            : static sal_uInt8 nDelItemChecked=0;
      42                 :            : 
      43                 :            : //==================================================================
      44                 :            : 
      45                 :          0 : ScDeleteCellDlg::ScDeleteCellDlg( Window* pParent, sal_Bool bDisallowCellMove ) :
      46                 :            :     ModalDialog     ( pParent, ScResId( RID_SCDLG_DELCELL ) ),
      47                 :            :     //
      48                 :            :     aFlFrame        ( this, ScResId( FL_FRAME ) ),
      49                 :            :     aBtnCellsUp     ( this, ScResId( BTN_CELLSUP ) ),
      50                 :            :     aBtnCellsLeft   ( this, ScResId( BTN_CELLSLEFT ) ),
      51                 :            :     aBtnDelRows     ( this, ScResId( BTN_DELROWS ) ),
      52                 :            :     aBtnDelCols     ( this, ScResId( BTN_DELCOLS ) ),
      53                 :            :     aBtnOk          ( this, ScResId( BTN_OK ) ),
      54                 :            :     aBtnCancel      ( this, ScResId( BTN_CANCEL ) ),
      55                 :          0 :     aBtnHelp        ( this, ScResId( BTN_HELP ) )
      56                 :            : {
      57                 :            : 
      58                 :          0 :     if (bDisallowCellMove)
      59                 :            :     {
      60                 :          0 :         aBtnCellsUp.Disable();
      61                 :          0 :         aBtnCellsLeft.Disable();
      62                 :            : 
      63                 :          0 :         switch(nDelItemChecked)
      64                 :            :         {
      65                 :          0 :             case 2: aBtnDelRows.Check();break;
      66                 :          0 :             case 3: aBtnDelCols.Check();break;
      67                 :          0 :             default:aBtnDelRows.Check();break;
      68                 :            :         }
      69                 :            :     }
      70                 :            :     else
      71                 :            :     {
      72                 :          0 :         switch(nDelItemChecked)
      73                 :            :         {
      74                 :          0 :             case 0: aBtnCellsUp.Check();break;
      75                 :          0 :             case 1: aBtnCellsLeft.Check();break;
      76                 :          0 :             case 2: aBtnDelRows.Check();break;
      77                 :          0 :             case 3: aBtnDelCols.Check();break;
      78                 :            :         }
      79                 :            :     }
      80                 :            : 
      81                 :          0 :     FreeResource();
      82                 :          0 : }
      83                 :            : 
      84                 :            : //------------------------------------------------------------------------
      85                 :            : 
      86                 :          0 : DelCellCmd ScDeleteCellDlg::GetDelCellCmd() const
      87                 :            : {
      88                 :          0 :     DelCellCmd nReturn = DEL_NONE;
      89                 :            : 
      90                 :          0 :     if ( aBtnCellsUp.IsChecked()   )
      91                 :            :     {
      92                 :          0 :         nDelItemChecked=0;
      93                 :          0 :         nReturn = DEL_CELLSUP;
      94                 :            :     }
      95                 :          0 :     else if ( aBtnCellsLeft.IsChecked() )
      96                 :            :     {
      97                 :          0 :         nDelItemChecked=1;
      98                 :          0 :         nReturn = DEL_CELLSLEFT;
      99                 :            :     }
     100                 :          0 :     else if ( aBtnDelRows.IsChecked()   )
     101                 :            :     {
     102                 :          0 :         nDelItemChecked=2;
     103                 :          0 :         nReturn = DEL_DELROWS;
     104                 :            :     }
     105                 :          0 :     else if ( aBtnDelCols.IsChecked()   )
     106                 :            :     {
     107                 :          0 :         nDelItemChecked=3;
     108                 :          0 :         nReturn = DEL_DELCOLS;
     109                 :            :     }
     110                 :            : 
     111                 :          0 :     return nReturn;
     112                 :            : }
     113                 :            : 
     114                 :          0 : ScDeleteCellDlg::~ScDeleteCellDlg()
     115                 :            : {
     116                 :          0 : }
     117                 :            : 
     118                 :            : 
     119                 :            : 
     120                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10