CN112528614A - Table editing method and device and electronic equipment - Google Patents

Table editing method and device and electronic equipment Download PDF

Info

Publication number
CN112528614A
CN112528614A CN202011506770.5A CN202011506770A CN112528614A CN 112528614 A CN112528614 A CN 112528614A CN 202011506770 A CN202011506770 A CN 202011506770A CN 112528614 A CN112528614 A CN 112528614A
Authority
CN
China
Prior art keywords
displayed
size
display area
display
cells
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
CN202011506770.5A
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.)
Tencent Cloud Computing Beijing Co Ltd
Original Assignee
Beijing Guangqiyuan Digital Technology 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 Beijing Guangqiyuan Digital Technology Co ltd filed Critical Beijing Guangqiyuan Digital Technology Co ltd
Priority to CN202011506770.5A priority Critical patent/CN112528614A/en
Publication of CN112528614A publication Critical patent/CN112528614A/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

Abstract

The present application relates to the field of computer technologies, and in particular, to a form editing method and apparatus, and an electronic device. The method provided by the specification comprises the following steps: acquiring a first display size of a display area and a size of an original table; dividing the original table into a plurality of first sub-tables according to a first display size of the display area and the size of the original table; wherein the size of the first sub-table is greater than or equal to a first display size of the display area; generating a first table to be displayed according to the size of the first sub-table, and storing the first table to be displayed in an internal memory; and reading a first table to be displayed in the memory so as to display the first table to be displayed in the display area. According to the scheme, the problem of unsmooth clamping when a large number of tables are drawn and slide can be effectively solved, and the smoothness and the user experience are improved.

Description

