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
6e31cbb4
Kaydet (Commit)
6e31cbb4
authored
Agu 07, 2014
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
DOCX export: avoid empty attributes in paragraph shading
Change-Id: I4bdf3f2d7f2aee3ce735a52185e736a8861d85e4
üst
6c65f932
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
22 deletions
+29
-22
para-shading.docx
sw/qa/extras/ooxmlexport/data/para-shading.docx
+0
-0
ooxmlexport.cxx
sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+14
-0
docxattributeoutput.cxx
sw/source/filter/ww8/docxattributeoutput.cxx
+15
-22
No files found.
sw/qa/extras/ooxmlexport/data/para-shading.docx
0 → 100644
Dosyayı görüntüle @
6e31cbb4
File added
sw/qa/extras/ooxmlexport/ooxmlexport.cxx
Dosyayı görüntüle @
6e31cbb4
...
...
@@ -3474,6 +3474,20 @@ DECLARE_OOXMLEXPORT_TEST(testFdo80902, "fdo80902.docx")
assertXPath
(
pXmlDoc
,
"/w:document/w:body/w:sectPr/w:docGrid"
,
"type"
,
"lines"
);
}
DECLARE_OOXMLEXPORT_TEST
(
testParaShading
,
"para-shading.docx"
)
{
// Make sure the themeColor attribute is not written when it would be empty.
if
(
xmlDocPtr
pXmlDoc
=
parseExport
(
"word/document.xml"
))
{
xmlXPathObjectPtr
pXPath
=
getXPathNode
(
pXmlDoc
,
"/w:document/w:body/w:p/w:pPr/w:shd"
);
xmlNodeSetPtr
pXmlNodes
=
pXPath
->
nodesetval
;
CPPUNIT_ASSERT_EQUAL
(
1
,
xmlXPathNodeSetGetLength
(
pXmlNodes
));
xmlNodePtr
pXmlNode
=
pXmlNodes
->
nodeTab
[
0
];
// The attribute existed, so xmlGetProp() returned non-NULL.
CPPUNIT_ASSERT_EQUAL
(
static_cast
<
xmlChar
*>
(
0
),
xmlGetProp
(
pXmlNode
,
BAD_CAST
(
"themeColor"
)));
}
}
DECLARE_OOXMLEXPORT_TEST
(
testFirstHeaderFooter
,
"first-header-footer.docx"
)
{
// Test import and export of a section's headerf/footerf properties.
...
...
sw/source/filter/ww8/docxattributeoutput.cxx
Dosyayı görüntüle @
6e31cbb4
...
...
@@ -7710,42 +7710,35 @@ void DocxAttributeOutput::ParaGrabBag(const SfxGrabBagItem& rItem)
{
uno
::
Sequence
<
beans
::
PropertyValue
>
aGrabBagSeq
;
i
->
second
>>=
aGrabBagSeq
;
OUString
sVal
,
sShdFill
,
sShdColor
,
sThemeColor
,
sThemeTint
,
sThemeShade
,
sThemeFill
,
sThemeFillTint
,
sThemeFillShade
;
for
(
sal_Int32
j
=
0
;
j
<
aGrabBagSeq
.
getLength
();
++
j
)
{
OString
sVal
=
OUStringToOString
(
aGrabBagSeq
[
j
].
Value
.
get
<
OUString
>
(),
RTL_TEXTENCODING_UTF8
);
if
(
sVal
.
isEmpty
())
continue
;
if
(
aGrabBagSeq
[
j
].
Name
==
"val"
)
aGrabBagSeq
[
j
].
Value
>>=
sVal
;
AddToAttrList
(
m_pBackgroundAttrList
,
FSNS
(
XML_w
,
XML_val
),
sVal
.
getStr
())
;
else
if
(
aGrabBagSeq
[
j
].
Name
==
"color"
)
aGrabBagSeq
[
j
].
Value
>>=
sShdColor
;
AddToAttrList
(
m_pBackgroundAttrList
,
FSNS
(
XML_w
,
XML_color
),
sVal
.
getStr
())
;
else
if
(
aGrabBagSeq
[
j
].
Name
==
"themeColor"
)
aGrabBagSeq
[
j
].
Value
>>=
sThemeColor
;
AddToAttrList
(
m_pBackgroundAttrList
,
FSNS
(
XML_w
,
XML_themeColor
),
sVal
.
getStr
())
;
else
if
(
aGrabBagSeq
[
j
].
Name
==
"themeTint"
)
aGrabBagSeq
[
j
].
Value
>>=
sThemeTint
;
AddToAttrList
(
m_pBackgroundAttrList
,
FSNS
(
XML_w
,
XML_themeTint
),
sVal
.
getStr
())
;
else
if
(
aGrabBagSeq
[
j
].
Name
==
"themeShade"
)
aGrabBagSeq
[
j
].
Value
>>=
sThemeShade
;
AddToAttrList
(
m_pBackgroundAttrList
,
FSNS
(
XML_w
,
XML_themeShade
),
sVal
.
getStr
())
;
else
if
(
aGrabBagSeq
[
j
].
Name
==
"fill"
)
aGrabBagSeq
[
j
].
Value
>>=
sShdFill
;
AddToAttrList
(
m_pBackgroundAttrList
,
FSNS
(
XML_w
,
XML_fill
),
sVal
.
getStr
())
;
else
if
(
aGrabBagSeq
[
j
].
Name
==
"themeFill"
)
aGrabBagSeq
[
j
].
Value
>>=
sThemeFill
;
AddToAttrList
(
m_pBackgroundAttrList
,
FSNS
(
XML_w
,
XML_themeFill
),
sVal
.
getStr
())
;
else
if
(
aGrabBagSeq
[
j
].
Name
==
"themeFillTint"
)
aGrabBagSeq
[
j
].
Value
>>=
sThemeFillTint
;
AddToAttrList
(
m_pBackgroundAttrList
,
FSNS
(
XML_w
,
XML_themeFillTint
),
sVal
.
getStr
())
;
else
if
(
aGrabBagSeq
[
j
].
Name
==
"themeFillShade"
)
aGrabBagSeq
[
j
].
Value
>>=
sThemeFillShade
;
AddToAttrList
(
m_pBackgroundAttrList
,
FSNS
(
XML_w
,
XML_themeFillShade
),
sVal
.
getStr
())
;
else
if
(
aGrabBagSeq
[
j
].
Name
==
"originalColor"
)
aGrabBagSeq
[
j
].
Value
>>=
m_sOriginalBackgroundColor
;
}
AddToAttrList
(
m_pBackgroundAttrList
,
9
,
FSNS
(
XML_w
,
XML_val
),
OUStringToOString
(
sVal
,
RTL_TEXTENCODING_UTF8
).
getStr
(),
FSNS
(
XML_w
,
XML_color
),
OUStringToOString
(
sShdColor
,
RTL_TEXTENCODING_UTF8
).
getStr
(),
FSNS
(
XML_w
,
XML_themeColor
),
OUStringToOString
(
sThemeColor
,
RTL_TEXTENCODING_UTF8
).
getStr
(),
FSNS
(
XML_w
,
XML_themeTint
),
OUStringToOString
(
sThemeTint
,
RTL_TEXTENCODING_UTF8
).
getStr
(),
FSNS
(
XML_w
,
XML_themeShade
),
OUStringToOString
(
sThemeShade
,
RTL_TEXTENCODING_UTF8
).
getStr
(),
FSNS
(
XML_w
,
XML_fill
),
OUStringToOString
(
sShdFill
,
RTL_TEXTENCODING_UTF8
).
getStr
(),
FSNS
(
XML_w
,
XML_themeFill
),
OUStringToOString
(
sThemeFill
,
RTL_TEXTENCODING_UTF8
).
getStr
(),
FSNS
(
XML_w
,
XML_themeFillTint
),
OUStringToOString
(
sThemeFillTint
,
RTL_TEXTENCODING_UTF8
).
getStr
(),
FSNS
(
XML_w
,
XML_themeFillShade
),
OUStringToOString
(
sThemeFillShade
,
RTL_TEXTENCODING_UTF8
).
getStr
());
}
else
if
(
i
->
first
==
"SdtPr"
)
{
...
...
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