Bump version to 6.4-15
[LibreOffice.git] / include / svx / unoapi.hxx
blobfc26f3f967848937638bc90283501120b771a805
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_SVX_UNOAPI_HXX
21 #define INCLUDED_SVX_UNOAPI_HXX
23 #include <com/sun/star/drawing/XShape.hpp>
24 #include <com/sun/star/drawing/XDrawPage.hpp>
25 #include <sal/types.h>
26 #include <svx/svxdllapi.h>
27 #include <tools/fldunit.hxx>
28 #include <tools/mapunit.hxx>
30 class SvxShape;
31 class SdrObject;
32 class SdrPage;
33 class SvxNumBulletItem;
34 class SfxItemPool;
35 enum class SdrInventor : sal_uInt32;
37 /**
38 * Creates a StarOffice API wrapper with the given type and inventor
39 * Deprecated: This will be replaced with a function returning XShape.
41 * @throws css::uno::RuntimeException
43 SVX_DLLPUBLIC SvxShape* CreateSvxShapeByTypeAndInventor(sal_uInt16 nType, SdrInventor nInventor, OUString const & referer);
45 /** Returns a StarOffice API wrapper for the given SdrObject */
46 SVX_DLLPUBLIC css::uno::Reference< css::drawing::XShape > GetXShapeForSdrObject( SdrObject* pObj ) throw ();
48 /** Returns the SdrObject from the given StarOffice API wrapper */
49 SVX_DLLPUBLIC SdrObject* GetSdrObjectFromXShape( const css::uno::Reference< css::drawing::XShape >& xShape ) throw() ;
51 /** Returns a StarOffice API wrapper for the given SdrPage */
52 SVX_DLLPUBLIC css::uno::Reference< css::drawing::XDrawPage > GetXDrawPageForSdrPage( SdrPage* pPage ) throw ();
54 /** Returns the SdrPage from the given StarOffice API wrapper */
55 SVX_DLLPUBLIC SdrPage* GetSdrPageFromXDrawPage( const css::uno::Reference< css::drawing::XDrawPage >& xDrawPage ) throw() ;
57 /**
58 * Maps the vcl MapUnit enum to an API constant MeasureUnit.
59 * Returns false if conversion is not supported.
61 SVX_DLLPUBLIC bool SvxMapUnitToMeasureUnit( const MapUnit nVcl, short& eApi ) throw();
63 /**
64 * Maps the API constant MeasureUnit to a vcl MapUnit enum.
65 * Returns false if conversion is not supported.
67 SVX_DLLPUBLIC bool SvxMeasureUnitToFieldUnit( const short eApi, FieldUnit& nVcl ) throw();
69 /**
70 * Maps the vcl MapUnit enum to an API constant MeasureUnit.
71 * Returns false if conversion is not supported.
73 SVX_DLLPUBLIC bool SvxFieldUnitToMeasureUnit( const FieldUnit nVcl, short& eApi ) throw();
75 /**
76 * If the given name is a predefined name for the current language it is replaced by
77 * the corresponding API name.
79 * @throws std::exception
81 [[nodiscard]] SVX_DLLPUBLIC OUString
82 SvxUnogetApiNameForItem(const sal_uInt16 nWhich, const OUString& rInternalName);
84 /**
85 * If the given name is a predefined API name it is replaced by the predefined name
86 * for the current language.
88 * @throws std::exception
90 [[nodiscard]] SVX_DLLPUBLIC OUString
91 SvxUnogetInternalNameForItem(const sal_uInt16 nWhich, const OUString& rApiName);
93 #endif // INCLUDED_SVX_UNOAPI_HXX
95 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */