fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / chart2 / source / controller / dialogs / dlg_InsertAxis_Grid.cxx
blob4ef50442f07cf9ce9a98497396cf7f5878544507
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #include "dlg_InsertAxis_Grid.hxx"
22 #include "ResId.hxx"
23 #include "chartview/ChartSfxItemIds.hxx"
24 #include "HelpIds.hrc"
25 #include "ObjectNameProvider.hxx"
27 #include <svl/eitem.hxx>
29 namespace chart
32 InsertAxisOrGridDialogData::InsertAxisOrGridDialogData()
33 : aPossibilityList(6)
34 , aExistenceList(6)
36 sal_Int32 nN = 0;
37 for(nN=6;nN--;)
38 aPossibilityList[nN]=true;
39 for(nN=6;nN--;)
40 aExistenceList[nN]=false;
43 // SchAxisDlg
45 SchAxisDlg::SchAxisDlg(vcl::Window* pWindow,
46 const InsertAxisOrGridDialogData& rInput, bool bAxisDlg)
47 : ModalDialog(pWindow,
48 bAxisDlg ?
49 OUString("InsertAxisDialog") :
50 OUString("InsertGridDialog"),
51 bAxisDlg ?
52 OUString("modules/schart/ui/insertaxisdlg.ui") :
53 OUString("modules/schart/ui/insertgriddlg.ui"))
55 get(m_pCbPrimaryX, "primaryX");
56 get(m_pCbPrimaryY, "primaryY");
57 get(m_pCbPrimaryZ, "primaryZ");
58 get(m_pCbSecondaryX, "secondaryX");
59 get(m_pCbSecondaryY, "secondaryY");
60 get(m_pCbSecondaryZ, "secondaryZ");
62 if (bAxisDlg)
65 //todo: remove if secondary z axis are possible somewhere
66 m_pCbSecondaryZ->Hide();
69 m_pCbPrimaryX->Check( rInput.aExistenceList[0] );
70 m_pCbPrimaryY->Check( rInput.aExistenceList[1] );
71 m_pCbPrimaryZ->Check( rInput.aExistenceList[2] );
72 m_pCbSecondaryX->Check( rInput.aExistenceList[3] );
73 m_pCbSecondaryY->Check( rInput.aExistenceList[4] );
74 m_pCbSecondaryZ->Check( rInput.aExistenceList[5] );
76 m_pCbPrimaryX->Enable( rInput.aPossibilityList[0] );
77 m_pCbPrimaryY->Enable( rInput.aPossibilityList[1] );
78 m_pCbPrimaryZ->Enable( rInput.aPossibilityList[2] );
79 m_pCbSecondaryX->Enable( rInput.aPossibilityList[3] );
80 m_pCbSecondaryY->Enable( rInput.aPossibilityList[4] );
81 m_pCbSecondaryZ->Enable( rInput.aPossibilityList[5] );
84 SchAxisDlg::~SchAxisDlg()
86 disposeOnce();
89 void SchAxisDlg::dispose()
91 m_pCbPrimaryX.clear();
92 m_pCbPrimaryY.clear();
93 m_pCbPrimaryZ.clear();
94 m_pCbSecondaryX.clear();
95 m_pCbSecondaryY.clear();
96 m_pCbSecondaryZ.clear();
97 ModalDialog::dispose();
101 void SchAxisDlg::getResult( InsertAxisOrGridDialogData& rOutput )
103 rOutput.aExistenceList[0]=m_pCbPrimaryX->IsChecked();
104 rOutput.aExistenceList[1]=m_pCbPrimaryY->IsChecked();
105 rOutput.aExistenceList[2]=m_pCbPrimaryZ->IsChecked();
106 rOutput.aExistenceList[3]=m_pCbSecondaryX->IsChecked();
107 rOutput.aExistenceList[4]=m_pCbSecondaryY->IsChecked();
108 rOutput.aExistenceList[5]=m_pCbSecondaryZ->IsChecked();
111 SchGridDlg::SchGridDlg( vcl::Window* pParent, const InsertAxisOrGridDialogData& rInput )
112 : SchAxisDlg( pParent, rInput, false )//rInAttrs, b3D, bNet, bSecondaryX, bSecondaryY, false )
116 } //namespace chart
118 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */