CN111414627A - File opening mode conversion method and device, electronic equipment and storage medium - Google Patents

File opening mode conversion method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111414627A
CN111414627A CN201910008152.9A CN201910008152A CN111414627A CN 111414627 A CN111414627 A CN 111414627A CN 201910008152 A CN201910008152 A CN 201910008152A CN 111414627 A CN111414627 A CN 111414627A
Authority
CN
China
Prior art keywords
mode
user
file
editing
read
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910008152.9A
Other languages
Chinese (zh)
Inventor
邓斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Kingsoft Office Software Inc
Zhuhai Kingsoft Office Software Co Ltd
Guangzhou Kingsoft Mobile Technology Co Ltd
Original Assignee
Beijing Kingsoft Office Software Inc
Zhuhai Kingsoft Office Software Co Ltd
Guangzhou Kingsoft Mobile Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Kingsoft Office Software Inc, Zhuhai Kingsoft Office Software Co Ltd, Guangzhou Kingsoft Mobile Technology Co Ltd filed Critical Beijing Kingsoft Office Software Inc
Priority to CN201910008152.9A priority Critical patent/CN111414627A/en
Publication of CN111414627A publication Critical patent/CN111414627A/en
Pending legal-status Critical Current

Links

Images

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/602Providing cryptographic facilities or services
    • 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/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6209Protecting access to data via a platform, e.g. using keys or access control rules to a single file or object, e.g. in a secure envelope, encrypted and accessed using a key, or with access control rules appended to the object itself

Landscapes

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

Abstract

The embodiment of the invention provides a file opening mode conversion method, which can detect whether a user triggers a mode conversion instruction or not when a file is opened in a read-only mode; if the mode conversion instruction is detected, displaying an editing password input dialog box in a read-only mode opening interface of the file; receiving an editing password input by a user; and when the received editing password is correct, converting the open mode of the file from the read-only mode to the editing mode. According to the method provided by the embodiment of the invention, for the file opened in the read-only mode, a user can directly convert the open mode of the file from the read-only mode to the editing mode by triggering the mode conversion instruction and inputting the editing password, and the file can be opened again without closing the file and inputting the editing password as in the prior art, so that the file can enter the editing mode. Therefore, the problem that in the prior art, when the document opening mode is converted from the read-only mode to the editing mode, the operation is complex is solved.

Description

