LCOV - code coverage report
Current view: top level - chart2/source/controller/dialogs - tp_PointGeometry.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 30 0.0 %
Date: 2012-08-25 Functions: 0 6 0.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 46 0.0 %

           Branch data     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 "tp_PointGeometry.hxx"
      21                 :            : #include "TabPages.hrc"
      22                 :            : #include "res_BarGeometry.hxx"
      23                 :            : #include "ResId.hxx"
      24                 :            : 
      25                 :            : #include "chartview/ChartSfxItemIds.hxx"
      26                 :            : 
      27                 :            : // header for SfxInt32Item
      28                 :            : #include <svl/intitem.hxx>
      29                 :            : // header for class Svx3DHorizontalSegmentsItem
      30                 :            : #include <svx/svx3ditems.hxx>
      31                 :            : 
      32                 :            : //.............................................................................
      33                 :            : namespace chart
      34                 :            : {
      35                 :            : //.............................................................................
      36                 :            : 
      37                 :          0 : SchLayoutTabPage::SchLayoutTabPage(Window* pWindow,const SfxItemSet& rInAttrs)
      38                 :            :                  : SfxTabPage(pWindow, SchResId(TP_LAYOUT), rInAttrs)
      39         [ #  # ]:          0 :                  , m_pGeometryResources(0)
      40                 :            : {
      41 [ #  # ][ #  # ]:          0 :     Point aPos( this->LogicToPixel( Point(6,6), MapMode(MAP_APPFONT) ) );
                 [ #  # ]
      42 [ #  # ][ #  # ]:          0 :     m_pGeometryResources = new BarGeometryResources( this );
      43         [ #  # ]:          0 :     m_pGeometryResources->SetPosPixel( aPos );
      44                 :          0 : }
      45                 :            : 
      46                 :          0 : SchLayoutTabPage::~SchLayoutTabPage()
      47                 :            : {
      48         [ #  # ]:          0 :     if( m_pGeometryResources )
      49 [ #  # ][ #  # ]:          0 :         delete m_pGeometryResources;
      50         [ #  # ]:          0 : }
      51                 :            : 
      52                 :          0 : SfxTabPage* SchLayoutTabPage::Create(Window* pWindow,
      53                 :            :                                         const SfxItemSet& rOutAttrs)
      54                 :            : {
      55         [ #  # ]:          0 :     return new SchLayoutTabPage(pWindow, rOutAttrs);
      56                 :            : }
      57                 :            : 
      58                 :          0 : sal_Bool SchLayoutTabPage::FillItemSet(SfxItemSet& rOutAttrs)
      59                 :            : {
      60                 :            : 
      61 [ #  # ][ #  # ]:          0 :     if(m_pGeometryResources && m_pGeometryResources->GetSelectEntryCount())
                 [ #  # ]
      62                 :            :     {
      63                 :          0 :         long nShape=CHART_SHAPE3D_SQUARE;
      64                 :          0 :         long nSegs=32;
      65                 :            : 
      66                 :          0 :         nShape = m_pGeometryResources->GetSelectEntryPos();
      67         [ #  # ]:          0 :         if(nShape==CHART_SHAPE3D_PYRAMID)
      68                 :          0 :             nSegs=4;
      69                 :            : 
      70         [ #  # ]:          0 :         rOutAttrs.Put(SfxInt32Item(SCHATTR_STYLE_SHAPE,nShape));
      71         [ #  # ]:          0 :         rOutAttrs.Put(Svx3DHorizontalSegmentsItem(nSegs));
      72                 :            :     }
      73                 :          0 :     return sal_True;
      74                 :            : }
      75                 :            : 
      76                 :          0 : void SchLayoutTabPage::Reset(const SfxItemSet& rInAttrs)
      77                 :            : {
      78                 :          0 :     const SfxPoolItem *pPoolItem = NULL;
      79                 :            : 
      80 [ #  # ][ #  # ]:          0 :     if (rInAttrs.GetItemState(SCHATTR_STYLE_SHAPE,sal_True, &pPoolItem) == SFX_ITEM_SET)
      81                 :            :     {
      82                 :          0 :         long nVal=((const SfxInt32Item*)pPoolItem)->GetValue();
      83         [ #  # ]:          0 :         if(m_pGeometryResources)
      84                 :            :         {
      85         [ #  # ]:          0 :             m_pGeometryResources->SelectEntryPos(static_cast<sal_uInt16>(nVal));
      86         [ #  # ]:          0 :             m_pGeometryResources->Show( true );
      87                 :            :         }
      88                 :            :     }
      89                 :          0 : }
      90                 :            : 
      91                 :            : //.............................................................................
      92                 :            : } //namespace chart
      93                 :            : //.............................................................................
      94                 :            : 
      95                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10