xref: /trunk/main/cui/source/dialogs/sdrcelldlg.cxx (revision cdf0e10c)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 // MARKER(update_precomp.py): autogen include statement, do not remove
29 #include "precompiled_cui.hxx"
30 
31 #include <svl/cjkoptions.hxx>
32 #include <svx/flagsdef.hxx>
33 #include "cuires.hrc"
34 #include "sdrcelldlg.hxx"
35 #include "dialmgr.hxx"
36 #include "cuitabarea.hxx"
37 #include "svx/svdmodel.hxx"
38 #include "border.hxx"
39 #include <svx/dialogs.hrc> // RID_SVXPAGE_...
40 
41 SvxFormatCellsDialog::SvxFormatCellsDialog( Window* pParent, const SfxItemSet* pAttr, SdrModel* pModel )
42 : SfxTabDialog        ( pParent, CUI_RES( RID_SVX_FORMAT_CELLS_DLG ), pAttr )
43 , mrOutAttrs			( *pAttr )
44 , mpColorTab           ( pModel->GetColorTable() )
45 , mpGradientList       ( pModel->GetGradientList() )
46 , mpHatchingList       ( pModel->GetHatchList() )
47 , mpBitmapList         ( pModel->GetBitmapList() )
48 
49 {
50 	FreeResource();
51 
52 	AddTabPage( RID_SVXPAGE_CHAR_NAME );
53 	AddTabPage( RID_SVXPAGE_CHAR_EFFECTS );
54 	AddTabPage( RID_SVXPAGE_BORDER );
55 	AddTabPage( RID_SVXPAGE_AREA );
56 
57 /*
58     SvtCJKOptions aCJKOptions;
59     if( aCJKOptions.IsAsianTypographyEnabled() )
60 		AddTabPage( RID_SVXPAGE_PARA_ASIAN);
61 	else
62 		RemoveTabPage( RID_SVXPAGE_PARA_ASIAN );
63 */
64 }
65 
66 SvxFormatCellsDialog::~SvxFormatCellsDialog()
67 {
68 }
69 
70 void SvxFormatCellsDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
71 {
72 	switch( nId )
73 	{
74 		case RID_SVXPAGE_AREA:
75 			( (SvxAreaTabPage&) rPage ).SetColorTable( mpColorTab );
76 			( (SvxAreaTabPage&) rPage ).SetGradientList( mpGradientList );
77 			( (SvxAreaTabPage&) rPage ).SetHatchingList( mpHatchingList );
78 			( (SvxAreaTabPage&) rPage ).SetBitmapList( mpBitmapList );
79 			( (SvxAreaTabPage&) rPage ).SetPageType( PT_AREA );
80 			( (SvxAreaTabPage&) rPage ).SetDlgType( 1 );
81 			( (SvxAreaTabPage&) rPage ).SetPos( 0 );
82 //			( (SvxAreaTabPage&) rPage ).SetAreaTP( &mbAreaTP );
83 //			( (SvxAreaTabPage&) rPage ).SetGrdChgd( &mnGradientListState );
84 //			( (SvxAreaTabPage&) rPage ).SetHtchChgd( &mnHatchingListState );
85 //			( (SvxAreaTabPage&) rPage ).SetBmpChgd( &mnBitmapListState );
86 //			( (SvxAreaTabPage&) rPage ).SetColorChgd( &mnColorTableState );
87 			( (SvxAreaTabPage&) rPage ).Construct();
88 			// ActivatePage() wird das erste mal nicht gerufen
89 			( (SvxAreaTabPage&) rPage ).ActivatePage( mrOutAttrs );
90 
91 		break;
92 
93 		default:
94 			SfxTabDialog::PageCreated( nId, rPage );
95 			break;
96 	}
97 }
98 
99 void SvxFormatCellsDialog::Apply()
100 {
101 }
102