Method, device, electronic device and storage medium for protecting graphic position in document

By reading and judging the protected position attribute information of graphics, and prohibiting editing operations when valid, combined with password protection, the problem of the inability to accurately protect the position of graphics in documents is solved, thus improving the user experience.

CN112115685BActive Publication Date: 2024-11-08ZHUHAI KINGSOFT OFFICE SOFTWARE +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201910482268.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-06-04
Publication Date
2024-11-08
Estimated Expiration
2039-06-04

AI Technical Summary

Technical Problem

Existing technologies cannot accurately protect the position of graphics in documents, resulting in a poor user experience and failing to prevent the position of graphics from being arbitrarily changed in certain situations.

Method used

After receiving the selection command, the protected position attribute information of the graphic is read to determine its validity. If it is valid, position editing operations are prohibited. Combined with a password protection mechanism, this ensures that the position of the graphic is not changed arbitrarily.

Benefits of technology

It protects the location of specified graphics, preventing unauthorized alterations, improving user experience, and ensuring that only authorized users can edit them.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112115685B_ABST
    Figure CN112115685B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides a method, device, electronic device and storage medium for protecting the position of a graphic in a document, which can read the protection position attribute information of the current graphic after receiving a selection instruction for the current graphic; determine whether the attribute value of the protection position attribute of the graphic is valid or invalid; the attribute value of the protection position attribute is pre-set by the user; if valid, the position editing operation of the current graphic is prohibited. It can be seen that by applying the embodiment of the present invention, if the attribute value of the protection position attribute of a selected current graphic is valid, the position editing operation of the current graphic can be prohibited, so that the position of the specified graphic cannot be changed at will, thereby improving the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of protecting graphic positions in documents, and in particular to a method, device, electronic device and storage medium for protecting graphic positions in documents. Background Art

[0002] At present, when editing a document in office software, as long as the document is opened, the position of the graphics in the document can be changed. However, in some cases, users do not want the position of the graphics to be changed at will. For example, the position of some graphics is close to the text description of the graphics. If the position of the graphics is changed, the reader may not be able to find the corresponding graphics when reading the text description of the graphics. Therefore, the position of these graphics is not desired to be changed at will. In the prior art, users either allow others to modify the entire text or cannot modify it at all, but it is impossible to specify that only the position of the graphics cannot be modified at will, and the user experience is not high enough. Summary of the invention

[0003] The purpose of the embodiments of the present invention is to provide a method, device, electronic device and storage medium for protecting the position of a graphic in a document, so that the position of a specified graphic cannot be changed at will, thereby improving the user experience. The specific technical solution is as follows:

[0004] In a first aspect, the present invention provides a method for protecting a graphic position in a document, the method comprising:

[0005] After receiving the selection instruction for the current graphic, reading the protection position attribute information of the current graphic;

[0006] Determining whether the attribute value of the protection position attribute of the graphic is valid or invalid; the attribute value of the protection position attribute is preset by the user;

[0007] If valid, the position editing operation of the current graphic is prohibited.

[0008] Optionally, the attribute value of the protection location attribute is preset using the following steps:

[0009] After receiving the selection instruction for the current graphic, determining whether a graphic position protection state change instruction is received;

[0010] If a graphic position protection state change instruction is received, reading the protection position attribute information of the current graphic;

[0011] Determine whether the attribute value of the protection position attribute of the current graphic is valid or invalid;

[0012] If the attribute value of the protection position attribute of the current graphic is invalid, modifying the attribute value of the protection position attribute of the current graphic to be valid;

[0013] If the attribute value of the protection position attribute of the current graphic is valid, the attribute value of the protection position attribute of the current graphic is modified to be invalid.

[0014] Optionally, the step of determining whether a graphic position protection state change instruction is received includes:

[0015] Determine whether the graphic position protection state change button preset in the document display interface is clicked;

[0016] Or determine whether the graphic position protection status change button in the right-click menu is clicked.

[0017] Optionally, if the attribute value of the protection position attribute of the current graphic is invalid, the step of modifying the attribute value of the protection position attribute of the current graphic to be valid includes:

