bump product version to 6.3.0.0.beta1
[LibreOffice.git] / include / svx / unoapi.hxx
blob71d699ad0a65ef94d568c8adf8cbdcc981717f21
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 <vcl/GraphicObject.hxx>
27 #include <svl/poolitem.hxx>
28 #include <svx/svxdllapi.h>
29 #include <tools/fldunit.hxx>
31 class SvxShape;
32 class SdrObject;
33 class SdrPage;
34 class SvxNumBulletItem;
35 class SfxItemPool;
36 enum class SdrInventor : sal_uInt32;
38 /**
39 * Creates a StarOffice API wrapper with the given type and inventor
40 * Deprecated: This will be replaced with a function returning XShape.
42 * @throws css::uno::RuntimeException
44 SVX_DLLPUBLIC SvxShape* CreateSvxShapeByTypeAndInventor(sal_uInt16 nType, SdrInventor nInventor, OUString const & referer);
46 /** Returns a StarOffice API wrapper for the given SdrObject */
47 SVX_DLLPUBLIC css::uno::Reference< css::drawing::XShape > GetXShapeForSdrObject( SdrObject* pObj ) throw ();
49 /** Returns the SdrObject from the given StarOffice API wrapper */
50 SVX_DLLPUBLIC SdrObject* GetSdrObjectFromXShape( const css::uno::Reference< css::drawing::XShape >& xShape ) throw() ;
52 /** Returns a StarOffice API wrapper for the given SdrPage */
53 SVX_DLLPUBLIC css::uno::Reference< css::drawing::XDrawPage > GetXDrawPageForSdrPage( SdrPage* pPage ) throw ();
55 /** Returns the SdrPage from the given StarOffice API wrapper */
56 SVX_DLLPUBLIC SdrPage* GetSdrPageFromXDrawPage( const css::uno::Reference< css::drawing::XDrawPage >& xDrawPage ) throw() ;
58 /**
59 * Maps the vcl MapUnit enum to a API constant MeasureUnit.
60 * Returns false if conversion is not supported.
62 SVX_DLLPUBLIC bool SvxMapUnitToMeasureUnit( const MapUnit nVcl, short& eApi ) throw();
64 /**
65 * Maps the API constant MeasureUnit to a vcl MapUnit enum.
66 * Returns false if conversion is not supported.
68 SVX_DLLPUBLIC bool SvxMeasureUnitToFieldUnit( const short eApi, FieldUnit& nVcl ) throw();
70 /**
71 * Maps the vcl MapUnit enum to a API constant MeasureUnit.
72 * Returns false if conversion is not supported.
74 SVX_DLLPUBLIC bool SvxFieldUnitToMeasureUnit( const FieldUnit nVcl, short& eApi ) throw();
76 /**
77 * If the given name is a predefined name for the current language it is replaced by
78 * the corresponding API name.
80 * @throws std::exception
82 [[nodiscard]] SVX_DLLPUBLIC OUString
83 SvxUnogetApiNameForItem(const sal_uInt16 nWhich, const OUString& rInternalName);
85 /**
86 * If the given name is a predefined API name it is replaced by the predefined name
87 * for the current language.
89 * @throws std::exception
91 [[nodiscard]] SVX_DLLPUBLIC OUString
92 SvxUnogetInternalNameForItem(const sal_uInt16 nWhich, const OUString& rApiName);
94 #endif // INCLUDED_SVX_UNOAPI_HXX
96 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */