Method, device, electronic device and storage medium for protecting graphic shapes in documents

By reading and managing the protected shape attribute information of graphics in office software, and prohibiting graphic shape editing operations, the problem that graphic shapes in documents are easily changed by mistake is solved, and the user experience and protection effect are improved.

CN112115501BActive Publication Date: 2024-10-15ZHUHAI KINGSOFT OFFICE SOFTWARE +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201910482894.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-06-04
Publication Date
2024-10-15
Estimated Expiration
2039-06-04

AI Technical Summary

Technical Problem

In office software, the shapes of graphics in documents are easily changed due to operational errors, resulting in a poor user experience, especially when multiple graphics overlap and it is difficult to avoid misoperations.

Method used

By receiving the graphic selection command and reading its protected shape attribute information, and judging whether it is valid based on the attribute value preset by the user, if it is valid, the graphic shape editing operation is prohibited, and the editing permission is controlled by displaying a password dialog box or modifying the attribute value to ensure Graphic shape protection.

Benefits of technology

It effectively reduces misoperation of graphic shapes, improves user experience, ensures that specific graphic shapes are not accidentally modified, and meets users' needs for graphic protection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112115501B_ABST
    Figure CN112115501B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides a method, device, electronic device and storage medium for protecting graphic shapes in a document, which can read the protected shape attribute information of the current graphic after receiving a selection instruction for the current graphic; determine whether the attribute value of the protected shape attribute of the graphic is valid or invalid; the attribute value of the protected shape attribute is pre-set by the user; if valid, prohibit the graphic shape editing operation. It can be seen that by applying the embodiment of the present invention, if the attribute value of the protected shape attribute of a selected graphic is valid, the graphic shape editing operation can be prohibited, thereby reducing the misoperation of the graphic shape and 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 protection of graphic shapes in documents, and in particular to a method, device, electronic equipment and storage medium for protecting graphic shapes in documents. Background Art

[0002] Currently, when editing a document in office software, as long as the document is opened, the shape of the graphics in the document can be changed. Sometimes, the shape of the graphics does not want to be changed, but due to operational errors, for example, two graphics 1 and 2 in the document partially overlap, when the shape of the graphics 1 is to be edited, the shape of the graphics 2 may be changed due to operational errors.

[0003] In actual applications, there are often situations in which multiple graphics need to overlap in documents edited by users. It is difficult to avoid the above-mentioned misoperation of graphic shapes, and the user experience is not good enough. Summary of the invention

[0004] The purpose of the embodiments of the present invention is to provide a method, device, electronic device and storage medium for protecting graphic shapes in a document, so as to reduce the user's misoperation on the graphic shapes and improve the user experience. The specific technical solution is as follows:

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

[0006] After receiving the selection instruction for the current graphic, read the protection shape attribute information of the current graphic;

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

[0008] If valid, the graphical shape editing operation is prohibited.

[0009] Optional,

[0010] The attribute value of the protection shape attribute is preset using the following steps:

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

[0012] If a graphic shape protection state change instruction is received, the protection shape attribute information of the current graphic is read;

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

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

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

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

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

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

[0019] Optionally, if the protection shape attribute value of the current graphic is invalid, the step of modifying the protection shape attribute value of the current graphic to be valid comprises:

[0020] If the protection shape attribute of the current graphic is invalid, a password setting dialog box is displayed;

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

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

[0023] If the protection shape attribute of the current graphic is valid, a password input dialog box is displayed;

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

[0025] Optionally, the step of prohibiting the graphic shape editing operation if valid includes:

[0026] If the attribute value of the protected shape attribute of the graphic is valid, displaying a password input dialog box;

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

[0028] If not, the graphic shape editing operation is prohibited;

[0029] If yes, the protection shape attribute value of the current graphic is modified to be invalid, and the graphic shape editing operation is started.

[0030] Optionally, the graphic shape editing operation includes:

[0031] Graphics reshape operations and vertex editing operations;

[0032] The step of prohibiting the graphic shape editing operation if it is valid comprises:

[0033] The graphic shape change operation button and the edit vertex operation button on the document editing interface are displayed as invalid.

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

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

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

[0037] A shape editing prohibition module is used to prohibit the graphic shape editing operation if it is valid.

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

[0039] The attribute value preset module includes:

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

[0041] an attribute information reading unit, configured to read the protection shape attribute information of the current graphic if a graphic shape protection state change instruction is received;

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

[0043] A first modifying unit, configured to modify the protection shape attribute value of the current graphic to be valid if the protection shape attribute value of the current graphic is invalid;

[0044] The second modifying unit is used to modify the protection shape attribute value of the current graphic to invalid if the protection shape attribute value of the current graphic is valid.

