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 { namespace sun { namespace star {
29  namespace uno {
30  class Any;
31  }
32 }}}
33 class DateTime;
34 class SfxItemSet;
35 
36 namespace SWUnoHelper {
37 
38 // calls over the compherl the getEnumAsInt32 function and handle the
39 // exceptions.
40 sal_Int32 GetEnumAsInt32( const css::uno::Any& rVal );
41 
42 // methods for UCB actions:
43  // delete the file under this URL
44 SW_DLLPUBLIC bool UCB_DeleteFile( const OUString& rURL );
45 
46  // move the file to a new location
47 bool UCB_MoveFile( const OUString& rURL, const OUString& rNewURL );
48 
49  // is the URL on the current system case sensitive?
50 SW_DLLPUBLIC bool UCB_IsCaseSensitiveFileName( const OUString& rURL );
51 
52  // is the URL readonly?
53 SW_DLLPUBLIC bool UCB_IsReadOnlyFileName( const OUString& rURL );
54 
55  // get a list of files from the folder of the URL
56  // options: pExtension = 0 -> all, else this specific extension
57  // pDateTime != 0 -> returns also the modified date/time of
58  // the files in a vector -->
59 bool UCB_GetFileListOfFolder( const OUString& rURL,
60  std::vector<OUString>& rList,
61  const OUString* pExtension,
62  std::vector<DateTime>* pDateTimeList = nullptr );
63 
64  // is the URL an existing file?
65 SW_DLLPUBLIC bool UCB_IsFile( const OUString& rURL );
66 
67  // is the URL an existing directory?
68 bool UCB_IsDirectory( const OUString& rURL );
69 
73 bool needToMapFillItemsToSvxBrushItemTypes(const SfxItemSet& rSet, sal_uInt16 const nMemberId);
74 
75 }
76 
77 #endif
78 
79 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
bool UCB_IsReadOnlyFileName(const OUString &rURL)
bool UCB_DeleteFile(const OUString &rURL)
Definition: swunohelper.cxx:59
bool UCB_IsFile(const OUString &rURL)
bool UCB_MoveFile(const OUString &rURL, const OUString &rNewURL)
Definition: swunohelper.cxx:78
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:50