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
0158333f
Kaydet (Commit)
0158333f
authored
Ara 05, 2011
tarafından
Marcel Metz
Kaydeden (comit)
Eike Rathke
Ara 05, 2011
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Replace ScChangeTrackMsgStack with std::stack< ScChangeTrackMsgInfo* >
üst
6ea8ea45
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
38 deletions
+42
-38
chgtrack.hxx
sc/inc/chgtrack.hxx
+3
-7
chgtrack.cxx
sc/source/core/tool/chgtrack.cxx
+38
-31
XclExpChangeTrack.hxx
sc/source/filter/inc/XclExpChangeTrack.hxx
+1
-0
No files found.
sc/inc/chgtrack.hxx
Dosyayı görüntüle @
0158333f
...
...
@@ -30,11 +30,11 @@
#define SC_CHGTRACK_HXX
#include <deque>
#include <stack>
#include <tools/string.hxx>
#include <tools/datetime.hxx>
#include <tools/table.hxx>
#include <tools/stack.hxx>
#include <tools/mempool.hxx>
#include <tools/link.hxx>
#include <unotools/options.hxx>
...
...
@@ -689,8 +689,6 @@ enum ScChangeActionContentCellType
SC_CACCT_MATREF
};
class
Stack
;
class
ScChangeActionContent
:
public
ScChangeAction
{
friend
class
ScChangeTrack
;
...
...
@@ -779,7 +777,7 @@ class ScChangeActionContent : public ScChangeAction
// pRejectActions!=NULL: reject actions get
// stacked, no SetNewValue, no Append
sal_Bool
Select
(
ScDocument
*
,
ScChangeTrack
*
,
sal_Bool
bOldest
,
Stack
*
pRejectActions
);
sal_Bool
bOldest
,
::
std
::
stack
<
ScChangeActionContent
*>
*
pRejectActions
);
void
PutValueToDoc
(
ScBaseCell
*
,
const
String
&
,
ScDocument
*
,
SCsCOL
nDx
,
SCsROW
nDy
)
const
;
...
...
@@ -901,8 +899,6 @@ public:
// --- ScChangeActionReject -------------------------------------------------
class
Stack
;
class
ScChangeActionReject
:
public
ScChangeAction
{
friend
class
ScChangeTrack
;
...
...
@@ -955,7 +951,7 @@ struct ScChangeTrackMsgInfo
// MsgQueue for notification via ModifiedLink
typedef
std
::
deque
<
ScChangeTrackMsgInfo
*>
ScChangeTrackMsgQueue
;
DECLARE_STACK
(
ScChangeTrackMsgStack
,
ScChangeTrackMsgInfo
*
)
typedef
std
::
stack
<
ScChangeTrackMsgInfo
*>
ScChangeTrackMsgStack
;
enum
ScChangeTrackMergeState
{
...
...
sc/source/core/tool/chgtrack.cxx
Dosyayı görüntüle @
0158333f
...
...
@@ -29,7 +29,6 @@
#include <tools/shl.hxx> // SHL_CALC
#include <tools/stack.hxx>
#include <tools/rtti.hxx>
#include <svl/zforlist.hxx>
#include <svl/itemset.hxx>
...
...
@@ -53,13 +52,9 @@
#include "globstr.hrc"
#include <stack>
#define SC_CHGTRACK_CXX
#include "chgtrack.hxx"
DECLARE_STACK
(
ScChangeActionStack
,
ScChangeAction
*
)
const
sal_uInt16
nMemPoolChangeActionCellListEntry
=
(
0x2000
-
64
)
/
sizeof
(
ScChangeActionCellListEntry
);
IMPL_FIXEDMEMPOOL_NEWDEL
(
ScChangeActionCellListEntry
,
nMemPoolChangeActionCellListEntry
,
nMemPoolChangeActionCellListEntry
)
...
...
@@ -1520,7 +1515,7 @@ sal_Bool ScChangeActionContent::Reject( ScDocument* pDoc )
sal_Bool
ScChangeActionContent
::
Select
(
ScDocument
*
pDoc
,
ScChangeTrack
*
pTrack
,
sal_Bool
bOldest
,
Stack
*
pRejectActions
)
sal_Bool
bOldest
,
::
std
::
stack
<
ScChangeActionContent
*>
*
pRejectActions
)
{
if
(
!
aBigRange
.
IsValid
(
pDoc
)
)
return
false
;
...
...
@@ -1565,7 +1560,7 @@ sal_Bool ScChangeActionContent::Select( ScDocument* pDoc, ScChangeTrack* pTrack,
pNew
->
SetRejectAction
(
bOldest
?
GetActionNumber
()
:
pEnd
->
GetActionNumber
()
);
pNew
->
SetState
(
SC_CAS_ACCEPTED
);
if
(
pRejectActions
)
pRejectActions
->
P
ush
(
pNew
);
pRejectActions
->
p
ush
(
pNew
);
else
{
pNew
->
SetNewValue
(
pDoc
->
GetCell
(
rPos
),
pDoc
);
...
...
@@ -2147,11 +2142,16 @@ void ScChangeTrack::ClearMsgQueue()
delete
pBlockModifyMsg
;
pBlockModifyMsg
=
NULL
;
}
ScChangeTrackMsgInfo
*
pMsgInfo
;
while
(
(
pMsgInfo
=
aMsgStackTmp
.
Pop
()
)
!=
NULL
)
delete
pMsgInfo
;
while
(
(
pMsgInfo
=
aMsgStackFinal
.
Pop
()
)
!=
NULL
)
delete
pMsgInfo
;
while
(
!
aMsgStackTmp
.
empty
()
)
{
delete
aMsgStackTmp
.
top
();
aMsgStackTmp
.
pop
();
}
while
(
!
aMsgStackFinal
.
empty
()
)
{
delete
aMsgStackFinal
.
top
();
aMsgStackFinal
.
pop
();
}
ScChangeTrackMsgQueue
::
iterator
itQueue
;
for
(
itQueue
=
aMsgQueue
.
begin
();
itQueue
!=
aMsgQueue
.
end
();
++
itQueue
)
...
...
@@ -2218,7 +2218,7 @@ void ScChangeTrack::StartBlockModify( ScChangeTrackMsgType eMsgType,
if
(
aModifiedLink
.
IsSet
()
)
{
if
(
pBlockModifyMsg
)
aMsgStackTmp
.
P
ush
(
pBlockModifyMsg
);
// Block im Block
aMsgStackTmp
.
p
ush
(
pBlockModifyMsg
);
// Block im Block
pBlockModifyMsg
=
new
ScChangeTrackMsgInfo
;
pBlockModifyMsg
->
eMsgType
=
eMsgType
;
pBlockModifyMsg
->
nStartAction
=
nStartAction
;
...
...
@@ -2236,19 +2236,20 @@ void ScChangeTrack::EndBlockModify( sal_uLong nEndAction )
{
pBlockModifyMsg
->
nEndAction
=
nEndAction
;
// Blocks in Blocks aufgeloest
aMsgStackFinal
.
P
ush
(
pBlockModifyMsg
);
aMsgStackFinal
.
p
ush
(
pBlockModifyMsg
);
}
else
delete
pBlockModifyMsg
;
pBlockModifyMsg
=
aMsgStackTmp
.
Pop
();
// evtl. Block im Block
pBlockModifyMsg
=
aMsgStackTmp
.
top
();
// evtl. Block im Block
aMsgStackTmp
.
pop
();
}
if
(
!
pBlockModifyMsg
)
{
sal_Bool
bNew
=
false
;
ScChangeTrackMsgInfo
*
pMsg
;
while
(
(
pMsg
=
aMsgStackFinal
.
Pop
()
)
!=
NULL
)
while
(
!
aMsgStackFinal
.
empty
()
)
{
aMsgQueue
.
push_back
(
pMsg
);
aMsgQueue
.
push_back
(
aMsgStackFinal
.
top
()
);
aMsgStackFinal
.
pop
();
bNew
=
sal_True
;
}
if
(
bNew
)
...
...
@@ -3850,10 +3851,15 @@ void ScChangeTrack::GetDependents( ScChangeAction* pAct,
sal_Bool
bIsDelete
=
pAct
->
IsDeleteType
();
sal_Bool
bIsMasterDelete
=
(
bListMasterDelete
&&
pAct
->
IsMasterDelete
()
);
const
ScChangeAction
*
pCur
=
pAct
;
ScChangeActionStack
*
pStack
=
new
ScChangeActionStack
;
do
const
ScChangeAction
*
pCur
=
NULL
;
::
std
::
stack
<
ScChangeAction
*>
cStack
;
cStack
.
push
(
pAct
);
while
(
!
cStack
.
empty
()
)
{
pCur
=
cStack
.
top
();
cStack
.
pop
();
if
(
pCur
->
IsInsertType
()
)
{
const
ScChangeActionLinkEntry
*
pL
=
pCur
->
GetFirstDependentEntry
();
...
...
@@ -3867,7 +3873,7 @@ void ScChangeTrack::GetDependents( ScChangeAction* pAct,
sal_uLong
n
=
p
->
GetActionNumber
();
if
(
!
IsGenerated
(
n
)
&&
rTable
.
Insert
(
n
,
p
)
)
if
(
p
->
HasDependent
()
)
pStack
->
P
ush
(
p
);
cStack
.
p
ush
(
p
);
}
else
{
...
...
@@ -3915,7 +3921,7 @@ void ScChangeTrack::GetDependents( ScChangeAction* pAct,
if
(
!
IsGenerated
(
n
)
&&
rTable
.
Insert
(
n
,
p
)
)
if
(
p
->
HasDeleted
()
||
p
->
GetType
()
==
SC_CAT_CONTENT
)
pStack
->
P
ush
(
p
);
cStack
.
p
ush
(
p
);
}
else
{
...
...
@@ -3946,7 +3952,7 @@ void ScChangeTrack::GetDependents( ScChangeAction* pAct,
// nur ein TopContent einer Kette ist in LinkDeleted
if
(
bAllFlat
&&
(
p
->
HasDeleted
()
||
p
->
GetType
()
==
SC_CAT_CONTENT
)
)
pStack
->
P
ush
(
p
);
cStack
.
p
ush
(
p
);
}
pL
=
pL
->
GetNext
();
}
...
...
@@ -3963,7 +3969,7 @@ void ScChangeTrack::GetDependents( ScChangeAction* pAct,
sal_uLong
n
=
p
->
GetActionNumber
();
if
(
!
IsGenerated
(
n
)
&&
rTable
.
Insert
(
n
,
p
)
)
if
(
p
->
HasDependent
()
||
p
->
HasDeleted
()
)
pStack
->
P
ush
(
p
);
cStack
.
p
ush
(
p
);
}
else
{
...
...
@@ -4007,7 +4013,7 @@ void ScChangeTrack::GetDependents( ScChangeAction* pAct,
sal_uLong
n
=
p
->
GetActionNumber
();
if
(
!
IsGenerated
(
n
)
&&
rTable
.
Insert
(
n
,
p
)
)
if
(
p
->
HasDependent
()
)
pStack
->
P
ush
(
p
);
cStack
.
p
ush
(
p
);
}
else
rTable
.
Insert
(
p
->
GetActionNumber
(),
p
);
...
...
@@ -4022,11 +4028,10 @@ void ScChangeTrack::GetDependents( ScChangeAction* pAct,
ScChangeAction
*
p
=
GetAction
(
((
ScChangeActionReject
*
)
pCur
)
->
GetRejectAction
()
);
if
(
p
!=
pAct
&&
!
rTable
.
Get
(
p
->
GetActionNumber
()
)
)
pStack
->
P
ush
(
p
);
cStack
.
p
ush
(
p
);
}
}
}
while
(
(
pCur
=
pStack
->
Pop
()
)
!=
NULL
);
delete
pStack
;
}
}
...
...
@@ -4071,7 +4076,7 @@ sal_Bool ScChangeTrack::SelectContent( ScChangeAction* pAct, sal_Bool bOldest )
if
(
pContent
->
HasDependent
()
)
{
sal_Bool
bOk
=
sal_True
;
Stack
aRejectActions
;
::
std
::
stack
<
ScChangeActionContent
*>
aRejectActions
;
const
ScChangeActionLinkEntry
*
pL
=
pContent
->
GetFirstDependentEntry
();
while
(
pL
)
{
...
...
@@ -4096,8 +4101,10 @@ sal_Bool ScChangeTrack::SelectContent( ScChangeAction* pAct, sal_Bool bOldest )
// now the matrix is inserted and new content values are ready
ScChangeActionContent
*
pNew
;
while
(
(
pNew
=
(
ScChangeActionContent
*
)
aRejectActions
.
Pop
()
)
!=
NULL
)
while
(
!
aRejectActions
.
empty
()
)
{
pNew
=
aRejectActions
.
top
();
aRejectActions
.
pop
();
ScAddress
aPos
(
pNew
->
GetBigRange
().
aStart
.
MakeAddress
()
);
pNew
->
SetNewValue
(
pDoc
->
GetCell
(
aPos
),
pDoc
);
Append
(
pNew
);
...
...
sc/source/filter/inc/XclExpChangeTrack.hxx
Dosyayı görüntüle @
0158333f
...
...
@@ -30,6 +30,7 @@
#define SC_XCLEXPCHANGETRACK_HXX
#include <tools/datetime.hxx>
#include <tools/stack.hxx>
#include <rtl/uuid.h>
#include "bigrange.hxx"
#include "chgtrack.hxx"
...
...
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