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
660e86f7
Kaydet (Commit)
660e86f7
authored
Agu 01, 2002
tarafından
Ocke Janssen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#101824# correct propertInfo name access
üst
d38c4b1e
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
51 additions
and
32 deletions
+51
-32
DriverPropertyInfo.cxx
connectivity/source/drivers/jdbc/DriverPropertyInfo.cxx
+7
-7
JDriver.cxx
connectivity/source/drivers/jdbc/JDriver.cxx
+28
-15
tools.cxx
connectivity/source/drivers/jdbc/tools.cxx
+5
-2
Object.hxx
connectivity/source/inc/java/lang/Object.hxx
+3
-4
Driver.hxx
connectivity/source/inc/java/sql/Driver.hxx
+5
-2
tools.hxx
connectivity/source/inc/java/tools.hxx
+3
-2
No files found.
connectivity/source/drivers/jdbc/DriverPropertyInfo.cxx
Dosyayı görüntüle @
660e86f7
...
...
@@ -2,9 +2,9 @@
*
* $RCSfile: DriverPropertyInfo.cxx,v $
*
* $Revision: 1.
2
$
* $Revision: 1.
3
$
*
* last change: $Author:
jl $ $Date: 2001-03-20 17:03:17
$
* last change: $Author:
oj $ $Date: 2002-08-01 07:15:14
$
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
...
...
@@ -130,7 +130,7 @@ java_sql_DriverPropertyInfo::operator starsdbc::DriverPropertyInfo()
SDBThreadAttach
t
;
OSL_ENSURE
(
t
.
pEnv
,
"Java Enviroment gelscht worden!"
);
if
(
t
.
pEnv
)
{
jfieldID
id
=
t
.
pEnv
->
GetFieldID
(
java_
lang_Boolean
::
getMyClass
(),
"name"
,
"Ljava/lang/String;"
);
jfieldID
id
=
t
.
pEnv
->
GetFieldID
(
java_
sql_DriverPropertyInfo
::
getMyClass
(),
"name"
,
"Ljava/lang/String;"
);
if
(
id
)
aStr
=
JavaString2String
(
t
.
pEnv
,(
jstring
)
t
.
pEnv
->
GetObjectField
(
object
,
id
));
}
//t.pEnv
...
...
@@ -143,7 +143,7 @@ java_sql_DriverPropertyInfo::operator starsdbc::DriverPropertyInfo()
SDBThreadAttach
t
;
OSL_ENSURE
(
t
.
pEnv
,
"Java Enviroment gelscht worden!"
);
if
(
t
.
pEnv
)
{
jfieldID
id
=
t
.
pEnv
->
GetFieldID
(
java_
lang_Boolean
::
getMyClass
(),
"description"
,
"Ljava/lang/String;"
);
jfieldID
id
=
t
.
pEnv
->
GetFieldID
(
java_
sql_DriverPropertyInfo
::
getMyClass
(),
"description"
,
"Ljava/lang/String;"
);
if
(
id
)
aStr
=
JavaString2String
(
t
.
pEnv
,(
jstring
)
t
.
pEnv
->
GetObjectField
(
object
,
id
));
}
//t.pEnv
...
...
@@ -156,7 +156,7 @@ java_sql_DriverPropertyInfo::operator starsdbc::DriverPropertyInfo()
SDBThreadAttach
t
;
OSL_ENSURE
(
t
.
pEnv
,
"Java Enviroment gelscht worden!"
);
if
(
t
.
pEnv
)
{
jfieldID
id
=
t
.
pEnv
->
GetFieldID
(
java_
lang_Boolean
::
getMyClass
(),
"value"
,
"Ljava/lang/String;"
);
jfieldID
id
=
t
.
pEnv
->
GetFieldID
(
java_
sql_DriverPropertyInfo
::
getMyClass
(),
"value"
,
"Ljava/lang/String;"
);
if
(
id
)
aStr
=
JavaString2String
(
t
.
pEnv
,(
jstring
)
t
.
pEnv
->
GetObjectField
(
object
,
id
));
}
//t.pEnv
...
...
@@ -169,7 +169,7 @@ sal_Bool java_sql_DriverPropertyInfo::required() const
SDBThreadAttach
t
;
OSL_ENSURE
(
t
.
pEnv
,
"Java Enviroment gelscht worden!"
);
if
(
t
.
pEnv
)
{
jfieldID
id
=
t
.
pEnv
->
GetFieldID
(
java_
lang_Boolean
::
getMyClass
(),
"required"
,
"B
"
);
jfieldID
id
=
t
.
pEnv
->
GetFieldID
(
java_
sql_DriverPropertyInfo
::
getMyClass
(),
"required"
,
"Z
"
);
if
(
id
)
out
=
t
.
pEnv
->
GetBooleanField
(
object
,
id
);
}
//t.pEnv
...
...
@@ -181,7 +181,7 @@ Sequence< ::rtl::OUString> java_sql_DriverPropertyInfo::choices() const
SDBThreadAttach
t
;
OSL_ENSURE
(
t
.
pEnv
,
"Java Enviroment gelscht worden!"
);
if
(
t
.
pEnv
)
{
jfieldID
id
=
t
.
pEnv
->
GetFieldID
(
java_
lang_Boolean
::
getMyClass
(),
"choices"
,
"[Ljava/lang/String
"
);
jfieldID
id
=
t
.
pEnv
->
GetFieldID
(
java_
sql_DriverPropertyInfo
::
getMyClass
(),
"choices"
,
"[Ljava/lang/String;
"
);
if
(
id
)
return
copyArrayAndDelete
(
t
.
pEnv
,(
jobjectArray
)
t
.
pEnv
->
GetObjectField
(
object
,
id
),
::
rtl
::
OUString
(),
java_lang_String
(
NULL
,
NULL
));
}
//t.pEnv
...
...
connectivity/source/drivers/jdbc/JDriver.cxx
Dosyayı görüntüle @
660e86f7
...
...
@@ -2,9 +2,9 @@
*
* $RCSfile: JDriver.cxx,v $
*
* $Revision: 1.2
2
$
* $Revision: 1.2
3
$
*
* last change: $Author: oj $ $Date: 2002-08-01 0
6:30:16
$
* last change: $Author: oj $ $Date: 2002-08-01 0
7:15:15
$
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
...
...
@@ -173,17 +173,11 @@ void java_sql_Driver::saveClassRef( jclass pClass )
// der uebergebe Klassen-Handle ist schon global, daher einfach speichern
theClass
=
pClass
;
}
// -------------------------------------------------------------------------
Reference
<
XConnection
>
SAL_CALL
java_sql_Driver
::
connect
(
const
::
rtl
::
OUString
&
url
,
const
Sequence
<
PropertyValue
>&
info
)
throw
(
SQLException
,
RuntimeException
)
// -----------------------------------------------------------------------------
void
java_sql_Driver
::
loadDriverFromProperties
(
const
Sequence
<
PropertyValue
>&
info
,
::
rtl
::
OUString
&
_rsGeneratedValueStatement
,
sal_Bool
&
_rbAutoRetrievingEnabled
)
{
SDBThreadAttach
t
(
getORB
());
OSL_ENSURE
(
t
.
pEnv
,
"Java Enviroment gelscht worden!"
);
if
(
!
t
.
pEnv
)
throw
SQLException
(
::
rtl
::
OUString
::
createFromAscii
(
"No Java installed!"
),
*
this
,
::
rtl
::
OUString
::
createFromAscii
(
"S1000"
),
1000
,
Any
());
Reference
<
XConnection
>
xRet
;
// first try if the jdbc driver is alraedy registered at the driver manager
::
rtl
::
OUString
sGeneratedValueStatement
;
// contains the statement which should be used when query for automatically generated values
sal_Bool
bAutoRetrievingEnabled
=
sal_False
;
// set to when we should allow to query for generated values
SDBThreadAttach
t
(
getORB
());
OSL_ENSURE
(
t
.
pEnv
,
"Java Enviroment gelscht worden!"
);
try
{
if
(
!
object
)
...
...
@@ -219,11 +213,11 @@ Reference< XConnection > SAL_CALL java_sql_Driver::connect( const ::rtl::OUStrin
}
else
if
(
!
pBegin
->
Name
.
compareToAscii
(
"IsAutoRetrievingEnabled"
))
{
pBegin
->
Value
>>=
bAutoRetrievingEnabled
;
pBegin
->
Value
>>=
_r
bAutoRetrievingEnabled
;
}
else
if
(
!
pBegin
->
Name
.
compareToAscii
(
"AutoRetrievingStatement"
))
{
pBegin
->
Value
>>=
sGeneratedValueStatement
;
pBegin
->
Value
>>=
_r
sGeneratedValueStatement
;
}
}
}
...
...
@@ -246,7 +240,20 @@ Reference< XConnection > SAL_CALL java_sql_Driver::connect( const ::rtl::OUStrin
}
::
dbtools
::
throwGenericSQLException
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"The specified driver could not be loaded!"
))
,
*
this
);
}
}
// -------------------------------------------------------------------------
Reference
<
XConnection
>
SAL_CALL
java_sql_Driver
::
connect
(
const
::
rtl
::
OUString
&
url
,
const
Sequence
<
PropertyValue
>&
info
)
throw
(
SQLException
,
RuntimeException
)
{
SDBThreadAttach
t
(
getORB
());
OSL_ENSURE
(
t
.
pEnv
,
"Java Enviroment gelscht worden!"
);
if
(
!
t
.
pEnv
)
throw
SQLException
(
::
rtl
::
OUString
::
createFromAscii
(
"No Java installed!"
),
*
this
,
::
rtl
::
OUString
::
createFromAscii
(
"S1000"
),
1000
,
Any
());
Reference
<
XConnection
>
xRet
;
::
rtl
::
OUString
sGeneratedValueStatement
;
// contains the statement which should be used when query for automatically generated values
sal_Bool
bAutoRetrievingEnabled
=
sal_False
;
// set to when we should allow to query for generated values
loadDriverFromProperties
(
info
,
sGeneratedValueStatement
,
bAutoRetrievingEnabled
);
jobject
out
(
0
);
if
(
t
.
pEnv
)
...
...
@@ -321,8 +328,14 @@ Sequence< DriverPropertyInfo > SAL_CALL java_sql_Driver::getPropertyInfo( const
::
dbtools
::
throwGenericSQLException
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"Invalid URL!"
))
,
*
this
);
SDBThreadAttach
t
(
getORB
());
OSL_ENSURE
(
t
.
pEnv
,
"Java Enviroment gelscht worden!"
);
if
(
!
object
)
object
=
java_sql_DriverManager
::
getDriver
(
url
);
if
(
!
object
)
{
// driver was not loaded so far, load it by name
::
rtl
::
OUString
sGeneratedValueStatement
;
// contains the statement which should be used when query for automatically generated values
sal_Bool
bAutoRetrievingEnabled
=
sal_False
;
// set to when we should allow to query for generated values
loadDriverFromProperties
(
info
,
sGeneratedValueStatement
,
bAutoRetrievingEnabled
);
}
if
(
!
object
)
{
...
...
connectivity/source/drivers/jdbc/tools.cxx
Dosyayı görüntüle @
660e86f7
...
...
@@ -2,9 +2,9 @@
*
* $RCSfile: tools.cxx,v $
*
* $Revision: 1.
9
$
* $Revision: 1.
10
$
*
* last change: $Author: oj $ $Date: 2002-0
5-10 11:37:53
$
* last change: $Author: oj $ $Date: 2002-0
8-01 07:15:16
$
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
...
...
@@ -184,6 +184,9 @@ java_util_Properties* connectivity::createStringPropertyArray(JNIEnv *pEnv,const
if
(
pBegin
->
Name
.
compareToAscii
(
"JavaDriverClass"
)
&&
pBegin
->
Name
.
compareToAscii
(
"CharSet"
)
&&
pBegin
->
Name
.
compareToAscii
(
"ParameterNameSubstitution"
)
&&
pBegin
->
Name
.
compareToAscii
(
"IsPasswordRequired"
)
&&
pBegin
->
Name
.
compareToAscii
(
"IsAutoRetrievingEnabled"
)
&&
pBegin
->
Name
.
compareToAscii
(
"AutoRetrievingStatement"
)
&&
pBegin
->
Name
.
compareToAscii
(
"BooleanComparisonMode"
))
{
::
rtl
::
OUString
aStr
;
...
...
connectivity/source/inc/java/lang/Object.hxx
Dosyayı görüntüle @
660e86f7
...
...
@@ -2,9 +2,9 @@
*
* $RCSfile: Object.hxx,v $
*
* $Revision: 1.
3
$
* $Revision: 1.
4
$
*
* last change: $Author: oj $ $Date: 200
0-12-12 13:34
:23 $
* last change: $Author: oj $ $Date: 200
2-08-01 07:16
:23 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
...
...
@@ -140,8 +140,6 @@ namespace connectivity
static
jclass
theJSbxObjectClass
;
// die Klasse braucht nur einmal angefordert werden !
static
sal_uInt32
nObjCount
;
// Zaehler fuer die Anzahl der Instanzen
static
void
ThrowSQLException
(
JNIEnv
*
pEnv
,
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
uno
::
XInterface
>
&
_rContext
)
throw
(
::
com
::
sun
::
star
::
sdbc
::
SQLException
,
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
public
:
// der Konstruktor, der fuer die abgeleiteten Klassen verwendet
// werden soll.
...
...
@@ -159,6 +157,7 @@ namespace connectivity
::
rtl
::
OUString
toString
();
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
lang
::
XMultiServiceFactory
>
getORB
()
{
return
m_xFactory
;
}
static
void
ThrowSQLException
(
JNIEnv
*
pEnv
,
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
uno
::
XInterface
>
&
_rContext
)
throw
(
::
com
::
sun
::
star
::
sdbc
::
SQLException
,
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
};
}
#endif //_CONNECTIVITY_JAVA_LANG_OBJJECT_HXX_
...
...
connectivity/source/inc/java/sql/Driver.hxx
Dosyayı görüntüle @
660e86f7
...
...
@@ -2,9 +2,9 @@
*
* $RCSfile: Driver.hxx,v $
*
* $Revision: 1.
3
$
* $Revision: 1.
4
$
*
* last change: $Author: oj $ $Date: 2002-0
7-25 07:19:58
$
* last change: $Author: oj $ $Date: 2002-0
8-01 07:16:25
$
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
...
...
@@ -90,6 +90,9 @@ namespace connectivity
static
jclass
theClass
;
// der Destruktor um den Object-Counter zu aktualisieren
static
void
saveClassRef
(
jclass
pClass
);
void
loadDriverFromProperties
(
const
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
com
::
sun
::
star
::
beans
::
PropertyValue
>&
info
,
::
rtl
::
OUString
&
_rsGeneratedValueStatement
,
sal_Bool
&
_rbAutoRetrievingEnabled
);
virtual
~
java_sql_Driver
();
public
:
// only available to set the driver
...
...
connectivity/source/inc/java/tools.hxx
Dosyayı görüntüle @
660e86f7
...
...
@@ -2,9 +2,9 @@
*
* $RCSfile: tools.hxx,v $
*
* $Revision: 1.
3
$
* $Revision: 1.
4
$
*
* last change: $Author: oj $ $Date: 200
1-05-09 12:59:06
$
* last change: $Author: oj $ $Date: 200
2-08-01 07:16:22
$
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
...
...
@@ -111,6 +111,7 @@ namespace connectivity
for
(
jsize
i
=
0
;
i
<
nLen
;
++
i
)
{
JT
xInfo
(
pEnv
,
pEnv
->
GetObjectArrayElement
(
_Array
,
i
));
java_lang_Object
::
ThrowSQLException
(
pEnv
,
NULL
);
xOut
.
getArray
()[
i
]
=
xInfo
;
}
pEnv
->
DeleteLocalRef
(
_Array
);
...
...
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