forked from ports/contrib
187 lines
7.6 KiB
Diff
187 lines
7.6 KiB
Diff
diff --git a/scribus/plugins/import/pdf/importpdf.cpp b/scribus/plugins/import/pdf/importpdf.cpp
|
|
index 427cd66ef..7fe18d86b 100644
|
|
--- a/scribus/plugins/import/pdf/importpdf.cpp
|
|
+++ b/scribus/plugins/import/pdf/importpdf.cpp
|
|
@@ -792,13 +792,13 @@ bool PdfPlug::convert(const QString& fn)
|
|
if (names.isDict())
|
|
{
|
|
LinkAction *linkAction = nullptr;
|
|
- linkAction = LinkAction::parseAction(&names, pdfDoc->getCatalog()->getBaseURI());
|
|
+ linkAction = LinkAction::parseAction(&names, pdfDoc->getCatalog()->getBaseURI()).get();
|
|
if (linkAction)
|
|
{
|
|
LinkJavaScript *jsa = (LinkJavaScript*)linkAction;
|
|
if (jsa->isOk())
|
|
{
|
|
- QString script = UnicodeParsedString(jsa->getScript());
|
|
+ QString script = QString::fromStdString(jsa->getScript());
|
|
if (script.startsWith("this."))
|
|
{
|
|
script.remove(0, 5);
|
|
diff --git a/scribus/plugins/import/pdf/slaoutput.cpp b/scribus/plugins/import/pdf/slaoutput.cpp
|
|
index 93ceb1e30..d14dfa1d9 100644
|
|
--- a/scribus/plugins/import/pdf/slaoutput.cpp
|
|
+++ b/scribus/plugins/import/pdf/slaoutput.cpp
|
|
@@ -289,7 +289,7 @@ LinkAction* SlaOutputDev::SC_getAdditionalAction(const char *key, AnnotWidget *a
|
|
{
|
|
Object actionObject = additionalActionsObject.dictLookup(key);
|
|
if (actionObject.isDict())
|
|
- linkAction = LinkAction::parseAction(&actionObject, pdfDoc->getCatalog()->getBaseURI());
|
|
+ linkAction = LinkAction::parseAction(&actionObject, pdfDoc->getCatalog()->getBaseURI()).get();
|
|
}
|
|
}
|
|
return linkAction;
|
|
@@ -420,7 +420,7 @@ bool SlaOutputDev::handleLinkAnnot(Annot* annota, double xCoor, double yCoor, do
|
|
POPPLER_CONST GooString *ndst = gto->getNamedDest();
|
|
if (ndst)
|
|
{
|
|
- LinkDest *dstn = pdfDoc->findDest(ndst);
|
|
+ LinkDest *dstn = pdfDoc->findDest(ndst).get();
|
|
if (dstn)
|
|
{
|
|
if (dstn->getKind() == destXYZ)
|
|
@@ -464,7 +464,7 @@ bool SlaOutputDev::handleLinkAnnot(Annot* annota, double xCoor, double yCoor, do
|
|
POPPLER_CONST GooString *ndst = gto->getNamedDest();
|
|
if (ndst)
|
|
{
|
|
- LinkDest *dstn = pdfDoc->findDest(ndst);
|
|
+ LinkDest *dstn = pdfDoc->findDest(ndst).get();
|
|
if (dstn)
|
|
{
|
|
if (dstn->getKind() == destXYZ)
|
|
@@ -482,7 +482,7 @@ bool SlaOutputDev::handleLinkAnnot(Annot* annota, double xCoor, double yCoor, do
|
|
{
|
|
LinkURI *gto = (LinkURI*)act;
|
|
validLink = true;
|
|
- fileName = UnicodeParsedString(gto->getURI());
|
|
+ fileName = QString::fromStdString(gto->getURI());
|
|
}
|
|
if (validLink)
|
|
{
|
|
@@ -895,7 +895,7 @@ void SlaOutputDev::handleActions(PageItem* ite, AnnotWidget *ano)
|
|
if (jsa->isOk())
|
|
{
|
|
ite->annotation().setActionType(1);
|
|
- ite->annotation().setAction(UnicodeParsedString(jsa->getScript()));
|
|
+ ite->annotation().setAction(QString::fromStdString(jsa->getScript()));
|
|
}
|
|
}
|
|
else if (Lact->getKind() == actionGoTo)
|
|
@@ -932,7 +932,7 @@ void SlaOutputDev::handleActions(PageItem* ite, AnnotWidget *ano)
|
|
POPPLER_CONST GooString *ndst = gto->getNamedDest();
|
|
if (ndst)
|
|
{
|
|
- LinkDest *dstn = pdfDoc->findDest(ndst);
|
|
+ LinkDest *dstn = pdfDoc->findDest(ndst).get();
|
|
if (dstn)
|
|
{
|
|
if (dstn->getKind() == destXYZ)
|
|
@@ -984,7 +984,7 @@ void SlaOutputDev::handleActions(PageItem* ite, AnnotWidget *ano)
|
|
POPPLER_CONST GooString *ndst = gto->getNamedDest();
|
|
if (ndst)
|
|
{
|
|
- LinkDest *dstn = pdfDoc->findDest(ndst);
|
|
+ LinkDest *dstn = pdfDoc->findDest(ndst).get();
|
|
if (dstn)
|
|
{
|
|
if (dstn->getKind() == destXYZ)
|
|
@@ -1004,7 +1004,7 @@ void SlaOutputDev::handleActions(PageItem* ite, AnnotWidget *ano)
|
|
else if (Lact->getKind() == actionUnknown)
|
|
{
|
|
LinkUnknown *uno = (LinkUnknown*)Lact;
|
|
- QString actString = UnicodeParsedString(uno->getAction());
|
|
+ QString actString = QString::fromStdString(uno->getAction());
|
|
if (actString == "ResetForm")
|
|
{
|
|
ite->annotation().setActionType(4);
|
|
@@ -1048,7 +1048,7 @@ void SlaOutputDev::handleActions(PageItem* ite, AnnotWidget *ano)
|
|
{
|
|
LinkNamed *uno = (LinkNamed*)Lact;
|
|
ite->annotation().setActionType(10);
|
|
- ite->annotation().setAction(UnicodeParsedString(uno->getName()));
|
|
+ ite->annotation().setAction(QString::fromStdString(uno->getName()));
|
|
}
|
|
else
|
|
qDebug() << "Found unsupported Action of type" << Lact->getKind();
|
|
@@ -1061,7 +1061,7 @@ void SlaOutputDev::handleActions(PageItem* ite, AnnotWidget *ano)
|
|
LinkJavaScript *jsa = (LinkJavaScript*)Aact;
|
|
if (jsa->isOk())
|
|
{
|
|
- ite->annotation().setD_act(UnicodeParsedString(jsa->getScript()));
|
|
+ ite->annotation().setD_act(QString::fromStdString(jsa->getScript()));
|
|
ite->annotation().setAAact(true);
|
|
}
|
|
}
|
|
@@ -1075,7 +1075,7 @@ void SlaOutputDev::handleActions(PageItem* ite, AnnotWidget *ano)
|
|
LinkJavaScript *jsa = (LinkJavaScript*)Aact;
|
|
if (jsa->isOk())
|
|
{
|
|
- ite->annotation().setE_act(UnicodeParsedString(jsa->getScript()));
|
|
+ ite->annotation().setE_act(QString::fromStdString(jsa->getScript()));
|
|
ite->annotation().setAAact(true);
|
|
}
|
|
}
|
|
@@ -1089,7 +1089,7 @@ void SlaOutputDev::handleActions(PageItem* ite, AnnotWidget *ano)
|
|
LinkJavaScript *jsa = (LinkJavaScript*)Aact;
|
|
if (jsa->isOk())
|
|
{
|
|
- ite->annotation().setX_act(UnicodeParsedString(jsa->getScript()));
|
|
+ ite->annotation().setX_act(QString::fromStdString(jsa->getScript()));
|
|
ite->annotation().setAAact(true);
|
|
}
|
|
}
|
|
@@ -1103,7 +1103,7 @@ void SlaOutputDev::handleActions(PageItem* ite, AnnotWidget *ano)
|
|
LinkJavaScript *jsa = (LinkJavaScript*)Aact;
|
|
if (jsa->isOk())
|
|
{
|
|
- ite->annotation().setFo_act(UnicodeParsedString(jsa->getScript()));
|
|
+ ite->annotation().setFo_act(QString::fromStdString(jsa->getScript()));
|
|
ite->annotation().setAAact(true);
|
|
}
|
|
}
|
|
@@ -1117,7 +1117,7 @@ void SlaOutputDev::handleActions(PageItem* ite, AnnotWidget *ano)
|
|
LinkJavaScript *jsa = (LinkJavaScript*)Aact;
|
|
if (jsa->isOk())
|
|
{
|
|
- ite->annotation().setBl_act(UnicodeParsedString(jsa->getScript()));
|
|
+ ite->annotation().setBl_act(QString::fromStdString(jsa->getScript()));
|
|
ite->annotation().setAAact(true);
|
|
}
|
|
}
|
|
@@ -1131,7 +1131,7 @@ void SlaOutputDev::handleActions(PageItem* ite, AnnotWidget *ano)
|
|
LinkJavaScript *jsa = (LinkJavaScript*)Aact;
|
|
if (jsa->isOk())
|
|
{
|
|
- ite->annotation().setC_act(UnicodeParsedString(jsa->getScript()));
|
|
+ ite->annotation().setC_act(QString::fromStdString(jsa->getScript()));
|
|
ite->annotation().setAAact(true);
|
|
}
|
|
}
|
|
@@ -1145,7 +1145,7 @@ void SlaOutputDev::handleActions(PageItem* ite, AnnotWidget *ano)
|
|
LinkJavaScript *jsa = (LinkJavaScript*)Aact;
|
|
if (jsa->isOk())
|
|
{
|
|
- ite->annotation().setF_act(UnicodeParsedString(jsa->getScript()));
|
|
+ ite->annotation().setF_act(QString::fromStdString(jsa->getScript()));
|
|
ite->annotation().setAAact(true);
|
|
ite->annotation().setFormat(5);
|
|
}
|
|
@@ -1160,7 +1160,7 @@ void SlaOutputDev::handleActions(PageItem* ite, AnnotWidget *ano)
|
|
LinkJavaScript *jsa = (LinkJavaScript*)Aact;
|
|
if (jsa->isOk())
|
|
{
|
|
- ite->annotation().setK_act(UnicodeParsedString(jsa->getScript()));
|
|
+ ite->annotation().setK_act(QString::fromStdString(jsa->getScript()));
|
|
ite->annotation().setAAact(true);
|
|
ite->annotation().setFormat(5);
|
|
}
|
|
@@ -1175,7 +1175,7 @@ void SlaOutputDev::handleActions(PageItem* ite, AnnotWidget *ano)
|
|
LinkJavaScript *jsa = (LinkJavaScript*)Aact;
|
|
if (jsa->isOk())
|
|
{
|
|
- ite->annotation().setV_act(UnicodeParsedString(jsa->getScript()));
|
|
+ ite->annotation().setV_act(QString::fromStdString(jsa->getScript()));
|
|
ite->annotation().setAAact(true);
|
|
}
|
|
}
|