LibreOffice Module sw (master) 1
|
Classes | |
struct | TranslateAPIConfig |
Functions | |
SW_DLLPUBLIC OString | ExportPaMToHTML (SwPaM *pCursor) |
SW_DLLPUBLIC void | PasteHTMLToPaM (SwWrtShell &rWrtSh, SwPaM *pCursor, const OString &rData) |
SW_DLLPUBLIC void | TranslateDocument (SwWrtShell &rWrtSh, const TranslateAPIConfig &rConfig) |
SW_DLLPUBLIC void | TranslateDocumentCancellable (SwWrtShell &rWrtSh, const TranslateAPIConfig &rConfig, bool &rCancelTranslation) |
OString SwTranslateHelper::ExportPaMToHTML | ( | SwPaM * | pCursor | ) |
Definition at line 43 of file translatehelper.cxx.
References SvMemoryStream::GetData(), GetHTMLWriter(), SvMemoryStream::GetSize(), ErrCode::IsError(), SAL_WARN, u, and SwWriter::Write().
Referenced by TranslateDocumentCancellable().
void SwTranslateHelper::PasteHTMLToPaM | ( | SwWrtShell & | rWrtSh, |
SwPaM * | pCursor, | ||
const OString & | rData | ||
) |
Definition at line 75 of file translatehelper.cxx.
References TransferableDataHelper::GetXTransferable(), SwTransferable::IsPasteSpecial(), SwWrtShell::KillSelection(), SwTransferable::Paste(), and SwCursorShell::SetSelection().
Referenced by SwTextShell::ExecField(), SwTextShell::Execute(), SwFieldMgr::InsertField(), SwBaseShell::InsertRegionDialog(), TranslateDocumentCancellable(), and SwTextRefMark::UpdateFieldContent().
void SwTranslateHelper::TranslateDocument | ( | SwWrtShell & | rWrtSh, |
const TranslateAPIConfig & | rConfig | ||
) |
Definition at line 94 of file translatehelper.cxx.
References TranslateDocumentCancellable().
Referenced by SwTextShell::Execute().
void SwTranslateHelper::TranslateDocumentCancellable | ( | SwWrtShell & | rWrtSh, |
const TranslateAPIConfig & | rConfig, | ||
bool & | rCancelTranslation | ||
) |
Definition at line 100 of file translatehelper.cxx.
References SwNodes::Count(), SfxViewFrame::Current(), ExportPaMToHTML(), SwCursorShell::GetCursor(), SwViewShell::GetDoc(), SfxViewFrame::GetFrame(), SfxFrame::GetFrameInterface(), SwNodeIndex::GetIndex(), SwNode::GetIndex(), SwContentIndex::GetMark(), SwViewShell::GetNodes(), SwTextNode::GetText(), SwNode::GetTextNode(), SwWrtShell::HasSelection(), Task::IsActive(), Application::IsQuit(), SwNode::IsTextNode(), SwViewShell::LockView(), SwTranslateHelper::TranslateAPIConfig::m_xAPIUrl, SwTranslateHelper::TranslateAPIConfig::m_xAuthKey, SwTranslateHelper::TranslateAPIConfig::m_xTargetLanguage, min(), n, SwPosition::nContent, nCount, Writer::NewUnoCursor(), SwPosition::nNode, PasteHTMLToPaM(), SwContentIndex::SetMark(), Task::SetPriority(), Idle::Start(), SwResId(), linguistic::Translate(), xFrame, and Application::Yield().
Referenced by IMPL_LINK_NOARG(), and TranslateDocument().