[0045] Optionally, the change instruction receiving and judging unit is specifically configured to:

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

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

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

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

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

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

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

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

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

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

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

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

[0058] The shape editing prohibition unit is used to prohibit the graphic shape editing operation if no;

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

[0060] Optionally, the graphic shape editing operation includes:

[0061] Graphic shape replacement operations and vertex editing operations;

[0062] The shape editing prohibition module is specifically used for:

[0063] The graphic shape change operation button and the edit vertex operation button on the document editing interface are displayed as invalid.

[0064] 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;

[0065] Memory, used to store computer programs;

[0066] A processor is used to implement any method step described in the claim document for protecting a graphic shape when executing a program stored in a memory.

[0067] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored therein, which, when executed by a processor, implements any of the method steps described in the claim document for protecting a graphic shape.

[0068] The method, device, electronic device and storage medium for protecting graphic shapes in documents provided by the embodiments of the present invention can read the protected shape attribute information of the current graphic after receiving a selection instruction for the current graphic; determine whether the attribute value of the protected shape attribute of the graphic is valid or invalid; the attribute value of the protected shape attribute is pre-set by the user; if valid, prohibit the graphic shape editing operation. It can be seen that by applying the embodiments of the present invention, if the attribute value of the protected shape attribute of a selected graphic is valid, the graphic shape editing operation can be prohibited, thereby reducing erroneous operations on the graphic shape and improving the user experience.

[0069] 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

[0070] 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.

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

[0072] Figure 1b For application Figure 1a An example diagram of an interface after the illustrated embodiment;

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

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

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

[0076] 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.

[0077] In order to reduce users' erroneous operations on graphic shapes, for example, in actual applications, when there are multiple overlapping graphics in a document edited by a user, when the user edits the graphic shape of one or some graphics, it is possible that other graphics that do not want to change their shapes are edited due to operational errors, and to improve user experience, the embodiments of the present invention provide a method, device, electronic device and storage medium for protecting graphic shapes in a document.

[0078] The method for protecting graphic shapes in a document provided by the embodiment of the present invention can be applied to any electronic device that needs to protect graphic shapes 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.

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

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

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

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

[0083] It is feasible that the attribute value of the protection shape attribute can be preset by the following steps:

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

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

[0086] Step S103, prohibiting the graphic shape editing operation.

[0087] It is feasible to prohibit the graphic shape editing operation of the current graphic. The graphic shape editing operation may specifically include a graphic shape change operation and a vertex editing operation. In a specific implementation, if valid, the graphic shape change operation button and the vertex editing operation button on the document editing interface may be displayed as invalid. It is feasible that when it is detected that the ctrl+1 shortcut key is pressed, the operation related to shape editing may be shielded when the format menu is called up. The method of prohibiting the shape editing operation of the current graphic is not specifically limited here. For example: the shape change operation button and the vertex editing operation button are displayed in gray. In the case where the graphic shape change operation button is displayed as valid, when it is detected that the user clicks the graphic shape change operation button, the shape of the self-selected graphic is displayed to allow the user to select the graphic shape to be changed, and the current graphic shape is changed to the graphic shape selected by the user according to the graphic shape selected by the user; in the case where the vertex editing operation button is displayed as valid, when it is detected that the user clicks the vertex editing operation button, the shape of the current graphic is changed according to the user's dragging operation on the graphic vertex.

[0088] Step S104, starting the graphic shape editing operation.

[0089] Optionally, if invalid, the graphic shape editing operation may be enabled.

[0090] It can be seen that, by applying the embodiment of the present invention, if the attribute value of the protection shape attribute of a selected graphic is valid, the editing operation of the graphic shape can be prohibited, thereby reducing the erroneous operation of the graphic shape and improving the user experience. Figure 1b As shown in the display interface 100, for two graphics with overlapping parts, graphics A and graphics B, the user can set the attribute value of the protected shape attribute of the graphic A whose shape needs to be changed to invalid, and set the attribute value of the protected shape attribute of the graphic B to valid. Figure 1b As shown, the user can only edit the shape of the graphic A. After selecting the graphic B, the change shape operation button 101 and the edit vertex operation button 102 in the menu bar are displayed in gray. Therefore, the shape of the graphic B cannot be edited, thereby reducing misoperation.

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

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

[0093] 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.

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

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

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

[0097] Step S203, reading the protection shape attribute information of the current graphic.

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

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

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

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

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

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

[0104] It is feasible that if the user sets a password, the electronic device can first 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 shape attribute value of the current graphic can also be modified to be valid.