[0018] If the attribute value of the protection position attribute of the current graphic is invalid, displaying a password setting dialog box;

[0019] Save the password set by the user, and modify the attribute value of the protection position attribute of the current graphic to be valid;

[0020] The step of modifying the attribute value of the protection position attribute of the current graphic to be invalid if the attribute value of the protection position attribute of the current graphic is valid comprises:

[0021] If the attribute value of the protection position attribute of the current graphic is valid, a password input dialog box is displayed;

[0022] It is determined whether the input password is a password pre-set by the user; if so, the attribute value of the protection position attribute of the current graphic is modified to be invalid.

[0023] Optionally, the step of prohibiting the position editing operation of the current graphic if valid includes:

[0024] If the attribute value of the protection position attribute of the graphic is valid, displaying a password input dialog box;

[0025] Determine whether the input password is a password pre-set by the user;

[0026] If not, the position editing operation of the current graphic is prohibited;

[0027] If so, the attribute value of the protection position attribute of the current graphic is modified to be invalid, and the position editing operation of the current graphic is responded to.

[0028] Optionally, the step of prohibiting the position editing operation of the current graphic if valid includes:

[0029] If valid, the graphic position change operation button on the document editing interface is displayed as invalid, does not respond to the mouse dragging operation of the current graphic, or shields the position movement keys or shortcut keys on the keyboard.

[0030] In a second aspect, the present invention provides a device for protecting a graphic position in a document, the device comprising:

[0031] An attribute information reading module, configured to read the protection position attribute information of the current graphic after receiving a selection instruction for the current graphic;

[0032] An attribute information judgment module, used to judge whether the attribute value of the protection position attribute of the graphic is valid or invalid; the attribute value of the protection position attribute is preset by the user;

[0033] The position editing prohibition module is used to prohibit the position editing operation of the current graphic if it is valid.

[0034] Optionally, the device further includes: an attribute value preset module;

[0035] The attribute value preset module includes:

[0036] A change instruction receiving and judging unit, used to judge whether a graphic position protection state change instruction is received after receiving a selection instruction for the current graphic;

[0037] An attribute information reading unit, configured to read the protection position attribute information of the current graphic if a graphic position protection state change instruction is received;

[0038] An attribute information determination unit, used to determine whether the attribute value of the protection position attribute of the current graphic is valid or invalid;

[0039] a first modifying unit, configured to modify the attribute value of the protection position attribute of the current graphic to be valid if the attribute value of the protection position attribute of the current graphic is invalid;

[0040] The second modifying unit is configured to modify the attribute value of the protection position attribute of the current graphic to be invalid if the attribute value of the protection position attribute of the current graphic is valid.

[0041] Optionally, the change instruction receiving and judging unit is specifically used to:

[0042] Determine whether the graphic position protection state change button preset in the document display interface is clicked;

[0043] Or determine whether the graphic position protection status change button in the right-click menu is clicked.

[0044] Optionally, the first modifying unit includes: a first display subunit and a first modifying subunit;

[0045] The first display subunit is used to display a password setting dialog box if the attribute value of the protection position attribute of the current graphic is invalid;

[0046] The first modification subunit is used to save the password set by the user and modify the attribute value of the protection position attribute of the current graphic to be valid;

[0047] The second modification unit includes: a second display subunit, a first password determination subunit and a second modification subunit;

[0048] The second display subunit is used to display a password input dialog box if the attribute value of the protection position attribute of the current graphic is valid;

[0049] The first password determination subunit is used to determine whether the input password is a password pre-set by the user;

[0050] The second modification subunit is used to modify the attribute value of the protection position attribute of the current graphic to invalid if yes.

[0051] Optionally, the location editing prohibition module includes: a password dialog box display unit, a password judgment unit, a location editing prohibition unit and a third modification unit;

[0052] The password dialog box display unit is used to display a password input dialog box if the attribute value of the protection position attribute of the graphic is valid;

[0053] The password determination unit is used to determine whether the input password is a password pre-set by the user;

