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
3d37dd2a
Kaydet (Commit)
3d37dd2a
authored
Eyl 09, 2011
tarafından
Kohei Yoshida
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Undo to work.
üst
b2f11209
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
6 deletions
+54
-6
viewfun3.cxx
sc/source/ui/view/viewfun3.cxx
+54
-6
No files found.
sc/source/ui/view/viewfun3.cxx
Dosyayı görüntüle @
3d37dd2a
...
@@ -1781,12 +1781,31 @@ bool ScViewFunc::PasteFromClipToMultiRanges(
...
@@ -1781,12 +1781,31 @@ bool ScViewFunc::PasteFromClipToMultiRanges(
return
false
;
return
false
;
}
}
std
::
auto_ptr
<
ScDocument
>
pUndoDoc
;
if
(
pDoc
->
IsUndoEnabled
())
{
pUndoDoc
.
reset
(
new
ScDocument
(
SCDOCMODE_UNDO
));
pUndoDoc
->
InitUndoSelected
(
pDoc
,
aMark
,
false
,
false
);
for
(
size_t
i
=
0
,
n
=
aRanges
.
size
();
i
<
n
;
++
i
)
{
pDoc
->
CopyToDocument
(
*
aRanges
[
i
],
nUndoFlags
,
false
,
pUndoDoc
.
get
(),
&
aMark
,
true
);
}
}
if
(
nFlags
&
IDF_OBJECTS
)
pDocSh
->
MakeDrawLayer
();
if
(
pDoc
->
IsUndoEnabled
())
pDoc
->
BeginDrawUndo
();
CursorSwitcher
aCursorSwitch
(
this
);
// First, paste everything but the drawing objects.
// First, paste everything but the drawing objects.
for
(
size_t
i
=
0
,
n
=
aRanges
.
size
();
i
<
n
;
++
i
)
for
(
size_t
i
=
0
,
n
=
aRanges
.
size
();
i
<
n
;
++
i
)
{
{
pDoc
->
CopyFromClip
(
pDoc
->
CopyFromClip
(
*
aRanges
[
i
],
aMark
,
(
nFlags
&
~
IDF_OBJECTS
),
NULL
,
pClipDoc
,
*
aRanges
[
i
],
aMark
,
(
nFlags
&
~
IDF_OBJECTS
),
NULL
,
pClipDoc
,
tru
e
,
false
,
true
,
bSkipEmpty
,
NULL
);
fals
e
,
false
,
true
,
bSkipEmpty
,
NULL
);
}
}
AdjustBlockHeight
();
// update row heights before pasting objects
AdjustBlockHeight
();
// update row heights before pasting objects
...
@@ -1798,16 +1817,45 @@ bool ScViewFunc::PasteFromClipToMultiRanges(
...
@@ -1798,16 +1817,45 @@ bool ScViewFunc::PasteFromClipToMultiRanges(
{
{
pDoc
->
CopyFromClip
(
pDoc
->
CopyFromClip
(
*
aRanges
[
i
],
aMark
,
IDF_OBJECTS
,
NULL
,
pClipDoc
,
*
aRanges
[
i
],
aMark
,
IDF_OBJECTS
,
NULL
,
pClipDoc
,
tru
e
,
false
,
true
,
bSkipEmpty
,
NULL
);
fals
e
,
false
,
true
,
bSkipEmpty
,
NULL
);
}
}
}
}
// Refresh the range that includes all pasted ranges. We only need to
// Refresh the range that includes all pasted ranges. We only need to
// refresh the current sheet.
// refresh the current sheet.
ScRange
aRefreshRange
=
aRanges
.
Combine
();
ScRange
aWholeRange
=
aRanges
.
Combine
();
aRefreshRange
.
aStart
.
SetTab
(
rViewData
.
GetTabNo
());
aWholeRange
.
aStart
.
SetTab
(
rViewData
.
GetTabNo
());
aRefreshRange
.
aEnd
.
SetTab
(
rViewData
.
GetTabNo
());
aWholeRange
.
aEnd
.
SetTab
(
rViewData
.
GetTabNo
());
pDocSh
->
PostPaint
(
aRefreshRange
,
PAINT_GRID
);
pDocSh
->
PostPaint
(
aWholeRange
,
PAINT_GRID
);
if
(
pDoc
->
IsUndoEnabled
())
{
svl
::
IUndoManager
*
pUndoMgr
=
pDocSh
->
GetUndoManager
();
String
aUndo
=
ScGlobal
::
GetRscString
(
pClipDoc
->
IsCutMode
()
?
STR_UNDO_CUT
:
STR_UNDO_COPY
);
pUndoMgr
->
EnterListAction
(
aUndo
,
aUndo
);
ScUndoPasteOptions
aOptions
;
// store options for repeat
aOptions
.
nFunction
=
nFunction
;
aOptions
.
bSkipEmpty
=
bSkipEmpty
;
aOptions
.
bTranspose
=
bTranspose
;
aOptions
.
bAsLink
=
bAsLink
;
aOptions
.
eMoveMode
=
eMoveMode
;
ScUndoPaste
*
pUndo
=
new
ScUndoPaste
(
pDocSh
,
aWholeRange
.
aStart
.
Col
(),
aWholeRange
.
aStart
.
Row
(),
aWholeRange
.
aStart
.
Tab
(),
aWholeRange
.
aEnd
.
Col
(),
aWholeRange
.
aEnd
.
Row
(),
aWholeRange
.
aEnd
.
Tab
(),
aMark
,
pUndoDoc
.
release
(),
NULL
,
nFlags
|
nUndoFlags
,
NULL
,
NULL
,
NULL
,
NULL
,
false
,
&
aOptions
);
pUndoMgr
->
AddUndoAction
(
pUndo
,
false
);
pUndoMgr
->
LeaveListAction
();
}
aModificator
.
SetDocumentModified
();
// PostPasteFromClip(aMarkedRange, aMark);
return
false
;
return
false
;
}
}
...
...
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