LCOV - code coverage report
Current view: top level - sc/source/ui/view - tabvwshd.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 5 13 38.5 %
Date: 2012-08-25 Functions: 1 1 100.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 3 18 16.7 %

           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                 :            : #ifdef _MSC_VER
      30                 :            : #pragma optimize ("", off)
      31                 :            : #endif
      32                 :            : 
      33                 :            : #include <sfx2/childwin.hxx>
      34                 :            : #include <sfx2/request.hxx>
      35                 :            : #include <sfx2/viewfrm.hxx>
      36                 :            : #include <vcl/svapp.hxx>
      37                 :            : #include <vcl/wrkwin.hxx>
      38                 :            : 
      39                 :            : #include "tabvwsh.hxx"
      40                 :            : #include "global.hxx"
      41                 :            : #include "scmod.hxx"
      42                 :            : #include "docsh.hxx"
      43                 :            : #include "sc.hrc"
      44                 :            : 
      45                 :            : 
      46                 :            : // STATIC DATA -----------------------------------------------------------
      47                 :            : 
      48                 :            : //!         Parent-Window fuer Dialoge
      49                 :            : //!         Problem: OLE Server!
      50                 :            : 
      51                 :        255 : Window* ScTabViewShell::GetDialogParent()
      52                 :            : {
      53                 :            :     //  if a ref-input dialog is open, use it as parent
      54                 :            :     //  (necessary when a slot is executed from the dialog's OK handler)
      55 [ -  + ][ #  # ]:        255 :     if ( nCurRefDlgId && nCurRefDlgId == SC_MOD()->GetCurRefDlgId() )
                 [ -  + ]
      56                 :            :     {
      57                 :          0 :         SfxViewFrame* pViewFrm = GetViewFrame();
      58         [ #  # ]:          0 :         if ( pViewFrm->HasChildWindow(nCurRefDlgId) )
      59                 :            :         {
      60                 :          0 :             SfxChildWindow* pChild = pViewFrm->GetChildWindow(nCurRefDlgId);
      61         [ #  # ]:          0 :             if (pChild)
      62                 :            :             {
      63                 :          0 :                 Window* pWin = pChild->GetWindow();
      64 [ #  # ][ #  # ]:          0 :                 if (pWin && pWin->IsVisible())
                 [ #  # ]
      65                 :          0 :                     return pWin;
      66                 :            :             }
      67                 :            :         }
      68                 :            :     }
      69                 :            : 
      70                 :        255 :     ScDocShell* pDocSh = GetViewData()->GetDocShell();
      71         [ -  + ]:        255 :     if ( pDocSh->IsOle() )
      72                 :            :     {
      73                 :            :         //TODO/LATER: how to GetEditWindow in embedded document?!
      74                 :            :         //It should be OK to return the VieShell Window!
      75                 :          0 :         return GetWindow();
      76                 :            :         //SvInPlaceEnvironment* pEnv = pDocSh->GetIPEnv();
      77                 :            :         //if (pEnv)
      78                 :            :         //    return pEnv->GetEditWin();
      79                 :            :     }
      80                 :            : 
      81                 :        255 :     return GetActiveWin();      // for normal views, too
      82                 :            : }
      83                 :            : 
      84                 :            : 
      85                 :            : 
      86                 :            : 
      87                 :            : 
      88                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10