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
6fe84df4
Kaydet (Commit)
6fe84df4
authored
Haz 28, 2012
tarafından
Cédric Bosdonnat
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
CMIS UCP: fixed save as which was broken by bad exceptions catching
Change-Id: I81bb45279b23d0c8d77f8e7aa366d038efa13d89
üst
64040dbb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
30 deletions
+50
-30
cmis_content.cxx
ucb/source/ucp/cmis/cmis_content.cxx
+50
-30
No files found.
ucb/source/ucp/cmis/cmis_content.cxx
Dosyayı görüntüle @
6fe84df4
...
@@ -276,41 +276,56 @@ namespace cmis
...
@@ -276,41 +276,56 @@ namespace cmis
for
(
sal_Int32
n
=
0
;
n
<
nProps
;
++
n
)
for
(
sal_Int32
n
=
0
;
n
<
nProps
;
++
n
)
{
{
const
beans
::
Property
&
rProp
=
pProps
[
n
];
try
try
{
{
const
beans
::
Property
&
rProp
=
pProps
[
n
];
if
(
rProp
.
Name
==
"IsDocument"
)
if
(
rProp
.
Name
==
"IsDocument"
)
{
{
if
(
getObject
(
).
get
(
)
)
try
{
xRow
->
appendBoolean
(
rProp
,
getObject
()
->
getBaseType
(
)
==
"cmis:document"
);
xRow
->
appendBoolean
(
rProp
,
getObject
()
->
getBaseType
(
)
==
"cmis:document"
);
else
if
(
m_pObjectType
.
get
(
)
)
}
xRow
->
appendBoolean
(
rProp
,
m_pObjectType
->
getBaseType
()
->
getId
(
)
==
"cmis:document"
);
catch
(
const
libcmis
::
Exception
&
)
else
{
xRow
->
appendVoid
(
rProp
);
if
(
m_pObjectType
.
get
(
)
)
xRow
->
appendBoolean
(
rProp
,
m_pObjectType
->
getBaseType
()
->
getId
(
)
==
"cmis:document"
);
else
xRow
->
appendVoid
(
rProp
);
}
}
}
else
if
(
rProp
.
Name
==
"IsFolder"
)
else
if
(
rProp
.
Name
==
"IsFolder"
)
{
{
if
(
getObject
(
).
get
(
)
)
try
{
xRow
->
appendBoolean
(
rProp
,
getObject
()
->
getBaseType
(
)
==
"cmis:folder"
);
xRow
->
appendBoolean
(
rProp
,
getObject
()
->
getBaseType
(
)
==
"cmis:folder"
);
else
if
(
m_pObjectType
.
get
(
)
)
}
xRow
->
appendBoolean
(
rProp
,
m_pObjectType
->
getBaseType
()
->
getId
(
)
==
"cmis:folder"
);
catch
(
const
libcmis
::
Exception
&
)
else
{
xRow
->
appendVoid
(
rProp
);
if
(
m_pObjectType
.
get
(
)
)
xRow
->
appendBoolean
(
rProp
,
m_pObjectType
->
getBaseType
()
->
getId
(
)
==
"cmis:folder"
);
else
xRow
->
appendVoid
(
rProp
);
}
}
}
else
if
(
rProp
.
Name
==
"Title"
)
else
if
(
rProp
.
Name
==
"Title"
)
{
{
rtl
::
OUString
sTitle
;
rtl
::
OUString
sTitle
;
if
(
getObject
().
get
()
)
try
{
sTitle
=
STD_TO_OUSTR
(
getObject
()
->
getName
()
);
sTitle
=
STD_TO_OUSTR
(
getObject
()
->
getName
()
);
else
if
(
m_pObjectProps
.
size
()
>
0
)
}
catch
(
const
libcmis
::
Exception
&
)
{
{
map
<
string
,
libcmis
::
PropertyPtr
>::
iterator
it
=
m_pObjectProps
.
find
(
"cmis:name"
);
if
(
m_pObjectProps
.
size
()
>
0
)
if
(
it
!=
m_pObjectProps
.
end
(
)
)
{
{
vector
<
string
>
values
=
it
->
second
->
getStrings
(
);
map
<
string
,
libcmis
::
PropertyPtr
>::
iterator
it
=
m_pObjectProps
.
find
(
"cmis:name"
);
if
(
values
.
size
()
>
0
)
if
(
it
!=
m_pObjectProps
.
end
(
)
)
sTitle
=
STD_TO_OUSTR
(
values
.
front
(
)
);
{
vector
<
string
>
values
=
it
->
second
->
getStrings
(
);
if
(
values
.
size
()
>
0
)
sTitle
=
STD_TO_OUSTR
(
values
.
front
(
)
);
}
}
}
}
}
...
@@ -337,7 +352,7 @@ namespace cmis
...
@@ -337,7 +352,7 @@ namespace cmis
else
if
(
rProp
.
Name
==
"TitleOnServer"
)
else
if
(
rProp
.
Name
==
"TitleOnServer"
)
{
{
string
path
;
string
path
;
if
(
getObject
().
get
(
)
)
try
{
{
vector
<
string
>
paths
=
getObject
(
)
->
getPaths
(
);
vector
<
string
>
paths
=
getObject
(
)
->
getPaths
(
);
if
(
paths
.
size
(
)
>
0
)
if
(
paths
.
size
(
)
>
0
)
...
@@ -347,8 +362,10 @@ namespace cmis
...
@@ -347,8 +362,10 @@ namespace cmis
xRow
->
appendString
(
rProp
,
STD_TO_OUSTR
(
path
)
);
xRow
->
appendString
(
rProp
,
STD_TO_OUSTR
(
path
)
);
}
}
else
catch
(
const
libcmis
::
Exception
&
)
{
xRow
->
appendVoid
(
rProp
);
xRow
->
appendVoid
(
rProp
);
}
}
}
else
if
(
rProp
.
Name
==
"IsReadOnly"
)
else
if
(
rProp
.
Name
==
"IsReadOnly"
)
{
{
...
@@ -371,11 +388,18 @@ namespace cmis
...
@@ -371,11 +388,18 @@ namespace cmis
}
}
else
if
(
rProp
.
Name
==
"Size"
)
else
if
(
rProp
.
Name
==
"Size"
)
{
{
libcmis
::
Document
*
document
=
dynamic_cast
<
libcmis
::
Document
*
>
(
getObject
().
get
(
)
);
try
if
(
NULL
!=
document
)
{
xRow
->
appendLong
(
rProp
,
document
->
getContentLength
()
);
libcmis
::
Document
*
document
=
dynamic_cast
<
libcmis
::
Document
*
>
(
getObject
().
get
(
)
);
else
if
(
NULL
!=
document
)
xRow
->
appendLong
(
rProp
,
document
->
getContentLength
()
);
else
xRow
->
appendVoid
(
rProp
);
}
catch
(
const
libcmis
::
Exception
&
)
{
xRow
->
appendVoid
(
rProp
);
xRow
->
appendVoid
(
rProp
);
}
}
}
else
if
(
rProp
.
Name
==
"CreatableContentsInfo"
)
else
if
(
rProp
.
Name
==
"CreatableContentsInfo"
)
{
{
...
@@ -386,11 +410,7 @@ namespace cmis
...
@@ -386,11 +410,7 @@ namespace cmis
}
}
catch
(
const
libcmis
::
Exception
&
e
)
catch
(
const
libcmis
::
Exception
&
e
)
{
{
ucbhelper
::
cancelCommandExecution
(
xRow
->
appendVoid
(
rProp
);
ucb
::
IOErrorCode_GENERAL
,
uno
::
Sequence
<
uno
::
Any
>
(
0
),
xEnv
,
rtl
::
OUString
::
createFromAscii
(
e
.
what
()
)
);
}
}
}
}
...
...
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