1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 #ifndef _SVX_UNOAPI_HXX_ 25 #define _SVX_UNOAPI_HXX_ 26 27 #include <com/sun/star/uno/Any.hxx> 28 #include <com/sun/star/drawing/XShape.hpp> 29 #include <com/sun/star/drawing/XDrawPage.hpp> 30 #include <sal/types.h> 31 #include <svtools/grfmgr.hxx> 32 #include <svl/poolitem.hxx> 33 #include "svx/svxdllapi.h" 34 35 class SvxShape; 36 class SdrObject; 37 class SdrPage; 38 class SvxNumBulletItem; 39 class SfxItemPool; 40 class String; 41 42 /** creates a StarOffice API wrapper with the given type and inventor 43 Deprecated: This will be replaced with a function returning XShape. 44 */ 45 SVX_DLLPUBLIC SvxShape* CreateSvxShapeByTypeAndInventor( sal_uInt16 nType, sal_uInt32 nInventor ) throw(); 46 47 /** returns a StarOffice API wrapper for the given SdrObject */ 48 SVX_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > GetXShapeForSdrObject( SdrObject* pObj ) throw (); 49 50 /** returns the SdrObject from the given StarOffice API wrapper */ 51 SVX_DLLPUBLIC SdrObject* GetSdrObjectFromXShape( ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > xShape ) throw() ; 52 53 /** returns a StarOffice API wrapper for the given SdrPage */ 54 SVX_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage > GetXDrawPageForSdrPage( SdrPage* pPage ) throw (); 55 56 /** returns the SdrPage from the given StarOffice API wrapper */ 57 SVX_DLLPUBLIC SdrPage* GetSdrPageFromXDrawPage( ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage > xDrawPage ) throw() ; 58 59 /** returns the SvxNumBulletItem with the given name from the pool or a null if there is no item 60 with that name 61 */ 62 SvxNumBulletItem* SvxGetNumBulletItemByName( SfxItemPool* pPool, const ::rtl::OUString& aName ) throw(); 63 64 /** maps the API constant MeasureUnit to a vcl MapUnit enum. 65 Returns false if conversion is not supported. 66 67 @cl: for warnings01 I found out that this method never worked so I thin 68 it is not used at all 69 sal_Bool SvxMeasureUnitToMapUnit( const short eApi, short& nVcl ) throw(); 70 */ 71 72 /** maps the vcl MapUnit enum to a API constant MeasureUnit. 73 Returns false if conversion is not supported. 74 */ 75 SVX_DLLPUBLIC sal_Bool SvxMapUnitToMeasureUnit( const short nVcl, short& eApi ) throw(); 76 77 /** maps the API constant MeasureUnit to a vcl MapUnit enum. 78 Returns false if conversion is not supported. 79 */ 80 SVX_DLLPUBLIC sal_Bool SvxMeasureUnitToFieldUnit( const short eApi, short& nVcl ) throw(); 81 82 /** maps the vcl MapUnit enum to a API constant MeasureUnit. 83 Returns false if conversion is not supported. 84 */ 85 SVX_DLLPUBLIC sal_Bool SvxFieldUnitToMeasureUnit( const short nVcl, short& eApi ) throw(); 86 87 /** if the given name is a predefined name for the current language it is replaced by 88 the corresponding api name. 89 */ 90 SVX_DLLPUBLIC void SvxUnogetApiNameForItem( const sal_Int16 nWhich, const String& rInternalName, rtl::OUString& rApiName ) throw(); 91 92 /** if the given name is a predefined api name it is replaced by the predefined name 93 for the current language. 94 */ 95 SVX_DLLPUBLIC void SvxUnogetInternalNameForItem( const sal_Int16 nWhich, const rtl::OUString& rApiName, String& rInternalName ) throw(); 96 97 #endif // _SVX_UNOAPI_HXX_ 98 99