File opening mode conversion method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of file open mode conversion technologies, and in particular, to a file open mode conversion method and apparatus, an electronic device, and a storage medium.
Background
In order to avoid tampering with the contents of the file, the user typically sets an edit password for the file when saving the file. In the prior art, for a file with an editing password, if a user opens the file in a read-only mode, when the user needs to edit the file, the file needs to be closed first, then the file needs to be opened again, and the editing password is input at the same time, then the user can enter an editing mode to edit the file.
However, the inventors have found that the prior art suffers from at least the following disadvantages: for a file opened in a read-only mode, when a user finds that an error exists in a certain part of the file and needs to be modified or content needs to be supplemented into the file, the user needs to close the file first, then reopen the file, and simultaneously input an editing password to enter an editing mode, and then the user can edit the file. As can be seen, the prior art is complicated to operate when the document opening mode is converted from the read-only mode to the editing mode.
Disclosure of Invention
Embodiments of the present invention provide a file mode conversion method, an apparatus, an electronic device, and a storage medium, so as to solve the problem that in the prior art, when a document opening mode is converted from a read-only mode to an editing mode, the operation is complicated. The specific technical scheme is as follows:
in order to achieve the above object, in a first aspect, an embodiment of the present invention provides a file open mode conversion method, where the method includes:
when a file is opened in a read-only mode, detecting whether a user triggers a mode conversion instruction;
if the mode conversion instruction is detected, displaying an editing password input dialog box in a read-only mode opening interface of the file;
receiving an editing password input by a user;
and when the received editing password is correct, converting the opening mode of the file from the read-only mode to an editing mode.
Optionally, the detecting whether the user triggers the mode switching instruction includes:
detecting whether a preset mode conversion button is pressed down by a user in an opening interface of the file;
if the mode conversion button is pressed by a user, detecting a mode conversion instruction sent by the user;
or, detecting whether a preset mode conversion option in the right-click menu is selected by a user;
if the mode conversion option is selected by the user, detecting a mode conversion instruction sent by the user;
or, detecting whether a preset mode conversion shortcut key in the keyboard is pressed down by a user;
and if the mode conversion shortcut key is pressed by the user, detecting a mode conversion instruction sent by the user.
Optionally, the edit password input dialog includes:
a password input box and a determination button; the password input box is used for receiving an editing password input by a user in a keyboard input mode, a voice input mode or a touch screen writing mode;
after the step of receiving the edit password input by the user, the method further comprises:
detecting whether a determination button in the edit password input dialog box is pressed by a user;
if the confirming button is detected to be pressed down by the user, judging whether the editing password input by the user is correct or not;
if the editing password input by the user is correct, executing the step of converting the open mode of the file from the read-only mode to the editing mode when the received editing password is correct;
and if the edited password input by the user is wrong, outputting prompt information of the wrong password.
Optionally, the editing password input dialog further includes: a cancel button; the method further comprises the following steps:
and closing the edit password input dialog box if the cancel button is detected to be pressed by the user.
Optionally, the step of converting the open mode of the file from the read-only mode to the edit mode includes:
reading the permission setting options of the file;
and modifying the permission setting options of the file from a read-only state to an editing state.
Optionally, the method further includes:
when a file is opened in an editing mode, detecting whether a user triggers a mode conversion instruction;
and if the mode conversion instruction is detected, converting the opening mode of the file from the editing mode to a read-only mode.
Optionally, the step of converting the open mode of the file from the edit mode to the read-only mode includes:
reading the file permission setting option;
and changing the authority setting options of the file from an editing state to a read-only state.
Optionally, the file is: one of a word document, an Excel document, a WPS document, a PPT document, or a TXT document.
In a second aspect, an embodiment of the present invention provides a file open mode conversion apparatus, where the apparatus includes:
the detection module is used for detecting whether a user triggers a mode conversion instruction or not when the file is opened in a read-only mode;
the display module is used for displaying an editing password input dialog box in a read-only mode opening interface of the file when the mode conversion instruction is detected;
the receiving module is used for receiving an editing password input by a user;
and the conversion module is used for converting the opening mode of the file from the read-only mode to the editing mode when the received editing password is correct.
Optionally, the detection module is specifically configured to:
detecting whether a preset mode conversion button is pressed down by a user in an opening interface of the file;
if the mode conversion button is pressed by a user, detecting a mode conversion instruction sent by the user;
or, detecting whether a preset mode conversion option in the right-click menu is selected by a user;
if the mode conversion option is selected by the user, detecting a mode conversion instruction sent by the user;
or, detecting whether a preset mode conversion shortcut key in the keyboard is pressed down by a user;
and if the mode conversion shortcut key is pressed by the user, detecting a mode conversion instruction sent by the user.
Optionally, the edit password input dialog includes:
a password input box and a determination button; the password input box is used for receiving an editing password input by a user in a keyboard input mode, a voice input mode or a touch screen writing mode;
the display module includes:
a detection sub-module for detecting whether a determination button in the edit password input dialog box is pressed by a user after the step of receiving the edit password input by the user;
the judgment sub-module is used for judging whether the editing password input by the user is correct or not when the fact that the determining button is pressed by the user is detected; if the editing password input by the user is correct, calling the conversion module; and if the edited password input by the user is wrong, outputting prompt information of the wrong password.
Optionally, the editing password input dialog further includes: a cancel button;
the detection submodule is further configured to detect whether a cancel button in the edit password input dialog box is pressed by the user after the step of receiving the edit password input by the user;
the display module further comprises: and the closing sub-module is used for closing the editing password input dialog box when the cancel button is detected to be pressed by the user.
Optionally, the conversion module includes:
the reading submodule is used for reading the permission setting options of the file;
and the modification submodule is used for modifying the permission setting options of the file from a read-only state to an editing state.
Optionally, the detecting module is further configured to detect whether a user triggers a mode switching instruction when the file is opened in the editing mode;
the conversion module is further configured to convert the open mode of the file from the edit mode to a read-only mode if the mode conversion instruction is detected.
Optionally, the modification sub-module is further configured to modify the permission setting option of the file from an editing state to a read-only state.
Optionally, the file is: one of a word document, an Excel document, a WPS document, a PPT document, or a TXT document.
In a third aspect, an embodiment of the present invention provides an electronic device, including: the system comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus;
a memory for storing a computer program;
the processor is used for realizing the following steps when executing the program stored in the memory:
when a file is opened in a read-only mode, detecting whether a user triggers a mode conversion instruction;
if the mode conversion instruction is detected, displaying an editing password input dialog box in a read-only mode opening interface of the file;
receiving an editing password input by a user;
and when the received editing password is correct, converting the opening mode of the file from the read-only mode to an editing mode.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements the following steps:
when a file is opened in a read-only mode, detecting whether a user triggers a mode conversion instruction;
if the mode conversion instruction is detected, displaying an editing password input dialog box in a read-only mode opening interface of the file;
receiving an editing password input by a user;
and when the received editing password is correct, converting the opening mode of the file from the read-only mode to an editing mode.
An embodiment of the present invention further provides a computer program product containing instructions, which when run on a computer, causes the computer to execute any one of the file open mode conversion methods described above.
The file opening mode conversion method, the file opening mode conversion device, the electronic equipment and the storage medium provided by the embodiment of the invention can detect whether a user triggers a mode conversion instruction when a file is opened in a read-only mode; if the mode conversion instruction is detected, displaying an editing password input dialog box in a read-only mode opening interface of the file; receiving an editing password input by a user; and when the received editing password is correct, converting the opening mode of the file from the read-only mode to an editing mode. According to the method provided by the embodiment of the invention, for the file opened in the read-only mode, the user can directly convert the open mode of the file from the read-only mode to the editing mode by triggering the mode conversion instruction and inputting the editing password, and the user does not need to close the file firstly, then reopen the file and simultaneously input the editing password to enter the editing mode like the prior art. Therefore, the problem that in the prior art, when the document opening mode is converted from the read-only mode to the editing mode, the operation is complex is solved.
Of course, not all of the advantages described above need to be achieved at the same time in the practice of any one product or method of the invention.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic diagram of an interface for setting an open password and an edit password for a document;
FIG. 2 is a schematic view of an interface for prompting a user to enter an edit password when opening a document with the edit password set;
FIG. 3 is a schematic view of an interface for opening a document in read-only mode;
fig. 4 is a schematic flowchart of a file open mode conversion method according to an embodiment of the present invention;
FIG. 5 is a diagram of an edit password entry dialog according to an embodiment of the present invention;
fig. 6 is another schematic flow chart of a file open mode conversion method according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a file open mode conversion device according to an embodiment of the present invention;
FIG. 8 is a schematic structural diagram of a display module in the embodiment shown in FIG. 7;
FIG. 9 is a schematic structural diagram of the conversion module in the embodiment shown in FIG. 7;
fig. 10 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The current office document can set an open password and an edit password for the security of the document. The opening password is used for controlling whether the document can be opened or not, and if the opening password is not correct, the document with the opening password cannot be opened; the edit password is used to control whether the document can be edited, and if the correct edit password is not input, the document with the edit password set cannot be edited.
Referring to fig. 1, a method of setting an open password and an edit password of a document may be: in the interface for saving the document, clicking a 'tool' button, selecting a 'conventional option', opening the interface corresponding to the option, and inputting a password through an 'opening authority password' input box in the interface so as to set an opening password of the document; the password is input through a "modification authority password" input box in the interface, thereby setting a modification authority password of the document, that is, an editing password.
Referring to fig. 2, for a document with an edit password set, a dialog box is displayed when the document is opened to remind the user that the document has the edit password set, and to prompt the user to input the edit password. If the user does not enter the edit password, but clicks the "read only" button, the document is opened in read only mode.
Fig. 3 is a schematic view of an interface when the document is opened in the read-only mode, and referring to fig. 3, if the document is opened in the read-only mode, a "read-only" character is displayed behind the title of the document to remind the user that the document can only be read but cannot be edited.
In the prior art, for a document opened in a read-only mode, when a user finds that an error exists in a certain position of the document and needs to be modified or content needs to be supplemented into the document, the user needs to close the document first, then reopen the document, and simultaneously input an editing password to enter an editing mode, and then the user can edit the document. This operation is complicated.
In view of the foregoing problems, embodiments of the present invention provide a method and an apparatus for converting a file opening mode, an electronic device, and a storage medium, where for a file opened in a read-only mode, a user can directly convert the file opening mode from the read-only mode to an editing mode by triggering a mode conversion instruction and inputting an editing password, and there is no need to, as in the prior art, first close the file, then reopen the file, and simultaneously input the editing password to enter the editing mode.
Fig. 4 is a schematic flowchart of a file open mode conversion method according to an embodiment of the present invention, and referring to fig. 4, the method includes:
s401: when a file is opened in a read-only mode, detecting whether a user triggers a mode conversion instruction;
specifically, the mode of detecting whether the user has triggered the mode switching instruction may be:
detecting whether a preset mode conversion button is pressed down by a user in an opening interface of the file;
if the mode conversion button is pressed by a user, detecting a mode conversion instruction sent by the user;
or, detecting whether a preset mode conversion option in the right-click menu is selected by a user;
if the mode conversion option is selected by the user, detecting a mode conversion instruction sent by the user;
or, detecting whether a preset mode conversion shortcut key in the keyboard is pressed down by a user;
if the mode conversion shortcut key is pressed by the user, a mode conversion instruction sent by the user is detected.
The method provided by the embodiment of the invention does not limit the mode of triggering the mode conversion instruction by the user, and as long as the mode of triggering the mode conversion instruction function by the user can be provided, the method falls into the protection scope of the invention.
S402: if the mode conversion instruction is detected, displaying an editing password input dialog box in a read-only mode opening interface of the file;
for a specific application, the edit password is a modification authority password, and therefore, referring to fig. 5, the edit password input dialog box may include: a password input box and a determination button; and the password input box is used for receiving an editing password input by a user in a keyboard input mode, a voice input mode or a touch screen writing mode.
S403: receiving an editing password input by a user;
s404: and when the received editing password is correct, converting the opening mode of the file from the read-only mode to an editing mode.
Specifically, after the step of receiving the edit password input by the user, the method may further include:
detecting whether a determination button in the edit password input dialog box is pressed by a user;
if the confirming button is detected to be pressed down by the user, judging whether the editing password input by the user is correct or not;
if the editing password input by the user is correct, converting the open mode of the file from a read-only mode to an editing mode;
and if the edited password input by the user is wrong, outputting prompt information of the wrong password.
As shown in fig. 5, the edit password input dialog may further include: a cancel button; and closing the edit password input dialog box if the cancel button is detected to be pressed by the user.
Specifically, the step of converting the open mode of the file from the read-only mode to the edit mode may include:
reading the permission setting options of the file;
and modifying the permission setting options of the file from a read-only state to an editing state.
As can be seen from the embodiment shown in fig. 4, the file open mode conversion method provided in the embodiment of the present invention can detect whether a user has triggered a mode conversion instruction when a file is opened in a read-only mode; if the mode conversion instruction is detected, displaying an editing password input dialog box in a read-only mode opening interface of the file; receiving an editing password input by a user; and when the received editing password is correct, converting the opening mode of the file from the read-only mode to an editing mode. According to the method provided by the embodiment of the invention, for the file opened in the read-only mode, the user can directly convert the open mode of the file from the read-only mode to the editing mode by triggering the mode conversion instruction and inputting the editing password, and the user does not need to close the file firstly, then reopen the file and simultaneously input the editing password to enter the editing mode like the prior art. Therefore, the problem that in the prior art, when the document opening mode is converted from the read-only mode to the editing mode, the operation is complex is solved.
Hereinafter, a specific example is given to further describe in detail the file open mode conversion method provided in the embodiment of the present invention. As shown in fig. 6, this exemplary flow includes the following steps:
s601: when a file is opened in a read-only mode, detecting whether a user triggers a mode conversion instruction;
s602: if the mode conversion instruction is detected, displaying an editing password input dialog box in a read-only mode opening interface of the file;
s603: receiving an editing password input by a user;
s604: detecting whether a determination button in an edit password input dialog box is pressed by a user;
s605: if the confirming button is detected to be pressed down by the user, judging whether the editing password input by the user is correct or not; if the editing password input by the user is correct, executing S606; if the edit password input by the user is wrong, S608 is performed;
s606: reading the permission setting option of the file;
s607: modifying the permission setting option of the file from a read-only state to an editing state;
s608: and outputting prompt information of password error.
In practical applications, the file may be: one of a word document, an Excel document, a WPS document, a PPT document, or a TXT document.
In a specific embodiment, the file open mode may be further converted from the edit mode to the read-only mode, and specifically, the following steps may be implemented:
when a file is opened in an editing mode, detecting whether a user triggers a mode conversion instruction;
and if the mode conversion instruction is detected, converting the opening mode of the file from the editing mode to a read-only mode.
The step of converting the open mode of the file from the edit mode to the read-only mode may include:
reading the file permission setting option;
and modifying the authority setting options of the file from an editing state to a read-only state.
As can be seen from the embodiment shown in fig. 6, the file open mode conversion method provided in the embodiment of the present invention can detect whether a user has triggered a mode conversion instruction when a file is opened in a read-only mode; if the mode conversion instruction is detected, displaying an editing password input dialog box in a read-only mode opening interface of the file; receiving an editing password input by a user; and when the received editing password is correct, converting the opening mode of the file from the read-only mode to an editing mode. According to the method provided by the embodiment of the invention, for the file opened in the read-only mode, the user can directly convert the open mode of the file from the read-only mode to the editing mode by triggering the mode conversion instruction and inputting the editing password, and the user does not need to close the file firstly, then reopen the file and simultaneously input the editing password to enter the editing mode like the prior art. Therefore, the problem that in the prior art, when the document opening mode is converted from the read-only mode to the editing mode, the operation is complex is solved.
In addition, in the prior art, when the content is more, the user needs to spend more time to locate the place needing to modify or supplement the content in the read-only mode, thereby causing the problem of poor user experience. By using the file opening mode conversion method provided by the embodiment of the invention, a user can directly convert the opening mode of the file from the read-only mode to the editing mode by triggering the mode conversion instruction and inputting the editing password, so that the problem that the user needs to spend more time to locate the place needing to modify or supplement the content in the read-only mode is solved, and the user experience is improved.
Corresponding to the embodiment shown in fig. 4, the embodiment of the present invention further provides a file open mode conversion apparatus.
Referring to fig. 7, the apparatus includes:
a detecting module 701, configured to detect whether a user triggers a mode switching instruction when a file is opened in a read-only mode;
a display module 702, configured to display an edit password input dialog box in a read-only mode open interface of the file when the mode switching instruction is detected;
a receiving module 703, configured to receive an edit password input by a user;
a converting module 704, configured to convert the open mode of the file from the read-only mode to the editing mode when the received editing password is correct.
Optionally, the detecting module 701 is specifically configured to:
detecting whether a preset mode conversion button is pressed down by a user in an opening interface of the file;
if the mode conversion button is pressed by a user, detecting a mode conversion instruction sent by the user;
or, detecting whether a preset mode conversion option in the right-click menu is selected by a user;
if the mode conversion option is selected by the user, detecting a mode conversion instruction sent by the user;
or, detecting whether a preset mode conversion shortcut key in the keyboard is pressed down by a user;
and if the mode conversion shortcut key is pressed by the user, detecting a mode conversion instruction sent by the user.
Optionally, the edit password input dialog includes:
a password input box and a determination button; the password input box is used for receiving an editing password input by a user in a keyboard input mode, a voice input mode or a touch screen writing mode;
referring to fig. 8, the display module 702 includes:
a detection sub-module 801 configured to, after the step of receiving the edit password input by the user, detect whether a determination button in the edit password input dialog is pressed by the user;
a judging sub-module 802, configured to, when it is detected that the determination button is pressed by the user, judge whether the edit password input by the user is correct; if the editing password input by the user is correct, calling the conversion module; and if the edited password input by the user is wrong, outputting prompt information of the wrong password.
Optionally, the editing password input dialog further includes: a cancel button;
the detecting sub-module 801 is further configured to detect, after the step of receiving the edit password input by the user, whether a cancel button in the edit password input dialog box is pressed by the user;
the display module 702 further includes: a close sub-module 803, configured to close the edit password input dialog box when it is detected that the cancel button is pressed by the user.
Optionally, referring to fig. 9, the conversion module 704 includes:
a reading submodule, 901, configured to read an authority setting option of the file;
and the modification submodule 902 is configured to modify the permission setting option of the file from a read-only state to an editing state.
Optionally, the detecting module 701 is further configured to detect whether a user triggers a mode switching instruction when the file is opened in the editing mode;
the converting module 704 is further configured to convert the open mode of the file from the editing mode to a read-only mode if the mode converting instruction is detected.
Optionally, the modification sub-module 902 is further configured to modify the permission setting option of the file from an editing state to a read-only state.
Optionally, the file is: one of a word document, an Excel document, a WPS document, a PPT document, or a TXT document.
As can be seen from the embodiment shown in fig. 7, the file open mode conversion apparatus provided in the embodiment of the present invention can detect whether a user has triggered a mode conversion instruction when a file is opened in a read-only mode; if the mode conversion instruction is detected, displaying an editing password input dialog box in a read-only mode opening interface of the file; receiving an editing password input by a user; and when the received editing password is correct, converting the opening mode of the file from the read-only mode to an editing mode. According to the method provided by the embodiment of the invention, for the file opened in the read-only mode, the user can directly convert the open mode of the file from the read-only mode to the editing mode by triggering the mode conversion instruction and inputting the editing password, and the user does not need to close the file firstly, then reopen the file and simultaneously input the editing password to enter the editing mode like the prior art. Therefore, the problem that in the prior art, when the document opening mode is converted from the read-only mode to the editing mode, the operation is complex is solved.
Corresponding to the embodiment shown in fig. 4, the embodiment of the present invention further provides an electronic device, as shown in fig. 10, including a processor 1001, a communication interface 1002, a memory 1003 and a communication bus 1004, where the processor 1001, the communication interface 1002 and the memory 1003 complete mutual communication through the communication bus 1004,
a memory 1003 for storing a computer program;
the processor 1001 is configured to implement the following steps when executing the program stored in the memory 1003:
when a file is opened in a read-only mode, detecting whether a user triggers a mode conversion instruction;
if the mode conversion instruction is detected, displaying an editing password input dialog box in a read-only mode opening interface of the file;
receiving an editing password input by a user;
and when the received editing password is correct, converting the opening mode of the file from the read-only mode to an editing mode.
As can be seen from the embodiment shown in fig. 10, the electronic device provided in the embodiment of the present invention may detect whether a user has triggered a mode switching instruction when a file is opened in a read-only mode; if the mode conversion instruction is detected, displaying an editing password input dialog box in a read-only mode opening interface of the file; receiving an editing password input by a user; and when the received editing password is correct, converting the opening mode of the file from the read-only mode to an editing mode. According to the method provided by the embodiment of the invention, for the file opened in the read-only mode, the user can directly convert the open mode of the file from the read-only mode to the editing mode by triggering the mode conversion instruction and inputting the editing password, and the user does not need to close the file firstly, then reopen the file and simultaneously input the editing password to enter the editing mode like the prior art. Therefore, the problem that in the prior art, when the document opening mode is converted from the read-only mode to the editing mode, the operation is complex is solved.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
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 memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component.
In another embodiment of the present invention, a computer-readable storage medium is further provided, in which a computer program is stored, and the computer program, when executed by a processor, implements the steps of any one of the file open mode conversion methods described above.
In another embodiment of the present invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to execute any one of the file open mode conversion methods in the above embodiments.
The computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, e.g., from one website site, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DS L)) or wireless (e.g., infrared, wireless, microwave, etc.) manner to another website site, computer, server, or data center.
It is noted that, herein, relational terms such as first and second, and the like may be 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. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (18)