[0105] When the user changes the protected shape attribute value of the current graphic to valid and sets a password, if other people do not know the password, they will not be able to edit the graphic shape. For example: after user A edits the document, he hopes that other users can modify the text content, but does not want others to modify the graphic shape. The existing technology that protects the entire document cannot meet this user demand, and the user experience is not good enough. Therefore, using this method, you can only prohibit others from editing the graphic shape without affecting the editing of other content in the document, thereby improving the user experience.

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

[0107] Step S207: prohibit the graphic shape editing operation. The process ends.

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

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

[0110] In step S204, when the result of judging whether the attribute value of the protection shape attribute of the current graphic is valid or invalid is valid, a password input dialog box is displayed to allow the user to input a password.

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

[0112] 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 protected shape attribute of the current graphic was changed from invalid to valid.

[0113] 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.

[0114] Step S210: prohibit the graphic shape editing operation. The process ends.

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

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

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

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

[0119] Step S212, start the graphic shape editing operation. The process ends.

[0120] Step S213, reading the protection shape attribute information of the current graphic.

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

[0122] Step S214, determining whether the attribute value of the protection shape attribute of the graphic is valid or invalid.

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

[0124] Step S215, start the graphic shape editing operation. The process ends.

[0125] Step S216: display a dialog box for inputting a password.

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

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

[0128] 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.

[0129] Step S218: prohibit the graphic shape editing operation. The process ends.

[0130] Step S219, modifying the protection shape attribute value of the current graphic to be invalid. Execute step S215.

[0131] In actual applications, if a user sends a document to others for review and revision, but hopes that the shapes of certain graphics in the document will not be modified, for example, the shapes of certain graphics in the document are used to express important information, and changing the shapes of the graphics will change the meaning of the document, so these graphics cannot be changed. In the prior art, the user can either allow others to modify the entire document or not modify it at all, but it is impossible to specify that only the shapes of the graphics cannot be modified.

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

[0133] It can be seen that, by applying the embodiment of the present invention, if the attribute value of the protection shape attribute of a selected graphic is valid, the editing operation of the graphic shape can be prohibited, thereby reducing erroneous operations on the graphic shape and improving user experience.

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

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

[0136] An attribute information determination module 302 is used to determine whether an attribute value of a protection shape attribute of the graphic is valid or invalid; the attribute value of the protection shape attribute is preset by the user;

[0137] The shape editing prohibition module 303 is used to prohibit the graphic shape editing operation if it is valid.

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

[0139] The attribute value preset module includes:

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

[0141] an attribute information reading unit, configured to read the protection shape attribute information of the current graphic if a graphic shape protection state change instruction is received;

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

[0143] A first modifying unit, configured to modify the protection shape attribute value of the current graphic to be valid if the protection shape attribute value of the current graphic is invalid;

[0144] The second modifying unit is used to modify the protection shape attribute value of the current graphic to invalid if the protection shape attribute value of the current graphic is valid.

[0145] Optionally, the change instruction receiving and judging unit is specifically configured to:

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

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

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

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

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

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

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

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

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

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

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

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

[0158] The shape editing prohibition unit is used to prohibit the graphic shape editing operation if no;

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

[0160] Optionally, the graphic shape editing operation includes:

[0161] Graphic shape replacement operations and vertex editing operations;

[0162] The shape editing prohibition module is specifically used for:

[0163] The graphic shape change operation button and the edit vertex operation button on the document editing interface are displayed as invalid.

[0164] It can be seen that, by applying the embodiment of the present invention, if the attribute value of the protection shape attribute of a selected graphic is valid, the editing operation of the graphic shape can be prohibited, thereby reducing erroneous operations on the graphic shape and improving user experience.

[0165] The embodiment of the present invention further provides an electronic device, such as Figure 4 As 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.

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

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

[0168] After receiving the selection instruction for the current graphic, read the protection shape attribute information of the current graphic;

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

[0170] If valid, the graphical shape editing operation is prohibited.

[0171] 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.

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

[0173] 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.

[0174] 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.

[0175] In another embodiment provided by 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 graphic shapes in any of the above documents are implemented.

[0176] 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 graphic shapes in any document in the above embodiments.

[0177] 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.

[0178] 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.

[0179] 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.

