本文整理汇总了C++中PD_Document::setMailMergeLink方法的典型用法代码示例。如果您正苦于以下问题:C++ PD_Document::setMailMergeLink方法的具体用法?C++ PD_Document::setMailMergeLink怎么用?C++ PD_Document::setMailMergeLink使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PD_Document
的用法示例。
在下文中一共展示了PD_Document::setMailMergeLink方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: openCmdLineFiles
AP_App::AP_App (HINSTANCE hInstance, const char * szAppName)
: XAP_App_BaseClass ( hInstance, szAppName )
#else
AP_App::AP_App (const char * szAppName)
: XAP_App_BaseClass ( szAppName )
#endif
{
}
AP_App::~AP_App ()
{
}
/*!
* Open windows requested on commandline.
*
* \return False if an unknown command line option was used, true
* otherwise.
*/
bool AP_App::openCmdLineFiles(const AP_Args * args)
{
int kWindowsOpened = 0;
const char *file = NULL;
if (AP_Args::m_sFiles == NULL) {
// no files to open, this is ok
XAP_Frame * pFrame = newFrame();
pFrame->loadDocument((const char *)NULL, IEFT_Unknown);
return true;
}
int i = 0;
while ((file = AP_Args::m_sFiles[i++]) != NULL) {
char * uri = NULL;
uri = UT_go_shell_arg_to_uri (file);
XAP_Frame * pFrame = newFrame();
UT_Error error = pFrame->loadDocument (uri, IEFT_Unknown, true);
g_free (uri);
if (UT_IS_IE_SUCCESS(error))
{
kWindowsOpened++;
if (error == UT_IE_TRY_RECOVER) {
pFrame->showMessageBox(AP_STRING_ID_MSG_OpenRecovered,
XAP_Dialog_MessageBox::b_O,
XAP_Dialog_MessageBox::a_OK);
}
}
else
{
// TODO we crash if we just delete this without putting something
// TODO in it, so let's go ahead and open an untitled document
// TODO for now. this would cause us to get 2 untitled documents
// TODO if the user gave us 2 bogus pathnames....
// Because of the incremental loader, we should not crash anymore;
// I've got other things to do now though.
kWindowsOpened++;
pFrame->loadDocument((const char *)NULL, IEFT_Unknown);
pFrame->raise();
errorMsgBadFile (pFrame, file, error);
}
if (args->m_sMerge) {
PD_Document * pDoc = static_cast<PD_Document*>(pFrame->getCurrentDoc());
pDoc->setMailMergeLink(args->m_sMerge);
}
}
if (kWindowsOpened == 0)
{
// no documents specified or openable, open an untitled one
XAP_Frame * pFrame = newFrame();
pFrame->loadDocument((const char *)NULL, IEFT_Unknown);
if (args->m_sMerge) {
PD_Document * pDoc = static_cast<PD_Document*>(pFrame->getCurrentDoc());
pDoc->setMailMergeLink(args->m_sMerge);
}
}
return true;
}