xref: /aoo41x/main/sw/source/ui/app/docshdrw.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_sw.hxx"
30 
31 
32 #include <hintids.hxx>
33 
34 #ifndef _SVX_SVXIDS_HRC //autogen
35 #include <svx/svxids.hrc>
36 #endif
37 
38 
39 
40 
41 
42 
43 
44 
45 #include <svl/stritem.hxx>
46 #include <svx/drawitem.hxx>
47 #include <svx/svdmodel.hxx>
48 #include <svx/svdoutl.hxx>
49 #include <svx/xtable.hxx>
50 
51 #ifndef _DOCSH_HXX
52 #include <docsh.hxx>
53 #endif
54 #include <doc.hxx>
55 
56 using namespace ::com::sun::star;
57 
58 /*--------------------------------------------------------------------
59 	Beschreibung: Document laden
60  --------------------------------------------------------------------*/
61 
62 
63 void  SwDocShell::InitDraw()
64 {
65 	SdrModel *pDrDoc = pDoc->GetDrawModel();
66 	if( pDrDoc )
67 	{
68 		// Listen, bzw. Tables im ItemSet der DocShell anlegen
69         PutItem( SvxGradientListItem( pDrDoc->GetGradientList(), SID_GRADIENT_LIST ) );
70         PutItem( SvxHatchListItem( pDrDoc->GetHatchList(), SID_HATCH_LIST ) );
71         PutItem( SvxBitmapListItem( pDrDoc->GetBitmapList(), SID_BITMAP_LIST ) );
72         PutItem( SvxDashListItem( pDrDoc->GetDashList(), SID_DASH_LIST ) );
73         PutItem( SvxLineEndListItem( pDrDoc->GetLineEndList(), SID_LINEEND_LIST ) );
74 
75 		Outliner& rOutliner = pDrDoc->GetDrawOutliner();
76         uno::Reference<linguistic2::XHyphenator> xHyphenator( ::GetHyphenator() );
77 		rOutliner.SetHyphenator( xHyphenator );
78 	}
79 	else
80         PutItem( SvxColorTableItem( XColorTable::GetStdColorTable(), SID_COLOR_TABLE ));
81 }
82 
83 
84 
85