1*96de5490SAndrew Rist /**************************************************************
2cdf0e10cSrcweir *
3*96de5490SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
4*96de5490SAndrew Rist * or more contributor license agreements. See the NOTICE file
5*96de5490SAndrew Rist * distributed with this work for additional information
6*96de5490SAndrew Rist * regarding copyright ownership. The ASF licenses this file
7*96de5490SAndrew Rist * to you under the Apache License, Version 2.0 (the
8*96de5490SAndrew Rist * "License"); you may not use this file except in compliance
9*96de5490SAndrew Rist * with the License. You may obtain a copy of the License at
10cdf0e10cSrcweir *
11*96de5490SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir *
13*96de5490SAndrew Rist * Unless required by applicable law or agreed to in writing,
14*96de5490SAndrew Rist * software distributed under the License is distributed on an
15*96de5490SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*96de5490SAndrew Rist * KIND, either express or implied. See the License for the
17*96de5490SAndrew Rist * specific language governing permissions and limitations
18*96de5490SAndrew Rist * under the License.
19cdf0e10cSrcweir *
20*96de5490SAndrew Rist *************************************************************/
21*96de5490SAndrew Rist
22*96de5490SAndrew Rist
23cdf0e10cSrcweir
24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
25cdf0e10cSrcweir #include "precompiled_dbaccess.hxx"
26cdf0e10cSrcweir
27cdf0e10cSrcweir
28cdf0e10cSrcweir #ifndef DBAUI_SBATTRDLG_HXX
29cdf0e10cSrcweir #include "dlgattr.hxx"
30cdf0e10cSrcweir #endif
31cdf0e10cSrcweir
32cdf0e10cSrcweir #ifndef _SFXTABDLG_HXX //autogen
33cdf0e10cSrcweir #include <sfx2/tabdlg.hxx>
34cdf0e10cSrcweir #endif
35cdf0e10cSrcweir
36cdf0e10cSrcweir #ifndef _SVX_NUMINF_HXX //autogen
37cdf0e10cSrcweir #include <svx/numinf.hxx>
38cdf0e10cSrcweir #endif
39cdf0e10cSrcweir
40cdf0e10cSrcweir //CHINA001 #ifndef _SVX_CHARDLG_HXX //autogen
41cdf0e10cSrcweir //CHINA001 #include <svx/chardlg.hxx>
42cdf0e10cSrcweir //CHINA001 #endif
43cdf0e10cSrcweir
44cdf0e10cSrcweir //CHINA001 #ifndef _SVX_NUMFMT_HXX //autogen
45cdf0e10cSrcweir //CHINA001 #include <svx/numfmt.hxx>
46cdf0e10cSrcweir //CHINA001 #endif
47cdf0e10cSrcweir #ifndef _SVX_NUMINF_HXX
48cdf0e10cSrcweir #include <svx/numinf.hxx>
49cdf0e10cSrcweir #endif
50cdf0e10cSrcweir
51cdf0e10cSrcweir //CHINA001 #ifndef _SVX_ALIGN_HXX //autogen
52cdf0e10cSrcweir //CHINA001 #include <svx/align.hxx>
53cdf0e10cSrcweir //CHINA001 #endif
54cdf0e10cSrcweir
55cdf0e10cSrcweir #ifndef _SVX_DIALOGS_HRC
56cdf0e10cSrcweir #include <svx/dialogs.hrc>
57cdf0e10cSrcweir #endif
58cdf0e10cSrcweir #ifndef _DBU_DLG_HRC_
59cdf0e10cSrcweir #include "dbu_dlg.hrc"
60cdf0e10cSrcweir #endif
61cdf0e10cSrcweir #ifndef _SFXITEMSET_HXX
62cdf0e10cSrcweir #include <svl/itemset.hxx>
63cdf0e10cSrcweir #endif
64cdf0e10cSrcweir #define _ZFORLIST_DECLARE_TABLE
65cdf0e10cSrcweir #ifndef _ZFORLIST_HXX
66cdf0e10cSrcweir #include <svl/zforlist.hxx>
67cdf0e10cSrcweir #endif
68cdf0e10cSrcweir #include <svx/svxids.hrc> //CHINA001
69cdf0e10cSrcweir #include <svx/flagsdef.hxx> //CHINA001
70cdf0e10cSrcweir #ifndef _SFXINTITEM_HXX //CHINA001
71cdf0e10cSrcweir #include <svl/intitem.hxx> //CHINA001
72cdf0e10cSrcweir #endif //CHINA001
73cdf0e10cSrcweir #ifndef _DBAUI_MODULE_DBU_HXX_
74cdf0e10cSrcweir #include "moduledbu.hxx"
75cdf0e10cSrcweir #endif
76cdf0e10cSrcweir using namespace dbaui;
77cdf0e10cSrcweir
DBG_NAME(SbaSbAttrDlg)78cdf0e10cSrcweir DBG_NAME(SbaSbAttrDlg)
79cdf0e10cSrcweir //==================================================================
80cdf0e10cSrcweir SbaSbAttrDlg::SbaSbAttrDlg(Window* pParent, const SfxItemSet* pCellAttrs, SvNumberFormatter* pFormatter, sal_uInt16 nFlags, sal_Bool bRow)
81cdf0e10cSrcweir : SfxTabDialog(pParent, ModuleRes( DLG_ATTR ), pCellAttrs )
82cdf0e10cSrcweir ,aTitle(ModuleRes(ST_ROW))
83cdf0e10cSrcweir {
84cdf0e10cSrcweir DBG_CTOR(SbaSbAttrDlg,NULL);
85cdf0e10cSrcweir
86cdf0e10cSrcweir pNumberInfoItem = new SvxNumberInfoItem( pFormatter, 0 );
87cdf0e10cSrcweir
88cdf0e10cSrcweir if (bRow)
89cdf0e10cSrcweir SetText(aTitle);
90cdf0e10cSrcweir if( nFlags & TP_ATTR_CHAR )
91cdf0e10cSrcweir {
92cdf0e10cSrcweir // AddTabPage( RID_SVXPAGE_CHAR_STD,String(ModuleRes(TP_ATTR_CHAR)),SvxCharStdPage::Create, 0 );
93cdf0e10cSrcweir DBG_ERROR( "found flag TP_ATTR_CHAR" );
94cdf0e10cSrcweir }
95cdf0e10cSrcweir if( nFlags & TP_ATTR_NUMBER )
96cdf0e10cSrcweir AddTabPage( RID_SVXPAGE_NUMBERFORMAT,String(ModuleRes(TP_ATTR_NUMBER)) ); //CHINA001 AddTabPage( RID_SVXPAGE_NUMBERFORMAT,String(ModuleRes(TP_ATTR_NUMBER)),SvxNumberFormatTabPage::Create, 0 );
97cdf0e10cSrcweir if( nFlags & TP_ATTR_ALIGN )
98cdf0e10cSrcweir AddTabPage( RID_SVXPAGE_ALIGNMENT,String(ModuleRes(TP_ATTR_ALIGN)) );//CHINA001 AddTabPage( RID_SVXPAGE_ALIGNMENT,String(ModuleRes(TP_ATTR_ALIGN)),SvxAlignmentTabPage::Create, 0 );
99cdf0e10cSrcweir FreeResource();
100cdf0e10cSrcweir }
101cdf0e10cSrcweir
102cdf0e10cSrcweir // -----------------------------------------------------------------------
~SbaSbAttrDlg()103cdf0e10cSrcweir SbaSbAttrDlg::~SbaSbAttrDlg()
104cdf0e10cSrcweir {
105cdf0e10cSrcweir delete pNumberInfoItem;
106cdf0e10cSrcweir
107cdf0e10cSrcweir DBG_DTOR(SbaSbAttrDlg,NULL);
108cdf0e10cSrcweir }
109cdf0e10cSrcweir
110cdf0e10cSrcweir // -----------------------------------------------------------------------
PageCreated(sal_uInt16 nPageId,SfxTabPage & rTabPage)111cdf0e10cSrcweir void SbaSbAttrDlg::PageCreated( sal_uInt16 nPageId, SfxTabPage& rTabPage )
112cdf0e10cSrcweir {
113cdf0e10cSrcweir SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
114cdf0e10cSrcweir switch ( nPageId )
115cdf0e10cSrcweir {
116cdf0e10cSrcweir case RID_SVXPAGE_NUMBERFORMAT:
117cdf0e10cSrcweir {
118cdf0e10cSrcweir //CHINA001 ((SvxNumberFormatTabPage&)rTabPage).
119cdf0e10cSrcweir //CHINA001 SetNumberFormatList( *pNumberInfoItem );
120cdf0e10cSrcweir aSet.Put (SvxNumberInfoItem( pNumberInfoItem->GetNumberFormatter(), (const sal_uInt16)SID_ATTR_NUMBERFORMAT_INFO));
121cdf0e10cSrcweir rTabPage.PageCreated(aSet);
122cdf0e10cSrcweir }
123cdf0e10cSrcweir break;
124cdf0e10cSrcweir
125cdf0e10cSrcweir case RID_SVXPAGE_CHAR_STD:
126cdf0e10cSrcweir {
127cdf0e10cSrcweir // ((SvxCharStdPage&)rTabPage).SetFontList(SBA_MOD_EXT()->FontListItem());
128cdf0e10cSrcweir }
129cdf0e10cSrcweir break;
130cdf0e10cSrcweir
131cdf0e10cSrcweir case RID_SVXPAGE_ALIGNMENT:
132cdf0e10cSrcweir {
133cdf0e10cSrcweir //CHINA001 ((SvxAlignmentTabPage&)rTabPage).SetFlags(WBA_NO_ORIENTATION|WBA_NO_LINEBREAK|WBA_NO_GRIDLINES|WBA_NO_VERTICAL|WBA_NO_LEFTINDENT);
134cdf0e10cSrcweir // aSet.Put (SfxUInt32Item(SID_FLAG_TYPE, WBA_NO_ORIENTATION|WBA_NO_LINEBREAK|WBA_NO_GRIDLINES|WBA_NO_VERTICAL|WBA_NO_LEFTINDENT));
135cdf0e10cSrcweir // rTabPage.PageCreated(aSet);
136cdf0e10cSrcweir }
137cdf0e10cSrcweir break;
138cdf0e10cSrcweir
139cdf0e10cSrcweir default:
140cdf0e10cSrcweir break;
141cdf0e10cSrcweir }
142cdf0e10cSrcweir }
143cdf0e10cSrcweir
144cdf0e10cSrcweir
145