当前位置: 首页>>代码示例>>C++>>正文


C++ CFX_WideString::GetInteger方法代码示例

本文整理汇总了C++中CFX_WideString::GetInteger方法的典型用法代码示例。如果您正苦于以下问题:C++ CFX_WideString::GetInteger方法的具体用法?C++ CFX_WideString::GetInteger怎么用?C++ CFX_WideString::GetInteger使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CFX_WideString的用法示例。


在下文中一共展示了CFX_WideString::GetInteger方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: CheckSharedForm

FX_BOOL CheckSharedForm(CXML_Element * pElement, CFX_ByteString cbName)
{
    int count = pElement->CountAttrs();
    int i=0;
    for (i = 0; i < count; i++)
    {
        CFX_ByteString space, name;
        CFX_WideString value;
        pElement->GetAttrByIndex(i, space, name, value);
        if (space == FX_BSTRC("xmlns") && name == FX_BSTRC("adhocwf") && value ==  L"http://ns.adobe.com/AcrobatAdhocWorkflow/1.0/")
        {
            CXML_Element *pVersion = pElement->GetElement("adhocwf",cbName);
            if (!pVersion)
                continue;
            CFX_WideString wsContent = pVersion->GetContent(0); // == 1.1
            int nType = wsContent.GetInteger();
            switch(nType)
            {
            case 1:
                FPDF_UnSupportError(FPDF_UNSP_DOC_SHAREDFORM_ACROBAT);
                break;
            case 2:
                FPDF_UnSupportError(FPDF_UNSP_DOC_SHAREDFORM_FILESYSTEM);
                break;
            case 0:
                FPDF_UnSupportError(FPDF_UNSP_DOC_SHAREDFORM_EMAIL);
                break;
            }
        }
    }

    FX_DWORD nCount = pElement->CountChildren();
    for(i=0; i<(int)nCount; i++)
    {
        CXML_Element::ChildType childType = pElement->GetChildType(i);
        if(childType == CXML_Element::Element)
        {
            CXML_Element * pChild = pElement->GetElement(i);
            if(CheckSharedForm(pChild, cbName))
                return TRUE;
        }
    }
    return FALSE;
}
开发者ID:fffCBBG,项目名称:HackMarathon,代码行数:44,代码来源:fpdf_ext.cpp

示例2: XFA_CreateNode_ForCondition

FX_BOOL CXFA_NodeHelper::XFA_CreateNode_ForCondition(
    CFX_WideString& wsCondition) {
  int32_t iLen = wsCondition.GetLength();
  CFX_WideString wsIndex = FX_WSTRC(L"0");
  ;
  FX_BOOL bAll = FALSE;
  if (iLen == 0) {
    m_iCreateFlag = XFA_RESOLVENODE_RSTYPE_CreateNodeOne;
    return FALSE;
  }
  if (wsCondition.GetAt(0) == '[') {
    int32_t i = 1;
    for (; i < iLen; ++i) {
      FX_WCHAR ch = wsCondition[i];
      if (ch == ' ') {
        continue;
      }
      if (ch == '+' || ch == '-') {
        break;
      } else if (ch == '*') {
        bAll = TRUE;
        break;
      } else {
        break;
      }
    }
    if (bAll) {
      wsIndex = FX_WSTRC(L"1");
      m_iCreateFlag = XFA_RESOLVENODE_RSTYPE_CreateNodeAll;
    } else {
      m_iCreateFlag = XFA_RESOLVENODE_RSTYPE_CreateNodeOne;
      wsIndex = wsCondition.Mid(i, iLen - 1 - i);
    }
    int32_t iIndex = wsIndex.GetInteger();
    m_iCreateCount = iIndex;
    return TRUE;
  }
  return FALSE;
}
开发者ID:andoma,项目名称:pdfium,代码行数:39,代码来源:xfa_script_nodehelper.cpp

示例3: XFA_ResolveNode_ConditionArray

void CXFA_ResolveProcessor::XFA_ResolveNode_ConditionArray(
    int32_t iCurIndex,
    CFX_WideString wsCondition,
    int32_t iFoundCount,
    CXFA_ResolveNodesData& rnd) {
  CXFA_NodeArray& findNodes = (CXFA_NodeArray&)rnd.m_Nodes;
  int32_t iLen = wsCondition.GetLength();
  FX_BOOL bRelative = FALSE;
  FX_BOOL bAll = FALSE;
  int32_t i = 1;
  for (; i < iLen; ++i) {
    FX_WCHAR ch = wsCondition[i];
    if (ch == ' ') {
      continue;
    }
    if (ch == '+' || ch == '-') {
      bRelative = TRUE;
      break;
    } else if (ch == '*') {
      bAll = TRUE;
      break;
    } else {
      break;
    }
  }
  if (bAll) {
    if (rnd.m_dwStyles & XFA_RESOLVENODE_CreateNode) {
      if (rnd.m_dwStyles & XFA_RESOLVENODE_Bind) {
        m_pNodeHelper->m_pCreateParent = ToNode(rnd.m_CurNode);
        m_pNodeHelper->m_iCreateCount = 1;
        findNodes.RemoveAll();
        m_pNodeHelper->m_iCurAllStart = -1;
        m_pNodeHelper->m_pAllStartParent = NULL;
      } else {
        if (m_pNodeHelper->m_iCurAllStart == -1) {
          m_pNodeHelper->m_iCurAllStart = m_iCurStart;
          m_pNodeHelper->m_pAllStartParent = ToNode(rnd.m_CurNode);
        }
      }
    } else if (rnd.m_dwStyles & XFA_RESOLVENODE_BindNew) {
      if (m_pNodeHelper->m_iCurAllStart == -1) {
        m_pNodeHelper->m_iCurAllStart = m_iCurStart;
      }
    }
    return;
  }
  if (iFoundCount == 1 && !iLen) {
    return;
  }
  CFX_WideString wsIndex;
  wsIndex = wsCondition.Mid(i, iLen - 1 - i);
  int32_t iIndex = wsIndex.GetInteger();
  if (bRelative) {
    iIndex += iCurIndex;
  }
  if (iFoundCount <= iIndex || iIndex < 0) {
    if (rnd.m_dwStyles & XFA_RESOLVENODE_CreateNode) {
      m_pNodeHelper->m_pCreateParent = ToNode(rnd.m_CurNode);
      m_pNodeHelper->m_iCreateCount = iIndex - iFoundCount + 1;
    }
    findNodes.RemoveAll();
  } else {
    CXFA_Node* ret = findNodes[iIndex];
    findNodes.RemoveAll();
    findNodes.Add(ret);
  }
}
开发者ID:andoma,项目名称:pdfium,代码行数:67,代码来源:xfa_script_resolveprocessor.cpp


注:本文中的CFX_WideString::GetInteger方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。