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

Generated by: LCOV version 1.11