[Libreoffice-commits] core.git: sdext/source
Caolán McNamara
caolanm at redhat.com
Mon May 15 15:24:57 UTC 2017
sdext/source/pdfimport/wrapper/wrapper.cxx | 30 +++++++++++++++++------------
1 file changed, 18 insertions(+), 12 deletions(-)
New commits:
commit 32cb3760a9d7742763fc8610db01689fdb719780
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon May 15 13:43:04 2017 +0100
Resolves: tdf#107812 add check for -Oblique
and move checks for -BoldOblique and -LightOblique before -Bold and -Light
Change-Id: I59b59a10c6e92c6a6dc269aad616b9eb9e185ccd
Reviewed-on: https://gerrit.libreoffice.org/37652
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sdext/source/pdfimport/wrapper/wrapper.cxx b/sdext/source/pdfimport/wrapper/wrapper.cxx
index 337dac042c5c..a31e78cb1100 100644
--- a/sdext/source/pdfimport/wrapper/wrapper.cxx
+++ b/sdext/source/pdfimport/wrapper/wrapper.cxx
@@ -525,39 +525,45 @@ void Parser::parseFontFamilyName( FontAttributes& rResult )
nLen -= nAttribLen;
pCopy += nAttribLen;
}
- else if (parseFontCheckForString(pCopy, nLen, RTL_CONSTASCII_STRINGPARAM("-Bold"), rResult, false, true))
+ else if (parseFontCheckForString(pCopy, nLen, RTL_CONSTASCII_STRINGPARAM("-LightOblique"), rResult, true, false))
{
- sal_Int32 nAttribLen = RTL_CONSTASCII_LENGTH("-Bold");
+ sal_Int32 nAttribLen = RTL_CONSTASCII_LENGTH("-LightOblique");
nLen -= nAttribLen;
pCopy += nAttribLen;
}
- else if (parseFontCheckForString(pCopy, nLen, RTL_CONSTASCII_STRINGPARAM("Bold"), rResult, false, true))
+ else if (parseFontCheckForString(pCopy, nLen, RTL_CONSTASCII_STRINGPARAM("-Light"), rResult, false, false))
{
- sal_Int32 nAttribLen = RTL_CONSTASCII_LENGTH("Bold");
+ sal_Int32 nAttribLen = RTL_CONSTASCII_LENGTH("-Light");
nLen -= nAttribLen;
pCopy += nAttribLen;
}
- else if (parseFontCheckForString(pCopy, nLen, RTL_CONSTASCII_STRINGPARAM("-Roman"), rResult, false, false))
+ else if (parseFontCheckForString(pCopy, nLen, RTL_CONSTASCII_STRINGPARAM("-BoldOblique"), rResult, true, true))
{
- sal_Int32 nAttribLen = RTL_CONSTASCII_LENGTH("-Roman");
+ sal_Int32 nAttribLen = RTL_CONSTASCII_LENGTH("-BoldOblique");
nLen -= nAttribLen;
pCopy += nAttribLen;
}
- else if (parseFontCheckForString(pCopy, nLen, RTL_CONSTASCII_STRINGPARAM("-LightOblique"), rResult, true, false))
+ else if (parseFontCheckForString(pCopy, nLen, RTL_CONSTASCII_STRINGPARAM("-Bold"), rResult, false, true))
{
- sal_Int32 nAttribLen = RTL_CONSTASCII_LENGTH("-LightOblique");
+ sal_Int32 nAttribLen = RTL_CONSTASCII_LENGTH("-Bold");
nLen -= nAttribLen;
pCopy += nAttribLen;
}
- else if (parseFontCheckForString(pCopy, nLen, RTL_CONSTASCII_STRINGPARAM("-BoldOblique"), rResult, true, true))
+ else if (parseFontCheckForString(pCopy, nLen, RTL_CONSTASCII_STRINGPARAM("Bold"), rResult, false, true))
{
- sal_Int32 nAttribLen = RTL_CONSTASCII_LENGTH("-BoldOblique");
+ sal_Int32 nAttribLen = RTL_CONSTASCII_LENGTH("Bold");
nLen -= nAttribLen;
pCopy += nAttribLen;
}
- else if (parseFontCheckForString(pCopy, nLen, RTL_CONSTASCII_STRINGPARAM("-Light"), rResult, false, false))
+ else if (parseFontCheckForString(pCopy, nLen, RTL_CONSTASCII_STRINGPARAM("-Roman"), rResult, false, false))
{
- sal_Int32 nAttribLen = RTL_CONSTASCII_LENGTH("-Light");
+ sal_Int32 nAttribLen = RTL_CONSTASCII_LENGTH("-Roman");
+ nLen -= nAttribLen;
+ pCopy += nAttribLen;
+ }
+ else if (parseFontCheckForString(pCopy, nLen, RTL_CONSTASCII_STRINGPARAM("-Oblique"), rResult, true, false))
+ {
+ sal_Int32 nAttribLen = RTL_CONSTASCII_LENGTH("-Oblique");
nLen -= nAttribLen;
pCopy += nAttribLen;
}
More information about the Libreoffice-commits
mailing list