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 
28 namespace com::sun::star::uno { class Any; }
29 class DateTime;
30 class SfxItemSet;
31 
32 namespace SWUnoHelper {
33 
34 // calls over the compherl the getEnumAsInt32 function and handle the
35 // exceptions.
36 sal_Int32 GetEnumAsInt32( const css::uno::Any& rVal );
37 
38 // methods for UCB actions:
39  // delete the file under this URL
40 SW_DLLPUBLIC bool UCB_DeleteFile( const OUString& rURL );
41 
42  // move the file to a new location
43 bool UCB_MoveFile( const OUString& rURL, const OUString& rNewURL );
44 
45  // is the URL on the current system case sensitive?
46 SW_DLLPUBLIC bool UCB_IsCaseSensitiveFileName( const OUString& rURL );
47 
48  // is the URL readonly?
49 SW_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 -->
55 bool 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?
61 SW_DLLPUBLIC bool UCB_IsFile( const OUString& rURL );
62 
63  // is the URL an existing directory?
64 bool UCB_IsDirectory( const OUString& rURL );
65 
69 bool needToMapFillItemsToSvxBrushItemTypes(const SfxItemSet& rSet, sal_uInt16 const nMemberId);
70 
71 }
72 
73 #endif
74 
75 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
bool UCB_IsReadOnlyFileName(const OUString &rURL)
bool UCB_DeleteFile(const OUString &rURL)
Definition: swunohelper.cxx:58
bool UCB_IsFile(const OUString &rURL)
bool UCB_MoveFile(const OUString &rURL, const OUString &rNewURL)
Definition: swunohelper.cxx:77
bool UCB_IsCaseSensitiveFileName(const OUString &rURL)
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...
#define SW_DLLPUBLIC
Definition: swdllapi.h:28
bool UCB_IsDirectory(const OUString &rURL)
bool UCB_GetFileListOfFolder(const OUString &rURL, std::vector< OUString > &rList, const OUString *pExtension, std::vector< ::DateTime > *pDateTimeList)
sal_Int32 GetEnumAsInt32(const css::uno::Any &rVal)
Definition: swunohelper.cxx:49