Skip to content

Commit

Permalink
Fix build with poppler 22.09.0
Browse files Browse the repository at this point in the history
git-svn-id: svn://scribus.net/trunk/Scribus@25140 11d20701-8431-0410-a711-e3c959e3b870
  • Loading branch information
Jean Ghali committed Sep 1, 2022
1 parent a28eaa0 commit 8acd29e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion scribus/plugins/import/pdf/slaoutput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3628,13 +3628,21 @@ void SlaOutputDev::getPenState(GfxState *state)
m_lineJoin = Qt::BevelJoin;
break;
}
double *dashPattern;
#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 9, 0)
const auto& dashPattern = state->getLineDash(&m_dashOffset);
QVector<double> pattern(dashPattern.size());
for (size_t i = 0; i < dashPattern.size(); ++i)
pattern[i] = dashPattern[i];
m_dashValues = pattern;
#else
double* dashPattern;
int dashLength;
state->getLineDash(&dashPattern, &dashLength, &m_dashOffset);
QVector<double> pattern(dashLength);
for (int i = 0; i < dashLength; ++i)
pattern[i] = dashPattern[i];
m_dashValues = pattern;
#endif
}

int SlaOutputDev::getBlendMode(GfxState *state)
Expand Down

0 comments on commit 8acd29e

Please sign in to comment.