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
31class SvxShape;
32class SdrObject;
33class SdrPage;
35class SfxItemPool;
36enum class SdrInventor : sal_uInt32;
37enum class SdrObjKind : sal_uInt16;
38
46
48SVXCORE_DLLPUBLIC css::uno::Reference< css::drawing::XShape > GetXShapeForSdrObject( SdrObject* pObj ) noexcept;
49
51SVXCORE_DLLPUBLIC css::uno::Reference< css::drawing::XDrawPage > GetXDrawPageForSdrPage( SdrPage* pPage ) noexcept;
52
54SVXCORE_DLLPUBLIC SdrPage* GetSdrPageFromXDrawPage( const css::uno::Reference< css::drawing::XDrawPage >& xDrawPage ) noexcept ;
55
60SVXCORE_DLLPUBLIC bool SvxMapUnitToMeasureUnit( const MapUnit nVcl, short& eApi ) noexcept;
61
66SVXCORE_DLLPUBLIC bool SvxMeasureUnitToFieldUnit( const short eApi, FieldUnit& nVcl ) noexcept;
67
72SVXCORE_DLLPUBLIC bool SvxFieldUnitToMeasureUnit( const FieldUnit nVcl, short& eApi ) noexcept;
73
80[[nodiscard]] SVXCORE_DLLPUBLIC OUString
81 SvxUnogetApiNameForItem(const sal_uInt16 nWhich, const OUString& rInternalName);
82
89[[nodiscard]] OUString
90 SvxUnogetInternalNameForItem(const sal_uInt16 nWhich, const OUString& rApiName);
91
92#endif // INCLUDED_SVX_UNOAPI_HXX
93
94/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Abstract DrawObject.
Definition: svdobj.hxx:260
A SdrPage contains exactly one SdrObjList and a description of the physical page dimensions (size / m...
Definition: svdpage.hxx:379
FieldUnit
MapUnit
SdrInventor
Definition: svdobj.hxx:98
SdrObjKind
Definition: svdobjkind.hxx:25
#define SVXCORE_DLLPUBLIC
Definition: svxdllapi.h:35
SVXCORE_DLLPUBLIC SdrPage * GetSdrPageFromXDrawPage(const css::uno::Reference< css::drawing::XDrawPage > &xDrawPage) noexcept
Returns the SdrPage from the given StarOffice API wrapper.
SVXCORE_DLLPUBLIC bool SvxMeasureUnitToFieldUnit(const short eApi, FieldUnit &nVcl) noexcept
Maps the API constant MeasureUnit to a vcl MapUnit enum.
Definition: unoprov.cxx:960
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:1991
SVXCORE_DLLPUBLIC bool SvxFieldUnitToMeasureUnit(const FieldUnit nVcl, short &eApi) noexcept
Maps the vcl MapUnit enum to an API constant MeasureUnit.
Definition: unoprov.cxx:986
SVXCORE_DLLPUBLIC bool SvxMapUnitToMeasureUnit(const MapUnit nVcl, short &eApi) noexcept
Maps the vcl MapUnit enum to an API constant MeasureUnit.
Definition: unoprov.cxx:934
SVXCORE_DLLPUBLIC css::uno::Reference< css::drawing::XDrawPage > GetXDrawPageForSdrPage(SdrPage *pPage) noexcept
Returns a StarOffice API wrapper for the given SdrPage.
Definition: unopage.cxx:873
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:2024
SVXCORE_DLLPUBLIC css::uno::Reference< css::drawing::XShape > GetXShapeForSdrObject(SdrObject *pObj) noexcept
Returns a StarOffice API wrapper for the given SdrObject.
Definition: unoshape.cxx:4013
SVXCORE_DLLPUBLIC rtl::Reference< SvxShape > CreateSvxShapeByTypeAndInventor(SdrObjKind 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:867