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


C++ RVNGPropertyList::insert方法代码示例

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


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

示例1: fillMetadata

void IWORKCollector::fillMetadata(librevenge::RVNGPropertyList &props)
{
  if (!m_metadata.m_title.empty())
    props.insert("dc:subject", m_metadata.m_title.c_str());
  if (!m_metadata.m_author.empty())
    props.insert("meta:intial-creator", m_metadata.m_author.c_str());
  if (!m_metadata.m_keywords.empty())
    props.insert("meta:keyword", m_metadata.m_keywords.c_str());
  if (!m_metadata.m_comment.empty())
    props.insert("librevenge:comments", m_metadata.m_comment.c_str());
}
开发者ID:androidfan0,项目名称:libetonyek,代码行数:11,代码来源:IWORKCollector.cpp

示例2:

void WPSList::Level::addTo(librevenge::RVNGPropertyList &propList, int startVal) const
{
	propList.insert("text:min-label-width", m_labelWidth);
	propList.insert("text:space-before", m_labelIndent);
	switch (m_type)
	{
	case libwps::BULLET:
		if (m_bullet.len())
			propList.insert("text:bullet-char", m_bullet.cstr());
		else
		{
			WPS_DEBUG_MSG(("WPSList::Level::addTo: the bullet char is not defined\n"));
			propList.insert("text:bullet-char", "*");
		}
		break;
	case libwps::ARABIC:
	case libwps::LOWERCASE:
	case libwps::UPPERCASE:
	case libwps::LOWERCASE_ROMAN:
	case libwps::UPPERCASE_ROMAN:
		if (m_prefix.len()) propList.insert("style:num-prefix",m_prefix);
		if (m_suffix.len()) propList.insert("style:num-suffix", m_suffix);
		propList.insert("style:num-format", libwps::numberingTypeToString(m_type).c_str());
		propList.insert("text:start-value", startVal);
		break;
	case libwps::NONE:
		break;
	default:
		WPS_DEBUG_MSG(("WPSList::Level::addTo: the level type is not set\n"));
	}

	m_sendToInterface = true;
}
开发者ID:Distrotech,项目名称:libwps,代码行数:33,代码来源:WPSList.cpp

示例3: getPageProperty

void WPSPageSpan::getPageProperty(librevenge::RVNGPropertyList &propList) const
{
	propList.insert("librevenge:num-pages", getPageSpan());

	propList.insert("fo:page-height", getFormLength());
	propList.insert("fo:page-width", getFormWidth());
	if (getFormOrientation() == WPSPageSpan::LANDSCAPE)
		propList.insert("style:print-orientation", "landscape");
	else
		propList.insert("style:print-orientation", "portrait");
	propList.insert("fo:margin-left", getMarginLeft());
	propList.insert("fo:margin-right", getMarginRight());
	propList.insert("fo:margin-top", getMarginTop());
	propList.insert("fo:margin-bottom", getMarginBottom());
}
开发者ID:Distrotech,项目名称:libwps,代码行数:15,代码来源:WPSPageSpan.cpp

示例4: addLevelTo

void WPSList::addLevelTo(int level, librevenge::RVNGPropertyList &propList) const
{
	if (level <= 0 || level > int(m_levels.size()) ||
	        m_levels[size_t(level-1)].isDefault())
	{
		WPS_DEBUG_MSG(("WPSList::addLevelTo: level %d is not defined\n",level));
		return;
	}

	if (m_id==-1)
	{
		WPS_DEBUG_MSG(("WPSList::addLevelTo: the list id is not set\n"));
		static int falseId = 1000;
		m_id = falseId++;
	}
	propList.insert("librevenge:list-id", m_id);
	propList.insert("librevenge:level", level);
	m_levels[size_t(level-1)].addTo(propList,m_actualIndices[size_t(level-1)]);
}
开发者ID:Distrotech,项目名称:libwps,代码行数:19,代码来源:WPSList.cpp

