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
dbfa0518
Kaydet (Commit)
dbfa0518
authored
Agu 21, 2011
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
callcatcher: unused code
üst
e42fcb01
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
84 deletions
+0
-84
ucbhelper.hxx
unotools/inc/unotools/ucbhelper.hxx
+0
-5
ucbhelper.cxx
unotools/source/ucbhelper/ucbhelper.cxx
+0
-79
No files found.
unotools/inc/unotools/ucbhelper.hxx
Dosyayı görüntüle @
dbfa0518
...
...
@@ -47,10 +47,6 @@ namespace utl
{
class
UNOTOOLS_DLLPUBLIC
UCBContentHelper
{
private
:
static
sal_Bool
Transfer_Impl
(
const
String
&
rSource
,
const
String
&
rDest
,
sal_Bool
bMoveData
,
sal_Int32
nNameClash
);
public
:
static
sal_Bool
IsDocument
(
const
String
&
rContent
);
static
sal_Bool
IsFolder
(
const
String
&
rContent
);
...
...
@@ -72,7 +68,6 @@ namespace utl
static
sal_Bool
IsYounger
(
const
String
&
rIsYoung
,
const
String
&
rIsOlder
);
static
sal_Bool
Exists
(
const
String
&
rContent
);
static
sal_Bool
Find
(
const
String
&
rFolder
,
const
String
&
rName
,
String
&
rFile
,
sal_Bool
bAllowWildCards
=
sal_False
);
static
sal_Bool
IsSubPath
(
const
::
rtl
::
OUString
&
rPath
,
const
::
rtl
::
OUString
&
rChildCandidate
,
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
ucb
::
XContentProvider
>&
xContentProvider
=
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
ucb
::
XContentProvider
>
()
);
static
sal_Bool
EqualURLs
(
const
::
rtl
::
OUString
&
aFirstURL
,
const
::
rtl
::
OUString
&
aSecondURL
);
};
...
...
unotools/source/ucbhelper/ucbhelper.cxx
Dosyayı görüntüle @
dbfa0518
...
...
@@ -90,55 +90,6 @@ typedef ::std::vector< OUString* > StringList_Impl;
namespace
utl
{
sal_Bool
UCBContentHelper
::
Transfer_Impl
(
const
String
&
rSource
,
const
String
&
rDest
,
sal_Bool
bMoveData
,
sal_Int32
nNameClash
)
{
sal_Bool
bRet
=
sal_True
,
bKillSource
=
sal_False
;
INetURLObject
aSourceObj
(
rSource
);
DBG_ASSERT
(
aSourceObj
.
GetProtocol
()
!=
INET_PROT_NOT_VALID
,
"Invalid URL!"
);
INetURLObject
aDestObj
(
rDest
);
DBG_ASSERT
(
aDestObj
.
GetProtocol
()
!=
INET_PROT_NOT_VALID
,
"Invalid URL!"
);
if
(
bMoveData
&&
aSourceObj
.
GetProtocol
()
!=
aDestObj
.
GetProtocol
()
)
{
bMoveData
=
sal_False
;
bKillSource
=
sal_True
;
}
String
aName
=
aDestObj
.
getName
();
aDestObj
.
removeSegment
();
aDestObj
.
setFinalSlash
();
try
{
Content
aDestPath
(
aDestObj
.
GetMainURL
(
INetURLObject
::
NO_DECODE
),
uno
::
Reference
<
::
com
::
sun
::
star
::
ucb
::
XCommandEnvironment
>
()
);
uno
::
Reference
<
::
com
::
sun
::
star
::
ucb
::
XCommandInfo
>
xInfo
=
aDestPath
.
getCommands
();
OUString
aTransferName
(
RTL_CONSTASCII_USTRINGPARAM
(
"transfer"
));
if
(
xInfo
->
hasCommandByName
(
aTransferName
)
)
{
aDestPath
.
executeCommand
(
aTransferName
,
makeAny
(
::
com
::
sun
::
star
::
ucb
::
TransferInfo
(
bMoveData
,
aSourceObj
.
GetMainURL
(
INetURLObject
::
NO_DECODE
),
aName
,
nNameClash
)
)
);
}
else
{
DBG_ERRORFILE
(
"transfer command not available"
);
}
}
catch
(
::
com
::
sun
::
star
::
ucb
::
CommandAbortedException
&
)
{
bRet
=
sal_False
;
}
catch
(
::
com
::
sun
::
star
::
uno
::
Exception
&
)
{
bRet
=
sal_False
;
}
if
(
bKillSource
)
UCBContentHelper
::
Kill
(
rSource
);
return
bRet
;
}
// -----------------------------------------------------------------------
sal_Bool
UCBContentHelper
::
IsDocument
(
const
String
&
rContent
)
{
sal_Bool
bRet
=
sal_False
;
...
...
@@ -530,36 +481,6 @@ sal_Bool UCBContentHelper::IsYounger( const String& rIsYoung, const String& rIsO
return
(
aYoungDate
>
aOlderDate
);
}
// -----------------------------------------------------------------------
sal_Bool
UCBContentHelper
::
Find
(
const
String
&
rFolder
,
const
String
&
rName
,
String
&
rFile
,
sal_Bool
bAllowWildCards
)
{
sal_Bool
bWild
=
bAllowWildCards
&&
(
rName
.
Search
(
'*'
)
!=
STRING_NOTFOUND
||
rName
.
Search
(
'?'
)
!=
STRING_NOTFOUND
);
sal_Bool
bRet
=
sal_False
;
// get a list of URLs for all children of rFolder
Sequence
<
::
rtl
::
OUString
>
aFiles
=
GetFolderContents
(
rFolder
,
sal_False
);
const
::
rtl
::
OUString
*
pFiles
=
aFiles
.
getConstArray
();
sal_uInt32
i
,
nCount
=
aFiles
.
getLength
();
for
(
i
=
0
;
i
<
nCount
;
++
i
)
{
// get the last name of the URLs and compare it with rName
INetURLObject
aFileObject
(
pFiles
[
i
]
);
String
aFile
=
aFileObject
.
getName
(
INetURLObject
::
LAST_SEGMENT
,
true
,
INetURLObject
::
DECODE_WITH_CHARSET
).
toAsciiLowerCase
();
if
(
(
bWild
&&
WildCard
(
rName
).
Matches
(
aFile
))
||
aFile
==
rName
)
{
// names match
rFile
=
aFileObject
.
GetMainURL
(
INetURLObject
::
NO_DECODE
);
bRet
=
sal_True
;
break
;
}
}
return
bRet
;
}
// -----------------------------------------------------------------------
sal_Bool
UCBContentHelper
::
Exists
(
const
String
&
rURL
)
{
...
...
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