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
63897351
Kaydet (Commit)
63897351
authored
Tem 30, 2013
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
rhbz#989246: Honor user's JavaDriverClass override in mysql driver
Change-Id: Ic7dbddb5b17af0bd23864fd19ab2bd815969d008
üst
24add548
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
11 deletions
+25
-11
YDriver.cxx
connectivity/source/drivers/mysql/YDriver.cxx
+25
-11
No files found.
connectivity/source/drivers/mysql/YDriver.cxx
Dosyayı görüntüle @
63897351
...
@@ -49,6 +49,15 @@ namespace connectivity
...
@@ -49,6 +49,15 @@ namespace connectivity
}
}
}
}
namespace
{
OUString
getJavaDriverClass
(
css
::
uno
::
Sequence
<
css
::
beans
::
PropertyValue
>
const
&
info
)
{
return
comphelper
::
NamedValueCollection
(
info
).
getOrDefault
(
"JavaDriverClass"
,
OUString
(
"com.mysql.jdbc.Driver"
));
}
}
//====================================================================
//====================================================================
//= ODriverDelegator
//= ODriverDelegator
...
@@ -156,9 +165,14 @@ namespace connectivity
...
@@ -156,9 +165,14 @@ namespace connectivity
const
PropertyValue
*
pEnd
=
pSupported
+
info
.
getLength
();
const
PropertyValue
*
pEnd
=
pSupported
+
info
.
getLength
();
aProps
.
reserve
(
info
.
getLength
()
+
5
);
aProps
.
reserve
(
info
.
getLength
()
+
5
);
bool
jdc
=
false
;
for
(;
pSupported
!=
pEnd
;
++
pSupported
)
for
(;
pSupported
!=
pEnd
;
++
pSupported
)
{
{
aProps
.
push_back
(
*
pSupported
);
aProps
.
push_back
(
*
pSupported
);
if
(
pSupported
->
Name
==
"JavaDriverClass"
)
{
jdc
=
true
;
}
}
}
if
(
_eType
==
D_ODBC
)
if
(
_eType
==
D_ODBC
)
...
@@ -176,11 +190,14 @@ namespace connectivity
...
@@ -176,11 +190,14 @@ namespace connectivity
}
}
else
if
(
_eType
==
D_JDBC
)
else
if
(
_eType
==
D_JDBC
)
{
{
aProps
.
push_back
(
PropertyValue
(
if
(
!
jdc
)
OUString
(
"JavaDriverClass"
)
{
,
0
aProps
.
push_back
(
PropertyValue
(
,
makeAny
(
OUString
(
"com.mysql.jdbc.Driver"
))
OUString
(
"JavaDriverClass"
)
,
PropertyState_DIRECT_VALUE
)
);
,
0
,
makeAny
(
OUString
(
"com.mysql.jdbc.Driver"
))
,
PropertyState_DIRECT_VALUE
)
);
}
}
}
else
else
{
{
...
@@ -229,10 +246,7 @@ namespace connectivity
...
@@ -229,10 +246,7 @@ namespace connectivity
}
}
else
else
{
{
::
comphelper
::
NamedValueCollection
aSettings
(
info
);
OUString
sDriverClass
(
getJavaDriverClass
(
info
));
OUString
sDriverClass
(
"com.mysql.jdbc.Driver"
);
sDriverClass
=
aSettings
.
getOrDefault
(
"JavaDriverClass"
,
sDriverClass
);
TJDBCDrivers
::
iterator
aFind
=
m_aJdbcDrivers
.
find
(
sDriverClass
);
TJDBCDrivers
::
iterator
aFind
=
m_aJdbcDrivers
.
find
(
sDriverClass
);
if
(
aFind
==
m_aJdbcDrivers
.
end
()
)
if
(
aFind
==
m_aJdbcDrivers
.
end
()
)
aFind
=
m_aJdbcDrivers
.
insert
(
TJDBCDrivers
::
value_type
(
sDriverClass
,
lcl_loadDriver
(
m_xContext
,
sCuttedUrl
))).
first
;
aFind
=
m_aJdbcDrivers
.
insert
(
TJDBCDrivers
::
value_type
(
sDriverClass
,
lcl_loadDriver
(
m_xContext
,
sCuttedUrl
))).
first
;
...
@@ -318,7 +332,7 @@ namespace connectivity
...
@@ -318,7 +332,7 @@ namespace connectivity
}
}
//--------------------------------------------------------------------
//--------------------------------------------------------------------
Sequence
<
DriverPropertyInfo
>
SAL_CALL
ODriverDelegator
::
getPropertyInfo
(
const
OUString
&
url
,
const
Sequence
<
PropertyValue
>&
/*info*/
)
throw
(
SQLException
,
RuntimeException
)
Sequence
<
DriverPropertyInfo
>
SAL_CALL
ODriverDelegator
::
getPropertyInfo
(
const
OUString
&
url
,
const
Sequence
<
PropertyValue
>&
info
)
throw
(
SQLException
,
RuntimeException
)
{
{
::
std
::
vector
<
DriverPropertyInfo
>
aDriverInfo
;
::
std
::
vector
<
DriverPropertyInfo
>
aDriverInfo
;
if
(
!
acceptsURL
(
url
)
)
if
(
!
acceptsURL
(
url
)
)
...
@@ -350,7 +364,7 @@ namespace connectivity
...
@@ -350,7 +364,7 @@ namespace connectivity
OUString
(
"JavaDriverClass"
)
OUString
(
"JavaDriverClass"
)
,
OUString
(
"The JDBC driver class name."
)
,
OUString
(
"The JDBC driver class name."
)
,
sal_True
,
sal_True
,
OUString
(
"com.mysql.jdbc.Driver"
)
,
getJavaDriverClass
(
info
)
,
Sequence
<
OUString
>
())
,
Sequence
<
OUString
>
())
);
);
}
}
...
...
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