[0054] The position editing prohibition unit is used to prohibit the position editing operation of the current graphic if no;

[0055] The third modification unit is used to modify the attribute value of the protection position attribute of the current graphic to invalid if yes, and respond to the position editing operation of the current graphic.

[0056] Optionally, the location editing prohibition module is specifically used to:

[0057] If valid, the graphic position change operation button on the document editing interface is displayed as invalid, does not respond to the mouse dragging operation of the current graphic, or shields the position movement keys or shortcut keys on the keyboard.

[0058] In a third aspect, the present invention provides an electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;

[0059] Memory, used to store computer programs;

[0060] The processor is used to implement any method step of the above-mentioned method for protecting the position of graphics in the document when executing the program stored in the memory.

[0061] In a fourth aspect, the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps of any one of the methods described in the above-mentioned method for protecting a graphic position in a document are implemented.

[0062] In a fifth aspect, an embodiment of the present invention further provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute any of the above-mentioned methods for protecting the location of graphics in a document.

[0063] The method, device, electronic device and storage medium for protecting the position of a graphic in a document provided by the embodiments of the present invention can read the protection position attribute information of the current graphic after receiving a selection instruction for the current graphic; determine whether the attribute value of the protection position attribute of the graphic is valid or invalid; the attribute value of the protection position attribute is pre-set by the user; if valid, the position editing operation of the current graphic is prohibited. It can be seen that by applying the embodiments of the present invention, if the attribute value of the protection position attribute of a selected current graphic is valid, the position editing operation of the current graphic can be prohibited, so that the position of the specified graphic cannot be changed at will, thereby improving the user experience.

[0064] Of course, it is not necessary to achieve all of the advantages described above at the same time to implement any product or method of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0065] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0066] Figure 1 A flow chart of a method for protecting a graphic position in a document provided by an embodiment of the present invention;

[0067] Figure 2 Another flow chart of a method for protecting a graphic position in a document provided by an embodiment of the present invention;

[0068] Figure 3 A schematic diagram of the structure of a device for protecting a graphic position in a document provided by an embodiment of the present invention;

[0069] Figure 4 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0070] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0071] In order to prevent the designated graphic position from being arbitrarily changed and improve the user experience, the embodiments of the present invention provide a method, device, electronic device and storage medium for protecting the graphic position in a document.

[0072] The method for protecting the position of a graphic in a document provided by the embodiment of the present invention can be applied to any electronic device that needs to protect the position of a graphic in a document, such as a computer or a mobile terminal, etc., and is not specifically limited here. For the convenience of description, it is hereinafter referred to as an electronic device.

[0073] The method for protecting the position of a graphic in a document provided by the embodiment of the present invention is as follows: Figure 1 As shown, the specific processing flow of the method includes:

[0074] Step S101, after receiving a selection instruction for a current graphic, read the protection position attribute information of the current graphic.

[0075] It is feasible that after receiving the selection instruction for the current graphic, the electronic device reads the protection position attribute information of the current graphic.

[0076] Step S102, determining whether the attribute value of the protection position attribute of the graphic is valid or invalid; the attribute value of the protection position attribute is preset by the user.

[0077] Optionally, the attribute value of the protected location attribute may be preset by the following steps:

[0078] After receiving a selection instruction for the current graphic, determine whether a graphic position protection status change instruction is received; if a graphic position protection status change instruction is received, read the protection position attribute information of the current graphic; determine whether the attribute value of the protection position attribute of the current graphic is valid or invalid; if the attribute value of the protection position attribute of the current graphic is invalid, modify the attribute value of the protection position attribute of the current graphic to valid; if the attribute value of the protection position attribute of the current graphic is valid, modify the attribute value of the protection position attribute of the current graphic to invalid.

[0079] If the result of the judgment is valid, step S103 is executed; if the result of the judgment is invalid, step S104 is executed.

[0080] Step S103, prohibiting the position editing operation of the current graphic.

