LCOV - code coverage report
Current view: top level - sc/source/ui/miscdlgs - delcldlg.cxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 34 0.0 %
Date: 2014-04-14 Functions: 0 2 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             : #include "delcldlg.hxx"
      26             : #include "scresid.hxx"
      27             : #include "miscdlgs.hrc"
      28             : 
      29             : 
      30             : static sal_uInt8 nDelItemChecked=0;
      31             : 
      32           0 : ScDeleteCellDlg::ScDeleteCellDlg(Window* pParent, bool bDisallowCellMove)
      33           0 :     : ModalDialog(pParent, "DeleteCellsDialog", "modules/scalc/ui/deletecells.ui")
      34             : {
      35           0 :     get(m_pBtnCellsUp, "up");
      36           0 :     get(m_pBtnCellsLeft, "left");
      37           0 :     get(m_pBtnDelRows, "rows");
      38           0 :     get(m_pBtnDelCols, "cols");
      39             : 
      40           0 :     if (bDisallowCellMove)
      41             :     {
      42           0 :         m_pBtnCellsUp->Disable();
      43           0 :         m_pBtnCellsLeft->Disable();
      44             : 
      45           0 :         switch(nDelItemChecked)
      46             :         {
      47           0 :             case 2: m_pBtnDelRows->Check();break;
      48           0 :             case 3: m_pBtnDelCols->Check();break;
      49           0 :             default:m_pBtnDelRows->Check();break;
      50             :         }
      51             :     }
      52             :     else
      53             :     {
      54           0 :         switch(nDelItemChecked)
      55             :         {
      56           0 :             case 0: m_pBtnCellsUp->Check();break;
      57           0 :             case 1: m_pBtnCellsLeft->Check();break;
      58           0 :             case 2: m_pBtnDelRows->Check();break;
      59           0 :             case 3: m_pBtnDelCols->Check();break;
      60             :         }
      61             :     }
      62           0 : }
      63             : 
      64           0 : DelCellCmd ScDeleteCellDlg::GetDelCellCmd() const
      65             : {
      66           0 :     DelCellCmd nReturn = DEL_NONE;
      67             : 
      68           0 :     if ( m_pBtnCellsUp->IsChecked()   )
      69             :     {
      70           0 :         nDelItemChecked=0;
      71           0 :         nReturn = DEL_CELLSUP;
      72             :     }
      73           0 :     else if ( m_pBtnCellsLeft->IsChecked() )
      74             :     {
      75           0 :         nDelItemChecked=1;
      76           0 :         nReturn = DEL_CELLSLEFT;
      77             :     }
      78           0 :     else if ( m_pBtnDelRows->IsChecked()   )
      79             :     {
      80           0 :         nDelItemChecked=2;
      81           0 :         nReturn = DEL_DELROWS;
      82             :     }
      83           0 :     else if ( m_pBtnDelCols->IsChecked()   )
      84             :     {
      85           0 :         nDelItemChecked=3;
      86           0 :         nReturn = DEL_DELCOLS;
      87             :     }
      88             : 
      89           0 :     return nReturn;
      90             : }
      91             : 
      92             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10