Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*************************************************************************
3 : : *
4 : : * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 : : *
6 : : * Copyright 2000, 2010 Oracle and/or its affiliates.
7 : : *
8 : : * OpenOffice.org - a multi-platform office productivity suite
9 : : *
10 : : * This file is part of OpenOffice.org.
11 : : *
12 : : * OpenOffice.org is free software: you can redistribute it and/or modify
13 : : * it under the terms of the GNU Lesser General Public License version 3
14 : : * only, as published by the Free Software Foundation.
15 : : *
16 : : * OpenOffice.org is distributed in the hope that it will be useful,
17 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 : : * GNU Lesser General Public License version 3 for more details
20 : : * (a copy is included in the LICENSE file that accompanied this code).
21 : : *
22 : : * You should have received a copy of the GNU Lesser General Public License
23 : : * version 3 along with OpenOffice.org. If not, see
24 : : * <http://www.openoffice.org/license.html>
25 : : * for a copy of the LGPLv3 License.
26 : : *
27 : : ************************************************************************/
28 : :
29 : :
30 : : #include <hintids.hxx>
31 : : #include <svx/svxids.hrc>
32 : : #include <svl/stritem.hxx>
33 : : #include <svx/drawitem.hxx>
34 : : #include <svx/svdmodel.hxx>
35 : : #include <svx/svdoutl.hxx>
36 : : #include <svx/xtable.hxx>
37 : :
38 : : #include <docsh.hxx>
39 : : #include <doc.hxx>
40 : :
41 : : using namespace ::com::sun::star;
42 : :
43 : : /*--------------------------------------------------------------------
44 : : Description: Load Document
45 : : --------------------------------------------------------------------*/
46 : :
47 : :
48 : 1672 : void SwDocShell::InitDraw()
49 : : {
50 : 1672 : SdrModel *pDrDoc = pDoc->GetDrawModel();
51 [ + + ]: 1672 : if( pDrDoc )
52 : : {
53 : : // create Lists and Tables DocShell's ItemSet
54 [ + - ][ + - ]: 165 : PutItem( SvxGradientListItem( pDrDoc->GetGradientList(), SID_GRADIENT_LIST ) );
[ + - ][ + - ]
55 [ + - ][ + - ]: 165 : PutItem( SvxHatchListItem( pDrDoc->GetHatchList(), SID_HATCH_LIST ) );
[ + - ][ + - ]
56 [ + - ][ + - ]: 165 : PutItem( SvxBitmapListItem( pDrDoc->GetBitmapList(), SID_BITMAP_LIST ) );
[ + - ][ + - ]
57 [ + - ][ + - ]: 165 : PutItem( SvxDashListItem( pDrDoc->GetDashList(), SID_DASH_LIST ) );
[ + - ][ + - ]
58 [ + - ][ + - ]: 165 : PutItem( SvxLineEndListItem( pDrDoc->GetLineEndList(), SID_LINEEND_LIST ) );
[ + - ][ + - ]
59 : :
60 [ + - ]: 165 : Outliner& rOutliner = pDrDoc->GetDrawOutliner();
61 [ + - ]: 165 : uno::Reference<linguistic2::XHyphenator> xHyphenator( ::GetHyphenator() );
62 [ + - ]: 165 : rOutliner.SetHyphenator( xHyphenator );
63 : : }
64 : : else
65 [ + - ][ + - ]: 1507 : PutItem( SvxColorListItem( XColorList::GetStdColorList(), SID_COLOR_TABLE ));
[ + - ]
66 : 1672 : }
67 : :
68 : :
69 : :
70 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|