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
acdf113b
Kaydet (Commit)
acdf113b
authored
Haz 24, 2015
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
crashtesting: fix asserts on exporting fdo66304-1.odt to doc
Change-Id: Ia08207143d27f88d09bd45e64ba7c3c12cd2c1a1
üst
df5ec49b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
0 deletions
+30
-0
fdo66304-1.odt
sw/qa/extras/ww8export/data/fdo66304-1.odt
+0
-0
ww8export.cxx
sw/qa/extras/ww8export/ww8export.cxx
+5
-0
DocumentContentOperationsManager.cxx
sw/source/core/doc/DocumentContentOperationsManager.cxx
+25
-0
No files found.
sw/qa/extras/ww8export/data/fdo66304-1.odt
0 → 100644
Dosyayı görüntüle @
acdf113b
File added
sw/qa/extras/ww8export/ww8export.cxx
Dosyayı görüntüle @
acdf113b
...
@@ -529,6 +529,11 @@ DECLARE_WW8EXPORT_TEST(testCommentExport, "comment-export.odt")
...
@@ -529,6 +529,11 @@ DECLARE_WW8EXPORT_TEST(testCommentExport, "comment-export.odt")
}
}
}
}
DECLARE_WW8EXPORT_TEST
(
testMoveRange
,
"fdo66304-1.odt"
)
{
//the save must survive without asserting
}
CPPUNIT_PLUGIN_IMPLEMENT
();
CPPUNIT_PLUGIN_IMPLEMENT
();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sw/source/core/doc/DocumentContentOperationsManager.cxx
Dosyayı görüntüle @
acdf113b
...
@@ -1961,8 +1961,33 @@ bool DocumentContentOperationsManager::MoveRange( SwPaM& rPaM, SwPosition& rPos,
...
@@ -1961,8 +1961,33 @@ bool DocumentContentOperationsManager::MoveRange( SwPaM& rPaM, SwPosition& rPos,
const
std
::
shared_ptr
<
sw
::
mark
::
ContentIdxStore
>
pContentStore
(
sw
::
mark
::
ContentIdxStore
::
Create
());
const
std
::
shared_ptr
<
sw
::
mark
::
ContentIdxStore
>
pContentStore
(
sw
::
mark
::
ContentIdxStore
::
Create
());
pContentStore
->
Save
(
&
m_rDoc
,
rPos
.
nNode
.
GetIndex
(),
rPos
.
nContent
.
GetIndex
(),
true
);
pContentStore
->
Save
(
&
m_rDoc
,
rPos
.
nNode
.
GetIndex
(),
rPos
.
nContent
.
GetIndex
(),
true
);
SwTextNode
*
pOrigNode
=
pTNd
;
assert
(
*
aSavePam
.
GetPoint
()
==
*
aSavePam
.
GetMark
()
&&
*
aSavePam
.
GetPoint
()
==
rPos
);
assert
(
aSavePam
.
GetPoint
()
->
nContent
.
GetIdxReg
()
==
pOrigNode
);
assert
(
aSavePam
.
GetPoint
()
->
nNode
==
rPos
.
nNode
.
GetIndex
());
assert
(
rPos
.
nNode
.
GetIndex
()
==
pOrigNode
->
GetIndex
());
pTNd
=
pTNd
->
SplitContentNode
(
rPos
)
->
GetTextNode
();
pTNd
=
pTNd
->
SplitContentNode
(
rPos
)
->
GetTextNode
();
//A new node was inserted before the orig pTNd and the content up to
//rPos moved into it. The old node is returned with the remainder
//of the content in it.
//
//aSavePam was created with rPos, it continues to point to the
//old node, but with the *original* content index into the node.
//Seeing as all the orignode content before that index has
//been removed, the new index into the original node should now be set
//to 0 and the content index of rPos should also be adapted to the
//truncated node
assert
(
*
aSavePam
.
GetPoint
()
==
*
aSavePam
.
GetMark
()
&&
*
aSavePam
.
GetPoint
()
==
rPos
);
assert
(
aSavePam
.
GetPoint
()
->
nContent
.
GetIdxReg
()
==
pOrigNode
);
assert
(
aSavePam
.
GetPoint
()
->
nNode
==
rPos
.
nNode
.
GetIndex
());
assert
(
rPos
.
nNode
.
GetIndex
()
==
pOrigNode
->
GetIndex
());
aSavePam
.
GetPoint
()
->
nContent
.
Assign
(
pOrigNode
,
0
);
rPos
=
*
aSavePam
.
GetMark
()
=
*
aSavePam
.
GetPoint
();
if
(
!
pContentStore
->
Empty
()
)
if
(
!
pContentStore
->
Empty
()
)
pContentStore
->
Restore
(
&
m_rDoc
,
rPos
.
nNode
.
GetIndex
()
-
1
,
0
,
true
);
pContentStore
->
Restore
(
&
m_rDoc
,
rPos
.
nNode
.
GetIndex
()
-
1
,
0
,
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