1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: DataFmtTransl.hxx,v $
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 ************************************************************************/
32 #ifndef _DATAFMTTRANSL_HXX_
33 #define _DATAFMTTRANSL_HXX_
35 //-----------------------------------------------
37 //-----------------------------------------------
39 #include <cppuhelper/servicefactory.hxx>
40 #include <com/sun/star/datatransfer/XDataFormatTranslator.hpp>
41 #include <com/sun/star/datatransfer/XTransferable.hpp>
42 #include <sal/types.h>
43 #include <rtl/ustring.hxx>
46 #pragma warning(push,1)
53 //-----------------------------------------------
55 //-----------------------------------------------
59 class CDataFormatTranslator
62 CDataFormatTranslator( const ::com::sun::star::uno::Reference
< ::com::sun::star::lang::XMultiServiceFactory
>& aServiceManager
);
64 CFormatEtc
getFormatEtcFromDataFlavor( const com::sun::star::datatransfer::DataFlavor
& aDataFlavor
) const;
65 com::sun::star::datatransfer::DataFlavor
getDataFlavorFromFormatEtc(
66 const FORMATETC
& aFormatEtc
, LCID lcid
= GetThreadLocale( ) ) const;
68 CFormatEtc SAL_CALL
getFormatEtcForClipformat( CLIPFORMAT cf
) const;
69 CFormatEtc SAL_CALL
getFormatEtcForClipformatName( const rtl::OUString
& aClipFmtName
) const;
70 rtl::OUString SAL_CALL
getClipboardFormatName( CLIPFORMAT aClipformat
) const;
72 sal_Bool SAL_CALL
isHTMLFormat( CLIPFORMAT cf
) const;
73 sal_Bool SAL_CALL
isTextHtmlFormat( CLIPFORMAT cf
) const;
74 sal_Bool SAL_CALL
isOemOrAnsiTextFormat( CLIPFORMAT cf
) const;
75 sal_Bool SAL_CALL
isUnicodeTextFormat( CLIPFORMAT cf
) const;
76 sal_Bool SAL_CALL
isTextFormat( CLIPFORMAT cf
) const;
79 rtl::OUString SAL_CALL
getTextCharsetFromLCID( LCID lcid
, CLIPFORMAT aClipformat
) const;
82 const ::com::sun::star::uno::Reference
< ::com::sun::star::lang::XMultiServiceFactory
> m_SrvMgr
;
83 com::sun::star::uno::Reference
< com::sun::star::datatransfer::XDataFormatTranslator
> m_XDataFormatTranslator
;