Newer
Older
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
+ mdest = mbuffer + y * maskWidth;
+ unsigned char * pix = mskStr->getLine();
for (int x = 0; x < maskWidth; x++)
{
if (pix[x] ^ invert_bit)
@@ -2675,9 +2574,9 @@ void SlaOutputDev::drawMaskedImage(GfxState *state, Object *ref, Stream *str, i
delete[] mbuffer;
}
-void SlaOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, GBool interpolate, POPPLER_CONST_082 int* maskColors, GBool inlineImg)
+void SlaOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, bool interpolate, const int* maskColors, bool inlineImg)
{
- auto imgStr = std::make_shared<ImageStream>(str, width, colorMap->getNumPixelComps(), colorMap->getBits());
+ auto imgStr = std::make_unique<ImageStream>(str, width, colorMap->getNumPixelComps(), colorMap->getBits());
imgStr->reset();
QImage image(width, height, QImage::Format_ARGB32);
@@ -2689,7 +2588,7 @@ void SlaOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, int widt
for (int y = 0; y < height; y++)
{
QRgb *s = (QRgb*)(image.scanLine(y));
- Guchar *pix = imgStr->getLine();
+ unsigned char *pix = imgStr->getLine();
for (int x = 0; x < width; x++)
{
GfxRGB rgb;
@@ -2716,7 +2615,7 @@ void SlaOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, int widt
for (int y = 0; y < height; y++)
{
QRgb *s = (QRgb*)(image.scanLine(y));
- Guchar *pix = imgStr->getLine();
+ unsigned char *pix = imgStr->getLine();
for (int x = 0; x < width; x++)
{
if (colorMap->getNumPixelComps() == 4)
@@ -2899,7 +2798,7 @@ void SlaOutputDev::createImageFrame(QImage& image, GfxState *state, int numColor
}
}
-void SlaOutputDev::beginMarkedContent(POPPLER_CONST char *name, Object *dictRef)
+void SlaOutputDev::beginMarkedContent(const char *name, Object *dictRef)
{
mContent mSte;
mSte.name = QString(name);
@@ -2925,14 +2824,14 @@ void SlaOutputDev::beginMarkedContent(POPPLER_CONST char *name, Object *dictRef)
Object dictObj = dictRef->fetch(m_xref);
if (!dictObj.isDict())
return;
- Dict* dict = dictObj.getDict();
+ const Dict* dict = dictObj.getDict();
Object dictType = dict->lookup("Type");
if (dictType.isName("OCG"))
{
oc = contentConfig->findOcgByRef(dictRef->getRef());
if (oc)
{
- // qDebug() << "Begin OCG Content with Name " << UnicodeParsedString(oc->getName());
+// qDebug() << "Begin OCG Content with Name " << UnicodeParsedString(oc->getName());
m_doc->setActiveLayer(UnicodeParsedString(oc->getName()));
mSte.ocgName = UnicodeParsedString(oc->getName());
}
@@ -2942,7 +2841,7 @@ void SlaOutputDev::beginMarkedContent(POPPLER_CONST char *name, Object *dictRef)
m_mcStack.push(mSte);
}
-void SlaOutputDev::beginMarkedContent(POPPLER_CONST char *name, Dict *properties)
+void SlaOutputDev::beginMarkedContent(const char *name, Dict *properties)
{
// qDebug() << "Begin Marked Content with Name " << QString(name);
QString nam(name);
@@ -2959,7 +2858,7 @@ void SlaOutputDev::beginMarkedContent(POPPLER_CONST char *name, Dict *properties
QString lName = QString("Layer_%1").arg(m_layerNum + 1);
Object obj = properties->lookup("Title");
if (obj.isString())
- lName = QString(obj.getString()->getCString());
+ lName = QString(obj.getString()->c_str());
for (const auto& layer : m_doc->Layers)
{
if (layer.Name == lName)
@@ -3019,12 +2918,12 @@ void SlaOutputDev::endMarkedContent(GfxState *state)
}
}
-void SlaOutputDev::markPoint(POPPLER_CONST char *name)
+void SlaOutputDev::markPoint(const char *name)
{
// qDebug() << "Begin Marked Point with Name " << QString(name);
}
-void SlaOutputDev::markPoint(POPPLER_CONST char *name, Dict *properties)
+void SlaOutputDev::markPoint(const char *name, Dict *properties)
{
// qDebug() << "Begin Marked Point with Name " << QString(name) << "and Properties";
beginMarkedContent(name, properties);
@@ -3037,19 +2936,18 @@ void SlaOutputDev::updateFont(GfxState *state)
std::string fileName;
std::unique_ptr<FoFiTrueType> ff;
std::optional<std::vector<unsigned char>> tmpBuf;
-#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 2, 0)
+#else
std::optional<GfxFontLoc> fontLoc;
const GooString * fileName = nullptr;
std::unique_ptr<FoFiTrueType> ff;
char* tmpBuf = nullptr;
-#else
- GfxFontLoc * fontLoc = nullptr;
- GooString * fileName = nullptr;
- FoFiTrueType * ff = nullptr;
- char* tmpBuf = nullptr;
#endif
GfxFontType fontType;
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0)
+ std::unique_ptr<SlaOutFontFileID> id;
+#else
SlaOutFontFileID *id;
+#endif
SplashFontFile *fontFile;
SplashFontSrc *fontsrc = nullptr;
Object refObj, strObj;
@@ -3079,15 +2977,21 @@ void SlaOutputDev::updateFont(GfxState *state)
goto err1;
// check the font file cache
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0)
+ id = std::make_unique<SlaOutFontFileID>(gfxFont->getID());
+ if ((fontFile = m_fontEngine->getFontFile(*id)))
+ id.reset();
+#else
id = new SlaOutFontFileID(gfxFont->getID());
if ((fontFile = m_fontEngine->getFontFile(id)))
delete id;
+#endif
else
{
fontLoc = gfxFont->locateFont(m_xref ? m_xref : m_pdfDoc->getXRef(), nullptr);
if (!fontLoc)
{
- error(errSyntaxError, -1, "Couldn't find a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)");
+ error(errSyntaxError, -1, "Couldn't find a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");
goto err2;
}
@@ -3111,10 +3015,8 @@ void SlaOutputDev::updateFont(GfxState *state)
{ // gfxFontLocExternal
#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 4, 0)
fileName = fontLoc->path;
-#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 2, 0)
- fileName = fontLoc->pathAsGooString();
#else
- fileName = fontLoc->path;
+ fileName = fontLoc->pathAsGooString();
#endif
fontType = fontLoc->fontType;
}
@@ -3127,56 +3029,80 @@ void SlaOutputDev::updateFont(GfxState *state)
fontsrc->setBuf(std::move(tmpBuf.value()));
#else
if (fileName)
- fontsrc->setFile(fileName, gFalse);
+ fontsrc->setFile(fileName, false);
else
- fontsrc->setBuf(tmpBuf, tmpBufLen, gTrue);
+ fontsrc->setBuf(tmpBuf, tmpBufLen, true);
#endif
// load the font file
switch (fontType) {
case fontType1:
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0)
+ if (!(fontFile = m_fontEngine->loadType1Font(std::move(id), fontsrc, (const char**) ((Gfx8BitFont*) gfxFont)->getEncoding(), fontLoc->fontNum)))
+ {
+ error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");
+ goto err2;
+ }
+#else
if (!(fontFile = m_fontEngine->loadType1Font(id, fontsrc, (const char **)((Gfx8BitFont *) gfxFont)->getEncoding())))
{
- error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)");
+ error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");
goto err2;
}
+#endif
break;
case fontType1C:
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0)
+ if (!(fontFile = m_fontEngine->loadType1CFont(std::move(id), fontsrc, (const char**) ((Gfx8BitFont*) gfxFont)->getEncoding(), fontLoc->fontNum)))
+ {
+ error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");
+ goto err2;
+ }
+#else
if (!(fontFile = m_fontEngine->loadType1CFont(id, fontsrc, (const char **)((Gfx8BitFont *) gfxFont)->getEncoding())))
{
- error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)");
+ error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");
goto err2;
}
+#endif
break;
case fontType1COT:
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0)
+ if (!(fontFile = m_fontEngine->loadOpenTypeT1CFont(std::move(id), fontsrc, (const char **)((Gfx8BitFont *) gfxFont)->getEncoding(), fontLoc->fontNum)))
+ {
+ error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");
+ goto err2;
+ }
+#else
if (!(fontFile = m_fontEngine->loadOpenTypeT1CFont(id, fontsrc, (const char **)((Gfx8BitFont *) gfxFont)->getEncoding())))
{
- error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)");
+ error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");
goto err2;
}
+#endif
break;
case fontTrueType:
case fontTrueTypeOT:
-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 4, 0)
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0)
+ if (!fileName.empty())
+ ff = FoFiTrueType::load(fileName.c_str(), fontLoc->fontNum);
+ else
+ ff = FoFiTrueType::make(fontsrc->buf.data(), fontsrc->buf.size(), fontLoc->fontNum);
+#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 4, 0)
if (!fileName.empty())
ff = FoFiTrueType::load(fileName.c_str());
else
ff = FoFiTrueType::make(fontsrc->buf.data(), fontsrc->buf.size());
#else
if (fileName)
- ff = FoFiTrueType::load(fileName->getCString());
+ ff = FoFiTrueType::load(fileName->c_str());
else
ff = FoFiTrueType::make(tmpBuf, tmpBufLen);
#endif
if (ff)
{
-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 2, 0)
codeToGID = ((Gfx8BitFont*) gfxFont)->getCodeToGIDMap(ff.get());
ff.reset();
-#else
- codeToGID = ((Gfx8BitFont *)gfxFont)->getCodeToGIDMap(ff);
- delete ff;
-#endif
n = 256;
}
else
@@ -3184,19 +3110,35 @@ void SlaOutputDev::updateFont(GfxState *state)
codeToGID = nullptr;
n = 0;
}
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0)
+ if (!(fontFile = m_fontEngine->loadTrueTypeFont(std::move(id), fontsrc, codeToGID, n, fontLoc->fontNum)))
+ {
+ error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");
+ goto err2;
+ }
+#else
if (!(fontFile = m_fontEngine->loadTrueTypeFont(id, fontsrc, codeToGID, n)))
{
- error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)");
+ error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");
goto err2;
}
+#endif
break;
case fontCIDType0:
case fontCIDType0C:
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0)
+ if (!(fontFile = m_fontEngine->loadCIDFont(std::move(id), fontsrc, fontLoc->fontNum)))
+ {
+ error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");
+ goto err2;
+ }
+#else
if (!(fontFile = m_fontEngine->loadCIDFont(id, fontsrc)))
{
- error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)");
+ error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");
goto err2;
}
+#endif
break;
case fontCIDType0COT:
if (((GfxCIDFont *) gfxFont)->getCIDToGID())
@@ -3210,12 +3152,21 @@ void SlaOutputDev::updateFont(GfxState *state)
codeToGID = nullptr;
n = 0;
}
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0)
+ if (!(fontFile = m_fontEngine->loadOpenTypeCFFFont(std::move(id), fontsrc, codeToGID, n, fontLoc->fontNum)))
+ {
+ error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'",
+ gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");
+ goto err2;
+ }
+#else
if (!(fontFile = m_fontEngine->loadOpenTypeCFFFont(id, fontsrc, codeToGID, n)))
{
error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'",
- gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)");
+ gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");
goto err2;
}
+#endif
break;
case fontCIDType2:
case fontCIDType2OT:
@@ -3232,32 +3183,40 @@ void SlaOutputDev::updateFont(GfxState *state)
}
else
{
-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 4, 0)
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0)
+ if (!fileName.empty())
+ ff = FoFiTrueType::load(fileName.c_str(), fontLoc->fontNum);
+ else
+ ff = FoFiTrueType::make(fontsrc->buf.data(), fontsrc->buf.size(), fontLoc->fontNum);
+#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 4, 0)
if (!fileName.empty())
ff = FoFiTrueType::load(fileName.c_str());
else
ff = FoFiTrueType::make(fontsrc->buf.data(), fontsrc->buf.size());
#else
if (fileName)
- ff = FoFiTrueType::load(fileName->getCString());
+ ff = FoFiTrueType::load(fileName->c_str());
else
ff = FoFiTrueType::make(tmpBuf, tmpBufLen);
#endif
if (! ff)
goto err2;
-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 2, 0)
codeToGID = ((GfxCIDFont*) gfxFont)->getCodeToGIDMap(ff.get(), &n);
ff.reset();
-#else
- codeToGID = ((GfxCIDFont *)gfxFont)->getCodeToGIDMap(ff, &n);
- delete ff;
-#endif
}
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0)
+ if (!(fontFile = m_fontEngine->loadTrueTypeFont(std::move(id), fontsrc, codeToGID, n, fontLoc->fontNum)))
+ {
+ error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");
+ goto err2;
+ }
+#else
if (!(fontFile = m_fontEngine->loadTrueTypeFont(id, fontsrc, codeToGID, n, faceIndex)))
{
- error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)");
+ error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");
goto err2;
}
+#endif
break;
default:
// this shouldn't happen
@@ -3284,17 +3243,15 @@ void SlaOutputDev::updateFont(GfxState *state)
mat[3] = -m22;
m_font = m_fontEngine->getFont(fontFile, mat, matrix);
-#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(22, 2, 0)
- delete fontLoc;
-#endif
if (fontsrc && !fontsrc->isFile)
fontsrc->unref();
return;
err2:
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0)
+ id.reset();
+#else
delete id;
-#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(22, 2, 0)
- delete fontLoc;
#endif
err1:
@@ -3302,7 +3259,7 @@ err1:
fontsrc->unref();
}
-void SlaOutputDev::drawChar(GfxState* state, double x, double y, double dx, double dy, double originX, double originY, CharCode code, int nBytes, POPPLER_CONST_082 Unicode* u, int uLen)
+void SlaOutputDev::drawChar(GfxState* state, double x, double y, double dx, double dy, double originX, double originY, CharCode code, int nBytes, const Unicode* u, int uLen)
{
// qDebug() << "SlaOutputDev::drawChar code:" << code << "bytes:" << nBytes << "Unicode:" << u << "ulen:" << uLen << "render:" << state->getRender();
double x1, y1, x2, y2;
@@ -3334,7 +3291,7 @@ void SlaOutputDev::drawChar(GfxState* state, double x, double y, double dx, doub
qPath.setFillRule(Qt::WindingFill);
for (int i = 0; i < fontPath->getLength(); ++i)
{
- Guchar f;
+ unsigned char f;
fontPath->getPoint(i, &x1, &y1, &f);
if (f & splashPathFirst)
qPath.moveTo(x1,y1);
@@ -3396,25 +3353,25 @@ void SlaOutputDev::drawChar(GfxState* state, double x, double y, double dx, doub
}
-GBool SlaOutputDev::beginType3Char(GfxState *state, double x, double y, double dx, double dy, CharCode code, POPPLER_CONST_082 Unicode *u, int uLen)
+bool SlaOutputDev::beginType3Char(GfxState *state, double x, double y, double dx, double dy, CharCode code, const Unicode *u, int uLen)
{
// qDebug() << "beginType3Char";
#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 4, 0)
GfxFont *gfxFont;
if (!(gfxFont = state->getFont().get()))
- return gTrue;
+ return true;
#else
GfxFont* gfxFont;
if (!(gfxFont = state->getFont()))
- return gTrue;
+ return true;
#endif
if (gfxFont->getType() != fontType3)
- return gTrue;
+ return true;
F3Entry f3e;
f3e.colored = false;
m_F3Stack.push(f3e);
pushGroup();
- return gFalse;
+ return false;
}
void SlaOutputDev::endType3Char(GfxState *state)
@@ -3514,7 +3471,7 @@ void SlaOutputDev::endTextObject(GfxState *state)
}
}
-QString SlaOutputDev::getColor(GfxColorSpace *color_space, POPPLER_CONST_070 GfxColor *color, int *shade)
+QString SlaOutputDev::getColor(GfxColorSpace *color_space, const GfxColor *color, int *shade)
{
QString fNam;
QString namPrefix = "FromPDF";
@@ -3561,7 +3518,7 @@ QString SlaOutputDev::getColor(GfxColorSpace *color_space, POPPLER_CONST_070 Gfx
{
auto* sepColorSpace = (GfxSeparationColorSpace*) color_space;
GfxColorSpace* altColorSpace = sepColorSpace->getAlt();
- QString name(sepColorSpace->getName()->getCString());
+ QString name(sepColorSpace->getName()->c_str());
bool isRegistrationColor = (name == "All");
if (isRegistrationColor)
{
@@ -3661,7 +3618,7 @@ QString SlaOutputDev::getAnnotationColor(const AnnotColor *color)
return fNam;
}
-QString SlaOutputDev::convertPath(POPPLER_CONST_083 GfxPath *path)
+QString SlaOutputDev::convertPath(const GfxPath *path)
{
// qDebug() << "SlaOutputDev::convertPath";
if (! path)
@@ -3672,7 +3629,7 @@ QString SlaOutputDev::convertPath(POPPLER_CONST_083 GfxPath *path)
for (int i = 0; i < path->getNumSubpaths(); ++i)
{
- POPPLER_CONST_083 GfxSubpath * subpath = path->getSubpath(i);
+ const GfxSubpath * subpath = path->getSubpath(i);
if (subpath->getNumPoints() > 0)
{
output += QString("M %1 %2").arg(subpath->getX(0)).arg(subpath->getY(0));
@@ -3736,7 +3693,7 @@ void SlaOutputDev::getPenState(GfxState *state)
pattern[i] = dashPattern[i];
m_dashValues = pattern;
#else
- double *dashPattern;
+ double* dashPattern;
int dashLength;
state->getLineDash(&dashPattern, &dashLength, &m_dashOffset);
QVector<double> pattern(dashLength);
@@ -3842,7 +3799,7 @@ void SlaOutputDev::applyMask(PageItem *ite)
}
}
-void SlaOutputDev::pushGroup(const QString& maskName, GBool forSoftMask, GBool alpha, bool inverted)
+void SlaOutputDev::pushGroup(const QString& maskName, bool forSoftMask, bool alpha, bool inverted)
{
groupEntry gElements;
gElements.forSoftMask = forSoftMask;
@@ -3852,23 +3809,23 @@ void SlaOutputDev::pushGroup(const QString& maskName, GBool forSoftMask, GBool a
m_groupStack.push(gElements);
}
-QString SlaOutputDev::UnicodeParsedString(POPPLER_CONST GooString *s1) const
+QString SlaOutputDev::UnicodeParsedString(const GooString *s1) const
{
if ( !s1 || s1->getLength() == 0 )
return QString();
- GBool isUnicode;
+ bool isUnicode;
int i;
Unicode u;
QString result;
if ((s1->getChar(0) & 0xff) == 0xfe && (s1->getLength() > 1 && (s1->getChar(1) & 0xff) == 0xff))
{
- isUnicode = gTrue;
+ isUnicode = true;
i = 2;
result.reserve((s1->getLength() - 2) / 2);
}
else
{
- isUnicode = gFalse;
+ isUnicode = false;
i = 0;
result.reserve(s1->getLength());
}
@@ -3893,19 +3850,19 @@ QString SlaOutputDev::UnicodeParsedString(const std::string& s1) const
{
if (s1.length() == 0)
return QString();
- GBool isUnicode;
+ bool isUnicode;
size_t i;
Unicode u;
QString result;
if ((s1.at(0) & 0xff) == 0xfe && (s1.length() > 1 && (s1.at(1) & 0xff) == 0xff))
{
- isUnicode = gTrue;
+ isUnicode = true;
i = 2;
result.reserve((s1.length() - 2) / 2);
}
else
{
- isUnicode = gFalse;
+ isUnicode = false;
i = 0;
result.reserve(s1.length());
}
diff --git a/scribus/plugins/import/pdf/slaoutput.h b/scribus/plugins/import/pdf/slaoutput.h
index 35de565..9eca5a8 100644
--- a/scribus/plugins/import/pdf/slaoutput.h
+++ b/scribus/plugins/import/pdf/slaoutput.h
@@ -30,9 +30,6 @@ for which a new license (GPL+exception) is in place.
#include "selection.h"
#include "vgradient.h"
-#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(0, 73, 0)
-#include <poppler/goo/gtypes.h>
-#endif
#include <poppler/Object.h>
#include <poppler/OutputDev.h>
#include <poppler/Gfx.h>
@@ -56,9 +53,11 @@ for which a new license (GPL+exception) is in place.
#include <poppler/splash/SplashGlyphBitmap.h>
//------------------------------------------------------------------------
-// LinkSubmitData
+// LinkSubmitForm
//------------------------------------------------------------------------
+#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(24, 10, 0)
+
class LinkSubmitForm: public LinkAction
{
public:
@@ -68,17 +67,19 @@ public:
virtual ~LinkSubmitForm();
// Was the LinkImportData created successfully?
- GBool isOk() POPPLER_CONST override { return fileName != nullptr; }
+ bool isOk() const override { return m_url != nullptr; }
// Accessors.
- LinkActionKind getKind() POPPLER_CONST override { return actionUnknown; }
- GooString *getFileName() { return fileName; }
+ LinkActionKind getKind() const override { return actionUnknown; }
+ GooString *getUrl() { return m_url; }
int getFlags() { return m_flags; }
private:
- GooString *fileName {nullptr}; // file name
+ GooString *m_url {nullptr}; // URL
int m_flags {0};
};
+#endif
+
//------------------------------------------------------------------------
// LinkImportData
//------------------------------------------------------------------------
@@ -92,9 +93,9 @@ public:
virtual ~LinkImportData();
// Was the LinkImportData created successfully?
- GBool isOk() POPPLER_CONST override { return fileName != nullptr; }
+ bool isOk() const override { return fileName != nullptr; }
// Accessors.
- LinkActionKind getKind() POPPLER_CONST override { return actionUnknown; }
+ LinkActionKind getKind() const override { return actionUnknown; }
GooString *getFileName() { return fileName; }
private:
@@ -111,10 +112,17 @@ public:
SlaOutFontFileID(const Ref *rA) { r = *rA; }
~SlaOutFontFileID() {}
- GBool matches(SplashFontFileID *id) override
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0)
+ bool matches(const SplashFontFileID& id) const override
+ {
+ return ((const SlaOutFontFileID&) id).r.num == r.num && ((const SlaOutFontFileID&) id).r.gen == r.gen;
+ }
+#else
+ bool matches(SplashFontFileID *id) override
{
return ((SlaOutFontFileID*) id)->r.num == r.num && ((SlaOutFontFileID *) id)->r.gen == r.gen;
}
+#endif
private:
Ref r;
@@ -127,19 +135,19 @@ public:
AnoOutputDev(ScribusDoc* doc, QStringList *importedColors);
virtual ~AnoOutputDev();
- GBool isOk() { return gTrue; }
- GBool upsideDown() override { return gTrue; }
- GBool useDrawChar() override { return gFalse; }
- GBool interpretType3Chars() override { return gFalse; }
- GBool useTilingPatternFill() override { return gFalse; }
- GBool useShadedFills(int type) override { return gFalse; }
- GBool useFillColorStop() override { return gFalse; }
- GBool useDrawForm() override { return gFalse; }
+ bool isOk() { return true; }
+ bool upsideDown() override { return true; }
+ bool useDrawChar() override { return false; }
+ bool interpretType3Chars() override { return false; }
+ bool useTilingPatternFill() override { return false; }
+ bool useShadedFills(int type) override { return false; }
+ bool useFillColorStop() override { return false; }
+ bool useDrawForm() override { return false; }
void stroke(GfxState *state) override;
void eoFill(GfxState *state) override;
void fill(GfxState *state) override;
- void drawString(GfxState *state, POPPLER_CONST GooString *s) override;
+ void drawString(GfxState *state, const GooString *s) override;
QString currColorText;
QString currColorFill;
@@ -149,7 +157,7 @@ public:
GooString *itemText {nullptr};
private:
- QString getColor(GfxColorSpace *color_space, POPPLER_CONST_070 GfxColor *color, int *shade);
+ QString getColor(GfxColorSpace *color_space, const GfxColor *color, int *shade);
ScribusDoc* m_doc;
QStringList *m_importedColors;
};
@@ -163,12 +171,8 @@ public:
virtual ~SlaOutputDev();
LinkAction* SC_getAction(AnnotWidget *ano);
-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
std::unique_ptr<LinkAction> SC_getAdditionalAction(const char *key, AnnotWidget *ano);
-#else
- LinkAction* SC_getAdditionalAction(const char *key, AnnotWidget *ano);
-#endif
- static GBool annotations_callback(Annot *annota, void *user_data);
+ static bool annotations_callback(Annot *annota, void *user_data);
bool handleTextAnnot(Annot* annota, double xCoor, double yCoor, double width, double height);
bool handleLinkAnnot(Annot* annota, double xCoor, double yCoor, double width, double height);
bool handleWidgetAnnot(Annot* annota, double xCoor, double yCoor, double width, double height);
@@ -176,16 +180,16 @@ public:
void handleActions(PageItem* ite, AnnotWidget *ano);
void startDoc(PDFDoc *doc, XRef *xrefA, Catalog *catA);
- GBool isOk() { return gTrue; }
- GBool upsideDown() override { return gTrue; }
- GBool useDrawChar() override { return gTrue; }
- GBool interpretType3Chars() override { return gTrue; }
- GBool useTilingPatternFill() override { return gTrue; }
- GBool useShadedFills(int type) override { return type <= 7; }
- GBool useFillColorStop() override { return gTrue; }
- GBool useDrawForm() override { return gFalse; }
+ bool isOk() { return true; }
+ bool upsideDown() override { return true; }
+ bool useDrawChar() override { return true; }
+ bool interpretType3Chars() override { return true; }
+ bool useTilingPatternFill() override { return true; }
+ bool useShadedFills(int type) override { return type <= 7; }
+ bool useFillColorStop() override { return true; }
+ bool useDrawForm() override { return false; }
-// virtual GBool needClipToCropBox() { return gTrue; }
+// virtual bool needClipToCropBox() { return true; }
void startPage(int pageNum, GfxState *, XRef *) override;
void endPage() override;
@@ -197,35 +201,31 @@ public:
void stroke(GfxState *state) override;
void fill(GfxState *state) override;
void eoFill(GfxState *state) override;
-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(21, 3, 0)
bool tilingPatternFill(GfxState *state, Gfx *gfx, Catalog *cat, GfxTilingPattern *tPat, const double *mat, int x0, int y0, int x1, int y1, double xStep, double yStep) override;
-#else
- GBool tilingPatternFill(GfxState *state, Gfx *gfx, Catalog *cat, Object *str, POPPLER_CONST_070 double *pmat, int paintType, int tilingType, Dict *resDict, POPPLER_CONST_070 double *mat, POPPLER_CONST_070 double *bbox, int x0, int y0, int x1, int y1, double xStep, double yStep) override;
-#endif
- GBool functionShadedFill(GfxState * /*state*/, GfxFunctionShading * /*shading*/) override { qDebug() << "Function Shaded Fill"; return gFalse; }
- GBool axialShadedFill(GfxState *state, GfxAxialShading *shading, double tMin, double tMax) override;
- GBool axialShadedSupportExtend(GfxState *state, GfxAxialShading *shading) override { return (shading->getExtend0() == shading->getExtend1()); }
- GBool radialShadedFill(GfxState *state, GfxRadialShading *shading, double sMin, double sMax) override;
- GBool radialShadedSupportExtend(GfxState *state, GfxRadialShading *shading) override { return (shading->getExtend0() == shading->getExtend1()); }
- GBool gouraudTriangleShadedFill(GfxState *state, GfxGouraudTriangleShading *shading) override;
- GBool patchMeshShadedFill(GfxState *state, GfxPatchMeshShading *shading) override;
+ bool functionShadedFill(GfxState * /*state*/, GfxFunctionShading * /*shading*/) override { qDebug() << "Function Shaded Fill"; return false; }
+ bool axialShadedFill(GfxState *state, GfxAxialShading *shading, double tMin, double tMax) override;
+ bool axialShadedSupportExtend(GfxState *state, GfxAxialShading *shading) override { return (shading->getExtend0() == shading->getExtend1()); }
+ bool radialShadedFill(GfxState *state, GfxRadialShading *shading, double sMin, double sMax) override;
+ bool radialShadedSupportExtend(GfxState *state, GfxRadialShading *shading) override { return (shading->getExtend0() == shading->getExtend1()); }
+ bool gouraudTriangleShadedFill(GfxState *state, GfxGouraudTriangleShading *shading) override;
+ bool patchMeshShadedFill(GfxState *state, GfxPatchMeshShading *shading) override;
//----- path clipping
void clip(GfxState *state) override;
void eoClip(GfxState *state) override;
void clipToStrokePath(GfxState * /*state*/) override { qDebug() << "Clip to StrokePath"; }
- virtual GBool deviceHasTextClip(GfxState *state) { return gFalse; }
+ virtual bool deviceHasTextClip(GfxState *state) { return false; }
// If current colorspace is pattern,
// does this device support text in pattern colorspace?
- virtual GBool supportTextCSPattern(GfxState *state)
+ virtual bool supportTextCSPattern(GfxState *state)
{
return state->getFillColorSpace()->getMode() == csPattern;
}
// If current colorspace is pattern,
// need this device special handling for masks in pattern colorspace?
- virtual GBool fillMaskCSPattern(GfxState * state)
+ virtual bool fillMaskCSPattern(GfxState * state)
{
return state->getFillColorSpace()->getMode() == csPattern;
}
@@ -233,37 +233,37 @@ public:
virtual void endMaskClip(GfxState *state) { qDebug() << "End Mask Clip"; }
//----- grouping operators
- void beginMarkedContent(POPPLER_CONST char *name, Dict *properties) override;
- virtual void beginMarkedContent(POPPLER_CONST char *name, Object *dictRef);
+ void beginMarkedContent(const char *name, Dict *properties) override;
+ virtual void beginMarkedContent(const char *name, Object *dictRef);
void endMarkedContent(GfxState *state) override;
- void markPoint(POPPLER_CONST char *name) override;
- void markPoint(POPPLER_CONST char *name, Dict *properties) override;
+ void markPoint(const char *name) override;
+ void markPoint(const char *name, Dict *properties) override;
//----- image drawing
- void drawImageMask(GfxState *state, Object *ref, Stream *str, int width, int height, GBool invert, GBool interpolate, GBool inlineImg) override;
- void drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, GBool interpolate, POPPLER_CONST_082 int *maskColors, GBool inlineImg) override;
+ void drawImageMask(GfxState *state, Object *ref, Stream *str, int width, int height, bool invert, bool interpolate, bool inlineImg) override;
+ void drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, bool interpolate, const int *maskColors, bool inlineImg) override;
void drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str,
int width, int height,
GfxImageColorMap *colorMap,
- GBool interpolate,
+ bool interpolate,
Stream *maskStr,
int maskWidth, int maskHeight,
GfxImageColorMap *maskColorMap,
- GBool maskInterpolate) override;
+ bool maskInterpolate) override;
void drawMaskedImage(GfxState *state, Object *ref, Stream *str,
int width, int height,
GfxImageColorMap *colorMap,
- GBool interpolate,
+ bool interpolate,
Stream *maskStr,
int maskWidth, int maskHeight,
- GBool maskInvert, GBool maskInterpolate) override; // { qDebug() << "Draw Masked Image"; }
+ bool maskInvert, bool maskInterpolate) override; // { qDebug() << "Draw Masked Image"; }
//----- transparency groups and soft masks
- void beginTransparencyGroup(GfxState *state, POPPLER_CONST_070 double *bbox, GfxColorSpace * /*blendingColorSpace*/, GBool /*isolated*/, GBool /*knockout*/, GBool /*forSoftMask*/) override;
- void paintTransparencyGroup(GfxState *state, POPPLER_CONST_070 double *bbox) override;
+ void beginTransparencyGroup(GfxState *state, const double *bbox, GfxColorSpace * /*blendingColorSpace*/, bool /*isolated*/, bool /*knockout*/, bool /*forSoftMask*/) override;
+ void paintTransparencyGroup(GfxState *state, const double *bbox) override;
void endTransparencyGroup(GfxState *state) override;
- void setSoftMask(GfxState * /*state*/, POPPLER_CONST_070 double * /*bbox*/, GBool /*alpha*/, Function * /*transferFunc*/, GfxColor * /*backdropColor*/) override;
+ void setSoftMask(GfxState * /*state*/, const double * /*bbox*/, bool /*alpha*/, Function * /*transferFunc*/, GfxColor * /*backdropColor*/) override;
void clearSoftMask(GfxState * /*state*/) override;
void updateFillColor(GfxState *state) override;
@@ -273,8 +273,8 @@ public:
//----- text drawing
void beginTextObject(GfxState *state) override;
void endTextObject(GfxState *state) override;
- void drawChar(GfxState *state, double /*x*/, double /*y*/, double /*dx*/, double /*dy*/, double /*originX*/, double /*originY*/, CharCode /*code*/, int /*nBytes*/, POPPLER_CONST_082 Unicode * /*u*/, int /*uLen*/) override;
- GBool beginType3Char(GfxState * /*state*/, double /*x*/, double /*y*/, double /*dx*/, double /*dy*/, CharCode /*code*/, POPPLER_CONST_082 Unicode * /*u*/, int /*uLen*/) override;
+ void drawChar(GfxState *state, double /*x*/, double /*y*/, double /*dx*/, double /*dy*/, double /*originX*/, double /*originY*/, CharCode /*code*/, int /*nBytes*/, const Unicode * /*u*/, int /*uLen*/) override;
+ bool beginType3Char(GfxState * /*state*/, double /*x*/, double /*y*/, double /*dx*/, double /*dy*/, CharCode /*code*/, const Unicode * /*u*/, int /*uLen*/) override;
void endType3Char(GfxState * /*state*/) override;
void type3D0(GfxState * /*state*/, double /*wx*/, double /*wy*/) override;
void type3D1(GfxState * /*state*/, double /*wx*/, double /*wy*/, double /*llx*/, double /*lly*/, double /*urx*/, double /*ury*/) override;
@@ -293,7 +293,7 @@ public:
protected:
void setItemFillAndStroke(GfxState* state, PageItem* textNode);
void applyMask(PageItem* ite);
- void pushGroup(const QString& maskName = "", GBool forSoftMask = gFalse, GBool alpha = gFalse, bool inverted = false);
+ void pushGroup(const QString& maskName = "", bool forSoftMask = false, bool alpha = false, bool inverted = false);
ScribusDoc* m_doc;
Qt::PenCapStyle m_lineEnd { Qt::FlatCap };
@@ -354,9 +354,9 @@ protected:
struct groupEntry
{
QList<PageItem*> Items;
- GBool forSoftMask { gFalse };
- GBool isolated { gFalse };
- GBool alpha { gFalse };
+ bool forSoftMask { false };
+ bool isolated { false };
+ bool alpha { false };
QString maskName;
QPointF maskPos;
bool inverted { false };
@@ -367,11 +367,11 @@ protected:
private:
void getPenState(GfxState *state);
- QString getColor(GfxColorSpace *color_space, POPPLER_CONST_070 GfxColor *color, int *shade);
+ QString getColor(GfxColorSpace *color_space, const GfxColor *color, int *shade);
QString getAnnotationColor(const AnnotColor *color);
- QString convertPath(POPPLER_CONST_083 GfxPath *path);
+ QString convertPath(const GfxPath *path);
int getBlendMode(GfxState *state) const;
- QString UnicodeParsedString(POPPLER_CONST GooString *s1) const;
+ QString UnicodeParsedString(const GooString *s1) const;
QString UnicodeParsedString(const std::string& s1) const;
bool checkClip();
@@ -420,11 +420,7 @@ private:
Catalog *m_catalog {nullptr};
SplashFontEngine *m_fontEngine {nullptr};
SplashFont *m_font {nullptr};
-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(21, 4, 0)
std::unique_ptr<FormPageWidgets> m_formWidgets;
-#else
- FormPageWidgets *m_formWidgets {nullptr};
-#endif
QHash<QString, QList<int> > m_radioMap;
QHash<int, PageItem*> m_radioButtons;
int m_actPage { 1 };
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
diff --git a/scribus/plugins/import/pdf/pdftextrecognition.h b/scribus/plugins/import/pdf/pdftextrecognition.h
index a04b453..631a2d1 100644
--- a/scribus/plugins/import/pdf/pdftextrecognition.h
+++ b/scribus/plugins/import/pdf/pdftextrecognition.h
@@ -16,7 +16,6 @@ for which a new license (GPL+exception) is in place.
#include "slaoutput.h"
#include <poppler/GfxState.h>
-#include <poppler/CharCodeToUnicode.h>
/* PDF TextBox Framework */
/*
@@ -143,7 +142,7 @@ class PdfTextOutputDev : public SlaOutputDev
{
public:
PdfTextOutputDev(ScribusDoc* doc, QList<PageItem*>* Elements, QStringList* importedColors, int flags);
- virtual ~PdfTextOutputDev();
+ ~PdfTextOutputDev() override;
void updateFont(GfxState* state) override;
diff --git a/scribus/plugins/import/pdf/slaoutput.h b/scribus/plugins/import/pdf/slaoutput.h
index 35de565..66582c7 100644
--- a/scribus/plugins/import/pdf/slaoutput.h
+++ b/scribus/plugins/import/pdf/slaoutput.h
@@ -45,8 +45,6 @@ for which a new license (GPL+exception) is in place.
#include <poppler/Form.h>
#include <poppler/Page.h>
#include <poppler/Catalog.h>
-#include <poppler/CharCodeToUnicode.h>
-#include <poppler/FontEncodingTables.h>
#include <poppler/splash/SplashFontFileID.h>
#include <poppler/splash/SplashFontFile.h>
#include <poppler/splash/SplashFontEngine.h>