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

Generated by: LCOV version 1.10