本文整理汇总了C++中FL_DocLayout::isQuickPrint方法的典型用法代码示例。如果您正苦于以下问题:C++ FL_DocLayout::isQuickPrint方法的具体用法?C++ FL_DocLayout::isQuickPrint怎么用?C++ FL_DocLayout::isQuickPrint使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FL_DocLayout
的用法示例。
在下文中一共展示了FL_DocLayout::isQuickPrint方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: _lookupProperties
void fp_EmbedRun::_lookupProperties(const PP_AttrProp * pSpanAP,
const PP_AttrProp * /*pBlockAP*/,
const PP_AttrProp * /*pSectionAP*/,
GR_Graphics * pG)
{
UT_return_if_fail(pSpanAP != NULL);
UT_DEBUGMSG(("fp_EmbedRun _lookupProperties span %p \n",pSpanAP));
m_pSpanAP = pSpanAP;
m_bNeedsSnapshot = true;
pSpanAP->getAttribute("dataid", m_pszDataID);
const gchar * pszEmbedType = NULL;
pSpanAP->getProperty("embed-type", pszEmbedType);
UT_ASSERT(pszEmbedType);
UT_DEBUGMSG(("Embed Type %s \n",pszEmbedType));
bool bFontChanged = false;
// Load this into EmbedView
// LUCA: chunk of code moved up here from the bottom of the method
// 'cause we need to retrieve the font-size
const PP_AttrProp * pBlockAP = NULL;
const PP_AttrProp * pSectionAP = NULL;
FL_DocLayout * pLayout = getBlock()->getDocLayout();
if(pG == NULL && pLayout->isQuickPrint() )
{
pG = getGraphics();
if((m_iEmbedUID >= 0) && getEmbedManager())
{
getEmbedManager()->releaseEmbedView(m_iEmbedUID);
m_iEmbedUID = -1;
}
m_iEmbedUID = -1;
}
getBlockAP(pBlockAP);
const GR_Font * pFont = pLayout->findFont(pSpanAP,pBlockAP,pSectionAP,pG);
if(pLayout->isQuickPrint() && pG->queryProperties(GR_Graphics::DGP_PAPER))
{
if(m_iEmbedUID >= 0 )
{
getEmbedManager()->releaseEmbedView(m_iEmbedUID);
m_iEmbedUID = -1;
}
m_iEmbedUID = - 1;
m_pEmbedManager = m_pDocLayout->getQuickPrintEmbedManager(pszEmbedType);
}
else
{
m_pEmbedManager = m_pDocLayout->getEmbedManager(pszEmbedType);
}
if (pFont != _getFont())
{
_setFont(pFont);
bFontChanged = true;
}
if(pG == NULL)
pG = getGraphics();
m_iPointHeight = pG->getFontAscent(pFont) + pG->getFontDescent(pFont);
const char* pszSize = PP_evalProperty("font-size",pSpanAP,pBlockAP,pSectionAP,
getBlock()->getDocument(), true);
// LUCA: It is fundamental to do this before the EmbedView object
// gets destroyed to avoid resuscitating it
UT_sint32 iWidth,iAscent,iDescent=0;
if(m_iEmbedUID < 0)
{
PD_Document * pDoc = getBlock()->getDocument();
m_iEmbedUID = getEmbedManager()->makeEmbedView(pDoc,m_iIndexAP,m_pszDataID);
UT_DEBUGMSG((" EmbedRun %p UID is %d \n",this,m_iEmbedUID));
getEmbedManager()->initializeEmbedView(m_iEmbedUID);
getEmbedManager()->setRun (m_iEmbedUID, this);
getEmbedManager()->loadEmbedData(m_iEmbedUID);
}
getEmbedManager()->setDefaultFontSize(m_iEmbedUID,atoi(pszSize));
if (bFontChanged)
bFontChanged = getEmbedManager()->setFont(m_iEmbedUID,pFont);
if(getEmbedManager()->isDefault())
{
iWidth = _getLayoutPropFromObject("width");
iAscent = _getLayoutPropFromObject("ascent");
iDescent = _getLayoutPropFromObject("descent");
}
else
{
const char * pszHeight = NULL;
bool bFoundHeight = pSpanAP->getProperty("height", pszHeight) && !bFontChanged;
const char * pszWidth = NULL;
bool bFoundWidth = pSpanAP->getProperty("width", pszWidth) && !bFontChanged;
const char * pszAscent = NULL;
bool bFoundAscent = pSpanAP->getProperty("ascent", pszAscent);
if(!bFoundWidth || pszWidth == NULL)
{
iWidth = getEmbedManager()->getWidth(m_iEmbedUID);
}
else
//.........这里部分代码省略.........