[0081] It is feasible to prohibit the graphic position editing operation of the current graphic. In a specific implementation, if effective, the graphic position change operation button on the document editing interface can be displayed as invalid, not responding to the mouse dragging operation of the current graphic, or shielding the position moving key or shortcut key on the keyboard. It is feasible that when it is detected that the ctrl+1 shortcut key is pressed, the position editing operation can also be shielded when the format menu is called up. The method of prohibiting the position editing operation of the current graphic is not specifically limited here.

[0082] Step S104, responding to the position editing operation of the current graphic.

[0083] It is feasible that, if invalid, the position editing operation of the current graphic can be responded to.

[0084] It can be seen that by applying the embodiment of the present invention, if the attribute value of the protection position attribute of a selected current graphic is valid, the position editing operation of the current graphic can be prohibited, so that the position of the specified graphic cannot be changed arbitrarily, thereby improving the user experience.

[0085] Another flow chart of the method for protecting the position of graphics in a document provided by an embodiment of the present invention is as follows: Figure 2 As shown, including:

[0086] Step S201, receiving a selection instruction for the current graphic.

[0087] In practice, the user can click the left button of the mouse at any position of the current graphic to select the current graphic. The electronic device can receive a selection instruction for the current graphic.

[0088] Step S202, determining whether a graphic position protection state change instruction is received.

[0089] In practice, the electronic device can determine whether a graphic position protection state change instruction is received. In a specific implementation, it can determine whether a graphic position protection state change button preset in the document display interface is clicked; or determine whether a graphic position protection state change button in the right-click menu of the mouse is clicked.

[0090] If the result of the judgment is yes, that is, the graphic position protection state change instruction is received, step S203 is executed; if the result of the judgment is no, that is, the graphic position protection state change instruction is not received, step S213 is executed.

[0091] Step S203, reading the protection position attribute information of the current graphic.

[0092] It is feasible to read the protection position attribute information of the current graphic selected by the user.

[0093] Step S204, determining whether the attribute value of the protection position attribute of the current graphic is valid or invalid.

[0094] If the result of the judgment is invalid, execute step S205; if the result of the judgment is valid, execute step S208.

[0095] Step S205: display a password setting dialog box.

[0096] Optionally, a password setting dialog box is displayed to enable the user to set a password.

[0097] Step S206, saving the password set by the user, and modifying the attribute value of the protection position attribute of the current graphic to be valid.

[0098] It is feasible that if the user sets a password, the electronic device can encrypt the password set by the user and store it in the password storage location to prevent the directly stored number from being easily stolen by others, which is unsafe. The protection position attribute value of the current graphic can also be modified to be valid.

[0099] When the user changes the protection position attribute value of the current graphic to valid, a password is set. If others do not know the password, they cannot edit the graphic position. For example, after user A edits the document, he wants other users to modify the text content, but does not want others to modify the graphic position. In this way, you can only prohibit others from editing the graphic position without affecting the editing of other content in the document, which improves the user experience.

[0100] Through the above steps S205 and S206, the protection position attribute information of the current graphic is changed from invalid to valid, that is, the graphic position protection state is changed from an unprotected state to a protected state.

[0101] Step S207: prohibit the graphic position editing operation. The process ends.

[0102] It is feasible that step S207 may be the same as step S103, and will not be described in detail here.

[0103] Step S208: display a password input dialog box.

[0104] It is feasible that, when the result of judging whether the attribute value of the protection position attribute of the current graphic is valid or invalid in step S204 is valid, a password input dialog box is displayed to allow the user to input a password.

[0105] Step S209, determining whether the input password is a password pre-set by the user.

[0106] It is feasible to determine whether the input password is a password previously set by the user. Specifically, it is possible to determine whether the password input this time is the same as the password previously set when the attribute value of the protection position attribute of the current graphic was changed from invalid to valid.

[0107] If the result of the judgment is no, that is, the input password is not a password pre-set by the user, then step S210 is executed; if the result of the judgment is yes, that is, the input password is a password pre-set by the user, then step S211 is executed.

[0108] Step S210, prohibiting the editing operation of the current graphic position. The process ends.

[0109] Step S211, modifying the attribute value of the protection position attribute of the current graphic to be invalid.