示例5: writeProperties

void IWORKLanguageManager::writeProperties(const std::string &tag, librevenge::RVNGPropertyList &props) const
{
#ifdef WITH_LIBLANGTAG
  const unordered_map<string, RVNGPropertyList>::const_iterator it = m_propsMap.find(tag);
  if (it == m_propsMap.end())
  {
    ETONYEK_DEBUG_MSG(("IWORKLanguageManager::writeProperties: unknown tag %s\n", tag.c_str()));
    return;
  }
  for (RVNGPropertyList::Iter iter(it->second); !iter.last(); iter.next())
    props.insert(iter.key(), iter()->getStr());
#else
  (void) tag;
  (void) props;
#endif
}
开发者ID:LibreOffice,项目名称:libetonyek,代码行数:16,代码来源:IWORKLanguageManager.cpp

示例6: addTo

void WPSFont::addTo(librevenge::RVNGPropertyList &propList) const
{
	double fontSizeChange = 1.0;
	switch (m_attributes& 0x0000001f)
	{
	case 0x01:  // Extra large
		fontSizeChange = 2.0;
		break;
	case 0x02: // Very large
		fontSizeChange = 1.5;
		break;
	case 0x04: // Large
		fontSizeChange = 1.2;
		break;
	case 0x08: // Small print
		fontSizeChange = 0.8;
		break;
	case 0x10: // Fine print
		fontSizeChange = 0.6;
		break;
	default: // Normal
		fontSizeChange = 1.0;
		break;
	}

	if (m_attributes & WPS_SUPERSCRIPT_BIT)
		propList.insert("style:text-position", "super 58%");
	else if (m_attributes & WPS_SUBSCRIPT_BIT)
		propList.insert("style:text-position", "sub 58%");
	if (m_attributes & WPS_ITALICS_BIT)
		propList.insert("fo:font-style", "italic");
	if (m_attributes & WPS_BOLD_BIT)
		propList.insert("fo:font-weight", "bold");
	if (m_attributes & WPS_STRIKEOUT_BIT)
		propList.insert("style:text-line-through-type", "single");
	if (m_attributes & WPS_DOUBLE_UNDERLINE_BIT)
		propList.insert("style:text-underline-type", "double");
	else if (m_attributes & WPS_UNDERLINE_BIT)
		propList.insert("style:text-underline-type", "single");
	if (m_attributes & WPS_OVERLINE_BIT)
		propList.insert("style:text-overline-type", "single");
	if (m_attributes & WPS_OUTLINE_BIT)
		propList.insert("style:text-outline", "true");
	if (m_attributes & WPS_SMALL_CAPS_BIT)
		propList.insert("fo:font-variant", "small-caps");
	if (m_attributes & WPS_BLINK_BIT)
		propList.insert("style:text-blinking", "true");
	if (m_attributes & WPS_SHADOW_BIT)
		propList.insert("fo:text-shadow", "1pt 1pt");
	if (m_attributes & WPS_HIDDEN_BIT)
		propList.insert("text:display", "none");
	if (m_attributes & WPS_ALL_CAPS_BIT)
		propList.insert("fo:text-transform", "uppercase");
	if (m_attributes & WPS_EMBOSS_BIT)
		propList.insert("style:font-relief", "embossed");
	else if (m_attributes & WPS_ENGRAVE_BIT)
		propList.insert("style:font-relief", "engraved");

	if (!m_name.empty())
		propList.insert("style:font-name", m_name);
	if (m_size>0)
		propList.insert("fo:font-size", fontSizeChange*m_size, librevenge::RVNG_POINT);
	if (m_spacing < 0 || m_spacing > 0)
		propList.insert("fo:letter-spacing", m_spacing, librevenge::RVNG_POINT);

	propList.insert("fo:color", m_color.str().c_str());

	if (m_languageId < 0)
		libwps_tools_win::Language::addLocaleName(0x409, propList);
	if (m_languageId > 0)
		libwps_tools_win::Language::addLocaleName(m_languageId, propList);
}
开发者ID:Distrotech,项目名称:libwps,代码行数:72,代码来源:WPSFont.cpp

