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
82eb8062
Kaydet (Commit)
82eb8062
authored
Agu 15, 2011
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
catch by const reference
üst
e0225e7e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
62 additions
and
62 deletions
+62
-62
DocumentMetadataAccess.cxx
sfx2/source/doc/DocumentMetadataAccess.cxx
+42
-42
SfxDocumentMetaData.cxx
sfx2/source/doc/SfxDocumentMetaData.cxx
+20
-20
No files found.
sfx2/source/doc/DocumentMetadataAccess.cxx
Dosyayı görüntüle @
82eb8062
...
@@ -325,9 +325,9 @@ addFile(struct DocumentMetadataAccess_Impl & i_rImpl,
...
@@ -325,9 +325,9 @@ addFile(struct DocumentMetadataAccess_Impl & i_rImpl,
(
*
i_pTypes
)[
i
].
get
());
(
*
i_pTypes
)[
i
].
get
());
}
}
}
}
}
catch
(
uno
::
RuntimeException
&
)
{
}
catch
(
const
uno
::
RuntimeException
&
)
{
throw
;
throw
;
}
catch
(
uno
::
Exception
&
e
)
{
}
catch
(
const
uno
::
Exception
&
e
)
{
throw
lang
::
WrappedTargetRuntimeException
(
throw
lang
::
WrappedTargetRuntimeException
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"addFile: exception"
)),
/*this*/
0
,
uno
::
makeAny
(
e
));
"addFile: exception"
)),
/*this*/
0
,
uno
::
makeAny
(
e
));
...
@@ -374,9 +374,9 @@ removeFile(struct DocumentMetadataAccess_Impl & i_rImpl,
...
@@ -374,9 +374,9 @@ removeFile(struct DocumentMetadataAccess_Impl & i_rImpl,
i_xPart
.
get
());
i_xPart
.
get
());
i_rImpl
.
m_xManifest
->
removeStatements
(
i_xPart
.
get
(),
i_rImpl
.
m_xManifest
->
removeStatements
(
i_xPart
.
get
(),
getURI
<
rdf
::
URIs
::
RDF_TYPE
>
(
i_rImpl
.
m_xContext
),
0
);
getURI
<
rdf
::
URIs
::
RDF_TYPE
>
(
i_rImpl
.
m_xContext
),
0
);
}
catch
(
uno
::
RuntimeException
&
)
{
}
catch
(
const
uno
::
RuntimeException
&
)
{
throw
;
throw
;
}
catch
(
uno
::
Exception
&
e
)
{
}
catch
(
const
uno
::
Exception
&
e
)
{
throw
lang
::
WrappedTargetRuntimeException
(
throw
lang
::
WrappedTargetRuntimeException
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"removeFile: exception"
)),
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"removeFile: exception"
)),
0
,
uno
::
makeAny
(
e
));
0
,
uno
::
makeAny
(
e
));
...
@@ -403,9 +403,9 @@ getAllParts(struct DocumentMetadataAccess_Impl & i_rImpl)
...
@@ -403,9 +403,9 @@ getAllParts(struct DocumentMetadataAccess_Impl & i_rImpl)
ret
.
push_back
(
xPart
);
ret
.
push_back
(
xPart
);
}
}
return
ret
;
return
ret
;
}
catch
(
uno
::
RuntimeException
&
)
{
}
catch
(
const
uno
::
RuntimeException
&
)
{
throw
;
throw
;
}
catch
(
uno
::
Exception
&
e
)
{
}
catch
(
const
uno
::
Exception
&
e
)
{
throw
lang
::
WrappedTargetRuntimeException
(
throw
lang
::
WrappedTargetRuntimeException
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"getAllParts: exception"
)),
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"getAllParts: exception"
)),
0
,
uno
::
makeAny
(
e
));
0
,
uno
::
makeAny
(
e
));
...
@@ -425,9 +425,9 @@ isPartOfType(struct DocumentMetadataAccess_Impl & i_rImpl,
...
@@ -425,9 +425,9 @@ isPartOfType(struct DocumentMetadataAccess_Impl & i_rImpl,
i_xType
.
get
()),
i_xType
.
get
()),
uno
::
UNO_SET_THROW
);
uno
::
UNO_SET_THROW
);
return
(
xEnum
->
hasMoreElements
());
return
(
xEnum
->
hasMoreElements
());
}
catch
(
uno
::
RuntimeException
&
)
{
}
catch
(
const
uno
::
RuntimeException
&
)
{
throw
;
throw
;
}
catch
(
uno
::
Exception
&
e
)
{
}
catch
(
const
uno
::
Exception
&
e
)
{
throw
lang
::
WrappedTargetRuntimeException
(
throw
lang
::
WrappedTargetRuntimeException
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"isPartOfType: exception"
)),
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"isPartOfType: exception"
)),
0
,
uno
::
makeAny
(
e
));
0
,
uno
::
makeAny
(
e
));
...
@@ -518,7 +518,7 @@ collectFilesFromStorage(uno::Reference<embed::XStorage> const& i_xStorage,
...
@@ -518,7 +518,7 @@ collectFilesFromStorage(uno::Reference<embed::XStorage> const& i_xStorage,
{
{
o_rFiles
.
insert
(
i_Path
+
styles
);
o_rFiles
.
insert
(
i_Path
+
styles
);
}
}
}
catch
(
uno
::
Exception
&
)
{
}
catch
(
const
uno
::
Exception
&
)
{
OSL_TRACE
(
"collectFilesFromStorage: exception?"
);
OSL_TRACE
(
"collectFilesFromStorage: exception?"
);
}
}
}
}
...
@@ -571,7 +571,7 @@ readStream(struct DocumentMetadataAccess_Impl & i_rImpl,
...
@@ -571,7 +571,7 @@ readStream(struct DocumentMetadataAccess_Impl & i_rImpl,
"refusing to recurse into embedded document"
);
"refusing to recurse into embedded document"
);
return
;
return
;
}
}
}
catch
(
uno
::
Exception
&
)
{
}
}
catch
(
const
uno
::
Exception
&
)
{
}
::
rtl
::
OUStringBuffer
buf
(
i_rBaseURI
);
::
rtl
::
OUStringBuffer
buf
(
i_rBaseURI
);
buf
.
append
(
dir
).
append
(
static_cast
<
sal_Unicode
>
(
'/'
));
buf
.
append
(
dir
).
append
(
static_cast
<
sal_Unicode
>
(
'/'
));
readStream
(
i_rImpl
,
xDir
,
rest
,
buf
.
makeStringAndClear
()
);
readStream
(
i_rImpl
,
xDir
,
rest
,
buf
.
makeStringAndClear
()
);
...
@@ -581,13 +581,13 @@ readStream(struct DocumentMetadataAccess_Impl & i_rImpl,
...
@@ -581,13 +581,13 @@ readStream(struct DocumentMetadataAccess_Impl & i_rImpl,
ucb
::
IOErrorCode_NO_DIRECTORY
,
i_rBaseURI
+
dir
,
dir
);
ucb
::
IOErrorCode_NO_DIRECTORY
,
i_rBaseURI
+
dir
,
dir
);
}
}
}
}
}
catch
(
container
::
NoSuchElementException
&
e
)
{
}
catch
(
con
st
con
tainer
::
NoSuchElementException
&
e
)
{
throw
mkException
(
e
.
Message
,
ucb
::
IOErrorCode_NOT_EXISTING_PATH
,
throw
mkException
(
e
.
Message
,
ucb
::
IOErrorCode_NOT_EXISTING_PATH
,
i_rBaseURI
+
i_rPath
,
i_rPath
);
i_rBaseURI
+
i_rPath
,
i_rPath
);
}
catch
(
io
::
IOException
&
e
)
{
}
catch
(
const
io
::
IOException
&
e
)
{
throw
mkException
(
e
.
Message
,
ucb
::
IOErrorCode_CANT_READ
,
throw
mkException
(
e
.
Message
,
ucb
::
IOErrorCode_CANT_READ
,
i_rBaseURI
+
i_rPath
,
i_rPath
);
i_rBaseURI
+
i_rPath
,
i_rPath
);
}
catch
(
rdf
::
ParseException
&
e
)
{
}
catch
(
const
rdf
::
ParseException
&
e
)
{
throw
mkException
(
e
.
Message
,
ucb
::
IOErrorCode_WRONG_FORMAT
,
throw
mkException
(
e
.
Message
,
ucb
::
IOErrorCode_WRONG_FORMAT
,
i_rBaseURI
+
i_rPath
,
i_rPath
);
i_rBaseURI
+
i_rPath
,
i_rPath
);
}
}
...
@@ -604,11 +604,11 @@ importFile(struct DocumentMetadataAccess_Impl & i_rImpl,
...
@@ -604,11 +604,11 @@ importFile(struct DocumentMetadataAccess_Impl & i_rImpl,
retry
:
retry
:
try
{
try
{
readStream
(
i_rImpl
,
i_xStorage
,
i_rPath
,
i_rBaseURI
);
readStream
(
i_rImpl
,
i_xStorage
,
i_rPath
,
i_rBaseURI
);
}
catch
(
ucb
::
InteractiveAugmentedIOException
&
e
)
{
}
catch
(
const
ucb
::
InteractiveAugmentedIOException
&
e
)
{
if
(
handleError
(
e
,
i_xHandler
))
goto
retry
;
if
(
handleError
(
e
,
i_xHandler
))
goto
retry
;
}
catch
(
uno
::
RuntimeException
&
)
{
}
catch
(
const
uno
::
RuntimeException
&
)
{
throw
;
throw
;
}
catch
(
uno
::
Exception
&
e
)
{
}
catch
(
const
uno
::
Exception
&
e
)
{
throw
lang
::
WrappedTargetRuntimeException
(
throw
lang
::
WrappedTargetRuntimeException
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"importFile: exception"
)),
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"importFile: exception"
)),
0
,
uno
::
makeAny
(
e
));
0
,
uno
::
makeAny
(
e
));
...
@@ -673,7 +673,7 @@ writeStream(struct DocumentMetadataAccess_Impl & i_rImpl,
...
@@ -673,7 +673,7 @@ writeStream(struct DocumentMetadataAccess_Impl & i_rImpl,
"refusing to recurse into embedded document"
);
"refusing to recurse into embedded document"
);
return
;
return
;
}
}
}
catch
(
uno
::
Exception
&
)
{
}
}
catch
(
const
uno
::
Exception
&
)
{
}
::
rtl
::
OUStringBuffer
buf
(
i_rBaseURI
);
::
rtl
::
OUStringBuffer
buf
(
i_rBaseURI
);
buf
.
append
(
dir
).
append
(
static_cast
<
sal_Unicode
>
(
'/'
));
buf
.
append
(
dir
).
append
(
static_cast
<
sal_Unicode
>
(
'/'
));
writeStream
(
i_rImpl
,
xDir
,
i_xGraphName
,
rest
,
writeStream
(
i_rImpl
,
xDir
,
i_xGraphName
,
rest
,
...
@@ -684,9 +684,9 @@ writeStream(struct DocumentMetadataAccess_Impl & i_rImpl,
...
@@ -684,9 +684,9 @@ writeStream(struct DocumentMetadataAccess_Impl & i_rImpl,
xTransaction
->
commit
();
xTransaction
->
commit
();
}
}
}
}
}
catch
(
uno
::
RuntimeException
&
)
{
}
catch
(
const
uno
::
RuntimeException
&
)
{
throw
;
throw
;
}
catch
(
io
::
IOException
&
)
{
}
catch
(
const
io
::
IOException
&
)
{
throw
;
throw
;
}
}
}
}
...
@@ -720,13 +720,13 @@ retry:
...
@@ -720,13 +720,13 @@ retry:
getURIForStream
(
i_rImpl
,
manifest
));
getURIForStream
(
i_rImpl
,
manifest
));
try
{
try
{
readStream
(
i_rImpl
,
i_xStorage
,
manifest
,
baseURI
);
readStream
(
i_rImpl
,
i_xStorage
,
manifest
,
baseURI
);
}
catch
(
ucb
::
InteractiveAugmentedIOException
&
e
)
{
}
catch
(
const
ucb
::
InteractiveAugmentedIOException
&
e
)
{
// no manifest.rdf: this is not an error in ODF < 1.2
// no manifest.rdf: this is not an error in ODF < 1.2
if
(
!
(
ucb
::
IOErrorCode_NOT_EXISTING_PATH
==
e
.
Code
))
{
if
(
!
(
ucb
::
IOErrorCode_NOT_EXISTING_PATH
==
e
.
Code
))
{
iaioe
=
e
;
iaioe
=
e
;
err
=
true
;
err
=
true
;
}
}
}
catch
(
uno
::
Exception
&
e
)
{
}
catch
(
const
uno
::
Exception
&
e
)
{
rterr
<<=
e
;
rterr
<<=
e
;
}
}
...
@@ -775,7 +775,7 @@ static void init(struct DocumentMetadataAccess_Impl & i_rImpl)
...
@@ -775,7 +775,7 @@ static void init(struct DocumentMetadataAccess_Impl & i_rImpl)
i_rImpl
.
m_xManifest
->
addStatement
(
i_rImpl
.
m_xBaseURI
.
get
(),
i_rImpl
.
m_xManifest
->
addStatement
(
i_rImpl
.
m_xBaseURI
.
get
(),
getURI
<
rdf
::
URIs
::
RDF_TYPE
>
(
i_rImpl
.
m_xContext
),
getURI
<
rdf
::
URIs
::
RDF_TYPE
>
(
i_rImpl
.
m_xContext
),
getURI
<
rdf
::
URIs
::
PKG_DOCUMENT
>
(
i_rImpl
.
m_xContext
).
get
());
getURI
<
rdf
::
URIs
::
PKG_DOCUMENT
>
(
i_rImpl
.
m_xContext
).
get
());
}
catch
(
uno
::
Exception
&
e
)
{
}
catch
(
const
uno
::
Exception
&
e
)
{
throw
lang
::
WrappedTargetRuntimeException
(
throw
lang
::
WrappedTargetRuntimeException
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"init: unexpected exception"
)),
0
,
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"init: unexpected exception"
)),
0
,
uno
::
makeAny
(
e
));
uno
::
makeAny
(
e
));
...
@@ -948,7 +948,7 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
...
@@ -948,7 +948,7 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
try
{
try
{
m_pImpl
->
m_xRepository
->
createGraph
(
xGraphName
);
m_pImpl
->
m_xRepository
->
createGraph
(
xGraphName
);
}
catch
(
rdf
::
RepositoryException
&
e
)
{
}
catch
(
const
rdf
::
RepositoryException
&
e
)
{
throw
lang
::
WrappedTargetRuntimeException
(
throw
lang
::
WrappedTargetRuntimeException
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"DocumentMetadataAccess::addMetadataFile: exception"
)),
"DocumentMetadataAccess::addMetadataFile: exception"
)),
...
@@ -995,7 +995,7 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
...
@@ -995,7 +995,7 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
try
{
try
{
m_pImpl
->
m_xRepository
->
importGraph
(
m_pImpl
->
m_xRepository
->
importGraph
(
i_Format
,
i_xInStream
,
xGraphName
,
i_xBaseURI
);
i_Format
,
i_xInStream
,
xGraphName
,
i_xBaseURI
);
}
catch
(
rdf
::
RepositoryException
&
e
)
{
}
catch
(
const
rdf
::
RepositoryException
&
e
)
{
throw
lang
::
WrappedTargetRuntimeException
(
throw
lang
::
WrappedTargetRuntimeException
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"DocumentMetadataAccess::importMetadataFile: "
"DocumentMetadataAccess::importMetadataFile: "
...
@@ -1016,7 +1016,7 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
...
@@ -1016,7 +1016,7 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
{
{
try
{
try
{
m_pImpl
->
m_xRepository
->
destroyGraph
(
i_xGraphName
);
m_pImpl
->
m_xRepository
->
destroyGraph
(
i_xGraphName
);
}
catch
(
rdf
::
RepositoryException
&
e
)
{
}
catch
(
const
rdf
::
RepositoryException
&
e
)
{
throw
lang
::
WrappedTargetRuntimeException
(
throw
lang
::
WrappedTargetRuntimeException
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"DocumentMetadataAccess::removeMetadataFile: "
"DocumentMetadataAccess::removeMetadataFile: "
...
@@ -1079,9 +1079,9 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
...
@@ -1079,9 +1079,9 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
// remove file from manifest
// remove file from manifest
removeFile
(
*
m_pImpl
,
xPart
);
removeFile
(
*
m_pImpl
,
xPart
);
}
catch
(
uno
::
RuntimeException
&
)
{
}
catch
(
const
uno
::
RuntimeException
&
)
{
throw
;
throw
;
}
catch
(
uno
::
Exception
&
e
)
{
}
catch
(
const
uno
::
Exception
&
e
)
{
throw
lang
::
WrappedTargetRuntimeException
(
throw
lang
::
WrappedTargetRuntimeException
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"DocumentMetadataAccess::removeContentOrStylesFile: exception"
)),
"DocumentMetadataAccess::removeContentOrStylesFile: exception"
)),
...
@@ -1185,9 +1185,9 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
...
@@ -1185,9 +1185,9 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
// something else! just ignore it...
// something else! just ignore it...
}
}
}
}
}
catch
(
uno
::
RuntimeException
&
)
{
}
catch
(
const
uno
::
RuntimeException
&
)
{
throw
;
throw
;
}
catch
(
uno
::
Exception
&
e
)
{
}
catch
(
const
uno
::
Exception
&
e
)
{
throw
lang
::
WrappedTargetRuntimeException
(
throw
lang
::
WrappedTargetRuntimeException
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"DocumentMetadataAccess::loadMetadataFromStorage: "
"DocumentMetadataAccess::loadMetadataFromStorage: "
...
@@ -1221,12 +1221,12 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
...
@@ -1221,12 +1221,12 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
const
::
rtl
::
OUString
baseURI
(
m_pImpl
->
m_xBaseURI
->
getStringValue
()
);
const
::
rtl
::
OUString
baseURI
(
m_pImpl
->
m_xBaseURI
->
getStringValue
()
);
try
{
try
{
writeStream
(
*
m_pImpl
,
i_xStorage
,
xManifest
,
manifest
,
baseURI
);
writeStream
(
*
m_pImpl
,
i_xStorage
,
xManifest
,
manifest
,
baseURI
);
}
catch
(
uno
::
RuntimeException
&
)
{
}
catch
(
const
uno
::
RuntimeException
&
)
{
throw
;
throw
;
}
catch
(
io
::
IOException
&
e
)
{
}
catch
(
const
io
::
IOException
&
e
)
{
throw
lang
::
WrappedTargetException
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
throw
lang
::
WrappedTargetException
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"storeMetadataToStorage: IO exception"
)),
*
this
,
uno
::
makeAny
(
e
));
"storeMetadataToStorage: IO exception"
)),
*
this
,
uno
::
makeAny
(
e
));
}
catch
(
uno
::
Exception
&
e
)
{
}
catch
(
const
uno
::
Exception
&
e
)
{
throw
lang
::
WrappedTargetRuntimeException
(
throw
lang
::
WrappedTargetRuntimeException
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"storeMetadataToStorage: exception"
)),
*
this
,
uno
::
makeAny
(
e
));
"storeMetadataToStorage: exception"
)),
*
this
,
uno
::
makeAny
(
e
));
...
@@ -1258,21 +1258,21 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
...
@@ -1258,21 +1258,21 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
}
}
try
{
try
{
writeStream
(
*
m_pImpl
,
i_xStorage
,
xName
,
relName
,
baseURI
);
writeStream
(
*
m_pImpl
,
i_xStorage
,
xName
,
relName
,
baseURI
);
}
catch
(
uno
::
RuntimeException
&
)
{
}
catch
(
const
uno
::
RuntimeException
&
)
{
throw
;
throw
;
}
catch
(
io
::
IOException
&
e
)
{
}
catch
(
const
io
::
IOException
&
e
)
{
throw
lang
::
WrappedTargetException
(
throw
lang
::
WrappedTargetException
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"storeMetadataToStorage: IO exception"
)),
"storeMetadataToStorage: IO exception"
)),
*
this
,
uno
::
makeAny
(
e
));
*
this
,
uno
::
makeAny
(
e
));
}
catch
(
uno
::
Exception
&
e
)
{
}
catch
(
const
uno
::
Exception
&
e
)
{
throw
lang
::
WrappedTargetRuntimeException
(
throw
lang
::
WrappedTargetRuntimeException
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"storeMetadataToStorage: exception"
)),
"storeMetadataToStorage: exception"
)),
*
this
,
uno
::
makeAny
(
e
));
*
this
,
uno
::
makeAny
(
e
));
}
}
}
}
}
catch
(
rdf
::
RepositoryException
&
e
)
{
}
catch
(
const
rdf
::
RepositoryException
&
e
)
{
throw
lang
::
WrappedTargetRuntimeException
(
throw
lang
::
WrappedTargetRuntimeException
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"storeMetadataToStorage: exception"
)),
*
this
,
uno
::
makeAny
(
e
));
"storeMetadataToStorage: exception"
)),
*
this
,
uno
::
makeAny
(
e
));
...
@@ -1310,11 +1310,11 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
...
@@ -1310,11 +1310,11 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
xStorage
=
::
comphelper
::
OStorageHelper
::
GetStorageFromURL2
(
xStorage
=
::
comphelper
::
OStorageHelper
::
GetStorageFromURL2
(
URL
,
embed
::
ElementModes
::
READ
,
xMsf
);
URL
,
embed
::
ElementModes
::
READ
,
xMsf
);
}
}
}
catch
(
uno
::
RuntimeException
&
)
{
}
catch
(
const
uno
::
RuntimeException
&
)
{
throw
;
throw
;
}
catch
(
io
::
IOException
&
)
{
}
catch
(
const
io
::
IOException
&
)
{
throw
;
throw
;
}
catch
(
uno
::
Exception
&
e
)
{
}
catch
(
const
uno
::
Exception
&
e
)
{
throw
lang
::
WrappedTargetException
(
throw
lang
::
WrappedTargetException
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"DocumentMetadataAccess::loadMetadataFromMedium: "
"DocumentMetadataAccess::loadMetadataFromMedium: "
...
@@ -1328,11 +1328,11 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
...
@@ -1328,11 +1328,11 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
uno
::
Reference
<
rdf
::
XURI
>
xBaseURI
;
uno
::
Reference
<
rdf
::
XURI
>
xBaseURI
;
try
{
try
{
xBaseURI
=
createBaseURI
(
m_pImpl
->
m_xContext
,
xStorage
,
BaseURL
);
xBaseURI
=
createBaseURI
(
m_pImpl
->
m_xContext
,
xStorage
,
BaseURL
);
}
catch
(
uno
::
Exception
&
)
{
}
catch
(
const
uno
::
Exception
&
)
{
// fall back to URL
// fall back to URL
try
{
try
{
xBaseURI
=
createBaseURI
(
m_pImpl
->
m_xContext
,
xStorage
,
URL
);
xBaseURI
=
createBaseURI
(
m_pImpl
->
m_xContext
,
xStorage
,
URL
);
}
catch
(
uno
::
Exception
&
)
{
}
catch
(
const
uno
::
Exception
&
)
{
OSL_FAIL
(
"cannot create base URI"
);
OSL_FAIL
(
"cannot create base URI"
);
}
}
}
}
...
@@ -1385,7 +1385,7 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
...
@@ -1385,7 +1385,7 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
xProps
->
setPropertyValue
(
xProps
->
setPropertyValue
(
::
comphelper
::
MediaDescriptor
::
PROP_MEDIATYPE
(),
::
comphelper
::
MediaDescriptor
::
PROP_MEDIATYPE
(),
iter
->
second
);
iter
->
second
);
}
catch
(
uno
::
Exception
&
)
{
}
}
catch
(
const
uno
::
Exception
&
)
{
}
}
}
storeMetadataToStorage
(
xStorage
);
storeMetadataToStorage
(
xStorage
);
...
...
sfx2/source/doc/SfxDocumentMetaData.cxx
Dosyayı görüntüle @
82eb8062
...
@@ -682,7 +682,7 @@ SfxDocumentMetaData::getURLProperties(
...
@@ -682,7 +682,7 @@ SfxDocumentMetaData::getURLProperties(
xPropArg
->
addProperty
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"StreamName"
)),
xPropArg
->
addProperty
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"StreamName"
)),
css
::
beans
::
PropertyAttribute
::
MAYBEVOID
,
css
::
beans
::
PropertyAttribute
::
MAYBEVOID
,
css
::
uno
::
makeAny
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
s_meta
))));
css
::
uno
::
makeAny
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
s_meta
))));
}
catch
(
css
::
uno
::
Exception
&
)
{
}
catch
(
c
onst
c
ss
::
uno
::
Exception
&
)
{
// ignore
// ignore
}
}
return
css
::
uno
::
Reference
<
css
::
beans
::
XPropertySet
>
(
xPropArg
,
return
css
::
uno
::
Reference
<
css
::
beans
::
XPropertySet
>
(
xPropArg
,
...
@@ -704,7 +704,7 @@ getNodeText(css::uno::Reference<css::xml::dom::XNode> i_xNode)
...
@@ -704,7 +704,7 @@ getNodeText(css::uno::Reference<css::xml::dom::XNode> i_xNode)
if
(
c
->
getNodeType
()
==
css
::
xml
::
dom
::
NodeType_TEXT_NODE
)
{
if
(
c
->
getNodeType
()
==
css
::
xml
::
dom
::
NodeType_TEXT_NODE
)
{
try
{
try
{
return
c
->
getNodeValue
();
return
c
->
getNodeValue
();
}
catch
(
css
::
xml
::
dom
::
DOMException
&
)
{
// too big?
}
catch
(
c
onst
c
ss
::
xml
::
dom
::
DOMException
&
)
{
// too big?
return
::
rtl
::
OUString
();
return
::
rtl
::
OUString
();
}
}
}
}
...
@@ -773,7 +773,7 @@ SfxDocumentMetaData::setMetaText(const char* i_name,
...
@@ -773,7 +773,7 @@ SfxDocumentMetaData::setMetaText(const char* i_name,
xNode
->
appendChild
(
xTextNode
);
xNode
->
appendChild
(
xTextNode
);
return
true
;
return
true
;
}
}
}
catch
(
css
::
xml
::
dom
::
DOMException
&
e
)
{
}
catch
(
c
onst
c
ss
::
xml
::
dom
::
DOMException
&
e
)
{
css
::
uno
::
Any
a
(
e
);
css
::
uno
::
Any
a
(
e
);
throw
css
::
lang
::
WrappedTargetRuntimeException
(
throw
css
::
lang
::
WrappedTargetRuntimeException
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
...
@@ -910,7 +910,7 @@ SfxDocumentMetaData::setMetaList(const char* i_name,
...
@@ -910,7 +910,7 @@ SfxDocumentMetaData::setMetaList(const char* i_name,
}
}
return
true
;
return
true
;
}
catch
(
css
::
xml
::
dom
::
DOMException
&
e
)
{
}
catch
(
c
onst
c
ss
::
xml
::
dom
::
DOMException
&
e
)
{
css
::
uno
::
Any
a
(
e
);
css
::
uno
::
Any
a
(
e
);
throw
css
::
lang
::
WrappedTargetRuntimeException
(
throw
css
::
lang
::
WrappedTargetRuntimeException
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
...
@@ -938,7 +938,7 @@ propsToStrings(css::uno::Reference<css::beans::XPropertySet> const & i_xPropSet)
...
@@ -938,7 +938,7 @@ propsToStrings(css::uno::Reference<css::beans::XPropertySet> const & i_xPropSet)
css
::
uno
::
Any
any
;
css
::
uno
::
Any
any
;
try
{
try
{
any
=
i_xPropSet
->
getPropertyValue
(
name
);
any
=
i_xPropSet
->
getPropertyValue
(
name
);
}
catch
(
css
::
uno
::
Exception
&
)
{
}
catch
(
c
onst
c
ss
::
uno
::
Exception
&
)
{
// ignore
// ignore
}
}
const
css
::
uno
::
Type
&
type
=
any
.
getValueType
();
const
css
::
uno
::
Type
&
type
=
any
.
getValueType
();
...
@@ -1051,7 +1051,7 @@ SfxDocumentMetaData::updateElement(const char *i_name,
...
@@ -1051,7 +1051,7 @@ SfxDocumentMetaData::updateElement(const char *i_name,
m_xParent
->
appendChild
(
xNode
);
m_xParent
->
appendChild
(
xNode
);
}
}
m_meta
[
name
]
=
xNode
;
m_meta
[
name
]
=
xNode
;
}
catch
(
css
::
xml
::
dom
::
DOMException
&
e
)
{
}
catch
(
c
onst
c
ss
::
xml
::
dom
::
DOMException
&
e
)
{
css
::
uno
::
Any
a
(
e
);
css
::
uno
::
Any
a
(
e
);
throw
css
::
lang
::
WrappedTargetRuntimeException
(
throw
css
::
lang
::
WrappedTargetRuntimeException
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
...
@@ -1200,7 +1200,7 @@ void SAL_CALL SfxDocumentMetaData::init(
...
@@ -1200,7 +1200,7 @@ void SAL_CALL SfxDocumentMetaData::init(
m_xParent
.
clear
();
m_xParent
.
clear
();
try
{
try
{
m_xParent
=
xPath
->
selectSingleNode
(
xDocNode
,
prefix
);
m_xParent
=
xPath
->
selectSingleNode
(
xDocNode
,
prefix
);
}
catch
(
com
::
sun
::
star
::
uno
::
Exception
&
)
{
}
catch
(
co
nst
co
m
::
sun
::
star
::
uno
::
Exception
&
)
{
}
}
if
(
!
m_xParent
.
is
())
{
if
(
!
m_xParent
.
is
())
{
...
@@ -1250,7 +1250,7 @@ void SAL_CALL SfxDocumentMetaData::init(
...
@@ -1250,7 +1250,7 @@ void SAL_CALL SfxDocumentMetaData::init(
css
::
uno
::
UNO_QUERY_THROW
);
css
::
uno
::
UNO_QUERY_THROW
);
xRElem
->
appendChild
(
xParent
);
xRElem
->
appendChild
(
xParent
);
m_xParent
=
xParent
;
m_xParent
=
xParent
;
}
catch
(
css
::
xml
::
dom
::
DOMException
&
e
)
{
}
catch
(
c
onst
c
ss
::
xml
::
dom
::
DOMException
&
e
)
{
css
::
uno
::
Any
a
(
e
);
css
::
uno
::
Any
a
(
e
);
throw
css
::
lang
::
WrappedTargetRuntimeException
(
throw
css
::
lang
::
WrappedTargetRuntimeException
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
...
@@ -1371,14 +1371,14 @@ void SAL_CALL SfxDocumentMetaData::init(
...
@@ -1371,14 +1371,14 @@ void SAL_CALL SfxDocumentMetaData::init(
try
{
try
{
m_xUserDefined
->
addProperty
(
name
,
m_xUserDefined
->
addProperty
(
name
,
css
::
beans
::
PropertyAttribute
::
REMOVEABLE
,
any
);
css
::
beans
::
PropertyAttribute
::
REMOVEABLE
,
any
);
}
catch
(
css
::
beans
::
PropertyExistException
&
)
{
}
catch
(
c
onst
c
ss
::
beans
::
PropertyExistException
&
)
{
DBG_WARNING1
(
"SfxDocumentMetaData: duplicate: %s"
,
DBG_WARNING1
(
"SfxDocumentMetaData: duplicate: %s"
,
OUStringToOString
(
name
,
RTL_TEXTENCODING_UTF8
).
getStr
());
OUStringToOString
(
name
,
RTL_TEXTENCODING_UTF8
).
getStr
());
// ignore; duplicate
// ignore; duplicate
}
catch
(
css
::
beans
::
IllegalTypeException
&
)
{
}
catch
(
c
onst
c
ss
::
beans
::
IllegalTypeException
&
)
{
OSL_TRACE
(
"SfxDocumentMetaData: illegal type: %s"
,
OSL_TRACE
(
"SfxDocumentMetaData: illegal type: %s"
,
OUStringToOString
(
name
,
RTL_TEXTENCODING_UTF8
).
getStr
());
OUStringToOString
(
name
,
RTL_TEXTENCODING_UTF8
).
getStr
());
}
catch
(
css
::
lang
::
IllegalArgumentException
&
)
{
}
catch
(
c
onst
c
ss
::
lang
::
IllegalArgumentException
&
)
{
OSL_TRACE
(
"SfxDocumentMetaData: illegal arg: %s"
,
OSL_TRACE
(
"SfxDocumentMetaData: illegal arg: %s"
,
OUStringToOString
(
name
,
RTL_TEXTENCODING_UTF8
).
getStr
());
OUStringToOString
(
name
,
RTL_TEXTENCODING_UTF8
).
getStr
());
}
}
...
@@ -1966,7 +1966,7 @@ SfxDocumentMetaData::loadFromStorage(
...
@@ -1966,7 +1966,7 @@ SfxDocumentMetaData::loadFromStorage(
>>=
input
.
sSystemId
;
>>=
input
.
sSystemId
;
input
.
sSystemId
+=
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"/"
)).
concat
(
input
.
sSystemId
+=
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"/"
)).
concat
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
s_meta
)));
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
s_meta
)));
}
catch
(
css
::
uno
::
Exception
&
)
{
}
catch
(
c
onst
c
ss
::
uno
::
Exception
&
)
{
input
.
sSystemId
=
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
s_meta
));
input
.
sSystemId
=
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
s_meta
));
}
}
css
::
uno
::
Sequence
<
css
::
uno
::
Any
>
args
(
1
);
css
::
uno
::
Sequence
<
css
::
uno
::
Any
>
args
(
1
);
...
@@ -1985,7 +1985,7 @@ SfxDocumentMetaData::loadFromStorage(
...
@@ -1985,7 +1985,7 @@ SfxDocumentMetaData::loadFromStorage(
xParser
->
setDocumentHandler
(
xDocHandler
);
xParser
->
setDocumentHandler
(
xDocHandler
);
try
{
try
{
xParser
->
parseStream
(
input
);
xParser
->
parseStream
(
input
);
}
catch
(
css
::
xml
::
sax
::
SAXException
&
)
{
}
catch
(
c
onst
c
ss
::
xml
::
sax
::
SAXException
&
)
{
throw
css
::
io
::
WrongFormatException
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
throw
css
::
io
::
WrongFormatException
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"SfxDocumentMetaData::loadFromStorage:"
"SfxDocumentMetaData::loadFromStorage:"
" XML parsing exception"
)),
*
this
);
" XML parsing exception"
)),
*
this
);
...
@@ -2099,11 +2099,11 @@ SfxDocumentMetaData::loadFromMedium(const ::rtl::OUString & URL,
...
@@ -2099,11 +2099,11 @@ SfxDocumentMetaData::loadFromMedium(const ::rtl::OUString & URL,
xStorage
=
::
comphelper
::
OStorageHelper
::
GetStorageFromURL
(
xStorage
=
::
comphelper
::
OStorageHelper
::
GetStorageFromURL
(
URL
,
css
::
embed
::
ElementModes
::
READ
,
xMsf
);
URL
,
css
::
embed
::
ElementModes
::
READ
,
xMsf
);
}
}
}
catch
(
css
::
uno
::
RuntimeException
&
)
{
}
catch
(
c
onst
c
ss
::
uno
::
RuntimeException
&
)
{
throw
;
throw
;
}
catch
(
css
::
io
::
IOException
&
)
{
}
catch
(
c
onst
c
ss
::
io
::
IOException
&
)
{
throw
;
throw
;
}
catch
(
css
::
uno
::
Exception
&
e
)
{
}
catch
(
c
onst
c
ss
::
uno
::
Exception
&
e
)
{
throw
css
::
lang
::
WrappedTargetException
(
throw
css
::
lang
::
WrappedTargetException
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"SfxDocumentMetaData::loadFromMedium: exception"
)),
"SfxDocumentMetaData::loadFromMedium: exception"
)),
...
@@ -2225,9 +2225,9 @@ SfxDocumentMetaData::createClone()
...
@@ -2225,9 +2225,9 @@ SfxDocumentMetaData::createClone()
xDoc
->
importNode
(
xRoot
,
true
));
xDoc
->
importNode
(
xRoot
,
true
));
xDoc
->
appendChild
(
xRootNew
);
xDoc
->
appendChild
(
xRootNew
);
pNew
->
init
(
xDoc
);
pNew
->
init
(
xDoc
);
}
catch
(
css
::
uno
::
RuntimeException
&
)
{
}
catch
(
c
onst
c
ss
::
uno
::
RuntimeException
&
)
{
throw
;
throw
;
}
catch
(
css
::
uno
::
Exception
&
e
)
{
}
catch
(
c
onst
c
ss
::
uno
::
Exception
&
e
)
{
css
::
uno
::
Any
a
(
e
);
css
::
uno
::
Any
a
(
e
);
throw
css
::
lang
::
WrappedTargetRuntimeException
(
throw
css
::
lang
::
WrappedTargetRuntimeException
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
...
@@ -2269,9 +2269,9 @@ void SAL_CALL SfxDocumentMetaData::setModified( ::sal_Bool bModified )
...
@@ -2269,9 +2269,9 @@ void SAL_CALL SfxDocumentMetaData::setModified( ::sal_Bool bModified )
css
::
lang
::
EventObject
event
(
xThis
);
css
::
lang
::
EventObject
event
(
xThis
);
m_NotifyListeners
.
notifyEach
(
&
css
::
util
::
XModifyListener
::
modified
,
m_NotifyListeners
.
notifyEach
(
&
css
::
util
::
XModifyListener
::
modified
,
event
);
event
);
}
catch
(
css
::
uno
::
RuntimeException
&
)
{
}
catch
(
c
onst
c
ss
::
uno
::
RuntimeException
&
)
{
throw
;
throw
;
}
catch
(
css
::
uno
::
Exception
&
e
)
{
}
catch
(
c
onst
c
ss
::
uno
::
Exception
&
e
)
{
// ignore
// ignore
DBG_WARNING1
(
"SfxDocumentMetaData::setModified: exception:
\n
%s"
,
DBG_WARNING1
(
"SfxDocumentMetaData::setModified: exception:
\n
%s"
,
OUStringToOString
(
e
.
Message
,
RTL_TEXTENCODING_UTF8
).
getStr
());
OUStringToOString
(
e
.
Message
,
RTL_TEXTENCODING_UTF8
).
getStr
());
...
...
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