1. A file open mode conversion method, comprising:
when a file is opened in a read-only mode, detecting whether a user triggers a mode conversion instruction;
if the mode conversion instruction is detected, displaying an editing password input dialog box in a read-only mode opening interface of the file;
receiving an editing password input by a user;
and when the received editing password is correct, converting the opening mode of the file from the read-only mode to an editing mode.
2. The method of claim 1, wherein detecting whether a user has triggered a mode switch command comprises:
detecting whether a preset mode conversion button is pressed down by a user in an opening interface of the file;
if the mode conversion button is pressed by a user, detecting a mode conversion instruction sent by the user;
or, detecting whether a preset mode conversion option in the right-click menu is selected by a user;
if the mode conversion option is selected by the user, detecting a mode conversion instruction sent by the user;
or, detecting whether a preset mode conversion shortcut key in the keyboard is pressed down by a user;
and if the mode conversion shortcut key is pressed by the user, detecting a mode conversion instruction sent by the user.
3. The method of claim 1, wherein the edit password entry dialog comprises:
a password input box and a determination button; the password input box is used for receiving an editing password input by a user in a keyboard input mode, a voice input mode or a touch screen writing mode;
after the step of receiving the edit password input by the user, the method further comprises:
detecting whether a determination button in the edit password input dialog box is pressed by a user;
if the confirming button is detected to be pressed down by the user, judging whether the editing password input by the user is correct or not;
if the editing password input by the user is correct, executing the step of converting the open mode of the file from the read-only mode to the editing mode when the received editing password is correct;
and if the edited password input by the user is wrong, outputting prompt information of the wrong password.
4. The method of claim 3, wherein the edit password entry dialog further comprises: a cancel button; the method further comprises the following steps:
and closing the edit password input dialog box if the cancel button is detected to be pressed by the user.
5. The method of claim 1, wherein the step of converting the open mode of the file from the read-only mode to the edit mode comprises:
reading the permission setting options of the file;
and modifying the permission setting options of the file from a read-only state to an editing state.
6. The method of claim 1, further comprising:
when a file is opened in an editing mode, detecting whether a user triggers a mode conversion instruction;
and if the mode conversion instruction is detected, converting the opening mode of the file from the editing mode to a read-only mode.
7. The method of claim 6, wherein the step of converting the open mode of the file from the edit mode to the read-only mode comprises:
reading the file permission setting option;
and changing the authority setting options of the file from an editing state to a read-only state.
8. The method of claim 1,
the file is as follows: one of a word document, an Excel document, a WPS document, a PPT document, or a TXT document.
9. A file open mode conversion apparatus, characterized in that the apparatus comprises:
the detection module is used for detecting whether a user triggers a mode conversion instruction or not when the file is opened in a read-only mode;
the display module is used for displaying an editing password input dialog box in a read-only mode opening interface of the file when the mode conversion instruction is detected;
the receiving module is used for receiving an editing password input by a user;
and the conversion module is used for converting the opening mode of the file from the read-only mode to the editing mode when the received editing password is correct.
10. The apparatus according to claim 9, wherein the detection module is specifically configured to:
detecting whether a preset mode conversion button is pressed down by a user in an opening interface of the file;
if the mode conversion button is pressed by a user, detecting a mode conversion instruction sent by the user;
or, detecting whether a preset mode conversion option in the right-click menu is selected by a user;
if the mode conversion option is selected by the user, detecting a mode conversion instruction sent by the user;
or, detecting whether a preset mode conversion shortcut key in the keyboard is pressed down by a user;
and if the mode conversion shortcut key is pressed by the user, detecting a mode conversion instruction sent by the user.
11. The apparatus of claim 9, wherein the edit password entry dialog comprises:
a password input box and a determination button; the password input box is used for receiving an editing password input by a user in a keyboard input mode, a voice input mode or a touch screen writing mode;
the display module includes:
a detection sub-module for detecting whether a determination button in the edit password input dialog box is pressed by a user after the step of receiving the edit password input by the user;
the judgment sub-module is used for judging whether the editing password input by the user is correct or not when the fact that the determining button is pressed by the user is detected; if the editing password input by the user is correct, calling the conversion module; and if the edited password input by the user is wrong, outputting prompt information of the wrong password.
12. The apparatus of claim 11, wherein the edit password entry dialog further comprises: a cancel button;
the detection submodule is further configured to detect whether a cancel button in the edit password input dialog box is pressed by the user after the step of receiving the edit password input by the user;
the display module further comprises: and the closing sub-module is used for closing the editing password input dialog box when the cancel button is detected to be pressed by the user.
13. The apparatus of claim 9, wherein the conversion module comprises:
the reading submodule is used for reading the permission setting options of the file;
and the modification submodule is used for modifying the permission setting options of the file from a read-only state to an editing state.
14. The apparatus of claim 9,
the detection module is also used for detecting whether a user triggers a mode conversion instruction when the file is opened in an editing mode;
the conversion module is further configured to convert the open mode of the file from the edit mode to a read-only mode if the mode conversion instruction is detected.
15. The apparatus of claim 14,
and the modification submodule is also used for modifying the permission setting options of the file from an editing state to a read-only state.
16. The apparatus of claim 9,
the file is as follows: one of a word document, an Excel document, a WPS document, a PPT document, or a TXT document.
17. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 1 to 8 when executing a program stored in the memory.
18. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of the claims 1-8.
CN201910008152.9A 2019-01-04 2019-01-04 File opening mode conversion method and device, electronic equipment and storage medium Pending CN111414627A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910008152.9A CN111414627A (en) 2019-01-04 2019-01-04 File opening mode conversion method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910008152.9A CN111414627A (en) 2019-01-04 2019-01-04 File opening mode conversion method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111414627A true CN111414627A (en) 2020-07-14

