LibreOffice Module sw (master)  1
swtypes.cxx
Go to the documentation of this file.
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 
22 #include <editeng/unolingu.hxx>
23 #include <vcl/svapp.hxx>
24 #include <vcl/graph.hxx>
25 
26 using namespace com::sun::star;
27 
29 {
30  const MapMode aMapTwip(MapUnit::MapTwip);
31  Size aSize(rGraphic.GetPrefSize());
32  if (MapUnit::MapPixel == rGraphic.GetPrefMapMode().GetMapUnit())
33  {
34  if (!pOutDev)
36  aSize = pOutDev->PixelToLogic(aSize, aMapTwip);
37  }
38  else
39  {
40  aSize = OutputDevice::LogicToLogic(aSize, rGraphic.GetPrefMapMode(), aMapTwip);
41  }
42  return aSize;
43 }
44 
45 uno::Reference< linguistic2::XSpellChecker1 > GetSpellChecker()
46 {
48 }
49 
50 uno::Reference< linguistic2::XHyphenator > GetHyphenator()
51 {
52  return LinguMgr::GetHyphenator();
53 }
54 
55 uno::Reference< linguistic2::XThesaurus > GetThesaurus()
56 {
57  return LinguMgr::GetThesaurus();
58 }
59 
60 uno::Reference< linguistic2::XLinguProperties > GetLinguPropertySet()
61 {
63 }
64 
65 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
uno::Reference< linguistic2::XHyphenator > GetHyphenator()
Definition: swtypes.cxx:50
Point LogicToLogic(const Point &rPtSource, const MapMode *pMapModeSource, const MapMode *pMapModeDest) const
uno::Reference< linguistic2::XLinguProperties > GetLinguPropertySet()
Definition: swtypes.cxx:60
static css::uno::Reference< css::linguistic2::XLinguProperties > GetLinguPropertySet()
static OutputDevice * GetDefaultDevice()
static css::uno::Reference< css::linguistic2::XSpellChecker1 > GetSpellChecker()
static css::uno::Reference< css::linguistic2::XHyphenator > GetHyphenator()
MapUnit GetMapUnit() const
Point PixelToLogic(const Point &rDevicePt) const
Size GetPrefSize() const
MapMode GetPrefMapMode() const
uno::Reference< linguistic2::XThesaurus > GetThesaurus()
Definition: swtypes.cxx:55
uno::Reference< linguistic2::XSpellChecker1 > GetSpellChecker()
Definition: swtypes.cxx:45
static css::uno::Reference< css::linguistic2::XThesaurus > GetThesaurus()
Size GetGraphicSizeTwip(const Graphic &rGraphic, vcl::RenderContext *pOutDev)
Definition: swtypes.cxx:28