[go: up one dir, main page]

CN112560417A - Table editing method and device, computer equipment and storage medium - Google Patents

Table editing method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN112560417A
CN112560417A CN202011547819.1A CN202011547819A CN112560417A CN 112560417 A CN112560417 A CN 112560417A CN 202011547819 A CN202011547819 A CN 202011547819A CN 112560417 A CN112560417 A CN 112560417A
Authority
CN
China
Prior art keywords
editing
cell
primitive
receiving
user instruction
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011547819.1A
Other languages
Chinese (zh)
Inventor
王家英
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wanxing Technology Group Co ltd
Original Assignee
Wanxing Technology Group Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wanxing Technology Group Co ltd filed Critical Wanxing Technology Group Co ltd
Priority to CN202011547819.1A priority Critical patent/CN112560417A/en
Publication of CN112560417A publication Critical patent/CN112560417A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/177Editing, e.g. inserting or deleting of tables; using ruled lines
    • G06F40/18Editing, e.g. inserting or deleting of tables; using ruled lines of spreadsheets

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Document Processing Apparatus (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The embodiment of the invention discloses a table editing method, a table editing device, computer equipment and a storage medium. The method includes identifying a table within a page; associating the primitive object to the table to construct a table object; and receiving a user instruction to edit the table object, and automatically adjusting the primitive object in a linkage manner during editing. The embodiment of the invention has the advantages of being convenient for editing the table by identifying and acquiring the table objects in the page, editing the table objects and adjusting the graphic element objects in a linkage manner.

Description

Table editing method and device, computer equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of table processing, in particular to a table editing method and device, computer equipment and a storage medium.
Background
In the related technology, due to the characteristics of the fixed format document, a table in the document is not easy to edit, and although a plurality of fixed format editing software in the industry can edit the table in a document page, the fixed format editing software only can meet simple editing requirements in most cases, and when some complex editing requirements are met, the operation is not easy, for example, one cell needs to be adjusted, a plurality of related basic primitives needs to be adjusted, so that the table editing process is very inconvenient.
Disclosure of Invention
Embodiments of the present invention provide a table editing method, apparatus, computer device, and storage medium, and aim to solve the problem that in the prior art, it is very inconvenient to edit a table in a page of a fixed-format document.
In a first aspect, an embodiment of the present invention provides a table editing method, including:
identifying a table within a page;
associating the primitive object to the table to construct a table object;
and receiving a user instruction to edit the table object, and automatically adjusting the primitive object in a linkage manner during editing.
In a second aspect, an embodiment of the present invention provides a table editing apparatus, including:
an identifying unit for identifying a table within a page;
the association unit is used for associating the primitive object into the table to construct a table object;
and the editing unit is used for receiving a user instruction to edit the table object and automatically adjusting the primitive object in a linkage manner during editing.
In a third aspect, an embodiment of the present invention further provides a computer device, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and when the processor executes the computer program, the form editing method according to the first aspect is implemented.
In a fourth aspect, the present invention further provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and the computer program, when executed by a processor, causes the processor to execute the table editing method according to the first aspect.
The embodiment of the invention discloses a table editing method, a table editing device, computer equipment and a storage medium. The method includes identifying a table within a page; associating the primitive object to the table to construct a table object; and receiving a user instruction to edit the table object, and automatically adjusting the primitive object in a linkage manner during editing. The embodiment of the invention has the advantages of being convenient for editing the table by identifying and acquiring the table objects in the page, editing the table objects and adjusting the graphic element objects in a linkage manner.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic diagram of a table editing process provided by an embodiment of the present invention;
FIG. 2 is a schematic diagram of a sub-process of table editing according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of another sub-flow of table editing according to an embodiment of the present invention;
fig. 4 is a schematic block diagram of a table editing apparatus according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without any creative effort belong to the protection scope of the embodiments of the present invention.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the embodiments of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the embodiments of the invention. As used in the description of embodiments of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in the description of embodiments of the present invention and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
Referring to fig. 1, fig. 1 is a schematic flow chart illustrating a table editing method according to an embodiment of the present invention;
as shown in fig. 1, the method includes steps S101 to S103.
S101, identifying a table in the page.
In this embodiment, in a fixed-plate document page, for example, in a page in PDF format, text blocks in the page are horizontally scanned and vertically scanned, and a central line of a gap between each text block is identified and used as a boundary line, so as to virtually construct a table structure, and thus a table is obtained and used for subsequent editing.
In one embodiment, as shown in fig. 2, step S101 includes:
s201, scanning and calculating a table according to the position of a text block in a page;
and S202, correcting the boundaries of the table according to the line data in the page.
In the embodiment, the positions of the text blocks in the page are taken as reference, the boundary positions of the text blocks are scanned and calculated, the centerline positions of gaps among the text blocks are taken as the boundary positions of the table, and a virtual table structure is preliminarily constructed; and then, correcting the boundary of the table according to line data actually existing in the page to obtain the table, wherein the table comprises one or more cells.
S102, associating the primitive object into a table to construct a table object.
In the embodiment, the primitive object is actually present in the page, the primitive object includes text blocks, pictures and lines, and after an operation interface is provided for the identified virtual table, the primitive object and the table are associated and the table object is constructed, so that the actual table editing process, namely the process of adjusting the primitive object in a linkage manner, the table object is obtained by associating the primitive object and the table, the table object is directly edited, and a plurality of related basic primitives can be adjusted at one time during editing to realize the advantage of quickly editing the table, thereby solving the problems of complex operation and time consumption caused by adjustment only one by one in the traditional mode, and further improving the convenience during table editing.
In one embodiment, as shown in fig. 3, step S102 includes:
s301, determining the position relation between the text block and the cells in the table, and if the text block falls into the cells, establishing the association relation between the text block and the cells;
s302, determining the position relation between the picture and the cell, and if the picture falls into the cell, establishing the association relation between the picture and the cell;
and S303, determining the position relation between the line and the cell, and if the line is overlapped with the wire frame of the cell, establishing the association relation between the line and the cell.
In the embodiment, the position relationship between each text block and each cell in the table is determined, and if the text block falls into a cell, the text block falling into the cell and the cell establish an association relationship; determining the position relation between each picture and each cell, and if the picture falls in the cell, establishing an association relation between the picture falling in the cell and the cell; determining the position relation of the wire frames of each line and each cell, and if the line is overlapped with the wire frame of the cell, establishing an association relation between the overlapped line and the corresponding wire frame of the overlapped cell; therefore, all the primitive objects falling in the table can be associated with the table.
And S103, receiving a user instruction to edit the table object, and automatically adjusting the primitive object in a linkage manner during editing.
In this embodiment, an editing instruction input by a user is received and analyzed, and an editing operation is performed on a table object according to the instruction, for example, rows and columns of the table object may be newly added or deleted, cells may be merged and split, and the like; and in the process of editing operation, the primitive objects falling in the cells of the table are adjusted in a linkage mode, so that the primitive objects are made to be self-adaptive to the adjusted cells.
In one embodiment, step S103 includes:
and receiving a user instruction to modify the table area of the table object, and automatically adjusting the primitive object having an association relation with the table object in the modification process.
In this embodiment, an area modification instruction input by a user is received, and an area of a table object is modified according to the area modification instruction, specifically, the area modification instruction may be that the user drags a boundary of a table on a display interface, or drags a wire frame of one or more cells in the table, so as to perform an editing operation of enlarging or reducing the table or the one or more cells in the table, and in the editing process, an editing operation of performing linked enlargement or reduction on a primitive object in a cell in which an area changes is also performed synchronously.
In one embodiment, step S103 further includes:
and receiving a user instruction to add or delete the table object, and automatically adding or deleting the primitive object having the association relation with the table object in the adding or deleting process.
In this embodiment, a new adding instruction or a deleting instruction input by a user is received, and any one row or one or more rows or more columns in the table object are added or deleted according to the new adding instruction or the deleting instruction.
In one embodiment, step S103 further includes:
and receiving a user instruction to combine the plurality of cells, and automatically combining the primitive objects with the association relationship in the plurality of cells in the combining process.
In this embodiment, a merging instruction input by a user is received, a plurality of cells in a table are selected according to the merging instruction, a plurality of primitive objects associated in the plurality of cells are synchronously selected, the selected plurality of cells are directly merged, and the associated plurality of primitive objects are synchronously merged, so that the merged cells and the merged plurality of primitive objects are obtained.
In one embodiment, step S103 further includes:
and receiving a user instruction to split the cell, and automatically splitting or moving the primitive object with the association relation in the cell to the split specified cell in the splitting process.
In this embodiment, a splitting instruction input by a user is received, cells in the table are selected according to the splitting instruction, and primitive objects associated in the cells are synchronously selected, the selected cells are split into at least two cells, and then the associated primitive objects are linked for splitting and automatically fall into the split cells according to the split positions, or the associated primitive objects are directly moved to designated cells according to the user instruction.
Embodiments of the present invention further provide a table editing apparatus, where the table editing apparatus is configured to execute any one of the embodiments of the table editing method. Specifically, referring to fig. 4, fig. 4 is a schematic block diagram of a table editing apparatus according to an embodiment of the present invention.
As shown in fig. 4, the table editing apparatus 400 includes: identification section 401, association section 402, and editing section 403.
An identifying unit 401 for identifying a table within a page;
an associating unit 402, configured to associate the primitive object into a table, and construct a table object;
and the editing unit 403 is configured to receive a user instruction to edit the primitive object, and automatically adjust the primitive object in a linkage manner during editing.
The device can directly edit the table after identifying the table data structure in the fixed plate type document, improves the convenience of editing the table, and is very difficult to simulate and adjust the table by adjusting basic primitives for a plurality of rows and columns of tables.
In one embodiment, the recognition unit 401 includes:
the scanning unit is used for scanning and calculating the table according to the position of the text block in the page;
and the correction unit is used for correcting the boundary of the table according to the line data in the page.
In an embodiment, the associating unit 402 includes:
the first establishing unit is used for determining the position relation between the text block and the cells in the table, and if the text block falls into the cells, establishing the association relation between the text block and the cells;
the second establishing unit is used for determining the position relation between the picture and the cell, and if the picture falls into the cell, establishing the association relation between the picture and the cell;
and the third establishing unit is used for determining the position relation between the line and the cell, and if the line is overlapped with the wire frame of the cell, establishing the association relation between the line and the cell.
In one embodiment, scaling unit 403 includes:
and the modification unit is used for receiving a user instruction to modify the table area of the table object and automatically adjusting the graphic element object having an association relation with the table object in the modification process.
In one embodiment, scaling unit 403 further includes:
and the adding and deleting unit is used for receiving a user instruction to add or delete the table object and automatically adding or deleting the primitive object which has the association relation with the table object in the adding or deleting process.
In one embodiment, scaling unit 403 further includes:
and the merging unit is used for receiving a user instruction to merge the plurality of cells and automatically merging the primitive objects with the association relationship in the plurality of cells in the merging process.
In one embodiment, scaling unit 403 further includes:
and the splitting unit is used for receiving a user instruction to split the cell and automatically splitting or moving the primitive object with the association relation in the cell to the split designated cell in the splitting process.
The embodiment of the invention also provides a computer readable storage medium, wherein a computer program is stored on the computer readable storage medium, and when being executed by a processor, the computer program realizes the table editing method.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
While the embodiments of the present invention have been described with reference to the accompanying drawings, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the embodiments of the present invention. Therefore, the protection scope of the embodiments of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A method of editing a form, comprising:
identifying a table within a page;
associating the primitive object to the table to construct a table object;
and receiving a user instruction to edit the table object, and automatically adjusting the primitive object in a linkage manner during editing.
2. The form editing method of claim 1, wherein the identifying the form within the page comprises:
scanning and calculating a table according to the position of the text block in the page;
and correcting the boundary of the table according to line data in the page.
3. The table editing method of claim 1, wherein the primitive objects comprise text blocks, pictures and lines, and wherein associating the primitive objects into the table constructs a table object comprising:
determining the position relation between a text block and a cell in a table, and if the text block falls into the cell, establishing the association relation between the text block and the cell;
determining the position relation between a picture and the cell, and if the picture falls in the cell, establishing the association relation between the picture and the cell;
and determining the position relation between the line and the cell, and if the line is overlapped with the wire frame of the cell, establishing the association relation between the line and the cell.
4. The form editing method of claim 1, wherein the receiving the user instruction edits the form object and automatically adjusts the primitive object in a linkage manner during editing, and the method comprises:
and receiving a user instruction to modify the table area of the table object, and automatically adjusting the primitive object having an association relation with the table object in the modification process.
5. The form editing method of claim 1, wherein the receiving of the user instruction edits the form object and automatically adjusts the primitive object in a linkage manner during editing, further comprising:
and receiving a user instruction to add or delete the table object, and automatically adding or deleting the primitive object having the association relation with the table object in the adding or deleting process.
6. The form editing method of claim 1, wherein the receiving of the user instruction edits the form object and automatically adjusts the primitive object in a linkage manner during editing, further comprising:
and receiving a user instruction to combine the plurality of cells, and automatically combining the primitive objects with the association relationship in the plurality of cells in the combining process.
7. The form editing method of claim 1, wherein the receiving of the user instruction edits the form object and automatically adjusts the primitive object in a linkage manner during editing, further comprising:
and receiving a user instruction to split the cell, and automatically splitting or moving the primitive object with the association relation in the cell to the split specified cell in the splitting process.
8. A form editing apparatus, comprising:
an identifying unit for identifying a table within a page;
the association unit is used for associating the primitive object into the table to construct a table object;
and the editing unit is used for receiving a user instruction to edit the table object and automatically adjusting the primitive object in a linkage manner during editing.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the table editing method as claimed in any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when executed by a processor, causes the processor to execute the table editing method according to any one of claims 1 to 7.
CN202011547819.1A 2020-12-24 2020-12-24 Table editing method and device, computer equipment and storage medium Pending CN112560417A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011547819.1A CN112560417A (en) 2020-12-24 2020-12-24 Table editing method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011547819.1A CN112560417A (en) 2020-12-24 2020-12-24 Table editing method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112560417A true CN112560417A (en) 2021-03-26

Family

ID=75032541

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011547819.1A Pending CN112560417A (en) 2020-12-24 2020-12-24 Table editing method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112560417A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113869012A (en) * 2021-09-30 2021-12-31 珠海金山办公软件有限公司 Document processing method and device, electronic equipment and computer readable storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040210822A1 (en) * 2000-06-21 2004-10-21 Microsoft Corporation User interface for integrated spreadsheets and word processing tables
CN109445677A (en) * 2018-09-12 2019-03-08 天津字节跳动科技有限公司 Method, apparatus, medium and the electronic equipment that content in document is edited
CN110147697A (en) * 2018-02-11 2019-08-20 鼎复数据科技(北京)有限公司 A kind of PDF table extracting method based on man-machine mutual assistance
CN110390269A (en) * 2019-06-26 2019-10-29 平安科技(深圳)有限公司 PDF document table extracting method, device, equipment and computer readable storage medium
CN110795919A (en) * 2019-11-07 2020-02-14 达而观信息科技(上海)有限公司 Method, device, equipment and medium for extracting table in PDF document
CN111797603A (en) * 2020-07-02 2020-10-20 北京字节跳动网络技术有限公司 Method and device for browsing table in document, electronic equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040210822A1 (en) * 2000-06-21 2004-10-21 Microsoft Corporation User interface for integrated spreadsheets and word processing tables
CN110147697A (en) * 2018-02-11 2019-08-20 鼎复数据科技(北京)有限公司 A kind of PDF table extracting method based on man-machine mutual assistance
CN109445677A (en) * 2018-09-12 2019-03-08 天津字节跳动科技有限公司 Method, apparatus, medium and the electronic equipment that content in document is edited
CN110390269A (en) * 2019-06-26 2019-10-29 平安科技(深圳)有限公司 PDF document table extracting method, device, equipment and computer readable storage medium
CN110795919A (en) * 2019-11-07 2020-02-14 达而观信息科技(上海)有限公司 Method, device, equipment and medium for extracting table in PDF document
CN111797603A (en) * 2020-07-02 2020-10-20 北京字节跳动网络技术有限公司 Method and device for browsing table in document, electronic equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
陈文林: "《计算机应用基础教程:WINODWS XP环境 上》", vol. 978, 《中央广播电视大学出版社》, pages: 118 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113869012A (en) * 2021-09-30 2021-12-31 珠海金山办公软件有限公司 Document processing method and device, electronic equipment and computer readable storage medium

Similar Documents

Publication Publication Date Title
JP4621733B2 (en) Method and system for viewing and enhancing images
CN107133909B (en) Method and device for recombining shaders
CN102724430B (en) A kind of exchange method of nonlinear editing system and image-text packaging system
CN110163030A (en) A kind of PDF based on image information has frame table abstracting method
CN111932483B (en) Picture processing method and device, storage medium and computer equipment
US8411115B1 (en) Scaling raster objects in a graphical development enviroment using nine-slice scaling
US10402472B2 (en) Optimized rendering of shared documents on client devices with document raster representations
CN113360589A (en) Map data updating method and device and electronic equipment
CN112560417A (en) Table editing method and device, computer equipment and storage medium
CN109411056A (en) Image storage method and system
CN105741300B (en) A kind of region segmentation screenshot method
CN111161127A (en) Picture resource rendering optimization method
US10282202B2 (en) In-editor spritesheeting
WO2020181903A1 (en) Webpage illustration processing method, system and device, and storage medium
CN110264543B (en) Frame drawing method and device of spliced picture and storage medium
CN113791857A (en) Application window background fuzzy processing method and device in Linux system
US20220005151A1 (en) Method of processing picture, computing device, and computer-program product
CN104918073A (en) Image display method and terminal
CN110298833B (en) Picture processing method and device
CN108823942B (en) Cutting bed self-adaptive waste material cutting method
CN119477949B (en) Image cutting method, system and related equipment
CN111291202B (en) A highlight display method and device based on PPT
CN105303618B (en) A method of model pinup picture optimization production is carried out based on 3DMAX script technology
CN112214872B (en) Automatic calculation method and device for railway line longitudinal section scale information
CN110992447B (en) Image-text adaptation method, device, storage medium and equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210326