Update ooo320-m1
[ooovba.git] / reportdesign / source / ui / dlg / dlgpage.cxx
blobd853736e1837398b47a58002f9b7ddf9b162f739
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: dlgpage.cxx,v $
10 * $Revision: 1.4 $
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 ************************************************************************/
30 #include "precompiled_reportdesign.hxx"
33 #include <svx/dialogs.hrc>
34 #include <svx/tabarea.hxx>
35 #include <svx/flagsdef.hxx>
36 #include <svx/svxdlg.hxx>
37 #include <svx/svxenum.hxx>
38 #include "dlgpage.hxx"
39 #include "ModuleHelper.hxx"
40 #include "RptResId.hrc"
41 #include <svtools/intitem.hxx> //add CHINA001
42 #include <svtools/cjkoptions.hxx>
43 #include <svtools/aeitem.hxx>
45 namespace rptui
47 /*************************************************************************
49 |* Konstruktor des Tab-Dialogs: Fuegt die Seiten zum Dialog hinzu
51 \************************************************************************/
53 ORptPageDialog::ORptPageDialog( Window* pParent, const SfxItemSet* pAttr,USHORT _nPageId) :
54 SfxTabDialog ( pParent, ModuleRes( _nPageId ), pAttr ),
55 rOutAttrs ( *pAttr )
57 SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
58 DBG_ASSERT(pFact, "Dialogdiet fail!");
59 switch( _nPageId )
61 case RID_PAGEDIALOG_BACKGROUND:
62 AddTabPage( RID_SVXPAGE_BACKGROUND,String(ModuleRes(1)));
63 break;
64 case RID_PAGEDIALOG_PAGE:
65 //AddTabPage( RID_SVXPAGE_PAGE,String(ModuleRes(1)));
66 // AddTabPage( RID_SVXPAGE_BACKGROUND,String(ModuleRes(1)));
67 AddTabPage(RID_SVXPAGE_PAGE, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_PAGE ), 0 );
68 AddTabPage(RID_SVXPAGE_BACKGROUND, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), 0 );
69 break;
70 case RID_PAGEDIALOG_CHAR:
71 AddTabPage(RID_PAGE_CHAR, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_NAME ), 0 );
72 AddTabPage(RID_PAGE_EFFECTS, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_EFFECTS ), 0 );
73 AddTabPage(RID_PAGE_POSITION, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_POSITION ), 0 );
74 AddTabPage(RID_PAGE_TWOLN, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_TWOLINES ), 0 );
75 AddTabPage(RID_PAGE_BACKGROUND, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), 0 );
76 AddTabPage(RID_PAGE_ALIGNMENT, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_ALIGNMENT ), 0 );
78 break;
79 case RID_PAGEDIALOG_LINE:
80 AddTabPage( RID_SVXPAGE_LINE,pFact->GetTabPageCreatorFunc( RID_SVXPAGE_LINE ), 0 );
81 //AddTabPage( RID_SVXPAGE_LINE_DEF,pFact->GetTabPageCreatorFunc( RID_SVXPAGE_LINE_DEF ), 0 );
82 //AddTabPage( RID_SVXPAGE_LINEEND_DEF,pFact->GetTabPageCreatorFunc( RID_SVXPAGE_LINEEND_DEF ), 0 );
83 break;
84 default:
85 OSL_ENSURE(0,"Unknown page id");
88 SvtCJKOptions aCJKOptions;
89 if ( !aCJKOptions.IsDoubleLinesEnabled() )
90 RemoveTabPage(RID_PAGE_TWOLN);
92 FreeResource();
94 // =============================================================================
95 } // namespace rptui
96 // =============================================================================