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
a3261b16
Kaydet (Commit)
a3261b16
authored
Ock 11, 2012
tarafından
Lionel Elie Mamane
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fdo#44283: finish 8a17792f2e5 (Handle/invalid column ID cleanup)
üst
34219bd5
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
29 additions
and
33 deletions
+29
-33
brwbox1.cxx
svtools/source/brwbox/brwbox1.cxx
+9
-13
brwbox2.cxx
svtools/source/brwbox/brwbox2.cxx
+12
-10
brwbox3.cxx
svtools/source/brwbox/brwbox3.cxx
+1
-1
brwhead.cxx
svtools/source/brwbox/brwhead.cxx
+1
-1
datwin.cxx
svtools/source/brwbox/datwin.cxx
+1
-1
editbrowsebox.cxx
svtools/source/brwbox/editbrowsebox.cxx
+5
-7
No files found.
svtools/source/brwbox/brwbox1.cxx
Dosyayı görüntüle @
a3261b16
...
...
@@ -307,9 +307,9 @@ void BrowseBox::InsertDataColumn( sal_uInt16 nItemId, const XubString& rText,
if
(
getDataWindow
()
->
pHeaderBar
)
{
// Handle
column nicht in der Header
bar
// Handle
column not in the header
bar
sal_uInt16
nHeaderPos
=
nPos
;
if
(
nHeaderPos
!=
HEADERBAR_APPEND
&&
!
GetColumnId
(
0
)
)
if
(
nHeaderPos
!=
HEADERBAR_APPEND
&&
GetColumnId
(
0
)
==
HandleColumnId
)
nHeaderPos
--
;
getDataWindow
()
->
pHeaderBar
->
InsertItem
(
nItemId
,
rText
,
nWidth
,
nBits
,
nHeaderPos
);
...
...
@@ -347,7 +347,7 @@ void BrowseBox::FreezeColumn( sal_uInt16 nItemId, sal_Bool bFreeze )
DBG_CHKTHIS
(
BrowseBox
,
BrowseBoxCheckInvariants
);
// never unfreeze the handle-column
if
(
nItemId
==
0
&&
!
bFreeze
)
if
(
nItemId
==
HandleColumnId
&&
!
bFreeze
)
return
;
// get the position in the current array
...
...
@@ -424,12 +424,8 @@ void BrowseBox::FreezeColumn( sal_uInt16 nItemId, sal_Bool bFreeze )
void
BrowseBox
::
SetColumnPos
(
sal_uInt16
nColumnId
,
sal_uInt16
nPos
)
{
// never set pos of the handle-column
if
(
nColumnId
==
0
)
return
;
// do not move handle column
if
(
nPos
==
0
&&
!
(
*
pCols
)[
0
]
->
GetId
())
// never set pos of the handle column
if
(
nColumnId
==
HandleColumnId
)
return
;
// get the position in the current array
...
...
@@ -504,7 +500,7 @@ void BrowseBox::SetColumnPos( sal_uInt16 nColumnId, sal_uInt16 nPos )
if
(
getDataWindow
()
->
pHeaderBar
)
{
sal_uInt16
nNewPos
=
nPos
;
if
(
!
GetColumnId
(
0
)
)
if
(
GetColumnId
(
0
)
==
HandleColumnId
)
--
nNewPos
;
getDataWindow
()
->
pHeaderBar
->
MoveItem
(
nColumnId
,
nNewPos
);
}
...
...
@@ -550,7 +546,7 @@ void BrowseBox::SetColumnTitle( sal_uInt16 nItemId, const String& rTitle )
DBG_CHKTHIS
(
BrowseBox
,
BrowseBoxCheckInvariants
);
// never set title of the handle-column
if
(
nItemId
==
0
)
if
(
nItemId
==
HandleColumnId
)
return
;
// get the position in the current array
...
...
@@ -2383,8 +2379,8 @@ void BrowseBox::SetMode( BrowserMode nMode )
if
(
pDataWin
)
pDataWin
->
Invalidate
();
//
kein Cursor auf Handle-C
olumn
if
(
nCurColId
==
0
)
//
no cursor on handle c
olumn
if
(
nCurColId
==
HandleColumnId
)
nCurColId
=
GetColumnId
(
1
);
m_nCurrentMode
=
nMode
;
...
...
svtools/source/brwbox/brwbox2.cxx
Dosyayı görüntüle @
a3261b16
...
...
@@ -416,8 +416,8 @@ void BrowseBox::DrawCursor()
else
bReallyHide
|=
(
GetCursorHideCount
()
>
0
);
//
keine Cursor auf Handle-C
olumn
if
(
nCurColId
==
0
)
//
no cursor on handle c
olumn
if
(
nCurColId
==
HandleColumnId
)
nCurColId
=
GetColumnId
(
1
);
// Cursor-Rechteck berechnen
...
...
@@ -1682,8 +1682,8 @@ void BrowseBox::MouseButtonDown( const BrowserMouseEvent& rEvt )
// DataRow?
if
(
rEvt
.
GetRow
()
>=
0
)
{
//
Zeilenselek
tion?
if
(
rEvt
.
GetColumnId
()
==
0
||
!
bColumnCursor
)
//
line selec
tion?
if
(
rEvt
.
GetColumnId
()
==
HandleColumnId
||
!
bColumnCursor
)
{
if
(
bMultiSelection
)
{
...
...
@@ -1757,7 +1757,7 @@ void BrowseBox::MouseButtonDown( const BrowserMouseEvent& rEvt )
}
else
{
if
(
bMultiSelection
&&
rEvt
.
GetColumnId
()
==
0
)
if
(
bMultiSelection
&&
rEvt
.
GetColumnId
()
==
HandleColumnId
)
{
// toggle all-selection
if
(
uRow
.
pSel
->
GetSelectCount
()
>
(
GetRowCount
()
/
2
)
)
...
...
@@ -1990,7 +1990,7 @@ void BrowseBox::Dispatch( sal_uInt16 nId )
if
(
bColumnCursor
)
{
sal_uInt16
nNewId
=
GetColumnId
(
ColCount
()
-
1
);
bDone
=
(
nNewId
!=
0
)
&&
GoToColumnId
(
nNewId
);
bDone
=
nNewId
!=
HandleColumnId
&&
GoToColumnId
(
nNewId
);
break
;
}
case
BROWSER_CURSORENDOFFILE
:
...
...
@@ -2001,11 +2001,13 @@ void BrowseBox::Dispatch( sal_uInt16 nId )
{
sal_uInt16
nNewPos
=
GetColumnPos
(
GetCurColumnId
()
)
+
1
;
sal_uInt16
nNewId
=
GetColumnId
(
nNewPos
);
if
(
nNewId
!=
0
)
// Am Zeilenende
?
if
(
nNewId
!=
BROWSER_INVALIDID
)
// At end of row
?
bDone
=
GoToColumnId
(
nNewId
);
else
{
sal_uInt16
nColId
=
(
GetColumnId
(
0
)
==
0
)
?
GetColumnId
(
1
)
:
GetColumnId
(
0
);
sal_uInt16
nColId
=
GetColumnId
(
0
);
if
(
nColId
==
BROWSER_INVALIDID
||
nColId
==
HandleColumnId
)
nColId
=
GetColumnId
(
1
);
if
(
GetRowCount
()
)
bDone
=
(
nCurRow
<
GetRowCount
()
-
1
)
&&
GoToRowColumnId
(
nCurRow
+
1
,
nColId
);
else
if
(
ColCount
()
)
...
...
@@ -2019,7 +2021,7 @@ void BrowseBox::Dispatch( sal_uInt16 nId )
if
(
bColumnCursor
)
{
sal_uInt16
nNewId
=
GetColumnId
(
1
);
bDone
=
(
nNewId
!=
0
)
&&
GoToColumnId
(
nNewId
);
bDone
=
(
nNewId
!=
HandleColumnId
)
&&
GoToColumnId
(
nNewId
);
break
;
}
case
BROWSER_CURSORTOPOFFILE
:
...
...
@@ -2030,7 +2032,7 @@ void BrowseBox::Dispatch( sal_uInt16 nId )
{
sal_uInt16
nNewPos
=
GetColumnPos
(
GetCurColumnId
()
)
-
1
;
sal_uInt16
nNewId
=
GetColumnId
(
nNewPos
);
if
(
nNewId
!=
0
)
if
(
nNewId
!=
HandleColumnId
)
bDone
=
GoToColumnId
(
nNewId
);
else
{
...
...
svtools/source/brwbox/brwbox3.cxx
Dosyayı görüntüle @
a3261b16
...
...
@@ -450,7 +450,7 @@ sal_uInt16 BrowseBox::GetCurrColumn() const
// -----------------------------------------------------------------------------
sal_Bool
BrowseBox
::
HasRowHeader
()
const
{
return
(
GetColumnId
(
0
)
==
0
);
// HandleColumn == RowHeader
return
(
GetColumnId
(
0
)
==
HandleColumnId
);
// HandleColumn == RowHeader
}
// -----------------------------------------------------------------------------
sal_Bool
BrowseBox
::
IsCellFocusable
()
const
...
...
svtools/source/brwbox/brwhead.cxx
Dosyayı görüntüle @
a3261b16
...
...
@@ -97,7 +97,7 @@ void BrowserHeader::EndDrag()
sal_uInt16
nOldPos
=
_pBrowseBox
->
GetColumnPos
(
nId
),
nNewPos
=
GetItemPos
(
nId
);
if
(
!
_pBrowseBox
->
GetColumnId
(
0
))
// Handle
if
(
_pBrowseBox
->
GetColumnId
(
0
)
==
BrowseBox
::
HandleColumnId
)
nNewPos
++
;
if
(
nOldPos
!=
nNewPos
)
...
...
svtools/source/brwbox/datwin.cxx
Dosyayı görüntüle @
a3261b16
...
...
@@ -459,7 +459,7 @@ sal_Bool BrowserDataWin::ImplRowDividerHitTest( const BrowserMouseEvent& _rEvent
if
(
!
(
GetParent
()
->
IsInteractiveRowHeightEnabled
()
&&
(
_rEvent
.
GetRow
()
>=
0
)
&&
(
_rEvent
.
GetRow
()
<
GetParent
()
->
GetRowCount
()
)
&&
(
_rEvent
.
GetColumnId
()
==
0
)
&&
(
_rEvent
.
GetColumnId
()
==
BrowseBox
::
HandleColumnId
)
)
)
return
sal_False
;
...
...
svtools/source/brwbox/editbrowsebox.cxx
Dosyayı görüntüle @
a3261b16
...
...
@@ -72,8 +72,6 @@ namespace svt
using
com
::
sun
::
star
::
accessibility
::
XAccessible
;
//==================================================================
#define HANDLE_ID 0
//==================================================================
//= EditBrowserHeader
//==================================================================
...
...
@@ -270,7 +268,7 @@ namespace svt
void
EditBrowseBox
::
PaintField
(
OutputDevice
&
rDev
,
const
Rectangle
&
rRect
,
sal_uInt16
nColumnId
)
const
{
if
(
nColumnId
==
H
ANDLE_ID
)
if
(
nColumnId
==
H
andleColumnId
)
{
if
(
bPaintStatus
)
PaintStatusCell
(
rDev
,
rRect
);
...
...
@@ -506,7 +504,7 @@ namespace svt
LINK
(
this
,
EditBrowseBox
,
CellModifiedHdl
).
Call
(
NULL
);
}
if
(
0
==
rEvt
.
GetColumnId
()
)
if
(
rEvt
.
GetColumnId
()
==
HandleColumnId
)
{
// it was the handle column. save the current cell content if necessary
// (clicking on the handle column results in selecting the current row)
if
(
IsEditing
()
&&
aController
->
IsModified
())
...
...
@@ -877,7 +875,7 @@ namespace svt
if
(
GetSelectColumnCount
()
||
(
aMouseEvent
.
Is
()
&&
aMouseEvent
->
GetRow
()
<
0
))
nInfo
|=
COLSELECT
;
if
((
GetSelection
()
!=
NULL
&&
GetSelectRowCount
())
||
(
aMouseEvent
.
Is
()
&&
aMouseEvent
->
GetColumnId
()
==
H
ANDLE_ID
))
(
aMouseEvent
.
Is
()
&&
aMouseEvent
->
GetColumnId
()
==
H
andleColumnId
))
nInfo
|=
ROWSELECT
;
if
(
!
nInfo
&&
nNewRow
!=
nEditRow
)
nInfo
|=
ROWCHANGE
;
...
...
@@ -1027,7 +1025,7 @@ namespace svt
return
;
}
if
(
nEditRow
>=
0
&&
nEditCol
>
H
ANDLE_ID
)
if
(
nEditRow
>=
0
&&
nEditCol
>
H
andleColumnId
)
{
aController
=
GetController
(
nRow
,
nCol
);
if
(
aController
.
Is
())
...
...
@@ -1247,7 +1245,7 @@ namespace svt
{
// when double clicking on the column, the optimum size will be calculated
sal_uInt16
nColId
=
rEvt
.
GetColumnId
();
if
(
nColId
!=
H
ANDLE_ID
)
if
(
nColId
!=
H
andleColumnId
)
SetColumnWidth
(
nColId
,
GetAutoColumnWidth
(
nColId
));
}
...
...
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