LibreOffice Module svx (master)  1
unoapi.hxx
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 #ifndef INCLUDED_SVX_UNOAPI_HXX
21 #define INCLUDED_SVX_UNOAPI_HXX
22 
23 #include <com/sun/star/drawing/XShape.hpp>
24 #include <com/sun/star/drawing/XDrawPage.hpp>
25 #include <rtl/ref.hxx>
26 #include <sal/types.h>
27 #include <svx/svxdllapi.h>
28 #include <tools/fldunit.hxx>
29 #include <tools/mapunit.hxx>
30 
31 class SvxShape;
32 class SdrObject;
33 class SdrPage;
34 class SvxNumBulletItem;
35 class SfxItemPool;
36 enum class SdrInventor : sal_uInt32;
37 
44 SVXCORE_DLLPUBLIC rtl::Reference<SvxShape> CreateSvxShapeByTypeAndInventor(sal_uInt16 nType, SdrInventor nInventor, OUString const & referer);
45 
47 SVXCORE_DLLPUBLIC css::uno::Reference< css::drawing::XShape > GetXShapeForSdrObject( SdrObject* pObj ) noexcept;
48 
50 SVXCORE_DLLPUBLIC SdrObject* GetSdrObjectFromXShape( const css::uno::Reference< css::drawing::XShape >& xShape ) noexcept ;
51 
53 SVXCORE_DLLPUBLIC css::uno::Reference< css::drawing::XDrawPage > GetXDrawPageForSdrPage( SdrPage* pPage ) noexcept;
54 
56 SVXCORE_DLLPUBLIC SdrPage* GetSdrPageFromXDrawPage( const css::uno::Reference< css::drawing::XDrawPage >& xDrawPage ) noexcept ;
57 
62 SVXCORE_DLLPUBLIC bool SvxMapUnitToMeasureUnit( const MapUnit nVcl, short& eApi ) noexcept;
63 
68 SVXCORE_DLLPUBLIC bool SvxMeasureUnitToFieldUnit( const short eApi, FieldUnit& nVcl ) noexcept;
69 
74 SVXCORE_DLLPUBLIC bool SvxFieldUnitToMeasureUnit( const FieldUnit nVcl, short& eApi ) noexcept;
75 
82 [[nodiscard]] SVXCORE_DLLPUBLIC OUString
83  SvxUnogetApiNameForItem(const sal_uInt16 nWhich, const OUString& rInternalName);
84 
91 [[nodiscard]] OUString
92  SvxUnogetInternalNameForItem(const sal_uInt16 nWhich, const OUString& rApiName);
93 
94 #endif // INCLUDED_SVX_UNOAPI_HXX
95 
96 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
OUString SvxUnogetInternalNameForItem(const sal_uInt16 nWhich, const OUString &rApiName)
If the given name is a predefined API name it is replaced by the predefined name for the current lang...
Definition: unoprov.cxx:1985
SVXCORE_DLLPUBLIC css::uno::Reference< css::drawing::XDrawPage > GetXDrawPageForSdrPage(SdrPage *pPage) noexcept
Returns a StarOffice API wrapper for the given SdrPage.
Definition: unopage.cxx:870
SVXCORE_DLLPUBLIC SdrPage * GetSdrPageFromXDrawPage(const css::uno::Reference< css::drawing::XDrawPage > &xDrawPage) noexcept
Returns the SdrPage from the given StarOffice API wrapper.
SdrInventor
Definition: svdobj.hxx:98
SVXCORE_DLLPUBLIC OUString SvxUnogetApiNameForItem(const sal_uInt16 nWhich, const OUString &rInternalName)
If the given name is a predefined name for the current language it is replaced by the corresponding A...
Definition: unoprov.cxx:1952
SVXCORE_DLLPUBLIC bool SvxFieldUnitToMeasureUnit(const FieldUnit nVcl, short &eApi) noexcept
Maps the vcl MapUnit enum to an API constant MeasureUnit.
Definition: unoprov.cxx:1009
SVXCORE_DLLPUBLIC SdrObject * GetSdrObjectFromXShape(const css::uno::Reference< css::drawing::XShape > &xShape) noexcept
Returns the SdrObject from the given StarOffice API wrapper.
Abstract DrawObject.
Definition: svdobj.hxx:258
SVXCORE_DLLPUBLIC bool SvxMapUnitToMeasureUnit(const MapUnit nVcl, short &eApi) noexcept
Maps the vcl MapUnit enum to an API constant MeasureUnit.
Definition: unoprov.cxx:957
enum SdrInventor sal_uInt32 SVXCORE_DLLPUBLIC rtl::Reference< SvxShape > CreateSvxShapeByTypeAndInventor(sal_uInt16 nType, SdrInventor nInventor, OUString const &referer)
Creates a StarOffice API wrapper with the given type and inventor Deprecated: This will be replaced w...
Definition: unopage.cxx:864
SVXCORE_DLLPUBLIC css::uno::Reference< css::drawing::XShape > GetXShapeForSdrObject(SdrObject *pObj) noexcept
Returns a StarOffice API wrapper for the given SdrObject.
Definition: unoshape.cxx:3985
#define SVXCORE_DLLPUBLIC
Definition: svxdllapi.h:35
SVXCORE_DLLPUBLIC bool SvxMeasureUnitToFieldUnit(const short eApi, FieldUnit &nVcl) noexcept
Maps the API constant MeasureUnit to a vcl MapUnit enum.
Definition: unoprov.cxx:983
A SdrPage contains exactly one SdrObjList and a description of the physical page dimensions (size / m...
Definition: svdpage.hxx:365