LCOV - code coverage report
Current view: top level - sc/source/ui/view - tabvwsh8.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 29 0.0 %
Date: 2012-08-25 Functions: 0 3 0.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 20 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                 :            : #include "scitems.hxx"
      30                 :            : #include <editeng/boxitem.hxx>
      31                 :            : 
      32                 :            : #include "tabvwsh.hxx"
      33                 :            : #include "document.hxx"
      34                 :            : 
      35                 :            : 
      36                 :            : //------------------------------------------------------------------
      37                 :            : 
      38                 :          0 : void ScTabViewShell::SetDefaultFrameLine( const ::editeng::SvxBorderLine* pLine )
      39                 :            : {
      40         [ #  # ]:          0 :     if ( pLine )
      41                 :            :     {
      42                 :          0 :         delete pCurFrameLine;
      43                 :            :         pCurFrameLine = new ::editeng::SvxBorderLine( &pLine->GetColor(),
      44                 :            :                                             pLine->GetWidth(),
      45         [ #  # ]:          0 :                                             pLine->GetBorderLineStyle() );
      46                 :            :     }
      47         [ #  # ]:          0 :     else if ( pCurFrameLine )
      48                 :            :     {
      49                 :          0 :         delete pCurFrameLine;
      50                 :          0 :         pCurFrameLine = NULL;
      51                 :            :     }
      52                 :          0 : }
      53                 :            : 
      54                 :            : //------------------------------------------------------------------
      55                 :            : 
      56                 :          0 : sal_Bool ScTabViewShell::HasSelection( sal_Bool bText ) const
      57                 :            : {
      58                 :          0 :     sal_Bool bHas = false;
      59                 :          0 :     ScViewData* pData = (ScViewData*)GetViewData();     // const weggecasted
      60         [ #  # ]:          0 :     if ( bText )
      61                 :            :     {
      62                 :            :         //  Text enthalten: Anzahl2 >= 1
      63         [ #  # ]:          0 :         ScDocument* pDoc = pData->GetDocument();
      64         [ #  # ]:          0 :         ScMarkData& rMark = pData->GetMarkData();
      65                 :          0 :         ScAddress aCursor( pData->GetCurX(), pData->GetCurY(), pData->GetTabNo() );
      66                 :          0 :         double fVal = 0.0;
      67 [ #  # ][ #  # ]:          0 :         if ( pDoc->GetSelectionFunction( SUBTOTAL_FUNC_CNT2, aCursor, rMark, fVal ) )
      68                 :          0 :             bHas = ( fVal > 0.5 );
      69                 :            :     }
      70                 :            :     else
      71                 :            :     {
      72                 :          0 :         ScRange aRange;
      73         [ #  # ]:          0 :         ScMarkType eMarkType = pData->GetSimpleArea( aRange );
      74         [ #  # ]:          0 :         if ( eMarkType == SC_MARK_SIMPLE )
      75                 :          0 :             bHas = ( aRange.aStart != aRange.aEnd );    // more than 1 cell
      76                 :            :         else
      77                 :          0 :             bHas = sal_True;                                // multiple selection or filtered
      78                 :            :     }
      79                 :          0 :     return bHas;
      80                 :            : }
      81                 :            : 
      82                 :            : //------------------------------------------------------------------
      83                 :            : 
      84                 :          0 : void ScTabViewShell::UIDeactivated( SfxInPlaceClient* pClient )
      85                 :            : {
      86                 :          0 :     ClearHighlightRanges();
      87                 :            : 
      88                 :            :     //  Move an der ViewShell soll eigentlich vom Sfx gerufen werden, wenn sich
      89                 :            :     //  das Frame-Window wegen unterschiedlicher Toolboxen o.ae. verschiebt
      90                 :            :     //  (um nicht aus Versehen z.B. Zeichenobjekte zu verschieben, #56515#).
      91                 :            :     //  Dieser Mechanismus funktioniert aber momentan nicht, darum hier der Aufruf
      92                 :            :     //  per Hand (im Move wird verglichen, ob die Position wirklich geaendert ist).
      93                 :          0 :     ForceMove();
      94                 :          0 :     SfxViewShell::UIDeactivated( pClient );
      95                 :          0 : }
      96                 :            : 
      97                 :            : 
      98                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10