LCOV - code coverage report
Current view: top level - chart2/source/controller/dialogs - tp_LegendPosition.cxx (source / functions) Hit Total Coverage
Test: commit 0e63ca4fde4e446f346e35849c756a30ca294aab Lines: 1 19 5.3 %
Date: 2014-04-11 Functions: 2 6 33.3 %
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 "tp_LegendPosition.hxx"
      21             : #include "ResId.hxx"
      22             : #include "TabPages.hrc"
      23             : #include "res_LegendPosition.hxx"
      24             : #include "chartview/ChartSfxItemIds.hxx"
      25             : #include <svx/chrtitem.hxx>
      26             : #include <editeng/eeitem.hxx>
      27             : #include <editeng/frmdiritem.hxx>
      28             : 
      29             : namespace chart
      30             : {
      31             : 
      32           0 : SchLegendPosTabPage::SchLegendPosTabPage(Window* pWindow, const SfxItemSet& rInAttrs)
      33             :     : SfxTabPage( pWindow
      34             :                  ,"tp_LegendPosition"
      35             :                  ,"modules/schart/ui/tp_LegendPosition.ui"
      36             :                  , rInAttrs )
      37           0 :     , m_aLegendPositionResources(*this)
      38             : {
      39           0 :     get(m_pLbTextDirection,"LB_LEGEND_TEXTDIR");
      40             : 
      41           0 :     m_pLbTextDirection->SetDropDownLineCount(3);
      42           0 : }
      43             : 
      44           0 : SfxTabPage* SchLegendPosTabPage::Create(Window* pWindow, const SfxItemSet& rOutAttrs)
      45             : {
      46           0 :     return new SchLegendPosTabPage(pWindow, rOutAttrs);
      47             : }
      48             : 
      49           0 : bool SchLegendPosTabPage::FillItemSet(SfxItemSet& rOutAttrs)
      50             : {
      51           0 :     m_aLegendPositionResources.writeToItemSet(rOutAttrs);
      52             : 
      53           0 :     if( m_pLbTextDirection->GetSelectEntryCount() > 0 )
      54           0 :         rOutAttrs.Put( SfxInt32Item( EE_PARA_WRITINGDIR, m_pLbTextDirection->GetSelectEntryValue() ) );
      55             : 
      56           0 :     return true;
      57             : }
      58             : 
      59           0 : void SchLegendPosTabPage::Reset(const SfxItemSet& rInAttrs)
      60             : {
      61           0 :     m_aLegendPositionResources.initFromItemSet(rInAttrs);
      62             : 
      63           0 :     const SfxPoolItem* pPoolItem = 0;
      64           0 :     if( rInAttrs.GetItemState( EE_PARA_WRITINGDIR, true, &pPoolItem ) == SFX_ITEM_SET )
      65           0 :         m_pLbTextDirection->SelectEntryValue( SvxFrameDirection(((const SvxFrameDirectionItem*)pPoolItem)->GetValue()) );
      66           0 : }
      67             : 
      68          45 : } //namespace chart
      69             : 
      70             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10