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 .
20 #ifndef INCLUDED_DTRANS_SOURCE_WIN32_MISC_IMPLHELPER_HXX
21 #define INCLUDED_DTRANS_SOURCE_WIN32_MISC_IMPLHELPER_HXX
23 #include <sal/types.h>
24 #include <rtl/ustring.hxx>
27 #pragma warning(push,1)
34 // target device and formatetc helper
35 void SAL_CALL
DeleteTargetDevice(DVTARGETDEVICE
* ptd
);
36 sal_Bool SAL_CALL
CopyFormatEtc(LPFORMATETC petcDest
, LPFORMATETC petcSrc
);
37 sal_Int32 SAL_CALL
CompareFormatEtc( const FORMATETC
* pFetcLeft
, const FORMATETC
* pFetcRight
);
38 sal_Bool SAL_CALL
CompareTargetDevice(DVTARGETDEVICE
* ptdLeft
, DVTARGETDEVICE
* ptdRight
);
39 DVTARGETDEVICE
* SAL_CALL
CopyTargetDevice(DVTARGETDEVICE
* ptdSrc
);
41 // some codepage helper functions
43 // returns a windows codepage appropriate to the
44 // given mime charset parameter value
46 sal_uInt32 SAL_CALL
getWinCPFromMimeCharset(
47 const OUString
& charset
);
49 // returns a windows codepage appropriate to the
50 // given locale and locale type
52 OUString SAL_CALL
getWinCPFromLocaleId(
53 LCID lcid
, LCTYPE lctype
);
55 // returns a mime charset parameter value appropriate
56 // to the given codepage, optional a prefix can be
57 // given, e.g. "windows-" or "cp"
59 OUString SAL_CALL
getMimeCharsetFromWinCP(
60 sal_uInt32 cp
, const OUString
& aPrefix
);
62 // returns a mime charset parameter value appropriate
63 // to the given locale id and locale type, optional a
64 // prefix can be given, e.g. "windows-" or "cp"
66 OUString SAL_CALL
getMimeCharsetFromLocaleId(
67 LCID lcid
, LCTYPE lctype
, const OUString
& aPrefix
);
69 // returns true, if a given codepage is an oem codepage
71 sal_Bool SAL_CALL
IsOEMCP( sal_uInt32 codepage
);
73 // converts a codepage into a string representation
75 OUString SAL_CALL
cptostr( sal_uInt32 codepage
);
79 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */