Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
24f19e7e
Kaydet (Commit)
24f19e7e
authored
Eyl 24, 2002
tarafından
Kai Sommerfeld
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#102945# - Added support for new property "BaseURI".
üst
9d99bc95
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
140 additions
and
30 deletions
+140
-30
ContentProperties.cxx
ucb/source/ucp/webdav/ContentProperties.cxx
+27
-12
ContentProperties.hxx
ucb/source/ucp/webdav/ContentProperties.hxx
+14
-7
DAVRequestEnvironment.hxx
ucb/source/ucp/webdav/DAVRequestEnvironment.hxx
+2
-4
webdavcontent.cxx
ucb/source/ucp/webdav/webdavcontent.cxx
+65
-3
webdavcontent.hxx
ucb/source/ucp/webdav/webdavcontent.hxx
+4
-2
webdavcontentcaps.cxx
ucb/source/ucp/webdav/webdavcontentcaps.cxx
+28
-2
No files found.
ucb/source/ucp/webdav/ContentProperties.cxx
Dosyayı görüntüle @
24f19e7e
...
@@ -2,9 +2,9 @@
...
@@ -2,9 +2,9 @@
*
*
* $RCSfile: ContentProperties.cxx,v $
* $RCSfile: ContentProperties.cxx,v $
*
*
* $Revision: 1.
5
$
* $Revision: 1.
6
$
*
*
* last change: $Author: kso $ $Date: 2002-09-
16 14:37:0
9 $
* last change: $Author: kso $ $Date: 2002-09-
24 14:15:4
9 $
*
*
* The Contents of this file are made available subject to the terms of
* The Contents of this file are made available subject to the terms of
* either of the following licenses
* either of the following licenses
...
@@ -288,10 +288,7 @@ ContentProperties::ContentProperties( const DAVResource& rResource )
...
@@ -288,10 +288,7 @@ ContentProperties::ContentProperties( const DAVResource& rResource )
if
(
rResource
.
uri
.
getStr
()[
rResource
.
uri
.
getLength
()
-
1
]
if
(
rResource
.
uri
.
getStr
()[
rResource
.
uri
.
getLength
()
-
1
]
==
sal_Unicode
(
'/'
)
)
==
sal_Unicode
(
'/'
)
)
{
m_bTrailingSlash
=
sal_True
;
// if ( pIsFolder && *pIsFolder )
m_bTrailingSlash
=
sal_True
;
}
}
}
//=========================================================================
//=========================================================================
...
@@ -320,10 +317,11 @@ ContentProperties::ContentProperties( const rtl::OUString & rTitle )
...
@@ -320,10 +317,11 @@ ContentProperties::ContentProperties( const rtl::OUString & rTitle )
//=========================================================================
//=========================================================================
ContentProperties
::
ContentProperties
(
const
ContentProperties
&
rOther
)
ContentProperties
::
ContentProperties
(
const
ContentProperties
&
rOther
)
:
m_aEscapedTitle
(
rOther
.
m_aEscapedTitle
),
:
m_aEscapedTitle
(
rOther
.
m_aEscapedTitle
),
m_xProps
(
rOther
.
m_xProps
.
get
()
?
new
PropertyValueMap
(
*
rOther
.
m_xProps
)
:
new
PropertyValueMap
),
m_bTrailingSlash
(
rOther
.
m_bTrailingSlash
)
m_bTrailingSlash
(
rOther
.
m_bTrailingSlash
)
{
{
if
(
rOther
.
m_xProps
.
get
()
)
m_xProps
.
reset
(
new
PropertyValueMap
(
*
rOther
.
m_xProps
)
);
}
}
//=========================================================================
//=========================================================================
...
@@ -505,18 +503,27 @@ void ContentProperties::UCBNamesToHTTPNames(
...
@@ -505,18 +503,27 @@ void ContentProperties::UCBNamesToHTTPNames(
void
ContentProperties
::
getMappableHTTPHeaders
(
void
ContentProperties
::
getMappableHTTPHeaders
(
std
::
vector
<
rtl
::
OUString
>
&
rHeaderNames
)
std
::
vector
<
rtl
::
OUString
>
&
rHeaderNames
)
{
{
// -> DateModified
rHeaderNames
.
push_back
(
rHeaderNames
.
push_back
(
rtl
::
OUString
::
createFromAscii
(
"Last-Modified"
)
);
rtl
::
OUString
::
createFromAscii
(
"Last-Modified"
)
);
// -> MediaType
rHeaderNames
.
push_back
(
rHeaderNames
.
push_back
(
rtl
::
OUString
::
createFromAscii
(
"Content-Type"
)
);
rtl
::
OUString
::
createFromAscii
(
"Content-Type"
)
);
// -> Size
rHeaderNames
.
push_back
(
rHeaderNames
.
push_back
(
rtl
::
OUString
::
createFromAscii
(
"Content-Length"
)
);
rtl
::
OUString
::
createFromAscii
(
"Content-Length"
)
);
// -> BaseURI
rHeaderNames
.
push_back
(
rtl
::
OUString
::
createFromAscii
(
"Content-Location"
)
);
}
}
//=========================================================================
//=========================================================================
bool
ContentProperties
::
containsAllNames
(
bool
ContentProperties
::
containsAllNames
(
const
uno
::
Sequence
<
beans
::
Property
>&
rProps
,
const
uno
::
Sequence
<
beans
::
Property
>&
rProps
,
std
::
vector
<
rtl
::
OUString
>
&
rNamesNotContained
)
std
::
vector
<
rtl
::
OUString
>
&
rNamesNotContained
)
const
{
{
rNamesNotContained
.
clear
();
rNamesNotContained
.
clear
();
...
@@ -535,8 +542,9 @@ bool ContentProperties::containsAllNames(
...
@@ -535,8 +542,9 @@ bool ContentProperties::containsAllNames(
}
}
//=========================================================================
//=========================================================================
void
ContentProperties
::
add
(
const
std
::
vector
<
rtl
::
OUString
>
&
rProps
,
void
ContentProperties
::
addProperties
(
const
ContentProperties
&
rContentProps
)
const
std
::
vector
<
rtl
::
OUString
>
&
rProps
,
const
ContentProperties
&
rContentProps
)
{
{
std
::
vector
<
rtl
::
OUString
>::
const_iterator
it
=
rProps
.
begin
();
std
::
vector
<
rtl
::
OUString
>::
const_iterator
it
=
rProps
.
begin
();
std
::
vector
<
rtl
::
OUString
>::
const_iterator
end
=
rProps
.
end
();
std
::
vector
<
rtl
::
OUString
>::
const_iterator
end
=
rProps
.
end
();
...
@@ -559,3 +567,10 @@ void ContentProperties::add( const std::vector< rtl::OUString > & rProps,
...
@@ -559,3 +567,10 @@ void ContentProperties::add( const std::vector< rtl::OUString > & rProps,
}
}
}
}
//=========================================================================
void
ContentProperties
::
addProperty
(
const
rtl
::
OUString
&
rName
,
const
com
::
sun
::
star
::
uno
::
Any
&
rValue
)
{
(
*
m_xProps
)[
rName
]
=
rValue
;
}
ucb/source/ucp/webdav/ContentProperties.hxx
Dosyayı görüntüle @
24f19e7e
...
@@ -2,9 +2,9 @@
...
@@ -2,9 +2,9 @@
*
*
* $RCSfile: ContentProperties.hxx,v $
* $RCSfile: ContentProperties.hxx,v $
*
*
* $Revision: 1.
6
$
* $Revision: 1.
7
$
*
*
* last change: $Author: kso $ $Date: 2002-09-
18 16:01:07
$
* last change: $Author: kso $ $Date: 2002-09-
24 14:15:49
$
*
*
* The Contents of this file are made available subject to the terms of
* The Contents of this file are made available subject to the terms of
* either of the following licenses
* either of the following licenses
...
@@ -173,20 +173,27 @@ public:
...
@@ -173,20 +173,27 @@ public:
// return true, if all properties contained in rProps are contained in
// return true, if all properties contained in rProps are contained in
// this ContentProperties instance. Otherwiese, false will be returned.
// this ContentProperties instance. Otherwiese, false will be returned.
// rNamesNotContained contain the missing names.
// rNamesNotContained contain the missing names.
bool
containsAllNames
(
const
com
::
sun
::
star
::
uno
::
Sequence
<
bool
containsAllNames
(
com
::
sun
::
star
::
beans
::
Property
>&
rProps
,
const
com
::
sun
::
star
::
uno
::
Sequence
<
std
::
vector
<
rtl
::
OUString
>
&
rNamesNotContained
);
com
::
sun
::
star
::
beans
::
Property
>&
rProps
,
std
::
vector
<
rtl
::
OUString
>
&
rNamesNotContained
)
const
;
// adds all properties described by rProps that are actually contained in
// adds all properties described by rProps that are actually contained in
// rContentProps to this instance. In case of duplicates the value
// rContentProps to this instance. In case of duplicates the value
// already contained in this will left anchanged.
// already contained in this will left anchanged.
void
add
(
const
std
::
vector
<
rtl
::
OUString
>
&
rProps
,
void
addProperties
(
const
std
::
vector
<
rtl
::
OUString
>
&
rProps
,
const
ContentProperties
&
rContentProps
);
const
ContentProperties
&
rContentProps
);
// overwrites probably existing entry.
void
addProperty
(
const
rtl
::
OUString
&
rName
,
const
com
::
sun
::
star
::
uno
::
Any
&
rValue
);
bool
isTrailingSlash
()
const
{
return
m_bTrailingSlash
;
}
bool
isTrailingSlash
()
const
{
return
m_bTrailingSlash
;
}
const
rtl
::
OUString
&
getEscapedTitle
()
const
{
return
m_aEscapedTitle
;
}
const
rtl
::
OUString
&
getEscapedTitle
()
const
{
return
m_aEscapedTitle
;
}
// Not good to expose implementation details, but this is actually an
// internal class.
const
std
::
auto_ptr
<
PropertyValueMap
>
&
getProperties
()
const
const
std
::
auto_ptr
<
PropertyValueMap
>
&
getProperties
()
const
{
return
m_xProps
;
}
{
return
m_xProps
;
}
...
...
ucb/source/ucp/webdav/DAVRequestEnvironment.hxx
Dosyayı görüntüle @
24f19e7e
...
@@ -2,9 +2,9 @@
...
@@ -2,9 +2,9 @@
*
*
* $RCSfile: DAVRequestEnvironment.hxx,v $
* $RCSfile: DAVRequestEnvironment.hxx,v $
*
*
* $Revision: 1.
2
$
* $Revision: 1.
3
$
*
*
* last change: $Author: kso $ $Date: 2002-09-24 1
3:20:37
$
* last change: $Author: kso $ $Date: 2002-09-24 1
4:15:49
$
*
*
* The Contents of this file are made available subject to the terms of
* The Contents of this file are made available subject to the terms of
* either of the following licenses
* either of the following licenses
...
@@ -61,8 +61,6 @@
...
@@ -61,8 +61,6 @@
#ifndef _DAVREQUESTENVIRONMENT_HXX_
#ifndef _DAVREQUESTENVIRONMENT_HXX_
#define _DAVREQUESTENVIRONMENT_HXX_
#define _DAVREQUESTENVIRONMENT_HXX_
#include <memory>
#ifndef _RTL_REF_HXX_
#ifndef _RTL_REF_HXX_
#include <rtl/ref.hxx>
#include <rtl/ref.hxx>
#endif
#endif
...
...
ucb/source/ucp/webdav/webdavcontent.cxx
Dosyayı görüntüle @
24f19e7e
...
@@ -2,9 +2,9 @@
...
@@ -2,9 +2,9 @@
*
*
* $RCSfile: webdavcontent.cxx,v $
* $RCSfile: webdavcontent.cxx,v $
*
*
* $Revision: 1.3
5
$
* $Revision: 1.3
6
$
*
*
* last change: $Author: kso $ $Date: 2002-09-2
3 10:16:10
$
* last change: $Author: kso $ $Date: 2002-09-2
4 14:15:49
$
*
*
* The Contents of this file are made available subject to the terms of
* The Contents of this file are made available subject to the terms of
* either of the following licenses
* either of the following licenses
...
@@ -70,6 +70,9 @@
...
@@ -70,6 +70,9 @@
#ifndef _OSL_DIAGNOSE_H_
#ifndef _OSL_DIAGNOSE_H_
#include <osl/diagnose.h>
#include <osl/diagnose.h>
#endif
#endif
#ifndef _RTL_URI_HXX_
#include <rtl/uri.hxx>
#endif
#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPP_
#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPP_
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
...
@@ -1397,7 +1400,33 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
...
@@ -1397,7 +1400,33 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
if
(
!
xProps
->
containsAllNames
(
rProperties
,
aMissingProps
)
)
if
(
!
xProps
->
containsAllNames
(
rProperties
,
aMissingProps
)
)
{
{
// Add props contained in cache...
// Add props contained in cache...
xProps
->
add
(
aMissingProps
,
*
m_xCachedProps
);
xProps
->
addProperties
(
aMissingProps
,
*
m_xCachedProps
);
}
}
// Add BaseURI property, if requested.
if
(
!
xProps
->
contains
(
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"BaseURI"
)
)
)
)
{
sal_Int32
nCount
=
rProperties
.
getLength
();
if
(
nCount
)
{
const
beans
::
Property
*
pProps
=
rProperties
.
getConstArray
();
for
(
sal_Int32
n
=
0
;
n
<
nCount
;
++
n
)
{
const
rtl
::
OUString
&
rName
=
pProps
[
n
].
Name
;
if
(
rName
.
equalsAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
"BaseURI"
)
)
)
{
// BaseURI requested! Append value.
xProps
->
addProperty
(
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"BaseURI"
)
),
uno
::
makeAny
(
getBaseURI
()
)
);
break
;
}
}
}
}
}
}
...
@@ -2487,3 +2516,36 @@ void Content::cancelCommandExecution(
...
@@ -2487,3 +2516,36 @@ void Content::cancelCommandExecution(
// Unreachable
// Unreachable
}
}
//=========================================================================
const
rtl
::
OUString
Content
::
getBaseURI
()
{
// First, try to obtain value of response header "Content-Location".
if
(
m_xCachedProps
.
get
()
)
{
rtl
::
OUString
aLocation
;
m_xCachedProps
->
getValue
(
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"Content-Location"
)
)
)
>>=
aLocation
;
if
(
aLocation
.
getLength
()
)
{
#if 0
// @@@ rtl::Uri::convertRelToAbs not yet available, will be after release
// of 6.1 EA2.
try
{
// Do not use m_xIdentifier->getContentIdentifier() because it
// for example does not reflect redirects applied to requests
// done using the original URI but m_xResAccess' URI does.
return rtl::Uri::convertRelToAbs( m_xResAccess->getURL(),
aLocation );
}
catch ( rtl::MalformedUriException const & )
{
}
#endif
}
}
return
rtl
::
OUString
(
m_xResAccess
->
getURL
()
);
}
ucb/source/ucp/webdav/webdavcontent.hxx
Dosyayı görüntüle @
24f19e7e
...
@@ -2,9 +2,9 @@
...
@@ -2,9 +2,9 @@
*
*
* $RCSfile: webdavcontent.hxx,v $
* $RCSfile: webdavcontent.hxx,v $
*
*
* $Revision: 1.1
5
$
* $Revision: 1.1
6
$
*
*
* last change: $Author: kso $ $Date: 2002-09-
16 14:37:14
$
* last change: $Author: kso $ $Date: 2002-09-
24 14:15:50
$
*
*
* The Contents of this file are made available subject to the terms of
* The Contents of this file are made available subject to the terms of
* either of the following licenses
* either of the following licenses
...
@@ -164,6 +164,8 @@ private:
...
@@ -164,6 +164,8 @@ private:
const
::
com
::
sun
::
star
::
uno
::
Reference
<
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
ucb
::
XContentIdentifier
>&
xNewId
);
::
com
::
sun
::
star
::
ucb
::
XContentIdentifier
>&
xNewId
);
const
rtl
::
OUString
getBaseURI
();
// Command "insert"
// Command "insert"
void
insert
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
void
insert
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
io
::
XInputStream
>
&
xInputStream
,
::
com
::
sun
::
star
::
io
::
XInputStream
>
&
xInputStream
,
...
...
ucb/source/ucp/webdav/webdavcontentcaps.cxx
Dosyayı görüntüle @
24f19e7e
...
@@ -2,9 +2,9 @@
...
@@ -2,9 +2,9 @@
*
*
* $RCSfile: webdavcontentcaps.cxx,v $
* $RCSfile: webdavcontentcaps.cxx,v $
*
*
* $Revision: 1.1
1
$
* $Revision: 1.1
2
$
*
*
* last change: $Author: kso $ $Date: 2002-09-2
3 10:16:1
0 $
* last change: $Author: kso $ $Date: 2002-09-2
4 14:15:5
0 $
*
*
* The Contents of this file are made available subject to the terms of
* The Contents of this file are made available subject to the terms of
* either of the following licenses
* either of the following licenses
...
@@ -213,6 +213,14 @@ bool ContentProvider::getProperty(
...
@@ -213,6 +213,14 @@ bool ContentProvider::getProperty(
beans
::
PropertyAttribute
::
BOUND
beans
::
PropertyAttribute
::
BOUND
|
beans
::
PropertyAttribute
::
READONLY
)
);
|
beans
::
PropertyAttribute
::
READONLY
)
);
m_pProps
->
insert
(
beans
::
Property
(
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"BaseURI"
)
),
-
1
,
getCppuType
(
static_cast
<
const
rtl
::
OUString
*
>
(
0
)
),
beans
::
PropertyAttribute
::
BOUND
|
beans
::
PropertyAttribute
::
READONLY
)
);
// Standard DAV properties.
// Standard DAV properties.
m_pProps
->
insert
(
m_pProps
->
insert
(
...
@@ -384,6 +392,7 @@ uno::Sequence< beans::Property > Content::getProperties(
...
@@ -384,6 +392,7 @@ uno::Sequence< beans::Property > Content::getProperties(
sal_Bool
bHasIsDocument
=
sal_False
;
sal_Bool
bHasIsDocument
=
sal_False
;
sal_Bool
bHasIsFolder
=
sal_False
;
sal_Bool
bHasIsFolder
=
sal_False
;
sal_Bool
bHasTitle
=
sal_False
;
sal_Bool
bHasTitle
=
sal_False
;
sal_Bool
bHasBaseURI
=
sal_False
;
sal_Bool
bHasDateCreated
=
sal_False
;
sal_Bool
bHasDateCreated
=
sal_False
;
sal_Bool
bHasDateModified
=
sal_False
;
sal_Bool
bHasDateModified
=
sal_False
;
sal_Bool
bHasMediaType
=
sal_False
;
sal_Bool
bHasMediaType
=
sal_False
;
...
@@ -438,6 +447,12 @@ uno::Sequence< beans::Property > Content::getProperties(
...
@@ -438,6 +447,12 @@ uno::Sequence< beans::Property > Content::getProperties(
{
{
bHasTitle
=
sal_True
;
bHasTitle
=
sal_True
;
}
}
else
if
(
!
bHasBaseURI
&&
(
*
it
).
equalsAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
"BaseURI"
)
)
)
{
bHasBaseURI
=
sal_True
;
}
else
if
(
!
bHasDateCreated
&&
else
if
(
!
bHasDateCreated
&&
(
*
it
).
equalsAsciiL
(
(
*
it
).
equalsAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
"DateCreated"
)
)
)
RTL_CONSTASCII_STRINGPARAM
(
"DateCreated"
)
)
)
...
@@ -481,10 +496,21 @@ uno::Sequence< beans::Property > Content::getProperties(
...
@@ -481,10 +496,21 @@ uno::Sequence< beans::Property > Content::getProperties(
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"IsFolder"
)
)
);
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"IsFolder"
)
)
);
if
(
!
bHasTitle
)
if
(
!
bHasTitle
)
{
// Always present since it can be calculated from content's URI.
aPropSet
.
insert
(
aPropSet
.
insert
(
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"Title"
)
)
);
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"Title"
)
)
);
}
// Add optional properties.
// Add optional properties.
if
(
!
bHasBaseURI
)
{
// Always present since it can be calculated from content's URI.
aPropSet
.
insert
(
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"BaseURI"
)
)
);
}
if
(
!
bHasDateCreated
&&
bHasCreationDate
)
if
(
!
bHasDateCreated
&&
bHasCreationDate
)
aPropSet
.
insert
(
aPropSet
.
insert
(
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"DateCreated"
)
)
);
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"DateCreated"
)
)
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment