Version 5.4.3.2, tag libreoffice-5.4.3.2
[LibreOffice.git] / sw / inc / swunohelper.hxx
blob5d50605cd75986d89daaaecac28390b74c72f40c
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 <tools/solar.h>
23 #include <sal/types.h>
24 #include "swdllapi.h"
26 #include <vector>
28 namespace com { namespace sun { namespace star {
29 namespace uno {
30 class Any;
32 }}}
33 namespace rtl {class OUString;}
34 class DateTime;
35 class SfxItemSet;
37 namespace SWUnoHelper {
39 // calls over the compherl the getEnumAsInt32 function and handle the
40 // exceptions.
41 sal_Int32 GetEnumAsInt32( const css::uno::Any& rVal );
43 // methods for UCB actions:
44 // delete the file under this URL
45 SW_DLLPUBLIC bool UCB_DeleteFile( const OUString& rURL );
47 // copy/move the file to a new location
48 bool UCB_CopyFile( const OUString& rURL, const OUString& rNewURL,
49 bool bCopyIsMove );
51 // is the URL on the current system case sensitive?
52 SW_DLLPUBLIC bool UCB_IsCaseSensitiveFileName( const OUString& rURL );
54 // is the URL readonly?
55 SW_DLLPUBLIC bool UCB_IsReadOnlyFileName( const OUString& rURL );
57 // get a list of files from the folder of the URL
58 // options: pExtension = 0 -> all, else this specific extension
59 // pDateTime != 0 -> returns also the modified date/time of
60 // the files in a vector -->
61 // !! objects must be deleted from the caller!!
62 bool UCB_GetFileListOfFolder( const OUString& rURL,
63 std::vector<OUString>& rList,
64 const OUString* pExtension,
65 std::vector<DateTime*>* pDateTimeList = nullptr );
67 // is the URL an existing file?
68 SW_DLLPUBLIC bool UCB_IsFile( const OUString& rURL );
70 // is the URL a existing directory?
71 bool UCB_IsDirectory( const OUString& rURL );
73 /// helper to check if fill style is set to color or bitmap
74 /// and thus formerly used SvxBrushItem parts need to be mapped
75 /// for backwards compatibility
76 bool needToMapFillItemsToSvxBrushItemTypes(const SfxItemSet& rSet, sal_uInt16 const nMemberId);
80 #endif
82 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */