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
d3d15d51
Kaydet (Commit)
d3d15d51
authored
Haz 04, 2011
tarafından
Rafael Dominguez
Kaydeden (comit)
Markus Mohrhard
Haz 15, 2011
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Refactor PaintRangeFinder to only iterate needed entries.
Added a helper function PaintRangeFinderEntry.
üst
ca3865ba
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
85 additions
and
64 deletions
+85
-64
tabview.hxx
sc/source/ui/inc/tabview.hxx
+13
-0
tabview3.cxx
sc/source/ui/view/tabview3.cxx
+72
-64
No files found.
sc/source/ui/inc/tabview.hxx
Dosyayı görüntüle @
d3d15d51
...
@@ -43,6 +43,7 @@ class ScRowBar;
...
@@ -43,6 +43,7 @@ class ScRowBar;
class
ScColBar
;
class
ScColBar
;
class
ScTabControl
;
class
ScTabControl
;
class
ScTabViewShell
;
class
ScTabViewShell
;
class
ScRangeFindData
;
class
SfxPrinter
;
class
SfxPrinter
;
class
ScDrawView
;
class
ScDrawView
;
class
SvBorder
;
class
SvBorder
;
...
@@ -200,6 +201,18 @@ private:
...
@@ -200,6 +201,18 @@ private:
void
SkipCursorHorizontal
(
SCsCOL
&
rCurX
,
SCsROW
&
rCurY
,
SCsCOL
nOldX
,
SCsROW
nMovX
);
void
SkipCursorHorizontal
(
SCsCOL
&
rCurX
,
SCsROW
&
rCurY
,
SCsCOL
nOldX
,
SCsROW
nMovX
);
void
SkipCursorVertical
(
SCsCOL
&
rCurX
,
SCsROW
&
rCurY
,
SCsROW
nOldY
,
SCsROW
nMovY
);
void
SkipCursorVertical
(
SCsCOL
&
rCurX
,
SCsROW
&
rCurY
,
SCsROW
nOldY
,
SCsROW
nMovY
);
/**
*
* @brief Update marks for a selected Range. This is a helper function
* for PaintRangeFinder.
*
* @param pData: Range to update for painting.
* @param nTab: Current tab.
*
**/
void
PaintRangeFinderEntry
(
ScRangeFindData
*
pData
,
SCTAB
nTab
);
protected
:
protected
:
void
UpdateHeaderWidth
(
const
ScVSplitPos
*
pWhich
=
NULL
,
void
UpdateHeaderWidth
(
const
ScVSplitPos
*
pWhich
=
NULL
,
const
SCROW
*
pPosY
=
NULL
);
const
SCROW
*
pPosY
=
NULL
);
...
...
sc/source/ui/view/tabview3.cxx
Dosyayı görüntüle @
d3d15d51
...
@@ -1940,6 +1940,67 @@ void ScTabView::PaintArea( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCRO
...
@@ -1940,6 +1940,67 @@ void ScTabView::PaintArea( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCRO
// is set (width or height changed).
// is set (width or height changed).
}
}
void
ScTabView
::
PaintRangeFinderEntry
(
ScRangeFindData
*
pData
,
const
SCTAB
nTab
)
{
ScRange
aRef
=
pData
->
aRef
;
aRef
.
Justify
();
// Justify fuer die Abfragen unten
if
(
aRef
.
aStart
==
aRef
.
aEnd
)
//! Tab ignorieren?
aViewData
.
GetDocument
()
->
ExtendMerge
(
aRef
);
if
(
aRef
.
aStart
.
Tab
()
>=
nTab
&&
aRef
.
aEnd
.
Tab
()
<=
nTab
)
{
SCCOL
nCol1
=
aRef
.
aStart
.
Col
();
SCROW
nRow1
=
aRef
.
aStart
.
Row
();
SCCOL
nCol2
=
aRef
.
aEnd
.
Col
();
SCROW
nRow2
=
aRef
.
aEnd
.
Row
();
// wegnehmen -> Repaint
// SC_UPDATE_MARKS: Invalidate, nicht bis zum Zeilenende
bool
bHiddenEdge
=
false
;
SCROW
nTmp
;
ScDocument
*
pDoc
=
aViewData
.
GetDocument
();
while
(
nCol1
>
0
&&
pDoc
->
ColHidden
(
nCol1
,
nTab
)
)
{
--
nCol1
;
bHiddenEdge
=
true
;
}
while
(
nCol2
<
MAXCOL
&&
pDoc
->
ColHidden
(
nCol2
,
nTab
)
)
{
++
nCol2
;
bHiddenEdge
=
true
;
}
nTmp
=
pDoc
->
LastVisibleRow
(
0
,
nRow1
,
nTab
);
if
(
!
ValidRow
(
nTmp
))
nTmp
=
0
;
if
(
nTmp
<
nRow1
)
{
nRow1
=
nTmp
;
bHiddenEdge
=
true
;
}
nTmp
=
pDoc
->
FirstVisibleRow
(
nRow2
,
MAXROW
,
nTab
);
if
(
!
ValidRow
(
nTmp
))
nTmp
=
MAXROW
;
if
(
nTmp
>
nRow2
)
{
nRow2
=
nTmp
;
bHiddenEdge
=
true
;
}
if
(
nCol2
-
nCol1
>
1
&&
nRow2
-
nRow1
>
1
&&
!
bHiddenEdge
)
{
// nur an den Raendern entlang
PaintArea
(
nCol1
,
nRow1
,
nCol2
,
nRow1
,
SC_UPDATE_MARKS
);
PaintArea
(
nCol1
,
nRow1
+
1
,
nCol1
,
nRow2
-
1
,
SC_UPDATE_MARKS
);
PaintArea
(
nCol2
,
nRow1
+
1
,
nCol2
,
nRow2
-
1
,
SC_UPDATE_MARKS
);
PaintArea
(
nCol1
,
nRow2
,
nCol2
,
nRow2
,
SC_UPDATE_MARKS
);
}
else
// alles am Stueck
PaintArea
(
nCol1
,
nRow1
,
nCol2
,
nRow2
,
SC_UPDATE_MARKS
);
}
}
void
ScTabView
::
PaintRangeFinder
(
long
nNumber
)
void
ScTabView
::
PaintRangeFinder
(
long
nNumber
)
{
{
ScInputHandler
*
pHdl
=
SC_MOD
()
->
GetInputHdl
(
aViewData
.
GetViewShell
()
);
ScInputHandler
*
pHdl
=
SC_MOD
()
->
GetInputHdl
(
aViewData
.
GetViewShell
()
);
...
@@ -1950,71 +2011,18 @@ void ScTabView::PaintRangeFinder( long nNumber )
...
@@ -1950,71 +2011,18 @@ void ScTabView::PaintRangeFinder( long nNumber )
{
{
SCTAB
nTab
=
aViewData
.
GetTabNo
();
SCTAB
nTab
=
aViewData
.
GetTabNo
();
sal_uInt16
nCount
=
(
sal_uInt16
)
pRangeFinder
->
Count
();
sal_uInt16
nCount
=
(
sal_uInt16
)
pRangeFinder
->
Count
();
for
(
sal_uInt16
i
=
0
;
i
<
nCount
;
i
++
)
if
(
nNumber
<
0
||
nNumber
==
i
)
{
ScRangeFindData
*
pData
=
pRangeFinder
->
GetObject
(
i
);
if
(
pData
)
{
ScRange
aRef
=
pData
->
aRef
;
aRef
.
Justify
();
// Justify fuer die Abfragen unten
if
(
aRef
.
aStart
==
aRef
.
aEnd
)
//! Tab ignorieren?
aViewData
.
GetDocument
()
->
ExtendMerge
(
aRef
);
if
(
aRef
.
aStart
.
Tab
()
>=
nTab
&&
aRef
.
aEnd
.
Tab
()
<=
nTab
)
{
SCCOL
nCol1
=
aRef
.
aStart
.
Col
();
SCROW
nRow1
=
aRef
.
aStart
.
Row
();
SCCOL
nCol2
=
aRef
.
aEnd
.
Col
();
SCROW
nRow2
=
aRef
.
aEnd
.
Row
();
// wegnehmen -> Repaint
// SC_UPDATE_MARKS: Invalidate, nicht bis zum Zeilenende
bool
bHiddenEdge
=
false
;
SCROW
nTmp
;
ScDocument
*
pDoc
=
aViewData
.
GetDocument
();
while
(
nCol1
>
0
&&
pDoc
->
ColHidden
(
nCol1
,
nTab
)
)
{
--
nCol1
;
bHiddenEdge
=
true
;
}
while
(
nCol2
<
MAXCOL
&&
pDoc
->
ColHidden
(
nCol2
,
nTab
)
)
{
++
nCol2
;
bHiddenEdge
=
true
;
}
nTmp
=
pDoc
->
LastVisibleRow
(
0
,
nRow1
,
nTab
);
if
(
!
ValidRow
(
nTmp
))
nTmp
=
0
;
if
(
nTmp
<
nRow1
)
{
nRow1
=
nTmp
;
bHiddenEdge
=
true
;
}
nTmp
=
pDoc
->
FirstVisibleRow
(
nRow2
,
MAXROW
,
nTab
);
if
(
!
ValidRow
(
nTmp
))
nTmp
=
MAXROW
;
if
(
nTmp
>
nRow2
)
{
nRow2
=
nTmp
;
bHiddenEdge
=
true
;
}
if
(
nCol2
-
nCol1
>
1
&&
nRow2
-
nRow1
>
1
&&
!
bHiddenEdge
)
if
(
nNumber
<
0
)
{
{
// nur an den Raendern entlang
for
(
sal_uInt16
i
=
0
;
i
<
nCount
;
i
++
)
PaintArea
(
nCol1
,
nRow1
,
nCol2
,
nRow1
,
SC_UPDATE_MARKS
);
PaintRangeFinderEntry
(
pRangeFinder
->
GetObject
(
i
),
nTab
);
PaintArea
(
nCol1
,
nRow1
+
1
,
nCol1
,
nRow2
-
1
,
SC_UPDATE_MARKS
);
}
PaintArea
(
nCol2
,
nRow1
+
1
,
nCol2
,
nRow2
-
1
,
SC_UPDATE_MARKS
);
else
PaintArea
(
nCol1
,
nRow2
,
nCol2
,
nRow2
,
SC_UPDATE_MARKS
);
{
}
sal_uInt16
idx
=
nNumber
;
else
// alles am Stueck
if
(
idx
<
nCount
)
PaintArea
(
nCol1
,
nRow1
,
nCol2
,
nRow2
,
SC_UPDATE_MARKS
);
PaintRangeFinderEntry
(
pRangeFinder
->
GetObject
(
idx
),
nTab
);
}
}
}
}
}
}
}
}
}
}
...
...
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