protected bool ProcessParagraphs(OfficeDocumentProcessor aWordProcessor, PubParagraphs aPubParagraphs) { foreach (PubRange aParagraphRange in aPubParagraphs) { int nCharIndex = 0; if (!ProcessRangeAsWords(aWordProcessor, aParagraphRange, nCharIndex)) { return(false); } } return(true); }
public override bool ProcessWordByWord(OfficeDocumentProcessor aWordProcessor) { if (Document.Selection.Type == Pub.PbSelectionType.pbSelectionNone) { throw new ApplicationException("Nothing selected!"); } PubRange aSelectionRange = (PubRange)SelectionRange; PubParagraphs aParagraphs = aSelectionRange.Paragraphs; if (aParagraphs.Count > 1) { return(ProcessParagraphs(aWordProcessor, aParagraphs)); } else { int nCharIndex = 0; return(aWordProcessor.Process(aSelectionRange, ref nCharIndex)); } }
protected bool ProcessParagraphs(OfficeDocumentProcessor aWordProcessor, PubParagraphs aPubParagraphs) { foreach (PubRange aParagraphRange in aPubParagraphs) { int nCharIndex = 0; if (!ProcessRangeAsWords(aWordProcessor, aParagraphRange, nCharIndex)) return false; } return true; }