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
38b4b759
Kaydet (Commit)
38b4b759
authored
Eki 12, 2015
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
loplugin:mergeclasses, merge OOdbcLibWrapper with OOdbcEnumeration
Change-Id: I2e564e90c11bb46022a5e258ad013aeb2fe4ca2e
üst
ade2ba50
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
54 deletions
+25
-54
mergeclasses.results
compilerplugins/clang/mergeclasses.results
+0
-1
odbcconfig.cxx
dbaccess/source/ui/dlg/odbcconfig.cxx
+7
-19
odbcconfig.hxx
dbaccess/source/ui/dlg/odbcconfig.hxx
+18
-34
No files found.
compilerplugins/clang/mergeclasses.results
Dosyayı görüntüle @
38b4b759
...
...
@@ -110,7 +110,6 @@ merge cppu::PropertySetMixinImpl with cppu::PropertySetMixin
merge dbaccess::IPropertyContainer with dbaccess::OColumn
merge dbaccess::IRefreshListener with dbaccess::OConnection
merge dbaui::IEntryFilter with dbaui::(anonymous namespace)::FilterByEntryDataId
merge dbaui::OOdbcLibWrapper with dbaui::OOdbcEnumeration
merge dbaui::SbaGridListener with dbaui::SbaXDataBrowserController
merge dbmm::IMigrationProgress with dbmm::ProgressPage
merge dbmm::IProgressConsumer with dbmm::ProgressDelegator
...
...
dbaccess/source/ui/dlg/odbcconfig.cxx
Dosyayı görüntüle @
38b4b759
...
...
@@ -69,16 +69,8 @@ typedef SQLRETURN (SQL_API* TSQLDataSources) (SQLHENV EnvironmentHandle, SQLUSMA
#endif
// OOdbcLibWrapper
#ifdef HAVE_ODBC_SUPPORT
OOdbcLibWrapper
::
OOdbcLibWrapper
()
:
m_pOdbcLib
(
NULL
)
{
}
#endif
bool
OOdbc
LibWrapper
::
load
(
const
sal_Char
*
_pLibPath
)
bool
OOdbc
Enumeration
::
load
(
const
sal_Char
*
_pLibPath
)
{
m_sLibPath
=
OUString
::
createFromAscii
(
_pLibPath
);
#ifdef HAVE_ODBC_SUPPORT
...
...
@@ -90,7 +82,7 @@ bool OOdbcLibWrapper::load(const sal_Char* _pLibPath)
#endif
}
void
OOdbc
LibWrapper
::
unload
()
void
OOdbc
Enumeration
::
unload
()
{
#ifdef HAVE_ODBC_SUPPORT
if
(
isLoaded
())
...
...
@@ -101,18 +93,12 @@ void OOdbcLibWrapper::unload()
#endif
}
oslGenericFunction
OOdbc
LibWrapper
::
loadSymbol
(
const
sal_Char
*
_pFunctionName
)
oslGenericFunction
OOdbc
Enumeration
::
loadSymbol
(
const
sal_Char
*
_pFunctionName
)
{
return
osl_getFunctionSymbol
(
m_pOdbcLib
,
OUString
::
createFromAscii
(
_pFunctionName
).
pData
);
}
OOdbcLibWrapper
::~
OOdbcLibWrapper
()
{
unload
();
}
// OOdbcEnumeration
struct
OdbcTypesImpl
{
#ifdef HAVE_ODBC_SUPPORT
...
...
@@ -124,8 +110,9 @@ struct OdbcTypesImpl
};
OOdbcEnumeration
::
OOdbcEnumeration
()
:
m_pOdbcLib
(
NULL
)
#ifdef HAVE_ODBC_SUPPORT
:
m_pAllocHandle
(
NULL
)
,
m_pAllocHandle
(
NULL
)
,
m_pFreeHandle
(
NULL
)
,
m_pSetEnvAttr
(
NULL
)
,
m_pDataSources
(
NULL
)
...
...
@@ -161,9 +148,10 @@ OOdbcEnumeration::~OOdbcEnumeration()
{
freeEnv
();
delete
m_pImpl
;
unload
();
}
// OOdbcEnumeration
bool
OOdbcEnumeration
::
allocEnv
()
{
OSL_ENSURE
(
isLoaded
(),
"OOdbcEnumeration::allocEnv: not loaded!"
);
...
...
dbaccess/source/ui/dlg/odbcconfig.hxx
Dosyayı görüntüle @
38b4b759
...
...
@@ -38,42 +38,13 @@
namespace
dbaui
{
// OOdbcLibWrapper
/** base for helper classes wrapping functionality from an ODBC library
*/
class
OOdbcLibWrapper
{
oslModule
m_pOdbcLib
;
// the library handle
OUString
m_sLibPath
;
// the path to the library
public
:
#ifdef HAVE_ODBC_SUPPORT
bool
isLoaded
()
const
{
return
NULL
!=
m_pOdbcLib
;
}
#else
sal_Bool
isLoaded
()
const
{
return
sal_False
;
}
#endif
OUString
getLibraryName
()
const
{
return
m_sLibPath
;
}
protected
:
#ifndef HAVE_ODBC_SUPPORT
OOdbcLibWrapper
()
:
m_pOdbcLib
(
NULL
)
{
}
#else
OOdbcLibWrapper
();
#endif
~
OOdbcLibWrapper
();
oslGenericFunction
loadSymbol
(
const
sal_Char
*
_pFunctionName
);
/// load the lib
bool
load
(
const
sal_Char
*
_pLibPath
);
/// unload the lib
void
unload
();
};
// OOdbcEnumeration
struct
OdbcTypesImpl
;
class
OOdbcEnumeration
:
public
OOdbcLibWrapper
class
OOdbcEnumeration
{
oslModule
m_pOdbcLib
;
// the library handle
OUString
m_sLibPath
;
// the path to the library
#ifdef HAVE_ODBC_SUPPORT
// entry points for ODBC administration
oslGenericFunction
m_pAllocHandle
;
...
...
@@ -90,11 +61,24 @@ public:
OOdbcEnumeration
();
~
OOdbcEnumeration
();
#ifdef HAVE_ODBC_SUPPORT
bool
isLoaded
()
const
{
return
NULL
!=
m_pOdbcLib
;
}
#else
bool
isLoaded
()
const
{
return
false
;
}
#endif
OUString
getLibraryName
()
const
{
return
m_sLibPath
;
}
void
getDatasourceNames
(
StringBag
&
_rNames
);
protected
:
oslGenericFunction
loadSymbol
(
const
sal_Char
*
_pFunctionName
);
/// load the lib
bool
load
(
const
sal_Char
*
_pLibPath
);
/// unload the lib
void
unload
();
/// ensure that an ODBC environment is allocated
bool
allocEnv
();
bool
allocEnv
();
/// free any allocated ODBC environment
void
freeEnv
();
};
...
...
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