CN112115486B - Protection method and device for graphic shape format, electronic equipment and storage medium - Google Patents

Protection method and device for graphic shape format, electronic equipment and storage medium Download PDF

Info

Publication number
CN112115486B
CN112115486B CN201910482271.8A CN201910482271A CN112115486B CN 112115486 B CN112115486 B CN 112115486B CN 201910482271 A CN201910482271 A CN 201910482271A CN 112115486 B CN112115486 B CN 112115486B
Authority
CN
China
Prior art keywords
attribute
shape format
protection
current
shape
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910482271.8A
Other languages
Chinese (zh)
Other versions
CN112115486A (en
Inventor
郑晓琼
吴增谂
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Kingsoft Office Software Inc
Zhuhai Kingsoft Office Software Co Ltd
Original Assignee
Beijing Kingsoft Office Software Inc
Zhuhai Kingsoft Office Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Kingsoft Office Software Inc, Zhuhai Kingsoft Office Software Co Ltd filed Critical Beijing Kingsoft Office Software Inc
Priority to CN201910482271.8A priority Critical patent/CN112115486B/en
Publication of CN112115486A publication Critical patent/CN112115486A/en
Application granted granted Critical
Publication of CN112115486B publication Critical patent/CN112115486B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/604Tools and structures for managing or administering access control systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2149Restricted operating environment

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • Document Processing Apparatus (AREA)

Abstract

The embodiment of the invention provides a method, a device, an electronic device and a storage medium for protecting a graph shape format, which comprise the following steps: when one or more current graphics selected by a user are detected in the document, reading the protection shape format attribute information of each current graphic; respectively judging whether the attribute value of the protection shape format attribute of each current graph is valid or invalid; the attribute value of the protection shape format attribute is preset by a user; for each first current graph with valid attribute values of the protection shape format attribute, prohibiting the graph shape format editing operation; and responding to the graph shape format editing operation for each second current graph with invalid attribute value of the protection shape format attribute. Therefore, by applying the embodiment of the invention, if the attribute value of the protection shape format attribute of a certain selected graph is valid, the editing operation of the graph shape format can be forbidden, the misoperation on the graph shape format is reduced, and the user experience is improved.

Description

Protection method and device for graphic shape format, electronic equipment and storage medium
Technical Field
The present invention relates to the field of protection of graphic shape formats in documents, and in particular, to a method, an apparatus, an electronic device, and a storage medium for protecting graphic shape formats in documents.
Background
Currently, when editing a document in office software, as long as the document is opened, the shape format of graphics in the document can be modified by selecting the graphics, for example: there are 5 self-selected graphics partially overlapped, and when the shape format of 4 graphics is desired to be changed, the user can select the four graphics together in a frame, click the right mouse button in the menu bar appearing, and make a format modification. When these four graphics modification shape formats are selected together, the graphics shape format of this unwanted modification format may sometimes be modified due to a misoperation.
In practical application, the shape format of the graph is sometimes modified due to misoperation, and the user experience is not good enough.
Disclosure of Invention
The embodiment of the invention aims to provide a method and a device for protecting a graphic format in a document, electronic equipment and a storage medium, so as to reduce misoperation on the graphic shape format and improve user experience. The specific technical scheme is as follows:
in a first aspect, the present invention provides a method for protecting a graphic shape format in a document, the method comprising:
Detecting whether a current graph selected by a user exists in the document;
when one or more current graphics selected by a user are detected in the document, reading the protection shape format attribute information of each current graphic;
Respectively judging whether the attribute value of the protection shape format attribute of each current graph is valid or invalid; the attribute value of the protection shape format attribute is preset by a user;
For each first current graph with valid attribute values of the protection shape format attribute, prohibiting the graph shape format editing operation;
and responding to the graph shape format editing operation for each second current graph with invalid attribute value of the protection shape format attribute.
Optionally, the step of detecting whether the document has the current graphic selected by the user includes:
detecting whether the user frame-selected document content contains graphics or not, and determining the graphics in the user frame-selected document content as the current graphics selected by the user; or alternatively, the first and second heat exchangers may be,
And detecting whether a selection instruction aiming at the graph in the document is received, and if so, determining that the graph corresponding to the selection instruction is the current graph selected by the user.
Optionally, the attribute value of the protected shape format attribute is preset by adopting the following steps:
After detecting that one or more current graphics selected by a user exist in the document, judging whether a graphics shape format protection state change instruction is received or not;
if a graphic shape format protection state change instruction is received, respectively reading protection shape format attribute information of each current graphic;
Respectively judging whether the attribute value of the protection shape format attribute of each current graph is valid or invalid;
For each current graph with invalid attribute values of the protection shape format attribute, modifying the protection shape format attribute value of each current graph with invalid attribute values of the protection shape format attribute into valid values;
And modifying the protection shape format attribute values of the current graphics with valid attribute values of the protection shape format attribute into invalid values aiming at the current graphics with valid attribute values of the protection shape format attribute.
Optionally, the step of determining whether a graphics shape format protection state change instruction is received includes:
Judging whether a graphic shape format protection state change button preset on a document display interface is clicked or not; or judging whether a graphic shape format protection state change button in a right button menu of the mouse is clicked.
Optionally, the step of modifying, for each current graph whose attribute value of the protection shape format attribute is invalid, the protection shape format attribute value of each current graph whose attribute value of the protection shape format attribute is invalid to be valid includes:
Displaying a password setting dialog box aiming at the current graph with invalid attribute value of the protected shape format attribute;
storing a password set by a user, and modifying the protection shape format attribute value of the current graph with the invalid attribute value of the protection shape format attribute into valid;
The step of modifying the protection shape format attribute value of each current graph with valid attribute value of the protection shape format attribute to invalid for each current graph with valid attribute value of the protection shape format attribute comprises the following steps:
Displaying an input password dialog box aiming at each current graph with valid attribute values of the protected shape format attribute;
Judging whether the input password is a password preset by a user; and if so, modifying the protection shape format attribute value of each current graph with the valid attribute value of the protection shape format attribute into invalid.
Optionally, the step of prohibiting the graphic shape format editing operation for each first current graphic whose attribute value of the protected shape format attribute is valid includes:
Displaying an input password dialog box aiming at each first current graph with valid attribute values of the protected shape format attribute;
Judging whether the input password is a password preset by a user;
If not, prohibiting the graph shape format editing operation of each first current graph with the attribute value of the protection shape format attribute being valid;
And if so, modifying the protection shape format attribute value of each first current graph with the valid attribute value of the protection shape format attribute into invalid and responding to the graph shape format editing operation.
Optionally, the graphic shape format editing operation includes:
shape filling operation, shape profile operation, and shape effect operation;
the step of prohibiting the editing operation of the graphic shape format for each first current graphic with valid attribute value of the protected shape format attribute comprises the following steps:
And displaying the shape filling operation button, the shape outline operation button and the shape effect operation button on the document editing interface as invalid for each first current graph with valid attribute values of the protection shape format attribute.
In a second aspect, the present invention provides a protection device for a graphic shape format in a document, the device comprising:
the current graphic detection module is used for detecting whether the current graphic selected by the user exists in the document or not;
The attribute information reading module is used for reading the protection shape format attribute information of each current graph when one or more current graphs selected by a user are detected in the document;
the attribute information judging module is used for judging whether the attribute value of the protection shape format attribute of each current graph is valid or invalid respectively; the attribute value of the protection shape format attribute is preset by a user;
The format editing prohibition module is used for prohibiting the editing operation of the graphic shape format aiming at each first current graphic with valid attribute value of the protected shape format attribute;
and the format editing response module is used for responding to the graph shape format editing operation aiming at each second current graph with invalid attribute value of the protection shape format attribute.
Optionally, the current graphic detection module is specifically configured to:
detecting whether the user frame-selected document content contains graphics or not, and determining the graphics in the user frame-selected document content as the current graphics selected by the user; or alternatively, the first and second heat exchangers may be,
And detecting whether a selection instruction aiming at the graph in the document is received, and if so, determining that the graph corresponding to the selection instruction is the current graph selected by the user.
Optionally, the apparatus further includes: an attribute value presetting module;
The attribute value presetting module comprises:
A change instruction receiving judging unit for judging whether a graphic shape format protection state change instruction is received after detecting one or more current graphics selected by a user in the document;
an attribute information reading unit, configured to, if a graphic shape format protection state change instruction is received, respectively read protection shape format attribute information of each current graphic;
an attribute information judging unit for judging whether the attribute value of the protection shape format attribute of each current graph is valid or invalid;
A first modification unit, configured to modify, for each current graphic whose attribute value of a protection shape format attribute is invalid, a protection shape format attribute value of each current graphic whose attribute value of the protection shape format attribute is invalid to be valid;
and the second modification unit is used for modifying the protection shape format attribute value of each current graph with the valid attribute value of the protection shape format attribute into invalid for each current graph with the valid attribute value of the protection shape format attribute.
Optionally, the change instruction receiving and judging unit is specifically configured to:
Judging whether a graphic shape preservation format protection state change button preset on a document display interface is clicked or not; or judging whether a graphic shape format protection state change button in a right button menu of the mouse is clicked.
Optionally, the first modification unit includes: a first display subunit and a first modification subunit;
The first display subunit is configured to display a password setting dialog box for a current graphic with an invalid attribute value of the protected shape format attribute;
the first modification subunit is configured to store a password set by a user, and modify a protection shape format attribute value of a current graphic whose attribute value of the protection shape format attribute is invalid into valid;
the second modification unit includes: a second display subunit, a first password determination subunit, and a second modification subunit;
the second display subunit is configured to display an input password dialog box for each current graphic for which the attribute value of the protected shape format attribute is valid;
the first password judging subunit is used for judging whether the input password is a password preset by a user;
And the second modification subunit is configured to modify, if so, the protection shape format attribute values of the current graphics with valid attribute values of the protection shape format attribute to be invalid.
Optionally, the format editing prohibition module includes: the device comprises a password dialog box display unit, a password judging unit, a format editing prohibition unit and a format editing response unit;
The password dialog box display unit is used for displaying an input password dialog box aiming at each first current graph with valid attribute values of the protection shape format attribute;
the password judging unit is used for judging whether the input password is a password preset by a user;
The format editing prohibition unit is used for prohibiting the graph shape format editing operation of each first current graph with valid attribute value of the protection shape format attribute if not;
and the format editing response unit is used for modifying the protection shape format attribute value of each first current graph with valid attribute value of the protection shape format attribute into invalid if the protection shape format attribute value is valid, and responding to graph shape format editing operation.
Optionally, the graphic shape format editing operation includes: shape filling operation, shape profile operation, and shape effect operation;
The format editing prohibition module is specifically configured to:
And displaying the shape filling operation button, the shape outline operation button and the shape effect operation button on the document editing interface as invalid for each first current graph with valid attribute values of the protection shape format attribute.
In a third aspect, the present invention provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
A memory for storing a computer program;
a processor for performing any of the method steps recited in the protection of the graphical shape format in the claim document when executing the program stored on the memory.
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, performs any of the method steps of protecting a graphical shape format in a claim document.
The method, the device, the electronic equipment and the storage medium for protecting the graphic shape format in the document can detect whether the current graphic selected by the user exists in the document; when one or more current graphics selected by a user are detected in the document, reading the protection shape format attribute information of each current graphic; respectively judging whether the attribute value of the protection shape format attribute of each current graph is valid or invalid; the attribute value of the protection shape format attribute is preset by a user; for each first current graph with valid attribute values of the protection shape format attribute, prohibiting the graph shape format editing operation; and responding to the graph shape format editing operation for each second current graph with invalid attribute value of the protection shape format attribute. Therefore, by applying the embodiment of the invention, if the attribute value of the protection shape format attribute of a certain selected graph is valid, the editing operation of the graph shape format can be forbidden, the misoperation on the graph shape format is reduced, and the user experience is improved.
Of course, it is not necessary for any one product or method of practicing the invention to achieve all of the advantages set forth above at the same time.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1a is a flowchart of a method for protecting a graphical shape format in a document according to an embodiment of the present invention;
FIG. 1b is a diagram of an exemplary display of a graphic in a document before and after framing;
FIG. 2 is another flowchart of a method for protecting a graphical shape format in a document according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a device for protecting graphic shape formats in a document according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In order to reduce misoperation of a user on a graph shape format and improve user experience, the embodiment of the invention provides a method, a device, electronic equipment and a storage medium for protecting the graph shape format in a document.
The method for protecting the graphic shape format in the document provided by the embodiment of the invention can be applied to any electronic equipment needing to protect the graphic shape format in the document, such as: the computer, the mobile terminal, etc. are not particularly limited herein. For convenience of description, the following is referred to as an electronic device.
The method for protecting the graphic shape format in the document provided by the embodiment of the invention, as shown in fig. 1a, comprises the following specific processing flows:
Step S101, detecting whether the current graph selected by the user exists in the document.
In practice, the electronic device detects whether the document has a current graphic selected by the user. In a specific embodiment, whether the user frame-selected document content contains graphics or not can be detected, and the graphics in the user frame-selected document content are determined to be the current graphics selected by the user; or detecting whether a selected instruction aiming at the graphics in the document is received, and if so, the graphics corresponding to the selected instruction is the current graphics selected by the user.
And step S102, when one or more current graphics selected by a user are detected in the document, reading the protection shape format attribute information of each current graphic.
Step S103, judging whether the attribute value of the protection shape format attribute of each current graph is valid or invalid respectively; the attribute value of the protected shape format attribute is preset by a user.
In practice, the attribute value of the protected shape format attribute may be preset by the following steps:
After detecting that one or more current graphics selected by a user exist in the document, judging whether a graphics shape format protection state change instruction is received or not; if a graphic shape format protection state change instruction is received, respectively reading protection shape format attribute information of each current graphic; respectively judging whether the attribute value of the protection shape format attribute of each current graph is valid or invalid; for each current graph with invalid attribute values of the protection shape format attribute, modifying the protection shape format attribute value of each current graph with invalid attribute values of the protection shape format attribute into valid values; and modifying the protection shape format attribute values of the current graphics with valid attribute values of the protection shape format attribute into invalid values aiming at the current graphics with valid attribute values of the protection shape format attribute.
When the attribute value of the protection shape format attribute of the current graph selected by the user is valid, the current graph executes step S104; when the attribute value of the protected shape format attribute of the current graphic selected by the user is invalid, the current graphic performs step S105.
Step S104, forbidding the editing operation of the graphic shape format aiming at each first current graphic with valid attribute value of the protection shape format attribute.
In the embodiment, the current graphic selected by the user with the attribute value of the protected shape format attribute being valid is used as the first current graphic. And prohibiting the attribute value of the protected shape format attribute from being valid each first current graph, and performing shape format editing operation. Wherein the graphic shape format editing operation includes: shape filling operation, shape contour operation, and shape effect operation. In one specific embodiment of prohibiting the graphical shape format editing operation, the shape filling operation button, the shape outline operation button, and the shape effect operation button on the document editing interface may be displayed as invalid. In practice, when the ctrl+1 shortcut key is detected to be pressed, the operation of editing the related shape format can be shielded when the format menu is called. The manner in which the shape format editing operation of the current graphic is prohibited is not particularly limited herein.
Step S105, responding to the graph shape format editing operation for each second current graph with invalid attribute value of the protection shape format attribute.
As shown in the left hand diagram of fig. 1b, graphics 101, 102, 103, 104 and 105 are partially overlapping. When the graphic shape formats of the graphics 101, 102, 103 and 105 are to be edited, the graphics 101, 102, 103 and 105 need to be selected first, and then the format is modified again, and in this process, the graphics 104 are also selected by mistake and the format is edited easily.
By applying the embodiment of the invention, as long as the attribute value of the graph shape format attribute of the graph 104 is set to be valid, as shown in the right graph of fig. 1b, all graphs 101, 102, 103 and 105 can be selected, and when the graph shape format editing is performed, the shape format of the graph 104 is in a protection state, so that the shape format of the graph 104 is not changed, and only the graph shape formats of the graph 101, 102, 103 and 105 are edited.
Therefore, by applying the embodiment of the invention, if the attribute value of the protection shape format attribute of a certain selected graph is valid, the editing operation of the graph shape format can be forbidden, the misoperation on the graph shape format is reduced, and the user experience is improved.
The other flowchart of the method for protecting the graphic shape format in the document provided by the embodiment of the invention, as shown in fig. 2, comprises the following steps:
step S201, it is detected whether there is a current graphic selected by the user in the document.
Step S202, after detecting that one or more current graphics selected by a user exist in the document, judging whether a graphics shape format protection state change instruction is received.
In the embodiment, the electronic device may determine whether a graphic shape format protection state change instruction is received after detecting that one or more current graphics selected by the user are in the document. In a specific embodiment, whether a graphic shape format protection state change button preset on a document display interface is clicked or not can be judged; or judging whether the graphic shape format protection state change button in the right button menu of the mouse is clicked.
If the judgment result is yes, namely, a graphic shape format protection state change instruction is received, executing step S203; if the result of the determination is no, that is, the graphics shape format protection state change instruction is not received, step S215 is executed.
Step S203, the protection shape format attribute information of each current graph is read.
Step S204, obtaining an attribute value of the protection shape format attribute information of the current graph.
Step S205, judging whether the attribute value of the protection shape format attribute of the current graph is valid or invalid.
If the result of the judgment is invalid, executing step S206; if the result of the judgment is valid, step S210 is performed.
Step S206, the current graph is taken as a second current graph, and a password setting dialog box is displayed.
Step S207, the password set by the user is saved, and the protection shape format attribute value of the second current graph is modified to be valid as the first current graph.
Step S208, the graphic shape format editing operation is prohibited.
Step S209, judging whether the current graph selected by the user exists.
If yes, namely, the current graph selected by the user exists, returning to the step S204; if the judgment result is no, that is, the current graph is not selected by the user, the operation is ended.
Step S210, the current graph is taken as a first current graph, and a password inputting dialog box is displayed.
In one embodiment, the current graphic is used as the first current graphic, and a password input dialog box is displayed to enable the user to input a password.
Step S211, it is determined whether the inputted password is a password set in advance by the user.
In practice, it may be determined whether or not the inputted password is a password set in advance by the user. Specifically, whether the input password is the same as the password set when the attribute value of the protection shape format attribute of the current graph is modified from invalid to valid or not can be judged.
If the result of the judgment is no, that is, the inputted password is not the password set in advance by the user, step S212 is executed; if the result of the judgment is yes, the inputted password is the password set in advance by the user, and step S213 is performed.
Step S212, the graphic shape format editing operation is prohibited. Step S209 is performed.
In step S213, the protection shape format attribute value of the first current graphic is modified to be invalid as the second current graphic.
Through the steps S210, S211 and S213, the first current graphic whose protection shape format attribute value is valid is modified to the second current graphic whose protection shape format attribute value is invalid, that is, the protection state of the graphic shape format is changed from the protected state to the unprotected state.
In this embodiment, in order to further protect the graphic shape format from being arbitrarily modified, in the process of changing the protected shape attribute from invalid to valid, a protection password may be set so that a user without the password cannot change the protected shape format attribute from valid to invalid.
Step S214, the editing operation is performed in response to the graphic shape format. Step S209 is performed.
Step S215, the protection shape format attribute information of each current graphic is read.
Step S216, obtaining an attribute value of the protection shape format attribute information of the current graph.
Step S217, judging whether the attribute value of the protection shape format attribute of the current graph is valid or invalid.
If the result of the judgment is valid, step S218 is executed; if the result of the judgment is invalid, step S222 is performed.
In step S218, the current graphic is used as the first current graphic, and the input password dialog is displayed.
Step S219, it is determined whether the inputted password is a password set in advance by the user.
If the result of the judgment is no, that is, the inputted password is not the password set in advance by the user, step S220 is executed; if the result of the judgment is yes, the inputted password is a password set in advance by the user, and step S221 is executed;
step S220, forbid the editing operation of the graphic shape format. Step S223 is performed.
In step S221, the protection shape format attribute value of the first current graphic is modified to be invalid as the second current graphic.
Step S222, the editing operation is performed in response to the graphic shape format.
Step S223, judging whether the current graph selected by the user exists.
If yes, that is, the current graph selected by the user is still present, returning to execute step S216; if the judgment result is no, that is, the current graph is not selected by the user, the operation is ended.
By applying the embodiment, after detecting that the current graph selected by the user exists in the document, when editing the shape format of the graph, a password inputting dialog box can be displayed, whether the current user has editing authority of the shape format of the graph is judged by judging whether the input password is a password preset by the user, and if the password is correct, the attribute value of the protection shape format of the first current graph is modified to be invalid and is used as a second current graph; if the password is incorrect, the first current graphical shape format editing operation is disabled. In this way, users without rights are prevented from editing the graphical shape format, and the user experience is improved.
Therefore, by applying the embodiment of the invention, if the attribute value of the protection shape format attribute of a certain selected graph is valid, the editing operation of the graph shape format can be forbidden, the misoperation on the graph shape format is reduced, and the user experience is improved.
The embodiment of the invention provides a schematic structural diagram of a protection device for a graphic shape format in a document, as shown in fig. 3, wherein the device comprises:
a current graphic detection module 301, configured to detect whether a current graphic selected by a user exists in a document;
An attribute information reading module 302, configured to, when detecting that one or more current graphics selected by a user exist in a document, read protection shape format attribute information of each current graphic;
An attribute information judging module 303, configured to respectively judge whether the attribute value of the protection shape format attribute of each current graphic is valid or invalid; the attribute value of the protection shape format attribute is preset by a user;
A format editing prohibition module 304, configured to prohibit the editing operation of the graphic shape format for each first current graphic whose attribute value of the protected shape format attribute is valid;
the format editing response module 305 is configured to respond to the graphic shape format editing operation for each second current graphic whose attribute value of the protected shape format attribute is invalid.
Optionally, the current graphic detection module is specifically configured to:
detecting whether the user frame-selected document content contains graphics or not, and determining the graphics in the user frame-selected document content as the current graphics selected by the user; or alternatively, the first and second heat exchangers may be,
And detecting whether a selection instruction aiming at the graph in the document is received, and if so, determining that the graph corresponding to the selection instruction is the current graph selected by the user.
Optionally, the apparatus further includes: an attribute value presetting module;
The attribute value presetting module comprises:
A change instruction receiving judging unit for judging whether a graphic shape format protection state change instruction is received after detecting one or more current graphics selected by a user in the document;
an attribute information reading unit, configured to, if a graphic shape format protection state change instruction is received, respectively read protection shape format attribute information of each current graphic;
an attribute information judging unit for judging whether the attribute value of the protection shape format attribute of each current graph is valid or invalid;
A first modification unit, configured to modify, for each current graphic whose attribute value of a protection shape format attribute is invalid, a protection shape format attribute value of each current graphic whose attribute value of the protection shape format attribute is invalid to be valid;
and the second modification unit is used for modifying the protection shape format attribute value of each current graph with the valid attribute value of the protection shape format attribute into invalid for each current graph with the valid attribute value of the protection shape format attribute.
Optionally, the change instruction receiving and judging unit is specifically configured to:
Judging whether a graphic shape preservation format protection state change button preset on a document display interface is clicked or not; or judging whether a graphic shape format protection state change button in a right button menu of the mouse is clicked.
Optionally, the first modification unit includes: a first display subunit and a first modification subunit;
The first display subunit is configured to display a password setting dialog box for a current graphic with an invalid attribute value of the protected shape format attribute;
the first modification subunit is configured to store a password set by a user, and modify a protection shape format attribute value of a current graphic whose attribute value of the protection shape format attribute is invalid into valid;
the second modification unit includes: a second display subunit, a first password determination subunit, and a second modification subunit;
the second display subunit is configured to display an input password dialog box for each current graphic for which the attribute value of the protected shape format attribute is valid;
the first password judging subunit is used for judging whether the input password is a password preset by a user;
And the second modification subunit is configured to modify, if so, the protection shape format attribute values of the current graphics with valid attribute values of the protection shape format attribute to be invalid.
Optionally, the format editing prohibition module includes: the device comprises a password dialog box display unit, a password judging unit, a format editing prohibition unit and a format editing response unit;
The password dialog box display unit is used for displaying an input password dialog box aiming at each first current graph with valid attribute values of the protection shape format attribute;
the password judging unit is used for judging whether the input password is a password preset by a user;
The format editing prohibition unit is used for prohibiting the graph shape format editing operation of each first current graph with valid attribute value of the protection shape format attribute if not;
and the format editing response unit is used for modifying the protection shape format attribute value of each first current graph with valid attribute value of the protection shape format attribute into invalid if the protection shape format attribute value is valid, and responding to graph shape format editing operation.
Optionally, the graphic shape format editing operation includes: shape filling operation, shape profile operation, and shape effect operation;
The format editing prohibition module is specifically configured to:
And displaying the shape filling operation button, the shape outline operation button and the shape effect operation button on the document editing interface as invalid for each first current graph with valid attribute values of the protection shape format attribute.
Therefore, by applying the embodiment of the invention, if the attribute value of the protection shape format attribute of a certain selected graph is valid, the editing operation of the graph shape format can be forbidden, the misoperation on the graph shape format is reduced, and the user experience is improved.
The embodiment of the invention also provides an electronic device, as shown in fig. 4, which comprises 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 complete communication with each other through the communication bus 404,
A memory 403 for storing a computer program;
the processor 401, when executing the program stored in the memory 403, implements the following steps:
Detecting whether a current graph selected by a user exists in the document;
when one or more current graphics selected by a user are detected in the document, reading the protection shape format attribute information of each current graphic;
Respectively judging whether the attribute value of the protection shape format attribute of each current graph is valid or invalid; the attribute value of the protection shape format attribute is preset by a user;
For each first current graph with valid attribute values of the protection shape format attribute, prohibiting the graph shape format editing operation;
and responding to the graph shape format editing operation for each second current graph with invalid attribute value of the protection shape format attribute.
The communication bus mentioned above for the electronic device may be a peripheral component interconnect standard (PERIPHERAL COMPONENT INTERCONNECT, PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, etc. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface is used for communication between the electronic device and other devices.
The Memory may include random access Memory (Random Access Memory, RAM) or may include Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; but may also be a digital signal processor (DIGITAL SIGNAL Processing, DSP), application SPECIFIC INTEGRATED Circuit (ASIC), field-Programmable gate array (Field-Programmable GATE ARRAY, FPGA) or other Programmable logic device, discrete gate or transistor logic device, discrete hardware components.
In yet another embodiment of the present invention, there is also provided a computer readable storage medium having stored therein a computer program which, when executed by a processor, implements the steps of the protection method of any of the graphical shape formats described above.
In yet another embodiment of the present invention, there is also provided a computer program product containing instructions that, when run on a computer, cause the computer to perform the method of protecting a graphical shape format of any of the embodiments described above. In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present invention, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, by wired (e.g., coaxial cable, optical fiber, digital Subscriber Line (DSL)), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk Solid STATE DISK (SSD)), etc.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for embodiments of the apparatus, electronic device, computer readable storage medium, and computer program product, which are substantially similar to method embodiments, the description is relatively simple, and reference is made to the section of the method embodiments for relevance.
The foregoing description is only of the preferred embodiments of the present invention and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims (14)

1. A method for protecting a graphical shape format in a document, the method comprising:
Detecting whether a current graph selected by a user exists in the document;
when one or more current graphics selected by a user are detected in the document, reading the protection shape format attribute information of each current graphic;
Respectively judging whether the attribute value of the protection shape format attribute of each current graph is valid or invalid; the attribute value of the protection shape format attribute is preset by a user;
For each first current graph with valid attribute values of the protection shape format attribute, prohibiting the graph shape format editing operation; the graphic shape format editing operation includes: shape filling operation, shape profile operation, and shape effect operation;
Responding to the graphic shape format editing operation aiming at each second current graphic with invalid attribute value of the protected shape format attribute;
The attribute value of the protection shape format attribute is preset by adopting the following steps:
After detecting that one or more current graphics selected by a user exist in the document, judging whether a graphics shape format protection state change instruction is received or not;
if a graphic shape format protection state change instruction is received, respectively reading protection shape format attribute information of each current graphic;
Respectively judging whether the attribute value of the protection shape format attribute of each current graph is valid or invalid;
For each current graph with invalid attribute values of the protection shape format attribute, modifying the protection shape format attribute value of each current graph with invalid attribute values of the protection shape format attribute into valid values;
And modifying the protection shape format attribute values of the current graphics with valid attribute values of the protection shape format attribute into invalid values aiming at the current graphics with valid attribute values of the protection shape format attribute.
2. The method of claim 1, wherein the step of determining the position of the substrate comprises,
The step of detecting whether the current graph selected by the user exists in the document comprises the following steps:
detecting whether the user frame-selected document content contains graphics or not, and determining the graphics in the user frame-selected document content as the current graphics selected by the user; or alternatively, the first and second heat exchangers may be,
And detecting whether a selection instruction aiming at the graph in the document is received, and if so, determining that the graph corresponding to the selection instruction is the current graph selected by the user.
3. The method of claim 1, wherein the step of determining the position of the substrate comprises,
The step of judging whether the graphic shape format protection state change instruction is received comprises the following steps:
Judging whether a graphic shape format protection state change button preset on a document display interface is clicked or not; or judging whether a graphic shape format protection state change button in a right button menu of the mouse is clicked.
4. The method of claim 1, wherein the step of determining the position of the substrate comprises,
The step of modifying the protection shape format attribute value of each current graph with invalid attribute value of the protection shape format attribute into valid value for each current graph with invalid attribute value of the protection shape format attribute comprises the following steps:
Displaying a password setting dialog box aiming at the current graph with invalid attribute value of the protected shape format attribute;
storing a password set by a user, and modifying the protection shape format attribute value of the current graph with the invalid attribute value of the protection shape format attribute into valid;
The step of modifying the protection shape format attribute value of each current graph with valid attribute value of the protection shape format attribute to invalid for each current graph with valid attribute value of the protection shape format attribute comprises the following steps:
Displaying an input password dialog box aiming at each current graph with valid attribute values of the protected shape format attribute;
Judging whether the input password is a password preset by a user; and if so, modifying the protection shape format attribute value of each current graph with the valid attribute value of the protection shape format attribute into invalid.
5. The method of claim 4, wherein the step of determining the position of the first electrode is performed,
The step of prohibiting the editing operation of the graphic shape format for each first current graphic with valid attribute value of the protected shape format attribute comprises the following steps:
Displaying an input password dialog box aiming at each first current graph with valid attribute values of the protected shape format attribute;
Judging whether the input password is a password preset by a user;
If not, prohibiting the graph shape format editing operation of each first current graph with the attribute value of the protection shape format attribute being valid;
And if so, modifying the protection shape format attribute value of each first current graph with the valid attribute value of the protection shape format attribute into invalid and responding to the graph shape format editing operation.
6. The method according to any one of claims 1 to 5, wherein the step of prohibiting the graphic shape format editing operation for each first current graphic whose attribute value of the protected shape format attribute is valid includes:
And displaying the shape filling operation button, the shape outline operation button and the shape effect operation button on the document editing interface as invalid for each first current graph with valid attribute values of the protection shape format attribute.
7. A device for protecting a graphical shape format in a document, the device comprising:
the current graphic detection module is used for detecting whether the current graphic selected by the user exists in the document or not;
The attribute information reading module is used for reading the protection shape format attribute information of each current graph when one or more current graphs selected by a user are detected in the document;
the attribute information judging module is used for judging whether the attribute value of the protection shape format attribute of each current graph is valid or invalid respectively; the attribute value of the protection shape format attribute is preset by a user;
The format editing prohibition module is used for prohibiting the editing operation of the graphic shape format aiming at each first current graphic with valid attribute value of the protected shape format attribute; the graphic shape format editing operation includes: shape filling operation, shape profile operation, and shape effect operation;
the format editing response module is used for responding to the graph shape format editing operation aiming at each second current graph with invalid attribute value of the protection shape format attribute;
the apparatus further comprises: an attribute value presetting module;
The attribute value presetting module comprises:
A change instruction receiving judging unit for judging whether a graphic shape format protection state change instruction is received after detecting one or more current graphics selected by a user in the document;
an attribute information reading unit, configured to, if a graphic shape format protection state change instruction is received, respectively read protection shape format attribute information of each current graphic;
an attribute information judging unit for judging whether the attribute value of the protection shape format attribute of each current graph is valid or invalid;
A first modification unit, configured to modify, for each current graphic whose attribute value of a protection shape format attribute is invalid, a protection shape format attribute value of each current graphic whose attribute value of the protection shape format attribute is invalid to be valid;
and the second modification unit is used for modifying the protection shape format attribute value of each current graph with the valid attribute value of the protection shape format attribute into invalid for each current graph with the valid attribute value of the protection shape format attribute.
8. The device according to claim 7, wherein the current graphic detection module is specifically configured to:
detecting whether the user frame-selected document content contains graphics or not, and determining the graphics in the user frame-selected document content as the current graphics selected by the user; or alternatively, the first and second heat exchangers may be,
And detecting whether a selection instruction aiming at the graph in the document is received, and if so, determining that the graph corresponding to the selection instruction is the current graph selected by the user.
9. The apparatus of claim 7, wherein the device comprises a plurality of sensors,
The change instruction receiving and judging unit is specifically configured to:
Judging whether a graphic shape preservation format protection state change button preset on a document display interface is clicked or not; or judging whether a graphic shape format protection state change button in a right button menu of the mouse is clicked.
10. The apparatus of claim 7, wherein the first modification unit comprises: a first display subunit and a first modification subunit;
The first display subunit is configured to display a password setting dialog box for a current graphic with an invalid attribute value of the protected shape format attribute;
the first modification subunit is configured to store a password set by a user, and modify a protection shape format attribute value of a current graphic whose attribute value of the protection shape format attribute is invalid into valid;
the second modification unit includes: a second display subunit, a first password determination subunit, and a second modification subunit;
the second display subunit is configured to display an input password dialog box for each current graphic for which the attribute value of the protected shape format attribute is valid;
the first password judging subunit is used for judging whether the input password is a password preset by a user;
And the second modification subunit is configured to modify, if so, the protection shape format attribute values of the current graphics with valid attribute values of the protection shape format attribute to be invalid.
11. The apparatus of claim 10, wherein the format edit disable module comprises: the device comprises a password dialog box display unit, a password judging unit, a format editing prohibition unit and a format editing response unit;
The password dialog box display unit is used for displaying an input password dialog box aiming at each first current graph with valid attribute values of the protection shape format attribute;
the password judging unit is used for judging whether the input password is a password preset by a user;
The format editing prohibition unit is used for prohibiting the graph shape format editing operation of each first current graph with valid attribute value of the protection shape format attribute if not;
and the format editing response unit is used for modifying the protection shape format attribute value of each first current graph with valid attribute value of the protection shape format attribute into invalid if the protection shape format attribute value is valid, and responding to graph shape format editing operation.
12. The apparatus according to any one of claims 7 to 11, wherein the format edit prohibiting module is specifically configured to:
And displaying the shape filling operation button, the shape outline operation button and the shape effect operation button on the document editing interface as invalid for each first current graph with valid attribute values of the protection shape format attribute.
13. The electronic equipment is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
A memory for storing a computer program;
a processor for carrying out the method steps of any one of claims 1-6 when executing a program stored on a memory.
14. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored therein a computer program which, when executed by a processor, implements the method steps of any of claims 1-6.
CN201910482271.8A 2019-06-04 2019-06-04 Protection method and device for graphic shape format, electronic equipment and storage medium Active CN112115486B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910482271.8A CN112115486B (en) 2019-06-04 2019-06-04 Protection method and device for graphic shape format, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910482271.8A CN112115486B (en) 2019-06-04 2019-06-04 Protection method and device for graphic shape format, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112115486A CN112115486A (en) 2020-12-22
CN112115486B true CN112115486B (en) 2024-06-25

Family

ID=73795223

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910482271.8A Active CN112115486B (en) 2019-06-04 2019-06-04 Protection method and device for graphic shape format, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112115486B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1125285A (en) * 1997-07-02 1999-01-29 Mutoh Ind Ltd Input system of graphic element
WO2017020605A1 (en) * 2015-07-31 2017-02-09 中兴通讯股份有限公司 File protection method, device and mobile terminal

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100475432B1 (en) * 2002-02-26 2005-03-10 삼성전자주식회사 method for design modification of Graphic User Interface and recorded media thereof
US20080079979A1 (en) * 2006-09-29 2008-04-03 David Lowell Holt System and method for securing a document
JP2008152352A (en) * 2006-12-14 2008-07-03 Canon Inc Image processing system
CN105825083A (en) * 2016-03-18 2016-08-03 北京花生科技有限责任公司 Picture copyright protecting method and recognizing method and related method and system
CN107463803A (en) * 2017-08-16 2017-12-12 传神语联网网络科技股份有限公司 The method and device of document protection
CN109656440B (en) * 2018-12-20 2021-04-27 上海尚往网络科技有限公司 Application icon display method, device and medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1125285A (en) * 1997-07-02 1999-01-29 Mutoh Ind Ltd Input system of graphic element
WO2017020605A1 (en) * 2015-07-31 2017-02-09 中兴通讯股份有限公司 File protection method, device and mobile terminal

Also Published As

Publication number Publication date
CN112115486A (en) 2020-12-22

Similar Documents

Publication Publication Date Title
CN109144392B (en) Method and device for processing gesture conflict and electronic equipment
CN112083973B (en) Window closing method and device, electronic equipment and storage medium
CN111414727B (en) Editing method and device for PDF document header footer and electronic equipment
CN106033450A (en) Method and device for blocking advertisement, and browser
CN112115486B (en) Protection method and device for graphic shape format, electronic equipment and storage medium
CN112052647B (en) Document editing method and device, electronic equipment and readable storage medium
CN112115485B (en) Method and device for protecting width and height of graphics in document, electronic equipment and storage medium
CN111553130A (en) Chapter title style conversion method and device, electronic equipment and storage medium
CN112115501B (en) Method and device for protecting graphic shape in document, electronic equipment and storage medium
CN112035848B (en) Method and device for protecting graphic text content, electronic equipment and storage medium
CN112036126B (en) Method, device, equipment and storage medium for prohibiting operation of graph in document
CN112035869B (en) Protection method and device for pattern combination form, electronic equipment and storage medium
CN112115685A (en) Method and device for protecting graphic position in document, electronic equipment and storage medium
CN109542300B (en) Method and device for updating web directory, electronic equipment and storage medium
CN112035868A (en) Method and device for protecting graph rotation angle in document and electronic equipment
CN111784800B (en) Graphic object selection method and device, electronic equipment and storage medium
CN111428210B (en) Method and device for editing watermark and electronic equipment
CN111199144B (en) Document content altering method and device, electronic equipment and readable storage medium
CN112416500A (en) Information processing method and electronic equipment
CN112784526A (en) Document page adjusting method and device
CN110874520B (en) Method and device for removing overlapped paths and terminal equipment
CN112232046A (en) Method and device for displaying repeated items of table
CN112783395B (en) Method, device, electronic equipment and medium for displaying form field
CN110895653A (en) Document content altering method and device, electronic equipment and readable storage medium
US20220179546A1 (en) Document display method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant