Automated document formatting tool
First Claim
1. A computer-readable storage medium having stored thereon computer-executable instructions which, when executed by a computer, cause the computer to:
- determine the selection of a document element having an associated formatting style, wherein the selected document element traverses a plurality of paragraphs;
determine a portion of a first paragraph corresponding to the selected document element, the first paragraph comprising a last paragraph in the plurality of traversed paragraphs;
determine whether a paragraph mark is included in the first paragraph in the selected document element;
add the paragraph mark to the selected document element in response to a determination that the entire first paragraph has been selected and that the paragraph mark has not been included in the first paragraph in the selected document element wherein determining that the entire first paragraph has been selected comprises determining that every visible character in the first paragraph has been selected for copying by a user wherein every visible character in the first paragraph being selected for copying by the user indicates that the user marks the first paragraph to be copied as a paragraph;
determine a paste point in a target document having a corresponding formatting style, wherein having the corresponding formatting style comprises having a same style name;
determine whether the corresponding formatting style belongs to a formatting style group;
determine whether a member formatting style in the formatting style group has been redefined in the target document;
paste the document element as an independent paragraph if the entire first paragraph has been selected and no selection action has been made that indicates a desire to de-select the paragraph mark;
apply an associated style to the pasted document element, wherein applying the associated style to the pasted document element comprises resolving a style conflict between the document element and the target document; and
redefine the associated style, in response to the determination that the member formatting style in the formatting style group has been redefined in the target document and that the corresponding formatting style and the associated formatting style are not identical.
1 Assignment
0 Petitions
Accused Products
Abstract
A formatting tool enables “smart” copy and paste functions. The “smart” copy and paste functions can be invoked in a context-sensitive manner, depending on the conditions under which the copy and paste functions are implemented. The present invention will automatically include in a selection a paragraph marker at the end of a selected paragraph, if every other textual character in the paragraph has been selected. The present invention will discard a paragraph mark that is included in pasted text if the pasted text is pasted into the middle of another paragraph, indicating that the user prefers the formatting of the pasted-into paragraph. The present invention also reduces inconsistencies in formatting styles that may exist between source and target documents automatically redefining a style in the target document to conform to a corresponding style in the source document. The present invention also automatically adjusts paragraph spacing, in response to text being pasted into a target document. In response to various scenarios, the present invention will determine the most likely paragraph spacing intended by the user and will apply the most probable paragraph spacing to the pasted paragraph. The present invention also automatically adjusts list, table, and spreadsheet formatting, in response to such document elements being pasted into a differently-formatted target document. Finally, the present invention provides a convenient recovery dialog that may be invoked to alter any automatically-implemented formatting decisions.
50 Citations
19 Claims
-
1. A computer-readable storage medium having stored thereon computer-executable instructions which, when executed by a computer, cause the computer to:
-
determine the selection of a document element having an associated formatting style, wherein the selected document element traverses a plurality of paragraphs; determine a portion of a first paragraph corresponding to the selected document element, the first paragraph comprising a last paragraph in the plurality of traversed paragraphs; determine whether a paragraph mark is included in the first paragraph in the selected document element; add the paragraph mark to the selected document element in response to a determination that the entire first paragraph has been selected and that the paragraph mark has not been included in the first paragraph in the selected document element wherein determining that the entire first paragraph has been selected comprises determining that every visible character in the first paragraph has been selected for copying by a user wherein every visible character in the first paragraph being selected for copying by the user indicates that the user marks the first paragraph to be copied as a paragraph; determine a paste point in a target document having a corresponding formatting style, wherein having the corresponding formatting style comprises having a same style name; determine whether the corresponding formatting style belongs to a formatting style group; determine whether a member formatting style in the formatting style group has been redefined in the target document; paste the document element as an independent paragraph if the entire first paragraph has been selected and no selection action has been made that indicates a desire to de-select the paragraph mark; apply an associated style to the pasted document element, wherein applying the associated style to the pasted document element comprises resolving a style conflict between the document element and the target document; and redefine the associated style, in response to the determination that the member formatting style in the formatting style group has been redefined in the target document and that the corresponding formatting style and the associated formatting style are not identical. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. A computer-implemented method for eliminating a paragraph mark from a document element selected from a source document, the method comprising:
-
determining the selection of the document element in the source document, the document element having an associated formatting style; determining a paste point in a target document having a corresponding formatting style, wherein having the corresponding formatting style comprises having a same style name; determining whether only one paragraph mark is included in the document element; determining whether the paste point in the target document is not at the beginning of a paragraph in the target document and not at the end of the paragraph in the target document; eliminating the paragraph mark from the document element in response to a determination that the paste point in the target document is not at the beginning of the paragraph in the target document and not at the end of the paragraph in the target document and that only one paragraph mark is included in the document element wherein a user'"'"'s desire to paste the document element as part of the paragraph in the target document is indicated by only one paragraph mark included in the document element, the paste point in the target document not at the beginning of the paragraph in the target document, and the paste point in the target document not being at the end of the paragraph in the target document; determining whether the corresponding formatting style belongs to a formatting style group; determining whether a member formatting style in the formatting style group has been used in the target document; pasting the document element as an independent paragraph if the entire first paragraph has been selected and no selection action has been made that indicates a desire to de-select the paragraph mark; and applying the associated formatting style to the pasted document element, wherein applying the associated style to the pasted document element comprises resolving a style conflict between the source document and the target document. - View Dependent Claims (8, 9, 10)
-
-
11. A computer-implemented method for eliminating empty paragraphs from a document, the method comprising:
-
determining the selection of a document element in a source document, the document element having an associated formatting style; determining a first number of preceding empty paragraphs adjacent to the document element; determining a first number of following empty paragraphs adjacent to the document element; determining a total of the first number of preceding empty paragraphs and the first number of following empty paragraphs; and eliminating the following empty paragraphs from the source document in response to a determination that the total is less than a predetermined threshold value comprising a user defined estimate corresponding to the number of empty paragraphs present in the document that indicates that the user intends to remove the user defined estimate of empty paragraphs from the document by virtue of a cutting action; determining a paste point in a target document having a corresponding formatting style, wherein having the corresponding formatting style comprises having a same style name; determining whether the corresponding formatting style belongs to a formatting style group; determining whether a member formatting style in the formatting style group has been applied, wherein determining whether the member formatting style in the formatting style group has been applied comprises determining whether the member formatting style in the formatting style group has been used in the target document; pasting the document element as an independent paragraph if the entire first paragraph has been selected and no selection action has been made that indicates a desire to de-select the paragraph mark; applying the associated style to the pasted document element, wherein applying the associated style to the pasted document element comprises resolving a style conflict between the document element and the target document; and redefining the associated formatting style, in response to the determination that the member formatting style in the formatting style group has been applied in the target document and that the corresponding formatting style and the associated formatting style are not identical. - View Dependent Claims (12, 13, 14, 15, 16, 17, 18, 19)
-
Specification