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
47160402
Kaydet (Commit)
47160402
authored
Şub 05, 2013
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Better error reporting
Change-Id: I48bd329e1a29ce9cbf9840bf5e3cb48a92cb8073
üst
32e2cfda
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
16 deletions
+21
-16
fsfactory.cxx
svl/source/fsstor/fsfactory.cxx
+21
-16
No files found.
svl/source/fsstor/fsfactory.cxx
Dosyayı görüntüle @
47160402
...
...
@@ -108,8 +108,11 @@ uno::Reference< uno::XInterface > SAL_CALL FSStorageFactory::createInstanceWithA
{
if
(
!
(
aArguments
[
1
]
>>=
nStorageMode
)
)
{
OSL_FAIL
(
"Wrong second argument!
\n
"
);
throw
uno
::
Exception
();
// TODO: Illegal argument
throw
lang
::
IllegalArgumentException
(
(
"second argument to css.embed.FileSystemStorageFactory."
"createInstanceWithArguments must be a"
" css.embed.ElementModes"
),
static_cast
<
OWeakObject
*
>
(
this
),
-
1
);
}
// it's allways possible to read written storage in this implementation
nStorageMode
|=
embed
::
ElementModes
::
READ
;
...
...
@@ -118,18 +121,13 @@ uno::Reference< uno::XInterface > SAL_CALL FSStorageFactory::createInstanceWithA
// retrieve storage source URL
::
rtl
::
OUString
aURL
;
if
(
aArguments
[
0
]
>>=
aURL
)
if
(
!
(
aArguments
[
0
]
>>=
aURL
)
||
aURL
.
isEmpty
()
)
{
if
(
aURL
.
isEmpty
()
)
{
OSL_FAIL
(
"Empty URL is provided!
\n
"
);
throw
uno
::
Exception
();
// TODO: illegal argument
}
}
else
{
OSL_FAIL
(
"Wrong first argument!
\n
"
);
throw
uno
::
Exception
();
// TODO: Illegal argument
throw
lang
::
IllegalArgumentException
(
(
"first argument to"
" css.embed.FileSystemStorageFactory.createInstanceWithArguments"
" must be a (non-empty) URL"
),
static_cast
<
OWeakObject
*
>
(
this
),
-
1
);
}
// allow to use other ucp's
...
...
@@ -138,14 +136,21 @@ uno::Reference< uno::XInterface > SAL_CALL FSStorageFactory::createInstanceWithA
||
aURL
.
equalsIgnoreAsciiCaseAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
"vnd.sun.star.zip"
))
||
::
utl
::
UCBContentHelper
::
IsDocument
(
aURL
)
)
{
OSL_FAIL
(
"File system storages can be based only on file URLs!
\n
"
);
// ???
throw
uno
::
Exception
();
// TODO: illegal argument
throw
lang
::
IllegalArgumentException
(
(
"URL
\"
"
+
aURL
+
"
\"
passed as first argument to"
" css.embed.FileSystemStorageFactory.createInstanceWithArguments"
" must be a file URL denoting a directory"
),
static_cast
<
OWeakObject
*
>
(
this
),
-
1
);
}
if
(
(
nStorageMode
&
embed
::
ElementModes
::
WRITE
)
&&
!
(
nStorageMode
&
embed
::
ElementModes
::
NOCREATE
)
)
FSStorage
::
MakeFolderNoUI
(
aURL
);
else
if
(
!::
utl
::
UCBContentHelper
::
IsFolder
(
aURL
)
)
throw
io
::
IOException
();
// there is no such folder
throw
io
::
IOException
(
(
"URL
\"
"
+
aURL
+
"
\"
passed to"
" css.embed.FileSystemStorageFactory.createInstanceWithArguments"
" does not denote an existing directory"
),
static_cast
<
OWeakObject
*
>
(
this
));
::
ucbhelper
::
Content
aResultContent
(
aURL
,
uno
::
Reference
<
ucb
::
XCommandEnvironment
>
(),
...
...
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