1*fbcf0fe9SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*fbcf0fe9SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*fbcf0fe9SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*fbcf0fe9SAndrew Rist  * distributed with this work for additional information
6*fbcf0fe9SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*fbcf0fe9SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*fbcf0fe9SAndrew Rist  * "License"); you may not use this file except in compliance
9*fbcf0fe9SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*fbcf0fe9SAndrew Rist  *
11*fbcf0fe9SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*fbcf0fe9SAndrew Rist  *
13*fbcf0fe9SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*fbcf0fe9SAndrew Rist  * software distributed under the License is distributed on an
15*fbcf0fe9SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*fbcf0fe9SAndrew Rist  * KIND, either express or implied.  See the License for the
17*fbcf0fe9SAndrew Rist  * specific language governing permissions and limitations
18*fbcf0fe9SAndrew Rist  * under the License.
19*fbcf0fe9SAndrew Rist  *
20*fbcf0fe9SAndrew Rist  *************************************************************/
21*fbcf0fe9SAndrew Rist 
22*fbcf0fe9SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir 
25cdf0e10cSrcweir #ifndef _IMPLHELPER_HXX_
26cdf0e10cSrcweir #define _IMPLHELPER_HXX_
27cdf0e10cSrcweir 
28cdf0e10cSrcweir //------------------------------------------------------------------------
29cdf0e10cSrcweir // includes
30cdf0e10cSrcweir //------------------------------------------------------------------------
31cdf0e10cSrcweir 
32cdf0e10cSrcweir #include <sal/types.h>
33cdf0e10cSrcweir #include <rtl/ustring.hxx>
34cdf0e10cSrcweir 
35cdf0e10cSrcweir #if defined _MSC_VER
36cdf0e10cSrcweir #pragma warning(push,1)
37cdf0e10cSrcweir #endif
38cdf0e10cSrcweir #include <windows.h>
39cdf0e10cSrcweir #if defined _MSC_VER
40cdf0e10cSrcweir #pragma warning(pop)
41cdf0e10cSrcweir #endif
42cdf0e10cSrcweir 
43cdf0e10cSrcweir //------------------------------------------------------------------------
44cdf0e10cSrcweir // deklarations
45cdf0e10cSrcweir //------------------------------------------------------------------------
46cdf0e10cSrcweir 
47cdf0e10cSrcweir // target device and formatetc helper
48cdf0e10cSrcweir void      SAL_CALL DeleteTargetDevice(DVTARGETDEVICE* ptd);
49cdf0e10cSrcweir sal_Bool  SAL_CALL CopyFormatEtc(LPFORMATETC petcDest, LPFORMATETC petcSrc);
50cdf0e10cSrcweir sal_Int32 SAL_CALL CompareFormatEtc( const FORMATETC* pFetcLeft, const FORMATETC* pFetcRight);
51cdf0e10cSrcweir sal_Bool  SAL_CALL CompareTargetDevice(DVTARGETDEVICE* ptdLeft, DVTARGETDEVICE* ptdRight);
52cdf0e10cSrcweir DVTARGETDEVICE* SAL_CALL CopyTargetDevice(DVTARGETDEVICE* ptdSrc);
53cdf0e10cSrcweir 
54cdf0e10cSrcweir // some codepage helper functions
55cdf0e10cSrcweir 
56cdf0e10cSrcweir //--------------------------------------------------
57cdf0e10cSrcweir // returns a windows codepage appropriate to the
58cdf0e10cSrcweir // given mime charset parameter value
59cdf0e10cSrcweir //--------------------------------------------------
60cdf0e10cSrcweir 
61cdf0e10cSrcweir sal_uInt32 SAL_CALL getWinCPFromMimeCharset(
62cdf0e10cSrcweir 	const rtl::OUString& charset );
63cdf0e10cSrcweir 
64cdf0e10cSrcweir //--------------------------------------------------
65cdf0e10cSrcweir // returns a windows codepage appropriate to the
66cdf0e10cSrcweir // given locale and locale type
67cdf0e10cSrcweir //--------------------------------------------------
68cdf0e10cSrcweir 
69cdf0e10cSrcweir rtl::OUString SAL_CALL getWinCPFromLocaleId(
70cdf0e10cSrcweir 	LCID lcid, LCTYPE lctype );
71cdf0e10cSrcweir 
72cdf0e10cSrcweir //--------------------------------------------------
73cdf0e10cSrcweir // returns a mime charset parameter value appropriate
74cdf0e10cSrcweir // to the given codepage, optional a prefix can be
75cdf0e10cSrcweir // given, e.g. "windows-" or "cp"
76cdf0e10cSrcweir //--------------------------------------------------
77cdf0e10cSrcweir 
78cdf0e10cSrcweir rtl::OUString SAL_CALL getMimeCharsetFromWinCP(
79cdf0e10cSrcweir 	sal_uInt32 cp, const rtl::OUString& aPrefix );
80cdf0e10cSrcweir 
81cdf0e10cSrcweir //--------------------------------------------------
82cdf0e10cSrcweir // returns a mime charset parameter value appropriate
83cdf0e10cSrcweir // to the given locale id and locale type, optional a
84cdf0e10cSrcweir // prefix can be given, e.g. "windows-" or "cp"
85cdf0e10cSrcweir //--------------------------------------------------
86cdf0e10cSrcweir 
87cdf0e10cSrcweir rtl::OUString SAL_CALL getMimeCharsetFromLocaleId(
88cdf0e10cSrcweir 	LCID lcid, LCTYPE lctype, const rtl::OUString& aPrefix  );
89cdf0e10cSrcweir 
90cdf0e10cSrcweir //-----------------------------------------------------
91cdf0e10cSrcweir // returns true, if a given codepage is an oem codepage
92cdf0e10cSrcweir //-----------------------------------------------------
93cdf0e10cSrcweir 
94cdf0e10cSrcweir sal_Bool SAL_CALL IsOEMCP( sal_uInt32 codepage );
95cdf0e10cSrcweir 
96cdf0e10cSrcweir //--------------------------------------------------
97cdf0e10cSrcweir // converts a codepage into a string representation
98cdf0e10cSrcweir //--------------------------------------------------
99cdf0e10cSrcweir 
100cdf0e10cSrcweir rtl::OUString SAL_CALL cptostr( sal_uInt32 codepage );
101cdf0e10cSrcweir 
102cdf0e10cSrcweir #endif
103