Family

ID=71492526

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910008152.9A Pending CN111414627A (en) 2019-01-04 2019-01-04 File opening mode conversion method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111414627A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113111376A (en) * 2021-04-09 2021-07-13 杭州天谷信息科技有限公司 Electronic signature system and method for anti-theft signature

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1564141A (en) * 2004-04-08 2005-01-12 王启祥 Attribute setup method for computer hard disk zoning, and its appliance
US20060282784A1 (en) * 2005-06-14 2006-12-14 Microsoft Corporation Providing smart user interfaces based on document open and/or edit context
CN1996476A (en) * 2006-01-06 2007-07-11 日立环球储存科技荷兰有限公司 Disk unit, magnetic disk unit and information storage unit
CN101615162A (en) * 2008-06-23 2009-12-30 株式会社理光 Memory Management Unit, image forming apparatus, storage management method and program
US20160357487A1 (en) * 2015-06-05 2016-12-08 Xerox Corporation Systems and methods for editing documents
CN106471487A (en) * 2014-11-24 2017-03-01 谷歌公司 System and method for editing the file in imprimitive application using application engine

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1564141A (en) * 2004-04-08 2005-01-12 王启祥 Attribute setup method for computer hard disk zoning, and its appliance
US20060282784A1 (en) * 2005-06-14 2006-12-14 Microsoft Corporation Providing smart user interfaces based on document open and/or edit context
CN1996476A (en) * 2006-01-06 2007-07-11 日立环球储存科技荷兰有限公司 Disk unit, magnetic disk unit and information storage unit
CN101615162A (en) * 2008-06-23 2009-12-30 株式会社理光 Memory Management Unit, image forming apparatus, storage management method and program
CN106471487A (en) * 2014-11-24 2017-03-01 谷歌公司 System and method for editing the file in imprimitive application using application engine
US20160357487A1 (en) * 2015-06-05 2016-12-08 Xerox Corporation Systems and methods for editing documents

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113111376A (en) * 2021-04-09 2021-07-13 杭州天谷信息科技有限公司 Electronic signature system and method for anti-theft signature

