LCOV - code coverage report
Current view: top level - chart2/source/controller/dialogs - dlg_InsertAxis_Grid.cxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 1 47 2.1 %
Date: 2014-11-03 Functions: 2 10 20.0 %
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 "dlg_InsertAxis_Grid.hxx"
      21             : 
      22             : #include "ResId.hxx"
      23             : #include "chartview/ChartSfxItemIds.hxx"
      24             : #include "HelpIds.hrc"
      25             : #include "ObjectNameProvider.hxx"
      26             : 
      27             : #include <svl/eitem.hxx>
      28             : 
      29             : namespace chart
      30             : {
      31             : 
      32           0 : InsertAxisOrGridDialogData::InsertAxisOrGridDialogData()
      33             :         : aPossibilityList(6)
      34           0 :         , aExistenceList(6)
      35             : {
      36           0 :     sal_Int32 nN = 0;
      37           0 :     for(nN=6;nN--;)
      38           0 :         aPossibilityList[nN]=true;
      39           0 :     for(nN=6;nN--;)
      40           0 :         aExistenceList[nN]=false;
      41           0 : }
      42             : 
      43             : // SchAxisDlg
      44             : 
      45           0 : SchAxisDlg::SchAxisDlg(vcl::Window* pWindow,
      46             :     const InsertAxisOrGridDialogData& rInput, bool bAxisDlg)
      47             :     : ModalDialog(pWindow,
      48             :           bAxisDlg ?
      49             :               OString("InsertAxisDialog") :
      50             :               OString("InsertGridDialog"),
      51             :           bAxisDlg ?
      52             :               OUString("modules/schart/ui/insertaxisdlg.ui") :
      53           0 :               OUString("modules/schart/ui/insertgriddlg.ui"))
      54             : {
      55           0 :     get(m_pCbPrimaryX, "primaryX");
      56           0 :     get(m_pCbPrimaryY, "primaryY");
      57           0 :     get(m_pCbPrimaryZ, "primaryZ");
      58           0 :     get(m_pCbSecondaryX, "secondaryX");
      59           0 :     get(m_pCbSecondaryY, "secondaryY");
      60           0 :     get(m_pCbSecondaryZ, "secondaryZ");
      61             : 
      62           0 :     if (bAxisDlg)
      63             :     {
      64             : 
      65             :         //todo: remove if secondary z axis are possible somewhere
      66           0 :         m_pCbSecondaryZ->Hide();
      67             :     }
      68             : 
      69           0 :     m_pCbPrimaryX->Check( rInput.aExistenceList[0] );
      70           0 :     m_pCbPrimaryY->Check( rInput.aExistenceList[1] );
      71           0 :     m_pCbPrimaryZ->Check( rInput.aExistenceList[2] );
      72           0 :     m_pCbSecondaryX->Check( rInput.aExistenceList[3] );
      73           0 :     m_pCbSecondaryY->Check( rInput.aExistenceList[4] );
      74           0 :     m_pCbSecondaryZ->Check( rInput.aExistenceList[5] );
      75             : 
      76           0 :     m_pCbPrimaryX->Enable( rInput.aPossibilityList[0] );
      77           0 :     m_pCbPrimaryY->Enable( rInput.aPossibilityList[1] );
      78           0 :     m_pCbPrimaryZ->Enable( rInput.aPossibilityList[2] );
      79           0 :     m_pCbSecondaryX->Enable( rInput.aPossibilityList[3] );
      80           0 :     m_pCbSecondaryY->Enable( rInput.aPossibilityList[4] );
      81           0 :     m_pCbSecondaryZ->Enable( rInput.aPossibilityList[5] );
      82           0 : }
      83             : 
      84           0 : SchAxisDlg::~SchAxisDlg()
      85             : {
      86           0 : }
      87             : 
      88           0 : void SchAxisDlg::getResult( InsertAxisOrGridDialogData& rOutput )
      89             : {
      90           0 :     rOutput.aExistenceList[0]=m_pCbPrimaryX->IsChecked();
      91           0 :     rOutput.aExistenceList[1]=m_pCbPrimaryY->IsChecked();
      92           0 :     rOutput.aExistenceList[2]=m_pCbPrimaryZ->IsChecked();
      93           0 :     rOutput.aExistenceList[3]=m_pCbSecondaryX->IsChecked();
      94           0 :     rOutput.aExistenceList[4]=m_pCbSecondaryY->IsChecked();
      95           0 :     rOutput.aExistenceList[5]=m_pCbSecondaryZ->IsChecked();
      96           0 : }
      97             : 
      98           0 : SchGridDlg::SchGridDlg( vcl::Window* pParent, const InsertAxisOrGridDialogData& rInput )
      99           0 :                 : SchAxisDlg( pParent, rInput, false )//rInAttrs, b3D, bNet, bSecondaryX, bSecondaryY, false )
     100             : {
     101           0 : }
     102             : 
     103           0 : SchGridDlg::~SchGridDlg()
     104             : {
     105           0 : }
     106             : 
     107         102 : } //namespace chart
     108             : 
     109             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10