[0110] It is feasible that if the input password is a password pre-set by the user, the protection position attribute value of the current graphic may be modified to be invalid.

[0111] Through the above steps S209 and S211, the protection position attribute information of the current graphic is changed from valid to invalid, that is, the graphic position protection state is changed from a protected state to an unprotected state.

[0112] In this embodiment, in order to further protect the graphic position from being modified arbitrarily, a protection password can be set in the process of changing the protection position attribute from invalid to valid, so that users without the password cannot change the protection position attribute from valid to invalid.

[0113] Step S212, responding to the position editing operation of the current graphic. The process ends.

[0114] Step S213, reading the protection position attribute information of the current graphic.

[0115] It is feasible that in step S202, in the step of determining whether a graphic position protection state change instruction is received, if the determination result is no, this step is executed to read the protection position attribute information of the current graphic.

[0116] Step S214, determining whether the attribute value of the protection position attribute of the current graphic is valid or invalid.

[0117] If the result of the judgment is invalid, then execute step S215. If the result of the judgment is valid, then execute step S216.

[0118] Step S215, responding to the position editing operation of the current graphic. The process ends.

[0119] Step S216: display a password input dialog box.

[0120] Step S217, determining whether the input password is a password pre-set by the user.

[0121] It is feasible to determine whether the input password is a password pre-set by the user.

[0122] If the result of the judgment is no, that is, the input password is not a password pre-set by the user, then execute step S218; if the result of the judgment is yes, that is, the input password is a password pre-set by the user, then execute step S219.

[0123] Step S218: prohibit the position editing operation of the current graphic. The process ends.

[0124] Step S219, modifying the attribute value of the protection position attribute of the current graphic to be invalid. Executing step S215.

[0125] By applying this embodiment, when a user selects a graphic and performs an editing operation on the graphic's position, a password input dialog box may be displayed. By judging whether the input password is a password pre-set by the user, it is judged whether the current user has the editing authority for the graphic's position. If the password is correct, the protected position attribute value of the current graphic is modified to be invalid; if the password is incorrect, the editing operation of the current graphic's position is prohibited. In this way, unauthorized users are prevented from editing the graphic's position, thereby improving the user experience.

[0126] It can be seen that by applying the embodiment of the present invention, if the attribute value of the protection position attribute of a selected current graphic is valid, the position editing operation of the current graphic can be prohibited, so that the position of the specified graphic cannot be changed arbitrarily, thereby improving the user experience.

[0127] A schematic diagram of the structure of a device for protecting a graphic position in a document provided by an embodiment of the present invention is shown in FIG. Figure 3 As shown, the device comprises:

[0128] The attribute information reading module 301 is used to read the protection position attribute information of the current graphic after receiving the selection instruction for the current graphic;

[0129] The attribute information determination module 302 is used to determine whether the attribute value of the protection position attribute of the graphic is valid or invalid; the attribute value of the protection position attribute is preset by the user;

[0130] The position editing prohibition module 303 is used to prohibit the position editing operation of the current graphic if it is valid.

[0131] Optionally, the device further includes: an attribute value preset module;

[0132] The attribute value preset module includes:

[0133] A change instruction receiving and judging unit, used to judge whether a graphic position protection state change instruction is received after receiving a selection instruction for the current graphic;

[0134] An attribute information reading unit, configured to read the protection position attribute information of the current graphic if a graphic position protection state change instruction is received;

[0135] An attribute information determination unit, used to determine whether the attribute value of the protection position attribute of the current graphic is valid or invalid;

[0136] a first modifying unit, configured to modify the attribute value of the protection position attribute of the current graphic to be valid if the attribute value of the protection position attribute of the current graphic is invalid;

[0137] The second modifying unit is configured to modify the attribute value of the protection position attribute of the current graphic to be invalid if the attribute value of the protection position attribute of the current graphic is valid.

[0138] Optionally, the change instruction receiving and judging unit is specifically used to:

[0139] Determine whether the graphic position protection state change button preset in the document display interface is clicked;

[0140] Or determine whether the graphic position protection status change button in the right-click menu is clicked.

