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
d18a0428
Kaydet (Commit)
d18a0428
authored
Ock 23, 2014
tarafından
Matúš Kukan
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
tk: Constructor feature for toolkit::UnoGrid(Control|Model).
Change-Id: Ic512b0b1209d77e32bb4e37ce7fde8dd726e16cf
üst
c9e52cff
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
25 deletions
+30
-25
gridcontrol.cxx
toolkit/source/controls/grid/gridcontrol.cxx
+24
-17
gridcontrol.hxx
toolkit/source/controls/grid/gridcontrol.hxx
+2
-2
registerservices.cxx
toolkit/source/helper/registerservices.cxx
+0
-4
tk.component
toolkit/util/tk.component
+4
-2
No files found.
toolkit/source/controls/grid/gridcontrol.cxx
Dosyayı görüntüle @
d18a0428
...
...
@@ -21,19 +21,23 @@
#include "gridcontrol.hxx"
#include "grideventforwarder.hxx"
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/view/SelectionType.hpp>
#include <com/sun/star/awt/grid/XGridControl.hpp>
#include <com/sun/star/awt/grid/XGridDataModel.hpp>
#include <com/sun/star/awt/grid/XGridRowSelection.hpp>
#include <com/sun/star/awt/grid/XMutableGridDataModel.hpp>
#include <com/sun/star/awt/grid/DefaultGridDataModel.hpp>
#include <com/sun/star/awt/grid/SortableGridDataModel.hpp>
#include <com/sun/star/awt/grid/DefaultGridColumnModel.hpp>
#include <toolkit/helper/unopropertyarrayhelper.hxx>
#include <toolkit/helper/property.hxx>
#include <com/sun/star/awt/XVclWindowPeer.hpp>
#include <comphelper/processfactory.hxx>
#include <tools/diagnose_ex.h>
#include <tools/color.hxx>
#include <toolkit/controls/unocontrolbase.hxx>
#include <toolkit/controls/unocontrolmodel.hxx>
#include <toolkit/helper/listenermultiplexer.hxx>
#include <boost/scoped_ptr.hpp>
using
namespace
::
com
::
sun
::
star
;
using
namespace
::
com
::
sun
::
star
::
uno
;
...
...
@@ -45,11 +49,8 @@ using namespace ::com::sun::star::container;
using
namespace
::
com
::
sun
::
star
::
view
;
using
namespace
::
com
::
sun
::
star
::
util
;
namespace
toolkit
{
//======================================================================================================================
//= UnoGridModel
//======================================================================================================================
namespace
toolkit
{
namespace
{
Reference
<
XGridDataModel
>
lcl_getDefaultDataModel_throw
(
const
Reference
<
XComponentContext
>
&
i_context
)
...
...
@@ -209,7 +210,7 @@ void SAL_CALL UnoGridModel::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle,
//----------------------------------------------------------------------------------------------------------------------
OUString
UnoGridModel
::
getServiceName
()
throw
(
RuntimeException
)
{
return
OUString
::
createFromAscii
(
szServiceName_GridControlModel
);
return
OUString
(
"com.sun.star.awt.grid.UnoControlGridModel"
);
}
//----------------------------------------------------------------------------------------------------------------------
...
...
@@ -218,7 +219,7 @@ Any UnoGridModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const
switch
(
nPropId
)
{
case
BASEPROPERTY_DEFAULTCONTROL
:
return
uno
::
makeAny
(
OUString
::
createFromAscii
(
szServiceName_GridControl
)
);
return
uno
::
makeAny
(
OUString
(
"com.sun.star.awt.grid.UnoControlGrid"
)
);
case
BASEPROPERTY_GRID_SELECTIONMODE
:
return
uno
::
makeAny
(
SelectionType
(
1
)
);
case
BASEPROPERTY_GRID_SHOWROWHEADER
:
...
...
@@ -272,7 +273,7 @@ Reference< XPropertySetInfo > UnoGridModel::getPropertySetInfo( ) throw(Runtime
UnoGridControl
::
UnoGridControl
()
:
UnoGridControl_Base
()
,
m_aSelectionListeners
(
*
this
)
,
m_pEventForwarder
(
new
GridEventForwarder
(
*
this
)
)
,
m_pEventForwarder
(
new
toolkit
::
GridEventForwarder
(
*
this
)
)
{
}
...
...
@@ -308,7 +309,7 @@ void SAL_CALL UnoGridControl::createPeer( const uno::Reference< awt::XToolkit >
//----------------------------------------------------------------------------------------------------------------------
namespace
{
void
lcl_setEventForwarding
(
const
Reference
<
XControlModel
>&
i_gridControlModel
,
const
::
boost
::
scoped_ptr
<
GridEventForwarder
>&
i_listener
,
void
lcl_setEventForwarding
(
const
Reference
<
XControlModel
>&
i_gridControlModel
,
const
::
boost
::
scoped_ptr
<
toolkit
::
GridEventForwarder
>&
i_listener
,
bool
const
i_add
)
{
const
Reference
<
XPropertySet
>
xModelProps
(
i_gridControlModel
,
UNO_QUERY
);
...
...
@@ -444,16 +445,22 @@ void SAL_CALL UnoGridControl::removeSelectionListener(const ::com::sun::star::un
m_aSelectionListeners
.
removeInterface
(
listener
);
}
}
//namespace toolkit
}
Reference
<
XInterface
>
SAL_CALL
GridControl_CreateInstance
(
const
Reference
<
XMultiServiceFactory
>&
)
extern
"C"
SAL_DLLPUBLIC_EXPORT
css
::
uno
::
XInterface
*
SAL_CALL
stardiv_Toolkit_GridControl_get_implementation
(
css
::
uno
::
XComponentContext
*
,
css
::
uno
::
Sequence
<
css
::
uno
::
Any
>
const
&
)
{
return
Reference
<
XInterface
>
(
(
::
cppu
::
OWeakObject
*
)
new
::
toolkit
::
UnoGridControl
()
);
return
cppu
::
acquire
(
new
toolkit
::
UnoGridControl
()
);
}
Reference
<
XInterface
>
SAL_CALL
GridControlModel_CreateInstance
(
const
Reference
<
XMultiServiceFactory
>&
i_factory
)
extern
"C"
SAL_DLLPUBLIC_EXPORT
css
::
uno
::
XInterface
*
SAL_CALL
stardiv_Toolkit_GridControlModel_get_implementation
(
css
::
uno
::
XComponentContext
*
context
,
css
::
uno
::
Sequence
<
css
::
uno
::
Any
>
const
&
)
{
return
Reference
<
XInterface
>
(
(
::
cppu
::
OWeakObject
*
)
new
::
toolkit
::
UnoGridModel
(
comphelper
::
getComponentContext
(
i_factory
)
)
);
return
cppu
::
acquire
(
new
toolkit
::
UnoGridModel
(
context
)
);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
toolkit/source/controls/grid/gridcontrol.hxx
Dosyayı görüntüle @
d18a0428
...
...
@@ -65,7 +65,7 @@ public:
void
SAL_CALL
setFastPropertyValue_NoBroadcast
(
sal_Int32
nHandle
,
const
::
com
::
sun
::
star
::
uno
::
Any
&
rValue
)
throw
(
::
com
::
sun
::
star
::
uno
::
Exception
);
// XServiceInfo
DECLIMPL_SERVICEINFO_DERIVED
(
UnoGridModel
,
UnoControlModel
,
szServiceName_GridControlModel
)
DECLIMPL_SERVICEINFO_DERIVED
(
UnoGridModel
,
UnoControlModel
,
"com.sun.star.awt.grid.UnoControlGridModel"
)
};
...
...
@@ -108,7 +108,7 @@ public:
virtual
void
SAL_CALL
removeSelectionListener
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
awt
::
grid
::
XGridSelectionListener
>
&
listener
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
// ::com::sun::star::lang::XServiceInfo
DECLIMPL_SERVICEINFO_DERIVED
(
UnoGridControl
,
UnoControlBase
,
szServiceName_GridControl
)
DECLIMPL_SERVICEINFO_DERIVED
(
UnoGridControl
,
UnoControlBase
,
"com.sun.star.awt.grid.UnoControlGrid"
)
using
UnoControl
::
getPeer
;
...
...
toolkit/source/helper/registerservices.cxx
Dosyayı görüntüle @
d18a0428
...
...
@@ -174,8 +174,6 @@ IMPL_CREATE_INSTANCE_WITH_GEOMETRY( UnoControlDialogModel )
extern
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
uno
::
XInterface
>
SAL_CALL
TreeControl_CreateInstance
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
lang
::
XMultiServiceFactory
>&
);
extern
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
uno
::
XInterface
>
SAL_CALL
TreeControlModel_CreateInstance
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
lang
::
XMultiServiceFactory
>&
);
extern
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
uno
::
XInterface
>
SAL_CALL
MutableTreeDataModel_CreateInstance
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
lang
::
XMultiServiceFactory
>&
);
extern
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
uno
::
XInterface
>
SAL_CALL
GridControl_CreateInstance
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
lang
::
XMultiServiceFactory
>&
);
extern
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
uno
::
XInterface
>
SAL_CALL
GridControlModel_CreateInstance
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
lang
::
XMultiServiceFactory
>&
);
extern
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
uno
::
XInterface
>
SAL_CALL
DefaultGridDataModel_CreateInstance
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
lang
::
XMultiServiceFactory
>&
);
extern
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
uno
::
XInterface
>
SAL_CALL
DefaultGridColumnModel_CreateInstance
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
lang
::
XMultiServiceFactory
>&
);
extern
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
uno
::
XInterface
>
SAL_CALL
GridColumn_CreateInstance
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
lang
::
XMultiServiceFactory
>&
);
...
...
@@ -259,8 +257,6 @@ TOOLKIT_DLLPUBLIC void* SAL_CALL tk_component_getFactory( const sal_Char* sImple
GET_FACTORY
(
MutableTreeDataModel
,
szServiceName_MutableTreeDataModel
,
NULL
)
GET_FACTORY
(
UnoFixedHyperlinkControl
,
szServiceName_UnoControlFixedHyperlink
,
NULL
)
GET_FACTORY
(
UnoControlFixedHyperlinkModel
,
szServiceName_UnoControlFixedHyperlinkModel
,
NULL
)
GET_FACTORY
(
GridControl
,
szServiceName_GridControl
,
NULL
);
GET_FACTORY
(
GridControlModel
,
szServiceName_GridControlModel
,
NULL
);
GET_FACTORY
(
DefaultGridDataModel
,
szServiceName_DefaultGridDataModel
,
NULL
);
GET_FACTORY
(
DefaultGridColumnModel
,
szServiceName_DefaultGridColumnModel
,
NULL
);
GET_FACTORY_WITH_IMPL_PREFIX
(
GridColumn
,
"org.openoffice.comp.toolkit"
,
szServiceName_GridColumn
,
NULL
);
...
...
toolkit/util/tk.component
Dosyayı görüntüle @
d18a0428
...
...
@@ -55,10 +55,12 @@
<implementation
name=
"org.openoffice.comp.toolkit.SortableGridDataModel"
>
<service
name=
"com.sun.star.awt.grid.SortableGridDataModel"
/>
</implementation>
<implementation
name=
"stardiv.Toolkit.GridControl"
>
<implementation
name=
"stardiv.Toolkit.GridControl"
constructor=
"stardiv_Toolkit_GridControl_get_implementation"
>
<service
name=
"com.sun.star.awt.grid.UnoControlGrid"
/>
</implementation>
<implementation
name=
"stardiv.Toolkit.GridControlModel"
>
<implementation
name=
"stardiv.Toolkit.GridControlModel"
constructor=
"stardiv_Toolkit_GridControlModel_get_implementation"
>
<service
name=
"com.sun.star.awt.grid.UnoControlGridModel"
/>
</implementation>
<implementation
name=
"stardiv.Toolkit.MutableTreeDataModel"
>
...
...
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