1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
21 #ifndef _IMPLHELPER_HXX_
22 #define _IMPLHELPER_HXX_
24 #include <sal/types.h>
25 #include <rtl/ustring.hxx>
28 #pragma warning(push,1)
35 // target device and formatetc helper
36 void SAL_CALL
DeleteTargetDevice(DVTARGETDEVICE
* ptd
);
37 sal_Bool SAL_CALL
CopyFormatEtc(LPFORMATETC petcDest
, LPFORMATETC petcSrc
);
38 sal_Int32 SAL_CALL
CompareFormatEtc( const FORMATETC
* pFetcLeft
, const FORMATETC
* pFetcRight
);
39 sal_Bool SAL_CALL
CompareTargetDevice(DVTARGETDEVICE
* ptdLeft
, DVTARGETDEVICE
* ptdRight
);
40 DVTARGETDEVICE
* SAL_CALL
CopyTargetDevice(DVTARGETDEVICE
* ptdSrc
);
42 // some codepage helper functions
44 //--------------------------------------------------
45 // returns a windows codepage appropriate to the
46 // given mime charset parameter value
47 //--------------------------------------------------
49 sal_uInt32 SAL_CALL
getWinCPFromMimeCharset(
50 const OUString
& charset
);
52 //--------------------------------------------------
53 // returns a windows codepage appropriate to the
54 // given locale and locale type
55 //--------------------------------------------------
57 OUString SAL_CALL
getWinCPFromLocaleId(
58 LCID lcid
, LCTYPE lctype
);
60 //--------------------------------------------------
61 // returns a mime charset parameter value appropriate
62 // to the given codepage, optional a prefix can be
63 // given, e.g. "windows-" or "cp"
64 //--------------------------------------------------
66 OUString SAL_CALL
getMimeCharsetFromWinCP(
67 sal_uInt32 cp
, const OUString
& aPrefix
);
69 //--------------------------------------------------
70 // returns a mime charset parameter value appropriate
71 // to the given locale id and locale type, optional a
72 // prefix can be given, e.g. "windows-" or "cp"
73 //--------------------------------------------------
75 OUString SAL_CALL
getMimeCharsetFromLocaleId(
76 LCID lcid
, LCTYPE lctype
, const OUString
& aPrefix
);
78 //-----------------------------------------------------
79 // returns true, if a given codepage is an oem codepage
80 //-----------------------------------------------------
82 sal_Bool SAL_CALL
IsOEMCP( sal_uInt32 codepage
);
84 //--------------------------------------------------
85 // converts a codepage into a string representation
86 //--------------------------------------------------
88 OUString SAL_CALL
cptostr( sal_uInt32 codepage
);
92 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */