Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
5 : * This Source Code Form is subject to the terms of the Mozilla Public
6 : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
11 : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : * contributor license agreements. See the NOTICE file distributed
13 : * with this work for additional information regarding copyright
14 : * ownership. The ASF licenses this file to you under the Apache
15 : * License, Version 2.0 (the "License"); you may not use this file
16 : * except in compliance with the License. You may obtain a copy of
17 : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : */
19 :
20 : #include "swtypes.hxx"
21 : #include "tools/string.hxx"
22 :
23 : #include <bodyfrm.hxx>
24 : #include <cellfrm.hxx>
25 : #include <colfrm.hxx>
26 : #include <editeng/unolingu.hxx>
27 : #include <fntcache.hxx>
28 : #include <frmfmt.hxx>
29 : #include <frmtool.hxx>
30 : #include <hffrm.hxx>
31 : #include <ndtxt.hxx>
32 : #include <pagefrm.hxx>
33 : #include <rowfrm.hxx>
34 : #include <sectfrm.hxx>
35 : #include <swatrset.hxx>
36 : #include <swfntcch.hxx>
37 : #include <swtable.hxx>
38 : #include <swtblfmt.hxx>
39 : #include <tabfrm.hxx>
40 : #include <txtfrm.hxx>
41 : #include <UndoDelete.hxx>
42 : #include <UndoInsert.hxx>
43 : #include <vcl/svapp.hxx>
44 : #include <vcl/window.hxx>
45 : #include <vcl/graph.hxx>
46 : #include <viscrs.hxx>
47 :
48 : using namespace com::sun::star;
49 :
50 33 : String aEmptyStr; // constant string
51 33 : OUString aEmptyOUStr; // remove once aEmptyStr can be changed to OUString
52 33 : OUString aDotStr('.'); // constant string
53 :
54 33 : IMPL_FIXEDMEMPOOL_NEWDEL( SwAttrSet )
55 33 : IMPL_FIXEDMEMPOOL_NEWDEL( SwStartNode )
56 33 : IMPL_FIXEDMEMPOOL_NEWDEL( SwEndNode )
57 33 : IMPL_FIXEDMEMPOOL_NEWDEL( SwTableBox )
58 33 : IMPL_FIXEDMEMPOOL_NEWDEL( SwUndoDelete )
59 33 : IMPL_FIXEDMEMPOOL_NEWDEL( SwUndoInsert )
60 33 : IMPL_FIXEDMEMPOOL_NEWDEL( SwPaM )
61 33 : IMPL_FIXEDMEMPOOL_NEWDEL( SwCursor )
62 33 : IMPL_FIXEDMEMPOOL_NEWDEL( SwShellCrsr )
63 33 : IMPL_FIXEDMEMPOOL_NEWDEL( SwTxtNode )
64 33 : IMPL_FIXEDMEMPOOL_NEWDEL( SwpHints )
65 33 : IMPL_FIXEDMEMPOOL_NEWDEL( SwFntObj )
66 33 : IMPL_FIXEDMEMPOOL_NEWDEL( SwFontObj )
67 33 : IMPL_FIXEDMEMPOOL_NEWDEL( SwBorderAttrs )
68 33 : IMPL_FIXEDMEMPOOL_NEWDEL( SwCellFrm )
69 33 : IMPL_FIXEDMEMPOOL_NEWDEL( SwRowFrm )
70 33 : IMPL_FIXEDMEMPOOL_NEWDEL( SwColumnFrm )
71 33 : IMPL_FIXEDMEMPOOL_NEWDEL( SwSectionFrm )
72 33 : IMPL_FIXEDMEMPOOL_NEWDEL( SwTabFrm )
73 33 : IMPL_FIXEDMEMPOOL_NEWDEL( SwPageFrm )
74 33 : IMPL_FIXEDMEMPOOL_NEWDEL( SwBodyFrm )
75 33 : IMPL_FIXEDMEMPOOL_NEWDEL( SwHeaderFrm )
76 33 : IMPL_FIXEDMEMPOOL_NEWDEL( SwFooterFrm )
77 33 : IMPL_FIXEDMEMPOOL_NEWDEL( SwTxtFrm )
78 33 : IMPL_FIXEDMEMPOOL_NEWDEL( SwTableFmt )
79 33 : IMPL_FIXEDMEMPOOL_NEWDEL( SwTableLineFmt )
80 33 : IMPL_FIXEDMEMPOOL_NEWDEL( SwTableBoxFmt )
81 33 : IMPL_FIXEDMEMPOOL_NEWDEL( _SwCursor_SavePos )
82 :
83 98 : Size GetGraphicSizeTwip( const Graphic& rGraphic, OutputDevice* pOutDev )
84 : {
85 98 : const MapMode aMapTwip( MAP_TWIP );
86 98 : Size aSize( rGraphic.GetPrefSize() );
87 98 : if( MAP_PIXEL == rGraphic.GetPrefMapMode().GetMapUnit() )
88 : {
89 67 : if( !pOutDev )
90 67 : pOutDev = Application::GetDefaultDevice();
91 67 : aSize = pOutDev->PixelToLogic( aSize, aMapTwip );
92 : }
93 : else
94 : {
95 : aSize = OutputDevice::LogicToLogic( aSize,
96 : rGraphic.GetPrefMapMode(),
97 31 : aMapTwip );
98 : }
99 98 : return aSize;
100 : }
101 :
102 1962 : uno::Reference< linguistic2::XSpellChecker1 > GetSpellChecker()
103 : {
104 1962 : return LinguMgr::GetSpellChecker();
105 : }
106 :
107 924 : uno::Reference< linguistic2::XHyphenator > GetHyphenator()
108 : {
109 924 : return LinguMgr::GetHyphenator();
110 : }
111 :
112 0 : uno::Reference< linguistic2::XThesaurus > GetThesaurus()
113 : {
114 0 : return LinguMgr::GetThesaurus();
115 : }
116 :
117 0 : uno::Reference< linguistic2::XLinguProperties > GetLinguPropertySet()
118 : {
119 0 : return LinguMgr::GetLinguPropertySet();
120 99 : }
121 :
122 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|