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
08f73742
Kaydet (Commit)
08f73742
authored
Kas 02, 2011
tarafından
Kohei Yoshida
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
More on sal_Bool to bool (in method signatures).
üst
0735a355
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
77 additions
and
253 deletions
+77
-253
gridwin.hxx
sc/source/ui/inc/gridwin.hxx
+23
-26
gridwin.cxx
sc/source/ui/view/gridwin.cxx
+18
-18
gridwin2.cxx
sc/source/ui/view/gridwin2.cxx
+3
-3
gridwin3.cxx
sc/source/ui/view/gridwin3.cxx
+19
-19
gridwin4.cxx
sc/source/ui/view/gridwin4.cxx
+3
-176
gridwin5.cxx
sc/source/ui/view/gridwin5.cxx
+11
-11
No files found.
sc/source/ui/inc/gridwin.hxx
Dosyayı görüntüle @
08f73742
...
...
@@ -207,9 +207,9 @@ private:
DECL_LINK
(
PopupModeEndHdl
,
FloatingWindow
*
);
DECL_LINK
(
PopupSpellingHdl
,
SpellCallbackInfo
*
);
sal_Bool
TestMouse
(
const
MouseEvent
&
rMEvt
,
sal_B
ool
bAction
);
bool
TestMouse
(
const
MouseEvent
&
rMEvt
,
b
ool
bAction
);
sal_B
ool
DoPageFieldSelection
(
SCCOL
nCol
,
SCROW
nRow
);
b
ool
DoPageFieldSelection
(
SCCOL
nCol
,
SCROW
nRow
);
bool
DoAutoFilterButton
(
SCCOL
nCol
,
SCROW
nRow
,
const
MouseEvent
&
rMEvt
);
void
DoPushButton
(
SCCOL
nCol
,
SCROW
nRow
,
const
MouseEvent
&
rMEvt
);
...
...
@@ -231,9 +231,9 @@ private:
void
PagebreakMove
(
const
MouseEvent
&
rMEvt
,
sal_Bool
bUp
);
void
UpdateDragRect
(
sal_B
ool
bShowRange
,
const
Rectangle
&
rPosRect
);
void
UpdateDragRect
(
b
ool
bShowRange
,
const
Rectangle
&
rPosRect
);
sal_B
ool
IsAutoFilterActive
(
SCCOL
nCol
,
SCROW
nRow
,
SCTAB
nTab
);
b
ool
IsAutoFilterActive
(
SCCOL
nCol
,
SCROW
nRow
,
SCTAB
nTab
);
void
ExecFilter
(
sal_uLong
nSel
,
SCCOL
nCol
,
SCROW
nRow
,
const
String
&
aValue
,
bool
bCheckForDates
);
void
FilterSelect
(
sal_uLong
nSel
);
...
...
@@ -242,27 +242,27 @@ private:
void
ExecPageFieldSelect
(
SCCOL
nCol
,
SCROW
nRow
,
sal_Bool
bHasSelection
,
const
String
&
rStr
);
sal_B
ool
HasScenarioButton
(
const
Point
&
rPosPixel
,
ScRange
&
rScenRange
);
b
ool
HasScenarioButton
(
const
Point
&
rPosPixel
,
ScRange
&
rScenRange
);
sal_B
ool
DropScroll
(
const
Point
&
rMousePos
);
b
ool
DropScroll
(
const
Point
&
rMousePos
);
sal_Int8
AcceptPrivateDrop
(
const
AcceptDropEvent
&
rEvt
);
sal_Int8
ExecutePrivateDrop
(
const
ExecuteDropEvent
&
rEvt
);
sal_Int8
DropTransferObj
(
ScTransferObj
*
pTransObj
,
SCCOL
nDestPosX
,
SCROW
nDestPosY
,
const
Point
&
rLogicPos
,
sal_Int8
nDndAction
);
const
Point
&
rLogicPos
,
sal_Int8
nDndAction
);
void
HandleMouseButtonDown
(
const
MouseEvent
&
rMEvt
);
sal_B
ool
DrawMouseButtonDown
(
const
MouseEvent
&
rMEvt
);
sal_B
ool
DrawMouseButtonUp
(
const
MouseEvent
&
rMEvt
);
sal_B
ool
DrawMouseMove
(
const
MouseEvent
&
rMEvt
);
sal_B
ool
DrawKeyInput
(
const
KeyEvent
&
rKEvt
);
sal_B
ool
DrawCommand
(
const
CommandEvent
&
rCEvt
);
sal_B
ool
DrawHasMarkedObj
();
b
ool
DrawMouseButtonDown
(
const
MouseEvent
&
rMEvt
);
b
ool
DrawMouseButtonUp
(
const
MouseEvent
&
rMEvt
);
b
ool
DrawMouseMove
(
const
MouseEvent
&
rMEvt
);
b
ool
DrawKeyInput
(
const
KeyEvent
&
rKEvt
);
b
ool
DrawCommand
(
const
CommandEvent
&
rCEvt
);
b
ool
DrawHasMarkedObj
();
void
DrawEndAction
();
void
DrawMarkDropObj
(
SdrObject
*
pObj
);
SdrObject
*
GetEditObject
();
sal_B
ool
IsMyModel
(
SdrEditView
*
pSdrView
);
b
ool
IsMyModel
(
SdrEditView
*
pSdrView
);
void
DrawRedraw
(
ScOutputData
&
rOutputData
,
ScUpdateMode
eMode
,
sal_uLong
nLayer
);
void
DrawSdrGrid
(
const
Rectangle
&
rDrawingRect
,
OutputDevice
*
pContentDev
);
...
...
@@ -271,10 +271,10 @@ private:
void
DrawPagePreview
(
SCCOL
nX1
,
SCROW
nY1
,
SCCOL
nX2
,
SCROW
nY2
,
OutputDevice
*
pContentDev
);
sal_Bool
GetEditUrl
(
const
Point
&
rPos
,
String
*
pName
=
0
,
String
*
pUrl
=
0
,
String
*
pTarget
=
0
);
sal_Bool
GetEditUrlOrError
(
sal_Bool
bSpellErr
,
const
Point
&
rPos
,
bool
GetEditUrl
(
const
Point
&
rPos
,
String
*
pName
=
0
,
String
*
pUrl
=
0
,
String
*
pTarget
=
0
);
bool
GetEditUrlOrError
(
bool
bSpellErr
,
const
Point
&
rPos
,
String
*
pName
=
0
,
String
*
pUrl
=
0
,
String
*
pTarget
=
0
);
bool
HitRangeFinder
(
const
Point
&
rMouse
,
bool
&
rCorner
,
sal_uInt16
*
pIndex
=
NULL
,
SCsCOL
*
pAddX
=
NULL
,
SCsROW
*
pAddY
=
NULL
);
...
...
@@ -338,7 +338,7 @@ public:
void
UpdateFormulas
();
void
DoAutoFilterMenue
(
SCCOL
nCol
,
SCROW
nRow
,
sal_B
ool
bDataSelect
);
void
DoAutoFilterMenue
(
SCCOL
nCol
,
SCROW
nRow
,
b
ool
bDataSelect
);
void
DoScenarioMenue
(
const
ScRange
&
rScenRange
);
void
LaunchPageFieldMenu
(
SCCOL
nCol
,
SCROW
nRow
);
...
...
@@ -347,14 +347,11 @@ public:
::
com
::
sun
::
star
::
sheet
::
DataPilotFieldOrientation
GetDPFieldOrientation
(
SCCOL
nCol
,
SCROW
nRow
)
const
;
void
DrawButtons
(
SCCOL
nX1
,
SCROW
nY1
,
SCCOL
nX2
,
SCROW
nY2
,
ScTableInfo
&
rTabInfo
,
OutputDevice
*
pContentDev
);
ScTableInfo
&
rTabInfo
,
OutputDevice
*
pContentDev
);
using
Window
::
Draw
;
void
Draw
(
SCCOL
nX1
,
SCROW
nY1
,
SCCOL
nX2
,
SCROW
nY2
,
ScUpdateMode
eMode
=
SC_UPDATE_ALL
);
void
InvertSimple
(
SCCOL
nX1
,
SCROW
nY1
,
SCCOL
nX2
,
SCROW
nY2
,
sal_Bool
bTestMerge
=
false
,
sal_Bool
bRepeat
=
false
);
ScUpdateMode
eMode
=
SC_UPDATE_ALL
);
void
CreateAnchorHandle
(
SdrHdlList
&
rHdl
,
const
ScAddress
&
rAddress
);
...
...
@@ -362,12 +359,12 @@ public:
void
ShowCursor
();
void
UpdateAutoFillMark
(
bool
bMarked
,
const
ScRange
&
rMarkRange
);
void
UpdateListValPos
(
sal_B
ool
bVisible
,
const
ScAddress
&
rPos
);
void
UpdateListValPos
(
b
ool
bVisible
,
const
ScAddress
&
rPos
);
sal_Bool
ShowNoteMarker
(
SCsCOL
nPosX
,
SCsROW
nPosY
,
sal_B
ool
bKeyboard
);
bool
ShowNoteMarker
(
SCsCOL
nPosX
,
SCsROW
nPosY
,
b
ool
bKeyboard
);
void
HideNoteMarker
();
MapMode
GetDrawMapMode
(
sal_B
ool
bForce
=
false
);
MapMode
GetDrawMapMode
(
b
ool
bForce
=
false
);
void
ContinueDrag
();
...
...
sc/source/ui/view/gridwin.cxx
Dosyayı görüntüle @
08f73742
...
...
@@ -880,7 +880,7 @@ void ScGridWindow::DoScenarioMenue( const ScRange& rScenRange )
CaptureMouse
();
}
void
ScGridWindow
::
DoAutoFilterMenue
(
SCCOL
nCol
,
SCROW
nRow
,
sal_B
ool
bDataSelect
)
void
ScGridWindow
::
DoAutoFilterMenue
(
SCCOL
nCol
,
SCROW
nRow
,
b
ool
bDataSelect
)
{
delete
pFilterBox
;
delete
pFilterFloat
;
...
...
@@ -1352,7 +1352,7 @@ void ScGridWindow::MoveMouseStatus( ScGridWindow& rDestWin )
}
}
sal_Bool
ScGridWindow
::
TestMouse
(
const
MouseEvent
&
rMEvt
,
sal_B
ool
bAction
)
bool
ScGridWindow
::
TestMouse
(
const
MouseEvent
&
rMEvt
,
b
ool
bAction
)
{
// MouseEvent buttons must only be checked if bAction==TRUE
// to allow changing the mouse pointer in MouseMove,
...
...
@@ -1362,16 +1362,16 @@ sal_Bool ScGridWindow::TestMouse( const MouseEvent& rMEvt, sal_Bool bAction )
if
(
bAction
&&
!
rMEvt
.
IsLeft
()
)
return
false
;
sal_B
ool
bNewPointer
=
false
;
b
ool
bNewPointer
=
false
;
SfxInPlaceClient
*
pClient
=
pViewData
->
GetViewShell
()
->
GetIPClient
();
sal_B
ool
bOleActive
=
(
pClient
&&
pClient
->
IsObjectInPlaceActive
()
);
b
ool
bOleActive
=
(
pClient
&&
pClient
->
IsObjectInPlaceActive
()
);
if
(
pViewData
->
IsActive
()
&&
!
bOleActive
)
{
ScDocument
*
pDoc
=
pViewData
->
GetDocument
();
SCTAB
nTab
=
pViewData
->
GetTabNo
();
sal_B
ool
bLayoutRTL
=
pDoc
->
IsLayoutRTL
(
nTab
);
b
ool
bLayoutRTL
=
pDoc
->
IsLayoutRTL
(
nTab
);
// Auto-Fill
...
...
@@ -1400,7 +1400,7 @@ sal_Bool ScGridWindow::TestMouse( const MouseEvent& rMEvt, sal_Bool bAction )
// where the Marking flag is set and MarkToSimple won't work anymore.
pViewData
->
GetMarkData
().
MarkToSimple
();
}
bNewPointer
=
sal_T
rue
;
bNewPointer
=
t
rue
;
}
}
}
...
...
@@ -1421,9 +1421,9 @@ sal_Bool ScGridWindow::TestMouse( const MouseEvent& rMEvt, sal_Bool bAction )
aStartPos
.
X
()
+=
2
;
aEndPos
.
X
()
+=
2
;
}
sal_B
ool
bTop
=
(
aMousePos
.
X
()
>=
aStartPos
.
X
()
-
3
&&
aMousePos
.
X
()
<=
aStartPos
.
X
()
+
1
&&
b
ool
bTop
=
(
aMousePos
.
X
()
>=
aStartPos
.
X
()
-
3
&&
aMousePos
.
X
()
<=
aStartPos
.
X
()
+
1
&&
aMousePos
.
Y
()
>=
aStartPos
.
Y
()
-
3
&&
aMousePos
.
Y
()
<=
aStartPos
.
Y
()
+
1
);
sal_B
ool
bBottom
=
(
aMousePos
.
X
()
>=
aEndPos
.
X
()
-
3
&&
aMousePos
.
X
()
<=
aEndPos
.
X
()
+
1
&&
b
ool
bBottom
=
(
aMousePos
.
X
()
>=
aEndPos
.
X
()
-
3
&&
aMousePos
.
X
()
<=
aEndPos
.
X
()
+
1
&&
aMousePos
.
Y
()
>=
aEndPos
.
Y
()
-
3
&&
aMousePos
.
Y
()
<=
aEndPos
.
Y
()
+
1
);
if
(
bTop
||
bBottom
)
{
...
...
@@ -1435,7 +1435,7 @@ sal_Bool ScGridWindow::TestMouse( const MouseEvent& rMEvt, sal_Bool bAction )
aRange
.
aStart
.
Col
(),
aRange
.
aStart
.
Row
(),
aRange
.
aEnd
.
Col
(),
aRange
.
aEnd
.
Row
(),
nMode
);
}
bNewPointer
=
sal_T
rue
;
bNewPointer
=
t
rue
;
}
}
}
...
...
@@ -3159,7 +3159,7 @@ void ScGridWindow::UpdateInputContext()
// sensitiver Bereich (Pixel)
#define SCROLL_SENSITIVE 20
sal_B
ool
ScGridWindow
::
DropScroll
(
const
Point
&
rMousePos
)
b
ool
ScGridWindow
::
DropScroll
(
const
Point
&
rMousePos
)
{
SCsCOL
nDx
=
0
;
SCsROW
nDy
=
0
;
...
...
@@ -4431,7 +4431,7 @@ void ScGridWindow::UpdateAutoFillMark(bool bMarked, const ScRange& rMarkRange)
}
}
void
ScGridWindow
::
UpdateListValPos
(
sal_B
ool
bVisible
,
const
ScAddress
&
rPos
)
void
ScGridWindow
::
UpdateListValPos
(
b
ool
bVisible
,
const
ScAddress
&
rPos
)
{
bool
bOldButton
=
bListValButton
;
ScAddress
aOldPos
=
aListValPos
;
...
...
@@ -4831,13 +4831,13 @@ void ScGridWindow::RFMouseMove( const MouseEvent& rMEvt, sal_Bool bUp )
//------------------------------------------------------------------------
sal_B
ool
ScGridWindow
::
GetEditUrl
(
const
Point
&
rPos
,
String
*
pName
,
String
*
pUrl
,
String
*
pTarget
)
b
ool
ScGridWindow
::
GetEditUrl
(
const
Point
&
rPos
,
String
*
pName
,
String
*
pUrl
,
String
*
pTarget
)
{
return
GetEditUrlOrError
(
false
,
rPos
,
pName
,
pUrl
,
pTarget
);
}
sal_Bool
ScGridWindow
::
GetEditUrlOrError
(
sal_B
ool
bSpellErr
,
const
Point
&
rPos
,
bool
ScGridWindow
::
GetEditUrlOrError
(
b
ool
bSpellErr
,
const
Point
&
rPos
,
String
*
pName
,
String
*
pUrl
,
String
*
pTarget
)
{
//! nPosX/Y mit uebergeben?
...
...
@@ -5014,14 +5014,14 @@ sal_Bool ScGridWindow::GetEditUrlOrError( sal_Bool bSpellErr, const Point& rPos,
return
false
;
}
sal_B
ool
ScGridWindow
::
HasScenarioButton
(
const
Point
&
rPosPixel
,
ScRange
&
rScenRange
)
b
ool
ScGridWindow
::
HasScenarioButton
(
const
Point
&
rPosPixel
,
ScRange
&
rScenRange
)
{
ScDocument
*
pDoc
=
pViewData
->
GetDocument
();
SCTAB
nTab
=
pViewData
->
GetTabNo
();
SCTAB
nTabCount
=
pDoc
->
GetTableCount
();
if
(
nTab
+
1
<
nTabCount
&&
pDoc
->
IsScenario
(
nTab
+
1
)
&&
!
pDoc
->
IsScenario
(
nTab
)
)
{
sal_B
ool
bLayoutRTL
=
pDoc
->
IsLayoutRTL
(
nTab
);
b
ool
bLayoutRTL
=
pDoc
->
IsLayoutRTL
(
nTab
);
Size
aButSize
=
pViewData
->
GetScenButSize
();
long
nBWidth
=
aButSize
.
Width
();
...
...
@@ -5047,7 +5047,7 @@ sal_Bool ScGridWindow::HasScenarioButton( const Point& rPosPixel, ScRange& rScen
// dadurch keine neuen nicht-ueberdeckten Zellen mit umrandet werden
pDoc
->
ExtendTotalMerge
(
aRange
);
sal_B
ool
bTextBelow
=
(
aRange
.
aStart
.
Row
()
==
0
);
b
ool
bTextBelow
=
(
aRange
.
aStart
.
Row
()
==
0
);
Point
aButtonPos
;
if
(
bTextBelow
)
...
...
@@ -5070,7 +5070,7 @@ sal_Bool ScGridWindow::HasScenarioButton( const Point& rPosPixel, ScRange& rScen
if
(
aButRect
.
IsInside
(
rPosPixel
)
)
{
rScenRange
=
aRange
;
return
sal_T
rue
;
return
t
rue
;
}
}
}
...
...
sc/source/ui/view/gridwin2.cxx
Dosyayı görüntüle @
08f73742
...
...
@@ -118,12 +118,12 @@ DataPilotFieldOrientation ScGridWindow::GetDPFieldOrientation( SCCOL nCol, SCROW
}
// private method for mouse button handling
sal_B
ool
ScGridWindow
::
DoPageFieldSelection
(
SCCOL
nCol
,
SCROW
nRow
)
b
ool
ScGridWindow
::
DoPageFieldSelection
(
SCCOL
nCol
,
SCROW
nRow
)
{
if
(
GetDPFieldOrientation
(
nCol
,
nRow
)
==
sheet
::
DataPilotFieldOrientation_PAGE
)
{
LaunchPageFieldMenu
(
nCol
,
nRow
);
return
sal_T
rue
;
return
t
rue
;
}
return
false
;
}
...
...
@@ -627,7 +627,7 @@ void ScGridWindow::DPMouseButtonUp( const MouseEvent& rMEvt )
// -----------------------------------------------------------------------
void
ScGridWindow
::
UpdateDragRect
(
sal_B
ool
bShowRange
,
const
Rectangle
&
rPosRect
)
void
ScGridWindow
::
UpdateDragRect
(
b
ool
bShowRange
,
const
Rectangle
&
rPosRect
)
{
SCCOL
nStartX
=
(
rPosRect
.
Left
()
>=
0
)
?
static_cast
<
SCCOL
>
(
rPosRect
.
Left
())
:
SCCOL_MAX
;
SCROW
nStartY
=
(
rPosRect
.
Top
()
>=
0
)
?
static_cast
<
SCROW
>
(
rPosRect
.
Top
())
:
SCROW_MAX
;
...
...
sc/source/ui/view/gridwin3.cxx
Dosyayı görüntüle @
08f73742
...
...
@@ -54,9 +54,9 @@
// -----------------------------------------------------------------------
sal_B
ool
ScGridWindow
::
DrawMouseButtonDown
(
const
MouseEvent
&
rMEvt
)
b
ool
ScGridWindow
::
DrawMouseButtonDown
(
const
MouseEvent
&
rMEvt
)
{
sal_B
ool
bRet
=
false
;
b
ool
bRet
=
false
;
FuPoor
*
pDraw
=
pViewData
->
GetView
()
->
GetDrawFuncPtr
();
if
(
pDraw
&&
!
pViewData
->
IsRefMode
())
{
...
...
@@ -65,7 +65,7 @@ sal_Bool ScGridWindow::DrawMouseButtonDown(const MouseEvent& rMEvt)
if
(
pDraw
->
IsDetectiveHit
(
aLogicPos
)
)
{
// auf Detektiv-Pfeilen gar nichts (Doppelklick wird bei ButtonUp ausgewertet)
bRet
=
sal_T
rue
;
bRet
=
t
rue
;
}
else
{
...
...
@@ -81,15 +81,15 @@ sal_Bool ScGridWindow::DrawMouseButtonDown(const MouseEvent& rMEvt)
if
(
pDrView
&&
!
rMEvt
.
IsLeft
()
&&
!
bRet
)
{
pDrView
->
BrkAction
();
bRet
=
sal_T
rue
;
bRet
=
t
rue
;
}
return
bRet
;
}
sal_B
ool
ScGridWindow
::
DrawMouseButtonUp
(
const
MouseEvent
&
rMEvt
)
b
ool
ScGridWindow
::
DrawMouseButtonUp
(
const
MouseEvent
&
rMEvt
)
{
ScViewFunc
*
pView
=
pViewData
->
GetView
();
sal_B
ool
bRet
=
false
;
b
ool
bRet
=
false
;
FuPoor
*
pDraw
=
pView
->
GetDrawFuncPtr
();
if
(
pDraw
&&
!
pViewData
->
IsRefMode
())
{
...
...
@@ -103,7 +103,7 @@ sal_Bool ScGridWindow::DrawMouseButtonUp(const MouseEvent& rMEvt)
ScDrawView
*
pDrView
=
pViewData
->
GetScDrawView
();
if
(
pDrView
)
{
sal_Bool
bReplaceAll
=
sal_T
rue
;
bool
bReplaceAll
=
t
rue
;
pDrView
->
SetAttrToMarked
(
*
pDrawBrush
,
bReplaceAll
);
}
...
...
@@ -115,13 +115,13 @@ sal_Bool ScGridWindow::DrawMouseButtonUp(const MouseEvent& rMEvt)
return
bRet
;
}
sal_B
ool
ScGridWindow
::
DrawMouseMove
(
const
MouseEvent
&
rMEvt
)
b
ool
ScGridWindow
::
DrawMouseMove
(
const
MouseEvent
&
rMEvt
)
{
FuPoor
*
pDraw
=
pViewData
->
GetView
()
->
GetDrawFuncPtr
();
if
(
pDraw
&&
!
pViewData
->
IsRefMode
())
{
pDraw
->
SetWindow
(
this
);
sal_B
ool
bRet
=
pDraw
->
MouseMove
(
rMEvt
);
b
ool
bRet
=
pDraw
->
MouseMove
(
rMEvt
);
if
(
bRet
)
UpdateStatusPosSize
();
return
bRet
;
...
...
@@ -146,7 +146,7 @@ void ScGridWindow::DrawEndAction()
// ReleaseMouse beim Aufruf
}
sal_B
ool
ScGridWindow
::
DrawCommand
(
const
CommandEvent
&
rCEvt
)
b
ool
ScGridWindow
::
DrawCommand
(
const
CommandEvent
&
rCEvt
)
{
ScDrawView
*
pDrView
=
pViewData
->
GetScDrawView
();
FuPoor
*
pDraw
=
pViewData
->
GetView
()
->
GetDrawFuncPtr
();
...
...
@@ -157,30 +157,30 @@ sal_Bool ScGridWindow::DrawCommand(const CommandEvent& rCEvt)
if
(
nUsed
==
SC_CMD_USED
)
nButtonDown
=
0
;
// MouseButtonUp wird verschluckt...
if
(
nUsed
||
pDrView
->
IsAction
()
)
return
sal_T
rue
;
return
t
rue
;
}
return
false
;
}
sal_B
ool
ScGridWindow
::
DrawKeyInput
(
const
KeyEvent
&
rKEvt
)
b
ool
ScGridWindow
::
DrawKeyInput
(
const
KeyEvent
&
rKEvt
)
{
ScDrawView
*
pDrView
=
pViewData
->
GetScDrawView
();
FuPoor
*
pDraw
=
pViewData
->
GetView
()
->
GetDrawFuncPtr
();
if
(
pDrView
&&
pDraw
&&
!
pViewData
->
IsRefMode
())
{
pDraw
->
SetWindow
(
this
);
sal_B
ool
bOldMarked
=
pDrView
->
AreObjectsMarked
();
b
ool
bOldMarked
=
pDrView
->
AreObjectsMarked
();
if
(
pDraw
->
KeyInput
(
rKEvt
))
{
sal_B
ool
bLeaveDraw
=
false
;
sal_Bool
bUsed
=
sal_T
rue
;
sal_B
ool
bNewMarked
=
pDrView
->
AreObjectsMarked
();
b
ool
bLeaveDraw
=
false
;
bool
bUsed
=
t
rue
;
b
ool
bNewMarked
=
pDrView
->
AreObjectsMarked
();
if
(
!
pViewData
->
GetView
()
->
IsDrawSelMode
()
)
if
(
!
bNewMarked
)
{
pViewData
->
GetViewShell
()
->
SetDrawShell
(
false
);
bLeaveDraw
=
sal_T
rue
;
bLeaveDraw
=
t
rue
;
if
(
!
bOldMarked
&&
rKEvt
.
GetKeyCode
().
GetCode
()
==
KEY_DELETE
)
bUsed
=
false
;
// nichts geloescht
...
...
@@ -245,7 +245,7 @@ void ScGridWindow::DrawSdrGrid( const Rectangle& rDrawingRect, OutputDevice* pCo
}
}
MapMode
ScGridWindow
::
GetDrawMapMode
(
sal_B
ool
bForce
)
MapMode
ScGridWindow
::
GetDrawMapMode
(
b
ool
bForce
)
{
ScDocument
*
pDoc
=
pViewData
->
GetDocument
();
SCTAB
nTab
=
pViewData
->
GetTabNo
();
...
...
@@ -382,7 +382,7 @@ void ScGridWindow::UpdateStatusPosSize()
pViewData
->
GetBindings
().
SetState
(
aSet
);
}
sal_B
ool
ScGridWindow
::
DrawHasMarkedObj
()
b
ool
ScGridWindow
::
DrawHasMarkedObj
()
{
ScDrawView
*
p
=
pViewData
->
GetScDrawView
();
return
p
?
p
->
AreObjectsMarked
()
:
false
;
...
...
sc/source/ui/view/gridwin4.cxx
Dosyayı görüntüle @
08f73742
...
...
@@ -1308,7 +1308,7 @@ Rectangle ScGridWindow::GetListValButtonRect( const ScAddress& rButtonPos )
return
Rectangle
(
aPos
,
aBtnSize
);
}
sal_B
ool
ScGridWindow
::
IsAutoFilterActive
(
SCCOL
nCol
,
SCROW
nRow
,
SCTAB
nTab
)
b
ool
ScGridWindow
::
IsAutoFilterActive
(
SCCOL
nCol
,
SCROW
nRow
,
SCTAB
nTab
)
{
ScDocument
*
pDoc
=
pViewData
->
GetDocument
();
ScDBData
*
pDBData
=
pDoc
->
GetDBAtCursor
(
nCol
,
nRow
,
nTab
);
...
...
@@ -1321,8 +1321,8 @@ sal_Bool ScGridWindow::IsAutoFilterActive( SCCOL nCol, SCROW nRow, SCTAB nTab )
OSL_FAIL
(
"Auto-Filter-Button ohne DBData"
);
}
sal_Bool
bSimpleQuery
=
sal_T
rue
;
sal_B
ool
bColumnFound
=
false
;
bool
bSimpleQuery
=
t
rue
;
b
ool
bColumnFound
=
false
;
SCSIZE
nQuery
;
if
(
!
aQueryParam
.
bInplace
)
...
...
@@ -1344,179 +1344,6 @@ sal_Bool ScGridWindow::IsAutoFilterActive( SCCOL nCol, SCROW nRow, SCTAB nTab )
return
(
bSimpleQuery
&&
bColumnFound
);
}
void
ScGridWindow
::
InvertSimple
(
SCCOL
nX1
,
SCROW
nY1
,
SCCOL
nX2
,
SCROW
nY2
,
sal_Bool
bTestMerge
,
sal_Bool
bRepeat
)
{
//! if INVERT_HIGHLIGHT swaps foreground and background (like on Mac),
//! use INVERT_HIGHLIGHT only for cells that have no background color set
//! (here and in ScOutputData::DrawMark)
PutInOrder
(
nX1
,
nX2
);
PutInOrder
(
nY1
,
nY2
);
ScMarkData
&
rMark
=
pViewData
->
GetMarkData
();
ScDocument
*
pDoc
=
pViewData
->
GetDocument
();
SCTAB
nTab
=
pViewData
->
GetTabNo
();
sal_Bool
bLayoutRTL
=
pDoc
->
IsLayoutRTL
(
nTab
);
long
nLayoutSign
=
bLayoutRTL
?
-
1
:
1
;
SCCOL
nTestX2
=
nX2
;
SCROW
nTestY2
=
nY2
;
if
(
bTestMerge
)
pDoc
->
ExtendMerge
(
nX1
,
nY1
,
nTestX2
,
nTestY2
,
nTab
);
SCCOL
nPosX
=
pViewData
->
GetPosX
(
eHWhich
);
SCROW
nPosY
=
pViewData
->
GetPosY
(
eVWhich
);
if
(
nTestX2
<
nPosX
||
nTestY2
<
nPosY
)
return
;
// unsichtbar
SCCOL
nRealX1
=
nX1
;
if
(
nX1
<
nPosX
)
nX1
=
nPosX
;
if
(
nY1
<
nPosY
)
nY1
=
nPosY
;
SCCOL
nXRight
=
nPosX
+
pViewData
->
VisibleCellsX
(
eHWhich
);
if
(
nXRight
>
MAXCOL
)
nXRight
=
MAXCOL
;
SCROW
nYBottom
=
nPosY
+
pViewData
->
VisibleCellsY
(
eVWhich
);
if
(
nYBottom
>
MAXROW
)
nYBottom
=
MAXROW
;
if
(
nX1
>
nXRight
||
nY1
>
nYBottom
)
return
;
// unsichtbar
if
(
nX2
>
nXRight
)
nX2
=
nXRight
;
if
(
nY2
>
nYBottom
)
nY2
=
nYBottom
;
MapMode
aOld
=
GetMapMode
();
SetMapMode
(
MAP_PIXEL
);
// erst nach den return's !!!
double
nPPTX
=
pViewData
->
GetPPTX
();
double
nPPTY
=
pViewData
->
GetPPTY
();
ScInvertMerger
aInvert
(
this
);
Point
aScrPos
=
pViewData
->
GetScrPos
(
nX1
,
nY1
,
eWhich
);
long
nScrY
=
aScrPos
.
Y
();
sal_Bool
bWasHidden
=
false
;
for
(
SCROW
nY
=
nY1
;
nY
<=
nY2
;
nY
++
)
{
sal_Bool
bFirstRow
=
(
nY
==
nPosY
);
// first visible row?
sal_Bool
bDoHidden
=
false
;
// versteckte nachholen ?
sal_uInt16
nHeightTwips
=
pDoc
->
GetRowHeight
(
nY
,
nTab
);
sal_Bool
bDoRow
=
(
nHeightTwips
!=
0
);
if
(
bDoRow
)
{
if
(
bTestMerge
)
if
(
bWasHidden
)
// auf versteckte zusammengefasste testen
{
bDoHidden
=
true
;
bDoRow
=
true
;
}
bWasHidden
=
false
;
}
else
{
bWasHidden
=
sal_True
;
if
(
bTestMerge
)
if
(
nY
==
nY2
)
bDoRow
=
sal_True
;
// letzte Zeile aus Block
}
if
(
bDoRow
)
{
SCCOL
nLoopEndX
=
nX2
;
if
(
nX2
<
nX1
)
// Rest von zusammengefasst
{
SCCOL
nStartX
=
nX1
;
while
(
((
const
ScMergeFlagAttr
*
)
pDoc
->
GetAttr
(
nStartX
,
nY
,
nTab
,
ATTR_MERGE_FLAG
))
->
IsHorOverlapped
()
)
--
nStartX
;
if
(
nStartX
<=
nX2
)
nLoopEndX
=
nX1
;
}
long
nEndY
=
nScrY
+
ScViewData
::
ToPixel
(
nHeightTwips
,
nPPTY
)
-
1
;
long
nScrX
=
aScrPos
.
X
();
for
(
SCCOL
nX
=
nX1
;
nX
<=
nLoopEndX
;
nX
++
)
{
long
nWidth
=
ScViewData
::
ToPixel
(
pDoc
->
GetColWidth
(
nX
,
nTab
),
nPPTX
);
if
(
nWidth
>
0
)
{
long
nEndX
=
nScrX
+
(
nWidth
-
1
)
*
nLayoutSign
;
if
(
bTestMerge
)
{
SCROW
nThisY
=
nY
;
const
ScPatternAttr
*
pPattern
=
pDoc
->
GetPattern
(
nX
,
nY
,
nTab
);
const
ScMergeFlagAttr
*
pMergeFlag
=
(
const
ScMergeFlagAttr
*
)
&
pPattern
->
GetItem
(
ATTR_MERGE_FLAG
);
if
(
pMergeFlag
->
IsVerOverlapped
()
&&
(
bDoHidden
||
bFirstRow
)
)
{
while
(
pMergeFlag
->
IsVerOverlapped
()
&&
nThisY
>
0
&&
(
pDoc
->
RowHidden
(
nThisY
-
1
,
nTab
)
||
bFirstRow
)
)
{
--
nThisY
;
pPattern
=
pDoc
->
GetPattern
(
nX
,
nThisY
,
nTab
);
pMergeFlag
=
(
const
ScMergeFlagAttr
*
)
&
pPattern
->
GetItem
(
ATTR_MERGE_FLAG
);
}
}
// nur Rest von zusammengefasster zu sehen ?
SCCOL
nThisX
=
nX
;
if
(
pMergeFlag
->
IsHorOverlapped
()
&&
nX
==
nPosX
&&
nX
>
nRealX1
)
{
while
(
pMergeFlag
->
IsHorOverlapped
()
)
{
--
nThisX
;
pPattern
=
pDoc
->
GetPattern
(
nThisX
,
nThisY
,
nTab
);
pMergeFlag
=
(
const
ScMergeFlagAttr
*
)
&
pPattern
->
GetItem
(
ATTR_MERGE_FLAG
);
}
}
if
(
rMark
.
IsCellMarked
(
nThisX
,
nThisY
,
sal_True
)
==
bRepeat
)
{
if
(
!
pMergeFlag
->
IsOverlapped
()
)
{
ScMergeAttr
*
pMerge
=
(
ScMergeAttr
*
)
&
pPattern
->
GetItem
(
ATTR_MERGE
);
if
(
pMerge
->
GetColMerge
()
>
0
||
pMerge
->
GetRowMerge
()
>
0
)
{
Point
aEndPos
=
pViewData
->
GetScrPos
(
nThisX
+
pMerge
->
GetColMerge
(),
nThisY
+
pMerge
->
GetRowMerge
(),
eWhich
);
if
(
aEndPos
.
X
()
*
nLayoutSign
>
nScrX
*
nLayoutSign
&&
aEndPos
.
Y
()
>
nScrY
)
{
aInvert
.
AddRect
(
Rectangle
(
nScrX
,
nScrY
,
aEndPos
.
X
()
-
nLayoutSign
,
aEndPos
.
Y
()
-
1
)
);
}
}
else
if
(
nEndX
*
nLayoutSign
>=
nScrX
*
nLayoutSign
&&
nEndY
>=
nScrY
)
{
aInvert
.
AddRect
(
Rectangle
(
nScrX
,
nScrY
,
nEndX
,
nEndY
)
);
}
}
}
}
else
// !bTestMerge
{
if
(
rMark
.
IsCellMarked
(
nX
,
nY
,
sal_True
)
==
bRepeat
&&
nEndX
*
nLayoutSign
>=
nScrX
*
nLayoutSign
&&
nEndY
>=
nScrY
)
{
aInvert
.
AddRect
(
Rectangle
(
nScrX
,
nScrY
,
nEndX
,
nEndY
)
);
}
}
nScrX
=
nEndX
+
nLayoutSign
;
}
}
nScrY
=
nEndY
+
1
;
}
}
aInvert
.
Flush
();
// before restoring MapMode
SetMapMode
(
aOld
);
CheckInverted
();
}
void
ScGridWindow
::
GetSelectionRects
(
::
std
::
vector
<
Rectangle
>&
rPixelRects
)
{
ScMarkData
aMultiMark
(
pViewData
->
GetMarkData
()
);
...
...
sc/source/ui/view/gridwin5.cxx
Dosyayı görüntüle @
08f73742
...
...
@@ -92,16 +92,16 @@ ScHideTextCursor::~ScHideTextCursor()
// -----------------------------------------------------------------------
sal_Bool
ScGridWindow
::
ShowNoteMarker
(
SCsCOL
nPosX
,
SCsROW
nPosY
,
sal_B
ool
bKeyboard
)
bool
ScGridWindow
::
ShowNoteMarker
(
SCsCOL
nPosX
,
SCsROW
nPosY
,
b
ool
bKeyboard
)
{
sal_B
ool
bDone
=
false
;
b
ool
bDone
=
false
;
ScDocument
*
pDoc
=
pViewData
->
GetDocument
();
SCTAB
nTab
=
pViewData
->
GetTabNo
();
ScAddress
aCellPos
(
nPosX
,
nPosY
,
nTab
);
String
aTrackText
;
sal_B
ool
bLeftEdge
=
false
;
b
ool
bLeftEdge
=
false
;
// Change-Tracking
...
...
@@ -175,7 +175,7 @@ sal_Bool ScGridWindow::ShowNoteMarker( SCsCOL nPosX, SCsROW nPosY, sal_Bool bKey
// bei geloeschten Spalten: Pfeil auf die linke Seite der Zelle
if
(
pFound
->
GetType
()
==
SC_CAT_DELETE_COLS
)
bLeftEdge
=
sal_T
rue
;
bLeftEdge
=
t
rue
;
DateTime
aDT
=
pFound
->
GetDateTime
();
aTrackText
=
pFound
->
GetUser
();
...
...
@@ -202,14 +202,14 @@ sal_Bool ScGridWindow::ShowNoteMarker( SCsCOL nPosX, SCsROW nPosY, sal_Bool bKey
const
ScPostIt
*
pNote
=
pDoc
->
GetNote
(
aCellPos
);
if
(
(
aTrackText
.
Len
()
>
0
)
||
(
pNote
&&
!
pNote
->
IsCaptionShown
())
)
{
sal_Bool
bNew
=
sal_T
rue
;
sal_B
ool
bFast
=
false
;
bool
bNew
=
t
rue
;
b
ool
bFast
=
false
;
if
(
pNoteMarker
)
// schon eine Notiz angezeigt
{
if
(
pNoteMarker
->
GetDocPos
()
==
aCellPos
)
// dieselbe
bNew
=
false
;
// dann stehenlassen
else
bFast
=
sal_T
rue
;
// sonst sofort
bFast
=
t
rue
;
// sonst sofort
// marker which was shown for ctrl-F1 isn't removed by mouse events
if
(
pNoteMarker
->
IsByKeyboard
()
&&
!
bKeyboard
)
...
...
@@ -218,7 +218,7 @@ sal_Bool ScGridWindow::ShowNoteMarker( SCsCOL nPosX, SCsROW nPosY, sal_Bool bKey
if
(
bNew
)
{
if
(
bKeyboard
)
bFast
=
sal_T
rue
;
// keyboard also shows the marker immediately
bFast
=
t
rue
;
// keyboard also shows the marker immediately
delete
pNoteMarker
;
...
...
@@ -233,7 +233,7 @@ sal_Bool ScGridWindow::ShowNoteMarker( SCsCOL nPosX, SCsROW nPosY, sal_Bool bKey
/* If caption is shown from right or bottom windows, adjust
mapmode to include size of top-left window. */
MapMode
aMapMode
=
GetDrawMapMode
(
sal_T
rue
);
MapMode
aMapMode
=
GetDrawMapMode
(
t
rue
);
Size
aLeftSize
=
pLeft
->
PixelToLogic
(
pLeft
->
GetOutputSizePixel
(),
aMapMode
);
Point
aOrigin
=
aMapMode
.
GetOrigin
();
if
(
(
this
==
pRight
)
||
(
this
==
pDiagonal
)
)
...
...
@@ -247,7 +247,7 @@ sal_Bool ScGridWindow::ShowNoteMarker( SCsCOL nPosX, SCsROW nPosY, sal_Bool bKey
aMapMode
,
bLeftEdge
,
bFast
,
bKeyboard
);
}
bDone
=
sal_T
rue
;
// something is shown (old or new)
bDone
=
t
rue
;
// something is shown (old or new)
}
return
bDone
;
...
...
@@ -412,7 +412,7 @@ void ScGridWindow::RequestHelp(const HelpEvent& rHEvt)
Window
::
RequestHelp
(
rHEvt
);
}
sal_B
ool
ScGridWindow
::
IsMyModel
(
SdrEditView
*
pSdrView
)
b
ool
ScGridWindow
::
IsMyModel
(
SdrEditView
*
pSdrView
)
{
return
pSdrView
&&
pSdrView
->
GetModel
()
==
pViewData
->
GetDocument
()
->
GetDrawLayer
();
...
...
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