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
2349c6a4
Kaydet (Commit)
2349c6a4
authored
Haz 28, 2012
tarafından
Cédric Bosdonnat
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
CMIS UCP: strings coming from libcmis are UTF-8, not ascii
Change-Id: Ieb906b8acb677bfc74abc35abb06312704887b66
üst
1eed4c83
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
10 deletions
+13
-10
cmis_content.cxx
ucb/source/ucp/cmis/cmis_content.cxx
+10
-9
cmis_datasupplier.cxx
ucb/source/ucp/cmis/cmis_datasupplier.cxx
+3
-1
No files found.
ucb/source/ucp/cmis/cmis_content.cxx
Dosyayı görüntüle @
2349c6a4
...
...
@@ -64,6 +64,7 @@
#include "cmis_resultset.hxx"
#define OUSTR_TO_STDSTR(s) string( rtl::OUStringToOString( s, RTL_TEXTENCODING_UTF8 ).getStr() )
#define STD_TO_OUSTR( str ) rtl::OUString( str.c_str(), str.length( ), RTL_TEXTENCODING_UTF8 )
using
namespace
com
::
sun
::
star
;
using
namespace
std
;
...
...
@@ -98,8 +99,8 @@ namespace
rtl
::
Reference
<
ucbhelper
::
SimpleAuthenticationRequest
>
xRequest
=
new
ucbhelper
::
SimpleAuthenticationRequest
(
m_sUrl
,
m_sBindingUrl
,
::
rtl
::
OUString
(),
rtl
::
OUString
::
createFromAscii
(
username
.
c_str
(
)
),
rtl
::
OUString
::
createFromAscii
(
password
.
c_str
(
)
),
STD_TO_OUSTR
(
username
),
STD_TO_OUSTR
(
password
),
::
rtl
::
OUString
(),
true
,
false
);
xIH
->
handle
(
xRequest
.
get
()
);
...
...
@@ -300,7 +301,7 @@ namespace cmis
{
rtl
::
OUString
sTitle
;
if
(
getObject
().
get
()
)
sTitle
=
rtl
::
OUString
::
createFromAscii
(
getObject
()
->
getName
().
c_str
(
)
);
sTitle
=
STD_TO_OUSTR
(
getObject
()
->
getName
(
)
);
else
if
(
m_pObjectProps
.
size
()
>
0
)
{
map
<
string
,
libcmis
::
PropertyPtr
>::
iterator
it
=
m_pObjectProps
.
find
(
"cmis:name"
);
...
...
@@ -308,7 +309,7 @@ namespace cmis
{
vector
<
string
>
values
=
it
->
second
->
getStrings
(
);
if
(
values
.
size
()
>
0
)
sTitle
=
rtl
::
OUString
::
createFromAscii
(
values
.
front
(
).
c_str
(
)
);
sTitle
=
STD_TO_OUSTR
(
values
.
front
(
)
);
}
}
...
...
@@ -343,7 +344,7 @@ namespace cmis
else
path
=
getObject
()
->
getName
(
);
xRow
->
appendString
(
rProp
,
rtl
::
OUString
::
createFromAscii
(
path
.
c_str
()
)
);
xRow
->
appendString
(
rProp
,
STD_TO_OUSTR
(
path
)
);
}
else
xRow
->
appendVoid
(
rProp
);
...
...
@@ -557,7 +558,7 @@ namespace cmis
try
{
object
=
m_pSession
->
getObjectByPath
(
newPath
);
sNewPath
=
rtl
::
OUString
::
createFromAscii
(
newPath
.
c_str
(
)
);
sNewPath
=
STD_TO_OUSTR
(
newPath
);
}
catch
(
const
libcmis
::
Exception
&
)
{
...
...
@@ -594,7 +595,7 @@ namespace cmis
if
(
bIsFolder
)
{
libcmis
::
FolderPtr
pNew
=
pFolder
->
createFolder
(
m_pObjectProps
);
sNewPath
=
rtl
::
OUString
::
createFromAscii
(
newPath
.
c_str
(
)
);
sNewPath
=
STD_TO_OUSTR
(
newPath
);
}
else
{
...
...
@@ -602,7 +603,7 @@ namespace cmis
uno
::
Reference
<
io
::
XOutputStream
>
xOutput
=
new
ucbhelper
::
StdOutputStream
(
pOut
);
copyData
(
xInputStream
,
xOutput
);
libcmis
::
DocumentPtr
pNew
=
pFolder
->
createDocument
(
m_pObjectProps
,
pOut
,
string
()
);
sNewPath
=
rtl
::
OUString
::
createFromAscii
(
newPath
.
c_str
(
)
);
sNewPath
=
STD_TO_OUSTR
(
newPath
);
}
}
...
...
@@ -899,7 +900,7 @@ namespace cmis
if
(
!
parentPath
.
empty
()
)
{
URL
aUrl
(
m_sURL
);
aUrl
.
setObjectPath
(
rtl
::
OUString
::
createFromAscii
(
parentPath
.
c_str
(
)
)
);
aUrl
.
setObjectPath
(
STD_TO_OUSTR
(
parentPath
)
);
sRet
=
aUrl
.
asString
(
);
}
...
...
ucb/source/ucp/cmis/cmis_datasupplier.cxx
Dosyayı görüntüle @
2349c6a4
...
...
@@ -18,6 +18,8 @@
#include "cmis_content.hxx"
#include "cmis_provider.hxx"
#define STD_TO_OUSTR( str ) rtl::OUString( str.c_str(), str.length( ), RTL_TEXTENCODING_UTF8 )
using
namespace
com
::
sun
::
star
;
using
namespace
std
;
...
...
@@ -98,7 +100,7 @@ namespace cmis
// Get the URL from the Path
URL
aUrl
(
mxContent
->
getIdentifier
(
)
->
getContentIdentifier
(
)
);
aUrl
.
setObjectPath
(
rtl
::
OUString
::
createFromAscii
(
sObjectPath
.
c_str
(
)
)
);
aUrl
.
setObjectPath
(
STD_TO_OUSTR
(
sObjectPath
)
);
rtl
::
OUString
aId
=
aUrl
.
asString
(
);
maResults
[
nIndex
]
->
aId
=
aId
;
...
...
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