extras/source/templates/presnt/Blueprint_Plans/Pictures/10000000000000580000001F99D2A38C014B254B.png
|binary
extras/source/templates/presnt/Blueprint_Plans/Pictures/100000000000033C0000026D847ACE982C6E20B6.png
|binary
extras/source/templates/presnt/Blueprint_Plans/Pictures/1000020100000500000002D0F25E20EA381A5EBD.png
|binary
sw/qa/extras/rtfexport/rtfexport6.cxx
| 12 ++++------
sw/source/filter/ww8/rtfattributeoutput.cxx
| 8 +++++-
sw/source/filter/ww8/wrtw8nds.cxx
| 7 +++++
6 files changed, 18 insertions(+), 9 deletions(-)
New commits:
commit 0be761900d69febd9ccb2a6a88b6183416d09c7b
Author: Laurent Balland <[email protected]>
AuthorDate: Sun Dec 10 12:01:43 2023 +0100
Commit: Xisco Fauli <[email protected]>
CommitDate: Tue Dec 12 09:39:18 2023 +0100
tdf#158250 Blueprint Plans template: update images
Contribution from Jérôme Bouat
Replace pictures with grey level and indexed colours
Change-Id: I5e253af65529d45b3c9ed2e30f6e2f018cbe03e7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160532
Tested-by: Jenkins
Reviewed-by: Laurent Balland <[email protected]>
(cherry picked from commit 7cfd3da36b54301fd51189282b39c71efd6bb894)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160481
Reviewed-by: Xisco Fauli <[email protected]>
diff --git
a/extras/source/templates/presnt/Blueprint_Plans/Pictures/10000000000000580000001F99D2A38C014B254B.png
b/extras/source/templates/presnt/Blueprint_Plans/Pictures/10000000000000580000001F99D2A38C014B254B.png
index 51f498c0f76f..a7264148dc75 100644
Binary files
a/extras/source/templates/presnt/Blueprint_Plans/Pictures/10000000000000580000001F99D2A38C014B254B.png
and
b/extras/source/templates/presnt/Blueprint_Plans/Pictures/10000000000000580000001F99D2A38C014B254B.png
differ
diff --git
a/extras/source/templates/presnt/Blueprint_Plans/Pictures/100000000000033C0000026D847ACE982C6E20B6.png
b/extras/source/templates/presnt/Blueprint_Plans/Pictures/100000000000033C0000026D847ACE982C6E20B6.png
index df9e0e0ccd29..084ab4241606 100644
Binary files
a/extras/source/templates/presnt/Blueprint_Plans/Pictures/100000000000033C0000026D847ACE982C6E20B6.png
and
b/extras/source/templates/presnt/Blueprint_Plans/Pictures/100000000000033C0000026D847ACE982C6E20B6.png
differ
diff --git
a/extras/source/templates/presnt/Blueprint_Plans/Pictures/1000020100000500000002D0F25E20EA381A5EBD.png
b/extras/source/templates/presnt/Blueprint_Plans/Pictures/1000020100000500000002D0F25E20EA381A5EBD.png
index fa93cafdddd0..4dc77fde421f 100644
Binary files
a/extras/source/templates/presnt/Blueprint_Plans/Pictures/1000020100000500000002D0F25E20EA381A5EBD.png
and
b/extras/source/templates/presnt/Blueprint_Plans/Pictures/1000020100000500000002D0F25E20EA381A5EBD.png
differ
commit ecf9e5b85ae1fae2ee3dc8db2b70aeb8202225f2
Author: Justin Luth <[email protected]>
AuthorDate: Tue Dec 5 21:43:16 2023 -0500
Commit: Xisco Fauli <[email protected]>
CommitDate: Tue Dec 12 09:39:05 2023 +0100
tdf#108505 rtfexport: avoid mis-inheriting field char settings
The field result fully defines its own character properties,
so it should not inherit any "parent" properties from the field.
My test file didn't show any problems with DOCX or DOC,
and reading through the code I didn't notice anything
that looked wrong. Both are very different from RTF syntax,
and it didn't look like they did anything "special"
for this situation, so nothing to copy from...
This whole area of field properties looks very hacky,
but it seems pretty clear that OutputTextNode
loops through OutAttr's run properties for each of
start/sep/end for fields. OutAttr picks up all of the
direct formatting, so nothing should be "missing",
and therefore a \plain character reset should be appropriate.
The good news is that MS Word 2010 imported both the bad
and the good export just like we do.
make CppunitTest_sw_rtfexport6 \
CPPUNIT_TEST_NAME=testTdf108505_fieldCharFormat2
Change-Id: I713c071dfcd40117bfff03d152718eb5d847327e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160375
Tested-by: Jenkins
Reviewed-by: Justin Luth <[email protected]>
Reviewed-by: Miklos Vajna <[email protected]>
(cherry picked from commit 5f888fa920c99cce91dfd18244a5c3869807b970)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160580
Reviewed-by: Xisco Fauli <[email protected]>
diff --git a/sw/qa/extras/rtfexport/rtfexport6.cxx
b/sw/qa/extras/rtfexport/rtfexport6.cxx
index 275d2593d2df..ff331caa7307 100644
--- a/sw/qa/extras/rtfexport/rtfexport6.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport6.cxx
@@ -178,21 +178,19 @@ DECLARE_RTFEXPORT_TEST(testTdf108505_fieldCharFormat,
"tdf108505_fieldCharFormat
DECLARE_RTFEXPORT_TEST(testTdf108505_fieldCharFormat2,
"tdf108505_fieldCharFormat2.rtf")
{
- // not exported properly. Currently xyz exports as run 6, red, italic.
- if (isExported())
- return;
-
uno::Reference<text::XTextTable> xTable(getParagraphOrTable(1),
uno::UNO_QUERY);
uno::Reference<text::XTextRange> xCell(xTable->getCellByName("C1"),
uno::UNO_QUERY);
uno::Reference<text::XTextRange> xPara = getParagraphOfText(1,
xCell->getText());
- // Preemptive test: nothing found wrong/fixed by the accompanying patch
+ const sal_Int32 nRun = isExported() ? 6 : 5;
+ const Color aColor = isExported() ? COL_BLACK : COL_AUTO;
+
// Character formatting should only be defined by the \fldrslt, and not by
prior formatting.
// Prior formatting is italic, red, 20pt.
- uno::Reference<text::XTextRange> xRun = getRun(xPara, 5, u"xyz"_ustr);
+ uno::Reference<text::XTextRange> xRun = getRun(xPara, nRun, u"xyz"_ustr);
CPPUNIT_ASSERT_EQUAL(awt::FontWeight::BOLD, getProperty<float>(xRun,
"CharWeight"));
CPPUNIT_ASSERT_EQUAL(awt::FontSlant_NONE,
getProperty<awt::FontSlant>(xRun, "CharPosture"));
- CPPUNIT_ASSERT_EQUAL(COL_AUTO, getProperty<Color>(xRun, "CharColor"));
+ CPPUNIT_ASSERT_EQUAL(aColor, getProperty<Color>(xRun, "CharColor"));
}
/** Make sure that the document variable "Unused", which is not referenced in
the document,
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx
b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 1ca7c61fba4d..2d68556e8a23 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -1858,7 +1858,13 @@ void RtfAttributeOutput::WriteField_Impl(const SwField*
const pField, ww::eField
msfilter::rtfutil::OutString(rFieldCmd,
m_rExport.GetCurrentEncoding()));
if (nMode & FieldFlags::CmdEnd)
{
- m_aRunText->append("}}{" OOO_STRING_SVTOOLS_RTF_FLDRSLT " {");
+ m_aRunText->append("}}{" OOO_STRING_SVTOOLS_RTF_FLDRSLT);
+ // The fldrslt contains its own full copy of character formatting,
+ // but if the result is empty (nMode & FieldFlags::End) or field
export is condensed
+ // in any way (multiple flags) then avoid spamming an unnecessary
plain character reset.
+ if (nMode == FieldFlags::CmdEnd)
+ m_aRunText->append(OOO_STRING_SVTOOLS_RTF_PLAIN);
+ m_aRunText->append(" {");
}
if (nMode & FieldFlags::Close)
{
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx
b/sw/source/filter/ww8/wrtw8nds.cxx
index 5b1d62b4b12b..74e53d2fec0b 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -2517,7 +2517,12 @@ void MSWordExportBase::OutputTextNode( SwTextNode& rNode
)
// DateFieldmark / ODF_FORMDATE is not a field...
if (pFieldmark->GetFieldname() != ODF_FORMDATE)
{
- OutputField( nullptr, lcl_getFieldId( pFieldmark ),
OUString(), FieldFlags::CmdEnd );
+ FieldFlags nFlags = FieldFlags::CmdEnd;
+ // send hint that fldrslt is empty, to avoid spamming
RTF CharProp reset.
+ // ::End does nothing when sending
rFieldCmd=OUString(), so safe to do.
+ if (pFieldmark->GetContent().isEmpty())
+ nFlags |= FieldFlags::End;
+ OutputField(nullptr, lcl_getFieldId(pFieldmark),
OUString(), nFlags);
if (pFieldmark->GetFieldname() == ODF_UNHANDLED)
{