QPDFObjectHandle::getIntValueAsInt()
{
    int result = 0;
    long long v = getIntValue();
    if (v < INT_MIN)
    {
        QTC::TC("qpdf", "QPDFObjectHandle int returning INT_MIN");
        warnIfPossible(
            "requested value of integer is too small; returning INT_MIN",
            false);
        result = INT_MIN;
    }
    else if (v > INT_MAX)
    {
        QTC::TC("qpdf", "QPDFObjectHandle int returning INT_MAX");
        warnIfPossible(
            "requested value of integer is too big; returning INT_MAX",
            false);
        result = INT_MAX;
    }
    else
    {
        result = static_cast<int>(v);
    }
    return result;
}
QPDFObjectHandle::getIntValueAsInt()
{
    int result = 0;
    long long v = getIntValue();
    if (v < INT_MIN)
    {
        QTC::TC("qpdf", "QPDFObjectHandle int returning INT_MIN");
        warnIfPossible(
            "requested value of integer is too small; returning INT_MIN",
            false);
        result = INT_MIN;
    }
    else if (v > INT_MAX)
    {
        QTC::TC("qpdf", "QPDFObjectHandle int returning INT_MAX");
        warnIfPossible(
            "requested value of integer is too big; returning INT_MAX",
            false);
        result = INT_MAX;
    }
    else
    {
        result = static_cast<int>(v);
    }
    return result;
}