bump product version to 7.2.5.1
[LibreOffice.git] / svx / source / gallery2 / gallerybinarystoragelocations.cxx
blobdc896f6c38116a66fcb4ade98b26e38a4f72c229
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 .
20 #include <svx/gallerybinarystoragelocations.hxx>
21 #include <svx/galmisc.hxx>
23 INetURLObject GalleryBinaryStorageLocations::ImplGetURLIgnoreCase(const INetURLObject& rURL)
25 INetURLObject aURL(rURL);
27 // check original file name
28 if (!FileExists(aURL))
30 // check upper case file name
31 aURL.setName(aURL.getName().toAsciiUpperCase());
33 if (!FileExists(aURL))
35 // check lower case file name
36 aURL.setName(aURL.getName().toAsciiLowerCase());
40 return aURL;
43 void GalleryBinaryStorageLocations::SetThmExtension(INetURLObject& aURL)
45 aURL.setExtension(u"thm");
46 maThmURL = ImplGetURLIgnoreCase(aURL);
49 void GalleryBinaryStorageLocations::SetSdgExtension(INetURLObject& aURL)
51 aURL.setExtension(u"sdg");
52 maSdgURL = ImplGetURLIgnoreCase(aURL);
55 void GalleryBinaryStorageLocations::SetSdvExtension(INetURLObject& aURL)
57 aURL.setExtension(u"sdv");
58 maSdvURL = ImplGetURLIgnoreCase(aURL);
61 void GalleryBinaryStorageLocations::SetStrExtension(INetURLObject& aURL)
63 aURL.setExtension(u"str");
64 maStrURL = ImplGetURLIgnoreCase(aURL);
67 void GalleryBinaryStorageLocations::SetStorageLocations(INetURLObject& rURL)
69 SetThmExtension(rURL);
70 SetSdgExtension(rURL);
71 SetSdvExtension(rURL);
72 SetStrExtension(rURL);
75 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */