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
ce744c84
Kaydet (Commit)
ce744c84
authored
Mar 12, 2010
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
cmcfixes73: #i110068# unify headers in one place
üst
cd8457ee
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
38 additions
and
17 deletions
+38
-17
makefile.mk
mysqlc/source/makefile.mk
+3
-0
mysqlc_connection.cxx
mysqlc/source/mysqlc_connection.cxx
+6
-4
mysqlc_connection.hxx
mysqlc/source/mysqlc_connection.hxx
+2
-0
mysqlc_databasemetadata.cxx
mysqlc/source/mysqlc_databasemetadata.cxx
+0
-0
mysqlc_databasemetadata.hxx
mysqlc/source/mysqlc_databasemetadata.hxx
+4
-2
mysqlc_driver.cxx
mysqlc/source/mysqlc_driver.cxx
+2
-0
mysqlc_driver.hxx
mysqlc/source/mysqlc_driver.hxx
+2
-0
mysqlc_general.cxx
mysqlc/source/mysqlc_general.cxx
+3
-3
mysqlc_general.hxx
mysqlc/source/mysqlc_general.hxx
+4
-2
mysqlc_preparedstatement.cxx
mysqlc/source/mysqlc_preparedstatement.cxx
+5
-5
mysqlc_preparedstatement.hxx
mysqlc/source/mysqlc_preparedstatement.hxx
+2
-0
mysqlc_resultsetmetadata.hxx
mysqlc/source/mysqlc_resultsetmetadata.hxx
+3
-1
mysqlc_statement.hxx
mysqlc/source/mysqlc_statement.hxx
+2
-0
No files found.
mysqlc/source/makefile.mk
Dosyayı görüntüle @
ce744c84
...
@@ -116,6 +116,9 @@ CDEFS+=-DCPPDBC_EXPORTS -DCPPCONN_LIB_BUILD
...
@@ -116,6 +116,9 @@ CDEFS+=-DCPPDBC_EXPORTS -DCPPCONN_LIB_BUILD
CDEFS
+=
-DCPPCONN_LIB
=
\"
$(DLLPRE)
mysqlcppconn
$(DLLPOST)
\"
CDEFS
+=
-DCPPCONN_LIB
=
\"
$(DLLPRE)
mysqlcppconn
$(DLLPOST)
\"
.ELSE
.ELSE
CDEFS
+=
-DCPPCONN_LIB
=
\"
$(
shell
readlink
/usr/lib/libmysqlcppconn.so
)
\"
CDEFS
+=
-DCPPCONN_LIB
=
\"
$(
shell
readlink
/usr/lib/libmysqlcppconn.so
)
\"
.IF
"$(USE_SYSTEM_STL)"
!=
"YES"
CDEFS
+=
-DADAPT_EXT_STL
.ENDIF
.ENDIF
.ENDIF
# --------------- MySQL settings ------------------
# --------------- MySQL settings ------------------
...
...
mysqlc/source/mysqlc_connection.cxx
Dosyayı görüntüle @
ce744c84
...
@@ -26,11 +26,13 @@
...
@@ -26,11 +26,13 @@
* for a copy of the LGPLv3 License.
* for a copy of the LGPLv3 License.
************************************************************************/
************************************************************************/
#include <tools/preextstl.h>
#include <cppconn/driver.h>
#include <cppconn/driver.h>
#include <cppconn/connection.h>
#include <cppconn/connection.h>
#include <cppconn/statement.h>
#include <cppconn/statement.h>
#include <cppconn/metadata.h>
#include <cppconn/metadata.h>
#include <cppconn/exception.h>
#include <cppconn/exception.h>
#include <tools/postextstl.h>
#include "mysqlc_connection.hxx"
#include "mysqlc_connection.hxx"
#include "mysqlc_databasemetadata.hxx"
#include "mysqlc_databasemetadata.hxx"
...
@@ -186,10 +188,10 @@ void OConnection::construct(const OUString& url, const Sequence< PropertyValue >
...
@@ -186,10 +188,10 @@ void OConnection::construct(const OUString& url, const Sequence< PropertyValue >
if
(
bEmbedded
==
sal_False
)
{
if
(
bEmbedded
==
sal_False
)
{
try
{
try
{
sql
::
ConnectOptionsMap
connProps
;
sql
::
ConnectOptionsMap
connProps
;
std
::
string
host_str
=
OUStringToOString
(
aHostName
,
m_settings
.
encoding
).
getStr
();
ext_
std
::
string
host_str
=
OUStringToOString
(
aHostName
,
m_settings
.
encoding
).
getStr
();
std
::
string
user_str
=
OUStringToOString
(
aUser
,
m_settings
.
encoding
).
getStr
();
ext_
std
::
string
user_str
=
OUStringToOString
(
aUser
,
m_settings
.
encoding
).
getStr
();
std
::
string
pass_str
=
OUStringToOString
(
aPass
,
m_settings
.
encoding
).
getStr
();
ext_
std
::
string
pass_str
=
OUStringToOString
(
aPass
,
m_settings
.
encoding
).
getStr
();
std
::
string
schema_str
=
OUStringToOString
(
aDbName
,
m_settings
.
encoding
).
getStr
();
ext_
std
::
string
schema_str
=
OUStringToOString
(
aDbName
,
m_settings
.
encoding
).
getStr
();
connProps
[
"hostName"
]
=
sql
::
ConnectPropertyVal
(
host_str
);
connProps
[
"hostName"
]
=
sql
::
ConnectPropertyVal
(
host_str
);
connProps
[
"userName"
]
=
sql
::
ConnectPropertyVal
(
user_str
);
connProps
[
"userName"
]
=
sql
::
ConnectPropertyVal
(
user_str
);
connProps
[
"password"
]
=
sql
::
ConnectPropertyVal
(
pass_str
);
connProps
[
"password"
]
=
sql
::
ConnectPropertyVal
(
pass_str
);
...
...
mysqlc/source/mysqlc_connection.hxx
Dosyayı görüntüle @
ce744c84
...
@@ -46,7 +46,9 @@
...
@@ -46,7 +46,9 @@
#include <com/sun/star/sdbc/XWarningsSupplier.hpp>
#include <com/sun/star/sdbc/XWarningsSupplier.hpp>
#include <com/sun/star/util/XStringSubstitution.hpp>
#include <com/sun/star/util/XStringSubstitution.hpp>
#include <tools/preextstl.h>
#include <cppconn/driver.h>
#include <cppconn/driver.h>
#include <tools/postextstl.h>
#include <cppuhelper/compbase3.hxx>
#include <cppuhelper/compbase3.hxx>
#include <cppuhelper/weakref.hxx>
#include <cppuhelper/weakref.hxx>
#include <rtl/string.hxx>
#include <rtl/string.hxx>
...
...
mysqlc/source/mysqlc_databasemetadata.cxx
Dosyayı görüntüle @
ce744c84
This diff is collapsed.
Click to expand it.
mysqlc/source/mysqlc_databasemetadata.hxx
Dosyayı görüntüle @
ce744c84
...
@@ -39,7 +39,9 @@
...
@@ -39,7 +39,9 @@
#include <cppuhelper/implbase1.hxx>
#include <cppuhelper/implbase1.hxx>
#endif
#endif
#include <tools/preextstl.h>
#include <cppconn/metadata.h>
#include <cppconn/metadata.h>
#include <tools/postextstl.h>
namespace
connectivity
namespace
connectivity
{
{
...
@@ -67,8 +69,8 @@ namespace connectivity
...
@@ -67,8 +69,8 @@ namespace connectivity
bool
identifier_quote_string_set
;
bool
identifier_quote_string_set
;
private
:
private
:
OUString
impl_getStringMetaData
(
const
sal_Char
*
_methodName
,
const
std
::
string
&
(
sql
::
DatabaseMetaData
::*
_Method
)()
);
OUString
impl_getStringMetaData
(
const
sal_Char
*
_methodName
,
const
ext_
std
::
string
&
(
sql
::
DatabaseMetaData
::*
_Method
)()
);
OUString
impl_getStringMetaData
(
const
sal_Char
*
_methodName
,
std
::
string
(
sql
::
DatabaseMetaData
::*
_Method
)()
);
OUString
impl_getStringMetaData
(
const
sal_Char
*
_methodName
,
ext_
std
::
string
(
sql
::
DatabaseMetaData
::*
_Method
)()
);
OUString
impl_getStringMetaData
(
const
sal_Char
*
_methodName
,
const
sql
::
SQLString
&
(
sql
::
DatabaseMetaData
::*
_Method
)()
);
OUString
impl_getStringMetaData
(
const
sal_Char
*
_methodName
,
const
sql
::
SQLString
&
(
sql
::
DatabaseMetaData
::*
_Method
)()
);
OUString
impl_getStringMetaData
(
const
sal_Char
*
_methodName
,
sql
::
SQLString
(
sql
::
DatabaseMetaData
::*
_Method
)()
);
OUString
impl_getStringMetaData
(
const
sal_Char
*
_methodName
,
sql
::
SQLString
(
sql
::
DatabaseMetaData
::*
_Method
)()
);
sal_Int32
impl_getInt32MetaData
(
const
sal_Char
*
_methodName
,
unsigned
int
(
sql
::
DatabaseMetaData
::*
_Method
)()
);
sal_Int32
impl_getInt32MetaData
(
const
sal_Char
*
_methodName
,
unsigned
int
(
sql
::
DatabaseMetaData
::*
_Method
)()
);
...
...
mysqlc/source/mysqlc_driver.cxx
Dosyayı görüntüle @
ce744c84
...
@@ -38,11 +38,13 @@ using namespace connectivity::mysqlc;
...
@@ -38,11 +38,13 @@ using namespace connectivity::mysqlc;
using
::
rtl
::
OUString
;
using
::
rtl
::
OUString
;
#include <stdio.h>
#include <stdio.h>
#include <tools/preextstl.h>
#include <cppconn/exception.h>
#include <cppconn/exception.h>
#ifdef SYSTEM_MYSQL_CPPCONN
#ifdef SYSTEM_MYSQL_CPPCONN
#include <mysql_driver.h>
#include <mysql_driver.h>
#endif
#endif
#include <tools/postextstl.h>
/* {{{ MysqlCDriver::MysqlCDriver() -I- */
/* {{{ MysqlCDriver::MysqlCDriver() -I- */
...
...
mysqlc/source/mysqlc_driver.hxx
Dosyayı görüntüle @
ce744c84
...
@@ -36,7 +36,9 @@
...
@@ -36,7 +36,9 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <cppuhelper/compbase2.hxx>
#include <cppuhelper/compbase2.hxx>
#include <tools/preextstl.h>
#include <cppconn/driver.h>
#include <cppconn/driver.h>
#include <tools/postextstl.h>
#include <osl/module.h>
#include <osl/module.h>
namespace
connectivity
namespace
connectivity
...
...
mysqlc/source/mysqlc_general.cxx
Dosyayı görüntüle @
ce744c84
...
@@ -162,14 +162,14 @@ int mysqlToOOOType(int cppConnType)
...
@@ -162,14 +162,14 @@ int mysqlToOOOType(int cppConnType)
}
}
::
rtl
::
OUString
convert
(
const
::
std
::
string
&
_string
,
const
rtl_TextEncoding
encoding
)
::
rtl
::
OUString
convert
(
const
::
ext_
std
::
string
&
_string
,
const
rtl_TextEncoding
encoding
)
{
{
return
::
rtl
::
OUString
(
_string
.
c_str
(),
_string
.
size
(),
encoding
);
return
::
rtl
::
OUString
(
_string
.
c_str
(),
_string
.
size
(),
encoding
);
}
}
::
std
::
string
convert
(
const
::
rtl
::
OUString
&
_string
,
const
rtl_TextEncoding
encoding
)
::
ext_
std
::
string
convert
(
const
::
rtl
::
OUString
&
_string
,
const
rtl_TextEncoding
encoding
)
{
{
return
::
std
::
string
(
::
rtl
::
OUStringToOString
(
_string
,
encoding
).
getStr
()
);
return
::
ext_
std
::
string
(
::
rtl
::
OUStringToOString
(
_string
,
encoding
).
getStr
()
);
}
}
...
...
mysqlc/source/mysqlc_general.hxx
Dosyayı görüntüle @
ce744c84
...
@@ -30,7 +30,9 @@
...
@@ -30,7 +30,9 @@
#ifndef _MYSQLC_GENERAL_
#ifndef _MYSQLC_GENERAL_
#define _MYSQLC_GENERAL_
#define _MYSQLC_GENERAL_
#include <tools/preextstl.h>
#include <cppconn/exception.h>
#include <cppconn/exception.h>
#include <tools/postextstl.h>
#include <com/sun/star/uno/XInterface.hpp>
#include <com/sun/star/uno/XInterface.hpp>
#include <com/sun/star/sdbc/SQLException.hpp>
#include <com/sun/star/sdbc/SQLException.hpp>
...
@@ -58,9 +60,9 @@ namespace mysqlc_sdbc_driver
...
@@ -58,9 +60,9 @@ namespace mysqlc_sdbc_driver
int
mysqlToOOOType
(
int
mysqlType
)
throw
();
int
mysqlToOOOType
(
int
mysqlType
)
throw
();
::
rtl
::
OUString
convert
(
const
::
std
::
string
&
_string
,
const
rtl_TextEncoding
encoding
);
::
rtl
::
OUString
convert
(
const
::
ext_
std
::
string
&
_string
,
const
rtl_TextEncoding
encoding
);
::
std
::
string
convert
(
const
::
rtl
::
OUString
&
_string
,
const
rtl_TextEncoding
encoding
);
::
ext_
std
::
string
convert
(
const
::
rtl
::
OUString
&
_string
,
const
rtl_TextEncoding
encoding
);
}
}
#endif
#endif
mysqlc/source/mysqlc_preparedstatement.cxx
Dosyayı görüntüle @
ce744c84
...
@@ -234,7 +234,7 @@ void SAL_CALL OPreparedStatement::setString(sal_Int32 parameter, const OUString&
...
@@ -234,7 +234,7 @@ void SAL_CALL OPreparedStatement::setString(sal_Int32 parameter, const OUString&
checkParameterIndex
(
parameter
);
checkParameterIndex
(
parameter
);
try
{
try
{
std
::
string
stringie
(
::
rtl
::
OUStringToOString
(
x
,
m_pConnection
->
getConnectionEncoding
()).
getStr
());
ext_
std
::
string
stringie
(
::
rtl
::
OUStringToOString
(
x
,
m_pConnection
->
getConnectionEncoding
()).
getStr
());
((
sql
::
PreparedStatement
*
)
cppStatement
)
->
setString
(
parameter
,
stringie
);
((
sql
::
PreparedStatement
*
)
cppStatement
)
->
setString
(
parameter
,
stringie
);
}
catch
(
sql
::
MethodNotImplementedException
)
{
}
catch
(
sql
::
MethodNotImplementedException
)
{
mysqlc_sdbc_driver
::
throwFeatureNotImplementedException
(
"OPreparedStatement::clearParameters"
,
*
this
);
mysqlc_sdbc_driver
::
throwFeatureNotImplementedException
(
"OPreparedStatement::clearParameters"
,
*
this
);
...
@@ -344,7 +344,7 @@ void SAL_CALL OPreparedStatement::setDate(sal_Int32 parameter, const Date& aData
...
@@ -344,7 +344,7 @@ void SAL_CALL OPreparedStatement::setDate(sal_Int32 parameter, const Date& aData
checkDisposed
(
OPreparedStatement
::
rBHelper
.
bDisposed
);
checkDisposed
(
OPreparedStatement
::
rBHelper
.
bDisposed
);
checkParameterIndex
(
parameter
);
checkParameterIndex
(
parameter
);
std
::
string
dateStr
;
ext_
std
::
string
dateStr
;
char
buf
[
20
];
char
buf
[
20
];
dateStr
.
append
(
my_i_to_a
(
buf
,
sizeof
(
buf
)
-
1
,
aData
.
Year
));
dateStr
.
append
(
my_i_to_a
(
buf
,
sizeof
(
buf
)
-
1
,
aData
.
Year
));
dateStr
.
append
(
"-"
,
1
);
dateStr
.
append
(
"-"
,
1
);
...
@@ -372,7 +372,7 @@ void SAL_CALL OPreparedStatement::setTime(sal_Int32 parameter, const Time& aVal)
...
@@ -372,7 +372,7 @@ void SAL_CALL OPreparedStatement::setTime(sal_Int32 parameter, const Time& aVal)
checkDisposed
(
OPreparedStatement
::
rBHelper
.
bDisposed
);
checkDisposed
(
OPreparedStatement
::
rBHelper
.
bDisposed
);
checkParameterIndex
(
parameter
);
checkParameterIndex
(
parameter
);
std
::
string
timeStr
;
ext_
std
::
string
timeStr
;
char
buf
[
20
];
char
buf
[
20
];
timeStr
.
append
(
my_i_to_a
(
buf
,
sizeof
(
buf
)
-
1
,
aVal
.
Hours
));
timeStr
.
append
(
my_i_to_a
(
buf
,
sizeof
(
buf
)
-
1
,
aVal
.
Hours
));
timeStr
.
append
(
":"
,
1
);
timeStr
.
append
(
":"
,
1
);
...
@@ -400,7 +400,7 @@ void SAL_CALL OPreparedStatement::setTimestamp(sal_Int32 parameter, const DateTi
...
@@ -400,7 +400,7 @@ void SAL_CALL OPreparedStatement::setTimestamp(sal_Int32 parameter, const DateTi
checkDisposed
(
OPreparedStatement
::
rBHelper
.
bDisposed
);
checkDisposed
(
OPreparedStatement
::
rBHelper
.
bDisposed
);
checkParameterIndex
(
parameter
);
checkParameterIndex
(
parameter
);
std
::
string
timeStr
;
ext_
std
::
string
timeStr
;
char
buf
[
20
];
char
buf
[
20
];
timeStr
.
append
(
my_i_to_a
(
buf
,
sizeof
(
buf
)
-
1
,
aVal
.
Year
));
timeStr
.
append
(
my_i_to_a
(
buf
,
sizeof
(
buf
)
-
1
,
aVal
.
Year
));
timeStr
.
append
(
"-"
,
1
);
timeStr
.
append
(
"-"
,
1
);
...
@@ -805,7 +805,7 @@ void SAL_CALL OPreparedStatement::setBytes(sal_Int32 parameter, const Sequence<
...
@@ -805,7 +805,7 @@ void SAL_CALL OPreparedStatement::setBytes(sal_Int32 parameter, const Sequence<
checkDisposed
(
OPreparedStatement
::
rBHelper
.
bDisposed
);
checkDisposed
(
OPreparedStatement
::
rBHelper
.
bDisposed
);
checkParameterIndex
(
parameter
);
checkParameterIndex
(
parameter
);
std
::
string
blobby
((
char
*
)
x
.
getConstArray
(),
x
.
getLength
());
ext_
std
::
string
blobby
((
char
*
)
x
.
getConstArray
(),
x
.
getLength
());
try
{
try
{
((
sql
::
PreparedStatement
*
)
cppStatement
)
->
setString
(
parameter
,
blobby
);
((
sql
::
PreparedStatement
*
)
cppStatement
)
->
setString
(
parameter
,
blobby
);
}
catch
(
sql
::
MethodNotImplementedException
)
{
}
catch
(
sql
::
MethodNotImplementedException
)
{
...
...
mysqlc/source/mysqlc_preparedstatement.hxx
Dosyayı görüntüle @
ce744c84
...
@@ -48,7 +48,9 @@
...
@@ -48,7 +48,9 @@
#include <com/sun/star/io/XInputStream.hpp>
#include <com/sun/star/io/XInputStream.hpp>
#endif
#endif
#include <tools/preextstl.h>
#include <cppconn/prepared_statement.h>
#include <cppconn/prepared_statement.h>
#include <tools/postextstl.h>
namespace
connectivity
namespace
connectivity
{
{
...
...
mysqlc/source/mysqlc_resultsetmetadata.hxx
Dosyayı görüntüle @
ce744c84
...
@@ -35,7 +35,9 @@
...
@@ -35,7 +35,9 @@
#include <com/sun/star/sdbc/XResultSetMetaData.hpp>
#include <com/sun/star/sdbc/XResultSetMetaData.hpp>
#include <cppuhelper/implbase1.hxx>
#include <cppuhelper/implbase1.hxx>
#include <tools/preextstl.h>
#include <cppconn/resultset_metadata.h>
#include <cppconn/resultset_metadata.h>
#include <tools/postextstl.h>
namespace
connectivity
namespace
connectivity
{
{
...
@@ -62,7 +64,7 @@ namespace connectivity
...
@@ -62,7 +64,7 @@ namespace connectivity
{
{
}
}
inline
::
rtl
::
OUString
convert
(
const
::
std
::
string
&
_string
)
const
inline
::
rtl
::
OUString
convert
(
const
::
ext_
std
::
string
&
_string
)
const
{
{
return
::
rtl
::
OUString
(
_string
.
c_str
(),
_string
.
size
(),
m_encoding
);
return
::
rtl
::
OUString
(
_string
.
c_str
(),
_string
.
size
(),
m_encoding
);
}
}
...
...
mysqlc/source/mysqlc_statement.hxx
Dosyayı görüntüle @
ce744c84
...
@@ -13,7 +13,9 @@
...
@@ -13,7 +13,9 @@
#include <com/sun/star/sdbc/XWarningsSupplier.hpp>
#include <com/sun/star/sdbc/XWarningsSupplier.hpp>
#include <com/sun/star/util/XCancellable.hpp>
#include <com/sun/star/util/XCancellable.hpp>
#include <tools/preextstl.h>
#include <cppconn/statement.h>
#include <cppconn/statement.h>
#include <tools/postextstl.h>
#include <cppuhelper/compbase5.hxx>
#include <cppuhelper/compbase5.hxx>
#include <list>
#include <list>
...
...
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