Table editing method and device and electronic equipment
Technical Field
The present application relates to the field of computer technologies, and in particular, to a form editing method and apparatus, and an electronic device.
Background
In an implementation manner, an existing form editing tool based on the iOS generally adopts instantiation of all cells (including cells not required to be displayed outside a screen) during initialization, and when the number of cells of a form to be drawn reaches a certain number, the problem of device performance is limited, and device blockage is inevitably caused. Therefore, there is a need in the art for a new table editing method to solve the above problems.
Disclosure of Invention
In view of this, embodiments of the present disclosure provide a form editing method, an apparatus, and an electronic device, which are used to solve the problem of stutter when a large number of forms are drawn and slid, so as to improve the smoothness of form processing and user experience.
The embodiment of the specification adopts the following technical scheme:
an embodiment of the present specification provides a table editing method, including:
acquiring a first display size of a display area and a size of an original table;
dividing the original table into a plurality of first sub-tables according to a first display size of the display area and the size of the original table; wherein the size of the first sub-table is greater than or equal to a first display size of the display area;
generating a first table to be displayed according to the size of the first sub-table, and storing the first table to be displayed in an internal memory;
and reading a first table to be displayed in the memory so as to display the first table to be displayed in the display area.
The present specification also provides a form editing method, including:
acquiring the size of a display area and the size of a cell; the unit cells are constituent units of the table, and the size of each unit cell is preset;
determining the initial number of the cells which can be displayed in the display area according to the size of the display area and the cell size;
drawing an initial table according to the initial number of the cells, and displaying the drawn initial table in the display area; and the number of the first and second groups,
under the condition that the initial form is displayed in the display area, if the sliding operation on the initial form is detected, determining the number of cells increased by the sliding operation;
and drawing a table to be displayed according to the increased number of the cells, and displaying the drawn table to be displayed in the display area.
An embodiment of the present specification further provides a table editing apparatus, including:
an acquisition unit configured to acquire a first display size of a display area and a size of an original table;
the dividing unit is used for dividing the original table into a plurality of first sub-tables according to a first display size of the display area and the size of the original table, wherein the size of the first sub-table is larger than or equal to the first display size of the display area;
the generating unit is used for generating a first table to be displayed according to the size of the first sub-table and storing the first table to be displayed in an internal memory;
and the reading unit is used for reading the first table to be displayed in the memory so as to display the first table to be displayed in the display area.
An embodiment of the present specification further provides a table editing apparatus, including:
the acquisition module is used for acquiring the size of a display area and the size of a cell; the unit cells are constituent units of the table, and the size of each unit cell is preset;
a determining module, configured to determine an initial number of cells that can be displayed by the display area according to the size of the display area and the cell size;
the drawing module is used for drawing an initial table according to the initial number of the cells and displaying the drawn initial table in the display area; and the number of the first and second groups,
the detection module can detect the sliding operation on the initial table under the condition that the initial table is displayed in the display area, and determines the number of cells increased by the sliding operation after the sliding operation on the initial table is detected;
the drawing module is also used for drawing the table to be displayed according to the increased number of the cells and displaying the drawn table to be displayed in the display area.
This specification also provides an electronic device, including: at least one processor and a memory, the memory storing a program and configured to execute the above-described table editing method by the at least one processor.
The present specification also provides a computer-readable storage medium having stored thereon computer-executable instructions that, when executed by a processor, implement the form editing method described above.
The embodiment of the specification adopts at least one technical scheme which can achieve the following beneficial effects: in the form editing method of the present specification, the size of the display area and the size of the cells are obtained when the form is initialized, so that the initial number of the cells required to fill the current display area is calculated. Since the number of cells displayed in the display area is much smaller than the number of cells included in the table, only the number of cells required for drawing the display area is needed, and device performance resources are saved as much as possible. In the scheme, the whole size of the original form is divided into a plurality of first sub-forms according to the first display size of the display area, when the original form is initialized, a first form to be displayed is generated according to the first sub-form and stored in the memory, and the first form to be displayed in the memory is read and displayed in the display area. Further, if more tables need to be displayed, the corresponding table to be displayed can be redrawn according to the first sub-table according to the display requirement, so that the performance resource of the equipment is saved as much as possible. In addition, after the display size of the display area is increased to the second display size, a corresponding number of cells can be further drawn and added to the display area, and then when the display table is slid, the original table can be divided into a plurality of second sub-tables according to the second display size and the size of the original table, and the table to be displayed is drawn according to the second sub-tables. Therefore, the problem of unsmooth clamping when a large number of tables are drawn and slide can be effectively solved through the scheme, and smoothness and user experience are improved.
Drawings
In order to more clearly illustrate the embodiments of the present specification or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the specification, and for those skilled in the art, other drawings can be obtained according to the drawings without inventive exercise:
fig. 1 is a main flowchart of a table editing method provided in an embodiment of the present disclosure;
fig. 2 is a main flowchart of a table editing method provided in the second embodiment of the present specification;
fig. 3 is a schematic structural diagram of a table editing apparatus according to a first embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a table editing apparatus according to a second embodiment of the present disclosure.
Detailed Description
In order to make those skilled in the art better understand the technical solutions in the present specification, the technical solutions in the embodiments of the present specification will be clearly and completely described below with reference to the drawings in the embodiments of the present specification, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without making any inventive step based on the embodiments of the present disclosure, shall fall within the scope of protection of the present application.
As described in the background art, in the existing table editing manner, all cells are generally instantiated (including cells that do not need to be displayed outside a screen) during initialization, and if a certain number of cells of a table that needs to be drawn are reached, the problem of device performance is limited, which inevitably results in device stuttering. In order to solve the problem, the present specification provides a form editing method, which is used for solving the stuck problem when a large number of forms are drawn and slid, so as to improve the smoothness of form processing and user experience.
Referring to fig. 1, fig. 1 is a main flowchart of a table editing method provided in an embodiment of the present disclosure. The method comprises the following steps:
s110: a first display size of a display area and a size of an original table are acquired.
In this step, the first display size of the display area and the size of the original table are both expressed in terms of the number of cells in the original table. For example, the first display size of the display area and the size of the original table are both expressed in M × N, that is, the first display size of the display area and the size of the original table may be expressed in a form of a cell including several rows and columns.
Specifically, the cells are constituent cells of a table, which typically includes M rows and N columns of cells, M, N can be any positive integer, such as a table including 10 rows and 10 columns of cells, a table including 20 rows and 30 columns of cells, and so on. The size of each cell is preset, for example, each cell size may be 1 × 3cm, 1 × 4, 2 × 4, etc., so that the cell size may be directly obtained. It should be noted that, when the table is initially created, the cell size of each table is a preset size, and after the table is created, the cell sizes of rows and columns can be adjusted by performing operations on the table, which is not described in detail herein. The original table is usually a pre-referred cell containing M rows and N columns, and generally the number of cells contained in the original table is much larger than the number of cells that can be displayed in the display area.
The display area is an area for displaying a table. By way of example, the display area may be all or part of the area on the terminal display screen. The terminal display screen can be a display screen of a mobile phone, a tablet and the like, taking a tablet as an example, the display area can be the screen display size of the tablet, and can also be the size of an opened window in the screen display sizes. If the display area is the screen display size of the panel, the screen size of the current panel can be directly obtained as a first display size; and if the display area is a window displayed by the flat panel, acquiring the size of the window as a first display size. Since the size of the cell is set in advance, after the first display size of the display area is obtained, the number of cells that can be displayed in the display area can be determined, that is, the display area can display a table of several rows and several columns, so that the size of the display area can be expressed in the form of M × N.
S120: and dividing the original table into a plurality of first sub-tables according to the first display size of the display area and the size of the original table.
In this step, the size of the original table is typically much larger than the first display size of the display area. If the first display size of the display area is 10 × 5 and the first display size of the original table is 50 × 25, the original table may be divided into 5 first sub-tables, so that each first sub-table has a size of 10 × 5. Optionally, the size of the divided first sub-table may be slightly larger than the first display size of the display area, that is, the size of the first sub-table is equal to or larger than the first display size of the display area. In addition, in practical applications, the size of the original table may not be exactly capable of being divided into several equal first sub-tables, in this case, if the original table can be divided into 10 first sub-tables, the first 9 first sub-tables are guaranteed to have the same size and equal to or slightly larger than the first display size of the display area, and the 10 th first sub-table is the part remaining after the first 9 first sub-tables are divided, so the size of the 10 th first sub-table may be smaller than or equal to the size of the first 9 sub-tables, obviously, these do not depart from the protection scope of the present application.
It should be noted that the first sub-table in the above description may be understood as an abstract concept, and the original table is only logically divided into the sizes of the first sub-tables, rather than being specifically drawn and then divided into the first sub-tables. It is understood that on a whole original size table, the original table is divided into several areas according to the size of the first sub-table.
S130: and generating a first table to be displayed according to the size of the first sub-table, and storing the first table to be displayed in an internal memory.
S140: and reading a first table to be displayed in the memory so as to display the first table to be displayed in the display area.
In steps S130-S140, since the original form is logically divided into the areas including the sizes of the first sub-forms, when the original form is initialized, the first table to be displayed may be generated according to the size of the first sub-form, and then stored in the memory, so that when the table to be displayed needs to be displayed, the first table to be displayed in the memory is directly read.
More specifically, the steps S110 to S140 may be executed when performing table initialization, that is, when performing table initialization, the original table is divided into a plurality of first sub-tables by obtaining a first display size of the display area and a size of the original table, and then a first table to be displayed is generated according to the size of the first sub-table to be stored in the memory, and the first table to be displayed can be displayed in the display area by reading the first table to be displayed in the memory. As will be understood by those skilled in the art, since the size of the display area is much smaller than that of the original table, the entire original table does not need to be generated according to the size of the original table from the beginning, but the table required to fill the display area is generated according to the size of the display area.
Further, under the condition that the display area displays the first table to be displayed, if the sliding operation on the first table to be displayed is detected, a second table to be displayed is generated according to the size of the first sub-table and stored in the memory, and then the second table to be displayed in the memory is read according to the sliding operation so as to display part or all of the second table to be displayed. In this way, only the first table to be displayed needs to be generated during initialization, and if more tables need to be displayed, the corresponding table to be displayed is generated by taking the "first sub-table size" as a unit, so as to achieve the purpose of saving the performance resources of the device. Specifically, only the first table to be displayed is generated at first, when the first table to be displayed slides, for example, leftwards, part of the first table to be displayed slides out of the display area, at this time, a second table to be displayed is generated according to the size of the first sub-table and stored in the memory, after the part of the first table to be displayed slides out of the display area, the part of the display area which is vacant can display the part of the second table to be displayed, and when the whole first table to be displayed completely slides out of the display area, the whole display area can display the whole second table to be displayed.
Further, under the condition that the display area displays the first table to be displayed, if the sliding operation on the first table to be displayed is detected and the second table to be displayed is stored in the memory, the second table to be displayed in the memory is read according to the sliding operation so as to display part or all of the second table to be displayed. Specifically, the second table to be displayed may be generated when the first table to be displayed is slid for the first time, and since the second table to be displayed is stored in the memory, when the area to be redisplayed needs to redisplay a part or all of the second table to be displayed, the second table to be displayed only needs to be read from the memory.
That is to say, after the display area is fixed in the first display size, when the table is initialized, a first table to be displayed is generated according to the divided first sub-table, if more tables need to be displayed, an nth table to be displayed (n is an integer greater than 1) is generated according to the first sub-table, and then the generated nth table to be displayed is stored in the memory. That is, if the nth table to be displayed is stored in the memory, the nth table to be displayed in the memory may be read, and if the nth table to be displayed does not exist in the memory and needs to be displayed, the nth table to be displayed may be regenerated according to the sub-tables. According to the scheme, the problem of unsmooth clamping when a large number of tables are drawn and slide can be effectively solved, and the smoothness and the user experience are improved.
In a specific embodiment, the table in the above may be developed using Swift language based on iOS operating system. Moreover, the table can have the functions of single selection, multiple selection, editing, emptying, copying, pasting, cutting, inserting rows and columns, deleting rows and columns and the like, and the functions of cross-application copying and pasting are supported. The specification does not limit the specific functions of the table, and a person skilled in the art can design the table with the corresponding functions according to actual needs.
As described above, in this embodiment, the entire size of the original table is divided into a plurality of first sub-tables according to the first display size of the display area, during initialization, a first table to be displayed is generated according to the first sub-table and stored in the memory, and the first table to be displayed in the memory is read and displayed in the display area. Further, if more tables need to be displayed, the corresponding tables to be displayed can be drawn according to the first sub-table according to the display requirement, so that the performance resources of the equipment are saved as much as possible, the problem of unsmooth drawing and sliding of a large number of tables can be effectively solved, and the smoothness and the user experience are improved.
In an alternative embodiment, the method provided by the present specification further comprises: under the condition that the display area displays the first table to be displayed, if the fact that the size of the display area is increased to a second display size is detected, adding a plurality of cells on the basis of the displayed first table to be displayed to obtain a displayed third table to be displayed; the cells are the composition units of the table, and the obtained third table to be displayed can be fully distributed in the display area with the second display size.
Specifically, it is equivalent to performing a corresponding operation on the display area for increasing the display size of the display area, that is, increasing the display size of the display area from the first display size to the second display size, without sliding the first table to be displayed. At this time, since the first table to be displayed is just full of the display area with the first display size, when the display area is increased to the second display size, a part of the display area may not be full of the first table to be displayed, and a third table to be displayed in the current display area (the second display size) may be obtained by adding a plurality of cells on the basis of the first table to be displayed (for example, if the second display size is increased by one line, one line of cells is added on the basis of the first table to be displayed). As an example, assuming that the current memory stores the second table to be displayed, a part of tables in the second table to be displayed is directly supplemented to the first table to be displayed, so as to obtain a displayed third table to be displayed.
Further, the method also includes: after the display size of the display area is increased from a first display size to a second display size, dividing the original table into a plurality of second sub-tables according to the second display size and the size of the original table; wherein a size of the second sub-table is equal to or larger than a second display size of the display area. The second sub-table here is synonymous with the first sub-table, differing only in that the second sub-table size differs from the first sub-table size.
Further, under the condition that the third table to be displayed is displayed in the display area, if the sliding operation on the third table to be displayed is detected, a fourth table to be displayed is generated according to the size of the second sub-table and stored in an internal memory; and reading a fourth table to be displayed in the memory according to the sliding operation so as to display part or all of the fourth table to be displayed. This step is similar to the sliding operation for the first table to be displayed in the foregoing, except that the display area at this time is increased from the first display size to the second display size, and the fourth table to be displayed is generated according to the size of the second sub-table. More particularly, reference is made to the above description and is not repeated here.
Further, under the condition that the display area displays the third table to be displayed, if a sliding operation on the third table to be displayed is detected and the fourth table to be displayed is stored in the memory, reading the fourth table to be displayed in the memory according to the sliding operation so as to display part or all of the fourth table to be displayed. See also the above description, and are not described in detail here.
The specification also provides a table editing method. Referring to fig. 2, fig. 2 is a main flowchart of a table editing method provided in the second embodiment of the present specification. As shown in fig. 2, the method includes: s210: and acquiring the size of the display area and the size of the cell.
In this step, the cells are constituent cells of a table, the table usually includes M rows and N columns of cells, and M, N can be any positive integer, such as a table including 10 rows and 10 columns of cells, a table including 20 rows and 30 columns of cells, and so on. The size of each cell is preset, for example, each cell size may be 1 × 3cm, 1 × 4, 2 × 4, etc., so that the cell size may be directly obtained. It should be noted that, when the table is initially created, the cell size of each table is a preset size, and after the table is created, the cell sizes of rows and columns can be adjusted by performing operations on the table, which is not described in detail herein.
In this step, the display area is an area for displaying a table. By way of example, the display area may be all or part of the area on the terminal display screen. The terminal display screen can be a display screen of a mobile phone, a tablet and the like, taking a tablet as an example, the display area can be the screen display size of the tablet, and can also be the size of an opened window in the screen display sizes. If the display area is the screen display size of the flat panel, the screen size of the current flat panel can be directly obtained; if the display area is a window of the flat panel display, the size of the window is obtained.
The method also includes initializing the table. Initialization may be understood as assigning variables to default values, setting controls to default states, and preparing for future use. The present description does not limit the specific implementation of the table initialization. In a specific example, step S110 may be performed when initializing a table. That is, at the time of table initialization, the size of the display area and the cell size are acquired.
S220: and determining the initial number of the cells which can be displayed in the display area according to the size of the display area and the cell size.
In this step, the number of cells that can be displayed in the display area is much smaller than the number of cells included in the table, and in order to avoid the device stuck, only the initial number of cells required for the display area (generally, the number of cells that can be displayed in the display area) may be drawn, thereby saving device performance resources as much as possible.
Since the size of the display area and the cell size have been obtained, one algorithm may be to divide the size of the display area by the cell size to determine the initial number of cells that can be displayed by the display area. Any other suitable algorithm may be selected by one skilled in the art to calculate the initial number of cells, and this description is not intended to limit the invention.
S230: and drawing an initial table according to the initial number of the cells, and displaying the drawn initial table in the display area.
If it is determined in step S220 that the initial number of cells that can be displayed in the display area is X rows and Y columns, a table including X rows and Y columns of cells may be drawn. In order to ensure the display effect, cells including X +1 rows and Y +1 columns may be drawn, or cells of several rows or columns may be drawn in multiple according to the setting rule. In this way, the number of cells included in the initial table can just cover the display area, and only the cells needed by the area to be displayed are drawn, so that the performance resources of the device are saved as much as possible. That is to say, in the method of the present specification, when the table is initialized, all the cells are not instantiated (the examples are usually some database programs capable of supporting the database to run, and it can be understood that all the preset cells are drawn into the table to be stored in the memory), and only the initial table that can be less than the current display area is drawn, so as to achieve the purpose of saving the device performance resources.
S240: under the condition that the initial form is displayed in the display area, if the sliding operation on the initial form is detected, determining the number of cells increased by the sliding operation; and drawing a table to be displayed according to the increased number of the cells, and displaying the drawn table to be displayed in the display area.
In this step, the sliding operation may be understood as an operation of the table by the user, which can slide the initial table to display more cells. For example, the user can move the initial table up, down, left, or right by operating the direction keys on the keyboard; or the user can drag the initial table to move up, down, left or right by operating the mouse, for example, dropping the mouse on the initial table or a slide bar of the initial table; or the user can operate the initial form in a touch mode to slide the initial form up, down, left or right. The initial table may be moved in the display area by a sliding operation on the initial table, such that a part of the cells in the initial table moves out of the display area (i.e. the part of the cells moves to the invisible area), and a new cell enters the display area.
For example, if the initial table is moved to the left by two columns of cells, i.e., two columns of cells on the left side of the initial table are moved out of the display area, two columns of cells are "left" between the right side of the initial table and the right side of the display area, and the two columns of cells are the number of cells increased by the sliding operation. Further, after the number of the cells increased by the sliding operation is determined, the table to be displayed is drawn according to the increased number of the cells, that is, the table to be displayed containing two columns (the number of the rows is the same as that of the initial table) is drawn, and the drawn table to be displayed is displayed in the display area.
The form to be displayed here can be understood as a form added or supplemented to the original form. That is, for the sliding operation of the initial table, no matter which direction the initial table slides, a part of cells in the initial table will move to the invisible area, and the newly drawn table to be displayed (the incremental table or the supplementary table) will be displayed in the display area. And the newly drawn table is drawn according to the number of cells added by the sliding operation.
In a more specific embodiment, the drawn initial table and the newly drawn table to be displayed are stored in the memory. And if the table to be displayed corresponding to the number of the cells increased by the sliding operation is stored in the memory after the sliding operation of the table displayed in the display area is detected, reading the table to be displayed in the memory to display the table to be displayed in the display area.
For example, in the above example, after two rows of cells on the left side of the initial table are moved out of the display area, the two rows of cells are stored in the memory, and the newly added table on the right side of the initial table is also stored in the memory. At this time, if the table displayed in the current display area slides to the right for two rows of cells, the data in the memory can be directly read, that is, the two rows of cells already drawn in the memory are directly displayed in the display area as the table to be displayed, and the table does not need to be redrawn. Similarly, at this time, if the initial table is slid by two columns of cells to the left again, since the drawn table to be displayed is stored in the memory, the table to be displayed may be directly displayed in the display area, and the table does not need to be redrawn any more.
It should be noted that, if the number of cells included in the table to be displayed stored in the memory is not enough, that is, after the table currently displayed in the display area is subjected to the sliding operation, the number of cells added by the sliding operation is greater than the number of cells included in the table to be displayed stored in the memory, at this time, the table including the corresponding number of cells may be further drawn on the basis of the table to be displayed so as to respond to the sliding operation, and the drawn table may be stored in the memory.
As another example, after determining the initial number of cells, a table may be drawn that is slightly larger than the initial number of cells. In this way, after the initial table is displayed in the display area, a part of the drawn table is stored in the memory, and at this time, if the drawn table stored in the memory satisfies the number of cells increased by the sliding operation when the initial table is slid, the data in the memory can be directly read.
As described above, the table editing method of the present embodiment obtains the size of the display area and the cell size at the time of table initialization, thereby calculating the initial number of cells required to fill the current display area. Since the number of cells displayed in the display area is much smaller than the number of cells included in the table, only the number of cells required for drawing the display area is needed, and device performance resources are saved as much as possible. Furthermore, the cells with the examples are stored in the memory, when the table is subjected to sliding operation, whether the cells at the position are the examples or not can be checked in the memory firstly, and if the cells at the position are the examples, the cells are directly used, so that the time is saved; if not, the instance is put into the memory, so that the next use is facilitated. Therefore, the problem of unsmooth clamping when a large number of tables are drawn and slide can be effectively solved through the scheme, and smoothness and user experience are improved.
In a specific embodiment, the table in the above may be developed using Swift language based on iOS operating system. Moreover, the table can have the functions of single selection, multiple selection, editing, emptying, copying, pasting, cutting, inserting rows and columns, deleting rows and columns and the like, and the functions of cross-application copying and pasting are supported. The specification does not limit the specific functions of the table, and a person skilled in the art can design the table with the corresponding functions according to actual needs.
Based on the same idea, the specification also provides a table editing device. Referring to fig. 3, fig. 3 is a schematic structural diagram of a table editing apparatus according to a first embodiment of the present specification. As shown in fig. 3, the apparatus includes:
an obtaining unit 301, wherein the obtaining unit 301 is configured to obtain a first display size of a display area and a size of an original table;
a dividing unit 302, configured to divide the original table into a plurality of first sub-tables according to a first display size of the display area and a size of the original table, where the size of the first sub-table is greater than or equal to the first display size of the display area;
a generating unit 303, where the generating unit 303 is configured to generate a first table to be displayed according to the size of the first sub-table, and store the first table to be displayed in an internal memory;
a reading unit 304, wherein the reading unit 304 is configured to read the first table to be displayed in the memory, so that the first table to be displayed is displayed in the display area.
Further, the apparatus further comprises:
a detection unit 305, the detection unit 305 being configured to detect a slide operation on the first table to be displayed in a case where the display area displays the first table to be displayed; if the sliding operation on the first table to be displayed is detected, the generating unit 303 generates a second table to be displayed according to the size of the first sub-table, and stores the second table to be displayed in the memory; and the reading unit 304 reads the second table to be displayed in the memory according to the sliding operation, so as to display part or all of the second table to be displayed.
The detecting unit 305 is further configured to detect a size change of the display area in a case where the display area displays the first table to be displayed; if it is detected that the size of the display area is increased to a second display size, the generating unit 303 is configured to add a plurality of cells on the basis of the displayed first table to be displayed to obtain a displayed third table to be displayed; the cells are the composition units of the table, and the obtained third table to be displayed can be fully distributed in the display area with the second display size; and the dividing unit 304 divides the original table into a plurality of second sub-tables according to the second display size and the size of the original table; wherein a size of the second sub-table is equal to or larger than a second display size of the display area.
For the specific implementation of the apparatus, reference is made to the above description of the method, which is not repeated here.
Based on the same idea, the specification also provides a table editing device. Referring to fig. 4, fig. 4 is a schematic structural diagram of a table editing apparatus according to a second embodiment of the present specification. The device includes:
an obtaining module 401, where the obtaining module 401 is configured to obtain a size of a display area and a size of a cell; the unit cells are constituent units of the table, and the size of each unit cell is preset;
a determining module 402, wherein the determining module 402 is configured to determine an initial number of cells that can be displayed in the display area according to the size of the display area and the cell size;
a drawing module 403, where the drawing module 403 is configured to draw an initial table according to the initial number of the cells, and display the drawn initial table in the display area; and the number of the first and second groups,
a detecting module 404, where the initial table is displayed in the display area, the detecting module 404 being capable of detecting a sliding operation on the initial table, and determining the number of cells added by the sliding operation after detecting the sliding operation on the initial table;
the drawing module 403 is further configured to draw a table to be displayed according to the increased number of the cells, and display the drawn table to be displayed in the display area.
For the specific implementation of the apparatus, reference is made to the above description of the method, which is not repeated here.
Based on the same idea, this specification also provides an electronic device, including: at least one processor and a memory, the memory storing a program and configured to execute the above-described table editing method by the at least one processor.
Based on the same idea, the present specification also provides a computer-readable storage medium storing computer-executable instructions, which when executed by a processor implement the above-mentioned table editing method.
While certain embodiments of the present disclosure have been described above, other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily have to be in the particular order shown or in sequential order to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the apparatus, device, and non-volatile computer-readable storage medium embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and in relation to the description, reference may be made to some portions of the description of the method embodiments.
The apparatus, the device, the nonvolatile computer readable storage medium, and the method provided in the embodiments of the present specification correspond to each other, and therefore, the apparatus, the device, and the nonvolatile computer storage medium also have similar advantageous technical effects to the corresponding method.
In the 90 s of the 20 th century, improvements in a technology could clearly distinguish between improvements in hardware (e.g., improvements in circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements in process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain the corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (PLD), such as a Field Programmable Gate Array (FPGA), is an integrated circuit whose Logic functions are determined by programming the Device by a user. A digital system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Furthermore, nowadays, instead of manually making an Integrated Circuit chip, such Programming is often implemented by "logic compiler" software, which is similar to a software compiler used in program development and writing, but the original code before compiling is also written by a specific Programming Language, which is called Hardware Description Language (HDL), and HDL is not only one but many, such as abel (advanced Boolean Expression Language), ahdl (alternate Hardware Description Language), traffic, pl (core universal Programming Language), HDCal (jhdware Description Language), lang, Lola, HDL, laspam, hardward Description Language (vhr Description Language), vhal (Hardware Description Language), and vhigh-Language, which are currently used in most common. It will also be apparent to those skilled in the art that hardware circuitry that implements the logical method flows can be readily obtained by merely slightly programming the method flows into an integrated circuit using the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic for the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may thus be considered a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functions of the various elements may be implemented in the same one or more software and/or hardware implementations of the present description.
As will be appreciated by one skilled in the art, the present specification embodiments may be provided as a method, system, or computer program product. Accordingly, embodiments of the present description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present description may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and so forth) having computer-usable program code embodied therein.
The description has been presented with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the description. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices, or any other non-transmission medium which can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
This description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only an example of the present specification, and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (16)

1. A method of table editing, the method comprising:
acquiring a first display size of a display area and a size of an original table;
dividing the original table into a plurality of first sub-tables according to a first display size of the display area and the size of the original table; wherein the size of the first sub-table is greater than or equal to a first display size of the display area;
generating a first table to be displayed according to the size of the first sub-table, and storing the first table to be displayed in an internal memory;
and reading a first table to be displayed in the memory so as to display the first table to be displayed in the display area.
2. The method of claim 1, further comprising: in a case where the display area displays the first table to be displayed,
if the sliding operation on the first table to be displayed is detected, generating a second table to be displayed according to the size of the first sub-table, and storing the second table to be displayed in an internal memory; and
and reading a second table to be displayed in the memory according to the sliding operation so as to display part or all of the second table to be displayed.
3. The method of claim 2, further comprising: in a case where the display area displays the first table to be displayed,
and if the sliding operation on the first table to be displayed is detected and the second table to be displayed is stored in the memory, reading the second table to be displayed in the memory according to the sliding operation so as to display part or all of the second table to be displayed.
4. The method of claim 1, further comprising: in a case where the display area displays the first table to be displayed,
if the size of the display area is detected to be increased to a second display size, adding a plurality of cells on the basis of the displayed first table to be displayed to obtain a displayed third table to be displayed; the cells are the composition units of the table, and the obtained third table to be displayed can be fully distributed in the display area with the second display size;
dividing the original table into a plurality of second sub-tables according to the second display size and the size of the original table; wherein a size of the second sub-table is equal to or larger than a second display size of the display area.
5. The method of claim 4, further comprising: in a case where the display area displays the third table to be displayed,
if the sliding operation on the third table to be displayed is detected, generating a fourth table to be displayed according to the size of the second sub-table, and storing the fourth table to be displayed in an internal memory;
and reading a fourth table to be displayed in the memory according to the sliding operation so as to display part or all of the fourth table to be displayed.
6. The method of claim 5, further comprising: in a case where the display area displays the third table to be displayed,
if the sliding operation on the third table to be displayed is detected and the fourth table to be displayed is stored in the memory, reading the fourth table to be displayed in the memory according to the sliding operation so as to display part or all of the fourth table to be displayed.
7. The method according to any one of claims 1 to 6, wherein the display area is all or part of an area on a display screen of the terminal.
8. A method for editing a table, the method comprising
Acquiring the size of a display area and the size of a cell; the unit cells are constituent units of the table, and the size of each unit cell is preset;
determining the initial number of the cells which can be displayed in the display area according to the size of the display area and the cell size;
drawing an initial table according to the initial number of the cells, and displaying the drawn initial table in the display area; and the number of the first and second groups,
under the condition that the initial form is displayed in the display area, if the sliding operation on the initial form is detected, determining the number of cells increased by the sliding operation;
and drawing a table to be displayed according to the increased number of the cells, and displaying the drawn table to be displayed in the display area.
9. The method of claim 8, wherein the rendered initial table and the table to be displayed rendered according to the increased number of cells are stored in a memory.
10. The method of claim 9, prior to rendering a table to be displayed according to the increased number of cells, the method further comprising:
and if the table to be displayed corresponding to the number of the cells increased by the sliding operation is stored in the memory, reading the table to be displayed in the memory to display the table to be displayed in the display area.
11. A form editing apparatus, the apparatus comprising:
an acquisition unit configured to acquire a first display size of a display area and a size of an original table;
the dividing unit is used for dividing the original table into a plurality of first sub-tables according to a first display size of the display area and the size of the original table, wherein the size of the first sub-table is larger than or equal to the first display size of the display area;
the generating unit is used for generating a first table to be displayed according to the size of the first sub-table and storing the first table to be displayed in an internal memory;
and the reading unit is used for reading the first table to be displayed in the memory so as to display the first table to be displayed in the display area.
12. The apparatus of claim 11, further comprising:
a detection unit configured to detect a slide operation on the first table to be displayed in a case where the display area displays the first table to be displayed;
if the sliding operation on the first table to be displayed is detected, the generating unit generates a second table to be displayed according to the size of the first sub-table and stores the second table to be displayed in the memory; and the number of the first and second groups,
and the reading unit reads a second table to be displayed in the memory according to the sliding operation so as to display part or all of the second table to be displayed.
13. The apparatus according to claim 12, the detection unit further configured to detect a size change of the display area in a case where the display area displays the first table to be displayed;
if the size of the display area is detected to be increased to a second display size, the generating unit is used for adding a plurality of cells on the basis of the displayed first table to be displayed to obtain a displayed third table to be displayed; the cells are the composition units of the table, and the obtained third table to be displayed can be fully distributed in the display area with the second display size;
and the dividing unit divides the original table into a plurality of second sub-tables according to the second display size and the size of the original table; wherein a size of the second sub-table is equal to or larger than a second display size of the display area.
14. A form editing apparatus, the apparatus comprising:
the acquisition module is used for acquiring the size of a display area and the size of a cell; the unit cells are constituent units of the table, and the size of each unit cell is preset;
a determining module, configured to determine an initial number of cells that can be displayed by the display area according to the size of the display area and the cell size;
the drawing module is used for drawing an initial table according to the initial number of the cells and displaying the drawn initial table in the display area; and the number of the first and second groups,
the detection module can detect the sliding operation on the initial table under the condition that the initial table is displayed in the display area, and determines the number of cells increased by the sliding operation after the sliding operation on the initial table is detected;
the drawing module is also used for drawing the table to be displayed according to the increased number of the cells and displaying the drawn table to be displayed in the display area.
15. An electronic device, comprising: at least one processor and a memory, the memory storing a program and configured to perform the table editing method of any of claims 1 to 10 by the at least one processor.
16. A computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the table editing method of any of claims 1 to 10.
CN202011506770.5A 2020-12-18 2020-12-18 Table editing method and device and electronic equipment Pending CN112528614A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011506770.5A CN112528614A (en) 2020-12-18 2020-12-18 Table editing method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011506770.5A CN112528614A (en) 2020-12-18 2020-12-18 Table editing method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN112528614A true CN112528614A (en) 2021-03-19

Family

ID=75001883

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011506770.5A Pending CN112528614A (en) 2020-12-18 2020-12-18 Table editing method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN112528614A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113391861A (en) * 2021-05-21 2021-09-14 军事科学院系统工程研究院网络信息研究所 Table dynamic drawing method based on android platform
CN114860123A (en) * 2022-03-29 2022-08-05 携程旅游信息技术(上海)有限公司 Display control method, system, medium and device for list in page
CN114860123B (en) * 2022-03-29 2024-05-03 携程旅游信息技术(上海)有限公司 Method, system, medium and equipment for controlling display of list in page

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113391861A (en) * 2021-05-21 2021-09-14 军事科学院系统工程研究院网络信息研究所 Table dynamic drawing method based on android platform
CN113391861B (en) * 2021-05-21 2023-12-29 军事科学院系统工程研究院网络信息研究所 Android platform-based form dynamic drawing method
CN114860123A (en) * 2022-03-29 2022-08-05 携程旅游信息技术(上海)有限公司 Display control method, system, medium and device for list in page
CN114860123B (en) * 2022-03-29 2024-05-03 携程旅游信息技术(上海)有限公司 Method, system, medium and equipment for controlling display of list in page

Similar Documents

Publication Publication Date Title
CN110244949B (en) Page information display method and device
CN107622080B (en) Data processing method and equipment
CN110851058B (en) Page virtual scrolling method, device and equipment
CN112036236A (en) GhostNet-based detection model training method, device and medium
CN110263050B (en) Data processing method, device, equipment and storage medium
CN108614693B (en) Processing method, device and equipment for page component
CN110262749B (en) Webpage operation method, device, container, equipment and medium
CN112528614A (en) Table editing method and device and electronic equipment
CN107368236B (en) Method and device for displaying titles in information directory
CN112364074A (en) Time sequence data visualization method, equipment and medium
CN111538667A (en) Page testing method and device
CN116245051A (en) Simulation software rendering method and device, storage medium and electronic equipment
CN107885443B (en) Information processing method and device
CN112000329B (en) Data display method, device, equipment and medium
CN108563412B (en) Numerical value change display method and device
CN114283268A (en) Three-dimensional model processing method, device, equipment and medium
CN113360154A (en) Page construction method, device, equipment and readable medium
CN111596946A (en) Recommendation method, device and medium for intelligent contracts of block chains
CN112434486B (en) Automatic paging method, device, equipment and medium for device in PCB design
CN114546554B (en) Control display method, device and equipment
CN111651450B (en) Block copy method, device, equipment and medium based on block chain
CN113391780A (en) Page information display method, device, equipment and readable medium
CN113391868A (en) Page information display method, device, equipment and readable medium
CN107015792B (en) Method and equipment for realizing chart unified animation
CN114296590A (en) Page navigation method, device, equipment and storage medium applied to visual terminal

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
TA01 Transfer of patent application right

Effective date of registration: 20220714

Address after: 100190 Beijing Haidian District Zhichun Road 49 No. 3 West 309

Applicant after: TENCENT CLOUD COMPUTING (BEIJING) Co.,Ltd.

Address before: 100102 rooms 1901-1903, 19th floor, building 19, District 7, Wangjing East Garden, Chaoyang District, Beijing

Applicant before: Beijing Guangqiyuan Digital Technology Co.,Ltd.

TA01 Transfer of patent application right