Esempio n. 1
0
void Document::DoFieldDelay(const CFX_WideString& sFieldName, int nControlIndex)
{
	CFX_DWordArray DelArray;
	CFX_ArrayTemplate<CJS_DelayData*> DelayDataForFieldAndControlIndex;

	for (int i=0,sz=m_DelayData.GetSize(); i<sz; i++)
	{
		if (CJS_DelayData* pData = m_DelayData.GetAt(i))
		{
			if (pData->sFieldName == sFieldName && pData->nControlIndex == nControlIndex)
			{
				DelayDataForFieldAndControlIndex.Add(pData);
				m_DelayData.SetAt(i, NULL);
				DelArray.Add(i);
			}
		}
	}

	for (int j=DelArray.GetSize()-1; j>=0; j--)
	{
		m_DelayData.RemoveAt(DelArray[j]);
	}

	for (int i=0,sz=DelayDataForFieldAndControlIndex.GetSize(); i < sz; i++)
	{
		CJS_DelayData* pData = DelayDataForFieldAndControlIndex.GetAt(i);
		Field::DoDelay(m_pDocument, pData);
		DelayDataForFieldAndControlIndex.SetAt(i,NULL);
		delete pData;
	}
}
Esempio n. 2
0
void Document::DoAnnotDelay()
{
	CFX_DWordArray DelArray;

	for (int j=DelArray.GetSize()-1; j>=0; j--)
	{
		m_DelayData.RemoveAt(DelArray[j]);
	}
}
Esempio n. 3
0
FX_BOOL IsHasCharSet(CFArrayRef languages, const CFX_DWordArray &charSets)
{
    int iCount = charSets.GetSize();
    for (int i = 0; i < CFArrayGetCount(languages); ++i) {
        CFStringRef language = (CFStringRef)CFArrayGetValueAtIndex(languages, i);
        FX_DWORD CharSet = FX_GetCharsetFromLang(CFStringGetCStringPtr(language, kCFStringEncodingMacRoman), -1);
        for (int j = 0; j < iCount; ++j) {
            if (CharSet == charSets[j]) {
                return TRUE;
            }
        }
    }
    return FALSE;
}