update dev300-m58
[ooovba.git] / chart2 / source / controller / dialogs / dlg_InsertLegend.cxx
blob4a7b045ef3589ac76faf4780cd5f3250d1611b7b
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: dlg_InsertLegend.cxx,v $
10 * $Revision: 1.8 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_chart2.hxx"
33 #include "dlg_InsertLegend.hxx"
34 #include "dlg_InsertLegend.hrc"
35 #include "res_LegendPosition.hxx"
36 #include "ObjectNameProvider.hxx"
37 #include "ResId.hxx"
38 #include "chartview/ChartSfxItemIds.hxx"
39 #include "NoWarningThisInCTOR.hxx"
41 // header for enum SvxChartLegendPos
42 #include <svx/chrtitem.hxx>
43 // header for class SfxItemPool
44 #include <svtools/itempool.hxx>
46 //.............................................................................
47 namespace chart
49 //.............................................................................
51 using namespace ::com::sun::star;
53 SchLegendDlg::SchLegendDlg(Window* pWindow, const uno::Reference< uno::XComponentContext>& xCC )
54 : ModalDialog(pWindow, SchResId(DLG_LEGEND))
55 , m_apLegendPositionResources( new LegendPositionResources(this,xCC) )
56 , aBtnOK(this, SchResId(BTN_OK))
57 , aBtnCancel(this, SchResId(BTN_CANCEL))
58 , aBtnHelp(this, SchResId(BTN_HELP))
60 FreeResource();
61 this->SetText( ObjectNameProvider::getName(OBJECTTYPE_LEGEND) );
64 SchLegendDlg::~SchLegendDlg()
68 void SchLegendDlg::init( const uno::Reference< frame::XModel >& xChartModel )
70 m_apLegendPositionResources->writeToResources( xChartModel );
73 bool SchLegendDlg::writeToModel( const uno::Reference< frame::XModel >& xChartModel ) const
75 m_apLegendPositionResources->writeToModel( xChartModel );
76 return true;
79 //.............................................................................
80 } //namespace chart
81 //.............................................................................