[0141] Optionally, the first modifying unit includes: a first display subunit and a first modifying subunit;

[0142] The first display subunit is used to display a password setting dialog box if the attribute value of the protection position attribute of the current graphic is invalid;

[0143] The first modification subunit is used to save the password set by the user and modify the attribute value of the protection position attribute of the current graphic to be valid;

[0144] The second modification unit includes: a second display subunit, a first password determination subunit and a second modification subunit;

[0145] The second display subunit is used to display a password input dialog box if the attribute value of the protection position attribute of the current graphic is valid;

[0146] The first password determination subunit is used to determine whether the input password is a password pre-set by the user;

[0147] The second modification subunit is used to modify the attribute value of the protection position attribute of the current graphic to invalid if yes.

[0148] Optionally, the location editing prohibition module includes: a password dialog box display unit, a password judgment unit, a location editing prohibition unit and a third modification unit;

[0149] The password dialog box display unit is used to display a password input dialog box if the attribute value of the protection position attribute of the graphic is valid;

[0150] The password determination unit is used to determine whether the input password is a password pre-set by the user;

[0151] The position editing prohibition unit is used to prohibit the position editing operation of the current graphic if no;

[0152] The third modification unit is used to modify the attribute value of the protection position attribute of the current graphic to invalid if yes, and respond to the position editing operation of the current graphic.

[0153] Optionally, the location editing prohibition module is specifically used to:

[0154] If valid, the graphic position change operation button on the document editing interface is displayed as invalid, does not respond to the mouse dragging operation of the current graphic, or shields the position movement keys or shortcut keys on the keyboard.

[0155] It can be seen that by applying the embodiment of the present invention, if the attribute value of the protection position attribute of a selected current graphic is valid, the position editing operation of the current graphic can be prohibited, so that the position of the specified graphic cannot be changed arbitrarily, thereby improving the user experience.

[0156] The embodiment of the present invention further provides an electronic device, such as Figure 4As shown, it includes a processor 401, a communication interface 402, a memory 403 and a communication bus 404, wherein the processor 401, the communication interface 402, and the memory 403 communicate with each other through the communication bus 404.

[0157] Memory 403, used for storing computer programs;

[0158] The processor 401 is used to execute the program stored in the memory 403 to implement the following steps:

[0159] After receiving the selection instruction for the current graphic, reading the protection position attribute information of the current graphic;

[0160] Determining whether the attribute value of the protection position attribute of the graphic is valid or invalid; the attribute value of the protection position attribute is preset by the user;

[0161] If valid, the position editing operation of the current graphic is prohibited.

[0162] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0163] The communication interface is used for communication between the above electronic device and other devices.

[0164] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0165] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0166] In another embodiment of the present invention, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the steps of the method for protecting a graphic position in any of the above documents are implemented.

[0167] In another embodiment provided by the present invention, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute the method for protecting the position of a graphic in a document in any of the above embodiments.

[0168] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can 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 the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center 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 can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.

[0169] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0170] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for embodiments such as devices, electronic devices, computer-readable storage media, and computer program products, since they are basically similar to method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0171] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection 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

1. A method for protecting a graphic position in a document, characterized in that: The method comprises: After receiving a selection instruction from a user for a current graphic in a document, reading the protection position attribute information of the current graphic, wherein receiving the selection instruction includes: when the user clicks at any position of the current graphic to select the current graphic, receiving the selection instruction; Determining whether the attribute value of the protection position attribute of the current graphic is valid or invalid; the attribute value of the protection position attribute is preset by the user; If valid, the position editing operation of the current graphic is prohibited; If invalid, respond to the position editing operation of the current graphic; The attribute value of the protection location attribute is preset using the following steps: After receiving the selection instruction for the current graphic, determining whether a graphic position protection state change instruction is received; If a graphic position protection state change instruction is received, reading the protection position attribute information of the current graphic; Determine whether the attribute value of the protection position attribute of the current graphic is valid or invalid; If the attribute value of the protection position attribute of the current graphic is invalid, modifying the attribute value of the protection position attribute of the current graphic to be valid; If the operation is valid, the step of prohibiting the position editing operation of the current graphic comprises: If valid, the graphic position change operation button on the document editing interface is displayed as invalid, does not respond to the mouse dragging operation of the current graphic, or shields the position movement keys or shortcut keys on the keyboard.

