Basically I have a document open as hidden that I need to grab a specific paragraph from. In this case it's a piece of legislative statute with a specific section number that is being amended. I then create a paragraph enumeration and find the portion I need to import into the current document.
Code: Select all
# self.x_model is my currently opened document model
# Import all the styles from the source document
get.styles_from_doc(self.x_model, "some/file/path.odt")
# Open the source document as hidden
hidden_doc = get.hidden_document(self.x_model, "some/file/path.odt")
# ... at this point some stuff happens such that I have the variable "ins_range" which is the
# text I need to import into the current document. I also have the cursor position "ins_pos"
# of the current document where I need to insert this range.
# The following would be pseudo-code - there is no such method afaik. What should I do here?
self.x_model.insert_range(position=ins_pos, range=ins_range)