tdf#130857 qt weld: Implement QtInstanceWidget::strip_mnemonic
[LibreOffice.git] / sw / inc / swunohelper.hxx
blob1b718ae4159873423bb93367ce2af3744944714d
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 .
19 #ifndef INCLUDED_SW_INC_SWUNOHELPER_HXX
20 #define INCLUDED_SW_INC_SWUNOHELPER_HXX
22 #include <sal/types.h>
23 #include <rtl/ustring.hxx>
24 #include "swdllapi.h"
26 #include <vector>
28 namespace com::sun::star::uno { class Any; }
29 class DateTime;
30 class SfxItemSet;
32 namespace SWUnoHelper {
34 // calls over the compherl the getEnumAsInt32 function and handle the
35 // exceptions.
36 sal_Int32 GetEnumAsInt32( const css::uno::Any& rVal );
38 // methods for UCB actions:
39 // delete the file under this URL
40 SW_DLLPUBLIC bool UCB_DeleteFile( const OUString& rURL );
42 // move the file to a new location
43 bool UCB_MoveFile( const OUString& rURL, std::u16string_view rNewURL );
45 // is the URL on the current system case sensitive?
46 SW_DLLPUBLIC bool UCB_IsCaseSensitiveFileName( std::u16string_view rURL );
48 // is the URL readonly?
49 SW_DLLPUBLIC bool UCB_IsReadOnlyFileName( const OUString& rURL );
51 // get a list of files from the folder of the URL
52 // options: pExtension = 0 -> all, else this specific extension
53 // pDateTime != 0 -> returns also the modified date/time of
54 // the files in a vector -->
55 bool UCB_GetFileListOfFolder( const OUString& rURL,
56 std::vector<OUString>& rList,
57 const OUString* pExtension,
58 std::vector<DateTime>* pDateTimeList = nullptr );
60 // is the URL an existing file?
61 SW_DLLPUBLIC bool UCB_IsFile( const OUString& rURL );
63 // is the URL an existing directory?
64 bool UCB_IsDirectory( const OUString& rURL );
66 /// helper to check if fill style is set to color or bitmap
67 /// and thus formerly used SvxBrushItem parts need to be mapped
68 /// for backwards compatibility
69 bool needToMapFillItemsToSvxBrushItemTypes(const SfxItemSet& rSet, sal_uInt16 const nMemberId);
73 #endif
75 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */