CN109753641B - Method and device for changing object position, electronic equipment and storage medium - Google Patents

Method and device for changing object position, electronic equipment and storage medium Download PDF

Info

Publication number
CN109753641B
CN109753641B CN201711058756.1A CN201711058756A CN109753641B CN 109753641 B CN109753641 B CN 109753641B CN 201711058756 A CN201711058756 A CN 201711058756A CN 109753641 B CN109753641 B CN 109753641B
Authority
CN
China
Prior art keywords
cell
position information
target position
value
current
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.)
Active
Application number
CN201711058756.1A
Other languages
Chinese (zh)
Other versions
CN109753641A (en
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.)
Beijing Kingsoft Office Software Inc
Zhuhai Kingsoft Office Software Co Ltd
Guangzhou Kingsoft Mobile Technology Co Ltd
Original Assignee
Beijing Kingsoft Office Software Inc
Zhuhai Kingsoft Office Software Co Ltd
Guangzhou Kingsoft Mobile 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 Kingsoft Office Software Inc, Zhuhai Kingsoft Office Software Co Ltd, Guangzhou Kingsoft Mobile Technology Co Ltd filed Critical Beijing Kingsoft Office Software Inc
Priority to CN201711058756.1A priority Critical patent/CN109753641B/en
Publication of CN109753641A publication Critical patent/CN109753641A/en
Application granted granted Critical
Publication of CN109753641B publication Critical patent/CN109753641B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • User Interface Of Digital Computer (AREA)

Abstract

The invention provides a method, a device, electronic equipment and a storage medium for changing the position of an object, and belongs to the field of computers. The method comprises the following steps: receiving a selection instruction from a user, determining an object in a table document, and obtaining current position information of the object; receiving an instruction for changing the position of an object, and acquiring the position information of a target position in a form document; changing the coordinate value of a designated point in the current position information of the object into the coordinate value of the designated point in the position information of the target position, so that the object moves to the target position. The invention can simply, conveniently and accurately adjust the position of the object in the form document, and improves the operation efficiency.

Description

Method and device for changing object position, electronic equipment and storage medium
Technical Field
The present invention relates to the field of computers, and in particular, to a method and apparatus for changing a position of an object.
Background
When editing a table document (such as WPS table, microsoft excel), it is often necessary to suspend optional graphics, text boxes, charts, pictures, etc. in the table document, and position the selected object as a whole, so that the object is aligned or covered with a certain position (target position), thereby making the document look strict and beautiful.
Currently, when adjusting the position of an object, a user is usually required to use a method of manually dragging the object. In the manual adjustment process, due to lower manual operation accuracy, multiple drags are usually required to achieve the purpose, which results in low operation efficiency and time consumption.
Disclosure of Invention
The embodiment of the invention aims to provide a method, a device, electronic equipment and a storage medium for changing the position of an object, which can simply, conveniently and accurately adjust the position of the object in a form document and improve the operation efficiency. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides a method for changing a position of an object, the method including:
receiving a selection instruction from a user, determining an object in a table document, and obtaining current position information of the object;
receiving an instruction for changing the position of an object, and acquiring the position information of a target position in the form document;
changing the coordinate value of the appointed point in the current position information of the object into the coordinate value of the appointed point in the position information of the target position, so that the object moves to the target position.
Specifically, when the target position is a cell, the coordinate value of the specified point in the position information of the target position is: the vertex coordinate value of the one cell;
when the target position is a cell region composed of two or more cells, the specified point coordinate value in the position information of the target position is: and the vertex coordinate value of the cell area.
Specifically, the vertex coordinate value is an upper left corner vertex coordinate value, an upper right corner vertex coordinate value, a lower left corner vertex coordinate value, or a lower right corner vertex coordinate value of the cell or the cell region.
Specifically, when the target position is a cell area composed of two or more cells, the position information of the target position further includes: a width value of the cell region and a height value of the cell region;
the current position information of the object further comprises: a current width value of the object and a current height value of the object.
Specifically, when the target position is a cell region composed of two or more cells, the method further includes:
changing the current width value of the object and the current height value of the object into the width value of the cell area and the height value of the cell area respectively, so that the object covers the cell area.
In a second aspect, an embodiment of the present invention provides an apparatus for changing a position of an object, the apparatus including:
the first receiving module is used for receiving a selection instruction from a user, determining an object in a table document and obtaining the current position information of the object;
the second receiving module is used for receiving an instruction for changing the position of the object and acquiring the position information of the target position in the form document;
and the changing module is used for changing the coordinate value of the appointed point in the current position information of the object into the coordinate value of the appointed point in the position information of the target position, so that the object moves to the target position.
Specifically, when the target position is a cell, the coordinate value of the specified point in the position information of the target position is: the vertex coordinate value of the one cell;
when the target position is a cell region composed of two or more cells, the specified point coordinate value in the position information of the target position is: and the vertex coordinate value of the cell area.
Specifically, the vertex coordinate value is an upper left corner vertex coordinate value, an upper right corner vertex coordinate value, a lower left corner vertex coordinate value, or a lower right corner vertex coordinate value of the cell or the cell region.
Specifically, when the target position is a cell area composed of two or more cells, the position information of the target position further includes: a width value of the cell region and a height value of the cell region;
the current position information of the object further comprises: a current width value of the object and a current height value of the object.
Specifically, when the target position is a cell area composed of two or more cells, the modification module is further configured to:
changing the current width value of the object and the current height value of the object into the width value of the cell area and the height value of the cell area respectively, so that the object covers the cell area.
In order to achieve the above object, the embodiment of the present invention further discloses an electronic device, where the electronic device includes a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
the memory is used for storing a computer program;
the processor is configured to implement the method steps for changing the position of the object according to the first aspect when executing the program stored in the memory.
In a fourth aspect, in order to achieve the above object, an embodiment of the present invention further discloses a computer readable storage medium, in which a computer program is stored, which when being executed by a processor, implements the method steps for changing the position of an object as described in the first aspect.
The invention provides a method, a device, electronic equipment and a storage medium for changing the position of an object. Because the position information of the object is directly changed from the data layer, the position of the object in the form document can be simply, conveniently and accurately adjusted, and the operation efficiency is improved. Of course, it is not necessary for any one product or method of practicing the invention to achieve all of the advantages set forth above at the same time.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a method for changing the position of an object according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of an object before moving when a target location is a cell according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of an object after moving when a target location is a cell according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of an object before moving when a target location provided in an embodiment of the present invention is a cell area;
FIG. 5 is a schematic diagram of an object after moving when a target location provided in an embodiment of the present invention is a cell area;
FIG. 6 is a schematic diagram of an apparatus for changing the position of an object according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The following first describes a method for changing the position of an object according to an embodiment of the present invention.
As shown in fig. 1, fig. 1 is a flowchart of a method for changing a position of an object according to an embodiment of the present invention, including the following steps:
step 101, receiving a selection instruction from a user, determining an object in the table document, and obtaining the current position information of the object.
In implementation, a user may install an application program for editing a table, for example, WPS table, microsoft excel, etc., at a terminal such as a computer or a mobile phone, and may edit and typeset contents such as pictures and text boxes in a table document. The object related to the invention can be a self-selected graph, a text box, an artistic word, a picture and the like in the table document, can be suspended in the table document, and can be selected as a whole. When the user needs to adjust the position of the object, the user needs to select the object first. At this time, the terminal may receive a selection instruction from the user, determine an object to be adjusted, and acquire current position information of the object. The current position information of the object includes coordinate values of a specified point of the object, which can be used to determine a specific position of the object, and when the coordinate values of the specified point are changed, the position of the object is changed accordingly.
Step 102, receiving an instruction for changing the position of the object, and obtaining the position information of the target position in the form document.
In implementation, a toolbar or a menu bar may be provided in an interface of the application program, an option for changing the position of the object may be provided in the toolbar or the menu bar, and the terminal receives an instruction for changing the position of the object when the user selects the option. After the user selects this option, a target location may be selected in the form document, for example, clicking on a cell with a mouse or framing a cell region consisting of two or more cells. The terminal obtains the position information of the target position according to the target position selected by the user, wherein the position information of the target position comprises the coordinate value of a designated point of the target position, and the coordinate value of the designated point is used for determining the specific position of the target position. In addition, after the user selects the option of changing the object position, the user may directly input the position information of the target position in the dialog box of changing the object position, and the terminal may acquire the position information of the target position according to the position information of the target position input by the user.
And step 103, changing the coordinate value of the designated point in the current position information of the object into the coordinate value of the designated point in the position information of the target position, so that the object moves to the target position.
In implementation, after the terminal obtains the current position information of the object and the position information of the target position, the terminal may change the coordinate value of the designated point in the current position information of the object to the coordinate value of the designated point in the position information of the target position, so that the object may be moved to the target position, and the designated point of the object may cover the designated point of the target position.
In the solution provided by the embodiment of the present invention, the target position may be one cell or a cell area composed of two or more cells. Each cell occupies one unit in the form document, and the terminal determines whether the target position is one cell or a cell area by calculating the total number of the occupied units of the target position. When the target position is a cell, the coordinate value of the designated point in the position information of the target position is: the vertex coordinate value of the cell or the coordinate value of any point contained in the cell; when the target position is a cell region composed of two or more cells, the specified point coordinate value in the position information of the target position is: the vertex coordinate values of the cell region or the coordinate values of any point included in the cell region. The designated point of the target location is used to determine the specific location of the target location.
As can be seen from the above, the target location may be a cell or a cell area, and the user may select according to the actual needs.
In the solution provided by the embodiment of the present invention, the obtained vertex coordinate value of the cell or the cell region may be an upper left corner vertex coordinate value, an upper right corner vertex coordinate value, a lower left corner vertex coordinate value, or a lower right corner vertex coordinate value of the cell or the cell region.
In practice, the shape of the target location is generally rectangular, having four vertices, an upper left corner vertex, an upper right corner vertex, a lower left corner vertex, and a lower right corner vertex, respectively. For example, when the target position is a rectangular cell region composed of two or more rectangular cells, the rectangular cell region has four vertices whose vertex coordinate values are the vertex coordinate values of the cell region. The terminal may determine the target position according to coordinate values of any one of vertices of the target position and coordinate data of a preset table document, the coordinate data including data of a coordinate origin position of the table document, a width value and a height value of a single cell, and the like. For example, after the terminal obtains the coordinate value of the top left corner vertex of a cell and the coordinate data of the preset table document, the top left corner vertex coordinate value of the object can be changed into the top left corner vertex coordinate value of the cell, the object can move to the cell position, and the top left corner vertex of the object covers the top left corner vertex of the cell. The principle is the same when other vertices are chosen as the specified points.
From the above, the coordinate value of the top left corner of the target position is adopted as the coordinate value of the designated point in the position information of the target position, so that the self attribute of the table document (the top left corner of each target position is the top left corner of the target position, and the other three vertexes can be regarded as the top left corner vertexes of the adjacent target positions) is met, and the algorithm of the invention can be simplified.
In the solution provided in the embodiment of the present invention, when the target position is a cell area formed by two or more cells, the position information of the target position further includes: a width value of the cell region and a height value of the cell region; the current position information of the object further includes: a current width value of the object and a current height value of the object.
In the implementation, when the target position is a cell region composed of two or more cells, the obtained target position information includes a width value and a height value of the cell region in addition to the specified point coordinate values of the cell region. Correspondingly, the current position information of the object comprises the current width value and the current height value of the object besides the coordinate value of the appointed point of the object.
In the scheme provided by the embodiment of the invention, when the target position is the cell area, the current width value of the object and the current height value of the object are respectively changed into the width value of the cell area and the height value of the cell area, so that the object covers the cell area.
In an implementation, when detecting that the target position is a cell region, the terminal changes coordinate values, width values and height values of specified points in the current position information of the object into corresponding numerical values in the position information of the cell region after acquiring the current position information of the object and the position information of the cell region. In this way, the object can be moved to the cell area, and the object can be stretched or compressed according to the size of the cell area, so that the size of the object is equal to the size of the cell area, and the object can cover the cell area.
As can be seen from the above, when the target position is a cell region, not only the position but also the size of the object can be changed. This increases the utility of the invention because when the target location is a cell, the user typically only needs to adjust the location of the object, and does not need to adjust the size of the object. If the size of the object needs to be adjusted, the target position can be selected as the cell area, so that the position of the object can be changed, and the size of the object can be changed.
Alternatively, when the target position is a cell, the position information of the target position may also include a specified point coordinate value of the cell, a width value of the cell, and a height value of the cell, and when the position information of the object is changed, the specified point coordinate value, the width value, and the height value of the object are changed to the corresponding values of the cell. The object is moved to the cell and the cell is covered.
In an implementation, when the target position is detected to be one cell, after the current position information of the object and the position information of the cell are acquired, coordinate values, width values and height values of a specified point in the current position information of the object are respectively changed into corresponding numerical values in the position information of the cell. Thus, the object can be moved to the cell, and the object can be stretched or compressed according to the size of the cell, so that the size of the object is equal to the size of the cell, and the object can cover the cell. .
The following provides schematic effects of the method provided by the embodiment of the invention when the target position is a cell and a cell area. As shown in FIG. 2, the target location is a cell B2 in the form document, the object is a rectangle picture inserted in the form document, and the object is located in rows 5 to 9 of columns E and F before moving. As shown in fig. 3, the object is moved to the cell B2 according to the original size, and the top left vertex of the object covers the top left vertex of the cell B2. The specific treatment process comprises the following steps: after a user selects a picture in a table document, the terminal acquires current position information of the picture, wherein the position information can comprise the top left corner vertex coordinate value (EX, EY) of the picture; then the user selects an option for changing the position of the object from the menu bar or the tool bar, and selects the cell B2, the terminal receives an instruction for changing the position of the object, and determines the position information of the cell B2 selected by the user, wherein the position information can be the top left corner vertex coordinate value (B2X, B2Y) of the cell B2; finally, the terminal displays a dialog box for prompting whether to change the position of the object, and after the user selects to confirm the position of the change object in the prompting dialog box, the terminal changes the top left corner vertex coordinate value (EX, EY) of the picture into (B2X, B2Y). The picture is thus moved to cell B2 as it is and the top left corner vertex of the picture covers the top left corner vertex of cell B2.
As shown in fig. 4, the target position is a cell area composed of cells B2, B3, B4, B5, C2, C3, C4, C5, and the object is a rectangular picture inserted in the table document, and the object is located in the 6 th to 11 th rows of the E-column and the F-column before moving. As shown in fig. 5, the object is moved to the selected cell area, the top left corner vertex of the object covers the top left corner vertex of the cell area, and the width and height values of the object are changed to the width and height values of the cell area, and the object just covers the entire cell area. The specific treatment process comprises the following steps: a user selects a picture in a table document, and a terminal acquires current position information of the picture, wherein the position information can comprise a top left corner vertex coordinate value (EX, EY) of the picture, a current width value L1 of the picture and a current height value L2 of the picture; then the user selects an option for changing the position of the object from a menu bar or a tool bar, and frames a cell area consisting of cells B2, B3, B4, B5, C2, C3, C4 and C5, the terminal receives an instruction for changing the position of the object and determines the position information of the cell area selected by the user, wherein the position information can be the top left corner vertex coordinate value (B2X, B2Y) of the cell area, the width value L3 of the cell area and the height value L4 of the cell area; finally, the terminal displays a dialog box for prompting whether to change the position of the object, and after the user selects to confirm the position of the change object in the prompting dialog box, the terminal changes the top left corner vertex coordinate value (FX, FY) of the picture, the current width value L1 of the picture and the current height value L2 of the picture into (B2X, B2Y), L3 and L4 respectively. The picture is then moved to the selected cell region, the top-left corner vertex of the picture covers the top-left corner vertex of the cell region, and the width value and the height value of the picture are equal to the width value and the height value of the cell region, respectively.
The method for changing the object position provided by the embodiment of the invention can receive the selection instruction from the user, determine the object in the table document, obtain the current position information of the object, then receive the instruction for changing the object position, obtain the position information of the target position in the table document, and change the coordinate value of the appointed point in the current position information of the object into the coordinate value of the appointed point in the position information of the target position, so that the object moves to the target position. Therefore, the position information of the object is directly changed from the data layer, the position of the object in the form document can be simply, conveniently and accurately adjusted, and the operation efficiency is improved.
Based on the same technical concept, corresponding to the method embodiment shown in fig. 1, the embodiment of the present invention further provides an apparatus for changing the position of an object, as shown in fig. 6, where the apparatus includes:
a first receiving module 601, configured to receive a selection instruction from a user, determine an object in a table document, and obtain current location information of the object;
a second receiving module 602, configured to receive an instruction for changing a position of an object, and obtain position information of a target position in the table document;
and a changing module 603, configured to change a coordinate value of a specified point in the current position information of the object to a coordinate value of a specified point in the position information of the target position, so that the object moves to the target position.
Specifically, when the target position is a cell, the coordinate value of the specified point in the position information of the target position is: the vertex coordinate value of the one cell;
when the target position is a cell region composed of two or more cells, the specified point coordinate value in the position information of the target position is: and the vertex coordinate value of the cell area.
In the scheme provided by the embodiment of the invention, the target position can be a cell or a cell area, and the user can select according to actual needs.
Specifically, the vertex coordinate value is an upper left corner vertex coordinate value, an upper right corner vertex coordinate value, a lower left corner vertex coordinate value, or a lower right corner vertex coordinate value of the cell or the cell region.
In the scheme provided by the embodiment of the invention, the coordinate value of the top left corner vertex of the target position is used as the coordinate value of the appointed point in the position information of the target position, so that the self attribute of the form document is met (the top left corner vertex of each target position is the top left corner vertex of the target position, and the other three vertexes can be regarded as the top left corner vertexes of adjacent target positions), and the algorithm of the invention can be simplified.
Specifically, when the target position is a cell area composed of two or more cells, the position information of the target position further includes: a width value of the cell region and a height value of the cell region;
the current position information of the object further comprises: a current width value of the object and a current height value of the object.
Specifically, when the target position is a cell area composed of two or more cells, the modification module is further configured to: changing the current width value of the object and the current height value of the object into the width value of the cell area and the height value of the cell area respectively, so that the object covers the cell area.
In the scheme provided by the embodiment of the invention, when the target position is the cell area, not only the position of the object can be changed, but also the size of the object can be changed. This increases the utility of the invention because when the target location is a cell, the user typically only needs to adjust the location of the object, and does not need to adjust the size of the object. If the size of the object needs to be adjusted, the target position can be selected as the cell area, so that the position of the object can be changed, and the size of the object can be changed.
The device for changing the object position provided by the embodiment of the invention can receive the selection instruction from the user, determine the object in the table document, obtain the current position information of the object, then receive the instruction for changing the object position, obtain the position information of the target position in the table document, and change the coordinate value of the appointed point in the current position information of the object into the coordinate value of the appointed point in the position information of the target position, so that the object moves to the target position. Therefore, the position information of the object is directly changed from the data layer, the position of the object in the form document can be simply, conveniently and accurately adjusted, and the operation efficiency is improved.
The embodiment of the present invention further provides an electronic device, as shown in fig. 7, including a processor 701, a communication interface 702, a memory 703 and a communication bus 704, where the processor 701, the communication interface 702, and the memory 703 perform communication with each other through the communication bus 704,
a memory 703 for storing a computer program;
the processor 701 is configured to implement the method for changing the object position according to the embodiment of the present invention when executing the program stored in the memory 703.
Specifically, the method for changing the position of the object includes:
receiving a selection instruction from a user, determining an object in a table document, and obtaining current position information of the object;
receiving an instruction for changing the position of an object, and acquiring the position information of a target position in the form document;
changing the coordinate value of the appointed point in the current position information of the object into the coordinate value of the appointed point in the position information of the target position, so that the object moves to the target position.
It should be noted that other implementation manners of the method for changing the object position are partially the same as those of the foregoing method embodiment, and are not repeated here.
The communication bus of the electronic device may be a peripheral component interconnect standard (Peripheral Component Interconnect, abbreviated as PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, abbreviated as EISA) bus, etc. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface is used for communication between the electronic device and other devices.
The memory may include random access memory (Random Access Memory, RAM) or non-volatile memory (non-volatile memory), such as at least one disk memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU for short), a network processor (Network Processor, NP for short), etc.; but also digital signal processors (Digital Signal Processing, DSP for short), application specific integrated circuits (Application Specific Integrated Circuit, ASIC for short), field programmable gate arrays (Field Programmable Gate Array, FPGA for short) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
In yet another embodiment of the present invention, a computer readable storage medium is provided, in which instructions are stored, which when run on a computer, cause the computer to perform the method of changing the position of an object according to any of the above embodiments.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present invention, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, by wired (e.g., coaxial cable, optical fiber, digital Subscriber Line (DSL)), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk (SSD)), etc.
The invention provides a method, a device, electronic equipment and a storage medium for changing the position of an object. Because the position information of the object is directly changed from the data layer, the position of the object in the form document can be simply, conveniently and accurately adjusted, and the operation efficiency is improved. Of course, it is not necessary for any one product or method of practicing the invention to achieve all of the advantages set forth above at the same time.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, 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 one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, as relevant to see a section of the description of method embodiments.
The foregoing description is only of the preferred embodiments of the present invention and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims (8)

1. A method of altering the position of an object in a form document, the method comprising:
receiving a selection instruction from a user, determining an object in a table document, and obtaining current position information of the object, wherein the object is a self-selected graph, a text box, an artistic word or a picture suspended in the table document;
receiving an instruction for changing the position of an object, and acquiring the position information of a target position in the form document;
when the target position is a cell region composed of two or more cells, the position information of the target position further includes: a width value of the cell region and a height value of the cell region; the current position information of the object further comprises: a current width value of the object and a current height value of the object; the specified point coordinate values in the position information of the target position are as follows: vertex coordinate values of the cell areas;
changing the coordinate value of a specified point in the current position information of the object into the coordinate value of a specified point in the position information of the target position according to the preset coordinate data of the table document and the coordinate value of the specified point in the position information of the target position, so that the object moves to the target position; wherein the coordinate data of the table document includes: the coordinate origin position of the table document, the width value and the height value of each cell;
changing the current width value of the object and the current height value of the object into the width value of the cell area and the height value of the cell area respectively, so that the object covers the cell area.
2. The method according to claim 1, characterized in that:
when the target position is a cell, the coordinate value of the designated point in the position information of the target position is: the vertex coordinate value of the one cell.
3. The method of claim 2, wherein the vertex coordinate values are top-left corner vertex coordinate values, or top-right corner vertex coordinate values, or bottom-left corner vertex coordinate values, or bottom-right corner vertex coordinate values of the cell or the cell region.
4. An apparatus for altering the position of an object in a form document, the apparatus comprising:
the first receiving module is used for receiving a selection instruction from a user, determining an object in a table document and obtaining the current position information of the object; wherein the object is a self-selected graphic, text box, artistic word or picture suspended in the form document;
the second receiving module is used for receiving an instruction for changing the position of the object and acquiring the position information of the target position in the form document;
when the target position is a cell region composed of two or more cells, the position information of the target position further includes: a width value of the cell region and a height value of the cell region; the current position information of the object further comprises: a current width value of the object and a current height value of the object; the specified point coordinate values in the position information of the target position are as follows: vertex coordinate values of the cell areas;
a changing module, configured to change a specified point coordinate value in current position information of the object to a specified point coordinate value in position information of the target position according to preset coordinate data of the table document and specified point coordinate values in position information of the target position, so that the object moves to the target position; wherein the coordinate data of the table document includes: the coordinate origin position of the table document, the width value and the height value of each cell;
the modification module is further configured to: changing the current width value of the object and the current height value of the object into the width value of the cell area and the height value of the cell area respectively, so that the object covers the cell area.
5. The apparatus according to claim 4, wherein:
when the target position is a cell, the coordinate value of the designated point in the position information of the target position is: the vertex coordinate value of the one cell.
6. The apparatus of claim 5, wherein the vertex coordinate values are top-left vertex coordinate values, or top-right vertex coordinate values, or bottom-left vertex coordinate values, or bottom-right vertex coordinate values of the cell or the cell region.
7. An electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface, the memory complete communication with each other through the communication bus;
the memory is used for storing a computer program;
the processor being adapted to carry out the steps of the method according to any one of claims 1-3 when executing a program stored on the memory.
8. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a computer program which, when executed by a processor, implements the steps of the method of any of claims 1-3.
CN201711058756.1A 2017-11-01 2017-11-01 Method and device for changing object position, electronic equipment and storage medium Active CN109753641B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711058756.1A CN109753641B (en) 2017-11-01 2017-11-01 Method and device for changing object position, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711058756.1A CN109753641B (en) 2017-11-01 2017-11-01 Method and device for changing object position, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109753641A CN109753641A (en) 2019-05-14
CN109753641B true CN109753641B (en) 2023-11-28

Family

ID=66398996

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711058756.1A Active CN109753641B (en) 2017-11-01 2017-11-01 Method and device for changing object position, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109753641B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112035848A (en) * 2019-06-04 2020-12-04 珠海金山办公软件有限公司 Method and device for protecting graphic text content, electronic equipment and storage medium
CN112115485A (en) * 2019-06-04 2020-12-22 珠海金山办公软件有限公司 Method and device for protecting width and height of graph in document, electronic equipment and storage medium
CN110609993A (en) * 2019-09-18 2019-12-24 北京字节跳动网络技术有限公司 Table adjusting method and equipment
CN113723049A (en) * 2020-05-25 2021-11-30 珠海金山办公软件有限公司 Document content interval adjusting method and device, electronic equipment and storage medium
CN112784543A (en) * 2020-06-08 2021-05-11 北京金山办公软件股份有限公司 Picture adjusting method, device, equipment and storage medium
CN113065176B (en) * 2021-04-08 2023-02-28 深圳市格林兄弟科技有限公司 Object attachment method, device, equipment and computer readable storage medium
CN113204557B (en) * 2021-05-21 2024-02-13 北京字跳网络技术有限公司 Electronic form importing method, device, equipment and medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5544288A (en) * 1993-04-15 1996-08-06 International Business Machines Corporation Object resizing and repositioning for a new font in a graphical user interface
CN1841361A (en) * 2005-03-31 2006-10-04 微软公司 Scrollable and re-sizeable formula bar
JP2008204173A (en) * 2007-02-20 2008-09-04 Seiko Epson Corp Document editing device, program, and storage medium
CN101944179A (en) * 2009-07-01 2011-01-12 佳能株式会社 Image processing apparatus and image processing method
CN105683946A (en) * 2013-06-15 2016-06-15 微软技术许可有限责任公司 Seamless grid and canvas integration in a spreadsheet application
CN106033349A (en) * 2015-03-20 2016-10-19 广州金山移动科技有限公司 Object position adjusting method and device
CN106354395A (en) * 2016-09-28 2017-01-25 厦门印天电子科技有限公司 Method of inserting multimedia object in interactive whiteboard software to 2D sheet
CN106663088A (en) * 2014-12-04 2017-05-10 谷歌公司 Efficient copy paste in collaborative spreadsheet

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8166385B2 (en) * 2008-08-27 2012-04-24 The Board Of Trustees Of The Leland Stanford Junior University Spreadsheet system and method for managing photos

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5544288A (en) * 1993-04-15 1996-08-06 International Business Machines Corporation Object resizing and repositioning for a new font in a graphical user interface
CN1841361A (en) * 2005-03-31 2006-10-04 微软公司 Scrollable and re-sizeable formula bar
JP2008204173A (en) * 2007-02-20 2008-09-04 Seiko Epson Corp Document editing device, program, and storage medium
CN101944179A (en) * 2009-07-01 2011-01-12 佳能株式会社 Image processing apparatus and image processing method
CN105683946A (en) * 2013-06-15 2016-06-15 微软技术许可有限责任公司 Seamless grid and canvas integration in a spreadsheet application
CN106663088A (en) * 2014-12-04 2017-05-10 谷歌公司 Efficient copy paste in collaborative spreadsheet
CN106033349A (en) * 2015-03-20 2016-10-19 广州金山移动科技有限公司 Object position adjusting method and device
CN106354395A (en) * 2016-09-28 2017-01-25 厦门印天电子科技有限公司 Method of inserting multimedia object in interactive whiteboard software to 2D sheet