Similar Documents

Publication Publication Date Title
US11888804B2 (en) User interface enhancements and associated processes in email communication
US20180063717A1 (en) Bypassing security authentication scheme on a lost device to return the device to the owner
US20160349977A1 (en) Method and device for operating controls in terminal based on remote-control equipment
TWI705348B (en) Service calling method and device
EP3352066B1 (en) Method and apparatus for displaying function interface
US20140195928A1 (en) Return to Sender
US10811016B2 (en) Method of controlling terminal using context awareness and terminal thereof
CN104765522A (en) Chat window display control method and system
CN104809174A (en) Opening method of terminal application
CN106951299A (en) The operating method and device of application program
CN104808899A (en) Terminal
CN112130941A (en) Interface display method and related equipment
CN103729139A (en) Information processing method and electronic device
CN111414627A (en) File opening mode conversion method and device, electronic equipment and storage medium
CN104750315A (en) Control method and device of screen touching device, and touch screening device
CN110673790A (en) Hard disk control method and device, electronic equipment and storage medium
CN108021317B (en) Method and device for screen editing
CN104808895A (en) Icon arranging method
CN112416210A (en) Information encryption and decryption method, system, storage medium and electronic equipment
CN112035271B (en) User operation information processing method and device, electronic equipment and storage medium
CN111949184B (en) Method and device for creating document
CN110888697A (en) Remote desktop connection establishing method, device and system
CN111695371B (en) Table identification method and device, electronic equipment and storage medium
US20240013002A1 (en) Information processing method and apparatus, terminal, and storage medium
CN113190105B (en) Information display method, device, equipment and medium

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