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
3591a6ed
Kaydet (Commit)
3591a6ed
authored
Agu 12, 2004
tarafından
Oliver Bolte
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
INTEGRATION: CWS unotlc (1.50.20); FILE MERGED
2004/08/04 12:21:41 mav 1.50.20.1: #i32418# vnd.sun.star.zip scheme
üst
4cf4d44c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
35 deletions
+39
-35
pkgcontent.cxx
ucb/source/ucp/package/pkgcontent.cxx
+39
-35
No files found.
ucb/source/ucp/package/pkgcontent.cxx
Dosyayı görüntüle @
3591a6ed
...
...
@@ -2,9 +2,9 @@
*
* $RCSfile: pkgcontent.cxx,v $
*
* $Revision: 1.5
0
$
* $Revision: 1.5
1
$
*
* last change: $Author:
kz $ $Date: 2004-05-19 16:42:56
$
* last change: $Author:
obo $ $Date: 2004-08-12 12:14:53
$
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
...
...
@@ -212,13 +212,13 @@ ContentProperties::ContentProperties( const rtl::OUString& rContentType )
bEncrypted
(
sal_False
),
bHasEncryptedEntries
(
sal_False
)
{
bIsFolder
=
rContentType
.
equalsAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
PACKAGE
_FOLDER_CONTENT_TYPE
)
);
bIsFolder
=
rContentType
.
equalsAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
PACKAGE_FOLDER_CONTENT_TYPE
)
)
||
rContentType
.
equalsAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
PACKAGE_ZIP
_FOLDER_CONTENT_TYPE
)
);
bIsDocument
=
!
bIsFolder
;
OSL_ENSURE
(
bIsFolder
||
rContentType
.
equalsAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
PACKAGE
_STREAM_CONTENT_TYPE
)
),
rContentType
.
equalsAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
PACKAGE_STREAM_CONTENT_TYPE
)
)
||
rContentType
.
equalsAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
PACKAGE_ZIP
_STREAM_CONTENT_TYPE
)
),
"ContentProperties::ContentProperties - Unknown type!"
);
}
...
...
@@ -272,15 +272,10 @@ Content* Content::create(
=
new
::
ucb
::
ContentIdentifier
(
rxSMgr
,
aURI
.
getUri
()
);
star
::
ucb
::
ContentInfo
aInfo
;
if
(
bFolder
)
aInfo
.
Type
=
rtl
::
OUString
::
createFromAscii
(
PACKAGE_FOLDER_CONTENT_TYPE
);
else
if
(
aURI
.
isRootFolder
()
)
aInfo
.
Type
=
rtl
::
OUString
::
createFromAscii
(
PACKAGE_FOLDER_CONTENT_TYPE
);
// root folder
if
(
bFolder
||
aURI
.
isRootFolder
()
)
aInfo
.
Type
=
GetContentType
(
aURI
.
getScheme
(),
sal_True
);
else
aInfo
.
Type
=
rtl
::
OUString
::
createFromAscii
(
PACKAGE_STREAM_CONTENT_TYPE
);
aInfo
.
Type
=
GetContentType
(
aURI
.
getScheme
(),
sal_False
);
return
new
Content
(
rxSMgr
,
pProvider
,
xId
,
xPackage
,
aURI
,
aInfo
);
}
...
...
@@ -297,13 +292,14 @@ Content* Content::create(
if
(
!
Info
.
Type
.
getLength
()
)
return
0
;
if
(
!
Info
.
Type
.
equalsAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
PACKAGE_FOLDER_CONTENT_TYPE
)
)
&&
!
Info
.
Type
.
equalsAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
PACKAGE_STREAM_CONTENT_TYPE
)
)
)
PackageUri
aURI
(
Identifier
->
getContentIdentifier
()
);
if
(
!
Info
.
Type
.
equalsIgnoreAsciiCase
(
GetContentType
(
aURI
.
getScheme
(),
sal_True
)
)
&&
!
Info
.
Type
.
equalsIgnoreAsciiCase
(
GetContentType
(
aURI
.
getScheme
(),
sal_False
)
)
)
return
0
;
PackageUri
aURI
(
Identifier
->
getContentIdentifier
()
);
uno
::
Reference
<
container
::
XHierarchicalNameAccess
>
xPackage
;
#if 0
...
...
@@ -319,6 +315,16 @@ Content* Content::create(
return
new
Content
(
rxSMgr
,
pProvider
,
xId
,
xPackage
,
aURI
,
Info
);
}
//=========================================================================
// static
::
rtl
::
OUString
Content
::
GetContentType
(
const
::
rtl
::
OUString
&
aScheme
,
sal_Bool
bFolder
)
{
return
(
rtl
::
OUString
::
createFromAscii
(
"application/"
)
+
aScheme
+
(
bFolder
?
rtl
::
OUString
::
createFromAscii
(
"-folder"
)
:
rtl
::
OUString
::
createFromAscii
(
"-stream"
)
)
);
}
//=========================================================================
Content
::
Content
(
const
uno
::
Reference
<
lang
::
XMultiServiceFactory
>&
rxSMgr
,
...
...
@@ -805,14 +811,14 @@ Content::queryCreatableContentsInfo()
// Folder.
aSeq
.
getArray
()[
0
].
Type
=
rtl
::
OUString
::
createFromAscii
(
PACKAGE_FOLDER_CONTENT_TYPE
);
=
GetContentType
(
m_aUri
.
getScheme
(),
sal_True
);
aSeq
.
getArray
()[
0
].
Attributes
=
star
::
ucb
::
ContentInfoAttribute
::
KIND_FOLDER
;
aSeq
.
getArray
()[
0
].
Properties
=
aProps
;
// Stream.
aSeq
.
getArray
()[
1
].
Type
=
rtl
::
OUString
::
createFromAscii
(
PACKAGE_STREAM_CONTENT_TYPE
);
=
GetContentType
(
m_aUri
.
getScheme
(),
sal_False
);
aSeq
.
getArray
()[
1
].
Attributes
=
star
::
ucb
::
ContentInfoAttribute
::
INSERT_WITH_INPUTSTREAM
|
star
::
ucb
::
ContentInfoAttribute
::
KIND_DOCUMENT
;
...
...
@@ -842,17 +848,17 @@ Content::createNewContent( const star::ucb::ContentInfo& Info )
if
(
!
Info
.
Type
.
getLength
()
)
return
uno
::
Reference
<
star
::
ucb
::
XContent
>
();
if
(
!
Info
.
Type
.
equals
AsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
PACKAGE_FOLDER_CONTENT_TYPE
)
)
&&
!
Info
.
Type
.
equals
AsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
PACKAGE_STREAM_CONTENT_TYPE
)
)
)
if
(
!
Info
.
Type
.
equals
IgnoreAsciiCase
(
GetContentType
(
m_aUri
.
getScheme
(),
sal_True
)
)
&&
!
Info
.
Type
.
equals
IgnoreAsciiCase
(
GetContentType
(
m_aUri
.
getScheme
(),
sal_False
)
)
)
return
uno
::
Reference
<
star
::
ucb
::
XContent
>
();
rtl
::
OUString
aURL
=
m_aUri
.
getUri
();
aURL
+=
rtl
::
OUString
::
createFromAscii
(
"/"
);
if
(
Info
.
Type
.
equals
AsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
PACKAGE_FOLDER_CONTENT_TYPE
)
)
)
if
(
Info
.
Type
.
equals
IgnoreAsciiCase
(
GetContentType
(
m_aUri
.
getScheme
(),
sal_True
)
)
)
aURL
+=
rtl
::
OUString
::
createFromAscii
(
"New_Folder"
);
else
aURL
+=
rtl
::
OUString
::
createFromAscii
(
"New_Stream"
);
...
...
@@ -1944,8 +1950,8 @@ void Content::transfer(
// Is source a package content?
if
(
(
rInfo
.
SourceURL
.
getLength
()
==
0
)
||
(
rInfo
.
SourceURL
.
compareTo
Ascii
(
PACKAGE_URL_SCHEME
"://"
,
PACKAGE_URL_SCHEME_LENGTH
+
3
)
!=
0
)
)
(
rInfo
.
SourceURL
.
compareTo
(
m_aUri
.
getUri
()
,
PACKAGE_URL_SCHEME_LENGTH
+
3
)
!=
0
)
)
{
ucbhelper
::
cancelCommandExecution
(
uno
::
makeAny
(
star
::
ucb
::
InteractiveBadTransferURLException
(
...
...
@@ -2027,8 +2033,8 @@ void Content::transfer(
//////////////////////////////////////////////////////////////////////
rtl
::
OUString
aType
=
xSource
->
isFolder
()
?
rtl
::
OUString
::
createFromAscii
(
PACKAGE_FOLDER_CONTENT_TYPE
)
:
rtl
::
OUString
::
createFromAscii
(
PACKAGE_STREAM_CONTENT_TYPE
);
?
GetContentType
(
m_aUri
.
getScheme
(),
sal_True
)
:
GetContentType
(
m_aUri
.
getScheme
(),
sal_False
);
star
::
ucb
::
ContentInfo
aInfo
;
aInfo
.
Type
=
aType
;
aInfo
.
Attributes
=
0
;
...
...
@@ -2508,16 +2514,14 @@ sal_Bool Content::loadData(
if
(
xEnumAccess
.
is
()
)
{
// folder
rProps
.
aContentType
=
rtl
::
OUString
::
createFromAscii
(
PACKAGE_FOLDER_CONTENT_TYPE
);
rProps
.
aContentType
=
GetContentType
(
rURI
.
getScheme
(),
sal_True
);
rProps
.
bIsDocument
=
sal_False
;
rProps
.
bIsFolder
=
sal_True
;
}
else
{
// stream
rProps
.
aContentType
=
rtl
::
OUString
::
createFromAscii
(
PACKAGE_STREAM_CONTENT_TYPE
);
rProps
.
aContentType
=
GetContentType
(
rURI
.
getScheme
(),
sal_False
);
rProps
.
bIsDocument
=
sal_True
;
rProps
.
bIsFolder
=
sal_False
;
}
...
...
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