LibreOffice Module svx (master)
1
svx
source
gallery2
gallerystoragelocations.cxx
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
20
#include <
gallerystoragelocations.hxx
>
21
#include <
svx/galmisc.hxx
>
22
23
INetURLObject
GalleryStorageLocations::ImplGetURLIgnoreCase
(
const
INetURLObject
& rURL)
24
{
25
INetURLObject
aURL
(rURL);
26
27
// check original file name
28
if
(!
FileExists
(
aURL
))
29
{
30
// check upper case file name
31
aURL
.setName(
aURL
.getName().toAsciiUpperCase());
32
33
if
(!
FileExists
(
aURL
))
34
{
35
// check lower case file name
36
aURL
.setName(
aURL
.getName().toAsciiLowerCase());
37
}
38
}
39
40
return
aURL
;
41
}
42
43
void
GalleryStorageLocations::SetThmExtension
(
INetURLObject
& aURL)
44
{
45
aURL
.setExtension(
u
"thm"
);
46
maThmURL
=
ImplGetURLIgnoreCase
(
aURL
);
47
}
48
49
void
GalleryStorageLocations::SetSdgExtension
(
INetURLObject
& aURL)
50
{
51
aURL
.setExtension(
u
"sdg"
);
52
maSdgURL
=
ImplGetURLIgnoreCase
(
aURL
);
53
}
54
55
void
GalleryStorageLocations::SetSdvExtension
(
INetURLObject
& aURL)
56
{
57
aURL
.setExtension(
u
"sdv"
);
58
maSdvURL
=
ImplGetURLIgnoreCase
(
aURL
);
59
}
60
61
void
GalleryStorageLocations::SetStrExtension
(
INetURLObject
& aURL)
62
{
63
aURL
.setExtension(
u
"str"
);
64
maStrURL
=
ImplGetURLIgnoreCase
(
aURL
);
65
}
66
67
void
GalleryStorageLocations::SetStorageLocations
(
INetURLObject
& rURL)
68
{
69
SetThmExtension
(rURL);
70
SetSdgExtension
(rURL);
71
SetSdvExtension
(rURL);
72
SetStrExtension
(rURL);
73
}
74
75
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
GalleryStorageLocations::SetSdvExtension
void SetSdvExtension(INetURLObject &aURL)
Definition:
gallerystoragelocations.cxx:55
GalleryStorageLocations::maSdgURL
INetURLObject maSdgURL
Definition:
gallerystoragelocations.hxx:29
GalleryStorageLocations::maStrURL
INetURLObject maStrURL
Definition:
gallerystoragelocations.hxx:31
GalleryStorageLocations::maSdvURL
INetURLObject maSdvURL
Definition:
gallerystoragelocations.hxx:30
GalleryStorageLocations::maThmURL
INetURLObject maThmURL
Definition:
gallerystoragelocations.hxx:28
GalleryStorageLocations::ImplGetURLIgnoreCase
static INetURLObject ImplGetURLIgnoreCase(const INetURLObject &rURL)
Definition:
gallerystoragelocations.cxx:23
GalleryStorageLocations::SetSdgExtension
void SetSdgExtension(INetURLObject &aURL)
Definition:
gallerystoragelocations.cxx:49
GalleryStorageLocations::SetThmExtension
void SetThmExtension(INetURLObject &aURL)
Definition:
gallerystoragelocations.cxx:43
GalleryStorageLocations::SetStorageLocations
void SetStorageLocations(INetURLObject &aURL)
Definition:
gallerystoragelocations.cxx:67
GalleryStorageLocations::SetStrExtension
void SetStrExtension(INetURLObject &aURL)
Definition:
gallerystoragelocations.cxx:61
INetURLObject
aURL
URL aURL
u
float u
FileExists
static bool FileExists(const INetURLObject &rURL, std::u16string_view rExt)
Definition:
galleryfilestorageentry.cxx:31
gallerystoragelocations.hxx
galmisc.hxx
Generated on Sun Jul 30 2023 04:28:08 for LibreOffice Module svx (master) by
1.9.3