2. The method according to claim 1, characterized in that The step of determining whether a graphic position protection state change instruction is received comprises: Determine whether the graphic position protection state change button preset in the document display interface is clicked; Or determine whether the graphic position protection status change button in the right-click menu is clicked.

3. The method according to claim 1, characterized in that: If the attribute value of the protection position attribute of the current graphic is invalid, the step of modifying the attribute value of the protection position attribute of the current graphic to be valid comprises: If the attribute value of the protection position attribute of the current graphic is invalid, displaying a password setting dialog box; The password set by the user is saved, and the attribute value of the protection position attribute of the current graphic is modified to be valid.

4. The method according to claim 3, characterized in that The step of prohibiting the position editing operation of the current graphic if it is valid comprises: If the attribute value of the protection position attribute of the graphic is valid, displaying a password input dialog box; Determine whether the input password is a password pre-set by the user; If not, the position editing operation of the current graphic is prohibited; If so, the attribute value of the protection position attribute of the current graphic is modified to be invalid, and the position editing operation of the current graphic is responded to.

5. A device for protecting a graphic position in a document, characterized in that: The device comprises: The attribute information reading module is used to read the protection position attribute information of the current graphic after receiving the user's selection instruction for the current graphic in the document; the attribute information reading module is specifically used to receive the selection instruction when the user clicks at any position of the current graphic to select the current graphic; An attribute information judgment module, used to judge whether the attribute value of the protection position attribute of the current graphic is valid or invalid; the attribute value of the protection position attribute is preset by the user; A position editing prohibition module, used for prohibiting the position editing operation of the current graphic if it is valid; A position editing response module, used for responding to the position editing operation of the current graphic if any is invalid; The device also includes: an attribute value preset module; The attribute value preset module includes: A change instruction receiving and judging unit, used to judge whether a graphic position protection state change instruction is received after receiving a selection instruction for the current graphic; An attribute information reading unit, configured to read the protection position attribute information of the current graphic if a graphic position protection state change instruction is received; An attribute information determination unit, used to determine whether the attribute value of the protection position attribute of the current graphic is valid or invalid; a first modifying unit, configured to modify the attribute value of the protection position attribute of the current graphic to be valid if the attribute value of the protection position attribute of the current graphic is invalid; The position editing prohibition module is specifically used for: If valid, the graphic position change operation button on the document editing interface is displayed as invalid, does not respond to the mouse dragging operation of the current graphic, or shields the position movement keys or shortcut keys on the keyboard.

6. The device according to claim 5, characterized in that The change instruction receiving and judging unit is specifically used to: Determine whether the graphic position protection state change button preset in the document display interface is clicked; Or determine whether the graphic position protection status change button in the right-click menu is clicked.

7. The device according to claim 5, characterized in that The first modifying unit includes: a first display subunit and a first modifying subunit; The first display subunit is used to display a password setting dialog box if the attribute value of the protection position attribute of the current graphic is invalid; The first modification subunit is used to save the password set by the user and modify the attribute value of the protection position attribute of the current graphic to be valid.

8. The device according to claim 7, characterized in that The position editing prohibition module includes: a password dialog box display unit, a password judgment unit, a position editing prohibition unit and a third modification unit; The password dialog box display unit is used to display a password input dialog box if the attribute value of the protection position attribute of the graphic is valid; The password determination unit is used to determine whether the input password is a password pre-set by the user; The position editing prohibition unit is used to prohibit the position editing operation of the current graphic if the input password is not a password pre-set by the user; The third modifying unit is used to modify the attribute value of the protection position attribute of the current graphic to invalid if the input password is a password pre-set by the user, and respond to the position editing operation of the current graphic.

9. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing the method steps described in any one of claims 1 to 4 when executing a program stored in a memory.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any one of claims 1 to 4 are implemented.