Version 30 (modified by milen, 16 years ago) (diff) |
---|
Analysis
(Give as much as possible of the needed information for designing and implementing the task in the following sections.)
Overview
There should be an automatic chaining availability when text frame is used.
Task requirements
- Add a new object in the frame list for chaining: "Auto chain".
- When setting auto chaining to a text frame and it overflows, the following things should be acquired:
- If next page exist and it is empty (without any content) and not modified then the next page takes the previous page's template and logically text frame is created with the same properties as the first one (position, size, background etc.).The both frames are linked.
- If next page exist and it is not empty then a new page with the previous page's template is created after the current page and logically a text frame is created with the same properties as the first one (position, size, background etc.).The both frames are linked. All the pages after the new created one are shifted after it.
- If there is no next page, then it's created with the previous page's template and logically with a text frame with the same properties as the first one (position, size, background etc.).The both frames are linked.
- If there are some text frames(not one) on the page and the last text frame overflow then a new page with the previous page's template and logically with the same number, location, size and style of the linked text frames is created and the new created frames are linked in the same way as in the previous page and they are linked with the last one of the first page.
- When a new frame is created by overflowing of other one then the new created frame's link should automatic becomes auto chain.
- Deleting a text frame which is part of linked text frames deletes the frame and:
- If the frame is the first one in the chain, then the frame and all the text in the chain is deleted but the text is saved in Resources . The links between the others are saved as if there are pages, having only none modified pages with empty text frames, these pages are deleted without loosing the links in the chain.
- If the frame is a middle frame in the chain, then in case of no destructing the links between the frames before and after the deleted frame link them, save the links between the other frames in the new created chain and save the text.
- If the frame is the last one then the frame is deleted without destroying the chain before it and the text in the chain is saved.
- Deleting a page that contains linked text frames with other pages' frames should act in the same way as deleting a frame but including all the linked frames in the page.
- Unlinking text frames
- If the unlinked text frame is the first one in the chain, then all the text in the chain is saved in this frame. The links between the other text frames in the chain are as if there are pages, having only none modified pages with empty text frames, these pages are deleted without loosing the links in the chain.
- If the unlinked text frame is a middle one in the chain, then the text frame is divided from the chain as the text frame before it is linked to the text frame after it and the links between the other text frames in the chain and the text are preserved.
- If the text frame is the last one then it is divided from the chain without destroying the chain before it and the text in the chain is saved.
Task result
The result is code.
Implementation idea
Add auto chain in the list of chained frames:
Auto chain should always be available for a text frame.
Related
TEXT_AUTO_CHAIN_BEHAVIOUR_R0
TEXT_CHAINING_BEHAVIOUR_R0
TEXT_AUTO_CHAIN_MULTI_FLOW_R0
TEXT_CHAIN_HALOS_R0
How to demo
- Create a new book.
- Insert a frame in it.
- Choose an Auto chain for the frame.
- Overflow by writing in the frame.
Expected behavior: A new page with a frame with the same properties as the first one (position, size, background etc.) should be create and it should be linked the overflowed one.
5.Insert a new frame on the first page.
Expected behavior: The first frame with auto chain option is automatically chained to the new inserted frame and then the new inserted frame automatically changes from not chained to auto chain and links to the frame in the second page.
Design
(Describe your design here.)
Implementation
(Describe and link the implementation results here (from the wiki or the repository).)
Testing
(Place the testing results here.)
Comments
(Write comments for this or later revisions here.)
Attachments
- autochain.jpg (21.7 KB) - added by milen 16 years ago.
- TextChainHud.png (9.5 KB) - added by boyan 16 years ago.