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
7014a569
Kaydet (Commit)
7014a569
authored
Mar 17, 2013
tarafından
Lionel Elie Mamane
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fix breakage introduced by String->OUString migration
Change-Id: Ia509d23306e71b978247705daa9c9559adbae195
üst
e1430b23
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
28 deletions
+22
-28
dsntypes.cxx
dbaccess/source/core/misc/dsntypes.cxx
+21
-27
ConnectionHelper.cxx
dbaccess/source/ui/dlg/ConnectionHelper.cxx
+1
-1
No files found.
dbaccess/source/core/misc/dsntypes.cxx
Dosyayı görüntüle @
7014a569
...
...
@@ -103,10 +103,12 @@ OUString ODsnTypeCollection::cutPrefix(const OUString& _sURL) const
WildCard
aWildCard
(
*
aIter
);
if
(
sOldPattern
.
getLength
()
<
aIter
->
getLength
()
&&
aWildCard
.
Matches
(
_sURL
)
)
{
if
(
aIter
->
getLength
()
<
sURL
.
getLength
()
)
sRet
=
sURL
.
copy
(
sURL
.
match
(
*
aIter
));
else
sRet
=
sURL
.
copy
(
aIter
->
match
(
sURL
));
// This relies on the fact that all patterns are of the form
// foo*
// that is, the very concept of "prefix" applies.
OUString
prefix
(
comphelper
::
string
::
stripEnd
(
*
aIter
,
'*'
));
OSL_ENSURE
(
prefix
.
getLength
()
<=
sURL
.
getLength
(),
"How can A match B when A shorter than B?"
);
sRet
=
sURL
.
copy
(
prefix
.
getLength
());
sOldPattern
=
*
aIter
;
}
}
...
...
@@ -127,11 +129,11 @@ OUString ODsnTypeCollection::getPrefix(const OUString& _sURL) const
WildCard
aWildCard
(
*
aIter
);
if
(
sOldPattern
.
getLength
()
<
aIter
->
getLength
()
&&
aWildCard
.
Matches
(
sURL
)
)
{
if
(
aIter
->
getLength
()
<
sURL
.
getLength
()
)
sRet
=
aIter
->
copy
(
0
,
sURL
.
match
(
*
aIter
));
else
sRet
=
sURL
.
copy
(
0
,
aIter
->
match
(
sURL
)
);
sRet
=
comphelper
::
string
::
stripEnd
(
sRet
,
'*'
);
// This relies on the fact that all patterns are of the form
// foo*
// that is, the very concept of "prefix" applies.
sRet
=
comphelper
::
string
::
stripEnd
(
*
aIter
,
'*'
);
OSL_ENSURE
(
sRet
.
getLength
()
<=
sURL
.
getLength
(),
"How can A match B when A shorter than B?"
);
sOldPattern
=
*
aIter
;
}
}
...
...
@@ -344,21 +346,15 @@ DATASOURCE_TYPE ODsnTypeCollection::determineType(const OUString& _rDsn) const
OSL_FAIL
(
"ODsnTypeCollection::implDetermineType : missing the colon !"
);
return
DST_UNKNOWN
;
}
// find first :
sal_Int32
nOracleSeparator
=
sDsn
.
indexOf
(
static_cast
<
sal_Unicode
>
(
':'
),
nSeparator
+
1
);
if
(
-
1
!=
nOracleSeparator
)
{
nOracleSeparator
=
sDsn
.
indexOf
(
static_cast
<
sal_Unicode
>
(
':'
),
nOracleSeparator
+
1
);
if
(
-
1
!=
nOracleSeparator
&&
sDsn
.
equalsIgnoreAsciiCaseAsciiL
(
"jdbc:oracle:thin"
,
nOracleSeparator
))
return
DST_ORACLE_JDBC
;
}
if
(
sDsn
.
startsWithIgnoreAsciiCase
(
"jdbc:oracle:thin:"
))
return
DST_ORACLE_JDBC
;
if
(
sDsn
.
equalsIgnoreAsciiCaseAsciiL
(
"jdbc"
,
nSeparator
))
if
(
sDsn
.
startsWithIgnoreAsciiCase
(
"jdbc:"
))
return
DST_JDBC
;
if
(
sDsn
.
equalsIgnoreAsciiCase
AsciiL
(
"sdbc:embedded:hsqldb"
,
sDsn
.
getLength
()
))
if
(
sDsn
.
equalsIgnoreAsciiCase
(
"sdbc:embedded:hsqldb"
))
return
DST_EMBEDDED_HSQLDB
;
// find second :
...
...
@@ -370,16 +366,14 @@ DATASOURCE_TYPE ODsnTypeCollection::determineType(const OUString& _rDsn) const
return
DST_UNKNOWN
;
}
if
(
sDsn
.
equalsIgnoreAsciiCaseAsciiL
(
"sdbc:ado:"
,
nSeparator
))
if
(
sDsn
.
startsWithIgnoreAsciiCase
(
"sdbc:ado:"
))
{
nSeparator
=
sDsn
.
indexOf
(
static_cast
<
sal_Unicode
>
(
':'
),
nSeparator
+
1
);
if
(
-
1
!=
nSeparator
&&
sDsn
.
equalsIgnoreAsciiCaseAsciiL
(
"sdbc:ado:access"
,
nSeparator
)
)
if
(
sDsn
.
startsWithIgnoreAsciiCase
(
"sdbc:ado:access"
))
{
nSeparator
=
sDsn
.
indexOf
(
static_cast
<
sal_Unicode
>
(
';'
),
nSeparator
+
1
);
if
(
-
1
!=
nSeparator
&&
sDsn
.
equalsIgnoreAsciiCaseAsciiL
(
"sdbc:ado:access:Provider=Microsoft.ACE.OLEDB.12.0"
,
nSeparator
)
)
if
(
sDsn
.
equalsIgnoreAsciiCase
(
"sdbc:ado:access:Provider=Microsoft.ACE.OLEDB.12.0;"
))
return
DST_MSACCESS_2007
;
return
DST_MSACCESS
;
else
return
DST_MSACCESS
;
}
return
DST_ADO
;
}
...
...
dbaccess/source/ui/dlg/ConnectionHelper.cxx
Dosyayı görüntüle @
7014a569
...
...
@@ -339,7 +339,7 @@ DBG_NAME(OConnectionHelper)
//-------------------------------------------------------------------------
void
OConnectionHelper
::
impl_setURL
(
const
String
&
_rURL
,
sal_Bool
_bPrefix
)
{
String
sURL
(
_rURL
);
String
sURL
(
comphelper
::
string
::
stripEnd
(
_rURL
,
'*'
)
);
OSL_ENSURE
(
m_pCollection
,
"OConnectionHelper::impl_setURL: have no interpreter for the URLs!"
);
if
(
m_pCollection
&&
sURL
.
Len
()
)
...
...
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