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: celltempl.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_sd.hxx"
34 #ifdef SD_DLLIMPLEMENTATION
35 #undef SD_DLLIMPLEMENTATION
38 #include <svtools/style.hxx>
39 #include <svtools/intitem.hxx>
41 #include <svx/dialogs.hrc>
42 #include <svx/drawitem.hxx>
43 #include <svx/bulitem.hxx>
44 #include <svx/eeitem.hxx>
45 #include <svx/lrspitem.hxx>
46 #include <svx/numitem.hxx>
47 #include <svx/svdmodel.hxx>
49 #include "DrawDocShell.hxx"
50 #include "sdresid.hxx"
51 #include "celltempl.hxx"
52 #include "celltempl.hrc"
53 #include "bulmaper.hxx"
55 /*************************************************************************
57 |* Konstruktor des Tab-Dialogs: Fuegt die Seiten zum Dialog hinzu
59 \************************************************************************/
61 SdPresCellTemplateDlg::SdPresCellTemplateDlg( SdrModel
* pModel
, Window
* pParent
, SfxStyleSheetBase
& rStyleBase
)
62 : SfxStyleDialog( pParent
, SdResId(TAB_CELL_TEMPLATE
), rStyleBase
, FALSE
)
63 , mpColorTab( pModel
->GetColorTable() )
64 , mpGradientList( pModel
->GetGradientList() )
65 , mpHatchingList( pModel
->GetHatchList() )
66 , mpBitmapList( pModel
->GetBitmapList() )
70 AddTabPage( RID_SVXPAGE_CHAR_NAME
);
71 AddTabPage( RID_SVXPAGE_CHAR_EFFECTS
);
72 AddTabPage( RID_SVXPAGE_BORDER
);
73 AddTabPage( RID_SVXPAGE_AREA
);
76 // -----------------------------------------------------------------------
78 SdPresCellTemplateDlg::~SdPresCellTemplateDlg()
82 // -----------------------------------------------------------------------
84 void SdPresCellTemplateDlg::PageCreated( USHORT nId
, SfxTabPage
&rPage
)
88 case RID_SVXPAGE_AREA
:
90 SfxAllItemSet
aSet(*(GetInputSetImpl()->GetPool()));
91 aSet
.Put (SvxColorTableItem(mpColorTab
,SID_COLOR_TABLE
));
92 aSet
.Put (SvxGradientListItem(mpGradientList
,SID_GRADIENT_LIST
));
93 aSet
.Put (SvxHatchListItem(mpHatchingList
,SID_HATCH_LIST
));
94 aSet
.Put (SvxBitmapListItem(mpBitmapList
,SID_BITMAP_LIST
));
95 aSet
.Put (SfxUInt16Item(SID_PAGE_TYPE
,0));
96 aSet
.Put (SfxUInt16Item(SID_DLG_TYPE
,1));
97 aSet
.Put (SfxUInt16Item(SID_TABPAGE_POS
,0));
98 rPage
.PageCreated(aSet
);
103 SfxTabDialog::PageCreated( nId
, rPage
);
108 // -----------------------------------------------------------------------
110 const SfxItemSet
* SdPresCellTemplateDlg::GetRefreshedSet()
112 SfxItemSet
* pRet
= GetInputSetImpl();
117 pRet
->SetParent( GetStyleSheet().GetItemSet().GetParent() );
120 pRet
= new SfxItemSet( GetStyleSheet().GetItemSet() );