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

Generated by: LCOV version 1.10