11d2dbeb0SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 31d2dbeb0SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 41d2dbeb0SAndrew Rist * or more contributor license agreements. See the NOTICE file 51d2dbeb0SAndrew Rist * distributed with this work for additional information 61d2dbeb0SAndrew Rist * regarding copyright ownership. The ASF licenses this file 71d2dbeb0SAndrew Rist * to you under the Apache License, Version 2.0 (the 81d2dbeb0SAndrew Rist * "License"); you may not use this file except in compliance 91d2dbeb0SAndrew Rist * with the License. You may obtain a copy of the License at 101d2dbeb0SAndrew Rist * 111d2dbeb0SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 121d2dbeb0SAndrew Rist * 131d2dbeb0SAndrew Rist * Unless required by applicable law or agreed to in writing, 141d2dbeb0SAndrew Rist * software distributed under the License is distributed on an 151d2dbeb0SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 161d2dbeb0SAndrew Rist * KIND, either express or implied. See the License for the 171d2dbeb0SAndrew Rist * specific language governing permissions and limitations 181d2dbeb0SAndrew Rist * under the License. 191d2dbeb0SAndrew Rist * 201d2dbeb0SAndrew Rist *************************************************************/ 211d2dbeb0SAndrew Rist 221d2dbeb0SAndrew Rist 23cdf0e10cSrcweir #ifndef _SWUNOHELPER_HXX 24cdf0e10cSrcweir #define _SWUNOHELPER_HXX 25cdf0e10cSrcweir 26cdf0e10cSrcweir #include <tools/solar.h> 27cdf0e10cSrcweir #include <sal/types.h> 28cdf0e10cSrcweir #include "swdllapi.h" 29cdf0e10cSrcweir 30*56b35d86SArmin Le Grand namespace com { namespace sun { namespace star { 31*56b35d86SArmin Le Grand namespace uno { 32*56b35d86SArmin Le Grand class Any; 33*56b35d86SArmin Le Grand } 34cdf0e10cSrcweir }}} 35cdf0e10cSrcweir 36cdf0e10cSrcweir class String; 37cdf0e10cSrcweir class SvStrings; 38cdf0e10cSrcweir class SvPtrarr; 39*56b35d86SArmin Le Grand 40*56b35d86SArmin Le Grand //UUUU 41*56b35d86SArmin Le Grand class SfxItemSet; 42*56b35d86SArmin Le Grand 43cdf0e10cSrcweir namespace SWUnoHelper { 44cdf0e10cSrcweir 45cdf0e10cSrcweir // calls over the compherl the getEnumAsInt32 function and handle the 46cdf0e10cSrcweir // exceptions. 47cdf0e10cSrcweir sal_Int32 GetEnumAsInt32( const com::sun::star::uno::Any& rVal ); 48cdf0e10cSrcweir 49cdf0e10cSrcweir 50cdf0e10cSrcweir // methods for UCB actions: 51cdf0e10cSrcweir // delete the file under this URL 52cdf0e10cSrcweir SW_DLLPUBLIC sal_Bool UCB_DeleteFile( const String& rURL ); 53cdf0e10cSrcweir 54cdf0e10cSrcweir // copy/move the file to a new location 55cdf0e10cSrcweir sal_Bool UCB_CopyFile( const String& rURL, const String& rNewURL, 56cdf0e10cSrcweir sal_Bool bCopyIsMove = sal_False ); 57cdf0e10cSrcweir 58cdf0e10cSrcweir // is the URL on the current system case sentive? 59cdf0e10cSrcweir SW_DLLPUBLIC sal_Bool UCB_IsCaseSensitiveFileName( const String& rURL ); 60cdf0e10cSrcweir 61cdf0e10cSrcweir // is the URL readonly? 62cdf0e10cSrcweir SW_DLLPUBLIC sal_Bool UCB_IsReadOnlyFileName( const String& rURL ); 63cdf0e10cSrcweir 64cdf0e10cSrcweir // get a list of files from the folder of the URL 65cdf0e10cSrcweir // options: pExtension = 0 -> all, else this specific extension 66cdf0e10cSrcweir // pDateTime != 0 -> returns also the modified date/time of 67cdf0e10cSrcweir // the files in a SvPtrarr --> 68cdf0e10cSrcweir // !! objects must be deleted from the caller!! 69cdf0e10cSrcweir sal_Bool UCB_GetFileListOfFolder( const String& rURL, SvStrings& rList, 70cdf0e10cSrcweir const String* pExtension = 0, 71cdf0e10cSrcweir SvPtrarr* pDateTimeList = 0 ); 72cdf0e10cSrcweir 73cdf0e10cSrcweir // is the URL an existing file? 74cdf0e10cSrcweir SW_DLLPUBLIC sal_Bool UCB_IsFile( const String& rURL ); 75cdf0e10cSrcweir 76cdf0e10cSrcweir // is the URL a existing directory? 77cdf0e10cSrcweir sal_Bool UCB_IsDirectory( const String& rURL ); 78*56b35d86SArmin Le Grand 79*56b35d86SArmin Le Grand ///UUUU helper to check if fill style is set to color or bitmap 80*56b35d86SArmin Le Grand /// and thus formally used SvxBrushItem parts need to be mapped 81*56b35d86SArmin Le Grand /// for backwards compatibility 82*56b35d86SArmin Le Grand bool needToMapFillItemsToSvxBrushItemTypes(const SfxItemSet& rSet); 83*56b35d86SArmin Le Grand 84cdf0e10cSrcweir } 85cdf0e10cSrcweir 86cdf0e10cSrcweir #endif 87