LCOV - code coverage report
Current view: top level - chart2/source/controller/dialogs - tp_LegendPosition.cxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 1 26 3.8 %
Date: 2015-06-13 12:38:46 Functions: 2 9 22.2 %
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 "ResourceIds.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(vcl::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 : SchLegendPosTabPage::~SchLegendPosTabPage()
      45             : {
      46           0 :     disposeOnce();
      47           0 : }
      48             : 
      49           0 : void SchLegendPosTabPage::dispose()
      50             : {
      51           0 :     m_pLbTextDirection.clear();
      52           0 :     SfxTabPage::dispose();
      53           0 : }
      54             : 
      55             : 
      56           0 : VclPtr<SfxTabPage> SchLegendPosTabPage::Create(vcl::Window* pWindow, const SfxItemSet* rOutAttrs)
      57             : {
      58           0 :     return VclPtr<SchLegendPosTabPage>::Create(pWindow, *rOutAttrs);
      59             : }
      60             : 
      61           0 : bool SchLegendPosTabPage::FillItemSet(SfxItemSet* rOutAttrs)
      62             : {
      63           0 :     m_aLegendPositionResources.writeToItemSet(*rOutAttrs);
      64             : 
      65           0 :     if( m_pLbTextDirection->GetSelectEntryCount() > 0 )
      66           0 :         rOutAttrs->Put( SvxFrameDirectionItem( m_pLbTextDirection->GetSelectEntryValue(), EE_PARA_WRITINGDIR ) );
      67             : 
      68           0 :     return true;
      69             : }
      70             : 
      71           0 : void SchLegendPosTabPage::Reset(const SfxItemSet* rInAttrs)
      72             : {
      73           0 :     m_aLegendPositionResources.initFromItemSet(*rInAttrs);
      74             : 
      75           0 :     const SfxPoolItem* pPoolItem = 0;
      76           0 :     if( rInAttrs->GetItemState( EE_PARA_WRITINGDIR, true, &pPoolItem ) == SfxItemState::SET )
      77           0 :         m_pLbTextDirection->SelectEntryValue( SvxFrameDirection(static_cast<const SvxFrameDirectionItem*>(pPoolItem)->GetValue()) );
      78           0 : }
      79             : 
      80          57 : } //namespace chart
      81             : 
      82             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11