LCOV - code coverage report
Current view: top level - libreoffice/editeng/source/editeng - editsel.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 13 36 36.1 %
Date: 2012-12-27 Functions: 3 10 30.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 <vcl/wrkwin.hxx>
      21             : #include <vcl/dialog.hxx>
      22             : #include <vcl/msgbox.hxx>
      23             : #include <vcl/svapp.hxx>
      24             : #include <editsel.hxx>
      25             : #include <impedit.hxx>
      26             : #include <editeng/editview.hxx>
      27             : 
      28             : //  ----------------------------------------------------------------------
      29             : //  class EditSelFunctionSet
      30             : //  ----------------------------------------------------------------------
      31        4318 : EditSelFunctionSet::EditSelFunctionSet()
      32             : {
      33        4318 :     pCurView = NULL;
      34        4318 : }
      35             : 
      36           0 : void EditSelFunctionSet::CreateAnchor()
      37             : {
      38           0 :     if ( pCurView )
      39           0 :         pCurView->pImpEditView->CreateAnchor();
      40           0 : }
      41             : 
      42           0 : void EditSelFunctionSet::DestroyAnchor()
      43             : {
      44             :     // Only with multiple selection
      45           0 : }
      46             : 
      47           0 : sal_Bool EditSelFunctionSet::SetCursorAtPoint( const Point& rPointPixel, sal_Bool )
      48             : {
      49           0 :     if ( pCurView )
      50           0 :         return pCurView->pImpEditView->SetCursorAtPoint( rPointPixel );
      51             : 
      52           0 :     return sal_False;
      53             : }
      54             : 
      55           0 : sal_Bool EditSelFunctionSet::IsSelectionAtPoint( const Point& rPointPixel )
      56             : {
      57           0 :     if ( pCurView )
      58           0 :         return pCurView->pImpEditView->IsSelectionAtPoint( rPointPixel );
      59             : 
      60           0 :     return sal_False;
      61             : }
      62             : 
      63           0 : void EditSelFunctionSet::DeselectAtPoint( const Point& )
      64             : {
      65             : // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
      66             : // !   Implement when multiple selection is possible   !
      67             : // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
      68           0 : }
      69             : 
      70           0 : void EditSelFunctionSet::BeginDrag()
      71             : {
      72             :     // Only with multiple selection
      73           0 : }
      74             : 
      75             : 
      76           0 : void EditSelFunctionSet::DeselectAll()
      77             : {
      78           0 :     if ( pCurView )
      79           0 :         pCurView->pImpEditView->DeselectAll();
      80           0 : }
      81             : 
      82             : //  ----------------------------------------------------------------------
      83             : //  class EditSelectionEngine
      84             : //  ----------------------------------------------------------------------
      85        4318 : EditSelectionEngine::EditSelectionEngine() : SelectionEngine( (Window*)0 )
      86             : {
      87        4318 :     SetSelectionMode( RANGE_SELECTION );
      88        4318 :     EnableDrag( sal_True );
      89        4318 : }
      90             : 
      91           4 : void EditSelectionEngine::SetCurView( EditView* pNewView )
      92             : {
      93           4 :     if ( GetFunctionSet() )
      94           4 :         ((EditSelFunctionSet*)GetFunctionSet())->SetCurView( pNewView );
      95             : 
      96           4 :     if ( pNewView )
      97           0 :         SetWindow( pNewView->GetWindow() );
      98             :     else
      99           4 :         SetWindow( (Window*)0 );
     100           4 : }
     101             : 
     102             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10