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
ec3c9a5f
Kaydet (Commit)
ec3c9a5f
authored
Şub 07, 2014
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
sal_Bool->bool
Change-Id: I1b45ccb419ce827ca9ddb475e67878c95d67d36d
üst
a572badf
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
91 additions
and
91 deletions
+91
-91
detfunc.hxx
sc/inc/detfunc.hxx
+21
-21
detfunc.cxx
sc/source/core/tool/detfunc.cxx
+62
-62
docfunc.cxx
sc/source/ui/docshell/docfunc.cxx
+8
-8
No files found.
sc/inc/detfunc.hxx
Dosyayı görüntüle @
ec3c9a5f
...
...
@@ -53,7 +53,7 @@ class SC_DLLPUBLIC ScDetectiveFunc
static
ColorData
nArrowColor
;
static
ColorData
nErrorColor
;
static
ColorData
nCommentColor
;
static
sal_B
ool
bColorsInitialized
;
static
b
ool
bColorsInitialized
;
ScDocument
*
pDoc
;
SCTAB
nTab
;
...
...
@@ -76,30 +76,30 @@ class SC_DLLPUBLIC ScDetectiveFunc
/** @return the drawing layer rectangle for the passed cell address. */
Rectangle
GetDrawRect
(
SCCOL
nCol
,
SCROW
nRow
)
const
;
sal_B
ool
HasArrow
(
const
ScAddress
&
rStart
,
b
ool
HasArrow
(
const
ScAddress
&
rStart
,
SCCOL
nEndCol
,
SCROW
nEndRow
,
SCTAB
nEndTab
);
void
DeleteArrowsAt
(
SCCOL
nCol
,
SCROW
nRow
,
sal_B
ool
bDestPnt
);
void
DeleteArrowsAt
(
SCCOL
nCol
,
SCROW
nRow
,
b
ool
bDestPnt
);
void
DeleteBox
(
SCCOL
nCol1
,
SCROW
nRow1
,
SCCOL
nCol2
,
SCROW
nRow2
);
sal_B
ool
HasError
(
const
ScRange
&
rRange
,
ScAddress
&
rErrPos
);
b
ool
HasError
(
const
ScRange
&
rRange
,
ScAddress
&
rErrPos
);
void
FillAttributes
(
ScDetectiveData
&
rData
);
/// called from DrawEntry/DrawAlienEntry and InsertObject
sal_B
ool
InsertArrow
(
SCCOL
nCol
,
SCROW
nRow
,
b
ool
InsertArrow
(
SCCOL
nCol
,
SCROW
nRow
,
SCCOL
nRefStartCol
,
SCROW
nRefStartRow
,
SCCOL
nRefEndCol
,
SCROW
nRefEndRow
,
sal_Bool
bFromOtherTab
,
sal_B
ool
bRed
,
bool
bFromOtherTab
,
b
ool
bRed
,
ScDetectiveData
&
rData
);
sal_B
ool
InsertToOtherTab
(
SCCOL
nStartCol
,
SCROW
nStartRow
,
SCCOL
nEndCol
,
SCROW
nEndRow
,
sal_B
ool
bRed
,
b
ool
InsertToOtherTab
(
SCCOL
nStartCol
,
SCROW
nStartRow
,
SCCOL
nEndCol
,
SCROW
nEndRow
,
b
ool
bRed
,
ScDetectiveData
&
rData
);
/// DrawEntry / DrawAlienEntry check for existing arrows and errors
sal_B
ool
DrawEntry
(
SCCOL
nCol
,
SCROW
nRow
,
const
ScRange
&
rRef
,
b
ool
DrawEntry
(
SCCOL
nCol
,
SCROW
nRow
,
const
ScRange
&
rRef
,
ScDetectiveData
&
rData
);
sal_B
ool
DrawAlienEntry
(
const
ScRange
&
rRef
,
b
ool
DrawAlienEntry
(
const
ScRange
&
rRef
,
ScDetectiveData
&
rData
);
void
DrawCircle
(
SCCOL
nCol
,
SCROW
nRow
,
ScDetectiveData
&
rData
);
...
...
@@ -118,22 +118,22 @@ class SC_DLLPUBLIC ScDetectiveFunc
sal_uInt16
FindSuccLevel
(
SCCOL
nCol1
,
SCROW
nRow1
,
SCCOL
nCol2
,
SCROW
nRow2
,
sal_uInt16
nLevel
,
sal_uInt16
nDeleteLevel
);
sal_B
ool
FindFrameForObject
(
SdrObject
*
pObject
,
ScRange
&
rRange
);
b
ool
FindFrameForObject
(
SdrObject
*
pObject
,
ScRange
&
rRange
);
void
Modified
();
public
:
ScDetectiveFunc
(
ScDocument
*
pDocument
,
SCTAB
nTable
)
:
pDoc
(
pDocument
),
nTab
(
nTable
)
{}
sal_B
ool
ShowSucc
(
SCCOL
nCol
,
SCROW
nRow
);
sal_B
ool
ShowPred
(
SCCOL
nCol
,
SCROW
nRow
);
sal_B
ool
ShowError
(
SCCOL
nCol
,
SCROW
nRow
);
b
ool
ShowSucc
(
SCCOL
nCol
,
SCROW
nRow
);
b
ool
ShowPred
(
SCCOL
nCol
,
SCROW
nRow
);
b
ool
ShowError
(
SCCOL
nCol
,
SCROW
nRow
);
sal_B
ool
DeleteSucc
(
SCCOL
nCol
,
SCROW
nRow
);
sal_B
ool
DeletePred
(
SCCOL
nCol
,
SCROW
nRow
);
sal_B
ool
DeleteAll
(
ScDetectiveDelete
eWhat
);
b
ool
DeleteSucc
(
SCCOL
nCol
,
SCROW
nRow
);
b
ool
DeletePred
(
SCCOL
nCol
,
SCROW
nRow
);
b
ool
DeleteAll
(
ScDetectiveDelete
eWhat
);
sal_Bool
MarkInvalid
(
sal_B
ool
&
rOverflow
);
bool
MarkInvalid
(
b
ool
&
rOverflow
);
void
GetAllPreds
(
SCCOL
nCol1
,
SCROW
nRow1
,
SCCOL
nCol2
,
SCROW
nRow2
,
::
std
::
vector
<
ScTokenRef
>&
rRefTokens
);
void
GetAllSuccs
(
SCCOL
nCol1
,
SCROW
nRow1
,
SCCOL
nCol2
,
SCROW
nRow2
,
::
std
::
vector
<
ScTokenRef
>&
rRefTokens
);
...
...
@@ -141,18 +141,18 @@ public:
static
void
UpdateAllComments
(
ScDocument
&
rDoc
);
///< on all tables
void
UpdateAllArrowColors
();
///< on all tables
static
sal_B
ool
IsNonAlienArrow
(
SdrObject
*
pObject
);
static
b
ool
IsNonAlienArrow
(
SdrObject
*
pObject
);
ScDetectiveObjType
GetDetectiveObjectType
(
SdrObject
*
pObject
,
SCTAB
nObjTab
,
ScAddress
&
rPosition
,
ScRange
&
rSource
,
bool
&
rRedLine
);
void
InsertObject
(
ScDetectiveObjType
eType
,
const
ScAddress
&
rPosition
,
const
ScRange
&
rSource
,
sal_B
ool
bRedLine
);
const
ScRange
&
rSource
,
b
ool
bRedLine
);
static
ColorData
GetArrowColor
();
static
ColorData
GetErrorColor
();
static
ColorData
GetCommentColor
();
static
void
InitializeColors
();
static
sal_B
ool
IsColorsInitialized
();
static
b
ool
IsColorsInitialized
();
static
void
AppendChangTrackNoteSeparator
(
OUString
&
str
);
};
...
...
sc/source/core/tool/detfunc.cxx
Dosyayı görüntüle @
ec3c9a5f
...
...
@@ -121,9 +121,9 @@ private:
ColorData
ScDetectiveFunc
::
nArrowColor
=
0
;
ColorData
ScDetectiveFunc
::
nErrorColor
=
0
;
ColorData
ScDetectiveFunc
::
nCommentColor
=
0
;
sal_B
ool
ScDetectiveFunc
::
bColorsInitialized
=
false
;
b
ool
ScDetectiveFunc
::
bColorsInitialized
=
false
;
static
sal_B
ool
lcl_HasThickLine
(
SdrObject
&
rObj
)
static
b
ool
lcl_HasThickLine
(
SdrObject
&
rObj
)
{
// thin lines get width 0 -> everything greater 0 is a thick line
...
...
@@ -273,14 +273,14 @@ void ScDetectiveFunc::Modified()
pDoc
->
SetStreamValid
(
nTab
,
false
);
}
inline
sal_B
ool
Intersect
(
SCCOL
nStartCol1
,
SCROW
nStartRow1
,
SCCOL
nEndCol1
,
SCROW
nEndRow1
,
inline
b
ool
Intersect
(
SCCOL
nStartCol1
,
SCROW
nStartRow1
,
SCCOL
nEndCol1
,
SCROW
nEndRow1
,
SCCOL
nStartCol2
,
SCROW
nStartRow2
,
SCCOL
nEndCol2
,
SCROW
nEndRow2
)
{
return
nEndCol1
>=
nStartCol2
&&
nEndCol2
>=
nStartCol1
&&
nEndRow1
>=
nStartRow2
&&
nEndRow2
>=
nStartRow1
;
}
sal_B
ool
ScDetectiveFunc
::
HasError
(
const
ScRange
&
rRange
,
ScAddress
&
rErrPos
)
b
ool
ScDetectiveFunc
::
HasError
(
const
ScRange
&
rRange
,
ScAddress
&
rErrPos
)
{
rErrPos
=
rRange
.
aStart
;
sal_uInt16
nError
=
0
;
...
...
@@ -362,7 +362,7 @@ Rectangle ScDetectiveFunc::GetDrawRect( SCCOL nCol, SCROW nRow ) const
return
GetDrawRect
(
nCol
,
nRow
,
nCol
,
nRow
);
}
static
sal_B
ool
lcl_IsOtherTab
(
const
basegfx
::
B2DPolyPolygon
&
rPolyPolygon
)
static
b
ool
lcl_IsOtherTab
(
const
basegfx
::
B2DPolyPolygon
&
rPolyPolygon
)
{
// test if rPolygon is the line end for "other table" (rectangle)
if
(
1L
==
rPolyPolygon
.
count
())
...
...
@@ -380,11 +380,11 @@ static sal_Bool lcl_IsOtherTab( const basegfx::B2DPolyPolygon& rPolyPolygon )
return
false
;
}
sal_B
ool
ScDetectiveFunc
::
HasArrow
(
const
ScAddress
&
rStart
,
b
ool
ScDetectiveFunc
::
HasArrow
(
const
ScAddress
&
rStart
,
SCCOL
nEndCol
,
SCROW
nEndRow
,
SCTAB
nEndTab
)
{
sal_B
ool
bStartAlien
=
(
rStart
.
Tab
()
!=
nTab
);
sal_B
ool
bEndAlien
=
(
nEndTab
!=
nTab
);
b
ool
bStartAlien
=
(
rStart
.
Tab
()
!=
nTab
);
b
ool
bEndAlien
=
(
nEndTab
!=
nTab
);
if
(
bStartAlien
&&
bEndAlien
)
{
...
...
@@ -403,7 +403,7 @@ sal_Bool ScDetectiveFunc::HasArrow( const ScAddress& rStart,
SdrPage
*
pPage
=
pModel
->
GetPage
(
static_cast
<
sal_uInt16
>
(
nTab
));
OSL_ENSURE
(
pPage
,
"Page ?"
);
sal_B
ool
bFound
=
false
;
b
ool
bFound
=
false
;
SdrObjListIter
aIter
(
*
pPage
,
IM_FLAT
);
SdrObject
*
pObject
=
aIter
.
Next
();
while
(
pObject
&&
!
bFound
)
...
...
@@ -413,18 +413,18 @@ sal_Bool ScDetectiveFunc::HasArrow( const ScAddress& rStart,
{
const
SfxItemSet
&
rSet
=
pObject
->
GetMergedItemSet
();
sal_B
ool
bObjStartAlien
=
b
ool
bObjStartAlien
=
lcl_IsOtherTab
(
((
const
XLineStartItem
&
)
rSet
.
Get
(
XATTR_LINESTART
)).
GetLineStartValue
()
);
sal_B
ool
bObjEndAlien
=
b
ool
bObjEndAlien
=
lcl_IsOtherTab
(
((
const
XLineEndItem
&
)
rSet
.
Get
(
XATTR_LINEEND
)).
GetLineEndValue
()
);
sal_B
ool
bStartHit
=
bStartAlien
?
bObjStartAlien
:
b
ool
bStartHit
=
bStartAlien
?
bObjStartAlien
:
(
!
bObjStartAlien
&&
aStartRect
.
IsInside
(
pObject
->
GetPoint
(
0
))
);
sal_B
ool
bEndHit
=
bEndAlien
?
bObjEndAlien
:
b
ool
bEndHit
=
bEndAlien
?
bObjEndAlien
:
(
!
bObjEndAlien
&&
aEndRect
.
IsInside
(
pObject
->
GetPoint
(
1
))
);
if
(
bStartHit
&&
bEndHit
)
bFound
=
sal_T
rue
;
bFound
=
t
rue
;
}
pObject
=
aIter
.
Next
();
}
...
...
@@ -432,16 +432,16 @@ sal_Bool ScDetectiveFunc::HasArrow( const ScAddress& rStart,
return
bFound
;
}
sal_B
ool
ScDetectiveFunc
::
IsNonAlienArrow
(
SdrObject
*
pObject
)
b
ool
ScDetectiveFunc
::
IsNonAlienArrow
(
SdrObject
*
pObject
)
{
if
(
pObject
->
GetLayer
()
==
SC_LAYER_INTERN
&&
pObject
->
IsPolyObj
()
&&
pObject
->
GetPointCount
()
==
2
)
{
const
SfxItemSet
&
rSet
=
pObject
->
GetMergedItemSet
();
sal_B
ool
bObjStartAlien
=
b
ool
bObjStartAlien
=
lcl_IsOtherTab
(
((
const
XLineStartItem
&
)
rSet
.
Get
(
XATTR_LINESTART
)).
GetLineStartValue
()
);
sal_B
ool
bObjEndAlien
=
b
ool
bObjEndAlien
=
lcl_IsOtherTab
(
((
const
XLineEndItem
&
)
rSet
.
Get
(
XATTR_LINEEND
)).
GetLineEndValue
()
);
return
!
bObjStartAlien
&&
!
bObjEndAlien
;
...
...
@@ -452,16 +452,16 @@ sal_Bool ScDetectiveFunc::IsNonAlienArrow( SdrObject* pObject )
// InsertXXX: called from DrawEntry/DrawAlienEntry and InsertObject
sal_B
ool
ScDetectiveFunc
::
InsertArrow
(
SCCOL
nCol
,
SCROW
nRow
,
b
ool
ScDetectiveFunc
::
InsertArrow
(
SCCOL
nCol
,
SCROW
nRow
,
SCCOL
nRefStartCol
,
SCROW
nRefStartRow
,
SCCOL
nRefEndCol
,
SCROW
nRefEndRow
,
sal_Bool
bFromOtherTab
,
sal_B
ool
bRed
,
bool
bFromOtherTab
,
b
ool
bRed
,
ScDetectiveData
&
rData
)
{
ScDrawLayer
*
pModel
=
pDoc
->
GetDrawLayer
();
SdrPage
*
pPage
=
pModel
->
GetPage
(
static_cast
<
sal_uInt16
>
(
nTab
));
sal_B
ool
bArea
=
(
nRefStartCol
!=
nRefEndCol
||
nRefStartRow
!=
nRefEndRow
);
b
ool
bArea
=
(
nRefStartCol
!=
nRefEndCol
||
nRefStartRow
!=
nRefEndRow
);
if
(
bArea
&&
!
bFromOtherTab
)
{
// insert the rectangle before the arrow - this is relied on in FindFrameForObject
...
...
@@ -485,7 +485,7 @@ sal_Bool ScDetectiveFunc::InsertArrow( SCCOL nCol, SCROW nRow,
if
(
bFromOtherTab
)
{
sal_B
ool
bNegativePage
=
pDoc
->
IsNegativePage
(
nTab
);
b
ool
bNegativePage
=
pDoc
->
IsNegativePage
(
nTab
);
long
nPageSign
=
bNegativePage
?
-
1
:
1
;
aStartPos
=
Point
(
aEndPos
.
X
()
-
1000
*
nPageSign
,
aEndPos
.
Y
()
-
1000
);
...
...
@@ -529,14 +529,14 @@ sal_Bool ScDetectiveFunc::InsertArrow( SCCOL nCol, SCROW nRow,
return
true
;
}
sal_B
ool
ScDetectiveFunc
::
InsertToOtherTab
(
SCCOL
nStartCol
,
SCROW
nStartRow
,
SCCOL
nEndCol
,
SCROW
nEndRow
,
sal_B
ool
bRed
,
b
ool
ScDetectiveFunc
::
InsertToOtherTab
(
SCCOL
nStartCol
,
SCROW
nStartRow
,
SCCOL
nEndCol
,
SCROW
nEndRow
,
b
ool
bRed
,
ScDetectiveData
&
rData
)
{
ScDrawLayer
*
pModel
=
pDoc
->
GetDrawLayer
();
SdrPage
*
pPage
=
pModel
->
GetPage
(
static_cast
<
sal_uInt16
>
(
nTab
));
sal_B
ool
bArea
=
(
nStartCol
!=
nEndCol
||
nStartRow
!=
nEndRow
);
b
ool
bArea
=
(
nStartCol
!=
nEndCol
||
nStartRow
!=
nEndRow
);
if
(
bArea
)
{
Rectangle
aRect
=
GetDrawRect
(
nStartCol
,
nStartRow
,
nEndCol
,
nEndRow
);
...
...
@@ -553,7 +553,7 @@ sal_Bool ScDetectiveFunc::InsertToOtherTab( SCCOL nStartCol, SCROW nStartRow,
pData
->
maEnd
.
Set
(
nEndCol
,
nEndRow
,
nTab
);
}
sal_B
ool
bNegativePage
=
pDoc
->
IsNegativePage
(
nTab
);
b
ool
bNegativePage
=
pDoc
->
IsNegativePage
(
nTab
);
long
nPageSign
=
bNegativePage
?
-
1
:
1
;
Point
aStartPos
=
GetDrawPos
(
nStartCol
,
nStartRow
,
DRAWPOS_DETARROW
);
...
...
@@ -587,7 +587,7 @@ sal_Bool ScDetectiveFunc::InsertToOtherTab( SCCOL nStartCol, SCROW nStartRow,
pData
->
maEnd
.
SetInvalid
();
Modified
();
return
sal_T
rue
;
return
t
rue
;
}
// DrawEntry: Formel auf dieser Tabelle,
...
...
@@ -597,7 +597,7 @@ sal_Bool ScDetectiveFunc::InsertToOtherTab( SCCOL nStartCol, SCROW nStartRow,
// return FALSE: da war schon ein Pfeil
sal_B
ool
ScDetectiveFunc
::
DrawEntry
(
SCCOL
nCol
,
SCROW
nRow
,
b
ool
ScDetectiveFunc
::
DrawEntry
(
SCCOL
nCol
,
SCROW
nRow
,
const
ScRange
&
rRef
,
ScDetectiveData
&
rData
)
{
...
...
@@ -605,8 +605,8 @@ sal_Bool ScDetectiveFunc::DrawEntry( SCCOL nCol, SCROW nRow,
return
false
;
ScAddress
aErrorPos
;
sal_B
ool
bError
=
HasError
(
rRef
,
aErrorPos
);
sal_B
ool
bAlien
=
(
rRef
.
aEnd
.
Tab
()
<
nTab
||
rRef
.
aStart
.
Tab
()
>
nTab
);
b
ool
bError
=
HasError
(
rRef
,
aErrorPos
);
b
ool
bAlien
=
(
rRef
.
aEnd
.
Tab
()
<
nTab
||
rRef
.
aStart
.
Tab
()
>
nTab
);
return
InsertArrow
(
nCol
,
nRow
,
rRef
.
aStart
.
Col
(),
rRef
.
aStart
.
Row
(),
...
...
@@ -614,14 +614,14 @@ sal_Bool ScDetectiveFunc::DrawEntry( SCCOL nCol, SCROW nRow,
bAlien
,
bError
,
rData
);
}
sal_B
ool
ScDetectiveFunc
::
DrawAlienEntry
(
const
ScRange
&
rRef
,
b
ool
ScDetectiveFunc
::
DrawAlienEntry
(
const
ScRange
&
rRef
,
ScDetectiveData
&
rData
)
{
if
(
HasArrow
(
rRef
.
aStart
,
0
,
0
,
nTab
+
1
)
)
return
false
;
ScAddress
aErrorPos
;
sal_B
ool
bError
=
HasError
(
rRef
,
aErrorPos
);
b
ool
bError
=
HasError
(
rRef
,
aErrorPos
);
return
InsertToOtherTab
(
rRef
.
aStart
.
Col
(),
rRef
.
aStart
.
Row
(),
rRef
.
aEnd
.
Col
(),
rRef
.
aEnd
.
Row
(),
...
...
@@ -656,7 +656,7 @@ void ScDetectiveFunc::DrawCircle( SCCOL nCol, SCROW nRow, ScDetectiveData& rData
Modified
();
}
void
ScDetectiveFunc
::
DeleteArrowsAt
(
SCCOL
nCol
,
SCROW
nRow
,
sal_B
ool
bDestPnt
)
void
ScDetectiveFunc
::
DeleteArrowsAt
(
SCCOL
nCol
,
SCROW
nRow
,
b
ool
bDestPnt
)
{
Rectangle
aRect
=
GetDrawRect
(
nCol
,
nRow
);
...
...
@@ -703,7 +703,7 @@ void ScDetectiveFunc::DeleteArrowsAt( SCCOL nCol, SCROW nRow, sal_Bool bDestPnt
#define SC_DET_TOLERANCE 50
inline
sal_B
ool
RectIsPoints
(
const
Rectangle
&
rRect
,
const
Point
&
rStart
,
const
Point
&
rEnd
)
inline
b
ool
RectIsPoints
(
const
Rectangle
&
rRect
,
const
Point
&
rStart
,
const
Point
&
rEnd
)
{
return
rRect
.
Left
()
>=
rStart
.
X
()
-
SC_DET_TOLERANCE
&&
rRect
.
Left
()
<=
rStart
.
X
()
+
SC_DET_TOLERANCE
...
...
@@ -831,7 +831,7 @@ sal_uInt16 ScDetectiveFunc::InsertPredLevel( SCCOL nCol, SCROW nRow, ScDetective
if
(
nLevel
<
rData
.
GetMaxLevel
()
)
{
sal_uInt16
nSubResult
;
sal_B
ool
bArea
=
(
aRef
.
aStart
!=
aRef
.
aEnd
);
b
ool
bArea
=
(
aRef
.
aStart
!=
aRef
.
aEnd
);
if
(
bArea
)
nSubResult
=
InsertPredLevelArea
(
aRef
,
rData
,
nLevel
+
1
);
else
...
...
@@ -904,18 +904,18 @@ sal_uInt16 ScDetectiveFunc::FindPredLevel( SCCOL nCol, SCROW nRow, sal_uInt16 nL
pFCell
->
SetRunning
(
true
);
sal_uInt16
nResult
=
nLevel
;
sal_B
ool
bDelete
=
(
nDeleteLevel
&&
nLevel
==
nDeleteLevel
-
1
);
b
ool
bDelete
=
(
nDeleteLevel
&&
nLevel
==
nDeleteLevel
-
1
);
if
(
bDelete
)
{
DeleteArrowsAt
(
nCol
,
nRow
,
sal_T
rue
);
// Pfeile, die hierher zeigen
DeleteArrowsAt
(
nCol
,
nRow
,
t
rue
);
// Pfeile, die hierher zeigen
}
ScDetectiveRefIter
aIter
(
pFCell
);
ScRange
aRef
;
while
(
aIter
.
GetNextRef
(
aRef
)
)
{
sal_B
ool
bArea
=
(
aRef
.
aStart
!=
aRef
.
aEnd
);
b
ool
bArea
=
(
aRef
.
aStart
!=
aRef
.
aEnd
);
if
(
bDelete
)
// Rahmen loeschen ?
{
...
...
@@ -966,12 +966,12 @@ sal_uInt16 ScDetectiveFunc::InsertErrorLevel( SCCOL nCol, SCROW nRow, ScDetectiv
ScDetectiveRefIter
aIter
(
pFCell
);
ScRange
aRef
;
ScAddress
aErrorPos
;
sal_B
ool
bHasError
=
false
;
b
ool
bHasError
=
false
;
while
(
aIter
.
GetNextRef
(
aRef
)
)
{
if
(
HasError
(
aRef
,
aErrorPos
))
{
bHasError
=
sal_T
rue
;
bHasError
=
t
rue
;
if
(
DrawEntry
(
nCol
,
nRow
,
ScRange
(
aErrorPos
),
rData
))
nResult
=
DET_INS_INSERTED
;
...
...
@@ -1025,8 +1025,8 @@ sal_uInt16 ScDetectiveFunc::InsertSuccLevel( SCCOL nCol1, SCROW nRow1, SCCOL nCo
aRef
.
aStart
.
Col
(),
aRef
.
aStart
.
Row
(),
aRef
.
aEnd
.
Col
(),
aRef
.
aEnd
.
Row
()
))
{
sal_B
ool
bAlien
=
(
aCellIter
.
GetPos
().
Tab
()
!=
nTab
);
sal_B
ool
bDrawRet
;
b
ool
bAlien
=
(
aCellIter
.
GetPos
().
Tab
()
!=
nTab
);
b
ool
bDrawRet
;
if
(
bAlien
)
bDrawRet
=
DrawAlienEntry
(
aRef
,
rData
);
else
...
...
@@ -1089,7 +1089,7 @@ sal_uInt16 ScDetectiveFunc::FindSuccLevel( SCCOL nCol1, SCROW nRow1, SCCOL nCol2
OSL_ENSURE
(
nLevel
<
1000
,
"Level"
);
sal_uInt16
nResult
=
nLevel
;
sal_B
ool
bDelete
=
(
nDeleteLevel
&&
nLevel
==
nDeleteLevel
-
1
);
b
ool
bDelete
=
(
nDeleteLevel
&&
nLevel
==
nDeleteLevel
-
1
);
ScCellIterator
aCellIter
(
pDoc
,
ScRange
(
0
,
0
,
nTab
,
MAXCOL
,
MAXROW
,
nTab
)
);
for
(
bool
bHas
=
aCellIter
.
first
();
bHas
;
bHas
=
aCellIter
.
next
())
...
...
@@ -1147,7 +1147,7 @@ sal_uInt16 ScDetectiveFunc::FindSuccLevel( SCCOL nCol1, SCROW nRow1, SCCOL nCol2
//
sal_B
ool
ScDetectiveFunc
::
ShowPred
(
SCCOL
nCol
,
SCROW
nRow
)
b
ool
ScDetectiveFunc
::
ShowPred
(
SCCOL
nCol
,
SCROW
nRow
)
{
ScDrawLayer
*
pModel
=
pDoc
->
GetDrawLayer
();
if
(
!
pModel
)
...
...
@@ -1167,7 +1167,7 @@ sal_Bool ScDetectiveFunc::ShowPred( SCCOL nCol, SCROW nRow )
return
(
nResult
==
DET_INS_INSERTED
);
}
sal_B
ool
ScDetectiveFunc
::
ShowSucc
(
SCCOL
nCol
,
SCROW
nRow
)
b
ool
ScDetectiveFunc
::
ShowSucc
(
SCCOL
nCol
,
SCROW
nRow
)
{
ScDrawLayer
*
pModel
=
pDoc
->
GetDrawLayer
();
if
(
!
pModel
)
...
...
@@ -1187,7 +1187,7 @@ sal_Bool ScDetectiveFunc::ShowSucc( SCCOL nCol, SCROW nRow )
return
(
nResult
==
DET_INS_INSERTED
);
}
sal_B
ool
ScDetectiveFunc
::
ShowError
(
SCCOL
nCol
,
SCROW
nRow
)
b
ool
ScDetectiveFunc
::
ShowError
(
SCCOL
nCol
,
SCROW
nRow
)
{
ScDrawLayer
*
pModel
=
pDoc
->
GetDrawLayer
();
if
(
!
pModel
)
...
...
@@ -1206,7 +1206,7 @@ sal_Bool ScDetectiveFunc::ShowError( SCCOL nCol, SCROW nRow )
return
(
nResult
==
DET_INS_INSERTED
);
}
sal_B
ool
ScDetectiveFunc
::
DeleteSucc
(
SCCOL
nCol
,
SCROW
nRow
)
b
ool
ScDetectiveFunc
::
DeleteSucc
(
SCCOL
nCol
,
SCROW
nRow
)
{
ScDrawLayer
*
pModel
=
pDoc
->
GetDrawLayer
();
if
(
!
pModel
)
...
...
@@ -1219,7 +1219,7 @@ sal_Bool ScDetectiveFunc::DeleteSucc( SCCOL nCol, SCROW nRow )
return
(
nLevelCount
!=
0
);
}
sal_B
ool
ScDetectiveFunc
::
DeletePred
(
SCCOL
nCol
,
SCROW
nRow
)
b
ool
ScDetectiveFunc
::
DeletePred
(
SCCOL
nCol
,
SCROW
nRow
)
{
ScDrawLayer
*
pModel
=
pDoc
->
GetDrawLayer
();
if
(
!
pModel
)
...
...
@@ -1232,7 +1232,7 @@ sal_Bool ScDetectiveFunc::DeletePred( SCCOL nCol, SCROW nRow )
return
(
nLevelCount
!=
0
);
}
sal_B
ool
ScDetectiveFunc
::
DeleteAll
(
ScDetectiveDelete
eWhat
)
b
ool
ScDetectiveFunc
::
DeleteAll
(
ScDetectiveDelete
eWhat
)
{
ScDrawLayer
*
pModel
=
pDoc
->
GetDrawLayer
();
if
(
!
pModel
)
...
...
@@ -1255,11 +1255,11 @@ sal_Bool ScDetectiveFunc::DeleteAll( ScDetectiveDelete eWhat )
{
if
(
pObject
->
GetLayer
()
==
SC_LAYER_INTERN
)
{
sal_Bool
bDoThis
=
sal_T
rue
;
bool
bDoThis
=
t
rue
;
if
(
eWhat
!=
SC_DET_ALL
)
{
sal_B
ool
bCircle
=
(
pObject
->
ISA
(
SdrCircObj
)
);
sal_B
ool
bCaption
=
ScDrawLayer
::
IsNoteCaption
(
pObject
);
b
ool
bCircle
=
(
pObject
->
ISA
(
SdrCircObj
)
);
b
ool
bCaption
=
ScDrawLayer
::
IsNoteCaption
(
pObject
);
if
(
eWhat
==
SC_DET_DETECTIVE
)
// Detektiv, aus Menue
bDoThis
=
!
bCaption
;
// auch Kreise
else
if
(
eWhat
==
SC_DET_CIRCLES
)
// Kreise, wenn neue erzeugt werden
...
...
@@ -1293,14 +1293,14 @@ sal_Bool ScDetectiveFunc::DeleteAll( ScDetectiveDelete eWhat )
return
(
nDelCount
!=
0
);
}
sal_Bool
ScDetectiveFunc
::
MarkInvalid
(
sal_B
ool
&
rOverflow
)
bool
ScDetectiveFunc
::
MarkInvalid
(
b
ool
&
rOverflow
)
{
rOverflow
=
false
;
ScDrawLayer
*
pModel
=
pDoc
->
GetDrawLayer
();
if
(
!
pModel
)
return
false
;
sal_B
ool
bDeleted
=
DeleteAll
(
SC_DET_CIRCLES
);
// nur die Kreise
b
ool
bDeleted
=
DeleteAll
(
SC_DET_CIRCLES
);
// nur die Kreise
ScDetectiveData
aData
(
pModel
);
long
nInsCount
=
0
;
...
...
@@ -1322,7 +1322,7 @@ sal_Bool ScDetectiveFunc::MarkInvalid(sal_Bool& rOverflow)
{
// Zellen in dem Bereich durchgehen
sal_B
ool
bMarkEmpty
=
!
pData
->
IsIgnoreBlank
();
b
ool
bMarkEmpty
=
!
pData
->
IsIgnoreBlank
();
SCROW
nNextRow
=
nRow1
;
SCROW
nRow
;
ScCellIterator
aCellIter
(
pDoc
,
ScRange
(
nCol
,
nRow1
,
nTab
,
nCol
,
nRow2
,
nTab
)
);
...
...
@@ -1356,7 +1356,7 @@ sal_Bool ScDetectiveFunc::MarkInvalid(sal_Bool& rOverflow)
}
if
(
nInsCount
>=
SC_DET_MAXCIRCLE
)
rOverflow
=
sal_T
rue
;
rOverflow
=
t
rue
;
return
(
bDeleted
||
nInsCount
!=
0
);
}
...
...
@@ -1472,8 +1472,8 @@ void ScDetectiveFunc::UpdateAllArrowColors()
{
if
(
pObject
->
GetLayer
()
==
SC_LAYER_INTERN
)
{
sal_B
ool
bArrow
=
false
;
sal_B
ool
bError
=
false
;
b
ool
bArrow
=
false
;
b
ool
bError
=
false
;
ScAddress
aPos
;
ScRange
aSource
;
...
...
@@ -1531,7 +1531,7 @@ void ScDetectiveFunc::UpdateAllArrowColors()
}
}
sal_B
ool
ScDetectiveFunc
::
FindFrameForObject
(
SdrObject
*
pObject
,
ScRange
&
rRange
)
b
ool
ScDetectiveFunc
::
FindFrameForObject
(
SdrObject
*
pObject
,
ScRange
&
rRange
)
{
// find the rectangle for an arrow (always the object directly before the arrow)
// rRange must be initialized to the source cell of the arrow (start of area)
...
...
@@ -1559,7 +1559,7 @@ sal_Bool ScDetectiveFunc::FindFrameForObject( SdrObject* pObject, ScRange& rRang
if
(
pPrevData
&&
pPrevData
->
maStart
.
IsValid
()
&&
pPrevData
->
maEnd
.
IsValid
()
&&
(
pPrevData
->
maStart
==
rRange
.
aStart
)
)
{
rRange
.
aEnd
=
pPrevData
->
maEnd
;
return
sal_T
rue
;
return
t
rue
;
}
}
}
...
...
@@ -1623,7 +1623,7 @@ ScDetectiveObjType ScDetectiveFunc::GetDetectiveObjectType( SdrObject* pObject,
void
ScDetectiveFunc
::
InsertObject
(
ScDetectiveObjType
eType
,
const
ScAddress
&
rPosition
,
const
ScRange
&
rSource
,
sal_B
ool
bRedLine
)
b
ool
bRedLine
)
{
ScDrawLayer
*
pModel
=
pDoc
->
GetDrawLayer
();
if
(
!
pModel
)
return
;
...
...
@@ -1683,10 +1683,10 @@ void ScDetectiveFunc::InitializeColors()
nErrorColor
=
rColorCfg
.
GetColorValue
(
svtools
::
CALCDETECTIVEERROR
).
nColor
;
nCommentColor
=
rColorCfg
.
GetColorValue
(
svtools
::
CALCNOTESBACKGROUND
).
nColor
;
bColorsInitialized
=
sal_T
rue
;
bColorsInitialized
=
t
rue
;
}
sal_B
ool
ScDetectiveFunc
::
IsColorsInitialized
()
b
ool
ScDetectiveFunc
::
IsColorsInitialized
()
{
return
bColorsInitialized
;
}
...
...
sc/source/ui/docshell/docfunc.cxx
Dosyayı görüntüle @
ec3c9a5f
...
...
@@ -184,7 +184,7 @@ sal_Bool ScDocFunc::DetectiveAddPred(const ScAddress& rPos)
if
(
bUndo
)
pModel
->
BeginCalcUndo
(
false
);
sal_B
ool
bDone
=
ScDetectiveFunc
(
pDoc
,
nTab
).
ShowPred
(
nCol
,
nRow
);
b
ool
bDone
=
ScDetectiveFunc
(
pDoc
,
nTab
).
ShowPred
(
nCol
,
nRow
);
SdrUndoGroup
*
pUndo
=
NULL
;
if
(
bUndo
)
pUndo
=
pModel
->
GetCalcUndo
();
...
...
@@ -225,7 +225,7 @@ sal_Bool ScDocFunc::DetectiveDelPred(const ScAddress& rPos)
if
(
bUndo
)
pModel
->
BeginCalcUndo
(
false
);
sal_B
ool
bDone
=
ScDetectiveFunc
(
pDoc
,
nTab
).
DeletePred
(
nCol
,
nRow
);
b
ool
bDone
=
ScDetectiveFunc
(
pDoc
,
nTab
).
DeletePred
(
nCol
,
nRow
);
SdrUndoGroup
*
pUndo
=
NULL
;
if
(
bUndo
)
pUndo
=
pModel
->
GetCalcUndo
();
...
...
@@ -264,7 +264,7 @@ sal_Bool ScDocFunc::DetectiveAddSucc(const ScAddress& rPos)
if
(
bUndo
)
pModel
->
BeginCalcUndo
(
false
);
sal_B
ool
bDone
=
ScDetectiveFunc
(
pDoc
,
nTab
).
ShowSucc
(
nCol
,
nRow
);
b
ool
bDone
=
ScDetectiveFunc
(
pDoc
,
nTab
).
ShowSucc
(
nCol
,
nRow
);
SdrUndoGroup
*
pUndo
=
NULL
;
if
(
bUndo
)
pUndo
=
pModel
->
GetCalcUndo
();
...
...
@@ -305,7 +305,7 @@ sal_Bool ScDocFunc::DetectiveDelSucc(const ScAddress& rPos)
if
(
bUndo
)
pModel
->
BeginCalcUndo
(
false
);
sal_B
ool
bDone
=
ScDetectiveFunc
(
pDoc
,
nTab
).
DeleteSucc
(
nCol
,
nRow
);
b
ool
bDone
=
ScDetectiveFunc
(
pDoc
,
nTab
).
DeleteSucc
(
nCol
,
nRow
);
SdrUndoGroup
*
pUndo
=
NULL
;
if
(
bUndo
)
pUndo
=
pModel
->
GetCalcUndo
();
...
...
@@ -344,7 +344,7 @@ sal_Bool ScDocFunc::DetectiveAddError(const ScAddress& rPos)
if
(
bUndo
)
pModel
->
BeginCalcUndo
(
false
);
sal_B
ool
bDone
=
ScDetectiveFunc
(
pDoc
,
nTab
).
ShowError
(
nCol
,
nRow
);
b
ool
bDone
=
ScDetectiveFunc
(
pDoc
,
nTab
).
ShowError
(
nCol
,
nRow
);
SdrUndoGroup
*
pUndo
=
NULL
;
if
(
bUndo
)
pUndo
=
pModel
->
GetCalcUndo
();
...
...
@@ -383,8 +383,8 @@ sal_Bool ScDocFunc::DetectiveMarkInvalid(SCTAB nTab)
pWaitWin
->
EnterWait
();
if
(
bUndo
)
pModel
->
BeginCalcUndo
(
false
);
sal_B
ool
bOverflow
;
sal_B
ool
bDone
=
ScDetectiveFunc
(
pDoc
,
nTab
).
MarkInvalid
(
bOverflow
);
b
ool
bOverflow
;
b
ool
bDone
=
ScDetectiveFunc
(
pDoc
,
nTab
).
MarkInvalid
(
bOverflow
);
SdrUndoGroup
*
pUndo
=
NULL
;
if
(
bUndo
)
pUndo
=
pModel
->
GetCalcUndo
();
...
...
@@ -423,7 +423,7 @@ sal_Bool ScDocFunc::DetectiveDelAll(SCTAB nTab)
if
(
bUndo
)
pModel
->
BeginCalcUndo
(
false
);
sal_B
ool
bDone
=
ScDetectiveFunc
(
pDoc
,
nTab
).
DeleteAll
(
SC_DET_DETECTIVE
);
b
ool
bDone
=
ScDetectiveFunc
(
pDoc
,
nTab
).
DeleteAll
(
SC_DET_DETECTIVE
);
SdrUndoGroup
*
pUndo
=
NULL
;
if
(
bUndo
)
pUndo
=
pModel
->
GetCalcUndo
();
...
...
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