LCOV - code coverage report
Current view: top level - libreoffice/sc/source/ui/miscdlgs - inscldlg.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 34 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 "inscldlg.hxx"
      28             : #include "scresid.hxx"
      29             : #include "miscdlgs.hrc"
      30             : 
      31             : 
      32             : static sal_uInt8 nInsItemChecked=0;
      33             : 
      34             : //==================================================================
      35             : 
      36           0 : ScInsertCellDlg::ScInsertCellDlg( Window* pParent,sal_Bool bDisallowCellMove) :
      37             :     ModalDialog     ( pParent, ScResId( RID_SCDLG_INSCELL ) ),
      38             :     //
      39             :     aFlFrame        ( this, ScResId( FL_FRAME ) ),
      40             :     aBtnCellsDown   ( this, ScResId( BTN_CELLSDOWN ) ),
      41             :     aBtnCellsRight  ( this, ScResId( BTN_CELLSRIGHT ) ),
      42             :     aBtnInsRows     ( this, ScResId( BTN_INSROWS ) ),
      43             :     aBtnInsCols     ( this, ScResId( BTN_INSCOLS ) ),
      44             :     aBtnOk          ( this, ScResId( BTN_OK ) ),
      45             :     aBtnCancel      ( this, ScResId( BTN_CANCEL ) ),
      46           0 :     aBtnHelp        ( this, ScResId( BTN_HELP ) )
      47             : {
      48           0 :     if (bDisallowCellMove)
      49             :     {
      50           0 :         aBtnCellsDown.Disable();
      51           0 :         aBtnCellsRight.Disable();
      52           0 :         aBtnInsRows.Check();
      53             : 
      54           0 :         switch(nInsItemChecked)
      55             :         {
      56           0 :             case 2: aBtnInsRows   .Check();break;
      57           0 :             case 3: aBtnInsCols   .Check();break;
      58           0 :             default:aBtnInsRows   .Check();break;
      59             :         }
      60             :     }
      61             :     else
      62             :     {
      63           0 :         switch(nInsItemChecked)
      64             :         {
      65           0 :             case 0: aBtnCellsDown .Check();break;
      66           0 :             case 1: aBtnCellsRight.Check();break;
      67           0 :             case 2: aBtnInsRows   .Check();break;
      68           0 :             case 3: aBtnInsCols   .Check();break;
      69             :         }
      70             :     }
      71             :     //-------------
      72           0 :     FreeResource();
      73           0 : }
      74             : 
      75             : //------------------------------------------------------------------------
      76             : 
      77           0 : InsCellCmd ScInsertCellDlg::GetInsCellCmd() const
      78             : {
      79           0 :     InsCellCmd nReturn = INS_NONE;
      80             : 
      81           0 :     if ( aBtnCellsDown.IsChecked() )
      82             :     {
      83           0 :         nInsItemChecked=0;
      84           0 :         nReturn = INS_CELLSDOWN;
      85             :     }
      86           0 :     else if ( aBtnCellsRight.IsChecked())
      87             :     {
      88           0 :         nInsItemChecked=1;
      89           0 :         nReturn = INS_CELLSRIGHT;
      90             :     }
      91           0 :     else if ( aBtnInsRows.IsChecked()   )
      92             :     {
      93           0 :         nInsItemChecked=2;
      94           0 :         nReturn = INS_INSROWS;
      95             :     }
      96           0 :     else if ( aBtnInsCols.IsChecked()   )
      97             :     {
      98           0 :         nInsItemChecked=3;
      99           0 :         nReturn = INS_INSCOLS;
     100             :     }
     101             : 
     102           0 :     return nReturn;
     103             : }
     104             : 
     105           0 : ScInsertCellDlg::~ScInsertCellDlg()
     106             : {
     107           0 : }
     108             : 
     109             : 
     110             : 
     111             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10