#include <AbiCommand.h>
AbiCommand::AbiCommand | ( | void | ) |
AbiCommand::AbiCommand | ( | bool | bAbiCollab | ) |
AbiCommand::~AbiCommand | ( | void | ) |
References deleteCurrentDoc(), DELETEP, and m_pCurFile.
void AbiCommand::clearTokenVector | ( | UT_GenericVector< const UT_UTF8String * > & | vecToks | ) |
clear the token vector pointed to by pvecToks
References UT_GenericVector< T >::clear(), UT_GenericVector< T >::getItemCount(), and UT_GenericVector< T >::getNthItem().
Referenced by doCommands().
void AbiCommand::deleteCurrentDoc | ( | void | ) |
References DELETEP, XAP_App::forgetFrame(), m_pApp, m_pCurDoc, m_pCurFrame, m_pCurView, m_pG, m_pLayout, and UNREFP.
Referenced by replaceDocument(), and ~AbiCommand().
bool AbiCommand::deleteText | ( | const UT_GenericVector< const UT_UTF8String * > * | pToks | ) |
References UT_GenericVector< T >::getItemCount(), UT_GenericVector< T >::getNthItem(), m_pCurView, and UT_UTF8String::utf8_str().
Referenced by parseTokens().
void AbiCommand::doCommands | ( | void | ) |
References clearTokenVector(), FREEP, UT_GenericVector< T >::getItemCount(), UT_GenericVector< T >::getNthItem(), m_bRunAsServer, m_sErrorFile, parseTokens(), printf, s, tokenizeString(), and UT_UTF8String::utf8_str().
Referenced by AbiCommand_invoke().
PD_Document * AbiCommand::getCurrentDocument | ( | void | ) |
Return a pointer to the current document
References m_pCurDoc.
PD_DocumentRDFHandle AbiCommand::getRDF | ( | ) | const [private] |
References PD_Document::getDocumentRDF(), and m_pCurDoc.
Referenced by getRDFModel(), and parseTokens().
PD_RDFModelHandle AbiCommand::getRDFModel | ( | ) | const [private] |
References getRDF(), and m_rdf_context_model.
Referenced by parseTokens().
FV_View * AbiCommand::getView | ( | ) | const [private] |
References m_pCurView.
Referenced by parseTokens().
bool AbiCommand::insertText | ( | const UT_GenericVector< const UT_UTF8String * > * | pToks | ) |
References FREEP, UT_GenericVector< T >::getItemCount(), UT_GenericVector< T >::getNthItem(), m_pCurView, UT_UTF8String::size(), text, UT_calloc(), UT_UCS4_strcpy_char(), and UT_UTF8String::utf8_str().
Referenced by parseTokens().
bool AbiCommand::invoke | ( | const char * | pszCommand | ) |
References EV_EditMethodContainer::findEditMethodByName(), EV_EditMethod::Fn(), XAP_App::getEditMethodContainer(), m_pApp, and m_pCurView.
Referenced by viewDoc().
bool AbiCommand::loadDocument | ( | UT_UTF8String & | sPathToDoc | ) |
Load the document identified by the path sPathToDoc into Abiword
References UT_UTF8String::assign(), abicollab::service::error(), m_pCurFile, printf, PD_Document::readFromFile(), replaceDocument(), UNREFP, UT_OK, and UT_UTF8String::utf8_str().
bool AbiCommand::movePoint | ( | const UT_GenericVector< const UT_UTF8String * > * | pToks | ) |
References UT_GenericVector< T >::getNthItem(), m_pCurView, UT_DEBUGMSG, and UT_UTF8String::utf8_str().
Referenced by parseTokens().
bool AbiCommand::newDocument | ( | void | ) |
Create a new Document
References UT_UTF8String::assign(), abicollab::service::error(), m_pCurFile, PD_Document::newDocument(), printf, replaceDocument(), UNREFP, and UT_OK.
void AbiCommand::nullUpdate | ( | void | ) |
References m_bViewDoc.
Referenced by viewDoc().
UT_sint32 AbiCommand::parseTokens | ( | UT_GenericVector< const UT_UTF8String * > * | pToks | ) |
References UT_UTF8String::assign(), AV_View::cmdCopy(), FV_View::cmdDeleteXMLID(), FV_View::cmdInsertXMLID(), AV_View::cmdPaste(), AV_View::cmdUnselectSelection(), AP_Convert::convertTo(), deleteText(), abicollab::service::error(), ev_EditMethod_exists(), ev_EditMethod_invoke(), extension, IE_Exp::fileTypeForSuffix(), FREEP, UT_GenericVector< T >::getItemCount(), PD_Document::getLastOpenedType(), UT_GenericVector< T >::getNthItem(), AV_View::getPoint(), getRDF(), getRDFModel(), getView(), in, insertText(), isTrue(), loadRDFXML(), m_bRunAsServer, m_iPID, m_pApp, m_pCurDoc, m_pCurFile, m_pCurView, m_rdf_context_model, m_rdf_mutation, m_rdf_xmlids, m_sErrorFile, AP_UnixApp::makePngPreview(), movePoint(), PD_Document::newDocument(), printf, printFiles(), PD_Document::readFromFile(), replaceAll(), replaceDocument(), replaceNext(), RES_TO_STATUS, RETURN_UT_ERROR_OK, s, UT_UTF8String::size(), starts_with(), streamToString(), toRDFXML(), PD_RDFStatement::toString(), UNREFP, UT_calloc(), UT_OK, UT_UCS4_strcpy_char(), UT_UTF8String::utf8_str(), v, and viewDoc().
Referenced by doCommands().
bool AbiCommand::printFiles | ( | const UT_GenericVector< const UT_UTF8String * > * | pToks | ) |
References XAP_Frame::getDialogFactory(), UT_GenericVector< T >::getItemCount(), UT_GenericVector< T >::getNthItem(), XAP_Dialog_Print::getPrinterGraphicsContext(), m_pCurDoc, m_pCurFrame, XAP_Dialog_Print::PrintDirectly(), XAP_DialogFactory::releaseDialog(), XAP_Dialog_Print::releasePrinterGraphicsContext(), XAP_DialogFactory::requestDialog(), XAP_Dialog_Print::setPreview(), UT_return_val_if_fail, UT_UTF8String::utf8_str(), and XAP_DIALOG_ID_PRINT.
Referenced by parseTokens().
bool AbiCommand::removeGraphicalView | ( | void | ) |
bool AbiCommand::replaceAll | ( | const UT_GenericVector< const UT_UTF8String * > * | pToks | ) |
References FREEP, UT_GenericVector< T >::getNthItem(), m_pCurView, UT_UTF8String::size(), UT_calloc(), UT_UCS4_strcpy_char(), and UT_UTF8String::utf8_str().
Referenced by parseTokens().
bool AbiCommand::replaceDocument | ( | PD_Document * | pDoc | ) |
References deleteCurrentDoc(), extension, FL_DocLayout::fillLayouts(), m_pApp, m_pCurDoc, m_pCurFrame, m_pCurView, m_pG, m_pLayout, XAP_App::newGraphics(), XAP_Frame::setAutoSaveFileExt(), XAP_Frame::setDoc(), XAP_Frame::setView(), and UT_UTF8String::utf8_str().
Referenced by loadDocument(), newDocument(), and parseTokens().
bool AbiCommand::replaceNext | ( | const UT_GenericVector< const UT_UTF8String * > * | pToks | ) |
References FREEP, UT_GenericVector< T >::getNthItem(), m_pCurView, UT_UTF8String::size(), UT_calloc(), UT_UCS4_strcpy_char(), and UT_UTF8String::utf8_str().
Referenced by parseTokens().
bool AbiCommand::tokenizeString | ( | UT_GenericVector< const UT_UTF8String * > & | tok, | |
char * | pStr | |||
) |
Break the string into tokens. Handles quotes and double quotes. char * pStr String from readline UT_GenericVector<const UT_UTF8String*> & reference to the vector we'll fill with UT_UTF8String * pointers.
References UT_GenericVector< T >::addItem(), line(), and starts_with().
Referenced by doCommands().
bool AbiCommand::viewDoc | ( | void | ) |
References XAP_Frame::getViewNumber(), invoke(), m_bViewDoc, m_pCurFrame, and nullUpdate().
Referenced by parseTokens().
bool AbiCommand::m_bRunAsAbiCollab [private] |
bool AbiCommand::m_bRunAsServer [private] |
Referenced by doCommands(), and parseTokens().
bool AbiCommand::m_bViewDoc [private] |
Referenced by nullUpdate(), and viewDoc().
UT_uint32 AbiCommand::m_iPID [private] |
Referenced by parseTokens().
XAP_App* AbiCommand::m_pApp [private] |
Referenced by AbiCommand(), deleteCurrentDoc(), invoke(), parseTokens(), and replaceDocument().
PD_Document* AbiCommand::m_pCurDoc [private] |
Referenced by deleteCurrentDoc(), getCurrentDocument(), getRDF(), parseTokens(), printFiles(), and replaceDocument().
UT_UTF8String* AbiCommand::m_pCurFile [private] |
Referenced by loadDocument(), newDocument(), parseTokens(), and ~AbiCommand().
AP_UnixFrame* AbiCommand::m_pCurFrame [private] |
Referenced by deleteCurrentDoc(), printFiles(), replaceDocument(), and viewDoc().
AV_View* AbiCommand::m_pCurView [private] |
Referenced by deleteCurrentDoc(), deleteText(), getView(), insertText(), invoke(), movePoint(), parseTokens(), replaceAll(), replaceDocument(), and replaceNext().
CairoNull_Graphics* AbiCommand::m_pG [private] |
Referenced by deleteCurrentDoc(), and replaceDocument().
FL_DocLayout* AbiCommand::m_pLayout [private] |
Referenced by deleteCurrentDoc(), and replaceDocument().
Referenced by getRDFModel(), and parseTokens().
Referenced by parseTokens().
std::set< std::string > AbiCommand::m_rdf_xmlids [private] |
Referenced by parseTokens().
UT_UTF8String AbiCommand::m_sErrorFile [private] |
Referenced by doCommands(), and parseTokens().