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
0164d670
Kaydet (Commit)
0164d670
authored
Ara 20, 2013
tarafından
Jürgen Schmidt
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#120065# apply patch for Enabled property in grid model
Patch By: hanya Review By: jsc
üst
ebd2922e
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
55 additions
and
5 deletions
+55
-5
tablemodel.hxx
svtools/inc/svtools/table/tablemodel.hxx
+4
-0
gridtablerenderer.cxx
svtools/source/table/gridtablerenderer.cxx
+11
-5
tablecontrol_impl.cxx
svtools/source/table/tablecontrol_impl.cxx
+4
-0
svtxgridcontrol.cxx
svtools/source/uno/svtxgridcontrol.cxx
+14
-0
svtxgridcontrol.hxx
svtools/source/uno/svtxgridcontrol.hxx
+3
-0
unocontroltablemodel.cxx
svtools/source/uno/unocontroltablemodel.cxx
+17
-0
unocontroltablemodel.hxx
svtools/source/uno/unocontroltablemodel.hxx
+2
-0
No files found.
svtools/inc/svtools/table/tablemodel.hxx
Dosyayı görüntüle @
0164d670
...
...
@@ -529,6 +529,10 @@ namespace svt { namespace table
*/
virtual
ITableDataSort
*
getSortAdapter
()
=
0
;
/** returns enabled state.
*/
virtual
bool
isEnabled
()
const
=
0
;
/// destroys the table model instance
virtual
~
ITableModel
()
{
}
};
...
...
svtools/source/table/gridtablerenderer.cxx
Dosyayı görüntüle @
0164d670
...
...
@@ -277,7 +277,9 @@ namespace svt { namespace table
_rDevice
.
SetTextColor
(
textColor
);
Rectangle
const
aTextRect
(
lcl_getTextRenderingArea
(
lcl_getContentArea
(
*
m_pImpl
,
_rArea
)
)
);
sal_uLong
const
nDrawTextFlags
=
lcl_getAlignmentTextDrawFlags
(
*
m_pImpl
,
_nCol
)
|
TEXT_DRAW_CLIP
;
sal_uLong
nDrawTextFlags
=
lcl_getAlignmentTextDrawFlags
(
*
m_pImpl
,
_nCol
)
|
TEXT_DRAW_CLIP
;
if
(
!
m_pImpl
->
rModel
.
isEnabled
()
)
nDrawTextFlags
|=
TEXT_DRAW_DISABLE
;
_rDevice
.
DrawText
(
aTextRect
,
sHeaderText
,
nDrawTextFlags
);
::
boost
::
optional
<
::
Color
>
const
aLineColor
(
m_pImpl
->
rModel
.
getLineColor
()
);
...
...
@@ -413,7 +415,9 @@ namespace svt { namespace table
_rDevice
.
SetTextColor
(
textColor
);
Rectangle
const
aTextRect
(
lcl_getTextRenderingArea
(
lcl_getContentArea
(
*
m_pImpl
,
_rArea
)
)
);
sal_uLong
const
nDrawTextFlags
=
lcl_getAlignmentTextDrawFlags
(
*
m_pImpl
,
0
)
|
TEXT_DRAW_CLIP
;
sal_uLong
nDrawTextFlags
=
lcl_getAlignmentTextDrawFlags
(
*
m_pImpl
,
0
)
|
TEXT_DRAW_CLIP
;
if
(
!
m_pImpl
->
rModel
.
isEnabled
()
)
nDrawTextFlags
|=
TEXT_DRAW_DISABLE
;
// TODO: is using the horizontal alignment of the 0'th column a good idea here? This is pretty ... arbitray ..
_rDevice
.
DrawText
(
aTextRect
,
rowTitle
,
nDrawTextFlags
);
}
...
...
@@ -517,8 +521,8 @@ namespace svt { namespace table
}
else
imageSize
.
Height
()
=
i_context
.
aContentArea
.
GetHeight
()
-
1
;
i_context
.
rDevice
.
DrawImage
(
imagePos
,
imageSize
,
i_image
,
0
);
sal_uInt16
const
nStyle
=
m_pImpl
->
rModel
.
isEnabled
()
?
0
:
IMAGE_DRAW_DISABLE
;
i_context
.
rDevice
.
DrawImage
(
imagePos
,
imageSize
,
i_image
,
nStyle
);
}
//------------------------------------------------------------------------------------------------------------------
...
...
@@ -563,7 +567,9 @@ namespace svt { namespace table
}
Rectangle
const
textRect
(
lcl_getTextRenderingArea
(
i_context
.
aContentArea
)
);
sal_uLong
const
nDrawTextFlags
=
lcl_getAlignmentTextDrawFlags
(
*
m_pImpl
,
i_context
.
nColumn
)
|
TEXT_DRAW_CLIP
;
sal_uLong
nDrawTextFlags
=
lcl_getAlignmentTextDrawFlags
(
*
m_pImpl
,
i_context
.
nColumn
)
|
TEXT_DRAW_CLIP
;
if
(
!
m_pImpl
->
rModel
.
isEnabled
()
)
nDrawTextFlags
|=
TEXT_DRAW_DISABLE
;
i_context
.
rDevice
.
DrawText
(
textRect
,
i_text
,
nDrawTextFlags
);
}
...
...
svtools/source/table/tablecontrol_impl.cxx
Dosyayı görüntüle @
0164d670
...
...
@@ -219,6 +219,10 @@ namespace svt { namespace table
{
return
NULL
;
}
virtual
bool
isEnabled
()
const
{
return
true
;
}
virtual
void
getCellContent
(
ColPos
const
i_col
,
RowPos
const
i_row
,
::
com
::
sun
::
star
::
uno
::
Any
&
o_cellContent
)
{
(
void
)
i_row
;
...
...
svtools/source/uno/svtxgridcontrol.cxx
Dosyayı görüntüle @
0164d670
...
...
@@ -854,6 +854,20 @@ void SVTXGridControl::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent
VCLXWindow
::
ProcessWindowEvent
(
rVclWindowEvent
);
}
//----------------------------------------------------------------------------------------------------------------------
void
SVTXGridControl
::
setEnable
(
sal_Bool
bEnable
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
)
{
::
vos
::
OGuard
aGuard
(
GetMutex
()
);
m_pTableModel
->
setEnabled
(
bEnable
);
Window
*
pWindow
=
GetWindow
();
if
(
pWindow
)
{
pWindow
->
Enable
(
bEnable
,
sal_True
);
pWindow
->
EnableInput
(
bEnable
);
pWindow
->
Invalidate
();
}
}
//----------------------------------------------------------------------------------------------------------------------
void
SVTXGridControl
::
ImplCallItemListeners
()
{
...
...
svtools/source/uno/svtxgridcontrol.hxx
Dosyayı görüntüle @
0164d670
...
...
@@ -106,6 +106,9 @@ public:
// ::com::sun::star::lang::XComponent
void
SAL_CALL
dispose
(
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
// XWindow
void
SAL_CALL
setEnable
(
sal_Bool
bEnable
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
protected
:
// VCLXWindow
virtual
void
SetWindow
(
Window
*
pWindow
);
...
...
svtools/source/uno/unocontroltablemodel.cxx
Dosyayı görüntüle @
0164d670
...
...
@@ -102,6 +102,7 @@ namespace svt { namespace table
::
boost
::
optional
<
::
Color
>
m_aTextLineColor
;
::
boost
::
optional
<
::
std
::
vector
<
::
Color
>
>
m_aRowColors
;
VerticalAlignment
m_eVerticalAlign
;
bool
bEnabled
;
ModellListeners
m_aListeners
;
WeakReference
<
XGridDataModel
>
m_aDataModel
;
WeakReference
<
XGridColumnModel
>
m_aColumnModel
;
...
...
@@ -128,6 +129,7 @@ namespace svt { namespace table
,
m_aTextLineColor
(
)
,
m_aRowColors
(
)
,
m_eVerticalAlign
(
VerticalAlignment_TOP
)
,
bEnabled
(
true
)
{
}
};
...
...
@@ -166,6 +168,7 @@ namespace svt { namespace table
DBG_CTOR
(
UnoControlTableModel
,
UnoControlTableModel_checkInvariants
);
m_pImpl
->
bHasColumnHeaders
=
true
;
m_pImpl
->
bHasRowHeaders
=
false
;
m_pImpl
->
bEnabled
=
true
;
m_pImpl
->
pRenderer
.
reset
(
new
GridTableRenderer
(
*
this
)
);
m_pImpl
->
pInputHandler
.
reset
(
new
DefaultInputHandler
);
}
...
...
@@ -814,6 +817,20 @@ namespace svt { namespace table
return
NULL
;
}
//------------------------------------------------------------------------------------------------------------------
bool
UnoControlTableModel
::
isEnabled
()
const
{
DBG_CHECK_ME
();
return
m_pImpl
->
bEnabled
;
}
//------------------------------------------------------------------------------------------------------------------
void
UnoControlTableModel
::
setEnabled
(
bool
_bEnabled
)
{
DBG_CHECK_ME
();
m_pImpl
->
bEnabled
=
_bEnabled
;
}
//------------------------------------------------------------------------------------------------------------------
void
UnoControlTableModel
::
sortByColumn
(
ColPos
const
i_column
,
ColumnSortDirection
const
i_sortDirection
)
{
...
...
svtools/source/uno/unocontroltablemodel.hxx
Dosyayı görüntüle @
0164d670
...
...
@@ -96,6 +96,7 @@ namespace svt { namespace table
virtual
::
com
::
sun
::
star
::
style
::
VerticalAlignment
getVerticalAlign
()
const
;
virtual
ITableDataSort
*
getSortAdapter
();
virtual
bool
isEnabled
()
const
;
// ITableDataSort overridables
virtual
void
sortByColumn
(
ColPos
const
i_column
,
ColumnSortDirection
const
i_sortDirection
);
...
...
@@ -139,6 +140,7 @@ namespace svt { namespace table
void
setRowBackgroundColors
(
::
com
::
sun
::
star
::
uno
::
Any
const
&
i_APIValue
);
void
setVerticalAlign
(
::
com
::
sun
::
star
::
style
::
VerticalAlignment
_rAlign
);
void
setEnabled
(
bool
_bEnabled
);
// multiplexing of XGridDataListener events
void
notifyRowsInserted
(
::
com
::
sun
::
star
::
awt
::
grid
::
GridDataEvent
const
&
i_event
)
const
;
...
...
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