[Libreoffice-commits] core.git: writerfilter/source
Justin Luth
justin_luth at sil.org
Fri Jun 30 19:37:02 UTC 2017
writerfilter/source/dmapper/StyleSheetTable.cxx | 35 +++++++++++++++---------
1 file changed, 23 insertions(+), 12 deletions(-)
New commits:
commit fb39062ed958c2a5df90c0aff7d873746122067c
Author: Justin Luth <justin_luth at sil.org>
Date: Thu Jun 22 17:53:00 2017 -0400
revert related tdf#82173 writerfilter: ignore case when mapping styles
and added the missing lowercase "Xnote reference" mappings.
Word can create both Heading1 and heading1 styles in the same
document. So case CAN be important.
Unfortunately, these mappings precede git history, so it will require
trial and error to judge which mappings are obsolete or simply invalid.
At least one of the existing mappings was not really correct anyway
(Endnote Text"->"Endnote Symbol") so reverting the change
to prevent other unanticipated regressions.
Change-Id: I3fcce125f8822040897e99f5101e277cc705ae75
Reviewed-on: https://gerrit.libreoffice.org/39132
Reviewed-by: Justin Luth <justin_luth at sil.org>
Tested-by: Justin Luth <justin_luth at sil.org>
Reviewed-on: https://gerrit.libreoffice.org/39396
Tested-by: Jenkins <ci at libreoffice.org>
diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx
index 2861377454ad..13d520f75441 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.cxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.cxx
@@ -46,22 +46,11 @@
using namespace ::com::sun::star;
-namespace {
-
-/** Functor for case-insensitive string comparison, usable in maps etc. */
-struct IgnoreCaseCompare
-{
- bool operator()( const OUString& rName1, const OUString& rName2 ) const
- { return rName1.compareToIgnoreAsciiCase( rName2 ) < 0; }
-};
-
-} // namespace
-
namespace writerfilter {
namespace dmapper
{
-typedef ::std::map< OUString, OUString, IgnoreCaseCompare> StringPairMap_t;
+typedef ::std::map< OUString, OUString> StringPairMap_t;
StyleSheetEntry::StyleSheetEntry() :
@@ -1302,6 +1291,15 @@ const StyleSheetEntryPtr StyleSheetTable::FindParentStyleSheet(const OUString& _
static const sal_Char* const aStyleNamePairs[] =
{
"Normal", "Standard",
+ "heading 1", "Heading 1",
+ "heading 2", "Heading 2",
+ "heading 3", "Heading 3",
+ "heading 4", "Heading 4",
+ "heading 5", "Heading 5",
+ "heading 6", "Heading 6",
+ "heading 7", "Heading 7",
+ "heading 8", "Heading 8",
+ "heading 9", "Heading 9",
"Heading1", "Heading 1",
"Heading2", "Heading 2",
"Heading3", "Heading 3",
@@ -1339,6 +1337,15 @@ static const sal_Char* const aStyleNamePairs[] =
"TOC 8", "Contents 8",
"TOC 9", "Contents 9",
"TOCHeading", "Contents Heading",
+ "toc 1", "Contents 1",
+ "toc 2", "Contents 2",
+ "toc 3", "Contents 3",
+ "toc 4", "Contents 4",
+ "toc 5", "Contents 5",
+ "toc 6", "Contents 6",
+ "toc 7", "Contents 7",
+ "toc 8", "Contents 8",
+ "toc 9", "Contents 9",
"TOC1", "Contents 1",
"TOC2", "Contents 2",
"TOC3", "Contents 3",
@@ -1353,16 +1360,20 @@ static const sal_Char* const aStyleNamePairs[] =
"Footnote Text", "Footnote",
"Annotation Text", "",
"Header", "Header",
+ "header", "Header",
"Footer", "Footer",
+ "footer", "Footer",
"Index Heading", "Index Heading",
"Caption", "",
"Table of Figures", "",
"Envelope Address", "Addressee",
"Envelope Return", "Sender",
+ "footnote reference", "Footnote Characters",
"Footnote Reference", "Footnote Characters",
"Annotation Reference", "",
"Line Number", "Line numbering",
"Page Number", "Page Number",
+ "endnote reference", "Endnote Characters",
"Endnote Reference", "Endnote Characters",
"endnote text", "Endnote",
"Endnote Text", "Endnote",
More information about the Libreoffice-commits
mailing list