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 <sal/types.h>
26 #include <svx/svxdllapi.h>
27 #include <tools/fldunit.hxx>
28 #include <tools/mapunit.hxx>
29 
30 class SvxShape;
31 class SdrObject;
32 class SdrPage;
33 class SvxNumBulletItem;
34 class SfxItemPool;
35 enum class SdrInventor : sal_uInt32;
36 
43 SVXCORE_DLLPUBLIC SvxShape* CreateSvxShapeByTypeAndInventor(sal_uInt16 nType, SdrInventor nInventor, OUString const & referer);
44 
46 SVXCORE_DLLPUBLIC css::uno::Reference< css::drawing::XShape > GetXShapeForSdrObject( SdrObject* pObj ) throw ();
47 
49 SVXCORE_DLLPUBLIC SdrObject* GetSdrObjectFromXShape( const css::uno::Reference< css::drawing::XShape >& xShape ) throw() ;
50 
52 SVXCORE_DLLPUBLIC css::uno::Reference< css::drawing::XDrawPage > GetXDrawPageForSdrPage( SdrPage* pPage ) throw ();
53 
55 SVXCORE_DLLPUBLIC SdrPage* GetSdrPageFromXDrawPage( const css::uno::Reference< css::drawing::XDrawPage >& xDrawPage ) throw() ;
56 
61 SVXCORE_DLLPUBLIC bool SvxMapUnitToMeasureUnit( const MapUnit nVcl, short& eApi ) throw();
62 
67 SVXCORE_DLLPUBLIC bool SvxMeasureUnitToFieldUnit( const short eApi, FieldUnit& nVcl ) throw();
68 
73 SVXCORE_DLLPUBLIC bool SvxFieldUnitToMeasureUnit( const FieldUnit nVcl, short& eApi ) throw();
74 
81 [[nodiscard]] SVXCORE_DLLPUBLIC OUString
82  SvxUnogetApiNameForItem(const sal_uInt16 nWhich, const OUString& rInternalName);
83 
90 [[nodiscard]] OUString
91  SvxUnogetInternalNameForItem(const sal_uInt16 nWhich, const OUString& rApiName);
92 
93 #endif // INCLUDED_SVX_UNOAPI_HXX
94 
95 /* 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:1984
SdrInventor
Definition: svdobj.hxx:152
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:1951
SVXCORE_DLLPUBLIC css::uno::Reference< css::drawing::XDrawPage > GetXDrawPageForSdrPage(SdrPage *pPage)
Returns a StarOffice API wrapper for the given SdrPage.
Definition: unopage.cxx:875
SVXCORE_DLLPUBLIC SdrPage * GetSdrPageFromXDrawPage(const css::uno::Reference< css::drawing::XDrawPage > &xDrawPage)
Returns the SdrPage from the given StarOffice API wrapper.
SVXCORE_DLLPUBLIC SdrObject * GetSdrObjectFromXShape(const css::uno::Reference< css::drawing::XShape > &xShape)
Returns the SdrObject from the given StarOffice API wrapper.
Abstract DrawObject.
Definition: svdobj.hxx:312
SVXCORE_DLLPUBLIC bool SvxMeasureUnitToFieldUnit(const short eApi, FieldUnit &nVcl)
Maps the API constant MeasureUnit to a vcl MapUnit enum.
Definition: unoprov.cxx:982
SVXCORE_DLLPUBLIC bool SvxMapUnitToMeasureUnit(const MapUnit nVcl, short &eApi)
Maps the vcl MapUnit enum to an API constant MeasureUnit.
Definition: unoprov.cxx:956
enum SdrInventor sal_uInt32 SVXCORE_DLLPUBLIC 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:869
SVXCORE_DLLPUBLIC bool SvxFieldUnitToMeasureUnit(const FieldUnit nVcl, short &eApi)
Maps the vcl MapUnit enum to an API constant MeasureUnit.
Definition: unoprov.cxx:1008
#define SVXCORE_DLLPUBLIC
Definition: svxdllapi.h:35
SVXCORE_DLLPUBLIC css::uno::Reference< css::drawing::XShape > GetXShapeForSdrObject(SdrObject *pObj)
Returns a StarOffice API wrapper for the given SdrObject.
Definition: unoshape.cxx:3926
A SdrPage contains exactly one SdrObjList and a description of the physical page dimensions (size / m...
Definition: svdpage.hxx:365