Also Published As

Publication number Publication date
CN109753641A (en) 2019-05-14

Similar Documents

Publication Publication Date Title
CN109753641B (en) Method and device for changing object position, electronic equipment and storage medium
US9141746B1 (en) System and method to drag instance master physical shell
US9600137B2 (en) Providing selection areas for selectable objects in graphical interface
KR101975049B1 (en) Method and apparatus for setting background of ui control, and terminal
CN107844953B (en) Conference file management method, device, terminal and computer readable storage medium
US9298348B2 (en) Mobile device and method for providing widgets
CN106610829B (en) Webpage screenshot method and device
CN108564645B (en) Rendering method of house model, terminal device and medium
US9977581B2 (en) Selection refinement tool
CN111523531A (en) Word processing method and device, electronic equipment and computer readable storage medium
CN109857964B (en) Thermodynamic diagram drawing method and device for page operation, storage medium and processor
AU2015264474A1 (en) Systems and methods for programming behavior of a website to respond to capabilities of different devices
WO2017067459A1 (en) Desktop data loading method and device
US20170017370A1 (en) Device and method for processing data
CN108846883B (en) Quick drawing method and system for fractal graph, user equipment and storage medium
CN110019492B (en) Information display method and device
CN110989893A (en) Click operation response method and device and electronic equipment
CN112233202B (en) Regular polygon drawing method and device, electronic equipment and readable storage medium
CN113934491B (en) Big data processing method and device
CN111814087B (en) Dynamic layout method and device of Web window, electronic equipment and readable storage medium
CN111199144B (en) Document content altering method and device, electronic equipment and readable storage medium
CN111611782B (en) Connection point generation method and device
CN109542573B (en) Scene display method and device
CN110874520B (en) Method and device for removing overlapped paths and terminal equipment
CA3003002A1 (en) Systems and methods for using image searching with voice recognition commands

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
GR01 Patent grant
GR01 Patent grant