LCOV - code coverage report
Current view: top level - sc/source/ui/miscdlgs - inscldlg.cxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 37 0.0 %
Date: 2014-04-14 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             : #include "inscldlg.hxx"
      26             : #include "scresid.hxx"
      27             : #include "miscdlgs.hrc"
      28             : 
      29             : 
      30             : static sal_uInt8 nInsItemChecked=0;
      31             : 
      32           0 : ScInsertCellDlg::ScInsertCellDlg( Window* pParent,sal_Bool bDisallowCellMove) :
      33           0 :     ModalDialog     ( pParent, "InsertCellsDialog", "modules/scalc/ui/insertcells.ui")
      34             : {
      35           0 :     get(m_pBtnCellsDown, "down");
      36           0 :     get(m_pBtnCellsRight, "right");
      37           0 :     get(m_pBtnInsRow, "rows");
      38           0 :     get(m_pBtnInsCol, "cols");
      39             : 
      40           0 :     if (bDisallowCellMove)
      41             :     {
      42           0 :         m_pBtnCellsDown->Disable();
      43           0 :         m_pBtnCellsRight->Disable();
      44           0 :         m_pBtnInsRow->Check();
      45             : 
      46           0 :         switch(nInsItemChecked)
      47             :         {
      48           0 :             case 2: m_pBtnInsRow->Check();break;
      49           0 :             case 3: m_pBtnInsCol->Check();break;
      50           0 :             default:m_pBtnInsRow->Check();break;
      51             :         }
      52             :     }
      53             :     else
      54             :     {
      55           0 :         switch(nInsItemChecked)
      56             :         {
      57           0 :             case 0: m_pBtnCellsDown->Check();break;
      58           0 :             case 1: m_pBtnCellsRight->Check();break;
      59           0 :             case 2: m_pBtnInsRow->Check();break;
      60           0 :             case 3: m_pBtnInsCol->Check();break;
      61             :         }
      62             :     }
      63           0 : }
      64             : 
      65           0 : InsCellCmd ScInsertCellDlg::GetInsCellCmd() const
      66             : {
      67           0 :     InsCellCmd nReturn = INS_NONE;
      68             : 
      69           0 :     if ( m_pBtnCellsDown->IsChecked() )
      70             :     {
      71           0 :         nInsItemChecked=0;
      72           0 :         nReturn = INS_CELLSDOWN;
      73             :     }
      74           0 :     else if ( m_pBtnCellsRight->IsChecked())
      75             :     {
      76           0 :         nInsItemChecked=1;
      77           0 :         nReturn = INS_CELLSRIGHT;
      78             :     }
      79           0 :     else if ( m_pBtnInsRow->IsChecked()   )
      80             :     {
      81           0 :         nInsItemChecked=2;
      82           0 :         nReturn = INS_INSROWS;
      83             :     }
      84           0 :     else if ( m_pBtnInsCol->IsChecked()   )
      85             :     {
      86           0 :         nInsItemChecked=3;
      87           0 :         nReturn = INS_INSCOLS;
      88             :     }
      89             : 
      90           0 :     return nReturn;
      91             : }
      92             : 
      93           0 : ScInsertCellDlg::~ScInsertCellDlg()
      94             : {
      95           0 : }
      96             : 
      97             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10