sync master with lastest vba changes
[ooovba.git] / binfilter / inc / bf_svx / unoapi.hxx
blob0d27b3f545bb43bc7902477247c0806741c84e9c
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: unoapi.hxx,v $
10 * $Revision: 1.9 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _SVX_UNOAPI_HXX_
32 #define _SVX_UNOAPI_HXX_
35 #ifndef _COM_SUN_STAR_DRAWING_XSHAPE_HPP_
36 #include <com/sun/star/drawing/XShape.hpp>
37 #endif
39 #ifndef _SAL_TYPES_H_
40 #include <sal/types.h>
41 #endif
43 #ifndef _BF_GOODIES_GRAPHICOBJECT_HXX
44 #include <bf_goodies/graphicobject.hxx>
45 #endif
47 #ifndef _SFXPOOLITEM_HXX
48 #include <bf_svtools/poolitem.hxx>
49 #endif
50 class String;
51 namespace binfilter {
53 class SfxItemPool;
55 class SvxShape;
56 class SdrObject;
57 class SvxNumBulletItem;
59 /** creates a StarOffice API wrapper with the given type and inventor
60 Deprecated: This will be replaced with a function returning XShape.
62 SvxShape* CreateSvxShapeByTypeAndInventor( sal_uInt16 nType, sal_uInt32 nInventor ) throw();
64 /** returns a StarOffice API wrapper for the given SdrObject */
65 ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > GetXShapeForSdrObject( SdrObject* pObj ) throw ();
67 /** returns the SdrObject from the given StarOffice API wrapper */
68 SdrObject* GetSdrObjectFromXShape( ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > xShape ) throw() ;
70 /** returns a GraphicObject for this URL */
71 BfGraphicObject CreateGraphicObjectFromURL( const ::rtl::OUString &rURL ) throw() ;
73 /** returns the SvxNumBulletItem with the given name from the pool or a null if there is no item
74 with that name
76 SvxNumBulletItem* SvxGetNumBulletItemByName( SfxItemPool* pPool, const ::rtl::OUString& aName ) throw();
78 /** maps the vcl MapUnit enum to a API constant MeasureUnit.
79 Returns false if conversion is not supported.
81 sal_Bool SvxMapUnitToMeasureUnit( const short nVcl, short& eApi ) throw();
83 /** maps the API constant MeasureUnit to a vcl MapUnit enum.
84 Returns false if conversion is not supported.
86 sal_Bool SvxMeasureUnitToFieldUnit( const short eApi, short& nVcl ) throw();
88 /** maps the vcl MapUnit enum to a API constant MeasureUnit.
89 Returns false if conversion is not supported.
91 sal_Bool SvxFieldUnitToMeasureUnit( const short nVcl, short& eApi ) throw();
93 /** if the given name is a predefined name for the current language it is replaced by
94 the corresponding api name.
96 void SvxUnogetApiNameForItem( const sal_Int16 nWhich, const String& rInternalName, ::rtl::OUString& rApiName ) throw();
98 /** if the given name is a predefined api name it is replaced by the predefined name
99 for the current language.
101 void SvxUnogetInternalNameForItem( const sal_Int16 nWhich, const ::rtl::OUString& rApiName, String& rInternalName ) throw();
103 /** converts the given any with a metric to 100th/mm if needed */
104 void SvxUnoConvertToMM( const SfxMapUnit eSourceMapUnit, ::com::sun::star::uno::Any & rMetric ) throw();
106 /** converts the given any with a metric from 100th/mm to the given metric if needed */
107 void SvxUnoConvertFromMM( const SfxMapUnit eDestinationMapUnit, ::com::sun::star::uno::Any & rMetric ) throw();
109 }//end of namespace binfilter
110 #endif // _SVX_UNOAPI_HXX_