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
c633c4fd
Kaydet (Commit)
c633c4fd
authored
Mar 02, 2013
tarafından
Luc Castermans
Kaydeden (comit)
Michael Meeks
Mar 04, 2013
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
translated German comments
Change-Id: If89452824776c2bd653ca0728cc7e6adf4050e4b
üst
a61881fc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
19 deletions
+19
-19
TableUndo.cxx
dbaccess/source/ui/tabledesign/TableUndo.cxx
+19
-19
No files found.
dbaccess/source/ui/tabledesign/TableUndo.cxx
Dosyayı görüntüle @
c633c4fd
...
@@ -63,7 +63,7 @@ void OTableDesignUndoAct::Undo()
...
@@ -63,7 +63,7 @@ void OTableDesignUndoAct::Undo()
m_pTabDgnCtrl
->
m_nCurUndoActId
--
;
m_pTabDgnCtrl
->
m_nCurUndoActId
--
;
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
//
Wenn erstes Undo zurueckgenommen wurde, ist Doc nicht modifiziert worden
//
doc has not been modified if first undo was reverted
if
(
m_pTabDgnCtrl
->
m_nCurUndoActId
==
0
)
if
(
m_pTabDgnCtrl
->
m_nCurUndoActId
==
0
)
{
{
m_pTabDgnCtrl
->
GetView
()
->
getController
().
setModified
(
sal_False
);
m_pTabDgnCtrl
->
GetView
()
->
getController
().
setModified
(
sal_False
);
...
@@ -77,7 +77,7 @@ void OTableDesignUndoAct::Redo()
...
@@ -77,7 +77,7 @@ void OTableDesignUndoAct::Redo()
m_pTabDgnCtrl
->
m_nCurUndoActId
++
;
m_pTabDgnCtrl
->
m_nCurUndoActId
++
;
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
//
Wenn Redo fuer erste Undo-Action, muss Modified-Flag wieder gesetzt werde
n
//
restore Modifed-flag after Redo of first Undo-actio
n
if
(
m_pTabDgnCtrl
->
m_nCurUndoActId
>
0
)
if
(
m_pTabDgnCtrl
->
m_nCurUndoActId
>
0
)
{
{
m_pTabDgnCtrl
->
GetView
()
->
getController
().
setModified
(
sal_True
);
m_pTabDgnCtrl
->
GetView
()
->
getController
().
setModified
(
sal_True
);
...
@@ -95,7 +95,7 @@ OTableDesignCellUndoAct::OTableDesignCellUndoAct( OTableRowView* pOwner, long nR
...
@@ -95,7 +95,7 @@ OTableDesignCellUndoAct::OTableDesignCellUndoAct( OTableRowView* pOwner, long nR
{
{
DBG_CTOR
(
OTableDesignCellUndoAct
,
NULL
);
DBG_CTOR
(
OTableDesignCellUndoAct
,
NULL
);
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
//
Text an der Position (m_nRow, m_nCol) auslesen
//
read text at position (m_nRow, m_nCol)
m_sOldText
=
m_pTabDgnCtrl
->
GetCellData
(
m_nRow
,
m_nCol
);
m_sOldText
=
m_pTabDgnCtrl
->
GetCellData
(
m_nRow
,
m_nCol
);
}
}
...
@@ -109,12 +109,12 @@ OTableDesignCellUndoAct::~OTableDesignCellUndoAct()
...
@@ -109,12 +109,12 @@ OTableDesignCellUndoAct::~OTableDesignCellUndoAct()
void
OTableDesignCellUndoAct
::
Undo
()
void
OTableDesignCellUndoAct
::
Undo
()
{
{
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
//
Neuen Text der alten Zelle speichern und alten wieder einsetzen
//
store text at old line and restore the old one
m_pTabDgnCtrl
->
ActivateCell
(
m_nRow
,
m_nCol
);
m_pTabDgnCtrl
->
ActivateCell
(
m_nRow
,
m_nCol
);
m_sNewText
=
m_pTabDgnCtrl
->
GetCellData
(
m_nRow
,
m_nCol
);
m_sNewText
=
m_pTabDgnCtrl
->
GetCellData
(
m_nRow
,
m_nCol
);
m_pTabDgnCtrl
->
SetCellData
(
m_nRow
,
m_nCol
,
m_sOldText
);
m_pTabDgnCtrl
->
SetCellData
(
m_nRow
,
m_nCol
,
m_sOldText
);
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
//
Wenn erstes Undo zurueckgenommen wurde, ist Zelle nicht mehr modifiziert
//
line has not been modified if the first Undo was reverted
if
(
m_pTabDgnCtrl
->
GetCurUndoActId
()
==
1
)
if
(
m_pTabDgnCtrl
->
GetCurUndoActId
()
==
1
)
{
{
CellControllerRef
xController
=
m_pTabDgnCtrl
->
Controller
();
CellControllerRef
xController
=
m_pTabDgnCtrl
->
Controller
();
...
@@ -131,7 +131,7 @@ void OTableDesignCellUndoAct::Undo()
...
@@ -131,7 +131,7 @@ void OTableDesignCellUndoAct::Undo()
void
OTableDesignCellUndoAct
::
Redo
()
void
OTableDesignCellUndoAct
::
Redo
()
{
{
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
//
Neuen Text wieder einseten
//
restore new text
m_pTabDgnCtrl
->
ActivateCell
(
m_nRow
,
m_nCol
);
m_pTabDgnCtrl
->
ActivateCell
(
m_nRow
,
m_nCol
);
m_pTabDgnCtrl
->
SetCellData
(
m_nRow
,
m_nCol
,
m_sNewText
);
m_pTabDgnCtrl
->
SetCellData
(
m_nRow
,
m_nCol
,
m_sNewText
);
...
@@ -178,7 +178,7 @@ OTableEditorTypeSelUndoAct::~OTableEditorTypeSelUndoAct()
...
@@ -178,7 +178,7 @@ OTableEditorTypeSelUndoAct::~OTableEditorTypeSelUndoAct()
void
OTableEditorTypeSelUndoAct
::
Undo
()
void
OTableEditorTypeSelUndoAct
::
Undo
()
{
{
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
//
Typ zuruecksetzen
//
restore type
OFieldDescription
*
pFieldDesc
=
pTabEdCtrl
->
GetFieldDescr
(
m_nRow
);
OFieldDescription
*
pFieldDesc
=
pTabEdCtrl
->
GetFieldDescr
(
m_nRow
);
if
(
pFieldDesc
)
if
(
pFieldDesc
)
m_pNewType
=
pFieldDesc
->
getTypeInfo
();
m_pNewType
=
pFieldDesc
->
getTypeInfo
();
...
@@ -194,7 +194,7 @@ void OTableEditorTypeSelUndoAct::Undo()
...
@@ -194,7 +194,7 @@ void OTableEditorTypeSelUndoAct::Undo()
void
OTableEditorTypeSelUndoAct
::
Redo
()
void
OTableEditorTypeSelUndoAct
::
Redo
()
{
{
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
//
Neuen Typ
//
new type
pTabEdCtrl
->
GoToRowColumnId
(
m_nRow
,
m_nCol
);
pTabEdCtrl
->
GoToRowColumnId
(
m_nRow
,
m_nCol
);
pTabEdCtrl
->
SetCellData
(
m_nRow
,
m_nCol
,
m_pNewType
);
pTabEdCtrl
->
SetCellData
(
m_nRow
,
m_nCol
,
m_pNewType
);
...
@@ -210,7 +210,7 @@ OTableEditorDelUndoAct::OTableEditorDelUndoAct( OTableEditorCtrl* pOwner) :
...
@@ -210,7 +210,7 @@ OTableEditorDelUndoAct::OTableEditorDelUndoAct( OTableEditorCtrl* pOwner) :
{
{
DBG_CTOR
(
OTableEditorDelUndoAct
,
NULL
);
DBG_CTOR
(
OTableEditorDelUndoAct
,
NULL
);
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
//
DeletedRowList fuellen
//
fill DeletedRowList
::
std
::
vector
<
::
boost
::
shared_ptr
<
OTableRow
>
>*
pOriginalRows
=
pOwner
->
GetRowList
();
::
std
::
vector
<
::
boost
::
shared_ptr
<
OTableRow
>
>*
pOriginalRows
=
pOwner
->
GetRowList
();
long
nIndex
=
pOwner
->
FirstSelectedRow
();
long
nIndex
=
pOwner
->
FirstSelectedRow
();
::
boost
::
shared_ptr
<
OTableRow
>
pOriginalRow
;
::
boost
::
shared_ptr
<
OTableRow
>
pOriginalRow
;
...
@@ -237,7 +237,7 @@ OTableEditorDelUndoAct::~OTableEditorDelUndoAct()
...
@@ -237,7 +237,7 @@ OTableEditorDelUndoAct::~OTableEditorDelUndoAct()
void
OTableEditorDelUndoAct
::
Undo
()
void
OTableEditorDelUndoAct
::
Undo
()
{
{
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
//
Geloeschte Zeilen wieder einfuegen
//
Insert the deleted line
sal_uLong
nPos
;
sal_uLong
nPos
;
::
std
::
vector
<
::
boost
::
shared_ptr
<
OTableRow
>
>::
iterator
aIter
=
m_aDeletedRows
.
begin
();
::
std
::
vector
<
::
boost
::
shared_ptr
<
OTableRow
>
>::
iterator
aIter
=
m_aDeletedRows
.
begin
();
::
std
::
vector
<
::
boost
::
shared_ptr
<
OTableRow
>
>::
iterator
aEnd
=
m_aDeletedRows
.
end
();
::
std
::
vector
<
::
boost
::
shared_ptr
<
OTableRow
>
>::
iterator
aEnd
=
m_aDeletedRows
.
end
();
...
@@ -261,7 +261,7 @@ void OTableEditorDelUndoAct::Undo()
...
@@ -261,7 +261,7 @@ void OTableEditorDelUndoAct::Undo()
void
OTableEditorDelUndoAct
::
Redo
()
void
OTableEditorDelUndoAct
::
Redo
()
{
{
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
//
Zeilen wieder loesche
n
//
delete line agai
n
sal_uLong
nPos
;
sal_uLong
nPos
;
::
std
::
vector
<
::
boost
::
shared_ptr
<
OTableRow
>
>::
iterator
aIter
=
m_aDeletedRows
.
begin
();
::
std
::
vector
<
::
boost
::
shared_ptr
<
OTableRow
>
>::
iterator
aIter
=
m_aDeletedRows
.
begin
();
::
std
::
vector
<
::
boost
::
shared_ptr
<
OTableRow
>
>::
iterator
aEnd
=
m_aDeletedRows
.
end
();
::
std
::
vector
<
::
boost
::
shared_ptr
<
OTableRow
>
>::
iterator
aEnd
=
m_aDeletedRows
.
end
();
...
@@ -304,7 +304,7 @@ OTableEditorInsUndoAct::~OTableEditorInsUndoAct()
...
@@ -304,7 +304,7 @@ OTableEditorInsUndoAct::~OTableEditorInsUndoAct()
void
OTableEditorInsUndoAct
::
Undo
()
void
OTableEditorInsUndoAct
::
Undo
()
{
{
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
//
Eingefuegte Zeilen wieder loesche
n
//
delete lines agai
n
::
std
::
vector
<
::
boost
::
shared_ptr
<
OTableRow
>
>*
pOriginalRows
=
pTabEdCtrl
->
GetRowList
();
::
std
::
vector
<
::
boost
::
shared_ptr
<
OTableRow
>
>*
pOriginalRows
=
pTabEdCtrl
->
GetRowList
();
for
(
long
i
=
(
m_nInsPos
+
m_vInsertedRows
.
size
()
-
1
);
i
>
(
m_nInsPos
-
1
);
i
--
)
for
(
long
i
=
(
m_nInsPos
+
m_vInsertedRows
.
size
()
-
1
);
i
>
(
m_nInsPos
-
1
);
i
--
)
{
{
...
@@ -321,7 +321,7 @@ void OTableEditorInsUndoAct::Undo()
...
@@ -321,7 +321,7 @@ void OTableEditorInsUndoAct::Undo()
void
OTableEditorInsUndoAct
::
Redo
()
void
OTableEditorInsUndoAct
::
Redo
()
{
{
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
//
Zeilen wieder einfuege
n
//
insert lines agai
n
long
nInsertRow
=
m_nInsPos
;
long
nInsertRow
=
m_nInsPos
;
::
boost
::
shared_ptr
<
OTableRow
>
pRow
;
::
boost
::
shared_ptr
<
OTableRow
>
pRow
;
::
std
::
vector
<
::
boost
::
shared_ptr
<
OTableRow
>
>::
iterator
aIter
=
m_vInsertedRows
.
begin
();
::
std
::
vector
<
::
boost
::
shared_ptr
<
OTableRow
>
>::
iterator
aIter
=
m_vInsertedRows
.
begin
();
...
@@ -362,7 +362,7 @@ OTableEditorInsNewUndoAct::~OTableEditorInsNewUndoAct()
...
@@ -362,7 +362,7 @@ OTableEditorInsNewUndoAct::~OTableEditorInsNewUndoAct()
void
OTableEditorInsNewUndoAct
::
Undo
()
void
OTableEditorInsNewUndoAct
::
Undo
()
{
{
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
//
Eingefuegte Zeilen wieder loeschen
//
delete inserted lines
::
std
::
vector
<
::
boost
::
shared_ptr
<
OTableRow
>
>*
pOriginalRows
=
pTabEdCtrl
->
GetRowList
();
::
std
::
vector
<
::
boost
::
shared_ptr
<
OTableRow
>
>*
pOriginalRows
=
pTabEdCtrl
->
GetRowList
();
for
(
long
i
=
(
m_nInsPos
+
m_nInsRows
-
1
);
i
>
(
m_nInsPos
-
1
);
i
--
)
for
(
long
i
=
(
m_nInsPos
+
m_nInsRows
-
1
);
i
>
(
m_nInsPos
-
1
);
i
--
)
...
@@ -380,7 +380,7 @@ void OTableEditorInsNewUndoAct::Undo()
...
@@ -380,7 +380,7 @@ void OTableEditorInsNewUndoAct::Undo()
void
OTableEditorInsNewUndoAct
::
Redo
()
void
OTableEditorInsNewUndoAct
::
Redo
()
{
{
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
//
Zeilen wieder einfuege
n
//
insert lines agai
n
::
std
::
vector
<
::
boost
::
shared_ptr
<
OTableRow
>
>*
pRowList
=
pTabEdCtrl
->
GetRowList
();
::
std
::
vector
<
::
boost
::
shared_ptr
<
OTableRow
>
>*
pRowList
=
pTabEdCtrl
->
GetRowList
();
for
(
long
i
=
m_nInsPos
;
i
<
(
m_nInsPos
+
m_nInsRows
);
i
++
)
for
(
long
i
=
m_nInsPos
;
i
<
(
m_nInsPos
+
m_nInsRows
);
i
++
)
...
@@ -421,7 +421,7 @@ void OPrimKeyUndoAct::Undo()
...
@@ -421,7 +421,7 @@ void OPrimKeyUndoAct::Undo()
long
nIndex
;
long
nIndex
;
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
//
Die eingefuegten Keys loeschen
//
delete inserted keys
for
(
nIndex
=
m_aInsKeys
.
FirstSelected
();
nIndex
!=
(
long
)
SFX_ENDOFSELECTION
;
nIndex
=
m_aInsKeys
.
NextSelected
()
)
for
(
nIndex
=
m_aInsKeys
.
FirstSelected
();
nIndex
!=
(
long
)
SFX_ENDOFSELECTION
;
nIndex
=
m_aInsKeys
.
NextSelected
()
)
{
{
OSL_ENSURE
(
nIndex
<=
static_cast
<
long
>
(
pRowList
->
size
()),
"Index for undo isn't valid!"
);
OSL_ENSURE
(
nIndex
<=
static_cast
<
long
>
(
pRowList
->
size
()),
"Index for undo isn't valid!"
);
...
@@ -430,7 +430,7 @@ void OPrimKeyUndoAct::Undo()
...
@@ -430,7 +430,7 @@ void OPrimKeyUndoAct::Undo()
}
}
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
//
Die geloeschten Keys herstellen
//
restore deleted keys
for
(
nIndex
=
m_aDelKeys
.
FirstSelected
();
nIndex
!=
(
long
)
SFX_ENDOFSELECTION
;
nIndex
=
m_aDelKeys
.
NextSelected
()
)
for
(
nIndex
=
m_aDelKeys
.
FirstSelected
();
nIndex
!=
(
long
)
SFX_ENDOFSELECTION
;
nIndex
=
m_aDelKeys
.
NextSelected
()
)
{
{
OSL_ENSURE
(
nIndex
<=
static_cast
<
long
>
(
pRowList
->
size
()),
"Index for undo isn't valid!"
);
OSL_ENSURE
(
nIndex
<=
static_cast
<
long
>
(
pRowList
->
size
()),
"Index for undo isn't valid!"
);
...
@@ -449,12 +449,12 @@ void OPrimKeyUndoAct::Redo()
...
@@ -449,12 +449,12 @@ void OPrimKeyUndoAct::Redo()
long
nIndex
;
long
nIndex
;
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
//
Die geloeschten Keys loeschen
//
delete the deleted keys
for
(
nIndex
=
m_aDelKeys
.
FirstSelected
();
nIndex
!=
(
long
)
SFX_ENDOFSELECTION
;
nIndex
=
m_aDelKeys
.
NextSelected
()
)
for
(
nIndex
=
m_aDelKeys
.
FirstSelected
();
nIndex
!=
(
long
)
SFX_ENDOFSELECTION
;
nIndex
=
m_aDelKeys
.
NextSelected
()
)
(
*
pRowList
)[
nIndex
]
->
SetPrimaryKey
(
sal_False
);
(
*
pRowList
)[
nIndex
]
->
SetPrimaryKey
(
sal_False
);
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
//
Die eingefuegten Keys herstellen
//
restore the inserted keys
for
(
nIndex
=
m_aInsKeys
.
FirstSelected
();
nIndex
!=
(
long
)
SFX_ENDOFSELECTION
;
nIndex
=
m_aInsKeys
.
NextSelected
()
)
for
(
nIndex
=
m_aInsKeys
.
FirstSelected
();
nIndex
!=
(
long
)
SFX_ENDOFSELECTION
;
nIndex
=
m_aInsKeys
.
NextSelected
()
)
(
*
pRowList
)[
nIndex
]
->
SetPrimaryKey
(
sal_True
);
(
*
pRowList
)[
nIndex
]
->
SetPrimaryKey
(
sal_True
);
...
...
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