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
870a7ee6
Kaydet (Commit)
870a7ee6
authored
Nis 23, 2015
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fix duplicate attribute export to docx with ooo69297-4.odt
Change-Id: I193099d7fffc160f0198e3d42d5d6fd5835c79cf
üst
c3452e67
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
43 additions
and
9 deletions
+43
-9
duplicate-east-asia.odt
sw/qa/extras/ooxmlexport/data/duplicate-east-asia.odt
+0
-0
ooxmlexport5.cxx
sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
+10
-2
wrtw8esh.cxx
sw/source/filter/ww8/wrtw8esh.cxx
+32
-6
wrtww8.hxx
sw/source/filter/ww8/wrtww8.hxx
+1
-1
No files found.
sw/qa/extras/ooxmlexport/data/duplicate-east-asia.odt
0 → 100644
Dosyayı görüntüle @
870a7ee6
File added
sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
Dosyayı görüntüle @
870a7ee6
...
@@ -106,10 +106,18 @@ DECLARE_OOXMLEXPORT_TEST(testDecimalNumberingNoLeveltext, "decimal-numbering-no-
...
@@ -106,10 +106,18 @@ DECLARE_OOXMLEXPORT_TEST(testDecimalNumberingNoLeveltext, "decimal-numbering-no-
assertXPath
(
pXmlDoc
,
"/w:numbering/w:abstractNum[1]/w:lvl[1]/w:lvlText"
,
"val"
,
""
);
assertXPath
(
pXmlDoc
,
"/w:numbering/w:abstractNum[1]/w:lvl[1]/w:lvlText"
,
"val"
,
""
);
}
}
DECLARE_OOXMLEXPORT_TEST
(
testNoDuplicateAttributeExport
,
"duplicate-east-asia.odt"
)
{
// File asserting while saving in LO.
xmlDocPtr
pXmlDoc
=
parseExport
(
"word/document.xml"
);
if
(
!
pXmlDoc
)
return
;
}
DECLARE_OOXMLEXPORT_TEST
(
testfdo79008
,
"fdo79008.docx"
)
DECLARE_OOXMLEXPORT_TEST
(
testfdo79008
,
"fdo79008.docx"
)
{
{
/* File
getting crash
while saving in LO.
/* File
crashing
while saving in LO.
* Check
ing if document.xml file is getting
created after fix
* Check
if document.xml file is
created after fix
*/
*/
xmlDocPtr
pXmlDoc
=
parseExport
(
"word/document.xml"
);
xmlDocPtr
pXmlDoc
=
parseExport
(
"word/document.xml"
);
if
(
!
pXmlDoc
)
if
(
!
pXmlDoc
)
...
...
sw/source/filter/ww8/wrtw8esh.cxx
Dosyayı görüntüle @
870a7ee6
...
@@ -1169,9 +1169,30 @@ void MSWord_SdrAttrIter::OutEEField(const SfxPoolItem& rHt)
...
@@ -1169,9 +1169,30 @@ void MSWord_SdrAttrIter::OutEEField(const SfxPoolItem& rHt)
void
MSWord_SdrAttrIter
::
OutAttr
(
sal_Int32
nSwPos
)
void
MSWord_SdrAttrIter
::
OutAttr
(
sal_Int32
nSwPos
)
{
{
OutParaAttr
(
true
);
//Collect the which ids belong to the run that we will export after
//outputting the underlying paragraph attributes. We will exclude
//writing these from the underlying paragraph attributes to avoid
//duplicate attributes in docx export. Doesn't matter in doc
//export as later props just override earlier ones.
std
::
set
<
sal_uInt16
>
aUsedRunWhichs
;
if
(
!
aTxtAtrArr
.
empty
())
{
for
(
std
::
vector
<
EECharAttrib
>::
const_iterator
i
=
aTxtAtrArr
.
begin
();
i
<
aTxtAtrArr
.
end
();
++
i
)
{
if
(
nSwPos
>=
i
->
nStart
&&
nSwPos
<
i
->
nEnd
)
{
sal_uInt16
nWhich
=
i
->
pAttr
->
Which
();
aUsedRunWhichs
.
insert
(
nWhich
);
}
if
(
nSwPos
<
i
->
nStart
)
break
;
}
}
if
(
!
aTxtAtrArr
.
empty
())
OutParaAttr
(
true
,
&
aUsedRunWhichs
);
if
(
!
aTxtAtrArr
.
empty
())
{
{
const
SwModify
*
pOldMod
=
m_rExport
.
pOutFmtNode
;
const
SwModify
*
pOldMod
=
m_rExport
.
pOutFmtNode
;
m_rExport
.
pOutFmtNode
=
0
;
m_rExport
.
pOutFmtNode
=
0
;
...
@@ -1281,7 +1302,7 @@ const SfxPoolItem& MSWord_SdrAttrIter::GetItem( sal_uInt16 nWhich ) const
...
@@ -1281,7 +1302,7 @@ const SfxPoolItem& MSWord_SdrAttrIter::GetItem( sal_uInt16 nWhich ) const
return
*
pRet
;
return
*
pRet
;
}
}
void
MSWord_SdrAttrIter
::
OutParaAttr
(
bool
bCharAttr
)
void
MSWord_SdrAttrIter
::
OutParaAttr
(
bool
bCharAttr
,
const
std
::
set
<
sal_uInt16
>*
pWhichsToIgnore
)
{
{
SfxItemSet
aSet
(
pEditObj
->
GetParaAttribs
(
nPara
));
SfxItemSet
aSet
(
pEditObj
->
GetParaAttribs
(
nPara
));
if
(
aSet
.
Count
()
)
if
(
aSet
.
Count
()
)
...
@@ -1295,9 +1316,14 @@ void MSWord_SdrAttrIter::OutParaAttr(bool bCharAttr)
...
@@ -1295,9 +1316,14 @@ void MSWord_SdrAttrIter::OutParaAttr(bool bCharAttr)
const
SfxItemPool
*
pSrcPool
=
pEditPool
,
const
SfxItemPool
*
pSrcPool
=
pEditPool
,
*
pDstPool
=
&
m_rExport
.
pDoc
->
GetAttrPool
();
*
pDstPool
=
&
m_rExport
.
pDoc
->
GetAttrPool
();
do
{
do
sal_uInt16
nWhich
=
pItem
->
Which
(),
{
nSlotId
=
pSrcPool
->
GetSlotId
(
nWhich
);
sal_uInt16
nWhich
=
pItem
->
Which
();
if
(
pWhichsToIgnore
&&
pWhichsToIgnore
->
find
(
nWhich
)
!=
pWhichsToIgnore
->
end
())
continue
;
sal_uInt16
nSlotId
=
pSrcPool
->
GetSlotId
(
nWhich
);
if
(
nSlotId
&&
nWhich
!=
nSlotId
&&
if
(
nSlotId
&&
nWhich
!=
nSlotId
&&
0
!=
(
nWhich
=
pDstPool
->
GetWhich
(
nSlotId
)
)
&&
0
!=
(
nWhich
=
pDstPool
->
GetWhich
(
nSlotId
)
)
&&
...
...
sw/source/filter/ww8/wrtww8.hxx
Dosyayı görüntüle @
870a7ee6
...
@@ -1452,7 +1452,7 @@ public:
...
@@ -1452,7 +1452,7 @@ public:
MSWord_SdrAttrIter
(
MSWordExportBase
&
rWr
,
const
EditTextObject
&
rEditObj
,
MSWord_SdrAttrIter
(
MSWordExportBase
&
rWr
,
const
EditTextObject
&
rEditObj
,
sal_uInt8
nType
);
sal_uInt8
nType
);
void
NextPara
(
sal_Int32
nPar
);
void
NextPara
(
sal_Int32
nPar
);
void
OutParaAttr
(
bool
bCharAttr
);
void
OutParaAttr
(
bool
bCharAttr
,
const
std
::
set
<
sal_uInt16
>*
pWhichsToIgnore
=
NULL
);
void
OutEEField
(
const
SfxPoolItem
&
rHt
);
void
OutEEField
(
const
SfxPoolItem
&
rHt
);
bool
IsTxtAttr
(
sal_Int32
nSwPos
);
bool
IsTxtAttr
(
sal_Int32
nSwPos
);
...
...
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