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 :
21 : #include "dlg_ChartType.hxx"
22 : #include "dlg_ChartType.hrc"
23 : #include "ResId.hxx"
24 : #include "ResourceIds.hrc"
25 : #include "Strings.hrc"
26 : #include "tp_ChartType.hxx"
27 : #include "macros.hxx"
28 : #include <com/sun/star/chart2/XChartDocument.hpp>
29 :
30 : using namespace ::com::sun::star;
31 :
32 : //.............................................................................
33 : namespace chart
34 : {
35 : //.............................................................................
36 : using namespace ::com::sun::star;
37 : using namespace ::com::sun::star::chart2;
38 :
39 0 : ChartTypeDialog::ChartTypeDialog( Window* pParent
40 : , const uno::Reference< frame::XModel >& xChartModel
41 : , const uno::Reference< uno::XComponentContext >& xContext )
42 : : ModalDialog( pParent, SchResId( DLG_DIAGRAM_TYPE ))
43 : , m_aFL( this, SchResId( FL_BUTTONS ) )
44 : , m_aBtnOK( this, SchResId( BTN_OK ) )
45 : , m_aBtnCancel( this, SchResId( BTN_CANCEL ) )
46 : , m_aBtnHelp( this, SchResId( BTN_HELP ) )
47 : , m_pChartTypeTabPage(0)
48 : , m_xChartModel(xChartModel)
49 0 : , m_xCC( xContext )
50 : {
51 0 : FreeResource();
52 :
53 0 : this->SetText(String(SchResId(STR_PAGE_CHARTTYPE)));
54 :
55 : //don't create the tabpages before FreeResource, otherwise the help ids are not matched correctly
56 0 : m_pChartTypeTabPage = new ChartTypeTabPage(this,uno::Reference< XChartDocument >::query(m_xChartModel),m_xCC,true/*live update*/,true/*hide title description*/);
57 0 : m_pChartTypeTabPage->initializePage();
58 0 : m_pChartTypeTabPage->Show();
59 0 : }
60 :
61 0 : ChartTypeDialog::~ChartTypeDialog()
62 : {
63 0 : delete m_pChartTypeTabPage;
64 0 : }
65 :
66 : //.............................................................................
67 : } //namespace chart
68 : //.............................................................................
69 :
70 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|