code: @Nullable
    List<String> getAllTextParagraphs() {
      try {
        List<String> allParas = new ArrayList<>();
        if (xPCursor == null) {
          return null;
        }
        xPCursor.gotoStart(false);
        xPCursor.gotoStartOfParagraph(false);
        xPCursor.gotoEndOfParagraph(true);
        allParas.add(xPCursor.getString());
        while (xPCursor.gotoNextParagraph(false)) {
          xPCursor.gotoStartOfParagraph(false);
          xPCursor.gotoEndOfParagraph(true);
          allParas.add(xPCursor.getString());
        }
        return allParas;
      } catch (Throwable t) {
        MessageHandler.printException(t);     // all Exceptions thrown by UnoRuntime.queryInterface are caught
        return null;           // Return null as method failed
      }
    }
docs: Returns all Paragraphs of Document without footnotes etc.
  Returns null if it fails