1 /**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License. You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied. See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23
24 // MARKER(update_precomp.py): autogen include statement, do not remove
25 #include "precompiled_chart2.hxx"
26
27 #include "dlg_NumberFormat.hxx"
28
29 // header for class SfxItemSet
30 #include <svl/itemset.hxx>
31
32 // header for class SvxNumberInfoItem
33 #define ITEMID_NUMBERINFO SID_ATTR_NUMBERFORMAT_INFO
34 #include <svx/numinf.hxx>
35
36 #include <svx/svxdlg.hxx>
37 #include <svx/dialogs.hrc>
38 #include <sfx2/tabdlg.hxx>
39
40 // header for SvNumberFormatter
41 #include <svl/zforlist.hxx>
42
43 //.............................................................................
44 namespace chart
45 {
46 //.............................................................................
47 using namespace ::com::sun::star;
48
NumberFormatDialog(Window * pParent,SfxItemSet & rSet)49 NumberFormatDialog::NumberFormatDialog(Window* pParent, SfxItemSet& rSet)
50 : SfxSingleTabDialog( pParent, rSet, 0 )
51 {
52 SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
53 ::CreateTabPage fnCreatePage = pFact->GetTabPageCreatorFunc( RID_SVXPAGE_NUMBERFORMAT );
54 if ( fnCreatePage )
55 {
56 SfxTabPage* pTabPage = (*fnCreatePage)( this, rSet );
57 pTabPage->PageCreated(rSet);
58 SetTabPage(pTabPage);
59 }
60 }
61
~NumberFormatDialog()62 NumberFormatDialog::~NumberFormatDialog()
63 {
64 }
65
CreateEmptyItemSetForNumberFormatDialog(SfxItemPool & rItemPool)66 SfxItemSet NumberFormatDialog::CreateEmptyItemSetForNumberFormatDialog( SfxItemPool& rItemPool )
67 {
68 static const sal_uInt16 nWhichPairs[] =
69 {
70 SID_ATTR_NUMBERFORMAT_VALUE, SID_ATTR_NUMBERFORMAT_INFO,
71 SID_ATTR_NUMBERFORMAT_NOLANGUAGE, SID_ATTR_NUMBERFORMAT_NOLANGUAGE,
72 SID_ATTR_NUMBERFORMAT_ONE_AREA, SID_ATTR_NUMBERFORMAT_ONE_AREA,
73 SID_ATTR_NUMBERFORMAT_SOURCE, SID_ATTR_NUMBERFORMAT_SOURCE,
74 0
75 };
76 return SfxItemSet( rItemPool, nWhichPairs );
77 }
78
79 //.............................................................................
80 } //namespace chart
81 //.............................................................................
82