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
fff019de
Kaydet (Commit)
fff019de
authored
Eyl 17, 2014
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
MSWordExportBase: ignore empty annotation marks
Change-Id: I182700a7b74aa65a1eeb39ff702f068a10dd3346
üst
902564bf
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
1 deletion
+28
-1
empty-annotation-mark.docx
sw/qa/extras/ooxmlexport/data/empty-annotation-mark.docx
+0
-0
ooxmlexport.cxx
sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+22
-0
wrtw8nds.cxx
sw/source/filter/ww8/wrtw8nds.cxx
+6
-1
No files found.
sw/qa/extras/ooxmlexport/data/empty-annotation-mark.docx
0 → 100644
Dosyayı görüntüle @
fff019de
File added
sw/qa/extras/ooxmlexport/ooxmlexport.cxx
Dosyayı görüntüle @
fff019de
...
...
@@ -231,6 +231,28 @@ DECLARE_OOXMLEXPORT_TEST(testShapeInFloattable, "shape-in-floattable.docx")
}
}
DECLARE_OOXMLEXPORT_TEST
(
testEmptyAnnotationMark
,
"empty-annotation-mark.docx"
)
{
if
(
mbExported
)
{
// Delete the word that is commented, and save again.
uno
::
Reference
<
text
::
XTextRange
>
xRun
=
getRun
(
getParagraph
(
1
),
3
);
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"with"
),
xRun
->
getString
());
xRun
->
setString
(
""
);
uno
::
Reference
<
frame
::
XStorable
>
xStorable
(
mxComponent
,
uno
::
UNO_QUERY
);
xStorable
->
store
();
// Then inspect the OOXML markup of the modified document model.
xmlDocPtr
pXmlDoc
=
parseExport
(
"word/document.xml"
);
// There were two commentReference nodes.
assertXPath
(
pXmlDoc
,
"//w:commentReference"
,
"id"
,
"0"
);
// Empty comment range was not ignored on export, this was 1.
assertXPath
(
pXmlDoc
,
"//w:commentRangeStart"
,
0
);
// Ditto.
assertXPath
(
pXmlDoc
,
"//w:commentRangeEnd"
,
0
);
}
}
CPPUNIT_PLUGIN_IMPLEMENT
();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sw/source/filter/ww8/wrtw8nds.cxx
Dosyayı görüntüle @
fff019de
...
...
@@ -1806,7 +1806,12 @@ bool MSWordExportBase::GetAnnotationMarks( const SwTxtNode& rNd, sal_Int32 nStt,
bool
bIsStartOk
=
(
pMark
->
GetMarkStart
().
nNode
==
nNd
)
&&
(
nBStart
>=
nStt
)
&&
(
nBStart
<=
nEnd
);
bool
bIsEndOk
=
(
pMark
->
GetMarkEnd
().
nNode
==
nNd
)
&&
(
nBEnd
>=
nStt
)
&&
(
nBEnd
<=
nEnd
);
if
(
bIsStartOk
||
bIsEndOk
)
// Annotation marks always have at least one character: the anchor
// point of the comment field. In this case Word wants only the
// comment field, so ignore the annotation mark itself.
bool
bSingleChar
=
pMark
->
GetMarkStart
().
nNode
==
pMark
->
GetMarkEnd
().
nNode
&&
nBStart
+
1
==
nBEnd
;
if
(
(
bIsStartOk
||
bIsEndOk
)
&&
!
bSingleChar
)
{
rArr
.
push_back
(
pMark
);
}
...
...
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