[0180] 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 graphic shapes in a document, characterized in that: The method comprises: After receiving a selection instruction from a user for a current graphic, determining whether a graphic shape protection state change instruction has been received, and reading protection shape attribute information of the current graphic; Determine whether the attribute value of the protection shape attribute of the current graphic is valid or invalid; the attribute value of the protection shape attribute is preset by the user; If a graphic shape protection state change instruction is received, and the attribute value of the protection shape attribute of the current graphic is valid, the attribute value of the protection shape attribute of the current graphic is modified to be invalid, and the shape editing operation of the current graphic is started; If a graphic shape protection state change instruction is received, and the attribute value of the protection shape attribute of the current graphic is invalid, the attribute value of the protection shape attribute of the current graphic is modified to be valid, and the shape editing operation of the current graphic is prohibited; If no graphic shape protection state change instruction is received, and the attribute value of the protection shape attribute of the current graphic is valid, the shape editing operation of the current graphic is prohibited; If no graphic shape protection state change instruction is received, and the attribute value of the protection shape attribute of the current graphic is invalid, then starting the shape editing operation of the current graphic; The attribute value of the protection shape attribute is preset by the following steps: After receiving the selection instruction for the current graphic, determining whether a graphic shape protection state change instruction is received; If a graphic shape protection state change instruction is received, the protection shape attribute information of the current graphic is read; Determine whether the attribute value of the protection shape attribute of the current graphic is valid or invalid; If the protection shape attribute value of the current graphic is invalid, a password setting dialog box is displayed to save the password set by the user, and the protection shape attribute value of the current graphic is modified to be valid; If the protection shape attribute value of the current graphic is valid, a password input dialog box is displayed to determine whether the input password is a password pre-set by the user, and if so, the protection shape attribute value of the current graphic is modified to be invalid; If the attribute value of the protected shape attribute of the current graphic is valid, the step of prohibiting the shape editing operation of the current graphic comprises: If the attribute value of the protection shape attribute of the current graphic is valid, a password input dialog box is displayed; Determine whether the input password is a password pre-set by the user; If not, prohibiting the shape editing operation of the current graphic; If yes, the attribute value of the protection shape attribute of the current graphic is modified to be invalid, and the shape editing operation of the current graphic is started.

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

3. The method according to any one of claims 1 to 2, characterized in that: The shape editing operation includes: Graphics reshape operations and vertex editing operations; If the attribute value of the protected shape attribute of the current graphic is valid, the step of prohibiting the shape editing operation of the current graphic comprises: The graphic shape change operation button and the edit vertex operation button on the document editing interface are displayed as invalid.

4. A device for protecting graphic shapes in a document, characterized in that: The device comprises: The attribute information reading module is used to determine whether a graphic shape protection state change instruction is received after receiving a selection instruction from a user for the current graphic, and read the protection shape attribute information of the current graphic; An attribute information judgment module, used to judge whether the attribute value of the protection shape attribute of the current graphic is valid or invalid; the attribute value of the protection shape attribute is preset by the user; a shape editing start module, for, if a graphic shape protection state change instruction is received and the attribute value of the protection shape attribute of the current graphic is valid, modifying the attribute value of the protection shape attribute of the current graphic to invalid and starting the shape editing operation of the current graphic; and, if no graphic shape protection state change instruction is received and the attribute value of the protection shape attribute of the current graphic is invalid, starting the shape editing operation of the current graphic; a shape editing prohibition module, configured to, if a graphic shape protection state change instruction is received and the attribute value of the protection shape attribute of the current graphic is invalid, modify the attribute value of the protection shape attribute of the current graphic to be valid and prohibit the shape editing operation of the current graphic; and, if no graphic shape protection state change instruction is received and the attribute value of the protection shape attribute of the current graphic is valid, prohibit the shape editing operation of the current graphic; The device further comprises: an attribute value preset module; The attribute value preset module includes: A change instruction receiving and judging unit, used to judge whether a graphic shape 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 shape attribute information of the current graphic if a graphic shape protection state change instruction is received; An attribute information determination unit, used to determine whether the attribute value of the protection shape attribute of the current graphic is valid or invalid; A first modifying unit is used to display a password setting dialog box, save the password set by the user, and modify the protection shape attribute value of the current graphic to be valid if the protection shape attribute value of the current graphic is invalid; A second modifying unit is used for, if the protection shape attribute value of the current graphic is valid, displaying a password input dialog box to determine whether the input password is a password pre-set by the user, and if so, modifying the protection shape attribute value of the current graphic to invalid; The shape editing prohibition module includes: a password dialog box display unit, a password judgment unit, a shape 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 shape attribute of the current graphic is valid; The password determination unit is used to determine whether the input password is a password pre-set by the user; The shape editing prohibition unit is used to prohibit the graphic shape editing operation if no; The third modification unit is used to modify the attribute value of the protection shape attribute of the current graphic to invalid if yes, and start the shape editing operation of the current graphic.

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

6. The device according to any one of claims 4 to 5, characterized in that: The shape editing operation includes: Graphic shape replacement operations and vertex editing operations; The shape editing prohibition module is specifically used for: The graphic shape change operation button and the edit vertex operation button on the document editing interface are displayed as invalid.

7. 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 3 when executing a program stored in a memory.

8. 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 3 are implemented.