1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: dlgattr.cxx,v $
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_dbaccess.hxx"
35 #ifndef DBAUI_SBATTRDLG_HXX
36 #include "dlgattr.hxx"
39 #ifndef _SFXTABDLG_HXX //autogen
40 #include <sfx2/tabdlg.hxx>
43 #ifndef _SVX_NUMINF_HXX //autogen
44 #include <svx/numinf.hxx>
47 //CHINA001 #ifndef _SVX_CHARDLG_HXX //autogen
48 //CHINA001 #include <svx/chardlg.hxx>
51 //CHINA001 #ifndef _SVX_NUMFMT_HXX //autogen
52 //CHINA001 #include <svx/numfmt.hxx>
54 #ifndef _SVX_NUMINF_HXX
55 #include <svx/numinf.hxx>
58 //CHINA001 #ifndef _SVX_ALIGN_HXX //autogen
59 //CHINA001 #include <svx/align.hxx>
62 #ifndef _SVX_DIALOGS_HRC
63 #include <svx/dialogs.hrc>
66 #include "dbu_dlg.hrc"
68 #ifndef _SFXITEMSET_HXX
69 #include <svtools/itemset.hxx>
71 #define _ZFORLIST_DECLARE_TABLE
73 #include <svtools/zforlist.hxx>
75 #include <svx/svxids.hrc> //CHINA001
76 #include <svx/flagsdef.hxx> //CHINA001
77 #ifndef _SFXINTITEM_HXX //CHINA001
78 #include <svtools/intitem.hxx> //CHINA001
80 #ifndef _DBAUI_MODULE_DBU_HXX_
81 #include "moduledbu.hxx"
83 using namespace dbaui
;
85 DBG_NAME(SbaSbAttrDlg
)
86 //==================================================================
87 SbaSbAttrDlg::SbaSbAttrDlg(Window
* pParent
, const SfxItemSet
* pCellAttrs
, SvNumberFormatter
* pFormatter
, USHORT nFlags
, BOOL bRow
)
88 : SfxTabDialog(pParent
, ModuleRes( DLG_ATTR
), pCellAttrs
)
89 ,aTitle(ModuleRes(ST_ROW
))
91 DBG_CTOR(SbaSbAttrDlg
,NULL
);
93 pNumberInfoItem
= new SvxNumberInfoItem( pFormatter
, 0 );
97 if( nFlags
& TP_ATTR_CHAR
)
99 // AddTabPage( RID_SVXPAGE_CHAR_STD,String(ModuleRes(TP_ATTR_CHAR)),SvxCharStdPage::Create, 0 );
100 DBG_ERROR( "found flag TP_ATTR_CHAR" );
102 if( nFlags
& TP_ATTR_NUMBER
)
103 AddTabPage( RID_SVXPAGE_NUMBERFORMAT
,String(ModuleRes(TP_ATTR_NUMBER
)) ); //CHINA001 AddTabPage( RID_SVXPAGE_NUMBERFORMAT,String(ModuleRes(TP_ATTR_NUMBER)),SvxNumberFormatTabPage::Create, 0 );
104 if( nFlags
& TP_ATTR_ALIGN
)
105 AddTabPage( RID_SVXPAGE_ALIGNMENT
,String(ModuleRes(TP_ATTR_ALIGN
)) );//CHINA001 AddTabPage( RID_SVXPAGE_ALIGNMENT,String(ModuleRes(TP_ATTR_ALIGN)),SvxAlignmentTabPage::Create, 0 );
109 // -----------------------------------------------------------------------
110 SbaSbAttrDlg::~SbaSbAttrDlg()
112 delete pNumberInfoItem
;
114 DBG_DTOR(SbaSbAttrDlg
,NULL
);
117 // -----------------------------------------------------------------------
118 void SbaSbAttrDlg::PageCreated( sal_uInt16 nPageId
, SfxTabPage
& rTabPage
)
120 SfxAllItemSet
aSet(*(GetInputSetImpl()->GetPool()));
123 case RID_SVXPAGE_NUMBERFORMAT
:
125 //CHINA001 ((SvxNumberFormatTabPage&)rTabPage).
126 //CHINA001 SetNumberFormatList( *pNumberInfoItem );
127 aSet
.Put (SvxNumberInfoItem( pNumberInfoItem
->GetNumberFormatter(), (const USHORT
)SID_ATTR_NUMBERFORMAT_INFO
));
128 rTabPage
.PageCreated(aSet
);
132 case RID_SVXPAGE_CHAR_STD
:
134 // ((SvxCharStdPage&)rTabPage).SetFontList(SBA_MOD_EXT()->FontListItem());
138 case RID_SVXPAGE_ALIGNMENT
:
140 //CHINA001 ((SvxAlignmentTabPage&)rTabPage).SetFlags(WBA_NO_ORIENTATION|WBA_NO_LINEBREAK|WBA_NO_GRIDLINES|WBA_NO_VERTICAL|WBA_NO_LEFTINDENT);
141 // aSet.Put (SfxUInt32Item(SID_FLAG_TYPE, WBA_NO_ORIENTATION|WBA_NO_LINEBREAK|WBA_NO_GRIDLINES|WBA_NO_VERTICAL|WBA_NO_LEFTINDENT));
142 // rTabPage.PageCreated(aSet);