xref: /aoo4110/main/cui/source/dialogs/sdrcelldlg.cxx (revision b1cdbd2c)
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_cui.hxx"
26 
27 #include <svl/cjkoptions.hxx>
28 #include <svx/flagsdef.hxx>
29 #include "cuires.hrc"
30 #include "sdrcelldlg.hxx"
31 #include "dialmgr.hxx"
32 #include "cuitabarea.hxx"
33 #include "svx/svdmodel.hxx"
34 #include "border.hxx"
35 #include <svx/dialogs.hrc> // RID_SVXPAGE_...
36 
SvxFormatCellsDialog(Window * pParent,const SfxItemSet * pAttr,SdrModel * pModel)37 SvxFormatCellsDialog::SvxFormatCellsDialog( Window* pParent, const SfxItemSet* pAttr, SdrModel* pModel )
38 : SfxTabDialog        ( pParent, CUI_RES( RID_SVX_FORMAT_CELLS_DLG ), pAttr )
39 , mrOutAttrs			( *pAttr )
40 , maColorTab           ( pModel->GetColorTableFromSdrModel() )
41 , maGradientList       ( pModel->GetGradientListFromSdrModel() )
42 , maHatchingList       ( pModel->GetHatchListFromSdrModel() )
43 , maBitmapList         ( pModel->GetBitmapListFromSdrModel() )
44 
45 {
46 	FreeResource();
47 
48 	AddTabPage( RID_SVXPAGE_CHAR_NAME );
49 	AddTabPage( RID_SVXPAGE_CHAR_EFFECTS );
50 	AddTabPage( RID_SVXPAGE_BORDER );
51 	AddTabPage( RID_SVXPAGE_AREA );
52 
53 /*
54     SvtCJKOptions aCJKOptions;
55     if( aCJKOptions.IsAsianTypographyEnabled() )
56 		AddTabPage( RID_SVXPAGE_PARA_ASIAN);
57 	else
58 		RemoveTabPage( RID_SVXPAGE_PARA_ASIAN );
59 */
60 }
61 
~SvxFormatCellsDialog()62 SvxFormatCellsDialog::~SvxFormatCellsDialog()
63 {
64 }
65 
PageCreated(sal_uInt16 nId,SfxTabPage & rPage)66 void SvxFormatCellsDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
67 {
68 	switch( nId )
69 	{
70 		case RID_SVXPAGE_AREA:
71 			( (SvxAreaTabPage&) rPage ).SetColorTable( maColorTab );
72 			( (SvxAreaTabPage&) rPage ).SetGradientList( maGradientList );
73 			( (SvxAreaTabPage&) rPage ).SetHatchingList( maHatchingList );
74 			( (SvxAreaTabPage&) rPage ).SetBitmapList( maBitmapList );
75 			( (SvxAreaTabPage&) rPage ).SetPageType( PT_AREA );
76 			( (SvxAreaTabPage&) rPage ).SetDlgType( 1 );
77 			( (SvxAreaTabPage&) rPage ).SetPos( 0 );
78 //			( (SvxAreaTabPage&) rPage ).SetAreaTP( &mbAreaTP );
79 //			( (SvxAreaTabPage&) rPage ).SetGrdChgd( &mnGradientListState );
80 //			( (SvxAreaTabPage&) rPage ).SetHtchChgd( &mnHatchingListState );
81 //			( (SvxAreaTabPage&) rPage ).SetBmpChgd( &mnBitmapListState );
82 //			( (SvxAreaTabPage&) rPage ).SetColorChgd( &mnColorTableState );
83 			( (SvxAreaTabPage&) rPage ).Construct();
84 			// ActivatePage() wird das erste mal nicht gerufen
85 			( (SvxAreaTabPage&) rPage ).ActivatePage( mrOutAttrs );
86 
87 		break;
88 
89 		default:
90 			SfxTabDialog::PageCreated( nId, rPage );
91 			break;
92 	}
93 }
94 
Apply()95 void SvxFormatCellsDialog::Apply()
96 {
97 }
98