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
495111b2
Kaydet (Commit)
495111b2
authored
Ara 03, 2012
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fdo#46808, use service constructor for sdb::DatabaseContext
Change-Id: I4d845f289f324912b0fc4d8e26a2947e2d2f889e
üst
1faac459
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
15 additions
and
29 deletions
+15
-29
databasecontext.cxx
dbaccess/source/core/dataaccess/databasecontext.cxx
+1
-1
stringconstants.hrc
dbaccess/source/inc/stringconstants.hrc
+0
-1
stringconstants.inc
dbaccess/source/inc/stringconstants.inc
+0
-1
genericcontroller.cxx
dbaccess/source/ui/browser/genericcontroller.cxx
+3
-5
DbAdminImpl.cxx
dbaccess/source/ui/dlg/DbAdminImpl.cxx
+2
-6
formcomponenthandler.cxx
extensions/source/propctrlr/formcomponenthandler.cxx
+8
-12
formstrings.hxx
extensions/source/propctrlr/formstrings.hxx
+0
-1
addresstemplate.cxx
svtools/source/dialogs/addresstemplate.cxx
+1
-2
No files found.
dbaccess/source/core/dataaccess/databasecontext.cxx
Dosyayı görüntüle @
495111b2
...
...
@@ -218,7 +218,7 @@ Reference< XInterface > ODatabaseContext::Create(const Reference< XComponentCont
Sequence
<
rtl
::
OUString
>
ODatabaseContext
::
getSupportedServiceNames_static
(
void
)
throw
(
RuntimeException
)
{
Sequence
<
::
rtl
::
OUString
>
aSNS
(
1
);
aSNS
[
0
]
=
SERVICE_SDB_DATABASECONTEXT
;
aSNS
[
0
]
=
"com.sun.star.sdb.DatabaseContext"
;
return
aSNS
;
}
...
...
dbaccess/source/inc/stringconstants.hrc
Dosyayı görüntüle @
495111b2
...
...
@@ -355,7 +355,6 @@ DECLARE_CONSTASCII_USTRING(SERVICE_SDB_COLUMNSETTINGS);
DECLARE_CONSTASCII_USTRING(SERVICE_SDB_RESULTCOLUMN);
DECLARE_CONSTASCII_USTRING(SERVICE_SDB_DATACOLUMN);
DECLARE_CONSTASCII_USTRING(SERVICE_SDB_DATAACCESSCONNECTION);
DECLARE_CONSTASCII_USTRING(SERVICE_SDB_DATABASECONTEXT);
DECLARE_CONSTASCII_USTRING(SERVICE_SDB_DATASOURCE);
DECLARE_CONSTASCII_USTRING(SERVICE_SDB_ROWSET);
DECLARE_CONSTASCII_USTRING(SERVICE_SDB_RESULTSET);
...
...
dbaccess/source/inc/stringconstants.inc
Dosyayı görüntüle @
495111b2
...
...
@@ -193,7 +193,6 @@ IMPLEMENT_CONSTASCII_USTRING(SERVICE_SDBCX_COLUMNDESCRIPTOR, "com.sun.star.sdbcx
IMPLEMENT_CONSTASCII_USTRING
(
SERVICE_SDB_COLUMNSETTINGS
,
"com.sun.star.sdb.ColumnSettings"
);
IMPLEMENT_CONSTASCII_USTRING
(
SERVICE_SDB_RESULTCOLUMN
,
"com.sun.star.sdb.ResultColumn"
);
IMPLEMENT_CONSTASCII_USTRING
(
SERVICE_SDB_DATACOLUMN
,
"com.sun.star.sdb.DataColumn"
);
IMPLEMENT_CONSTASCII_USTRING
(
SERVICE_SDB_DATABASECONTEXT
,
"com.sun.star.sdb.DatabaseContext"
);
IMPLEMENT_CONSTASCII_USTRING
(
SERVICE_SDB_DATASOURCE
,
"com.sun.star.sdb.DataSource"
);
IMPLEMENT_CONSTASCII_USTRING
(
SERVICE_SDB_RESULTSET
,
"com.sun.star.sdb.ResultSet"
);
IMPLEMENT_CONSTASCII_USTRING
(
SERVICE_SDB_ROWSET
,
"com.sun.star.sdb.RowSet"
);
...
...
dbaccess/source/ui/browser/genericcontroller.cxx
Dosyayı görüntüle @
495111b2
...
...
@@ -258,15 +258,13 @@ sal_Bool OGenericUnoController::Construct(Window* /*pParent*/)
{
m_xDatabaseContext
=
DatabaseContext
::
create
(
comphelper
::
getComponentContext
(
getORB
()));
}
catch
(
Exception
&
)
catch
(
const
Exception
&
)
{
OSL_FAIL
(
"OGenericUnoController::Construct: could not create (or start listening at) the database context!"
);
// at least notify the user. Though the whole component does not make any sense without the database context ...
ShowServiceNotAvailableError
(
getView
(),
String
(
"com.sun.star.sdb.DatabaseContext"
),
sal_True
);
}
if
(
!
m_xDatabaseContext
.
is
())
{
// at least notify the user. Though the whole component does not make any sense without the database context ...
ShowServiceNotAvailableError
(
getView
(),
String
(
SERVICE_SDB_DATABASECONTEXT
),
sal_True
);
}
return
sal_True
;
}
//------------------------------------------------------------------------------
...
...
dbaccess/source/ui/dlg/DbAdminImpl.cxx
Dosyayı görüntüle @
495111b2
...
...
@@ -210,13 +210,9 @@ ODbDataSourceAdministrationHelper::ODbDataSourceAdministrationHelper(const Refer
{
m_xDatabaseContext
=
DatabaseContext
::
create
(
comphelper
::
getComponentContext
(
m_xORB
));
}
catch
(
Exception
&
)
{
}
if
(
!
m_xDatabaseContext
.
is
()
)
catch
(
const
Exception
&
)
{
ShowServiceNotAvailableError
(
_pParent
->
GetParent
(),
String
(
SERVICE_SDB_DATABASECONTEXT
),
sal_True
);
ShowServiceNotAvailableError
(
_pParent
->
GetParent
(),
String
(
"com.sun.star.sdb.DatabaseContext"
),
sal_True
);
}
}
//-------------------------------------------------------------------------
...
...
extensions/source/propctrlr/formcomponenthandler.cxx
Dosyayı görüntüle @
495111b2
...
...
@@ -45,6 +45,7 @@
#include <com/sun/star/container/XChild.hpp>
#include <com/sun/star/sdbc/XConnection.hpp>
#include <com/sun/star/sdb/CommandType.hpp>
#include <com/sun/star/sdb/DatabaseContext.hpp>
#include <com/sun/star/form/XGridColumnFactory.hpp>
#include <com/sun/star/sdb/SQLContext.hpp>
#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
...
...
@@ -527,9 +528,8 @@ namespace pcr
if
(
!
sControlValue
.
isEmpty
()
)
{
Reference
<
XNameAccess
>
xDatabaseContext
;
m_aContext
.
createComponent
(
(
::
rtl
::
OUString
)
SERVICE_DATABASE_CONTEXT
,
xDatabaseContext
);
if
(
!
xDatabaseContext
.
is
()
||
!
xDatabaseContext
->
hasByName
(
sControlValue
)
)
Reference
<
XDatabaseContext
>
xDatabaseContext
=
sdb
::
DatabaseContext
::
create
(
m_aContext
.
getUNOContext
()
);
if
(
!
xDatabaseContext
->
hasByName
(
sControlValue
)
)
{
::
svt
::
OFileNotation
aTransformer
(
sControlValue
);
aPropertyValue
<<=
::
rtl
::
OUString
(
aTransformer
.
get
(
::
svt
::
OFileNotation
::
N_URL
)
);
...
...
@@ -1360,15 +1360,11 @@ namespace pcr
::
std
::
vector
<
::
rtl
::
OUString
>
aListEntries
;
Reference
<
XNameAccess
>
xDatabaseContext
;
m_aContext
.
createComponent
(
(
rtl
::
OUString
)
SERVICE_DATABASE_CONTEXT
,
xDatabaseContext
);
if
(
xDatabaseContext
.
is
())
{
Sequence
<
::
rtl
::
OUString
>
aDatasources
=
xDatabaseContext
->
getElementNames
();
aListEntries
.
resize
(
aDatasources
.
getLength
()
);
::
std
::
copy
(
aDatasources
.
getConstArray
(),
aDatasources
.
getConstArray
()
+
aDatasources
.
getLength
(),
aListEntries
.
begin
()
);
}
Reference
<
XDatabaseContext
>
xDatabaseContext
=
sdb
::
DatabaseContext
::
create
(
m_aContext
.
getUNOContext
()
);
Sequence
<
::
rtl
::
OUString
>
aDatasources
=
xDatabaseContext
->
getElementNames
();
aListEntries
.
resize
(
aDatasources
.
getLength
()
);
::
std
::
copy
(
aDatasources
.
getConstArray
(),
aDatasources
.
getConstArray
()
+
aDatasources
.
getLength
(),
aListEntries
.
begin
()
);
aDescriptor
.
Control
=
PropertyHandlerHelper
::
createComboBoxControl
(
_rxControlFactory
,
aListEntries
,
sal_False
,
sal_True
);
}
...
...
extensions/source/propctrlr/formstrings.hxx
Dosyayı görüntüle @
495111b2
...
...
@@ -280,7 +280,6 @@ namespace pcr
PCR_CONSTASCII_STRING
(
SERVICE_COMPONENT_GROUPBOX
,
"com.sun.star.form.component.GroupBox"
);
PCR_CONSTASCII_STRING
(
SERVICE_COMPONENT_FIXEDTEXT
,
"com.sun.star.form.component.FixedText"
);
PCR_CONSTASCII_STRING
(
SERVICE_COMPONENT_FORMATTEDFIELD
,
"com.sun.star.form.component.FormattedField"
);
PCR_CONSTASCII_STRING
(
SERVICE_DATABASE_CONTEXT
,
"com.sun.star.sdb.DatabaseContext"
);
PCR_CONSTASCII_STRING
(
SERVICE_TEXT_DOCUMENT
,
"com.sun.star.text.TextDocument"
);
PCR_CONSTASCII_STRING
(
SERVICE_WEB_DOCUMENT
,
"com.sun.star.text.WebDocument"
);
...
...
svtools/source/dialogs/addresstemplate.cxx
Dosyayı görüntüle @
495111b2
...
...
@@ -793,8 +793,7 @@ void AssignmentPersistentData::Commit()
{
m_xDatabaseContext
=
DatabaseContext
::
create
(
comphelper
::
getComponentContext
(
m_xORB
));
}
catch
(
Exception
&
)
{
}
if
(
!
m_xDatabaseContext
.
is
())
catch
(
const
Exception
&
)
{
const
rtl
::
OUString
sContextServiceName
(
"com.sun.star.sdb.DatabaseContext"
);
ShowServiceNotAvailableError
(
this
,
sContextServiceName
,
sal_False
);
...
...
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