本文整理汇总了C++中librevenge::RVNGPropertyList类的典型用法代码示例。如果您正苦于以下问题:C++ RVNGPropertyList类的具体用法?C++ RVNGPropertyList怎么用?C++ RVNGPropertyList使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了RVNGPropertyList类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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());
}
示例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;
}
示例3: defineEmbeddedFont
void RVNGRawDrawingGenerator::defineEmbeddedFont(const librevenge::RVNGPropertyList &propList)
{
if (m_impl->m_printCallgraphScore)
return;
m_impl->iprintf("defineEmbeddedFont(%s)\n", propList.getPropString().cstr());
}
示例4: insertField
void RVNGRawDrawingGenerator::insertField(const librevenge::RVNGPropertyList &propList)
{
if (m_impl->m_printCallgraphScore)
return;
m_impl->iprintf("insertField(%s)\n", propList.getPropString().cstr());
}
示例5: drawConnector
void RVNGRawTextGenerator::drawConnector(const librevenge::RVNGPropertyList &propList)
{
if (m_impl->m_printCallgraphScore)
return;
m_impl->iprintf("drawConnector(%s)\n", propList.getPropString().cstr());
}
示例6: setDocumentMetaData
void RVNGRawDrawingGenerator::setDocumentMetaData(const librevenge::RVNGPropertyList &propList)
{
if (m_impl->m_printCallgraphScore)
return;
m_impl->iprintf("setDocumentMetaData(%s)\n", propList.getPropString().cstr());
}
示例7: 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());
}
示例8: 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)]);
}
示例9: 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
}
示例10: UT_DEBUGMSG
void IE_Imp_WordPerfect::openTable(const librevenge::RVNGPropertyList &propList)
{
if (m_bHdrFtrOpenCount) return; // HACK
// TODO: handle 'marginLeftOffset' and 'marginRightOffset'
UT_DEBUGMSG(("AbiWordPerfect: openTable\n"));
UT_String propBuffer;
if (propList["table:align"])
{
// no need to support left: default behaviour
//if (strcmp(propList["table:align"]->getStr().cstr(), "right"))
// abiword does not support this I think
//if (strcmp(propList["table:align"]->getStr().cstr(), "center"))
// abiword does not support this I think
//if (strcmp(propList["table:align"]->getStr().cstr(), "margins"))
// abiword does not support this I think
if (strcmp(propList["table:align"]->getStr().cstr(), "margins"))
{
if (propList["fo:margin-left"])
UT_String_sprintf(propBuffer, "table-column-leftpos:%s; ", propList["fo:margin-left"]->getStr().cstr());
}
}
const librevenge::RVNGPropertyListVector *columns = propList.child("librevenge:table-columns");
if (columns)
{
propBuffer += "table-column-props:";
librevenge::RVNGPropertyListVector::Iter i(*columns);
for (i.rewind(); i.next();)
{
UT_String tmpBuffer;
if (i()["style:column-width"])
UT_String_sprintf(tmpBuffer, "%s/", i()["style:column-width"]->getStr().cstr());
propBuffer += tmpBuffer;
}
}
const PP_PropertyVector propsArray = {
"props", propBuffer.c_str()
};
X_CheckDocumentError(appendStrux(PTX_SectionTable, propsArray));
}
示例11: openUnorderedListLevel
void RVNGRawDrawingGenerator::openUnorderedListLevel(const librevenge::RVNGPropertyList &propList)
{
RVNG_CALLGRAPH_ENTER(("openUnorderedListLevel(%s)\n", propList.getPropString().cstr()), CALLBACK_OPEN_UNORDERED_LIST_LEVEL);
}
示例12: 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);
}
示例13: openChartSeries
void RVNGRawPresentationGenerator::openChartSeries(const librevenge::RVNGPropertyList &propList)
{
RVNG_CALLGRAPH_ENTER(("openChartSeries(%s)\n", propList.getPropString().cstr()),
CALLBACK_OPEN_CHART_SERIE);
}
示例14: 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);
//.........这里部分代码省略.........
示例15: switch
void libcdr::CDRContentCollector::_fillProperties(librevenge::RVNGPropertyList &propList)
{
if (m_fillOpacity < 1.0)
propList.insert("draw:opacity", m_fillOpacity, librevenge::RVNG_PERCENT);
if (m_currentFillStyle.fillType == 0)
propList.insert("draw:fill", "none");
else
{
if (m_currentFillStyle.fillType == (unsigned short)-1)
propList.insert("draw:fill", "none");
else
{
switch (m_currentFillStyle.fillType)
{
case 1: // Solid
propList.insert("draw:fill", "solid");
propList.insert("draw:fill-color", m_ps.getRGBColorString(m_currentFillStyle.color1));
propList.insert("svg:fill-rule", "evenodd");
break;
case 2: // Gradient
if (m_currentFillStyle.gradient.m_stops.empty())
propList.insert("draw:fill", "none");
else if (m_currentFillStyle.gradient.m_stops.size() == 1)
{
propList.insert("draw:fill", "solid");
propList.insert("draw:fill-color", m_ps.getRGBColorString(m_currentFillStyle.gradient.m_stops[0].m_color));
propList.insert("svg:fill-rule", "evenodd");
}
else if (m_currentFillStyle.gradient.m_stops.size() == 2)
{
double angle = m_currentFillStyle.gradient.m_angle * 180 / M_PI;
while (angle < 0.0)
angle += 360.0;
while (angle > 360.0)
angle -= 360.0;
propList.insert("draw:fill", "gradient");
propList.insert("draw:start-color", m_ps.getRGBColorString(m_currentFillStyle.gradient.m_stops[0].m_color));
propList.insert("draw:end-color", m_ps.getRGBColorString(m_currentFillStyle.gradient.m_stops[1].m_color));
propList.insert("draw:angle", (int)angle);
switch (m_currentFillStyle.gradient.m_type)
{
case 1: // linear
case 3: // conical
propList.insert("draw:style", "linear");
angle += 90.0;
while (angle < 0.0)
angle += 360.0;
while (angle > 360.0)
angle -= 360.0;
propList.insert("draw:angle", (int)angle);
propList.insert("draw:border", (double)(m_currentFillStyle.gradient.m_edgeOffset)/100.0, librevenge::RVNG_PERCENT);
break;
case 2: // radial
propList.insert("draw:border", (2.0 * (double)(m_currentFillStyle.gradient.m_edgeOffset)/100.0), librevenge::RVNG_PERCENT);
propList.insert("draw:style", "radial");
propList.insert("svg:cx", (double)(0.5 + m_currentFillStyle.gradient.m_centerXOffset/200.0), librevenge::RVNG_PERCENT);
propList.insert("svg:cy", (double)(0.5 + m_currentFillStyle.gradient.m_centerXOffset/200.0), librevenge::RVNG_PERCENT);
break;
case 4: // square
propList.insert("draw:border", (2.0 * (double)(m_currentFillStyle.gradient.m_edgeOffset)/100.0), librevenge::RVNG_PERCENT);
propList.insert("draw:style", "square");
propList.insert("svg:cx", (double)(0.5 + m_currentFillStyle.gradient.m_centerXOffset/200.0), librevenge::RVNG_PERCENT);
propList.insert("svg:cy", (double)(0.5 + m_currentFillStyle.gradient.m_centerXOffset/200.0), librevenge::RVNG_PERCENT);
break;
default:
propList.insert("draw:style", "linear");
angle += 90.0;
while (angle < 0.0)
angle += 360.0;
while (angle > 360.0)
angle -= 360.0;
propList.insert("draw:angle", (int)angle);
librevenge::RVNGPropertyListVector vec;
for (unsigned i = 0; i < m_currentFillStyle.gradient.m_stops.size(); i++)
{
libcdr::CDRGradientStop &gradStop = m_currentFillStyle.gradient.m_stops[i];
librevenge::RVNGPropertyList stopElement;
stopElement.insert("svg:offset", gradStop.m_offset, librevenge::RVNG_PERCENT);
stopElement.insert("svg:stop-color", m_ps.getRGBColorString(gradStop.m_color));
stopElement.insert("svg:stop-opacity", m_fillOpacity, librevenge::RVNG_PERCENT);
vec.append(stopElement);
}
propList.insert("svg:linearGradient", vec);
break;
}
}
else // output svg gradient as a hail mary pass towards ODG that does not really support it
{
propList.insert("draw:fill", "gradient");
propList.insert("draw:style", "linear");
double angle = m_currentFillStyle.gradient.m_angle * 180 / M_PI;
angle += 90.0;
while (angle < 0.0)
angle += 360.0;
while (angle > 360.0)
angle -= 360.0;
propList.insert("draw:angle", (int)angle);
librevenge::RVNGPropertyListVector vec;
for (unsigned i = 0; i < m_currentFillStyle.gradient.m_stops.size(); i++)
{
//.........这里部分代码省略.........