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
f7c94c5b
Kaydet (Commit)
f7c94c5b
authored
Kas 20, 2015
tarafından
Matúš Kukan
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
tdf#74608 dbaccess: Constructor feature for OCommandDefinition
Change-Id: Ibaa1fd8310fdba073190a7721891ebb835eb0e6e
üst
8ac2b6d0
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
49 deletions
+25
-49
commanddefinition.cxx
dbaccess/source/core/dataaccess/commanddefinition.cxx
+15
-34
commanddefinition.hxx
dbaccess/source/core/dataaccess/commanddefinition.hxx
+8
-12
services.hxx
dbaccess/source/core/inc/services.hxx
+0
-1
services.cxx
dbaccess/source/core/misc/services.cxx
+0
-1
dba.component
dbaccess/util/dba.component
+2
-1
No files found.
dbaccess/source/core/dataaccess/commanddefinition.cxx
Dosyayı görüntüle @
f7c94c5b
...
...
@@ -20,29 +20,17 @@
#include "commanddefinition.hxx"
#include "apitools.hxx"
#include "dbastrings.hrc"
#include "module_dba.hxx"
#include "services.hxx"
#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <tools/debug.hxx>
#include <comphelper/sequence.hxx>
using
namespace
::
com
::
sun
::
star
::
uno
;
using
namespace
::
com
::
sun
::
star
::
sdbc
;
using
namespace
::
com
::
sun
::
star
::
lang
;
using
namespace
::
com
::
sun
::
star
::
beans
;
using
namespace
::
com
::
sun
::
star
::
container
;
using
namespace
::
osl
;
using
namespace
::
comphelper
;
using
namespace
::
cppu
;
// OCommandDefinition
extern
"C"
void
SAL_CALL
createRegistryInfo_OCommandDefinition
()
{
static
::
dba
::
OAutoRegistration
<
::
dbaccess
::
OCommandDefinition
>
aAutoRegistration
;
}
namespace
dbaccess
{
...
...
@@ -99,33 +87,18 @@ IMPLEMENT_GETTYPES2(OCommandDefinition,OCommandDefinition_Base,OComponentDefinit
IMPLEMENT_FORWARD_XINTERFACE2
(
OCommandDefinition
,
OComponentDefinition
,
OCommandDefinition_Base
)
IMPLEMENT_PROPERTYCONTAINER_DEFAULTS2
(
OCommandDefinition
,
OCommandDefinition_PROP
)
OUString
OCommandDefinition
::
getImplementationName_static
(
)
throw
(
RuntimeE
xception
)
OUString
SAL_CALL
OCommandDefinition
::
getImplementationName
()
throw
(
RuntimeException
,
std
::
e
xception
)
{
return
OUString
(
"com.sun.star.comp.dba.OCommandDefinition"
);
}
OUString
SAL_CALL
OCommandDefinition
::
getImplementationName
(
)
throw
(
RuntimeException
,
std
::
exception
)
{
return
getImplementationName_static
();
}
Sequence
<
OUString
>
OCommandDefinition
::
getSupportedServiceNames_static
(
)
throw
(
RuntimeException
)
css
::
uno
::
Sequence
<
OUString
>
SAL_CALL
OCommandDefinition
::
getSupportedServiceNames
()
throw
(
RuntimeException
,
std
::
exception
)
{
Sequence
<
OUString
>
aServices
(
3
);
aServices
.
getArray
()[
0
]
=
"com.sun.star.sdb.QueryDefinition"
;
aServices
.
getArray
()[
1
]
=
"com.sun.star.sdb.CommandDefinition"
;
aServices
.
getArray
()[
2
]
=
"com.sun.star.ucb.Content"
;
return
aServices
;
}
Sequence
<
OUString
>
SAL_CALL
OCommandDefinition
::
getSupportedServiceNames
(
)
throw
(
RuntimeException
,
std
::
exception
)
{
return
getSupportedServiceNames_static
();
}
Reference
<
XInterface
>
OCommandDefinition
::
Create
(
const
Reference
<
XComponentContext
>&
_rxContext
)
{
return
*
(
new
OCommandDefinition
(
_rxContext
,
nullptr
,
TContentPtr
(
new
OCommandDefinition_Impl
)
)
);
return
{
"com.sun.star.sdb.QueryDefinition"
,
"com.sun.star.sdb.CommandDefinition"
,
"com.sun.star.ucb.Content"
};
}
void
SAL_CALL
OCommandDefinition
::
rename
(
const
OUString
&
newName
)
throw
(
SQLException
,
ElementExistException
,
RuntimeException
,
std
::
exception
)
...
...
@@ -150,4 +123,12 @@ void SAL_CALL OCommandDefinition::rename( const OUString& newName ) throw (SQLEx
}
// namespace dbaccess
extern
"C"
SAL_DLLPUBLIC_EXPORT
css
::
uno
::
XInterface
*
SAL_CALL
com_sun_star_comp_dba_OCommandDefinition
(
css
::
uno
::
XComponentContext
*
context
,
css
::
uno
::
Sequence
<
css
::
uno
::
Any
>
const
&
)
{
return
cppu
::
acquire
(
new
dbaccess
::
OCommandDefinition
(
context
,
nullptr
,
dbaccess
::
TContentPtr
(
new
dbaccess
::
OCommandDefinition_Impl
)));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
dbaccess/source/core/dataaccess/commanddefinition.hxx
Dosyayı görüntüle @
f7c94c5b
...
...
@@ -58,15 +58,13 @@ class OCommandDefinition : public OComponentDefinition
protected
:
virtual
~
OCommandDefinition
();
OCommandDefinition
(
const
css
::
uno
::
Reference
<
css
::
uno
::
XComponentContext
>&
,
const
css
::
uno
::
Reference
<
css
::
uno
::
XInterface
>&
_xParentContainer
,
const
TContentPtr
&
_pImpl
);
inline
const
OCommandDefinition_Impl
&
getCommandDefinition
()
const
{
return
dynamic_cast
<
const
OCommandDefinition_Impl
&
>
(
*
m_pImpl
.
get
()
);
}
inline
OCommandDefinition_Impl
&
getCommandDefinition
()
{
return
dynamic_cast
<
OCommandDefinition_Impl
&
>
(
*
m_pImpl
.
get
()
);
}
public
:
OCommandDefinition
(
const
css
::
uno
::
Reference
<
css
::
uno
::
XComponentContext
>&
,
const
css
::
uno
::
Reference
<
css
::
uno
::
XInterface
>&
_xParentContainer
,
const
TContentPtr
&
_pImpl
);
OCommandDefinition
(
const
css
::
uno
::
Reference
<
css
::
uno
::
XInterface
>&
_rxContainer
...
...
@@ -87,12 +85,6 @@ public:
virtual
OUString
SAL_CALL
getImplementationName
(
)
throw
(
css
::
uno
::
RuntimeException
,
std
::
exception
)
override
;
virtual
css
::
uno
::
Sequence
<
OUString
>
SAL_CALL
getSupportedServiceNames
(
)
throw
(
css
::
uno
::
RuntimeException
,
std
::
exception
)
override
;
// css::lang::XServiceInfo - static methods
static
css
::
uno
::
Sequence
<
OUString
>
getSupportedServiceNames_static
()
throw
(
css
::
uno
::
RuntimeException
);
static
OUString
getImplementationName_static
()
throw
(
css
::
uno
::
RuntimeException
);
static
css
::
uno
::
Reference
<
css
::
uno
::
XInterface
>
SAL_CALL
Create
(
const
css
::
uno
::
Reference
<
css
::
uno
::
XComponentContext
>&
);
// XRename
virtual
void
SAL_CALL
rename
(
const
OUString
&
newName
)
throw
(
css
::
sdbc
::
SQLException
,
css
::
container
::
ElementExistException
,
css
::
uno
::
RuntimeException
,
std
::
exception
)
override
;
...
...
@@ -125,7 +117,11 @@ public:
{
OComponentDefinition
::
removeEventListener
(
p1
);
}
// OPropertySetHelper
DECLARE_PROPERTYCONTAINER_DEFAULTS
(
);
virtual
css
::
uno
::
Reference
<
css
::
beans
::
XPropertySetInfo
>
SAL_CALL
getPropertySetInfo
()
throw
(
css
::
uno
::
RuntimeException
,
std
::
exception
)
override
;
virtual
cppu
::
IPropertyArrayHelper
&
SAL_CALL
getInfoHelper
()
override
;
virtual
cppu
::
IPropertyArrayHelper
*
createArrayHelper
()
const
override
;
private
:
// helper
...
...
dbaccess/source/core/inc/services.hxx
Dosyayı görüntüle @
f7c94c5b
...
...
@@ -25,7 +25,6 @@
#include <sal/types.h>
extern
"C"
void
SAL_CALL
createRegistryInfo_DataAccessDescriptorFactory
();
extern
"C"
void
SAL_CALL
createRegistryInfo_OCommandDefinition
();
extern
"C"
void
SAL_CALL
createRegistryInfo_OComponentDefinition
();
extern
"C"
void
SAL_CALL
createRegistryInfo_ODatabaseDocument
();
...
...
dbaccess/source/core/misc/services.cxx
Dosyayı görüntüle @
f7c94c5b
...
...
@@ -58,7 +58,6 @@ extern "C" void SAL_CALL createRegistryInfo_DBA()
static
bool
bInit
=
false
;
if
(
!
bInit
)
{
createRegistryInfo_OCommandDefinition
();
createRegistryInfo_OComponentDefinition
();
createRegistryInfo_ODatabaseDocument
();
createRegistryInfo_DataAccessDescriptorFactory
();
...
...
dbaccess/util/dba.component
Dosyayı görüntüle @
f7c94c5b
...
...
@@ -25,7 +25,8 @@
<implementation
name=
"com.sun.star.comp.dba.DataAccessDescriptorFactory"
>
<singleton
name=
"com.sun.star.sdb.DataAccessDescriptorFactory"
/>
</implementation>
<implementation
name=
"com.sun.star.comp.dba.OCommandDefinition"
>
<implementation
name=
"com.sun.star.comp.dba.OCommandDefinition"
constructor=
"com_sun_star_comp_dba_OCommandDefinition"
>
<service
name=
"com.sun.star.sdb.CommandDefinition"
/>
<service
name=
"com.sun.star.sdb.QueryDefinition"
/>
</implementation>
...
...
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