LCOV - code coverage report
Current view: top level - sc/source/ui/drawfunc - drawsh4.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 41 0.0 %
Date: 2012-08-25 Functions: 0 1 0.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 42 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 <svx/drawitem.hxx>
      31                 :            : #include <svx/fontwork.hxx>
      32                 :            : #include <svx/svdotext.hxx>
      33                 :            : #include <svx/xdef.hxx>
      34                 :            : #include <sfx2/objsh.hxx>
      35                 :            : #include <sfx2/viewfrm.hxx>
      36                 :            : 
      37                 :            : #include "drawsh.hxx"
      38                 :            : #include "drawview.hxx"
      39                 :            : #include "viewdata.hxx"
      40                 :            : #include "tabvwsh.hxx"
      41                 :            : #include "sc.hrc"
      42                 :            : 
      43                 :            : 
      44                 :            : //------------------------------------------------------------------
      45                 :            : 
      46                 :          0 : void ScDrawShell::GetFormTextState(SfxItemSet& rSet)
      47                 :            : {
      48                 :          0 :     const SdrObject*    pObj        = NULL;
      49                 :          0 :     SvxFontWorkDialog*  pDlg        = NULL;
      50                 :          0 :     ScDrawView*         pDrView     = pViewData->GetScDrawView();
      51                 :          0 :     const SdrMarkList&  rMarkList   = pDrView->GetMarkedObjectList();
      52                 :          0 :     sal_uInt16              nId = SvxFontWorkChildWindow::GetChildWindowId();
      53                 :            : 
      54                 :          0 :     SfxViewFrame* pViewFrm = pViewData->GetViewShell()->GetViewFrame();
      55         [ #  # ]:          0 :     if ( pViewFrm->HasChildWindow(nId) )
      56                 :          0 :         pDlg = (SvxFontWorkDialog*)(pViewFrm->GetChildWindow(nId)->GetWindow());
      57                 :            : 
      58         [ #  # ]:          0 :     if ( rMarkList.GetMarkCount() == 1 )
      59                 :          0 :         pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
      60                 :            : 
      61         [ #  # ]:          0 :     if ( pObj == NULL || !pObj->ISA(SdrTextObj) ||
           [ #  #  #  # ]
                 [ #  # ]
      62                 :          0 :         !((SdrTextObj*) pObj)->HasText() )
      63                 :            :     {
      64         [ #  # ]:          0 :         if ( pDlg )
      65                 :          0 :             pDlg->SetActive(false);
      66                 :            : 
      67                 :          0 :         rSet.DisableItem(XATTR_FORMTXTSTYLE);
      68                 :          0 :         rSet.DisableItem(XATTR_FORMTXTADJUST);
      69                 :          0 :         rSet.DisableItem(XATTR_FORMTXTDISTANCE);
      70                 :          0 :         rSet.DisableItem(XATTR_FORMTXTSTART);
      71                 :          0 :         rSet.DisableItem(XATTR_FORMTXTMIRROR);
      72                 :          0 :         rSet.DisableItem(XATTR_FORMTXTSTDFORM);
      73                 :          0 :         rSet.DisableItem(XATTR_FORMTXTHIDEFORM);
      74                 :          0 :         rSet.DisableItem(XATTR_FORMTXTOUTLINE);
      75                 :          0 :         rSet.DisableItem(XATTR_FORMTXTSHADOW);
      76                 :          0 :         rSet.DisableItem(XATTR_FORMTXTSHDWCOLOR);
      77                 :          0 :         rSet.DisableItem(XATTR_FORMTXTSHDWXVAL);
      78                 :          0 :         rSet.DisableItem(XATTR_FORMTXTSHDWYVAL);
      79                 :            :     }
      80                 :            :     else
      81                 :            :     {
      82         [ #  # ]:          0 :         if ( pDlg )
      83                 :            :         {
      84         [ #  # ]:          0 :             SfxObjectShell* pDocSh = SfxObjectShell::Current();
      85                 :            : 
      86         [ #  # ]:          0 :             if ( pDocSh )
      87                 :            :             {
      88         [ #  # ]:          0 :                 const SfxPoolItem*  pItem = pDocSh->GetItem( SID_COLOR_TABLE );
      89                 :          0 :                 XColorListRef pColorList;
      90                 :            : 
      91         [ #  # ]:          0 :                 if ( pItem )
      92 [ #  # ][ #  # ]:          0 :                     pColorList = ((SvxColorListItem*)pItem)->GetColorList();
      93                 :            : 
      94         [ #  # ]:          0 :                 pDlg->SetActive();
      95                 :            : 
      96         [ #  # ]:          0 :                 if ( pColorList.is() )
      97         [ #  # ]:          0 :                     pDlg->SetColorList( pColorList );
      98                 :            :             }
      99                 :            :         }
     100         [ #  # ]:          0 :         SfxItemSet aViewAttr(pDrView->GetModel()->GetItemPool());
     101         [ #  # ]:          0 :         pDrView->GetAttributes(aViewAttr);
     102 [ #  # ][ #  # ]:          0 :         rSet.Set(aViewAttr);
     103                 :            :     }
     104                 :          0 : }
     105                 :            : 
     106                 :            : 
     107                 :            : 
     108                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10