示例7: if

void libcdr::CDRContentCollector::_lineProperties(librevenge::RVNGPropertyList &propList)
{
  if (m_currentLineStyle.lineType == (unsigned short)-1)
  {
    propList.insert("draw:stroke", "solid");
    propList.insert("svg:stroke-width", 0.0);
    propList.insert("svg:stroke-color", "#000000");
  }
  else
  {
    if (m_currentLineStyle.lineType & 0x1)
      propList.insert("draw:stroke", "none");
    else if (m_currentLineStyle.lineType & 0x6)
    {
      if (m_currentLineStyle.dashArray.size() && (m_currentLineStyle.lineType & 0x4))
        propList.insert("draw:stroke", "dash");
      else
        propList.insert("draw:stroke", "solid");
      double scale = 1.0;
      if (m_currentLineStyle.lineType & 0x20) // scale line with image
      {
        scale = m_currentTransforms.getScaleX();
        double scaleY = m_currentTransforms.getScaleY();
        if (scaleY > scale)
          scale = scaleY;
      }
      scale *= m_currentLineStyle.stretch;
      propList.insert("svg:stroke-width", m_currentLineStyle.lineWidth * scale);
      propList.insert("svg:stroke-color", m_ps.getRGBColorString(m_currentLineStyle.color));

      switch (m_currentLineStyle.capsType)
      {
      case 1:
        propList.insert("svg:stroke-linecap", "round");
        break;
      case 2:
        propList.insert("svg:stroke-linecap", "square");
        break;
      default:
        propList.insert("svg:stroke-linecap", "butt");
      }

      switch (m_currentLineStyle.joinType)
      {
      case 1:
        propList.insert("svg:stroke-linejoin", "round");
        break;
      case 2:
        propList.insert("svg:stroke-linejoin", "bevel");
        break;
      default:
        propList.insert("svg:stroke-linejoin", "miter");
      }

      if (m_currentLineStyle.dashArray.size())
      {
        int dots1 = 0;
        int dots2 = 0;
        unsigned dots1len = 0;
        unsigned dots2len = 0;
        unsigned gap = 0;

        if (m_currentLineStyle.dashArray.size() >= 2)
        {
          dots1len = m_currentLineStyle.dashArray[0];
          gap = m_currentLineStyle.dashArray[1];
        }

        unsigned long count = m_currentLineStyle.dashArray.size() / 2;
        unsigned i = 0;
        for (; i < count;)
        {
          if (dots1len == m_currentLineStyle.dashArray[2*i])
            dots1++;
          else
            break;
          gap = gap < m_currentLineStyle.dashArray[2*i+1] ?  m_currentLineStyle.dashArray[2*i+1] : gap;
          i++;
        }
        if (i < count)
        {
          dots2len = m_currentLineStyle.dashArray[2*i];
          gap = gap < m_currentLineStyle.dashArray[2*i+1] ? m_currentLineStyle.dashArray[2*i+1] : gap;
        }
        for (; i < count;)
        {
          if (dots2len == m_currentLineStyle.dashArray[2*i])
            dots2++;
          else
            break;
          gap = gap < m_currentLineStyle.dashArray[2*i+1] ? m_currentLineStyle.dashArray[2*i+1] : gap;
          i++;
        }
        if (!dots2)
        {
          dots2 = dots1;
          dots2len = dots1len;
        }
        propList.insert("draw:dots1", dots1);
        propList.insert("draw:dots1-length", 72.0*(m_currentLineStyle.lineWidth * scale)*dots1len, librevenge::RVNG_POINT);
//.........这里部分代码省略.........
开发者ID:olear,项目名称:libcdr,代码行数:101,代码来源:CDRContentCollector.cpp


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