summaryrefslogtreecommitdiff
path: root/sdext
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-05-15 13:43:04 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-05-15 17:24:17 +0200
commit32cb3760a9d7742763fc8610db01689fdb719780 (patch)
treea7f2d5604106898da001ff167c6c6c58cf38b8c8 /sdext
parent02cf5ad31794a628a10fddc9fb538fd4e48a6e64 (diff)
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@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sdext')
-rw-r--r--sdext/source/pdfimport/wrapper/wrapper.cxx30
1 files changed, 18 insertions, 12 deletions
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;
}