LibreOffice Module sw (master) 1
swunohelper.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19#ifndef INCLUDED_SW_INC_SWUNOHELPER_HXX
20#define INCLUDED_SW_INC_SWUNOHELPER_HXX
21
22#include <sal/types.h>
23#include <rtl/ustring.hxx>
24#include "swdllapi.h"
25
26#include <vector>
27
28namespace com::sun::star::uno { class Any; }
29class DateTime;
30class SfxItemSet;
31
32namespace SWUnoHelper {
33
34// calls over the compherl the getEnumAsInt32 function and handle the
35// exceptions.
36sal_Int32 GetEnumAsInt32( const css::uno::Any& rVal );
37
38// methods for UCB actions:
39 // delete the file under this URL
40SW_DLLPUBLIC bool UCB_DeleteFile( const OUString& rURL );
41
42 // move the file to a new location
43bool UCB_MoveFile( const OUString& rURL, std::u16string_view rNewURL );
44
45 // is the URL on the current system case sensitive?
46SW_DLLPUBLIC bool UCB_IsCaseSensitiveFileName( std::u16string_view rURL );
47
48 // is the URL readonly?
49SW_DLLPUBLIC bool UCB_IsReadOnlyFileName( const OUString& rURL );
50
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 -->
55bool UCB_GetFileListOfFolder( const OUString& rURL,
56 std::vector<OUString>& rList,
57 const OUString* pExtension,
58 std::vector<DateTime>* pDateTimeList = nullptr );
59
60 // is the URL an existing file?
61SW_DLLPUBLIC bool UCB_IsFile( const OUString& rURL );
62
63 // is the URL an existing directory?
64bool UCB_IsDirectory( const OUString& rURL );
65
69bool needToMapFillItemsToSvxBrushItemTypes(const SfxItemSet& rSet, sal_uInt16 const nMemberId);
70
71}
72
73#endif
74
75/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
bool UCB_IsFile(const OUString &rURL)
sal_Int32 GetEnumAsInt32(const css::uno::Any &rVal)
Definition: swunohelper.cxx:50
bool UCB_GetFileListOfFolder(const OUString &rURL, std::vector< OUString > &rList, const OUString *pExtension, std::vector< ::DateTime > *pDateTimeList)
bool UCB_DeleteFile(const OUString &rURL)
Definition: swunohelper.cxx:59
bool needToMapFillItemsToSvxBrushItemTypes(const SfxItemSet &rSet, sal_uInt16 const nMID)
helper to check if fill style is set to color or bitmap and thus formerly used SvxBrushItem parts nee...
bool UCB_IsDirectory(const OUString &rURL)
bool UCB_IsReadOnlyFileName(const OUString &rURL)
bool UCB_IsCaseSensitiveFileName(std::u16string_view rURL)
bool UCB_MoveFile(const OUString &rURL, std::u16string_view rNewURL)
Definition: swunohelper.cxx:78
#define SW_DLLPUBLIC
Definition: swdllapi.h:28