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
f4e048ea
Kaydet (Commit)
f4e048ea
authored
Tem 24, 2013
tarafından
Kohei Yoshida
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
There isn't much we have to do for copy.
Change-Id: I4d297f15e8030fdf068c7e3102f9d03aff401cf9
üst
6dda773b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
59 deletions
+6
-59
formulacell.cxx
sc/source/core/data/formulacell.cxx
+6
-59
No files found.
sc/source/core/data/formulacell.cxx
Dosyayı görüntüle @
f4e048ea
...
@@ -2504,85 +2504,32 @@ bool ScFormulaCell::UpdateReferenceOnCopy(
...
@@ -2504,85 +2504,32 @@ bool ScFormulaCell::UpdateReferenceOnCopy(
// on reference update. Bail out.
// on reference update. Bail out.
return
false
;
return
false
;
bool
bCellStateChanged
=
false
;
boost
::
scoped_ptr
<
ScTokenArray
>
pOldCode
;
boost
::
scoped_ptr
<
ScTokenArray
>
pOldCode
;
if
(
pUndoDoc
)
if
(
pUndoDoc
)
pOldCode
.
reset
(
pCode
->
Clone
());
pOldCode
.
reset
(
pCode
->
Clone
());
bool
bValChanged
=
false
;
bool
bRangeModified
=
false
;
// any range, not only shared formula
bool
bRefSizeChanged
=
false
;
if
(
bHasRefs
)
{
// Update cell or range references.
ScCompiler
aComp
(
pDocument
,
aPos
,
*
pCode
);
aComp
.
SetGrammar
(
pDocument
->
GetGrammar
());
aComp
.
UpdateReference
(
URM_COPY
,
aOldPos
,
rCxt
.
maRange
,
rCxt
.
mnColDelta
,
rCxt
.
mnRowDelta
,
rCxt
.
mnTabDelta
,
bValChanged
,
bRefSizeChanged
);
bRangeModified
=
aComp
.
HasModifiedRange
();
}
bCellStateChanged
|=
bValChanged
;
if
(
bOnRefMove
)
if
(
bOnRefMove
)
// Cell may reference itself, e.g. ocColumn, ocRow without parameter
// Cell may reference itself, e.g. ocColumn, ocRow without parameter
bOnRefMove
=
(
bValChanged
||
(
aPos
!=
aOldPos
));
bOnRefMove
=
(
aPos
!=
aOldPos
);
bool
bColRowNameCompile
=
false
;
bool
bNewListening
=
false
;
bool
bInDeleteUndo
=
false
;
if
(
bHasRefs
)
{
// Upon Insert ColRowNames have to be recompiled in case the
// insertion occurs right in front of the range.
if
(
bHasColRowNames
)
bColRowNameCompile
=
checkCompileColRowName
(
rCxt
,
*
pDocument
,
*
pCode
,
aOldPos
,
aPos
,
bValChanged
);
ScChangeTrack
*
pChangeTrack
=
pDocument
->
GetChangeTrack
();
bInDeleteUndo
=
(
pChangeTrack
&&
pChangeTrack
->
IsInDeleteUndo
());
// Reference changed and new listening needed?
bool
bNeedDirty
=
bOnRefMove
;
// Except in Insert/Delete without specialties.
bNewListening
=
(
bRangeModified
||
bColRowNameCompile
||
(
bValChanged
&&
(
bInDeleteUndo
||
bRefSizeChanged
)));
if
(
bNewListening
)
if
(
pUndoDoc
&&
bOnRefMove
)
EndListeningTo
(
pDocument
,
pOldCode
.
get
(),
aOldPos
);
}
bool
bNeedDirty
=
false
;
// NeedDirty for changes except for Copy and Move/Insert without RelNames
if
(
bRangeModified
||
bColRowNameCompile
||
bOnRefMove
)
bNeedDirty
=
true
;
if
(
pUndoDoc
&&
(
bValChanged
||
bOnRefMove
))
setOldCodeToUndo
(
pUndoDoc
,
aUndoPos
,
pOldCode
.
get
(),
eTempGrammar
,
cMatrixFlag
);
setOldCodeToUndo
(
pUndoDoc
,
aUndoPos
,
pOldCode
.
get
(),
eTempGrammar
,
cMatrixFlag
);
bValChanged
=
false
;
if
(
bCompile
)
if
(
(
bCompile
=
(
bCompile
||
bValChanged
||
bRangeModified
||
bColRowNameCompile
)
)
!=
0
)
{
{
CompileTokenArray
(
bNewListening
);
// no Listening
CompileTokenArray
(
false
);
// no Listening
bNeedDirty
=
true
;
bNeedDirty
=
true
;
}
}
if
(
!
bInDeleteUndo
)
{
// In ChangeTrack Delete-Reject listeners are established in
// InsertCol/InsertRow
if
(
bNewListening
)
StartListeningTo
(
pDocument
);
}
if
(
bNeedDirty
)
if
(
bNeedDirty
)
{
// Cut off references, invalid or similar?
{
// Cut off references, invalid or similar?
sc
::
AutoCalcSwitch
(
*
pDocument
,
false
);
sc
::
AutoCalcSwitch
(
*
pDocument
,
false
);
SetDirty
();
SetDirty
();
}
}
return
bCellStateChanged
;
return
false
;
}
}
bool
ScFormulaCell
::
UpdateReference
(
bool
ScFormulaCell
::
UpdateReference
(
...
...
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