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

Generated by: LCOV version 1.10