Branch libreoffice-5-0-4
[LibreOffice.git] / sw / inc / swunohelper.hxx
blobc00404c759c18bb3bfc9740611bf5d73b6f72e93
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 }}}
34 namespace rtl {class OUString;}
36 class DateTime;
38 //UUUU
39 class SfxItemSet;
41 namespace SWUnoHelper {
43 // calls over the compherl the getEnumAsInt32 function and handle the
44 // exceptions.
45 sal_Int32 GetEnumAsInt32( const com::sun::star::uno::Any& rVal );
47 // methods for UCB actions:
48 // delete the file under this URL
49 SW_DLLPUBLIC bool UCB_DeleteFile( const OUString& rURL );
51 // copy/move the file to a new location
52 bool UCB_CopyFile( const OUString& rURL, const OUString& rNewURL,
53 bool bCopyIsMove = false );
55 // is the URL on the current system case sentive?
56 SW_DLLPUBLIC bool UCB_IsCaseSensitiveFileName( const OUString& rURL );
58 // is the URL readonly?
59 SW_DLLPUBLIC bool UCB_IsReadOnlyFileName( const OUString& rURL );
61 // get a list of files from the folder of the URL
62 // options: pExtension = 0 -> all, else this specific extension
63 // pDateTime != 0 -> returns also the modified date/time of
64 // the files in a vector -->
65 // !! objects must be deleted from the caller!!
66 bool UCB_GetFileListOfFolder( const OUString& rURL,
67 std::vector<OUString>& rList,
68 const OUString* pExtension = 0,
69 std::vector<DateTime*>* pDateTimeList = 0 );
71 // is the URL an existing file?
72 SW_DLLPUBLIC bool UCB_IsFile( const OUString& rURL );
74 // is the URL a existing directory?
75 bool UCB_IsDirectory( const OUString& rURL );
77 ///UUUU helper to check if fill style is set to color or bitmap
78 /// and thus formally used SvxBrushItem parts need to be mapped
79 /// for backwards compatibility
80 bool needToMapFillItemsToSvxBrushItemTypes(const SfxItemSet& rSet, sal_uInt16 const nMemberId);
84 #endif
86 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */