CN113988008A - Document object size adjusting method and device, electronic equipment and storage medium - Google Patents

Document object size adjusting method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113988008A
CN113988008A CN202111248232.5A CN202111248232A CN113988008A CN 113988008 A CN113988008 A CN 113988008A CN 202111248232 A CN202111248232 A CN 202111248232A CN 113988008 A CN113988008 A CN 113988008A
Authority
CN
China
Prior art keywords
size information
target
document object
target document
determined
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
CN202111248232.5A
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
Wuhan Kingsoft Office Software Co Ltd
Original Assignee
Beijing Kingsoft Office Software Inc
Zhuhai Kingsoft Office Software Co Ltd
Wuhan 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, Wuhan Kingsoft Office Software Co Ltd filed Critical Beijing Kingsoft Office Software Inc
Priority to CN202111248232.5A priority Critical patent/CN113988008A/en
Publication of CN113988008A publication Critical patent/CN113988008A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/103Formatting, i.e. changing of presentation of documents
    • G06F40/109Font handling; Temporal or kinetic typography
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/04817Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance using icons
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04842Selection of displayed objects or displayed text elements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser

Abstract

The embodiment of the invention discloses a method and a device for adjusting the size of a document object, electronic equipment and a storage medium. The method comprises the following steps: according to a first user operation, determining one or more document objects as reference document objects, and acquiring size information of the determined reference document objects to obtain a preset size information set; determining one or more document objects as target document objects according to the second user operation; for any target document object, determining one size information in the preset size information set as target size information; and adjusting the size of any target document object to enable the size information of any target document object after adjustment to be the same as the determined target size information.

Description

Document object size adjusting method and device, electronic equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of computer application, in particular to a method and a device for adjusting the size of a document object, electronic equipment and a storage medium.
Background
At present, when a user edits a document, if the user wants to adjust different document objects in the document to the same size for typesetting, the user can only manually adjust the different document objects. For example, a document object is manually dragged to adjust the size, or a size information window of the document object is opened and new size information is input.
When the size of a plurality of document objects is adjusted, the manual adjustment method is inefficient.
Disclosure of Invention
The embodiment of the invention discloses a method and a device for adjusting the size of a document object, electronic equipment and a storage medium, which are used for improving the efficiency of adjusting the size of the document object. The specific technical scheme is as follows.
The embodiment of the invention provides a method for adjusting the size of a document object, which comprises the following steps:
according to a first user operation, determining one or more document objects as reference document objects, and acquiring size information of the determined reference document objects to obtain a preset size information set;
determining one or more document objects as target document objects according to the second user operation;
for any target document object, determining one size information in the preset size information set as target size information:
and adjusting the size of any target document object to enable the size information of any target document object after adjustment to be the same as the determined target size information.
Optionally, the adjusting the size of any target document object includes:
and modifying the size information of any target document object into the determined target size information.
Optionally, the adjusting the size of any target document object includes:
modifying the size information of any target document object into the determined target size information;
according to a preset corresponding relation between the object type and the repairing operation, executing target repairing operation aiming at any modified target document object to obtain any adjusted target document object; the target repair operation corresponds to an object type of the any target document object.
Optionally, the executing a target repairing operation for any modified target document object includes:
and under the condition that the object type of any target document object is a preset type, cutting any target document object according to the determined target size information.
Optionally, the cutting the any target document object includes:
generating a cutting frame, wherein the size information of the generated cutting frame is the same as the determined target size information;
and determining the adjusted any target document object according to the content of any target document object contained in the cutting frame based on a third user operation.
Optionally, the cutting the any target document object includes:
modifying the size information of any target document object to obtain an intermediate target document object; the size information includes: width information and height information;
the ratio of the width information to the height information between any one target document object and the obtained intermediate target document object is the same;
generating a cutting frame, wherein the size information of the generated cutting frame is the same as the determined target size information;
and determining any adjusted target document object according to the content of the intermediate target document object contained in the cutting frame based on a third user operation.
Optionally, the modifying the size information of any target document object to obtain an intermediate target document object includes:
modifying the size information of any target document object so that the modified width information is the same as the width information in the determined target size information, and the modified height information is greater than or equal to the height information in the determined target size information; or making the modified height information the same as the height information in the determined target size information, the modified width information being greater than or equal to the width information in the determined target size information;
and determining any modified target document object as an intermediate target document object.
Optionally, the determining, for any target document object, one size information in the preset size information set as the target size information includes:
and aiming at any target document object, selecting one size information from the preset size information set according to the sequence of the size information in the preset size information set to determine the size information as the target size information.
Optionally, under the condition that the preset size information set includes information of different sizes, the size information included in the preset size information set has a first precedence order.
Optionally, the determined target document object has a second precedence order;
the selecting one size information from the preset size information set to determine as the target size information includes:
determining first size information in the first sequence as target size information under the condition that any target document object is a first target document object in the second sequence;
under the condition that any target document object is not the first target document object in the second sequence, if the target size information of the previous target document object in the second sequence has the next size information in the first sequence, determining the next size information as the target size information; and if the next size information does not exist in the first sequence, determining the first size information as target size information.
Optionally, the determined target document object has a second precedence order; the determined number of target document objects is the same as the number of size information in the preset size information set;
the selecting one size information from the preset size information set to determine as the target size information includes:
selecting one size information from the preset size information set to determine the size information as target size information; the order of any target document object in the second precedence order is the same as the order of the selected size information in the first precedence order.
Optionally, the determining, for any target document object, one size information in the preset size information set as the target size information includes:
and for any target document object, determining one size information selected by the fourth user operation in the preset size information set as target size information.
Optionally, the preset size information set includes a correspondence between the determined object type of the reference document object and the size information;
the determining, for any target document object, one size information in the preset size information set as target size information includes:
and for any target document object, determining the size information corresponding to the object type of the any target document object in the preset size information set, and selecting one size information from the determined size information to determine the size information as the target size information.
Optionally, the selecting one size information from the determined size information to determine as the target size information includes:
under the condition that the determined size information contains different size information, a third sequence is formed among the size information contained in the determined size information; determining target size information according to the third sequence;
in the case where the determined size information contains a single size information or only the same plurality of size information, any of the determined size information is determined as the target size information.
Optionally, in the determined target document objects, a fourth precedence order corresponding to the object types is provided between the target document objects with the same object type;
the determining the target size information according to the third sequence includes:
determining a fourth sequence corresponding to the object type of any target document object;
determining first size information in a third sequence as target size information under the condition that any target document object is a first target document object in the determined fourth sequence;
if the target size information of the previous target document object in the determined fourth sequence has next size information in the third sequence under the condition that any target document object is not the first target document object in the determined fourth sequence, determining the next size information as the target size information; and if the next size information does not exist in the third sequence, determining the first size information as target size information.
Optionally, in the determined target document objects, the target document objects with the same object type have a fourth precedence order corresponding to the object type;
the determining the target size information according to the third sequence includes:
determining a fourth sequence corresponding to the object type of any target document object; the number of the determined size information is the same as the number of the target document objects contained in the fourth precedence order;
selecting one size information from the determined size information to determine as target size information; the order of any target document object in the fourth precedence order is the same as the order of the selected size information in the third precedence order.
Optionally, the selecting one size information from the determined size information to determine as the target size information includes:
and determining one size information selected by the fifth user operation in the determined size information as the target size information for any target document object.
Optionally, after resizing the any target document object, the method further comprises:
and modifying the position information of any adjusted target document object so as to ensure that any adjusted target document object is not overlapped with any other document object.
Optionally, the reference document object is in the same document as the target document object; or the reference document object and the target document object are in different documents.
The embodiment of the present invention further provides a document object size adjusting apparatus, including:
the reference determining unit is used for determining one or more document objects as reference document objects according to a first user operation, and acquiring the size information of the determined reference document objects to obtain a preset size information set;
the target adjusting unit is used for determining one or more document objects as target document objects according to second user operation; for any target document object, determining one size information in the preset size information set as target size information; and adjusting the size of any target document object to enable the size information of any target document object after adjustment to be the same as the determined target size information.
Optionally, the target adjusting unit is configured to: and modifying the size information of any target document object into the determined target size information.
Optionally, the target adjusting unit includes:
a modification subunit, configured to modify the size information of any target document object into the determined target size information;
the repairing subunit is configured to execute a target repairing operation on the modified any target document object according to a preset corresponding relationship between an object type and the repairing operation, so as to obtain an adjusted any target document object; the target repair operation corresponds to an object type of the any target document object.
Optionally, the repair subunit includes:
and the cutting subunit is used for cutting any target document object according to the determined target size information under the condition that the object type of any target document object is a preset type.
Optionally, the clipping subunit is configured to:
generating a cutting frame, wherein the size information of the generated cutting frame is the same as the determined target size information;
and determining the adjusted any target document object according to the content of any target document object contained in the cutting frame based on a third user operation.
Optionally, the clipping subunit is configured to:
modifying the size information of any target document object to obtain an intermediate target document object; the size information includes: width information and height information; the ratio of the width information to the height information between any one target document object and the obtained intermediate target document object is the same;
generating a cutting frame, wherein the size information of the generated cutting frame is the same as the determined target size information;
and determining any adjusted target document object according to the content of the intermediate target document object contained in the cutting frame based on a third user operation.
Optionally, the clipping subunit is configured to:
modifying the size information of any target document object so that the modified width information is the same as the width information in the determined target size information, and the modified height information is greater than or equal to the height information in the determined target size information; or making the modified height information the same as the height information in the determined target size information, the modified width information being greater than or equal to the width information in the determined target size information; and determining any modified target document object as an intermediate target document object.
Optionally, the target adjusting unit includes:
and the target selection subunit is used for selecting one size information from the preset size information set according to the sequence of the size information in the preset size information set and determining the size information as the target size information aiming at any target document object.
Optionally, under the condition that the preset size information set includes information of different sizes, the size information included in the preset size information set has a first precedence order.
Optionally, the determined target document object has a second precedence order; the target selection subunit is configured to: determining first size information in the first sequence as target size information under the condition that any target document object is a first target document object in the second sequence;
under the condition that any target document object is not the first target document object in the second sequence, if the target size information of the previous target document object in the second sequence has the next size information in the first sequence, determining the next size information as the target size information; and if the next size information does not exist in the first sequence, determining the first size information as target size information.
Optionally, the determined target document object has a second precedence order; the determined number of target document objects is the same as the number of size information in the preset size information set; the target selection subunit is configured to: selecting one size information from the preset size information set to determine the size information as target size information; the order of any target document object in the second precedence order is the same as the order of the selected size information in the first precedence order.
Optionally, the target adjusting unit includes:
and the operation selection subunit is used for determining one size information selected by the fourth user operation in the preset size information set as the target size information aiming at any target document object.
Optionally, the preset size information set includes a correspondence between the determined object type of the reference document object and the size information; the target adjusting unit includes:
and the type selection subunit is used for determining, aiming at any target document object, the size information corresponding to the object type of the target document object in the preset size information set, and selecting one size information from the determined size information to determine the size information as the target size information.
Optionally, the type selecting subunit is configured to:
under the condition that the determined size information contains different size information, a third sequence is formed among the size information contained in the determined size information; determining target size information according to the third sequence;
in the case where the determined size information contains a single size information or only the same plurality of size information, any of the determined size information is determined as the target size information.
Optionally, in the determined target document objects, a fourth precedence order corresponding to the object types is provided between the target document objects with the same object type; the type selection subunit is configured to:
determining a fourth sequence corresponding to the object type of any target document object;
determining first size information in a third sequence as target size information under the condition that any target document object is a first target document object in the determined fourth sequence;
if the target size information of the previous target document object in the determined fourth sequence has next size information in the third sequence under the condition that any target document object is not the first target document object in the determined fourth sequence, determining the next size information as the target size information; and if the next size information does not exist in the third sequence, determining the first size information as target size information.
Optionally, in the determined target document objects, the target document objects with the same object type have a fourth precedence order corresponding to the object type; the type selection subunit is configured to:
determining a fourth sequence corresponding to the object type of any target document object; the number of the determined size information is the same as the number of the target document objects contained in the fourth precedence order;
selecting one size information from the determined size information to determine as target size information; the order of any target document object in the fourth precedence order is the same as the order of the selected size information in the third precedence order.
Optionally, the type selecting subunit is configured to: and determining one size information selected by the fifth user operation in the determined size information as the target size information for any target document object.
Optionally, the apparatus further comprises:
and the position adjusting unit is used for modifying the position information of any adjusted target document object so as to ensure that any adjusted target document object is not overlapped with any other document object.
Optionally, the reference document object is in the same document as the target document object; or the reference document object and the target document object are in different documents.
The embodiment of the invention also provides electronic equipment which 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:
a processor for implementing the method steps of any of the above-described document object resizing methods when executing a program stored on the memory.
An embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored, and the computer program, when executed by a processor, implements the method steps of any of the above-mentioned document object size adjustment methods.
The document object size adjusting method provided by the embodiment of the invention can flexibly adjust other document objects according to the size information of the existing document object by recording the size information of one or more reference document objects and adjusting the size information of one or more target document objects, can quickly obtain a plurality of document objects with the same size, is convenient for subsequent typesetting, improves the typesetting efficiency, and reduces the computer resource loss caused by frequently adjusting the size information of the document objects.
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 described in the embodiments of the present invention, and it is also possible for a person skilled in the art to obtain other drawings based on the drawings.
FIG. 1 is a schematic diagram illustrating an example of resizing a document object according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a document object resizing method according to an embodiment of the present invention;
FIG. 3 is a schematic diagram illustrating an example of selecting multiple document objects according to an embodiment of the present invention;
FIG. 4 is a schematic diagram illustrating an example of determining target size information according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of another example of determination of target size information provided by an embodiment of the invention;
FIG. 6 is a schematic diagram illustrating an example of selecting target size information according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of another example of target size information selection provided by an embodiment of the invention;
FIG. 8 is a schematic diagram of another example of determination of target size information provided by an embodiment of the present invention;
FIG. 9 is a schematic diagram of another example of determination of target size information provided by an embodiment of the present invention;
FIG. 10 is a schematic diagram of another example of determination of target size information provided by an embodiment of the present invention;
FIG. 11 is a schematic diagram of another example of determination of target size information provided by an embodiment of the invention;
FIG. 12 is a schematic diagram illustrating an example of an adjustment of a target document object according to an embodiment of the present invention;
FIG. 13 is a schematic diagram illustrating an example of target document object cropping according to an embodiment of the present invention;
FIG. 14 is a schematic diagram of another example of target document object cropping provided by an embodiment of the invention;
FIG. 15 is a schematic diagram of another example of target document object cropping provided by an embodiment of the invention;
FIG. 16 is a schematic structural diagram of a document object resizing device according to an embodiment of the present invention;
fig. 17 is a schematic diagram of an apparatus for configuring a method of an embodiment of the invention.
Detailed Description
In order to make those skilled in the art better understand the technical solutions in the embodiments of the present invention, the technical solutions in the embodiments of the present invention will be described in detail 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 specification, and not all embodiments. All other embodiments derived by one of ordinary skill in the art from the embodiments given herein are intended to fall within the scope of the disclosure.
At present, when a user edits a document, if the user wants to adjust different document objects in the document to the same size for typesetting, the user can only manually adjust the different document objects. For example, a document object is manually dragged to adjust the size, or a size information window of the document object is opened and new size information is input.
When the size of a plurality of document objects is adjusted, if the manual adjustment method is adopted, the amplitude of the manual adjustment is difficult to grasp, the adjusted document objects are easy to be too large or too small in size, the frequency of the adjustment is increased, the efficiency of the manual adjustment method is low, and the manual adjustment method cannot be adjusted to the required size.
When the size of a plurality of document objects is adjusted, if a new size information input mode is adopted, the size information of one document object needs to be acquired first, and then a size information window of another document object needs to be opened. In the opened window, the size information of the other document object is set using the acquired size information. The whole setting process is complex, batch setting of a plurality of document objects cannot be carried out, and time consumption of setting is increased.
In order to solve the above technical problem, an embodiment of the present invention provides a method for adjusting a size of a document object.
The method may resize the document object. The document object may be a preset document object, for example, a character, a text box, a shape, a table, a picture, an icon, a line, ink, a three-dimensional model, and the like.
In an alternative embodiment, the document object may be defined as an object other than the character in the document, i.e. a non-character object.
Of course, the embodiment of the present invention does not limit the specific form of the document object. Document objects may have corresponding object types for distinguishing different forms of document objects. For example, a character type, a text box type, a shape type, a table type, a picture type, an icon type, a line type, an ink type, a three-dimensional model type, and the like.
The document may specifically be a file containing a document object of adjustable size. Such as a text editing document, a tabular document, a presentation document, notes, a whiteboard, slides, etc. Embodiments of the present invention are not limited to a particular form of document.
In the method for adjusting the size of the document object provided by the embodiment of the invention, the reference document object can be determined based on the user operation, the device or the software can record the size information of the reference document object, the target document object needing to be adjusted in size is further determined based on the user operation, and the device or the software directly adjusts the size information of the target document object into the recorded size information. The user operation may be a selection operation. The mode of selecting the operation can be clicking, selecting a frame and the like.
After adjustment, the size information of the target document object is the same as that of the reference document object, so that typesetting can be facilitated.
According to the method, the size information is recorded and adjusted, other document objects can be flexibly adjusted according to the size information of the existing document objects, a plurality of document objects with the same size can be quickly obtained, and subsequent typesetting is facilitated.
The reference document object and the target document object can be in the same document or different documents, so that the use by a user is further facilitated, and the sizes of the document objects among different documents are adjusted, so that the typesetting is facilitated. Of course, the reference document object may be of the same or different type than the target document object. For example, the reference document object may be a text box and the target document object may be a picture.
For convenience of understanding, fig. 1 is a schematic diagram illustrating an example of resizing a document object according to an embodiment of the present invention.
The document object comprises document objects 1-4, wherein the document object 1 is a triangle, the size information is (width 2 height 4), the document object 2 is a rectangle, the size information is (width 3 height 4), the document object 3 is a circle, the size information is (width 4 height 4), the document object 4 is a triangle, and the size information is (width 4 height 2).
Further, document object 1 and document object 2 are in the same page of the same document, document object 1 and document object 3 are in different pages of the same document, and document object 1 and document object 4 are in different documents.
With document object 1 as a reference document object, size information (width 2 height 4) is recorded, and with document objects 2-4 as target document objects, the size information of document objects 2-4 can be adjusted to the recorded size information (width 2 height 4).
Among them, the size information can be directly adjusted among different forms of document objects. The size information can also be directly adjusted between document objects of different object types.
The following explains a document object size adjustment method provided by an embodiment of the present invention in detail with reference to the accompanying drawings.
Fig. 2 is a schematic flow chart of a document object resizing method according to an embodiment of the present invention. The method may be applied to document editing software, or other software, for example, for resizing. The method may also be applied to electronic devices.
The method may include the following steps.
S101: according to the first user operation, one or more document objects are determined as reference document objects, and size information of the determined reference document objects is obtained to obtain a preset size information set.
S102: and determining one or more document objects as target document objects according to the second user operation.
S103: and determining one size information in a preset size information set as target size information aiming at any target document object.
S104: and adjusting the size of the targeted target document object so that the size information of the adjusted target document object is the same as the determined target size information.
According to the method, the size information of one or more reference document objects is recorded and the size information of one or more target document objects is adjusted, so that other document objects can be flexibly adjusted according to the size information of the existing document objects, a plurality of document objects with the same size can be quickly obtained, subsequent typesetting is facilitated, and the typesetting efficiency is improved.
When the sizes of the plurality of target document objects are adjusted, on one hand, the problem of low efficiency caused by manual adjustment can be avoided, the sizes of the target document objects can be conveniently and accurately adjusted according to the determined size information of the reference document objects, the situation that the sizes of the adjusted document objects are deviated due to manual adjustment is avoided, and the adjustment efficiency is improved.
On the other hand, the target document objects can be adjusted in batch conveniently according to the size information of the reference document object, and each target document object does not need to be set one by one, so that the time for setting the size information is reduced, and the adjustment efficiency is improved.
1. The following explains with respect to S101.
In an alternative embodiment, the first user action may be used to select a document object. And may be particularly useful for selecting document objects from a single document.
Optionally, the first user operation may specifically include: selecting one or more document objects through a selection box; or clicking one or more document objects through a mouse during the period of pressing the shift key on the keyboard, wherein the clicked document objects are the document objects selected by the user.
Optionally, the first user operation may also be used to invoke the process to execute S101, determine all document objects selected by the first user operation as reference document objects, and obtain size information of the determined reference document objects, to obtain a preset size information set, and use the preset size information set in subsequent steps.
Optionally, the first user operation may include other user operations besides selecting a document object, for example, a box selection or a click selection, for example, clicking a function icon with a mouse, clicking a shortcut function key with a keyboard, and the like. These other user operations may be used to invoke the process to execute S101.
In a specific example, the first user action may include: and during the period of holding the shift key, clicking one or more document objects by a mouse, wherein the clicked document objects are the document objects selected by the user, and then clicking a size brush icon provided in the software.
After clicking the "size brush" icon, the software may directly determine all selected document objects as reference document objects and obtain size information of the determined reference document objects for use in subsequent steps.
Optionally, software or equipment applying the above method flow may also detect a first user operation, and when detecting that the first user operation is generated, may determine, in response to the first user operation, all document objects selected by the first user operation as reference document objects, and obtain size information of the determined reference document objects, to obtain a preset size information set, and use it in subsequent steps.
Optionally, the preset size information set may contain size information as a reference for subsequent adjustment. Specifically, the size information may include one or more pieces of size information, that is, size information of all the document objects selected by the first user operation.
It is to be noted that alternatively, different reference document objects may have the same size information. In order to retain the size information of all the reference document objects, marks can be added to the size information for distinguishing, specifically, the marks can be sequence marks, and the document objects can also be identifiers, so that the same size information can be retained in a preset size information set.
In an alternative embodiment, in the document objects selected by the first user operation, different document objects may be in the same document or in different documents, that is, size information of different document objects in different documents may be collected by the first user operation and added to the preset size information set.
The method and the device can facilitate the operation of the user, so that the user can gather the size information of the document object, adjust the sizes of other document objects or document objects in other documents, facilitate the typesetting of the user aiming at a plurality of documents at the same time, and improve the use experience of the user.
2. The following explains with respect to S102.
After the preset size information set is obtained in S101, a target document object that needs to be resized may be further selected.
In an alternative embodiment, the second user action may be used to select a document object. It may be used in particular to select a document object from a single document or from a plurality of different documents.
Optionally, the second user operation may specifically include: selecting one or more document objects through a selection box; or clicking one or more document objects through a mouse during the period of pressing the shift key on the keyboard, wherein the clicked document objects are the document objects selected by the user.
Optionally, the second user operation may also be used to invoke the process to execute S102, and all the document objects selected by the second user operation are determined as target document objects and used in the subsequent steps.
Optionally, the second user operation may include other user operations besides selecting the document object, for example, a frame selection or a click selection, for example, clicking a function icon with a mouse, clicking a shortcut function key with a keyboard, and the like. These other user operations may be used to invoke the process to execute S102.
In a specific example, the second user action may include: and during the period of pressing the shift key, clicking one or more document objects by a mouse, wherein the clicked document objects are the document objects selected by the user, and then clicking an application size brush icon provided in software.
After clicking the "apply size brush" icon, the software may directly determine all selected document objects as target document objects for use in subsequent steps.
Alternatively, the software or the device applying the above method flow may also detect a second user operation, and in a case where the second user operation is detected to be generated, all document objects selected by the second user operation may be determined as target document objects in response to the second user operation, and used in subsequent steps.
In an alternative embodiment, the first user action and the second user action may be differentiated to facilitate accurate determination of the reference document object or the target document object.
Alternatively, the first user operation and the second user operation may be distinguished by different operations included therein.
For example, the first user action may include: while holding down the shift key on the keyboard, one or more document objects are clicked by the mouse. The second user operation may include: while holding down the ctrl key on the keyboard, one or more document objects are clicked by the mouse.
Alternatively, the first user operation and the second user operation may include the same operation, and are distinguished according to the operation order or the preset size information set.
For example, the first user operation and the second user operation may both include: while holding down the shift key on the keyboard, one or more document objects are clicked by the mouse.
If the first user operation was performed the previous time, the same operation is performed the next time, and it may be determined to be a second user operation. If the second user operation was performed last time, the same operation is performed next time, and it may be determined to be the first user operation. The operation performed for the first time may be a first user operation.
If the preset size information set is an empty set or the preset size information set does not exist, determining that the executed operation is a first user operation; if the preset size information set is not an empty set, it may be determined that the performed operation is a second user operation. Correspondingly, after the above method flow is executed, the preset size information set may be emptied, or the preset size information set may be directly deleted.
In an alternative embodiment, the document object selected by the first user operation may be in the same document as the document object selected by the second user operation, or may be in a different document.
Of course, since the first user operation may select a plurality of document objects as the reference document objects, the second user operation may select a plurality of document objects as the target document objects.
Different reference document objects can be in the same document or different documents; different target document objects can be in the same document or different documents; the reference document object and the target document object may be in the same document or in different documents.
Alternatively, the reference document object may be in the same document as the target document object; or the reference document object is in a different document than the target document object.
In the embodiment, the typesetting can be simultaneously performed on a plurality of documents, so that the typesetting efficiency is improved, and the user experience is improved.
According to the method and the device, the sizes of the document objects in other documents can be adjusted according to the size information of the document object in one document, cross-document adjustment is achieved, selection of the reference document object and the target document object is more flexible, the reference document object and the target document object do not need to be fixed in the same document, use experience of a user is improved, batch adjustment can be conducted on a plurality of documents by the user, adjustment does not need to be conducted on each document, and typesetting efficiency is improved.
In conjunction with the above explanations of S101 and S102, for the convenience of understanding, the embodiment of the present invention also provides a specific application example.
The user may select a document object via a selection box and then click a "size brush" icon provided by the software. After detecting the user operation, the software may determine the document object currently selected by the user as a reference document object, and obtain size information of the reference object to obtain a preset size information set.
Wherein clicking on the "size brush" icon may indicate that only a single document object needs to be adjusted.
The user may then click directly on a document object. After detecting the user operation, the software may determine the document object currently selected by the user as the target document object, and perform subsequent adjustment.
The user may also select a document object via a selection box and double click the "size brush" icon provided by the software. After detecting the user operation, the software may determine the document object currently selected by the user as a reference document object, and obtain size information of the reference object to obtain a preset size information set.
Wherein double-clicking the "size brush" icon may indicate that multiple document objects need to be adjusted.
The user may then directly click on the document object multiple times. After the document object is clicked each time, after the software detects the user operation, the document object currently selected by the user can be determined as the target document object, and subsequent adjustment is performed.
In addition, the "size brush" icon may be double clicked or the ese key on the keyboard may be tapped again, indicating that the adjustment is complete.
In an alternative embodiment, in a case that the user needs to adjust multiple document objects, the second user operation may be to directly frame and select multiple document objects, or to click multiple document objects while holding down a shift key on a keyboard.
Alternatively, the document objects may be clicked several times to adjust the document objects respectively. That is, by a plurality of times of the second user operation, adjustment is performed by determining one document object as a target document object each time.
In an alternative embodiment, the execution order between S102 and S103 and S104 may not be limited.
Alternatively, S103 and S104 may be executed after determining all target document objects in S102.
Alternatively, the second user operation may include a plurality of operations, each of which may determine that a single document object is a target document object, thereby determining a plurality of document objects as target document objects. Therefore, in the process of executing S102, after each operation determines that a single document object is a target document object, S103 and S104 may be executed directly for the target document object.
Therefore, alternatively, in the process of determining the target document object, each time a document object is determined as the target document object, S103 and S104 may be performed for the target document object. It is not necessary to perform S103 and S104 after determining all the target document objects.
3. The following explains with respect to S103.
Since a plurality of size information may be included in the preset size information set, and each target document object has only one size information, it is necessary to determine one size information as corresponding target size information for each target document object.
Wherein the target size information may be a size information target that the corresponding target document object needs to be adjusted.
In an alternative embodiment, the preset size information set may only include one size information, or may only include a plurality of same size information.
In the present embodiment, there is only one size information in the preset size information set that can be used for selection of the adjustment target document object.
Accordingly, correspondingly, for any target document object, the single size information included in the preset size information set can be directly determined as the target size information.
Correspondingly, for each target document object, a single size information included in the preset size information set may be determined as the target size information.
In another alternative embodiment, the preset size information set may include a plurality of different size information. Therefore, it is necessary to determine corresponding target size information from a preset size information set for each target document object by a preset selection method. The process flow of the method is not limited to a specific preset selection method, and several examples are provided below as an exemplary illustration.
For convenience of description, the following embodiments are explained with respect to any target document object, and it is understood that the corresponding target size information may be determined for each target document object in the manner of any of the following embodiments.
Alternatively, for any target document object, one size information may be randomly selected from a preset size information set to be determined as the target size information.
Alternatively, for any target document object, size information with the smallest difference compared with the size information of the target document object may be selected from a preset size information set and determined as target size information.
Alternatively, users often have many different requirements when composing.
For example, the user wishes to determine the reference document objects in a certain order and adjust the target document objects one by one according to this order; alternatively, the user wishes to adjust the size information for a target document object having the same object type according to the object type of the reference document object.
With these requirements, the size information of the target document object can be adjusted more accurately, thereby facilitating the layout.
Therefore, in an alternative embodiment, for any target document object, one size information may be selected from the preset size information set to be determined as the target size information according to the order of the size information in the preset size information set.
Optionally, specifically, the size information in the preset size information set may be sorted, and then the target size information is determined for any target document object according to the sorting order.
According to the method and the device, the target size information can be selected according to the sequence of the size information in the preset size information set, the target size information can be conveniently and accurately determined for any target document object subsequently, the operation and adjustment of a user are facilitated, and the operation experience of the user is improved.
In the embodiment, by defining the sequence among the size information in the preset size information set, when the target size information is determined, a user can conveniently and accurately determine the next target size information according to the sequence, and then can select the target document object needing to be adjusted to the next target size information, so that the user can conveniently operate and adjust the size of the target document object, and the user operation experience is improved.
The target size information is determined according to the sequence, and the sequence of the size information needs to be determined first, and then the target size information is determined based on the determined sequence.
In an optional embodiment, in a case that the preset size information set includes different size information, the size information included in the preset size information set may have a first order. The first chronological order may include a plurality of sequentially arranged size information.
Optionally, when determining the target size information for any target document object, the determination may be performed according to a first order between different pieces of size information.
Optionally, after the preset size information set is obtained and before the target size information is determined, a first precedence order may be determined for the size information included in the preset size information set.
Specifically, the first sequence may be determined according to a first user operation.
Alternatively, the first user operation may include an operation of selecting a document object multiple times, for example, clicking a document object multiple times while holding the shift key. The executed sequence exists among the operations for selecting the document objects for multiple times, and the first sequence among the size information contained in the preset size information set can be determined according to the sequence of the selected document objects in the first user operation.
Specifically, the document objects may be one-to-one corresponding to the size information of the document objects according to the sequence in which the first user selects the document objects, so as to obtain the sequence between the corresponding size information, and the size information of the document objects selected by the first user selects is included in the preset size information set, so that the sequence between the corresponding size information may be determined as the first sequence between the size information in the preset size information set.
Alternatively, the first user action may comprise an action to select a plurality of document objects at a time, for example, by selecting a box, a plurality of document objects at a time. Further, a fixed order may be preset, and the order between the document objects may be determined according to the fixed order. For example, the order between the document objects is determined in the order from top to bottom, from left to right, or the order between the document objects may be determined in the order in which the document objects enter the selection box.
And then, according to the determined sequence among the document objects, determining a first sequence among the size information contained in the preset size information set. Specifically, the document objects may be one-to-one corresponding to the size information of the document objects according to the determined order between the document objects, so as to obtain the order between the corresponding size information, and the size information of the document object selected by the first user operation is included in the preset size information set, so that the order between the corresponding size information may be determined as the first order between the size information in the preset size information set.
For ease of understanding, fig. 3 is a schematic diagram illustrating an example of selecting a plurality of document objects according to an embodiment of the present invention.
Which contains document objects 1-3 having size information 1-3, respectively.
The document objects 1-3 may be selected as reference document objects in two ways, and the first precedence order between different size information in the preset size information set may be determined according to the order of selection. The specific sequence is marked in the figure by the reference numerals 1, 2 and 3.
Specifically, the selection box may be used to determine the document objects 1 to 3 included in the selection box as reference document objects, and the order of selecting the document objects is determined as document object 1, document object 2, and document object 3 according to the order from top to bottom. Further, the first order among the size information may be determined to be size information 1, size information 2, and size information 3.
Alternatively, while the shift key is held, document objects 1 to 3 may be clicked in sequence to determine the reference document object. And determines the order of selecting the document objects as document object 1, document object 2, and document object 3 according to the order of clicking. Further, the first order among the size information may be determined to be size information 1, size information 2, and size information 3.
According to the method and the device, the target size information can be conveniently and accurately determined for any target document object subsequently by limiting the first sequence among the different size information in the preset size information set, so that the operation and adjustment of a user are facilitated, and the operation experience of the user is improved.
In this embodiment, by defining that the size information in the preset size information set has the first sequence, when determining the target size information, a user can conveniently and accurately determine the next target size information according to the first sequence, and then can select the target document object which needs to be adjusted to the next target size information, so that the user can conveniently operate and adjust the size of the target document object, and the user operation experience is improved.
In an optional embodiment, after the first precedence order between different pieces of size information in the preset size information set is clarified, the target size information may be further determined according to the first precedence order.
Optionally, the target document object determined according to the second user operation may have a second precedence order. The second precedence order may include one or more sequentially arranged target document objects.
Specifically, the second precedence order may be determined according to a second user operation.
Optionally, the second user operation may select only one document object to determine as the target document object, and the second precedence order may include only one target document object, where the target document object may be a first target document object in the second precedence order.
Alternatively, the second user operation may include an operation of selecting a single document object multiple times, for example, clicking a document object multiple times while holding the shift key. The operation of selecting the document object for multiple times has an execution sequence, so that the sequence of selecting the document object in the second user operation can be directly determined as the second sequence of the target document object.
Alternatively, the second user operation may include an operation of selecting a plurality of document objects at a time, for example, by selecting a box, a plurality of document objects at a time. Further, a fixed order may be preset according to the position of the document objects, and the order between the document objects may be determined according to the fixed order. For example, the order between the document objects is determined in the order from top to bottom, from left to right, or the order between the document objects may be determined in the order in which the document objects enter the selection box.
The determined order between the document objects may be directly determined as the second precedence order of the target document objects.
In an alternative embodiment, after all the target document objects are determined, S103 and S104 may be performed. In this embodiment, optionally, after all the target document objects are determined, before S103 is executed, the second precedence order may be determined.
It should be noted that, in another alternative embodiment, the second user operation may include an operation of selecting the document object multiple times, and after each time the selected document object is determined to be the target document object, S103 and S104 may be directly performed on the target document object.
After the document object is selected each time, the second precedence order may be updated, and specifically, the target document object may be newly added in the second precedence order.
For example, after the first document object is clicked and the clicked document object is determined as the target document object, S103 may be executed to determine the target size information for the target document object, where only the target document object is included in the second precedence order. The target document object is a first target document object in a second precedence order.
After the second document object is clicked and the clicked document object is determined as the target document object, the second sequence can be updated according to the sequence of selecting the document objects, and the second sequence containing the two target document objects is obtained. The currently clicked second document object may be the second target document object in the second precedence order. Then S103 is performed to determine target size information for the target document object.
Alternatively, the currently determined target document object may have a second precedence order.
In an alternative embodiment, after determining the first precedence order and the second precedence order, the first precedence order may be recycled and the second precedence order may be matched.
Optionally, determining one size information in the preset size information set as the target size information may include: and under the condition that the target document object is the first target document object in the second sequence, determining the first size information in the first sequence as the target size information.
Under the condition that the targeted target document object is not the first target document object in the second sequence, if the target size information of the previous target document object in the second sequence and the next size information exist in the first sequence, determining the next size information as the target size information; and if the target size information of the previous target document object in the second sequence does not exist the next size information in the first sequence, determining the first size information as the target size information.
For ease of understanding, a specific example is given below.
The first precedence order may include size information 1 and size information 2, and the second precedence order may include target document objects 1-3.
When the target size information is determined for the target document object 1, since the target document object 1 is the first target document object in the second precedence order, the first size information in the first precedence order, that is, the size information 1, may be determined as the target size information.
When the target size information is determined for the target document object 2, since the target document object 2 is the second target document object in the second precedence order, the target size information of the previous target document object (target document object 1) is size information 1, and the next size information exists in the first precedence order. Therefore, the size information 2, which is the next size information in the first precedence order, can be determined as the target size information.
When the target size information is determined for the target document object 3, since the target document object 3 is the third target document object in the second precedence order, the target size information of the previous target document object (target document object 2) is the size information 2, and the next size information does not exist in the first precedence order. Therefore, the first size information in the first precedence order, i.e., size information 1, may be determined as the target size information.
And finally determining: the target size information of the target document object 1 is size information 1, the target size information of the target document object 2 is size information 2, and the target size information of the target document object 3 is size information 1.
It should be noted that the number of the reference document objects determined by the first user operation and the target document objects determined by the second user operation is not limited. The number of reference document objects may be greater than, equal to, or less than the number of target document objects.
Correspondingly, the number of size information in the first precedence order may be greater than, equal to, or less than the number of target document objects in the second precedence order.
Optionally, when the number of size information in the first precedence order is greater than or equal to the number of target document objects in the second precedence order, the size information may be directly matched one by one in the order without loop determination.
And under the condition that the quantity of the size information in the first sequence is less than that of the target document objects in the second sequence, determining in a circulating mode.
In an optional embodiment, when the number of the size information in the first precedence order is greater than or equal to the number of the target document objects in the second precedence order, the target document objects in the second precedence order may be matched one by one according to the first precedence order.
Optionally, the determined target document object has a second precedence order; the determined number of target document objects is less than or equal to the number of size information in the preset size information set.
Selecting one size information from a preset size information set to determine as the target size information may include: selecting one size information from a preset size information set to determine the size information as target size information; the order of the targeted target document object in the second precedence order is the same as the order of the selected size information in the first precedence order.
It can be seen that, in the case that the number of size information in the first precedence order is greater than or equal to the number of target document objects in the second precedence order, the size information in the same order may be determined as the target size information directly for the target document objects.
For convenience of understanding, fig. 4 is a schematic diagram of an example of determining target size information according to an embodiment of the present invention.
Document objects 1-7 are contained therein, corresponding to the size information 1-7, respectively.
The first precedence order may include size information 1-4 and the second precedence order may include target document objects 5-7. The number of size information in the first precedence order is greater than the number of target document objects in the second precedence order. And the first and second precedence order are numbered in the figure.
Therefore, the target size information may be determined to be size information 1 for the target document object 5 according to the first order; determining target size information as size information 2 for the target document object 6; for the target document object 7, the target size information is determined to be the size information 3.
Fig. 5 is a schematic diagram illustrating another example of determining target size information according to an embodiment of the present invention.
Document objects 1-7 are contained therein, corresponding to the size information 1-7, respectively.
The first precedence order may include size information 1-3 and the second precedence order may include target document objects 4-7. The number of size information in the first precedence order is less than the number of target document objects in the second precedence order. And the first and second precedence order are numbered in the figure.
Therefore, the target size information may be determined to be size information 1 for the target document object 4 according to the first order; determining target size information as size information 2 for the target document object 5; determining target size information as size information 3 for the target document object 6; for the target document object 7, the target size information is determined to be size information 1.
It is to be noted that, among others, the target document object 5 of the shape type may be adjusted using the size information 2 of the reference document object 2 of the text box type as the target size information. Size information may be unified between reference document objects and target document objects of different object types.
In addition, the size information of a part of the document object usually contains width information and height information, while for a 3D object, the size information may also contain depth information, and specifically, when adjusting, the depth information may not be adjusted, and the depth information may also be adjusted according to the adjustment condition of the width information and the height information. And is not particularly limited herein.
According to the embodiment, the first sequence is recycled and matched with the target document objects in the second sequence, and the corresponding target size information is determined, so that a user can conveniently determine the target size information corresponding to the target document objects one by one through the self-defined first sequence, the user operation is facilitated, and the user operation experience is improved.
The target size information can be determined by recycling the first sequence, so that a user can determine the next target size information according to the circulation of the first sequence, and then can select the target document object needing to be adjusted to the next target size information, the size of the target document object can be conveniently adjusted by the user, and the user operation experience is improved.
And under the condition that the quantity of the size information in the first sequence is greater than or equal to the quantity of the target document objects in the second sequence, the corresponding target size information can be directly determined for the target document objects in the second sequence in the first round of circulation by recycling the size information in the first sequence. Therefore, the size information with the same order can be directly determined as the target size information aiming at the target document object, the subsequent multiple cycles are not needed to be considered, the target size information can be rapidly and conveniently determined, and the operation efficiency is improved.
Of course, in other alternative embodiments, other methods of determining the target size information may be used rather than the first order of precedence. For example, the priority of each size information in a preset size information set is determined, and the target size information is determined according to the priority.
In addition, in another alternative embodiment, after the preset size information set is determined, the preset size information set may be directly provided to the user for each target document object, so that the user may select the required target size information through a user operation.
For example, after clicking any document object, it may be determined that the currently clicked document object is the target document object, a menu item may further pop up, the menu item may include all size information in the preset size information set, and the user may click any size information in the menu item, and determine that the size information is the target size information. Of course, other fixed size information may be included in the menu items.
For easy understanding, as shown in fig. 6, a schematic diagram of an example of selecting target size information is provided for the embodiment of the present invention.
Wherein, upon clicking on the document object, a menu item may pop up containing size information 1-3. Then, the user can determine that the size information 1 is the target size information by clicking the size information 1.
Optionally, after the target size information is determined, the current target size information may be updated further according to a user operation, specifically, other size information may be determined from a preset size information set as the current target size information, so that the user may preview the layout effect of the information with different sizes until the user operation is stopped.
For example, for any target document object, the current target size information may be updated by clicking. The user can preview the typesetting effect of the information with different sizes in the preset size information set by clicking for multiple times until clicking is stopped.
Optionally, when the current target size information is specifically updated, one size information may be randomly determined from a preset size information set for updating.
Optionally, when the current target size information is updated according to the user operation, the current target size information may be updated according to the first sequence determined in the above embodiment, or may be updated by using another preset sequence. For example, the order obtained by sorting according to the size of the size information in the preset size information set.
Further, the update may be performed according to a sequential loop.
For ease of understanding, fig. 7 is a schematic diagram illustrating another example of selecting target size information according to an embodiment of the present invention.
Wherein the first sequence comprises size information 1-3. Size information 1 is width 3 and height 4, size information 2 is width 2 and height 4, and size information 3 is width 4 and height 4. The size information of the target document object is width 1 and height 1. After the target document object is clicked for the first time, the size information 1 can be used as target size information to be adjusted, and a document object with the width of 3 and the height of 4 is obtained; after the document object with the width of 3 and the height of 4 is clicked for the second time, the size information 2 can be used as target size information to be adjusted, and the document object with the width of 2 and the height of 4 is obtained; after clicking the document object with width 2 and height 4 for the third time, adjusting the size information 3 as the target size information to obtain the document object with width 4 and height 4; after the 4-wide and 4-high document object is clicked for the fourth time, the size information 1 can be adjusted as the target size information, and the 3-wide and 4-high document object is obtained.
Of course, the original size information of the target document object may also be added to the first precedence order, so as to restore the target document object.
Therefore, optionally, determining one size information in the preset size information set as the target size information for any target document object may include: and for any target document object, determining one size information selected by the fourth user operation in the preset size information set as the target size information.
Optionally, the fourth user operation may include: an operation for selecting size information from a preset size information set; or one or more operations to update the current target size information. For specific operations, reference may be made to the above-described embodiments.
In this embodiment, the target size information may be directly selected by the user from the preset size information set through the fourth user operation, so that the target size information may be directly selected by the user operation for the target document object without considering the order in the preset size information set, the corresponding target size information may be flexibly determined for each target document object, and the user may not need to consider the order in the preset size information set, which is convenient for the user operation and improves the user operation experience.
In an alternative embodiment, the target size information may also be determined according to the object types of the reference document object and the target document object.
Alternatively, for the reference document object and the target document object having the same object type, there may be a need for a user to unify size information between the reference document object and the target document object having the same object type.
For example, in the case where a user selects a reference document object of a text box type and a reference document object of a picture type, the user generally needs to unify size information between the reference document object of the text box type and the target document object for a target document object of the text box type, thereby facilitating layout.
Therefore, optionally, the preset size information set may include a correspondence between the determined object type of the reference document object and the size information.
Specifically, the obtaining of the size information of the determined reference document object in S101 to obtain a preset size information set may specifically include: and acquiring the size information and the object type of the determined reference document object, constructing the corresponding relation between the size information and the object type, and adding the corresponding relation into a preset size information set.
By the corresponding relation between the size information and the object type, the object type contained in the preset size information set and the object type of the target document object can be conveniently used for judging, so that whether a reference document object and the target document object of the same object type exist or not is judged.
Optionally, determining, as the target size information, one size information in a preset size information set for any target document object may include: and for any target document object, determining size information corresponding to the object type of the targeted target document object in a preset size information set, and selecting one size information from the determined size information to determine the size information as the target size information.
Wherein, the same object type in the preset size information set may correspond to one or more size information. Therefore, one or more pieces of size information may be included in the determined size information.
Alternatively, the target size information may be determined from all the determined size information. If the determined size information only contains one size information, the contained one size information can be directly determined as the target size information; if the determined size information contains different size information, one size information may be selected from the determined plurality of size information to be determined as the target size information.
The embodiment can quickly and accurately determine the target size information through the object type, and particularly can determine the reference document object with the same object type according to the object type of the target document object, so that the target document object can be conveniently adjusted by using the size information of the reference document object. Because the user generally adjusts the size of the document object based on the same object type, the user operation can be reduced, the target size information can be automatically determined according to the object type, the user requirement is met, the user operation is facilitated, and the user operation experience is improved.
It should be noted that the preset size information set may not include the object type of the targeted target document object, in other words, there may not be a corresponding relationship in the preset size information set, including the object type of the targeted target document object.
Therefore, the method of determining the target size information by the same object type cannot be used in the present embodiment, and other methods may be used to determine the target size information.
Optionally, if the preset size information set includes the object type of the targeted target document object, the preset size information set may include one or more corresponding relationships, including the object type.
If a corresponding relationship exists in the preset size information set and the object type of the target document object is included, the size information included in the corresponding relationship can be directly determined as the target size information.
If there are multiple corresponding relationships in the preset size information set, the target type of the target document object to which the target document object is directed is included, and the size information included in different corresponding relationships is the same, the size information included in any corresponding relationship may also be directly determined as the target size information.
If the preset size information set includes a plurality of corresponding relationships including the object types of the targeted target document objects, and there is a difference in size information included in different corresponding relationships, it is necessary to further determine the target size information from the corresponding size information.
In an alternative embodiment, the target size information is determined according to the corresponding size information, and the selection may be performed according to an order. Specifically, the corresponding size information may be size information corresponding to an object type of any target document object in a preset size information set, and one size information is selected from the determined size information and determined as the target size information.
Wherein, selecting one size information from the determined size information to determine as the target size information may specifically include: under the condition that the determined size information contains different size information, a third sequence is formed among the size information contained in the determined size information; and determining the target size information according to the third sequence.
In the case where the determined size information contains a single size information or only the same plurality of size information, any of the determined size information is determined as the target size information.
In this embodiment, the target size information may be determined quickly and accurately according to different situations of the determined size information, where the determined size information is determined according to the object type, and the size information in the preset size information set may have a situation where a plurality of pieces of different size information correspond to the same object type, or may have a situation where a single piece of size information or a plurality of pieces of the same size information correspond to the same object type.
In the case where the object type of the target document object corresponds to only a single size information or a plurality of same size information in the preset size information set, since the selected size information is the same regardless of how the size information is selected, any corresponding size information can be directly determined as the target size information.
And under the condition that the object type of the target document object corresponds to a plurality of pieces of different-size information in the preset size information set, selection is needed, and specific selection can be performed according to the sequence, so that a user can conveniently determine next target size information, further, the target document object which needs to be adjusted to the next target size information can be selected, and the user can conveniently operate and adjust the size of the target document object.
Therefore, the embodiment can facilitate the user operation and improve the user operation experience for different situations.
Optionally, the third precedence order may include a plurality of size information arranged in order.
The process of the method is not limited to the determination method of the third precedence order, and optionally, the third precedence order may be determined for a plurality of pieces of size information corresponding to the same object type, so that the third precedence order may be determined according to the first precedence order. Specifically, the third precedence order may be determined according to the front and back of the ordering of the plurality of size information corresponding to the same object type in the first precedence order.
Optionally, the third precedence order may also be determined according to the method of determining the first precedence order. Reference may be made specifically to the above explanation of the first order.
The flow of the method does not limit the execution time sequence of the step of determining the third sequence. Optionally, after obtaining the preset size information set, the size information may be grouped based on the object type, and then the third precedence order of the size information in each group may be determined. Or determining at least one piece of size information corresponding to the object type from a preset size information set according to the object type of the target document object, and then determining a third precedence order between the at least one piece of size information corresponding to the object type.
Because the reference document object and the target document object need to be matched according to the object types, the size information corresponding to the same object type can have a third sequence, and the target document object of the same object type can also have a fourth sequence, so that matching can be performed according to the third sequence and the fourth sequence.
Optionally, the target document objects may be grouped based on the object type, a corresponding fourth precedence order is determined for each group of target document objects of the same object type, and the fourth precedence order may include one or more sequentially arranged target document objects.
Any object type of the target document object may correspond to a fourth order.
The process of the method is not limited to the determination method of the fourth precedence order, and optionally, the fourth precedence order is determined for one or more target document objects of the same object type, so that the fourth precedence order can be determined according to the second precedence order. The fourth precedence order may be determined according to the front and back of the ordering of the one or more target document objects of the same object type in the second precedence order.
For an explanation of the fourth sequence, reference may be made to the above detailed explanation of the second sequence.
Optionally, in the determined target document objects, target document objects of the same object type may have a fourth precedence order corresponding to the object type.
And determining the target size information according to the third sequence, wherein the third sequence can be recycled, and the target size information is determined aiming at the target document object contained in the fourth sequence. The method specifically comprises the following steps: and determining a corresponding fourth sequence according to the object type of the targeted target document object.
In a case where the targeted target document object is the first target document object in the determined fourth precedence order, the first size information in the third precedence order may be determined as the target size information.
If the target document object is not the first target document object in the determined fourth sequence, determining the next size information as the target size information if the target size information of the previous target document object in the determined fourth sequence and the next size information exist in the third sequence; and if the target size information of the previous target document object in the determined fourth sequence does not exist next size information in the third sequence, determining the first size information as the target size information.
The number of size information included in the third precedence order, that is, the number of size information corresponding to the determined object type, may be greater than, less than, or equal to the number of target document objects in the fourth precedence order corresponding to the same object type.
Optionally, when the number of size information in the third precedence order is greater than or equal to the number of target document objects in the fourth precedence order, the size information may be directly matched one by one according to the order without loop determination.
And under the condition that the quantity of the size information in the third sequence is less than that of the target document objects in the fourth sequence, determining in a circulating mode.
Therefore, optionally, the target document objects of the same object type in the determined target document objects may have a fourth precedence order corresponding to the object type.
Determining the target size information according to the third precedence order may include: determining a fourth sequence corresponding to the object type of the target document object; the number of the determined size information is greater than or equal to the number of the target document objects included in the fourth precedence order.
Selecting one size information from the determined size information to determine as target size information; the order of the targeted target document object in the fourth precedence order is the same as the order of the selected size information in the third precedence order.
It can be seen that, in the case that the number of size information in the third precedence order is greater than or equal to the number of target document objects in the fourth precedence order, the size information in the same order may be determined as the target size information directly for the target document objects. Of course, the object type corresponding to the size information in the third precedence order is the same as the object type corresponding to the fourth precedence order.
For ease of understanding, a specific example is given below.
The third precedence order may include size information 1 of the picture 1 and size information 2 of the picture 2, where the object types of the picture 1 and the picture 2 are the same, and the size information is different. Picture 1 and picture 2 are determined as reference document objects.
In the determined target document object, the fourth precedence order corresponding to the picture type may include pictures 3-5. Pictures 3-5 are determined as target document objects.
When the target size information is determined for the picture 3, since the picture 3 is the first target document object in the fourth precedence order, the first size information in the third precedence order, that is, the size information 1, may be determined as the target size information.
When the target size information is determined for the picture 4, since the picture 4 is the second target document object in the fourth precedence order, the target size information of the previous target document object (picture 3) is the size information 1, and the next size information (size information 2) exists in the third precedence order. Therefore, the size information 2, which is the next size information in the third precedence order, may be determined as the target size information.
When the target size information is determined for the picture 5, since the picture 5 is the third target document object in the fourth precedence order, the target size information of the previous target document object (picture 4) is the size information 2, and the next size information does not exist in the third precedence order. Therefore, the first size information in the third precedence order, i.e., size information 1, may be determined as the target size information.
And finally determining: the target size information of the picture 3 is size information 1, the target size information of the picture 4 is size information 2, and the target size information of the picture 5 is size information 1.
For further understanding, fig. 8 is a schematic diagram of another example of determining target size information according to an embodiment of the present invention.
In which document objects 1-6 are contained, corresponding to size information 1-6, respectively, and in which document object 1-2 is a picture type, document object 3-4 is a shape type, and document object 5-6 is a text box type.
The document objects 1, 3, 5 are determined as reference document objects, and the document objects 2, 4, 6 are determined as target document objects.
For the document object 2, since the object types of the document object 1 and the document object 2 are the same, the size information 1 can be determined as the target size information.
For the document object 4, since the object types of the document object 3 and the document object 4 are the same, the size information 3 can be determined as the target size information.
For the document object 6, since the object types of the document object 5 and the document object 6 are the same, the size information 5 can be determined as the target size information.
For further understanding, fig. 9 is a schematic diagram of another example of determining target size information according to an embodiment of the present invention.
Document objects 1-5 are contained therein, corresponding to the size information 1-5, respectively, and wherein the document object 1 is of a picture type, the document object 2 is of a shape type, the document object 3 is of a text box type, the document object 4 is of a picture type, and the document object 5 is of a text box type.
The document objects 1-3 are determined as reference document objects and the document objects 4-5 are determined as target document objects.
For the document object 4, since the object types of the document object 4 and the document object 1 are the same, the size information 1 can be determined as the target size information.
For the document object 5, since the object types of the document object 5 and the document object 3 are the same, the size information 3 can be determined as the target size information.
For further understanding, fig. 10 is a schematic diagram of another example of determining target size information according to an embodiment of the present invention.
Document objects 1-10 are contained therein, corresponding to the size information 1-10, respectively, and wherein the document object 1 is a picture type, the document object 2 is a shape type, the document object 3 is a text box type, the document objects 4-5 are picture types, the document objects 6-8 are shape types, and the document objects 9-10 are text box types.
The document objects 1-3 are determined as reference document objects and the document objects 4-10 are determined as target document objects.
For the document object 4-5, since the object types of the document object 4-5 and the document object 1 are the same, the size information 1 can be determined as the target size information of the document objects 4 and 5.
For the document object 6-8, since the object types of the document object 6-8 and the document object 2 are the same, the size information 2 can be determined as the target size information of the document objects 6, 7, and 8.
For the document object 9-10, since the object types of the document object 9-10 and the document object 3 are the same, the size information 3 can be determined as the target size information of the document objects 9 and 10.
For further understanding, fig. 11 is a schematic diagram of another example of determining target size information according to an embodiment of the present invention.
In which document objects 1-10 are contained, corresponding to size information 1-10, respectively, and in which document object 1 is a picture type, document objects 2-3 are a shape type, document objects 4-8 are a shape type, and document objects 9-10 are picture types.
The document objects 1-3 are determined as reference document objects and the document objects 4-10 are determined as target document objects.
Among them, for the document objects 9-10, since the size information corresponding to the picture type is only the size information 1, the size information 1 can be directly determined as the target size information of the document objects 9 and 10.
For the picture objects 4-8, there are 2 size information corresponding to the shape type, and therefore, the determination needs to be performed by using the third precedence order and the fourth precedence order.
The third sequence may include size information 2-3, and the fourth sequence may include document objects 4-8. For ease of understanding, numbering is used in fig. 11.
For document object 4, since document object 4 is the first document object in the fourth precedence order, size information 2 may be determined as target size information.
For the document object 5, since the document object 5 is not the first document object in the fourth precedence order, the size information 3, which is the next size information of the size information 2 in the third precedence order, may be determined as the target size information.
For the document object 6, since the document object 6 is not the first document object in the fourth precedence order and the size information 3 does not have the next size information in the third precedence order, the size information 2 may be determined as the target size information.
For the document object 7, since the document object 7 is not the first document object in the fourth precedence order, the size information 3, which is the next size information of the size information 2 in the third precedence order, may be determined as the target size information.
For the document object 8, since the document object 8 is not the first document object in the fourth precedence order and the size information 3 does not have the next size information in the third precedence order, the size information 2 may be determined as the target size information.
For ease of understanding, the adjusted target document object is given in FIG. 11.
In this embodiment, the reference document object and the target document object of the same object type are matched first, and the third precedence order is recycled to be matched with the target document object in the fourth precedence order, so as to determine the corresponding target size information, which is convenient for a user to determine the corresponding target size information one by one through the customized third precedence order for the target document object of the same object type as the reference document object, thereby facilitating the user operation and improving the user operation experience.
The target size information can be determined by recycling the third sequence, so that the user can determine the next target size information according to the circulation of the third sequence, and then can select the target document object which needs to be adjusted to the next target size information, the size of the target document object can be conveniently adjusted by the user operation, and the user operation experience is improved.
In addition, the matching of the object types is further considered, so that the object type corresponding to the size information in the third sequence is the same as the object type of the target document object in the fourth sequence, and therefore the user requirements can be further met.
And under the condition that the quantity of the size information in the third sequence is greater than or equal to the quantity of the target document objects in the fourth sequence, the corresponding target size information can be directly determined for the target document objects in the fourth sequence in the first round of circulation by recycling the size information in the third sequence. Therefore, the size information with the same order can be directly determined as the target size information aiming at the target document object, the subsequent multiple cycles are not needed to be considered, the target size information can be rapidly and conveniently determined, and the operation efficiency is improved.
In another optional embodiment, after the corresponding size information is determined in the preset size information set according to the object type of the target document object, the corresponding size information may be presented to the user, so that the user may directly select the target size information.
Optionally, selecting one size information from the determined size information to determine as the target size information may include: and determining one size information selected by the fifth user operation in the determined size information as the target size information for any target document object.
The explanation of the fifth user operation can be referred to the explanation of the fourth user operation.
In this embodiment, the target size information may be directly selected from the size information corresponding to the preset size information set through a fifth user operation, so that the order in the preset size information set does not need to be considered, the target size information is directly selected for the target document object through the user operation, the corresponding target size information is flexibly determined for each target document object, the order in the preset size information set does not need to be considered by the user, the user operation is facilitated, and the user operation experience is improved.
4. The following explains with respect to S104.
After determining the target size information, adjustments may be made to the target document object.
In an alternative embodiment, the size information of the target document object may be modified directly by software or equipment to target size information.
Optionally, adjusting the size of the targeted target document object may include: and modifying the size information of the aimed target document object into the determined target size information.
According to the method and the device, the size information of the target document object can be automatically modified, the user operation is not needed, the size of the target document object can be conveniently and rapidly adjusted, and the subsequent typesetting is facilitated.
It should be noted that, modifying the size information directly usually causes deformation of the target document object, for example, if the object type is a picture, stretching or zooming the picture may cause distortion, mismatch, incoordination, etc. of the picture.
And for other object types, such as tables, text boxes, lines and the like, the deformation problem caused by directly modifying the size information also exists.
For example, if the size information is directly modified for the text box and the text box is reduced, the word size of the word in the text box will not match the reduced text box, and the reduced text box may not display all the words. For a table, if the size information is directly modified and the table is enlarged, the word size of the words in the table is not matched with the enlarged table, and the enlarged table may display smaller words and be difficult to see.
Therefore, in order to reduce the influence of directly modifying the size information, the target document object after the size information is modified can be repaired.
In an alternative embodiment, the target document object of the preset object type may be repaired.
Optionally, adjusting the size of the targeted target document object may include: and modifying the size information of the aimed target document object into the determined target size information. According to the preset corresponding relation between the object type and the repairing operation, executing the target repairing operation aiming at the modified aimed target document object to obtain the adjusted aimed target document object; the target repair operation may correspond to the object type of the targeted target document object.
The picture can be cut, and the original width-to-height ratio is reserved; aiming at the table, the size of each cell in the table can be adjusted, and the font size of characters in the cells can be further adjusted; the font size of the characters in the text box can be adjusted aiming at the text box; the thickness can be adjusted for lines and ink marks.
Therefore, optionally, the preset corresponding relationship between the object type and the repair operation may include a corresponding relationship between the picture type and the cropping operation, for example, when the document object of the picture type applies the size information smaller than the size of the document object, the cropping operation is performed; the corresponding relation between the form type and the operation of adjusting the size of the cells in the form, for example, when the document object of the form type applies the size information larger than the size of the document object, the cells are amplified; the corresponding relation between the text box type and the operation of adjusting the word size of the characters in the text box, for example, when the document object of the text box type applies the size information smaller than the size of the document object, the word size of the characters in the text box is adjusted to be small, so that all the characters are displayed completely; the corresponding relation between the line type and the operation of thickness adjustment, for example, when the document object of the line type applies the size information exceeding the size of the document object, the line is thickened, so that the situation that the line is too thin and is not displayed obviously is avoided; and the corresponding relation between the ink type and the operation of thickness adjustment, for example, when the ink type applies the size information smaller than the size of the ink type, the ink is adjusted to be thin, and the ink is prevented from being too thick and the outline is not obvious.
Through the restoration operation, the influence of the conditions such as deformation caused by modifying the size information can be reduced as much as possible, and the user experience is improved.
The following is an explanation by taking a picture as an example, and as shown in fig. 12, a schematic diagram of an example of adjusting a target document object is provided for the embodiment of the present invention.
The rectangular shape with a width of 3 and a height of 5 was adjusted to a rectangular shape with a width of 8 and a height of 8. The picture with the width of 4 and the height of 4 is adjusted to the picture with the width of 2 and the height of 8.
It can be seen that the deformation caused by directly modifying the size information may cause distortion of the target document object. The sun and the cloud in the picture are difficult to be accurately identified.
In addition, the user may have a need to directly modify the size information when adjusting the target document object, or may have a need to retain the original content of the target document object.
For example, the picture may contain invalid information and information that the user wishes to emphasize, and in order to facilitate the layout, the user needs to cut the picture and retain the information that the user wishes to emphasize. The picture may specifically be a picture containing a landscape and a person, wherein the user only wants to retain the head portrait of the person, so that the picture can be cut, and the head portrait of the person can be retained, thereby facilitating the subsequent typesetting. The size information of the character avatar picture may be the same as the target size information.
Generally, the user can crop the target document object of the picture type to avoid picture distortion.
Optionally, for the modified targeted target document object, performing a target repairing operation may include: and when the object type of the targeted target document object is a preset type, cutting the targeted target document object.
Wherein the preset type may include a picture type.
The size information of the target document object obtained by cutting may be the same as the target size information.
In the case that the object type of the targeted target document object is not the preset type, the size information of the targeted target document object may be directly modified to the determined target size information, or other repair operations may be performed after modifying the size information.
According to the method and the device, the target document object with the cutting requirement can be adjusted in the cutting mode by distinguishing the object type of the target document object, and other target document objects are adjusted in other modes, so that various requirements of a user for adjusting the target document object can be met, different adjusting modes are flexibly determined and used according to the object type of the target document object, the follow-up typesetting is further facilitated, and the user operation experience is improved.
The flow of the method is not limited to a specific cutting mode.
Optionally, the target document object to which the target document object is directed may be directly clipped according to a preset clipping method, so as to obtain the adjusted target document object. The size information of the adjusted target document object is the same as the determined target size information.
For example, for a target document object that is 5 wide and 5 high, the determined target size information includes 3 wide and 2 high. Clipping can be directly started from the upper left corner of the target document object, and the adjusted target document object with the width of 3 and the height of 2 is obtained.
Optionally, the specifically cropping the target document object may include: generating a cutting frame, wherein the size information of the generated cutting frame is the same as the determined target size information; and determining the adjusted targeted target document object according to the content of the targeted target document object contained in the cutting frame based on the third user operation.
The cutting frame can be a rectangle and can move based on user operation. The third user operation may include an operation for moving a crop box and an operation for determining a crop.
Optionally, the third user operation may further include zooming in or zooming out on the targeted document object to facilitate the user in determining the desired cropping.
According to the embodiment, the user can conveniently determine the cutting content by utilizing the cutting frame, the typesetting is further facilitated, the user operation is facilitated, and the user operation experience is improved.
For easy understanding, as shown in fig. 13, a schematic diagram of an example of clipping a target document object is provided for the embodiment of the present invention.
Wherein, the size information of the reference document object comprises a width of 2 and a height of 2, and the size information of the target document object comprises a width of 4 and a height of 4.
Based on a clipping mode, clipping can be directly started from the upper left corner of the target document object, and the adjusted target document object with the width of 2 and the height of 2 is obtained.
Based on another cutting mode, a cutting frame can be generated, the user can operate to move the cutting frame, and the adjusted target document object with the width of 2 and the height of 2 can be obtained after the cutting content is determined through click confirmation.
It should be noted that there are many cases when clipping is performed on a target document object.
Alternatively, the size information may contain width information and height information.
In a cropping case, the width information contained in the determined target size information is larger than the width information of the target document object, and/or the height information contained in the determined target size information is larger than the height information of the target document object.
In this case, if the target document object is directly cut, it is difficult to make the size information of the target document object content obtained after cutting the same as the target size information.
In another cropping case, the width information contained in the determined target size information is less than or equal to the width information of the target document object, and the height information contained in the determined target size information is less than or equal to the height information of the target document object.
In this case, a part of the content may be cut out directly from the target document object, and the cut-out content size information may be the same as the target size information and may be the adjusted target document object.
Of course, even in this case, when the user moves the crop box so that the crop box contains contents other than the target document object, the size information of the target document object contents obtained after the cropping is different from the target size information.
In an optional embodiment, for the case that the size information of the cropped target document object is different from the target size information, the preset content may be used for filling as a part of the adjusted target document object, so that the size information of the adjusted target document object is the same as the target size information.
The preset content may specifically be blank content or other content. Such as white content, black content, etc.
For ease of understanding, fig. 14 is a schematic diagram illustrating another example of clipping a target document object according to an embodiment of the present invention.
Including target document objects 1-3. The crop is performed using a crop box in this example. The size information of the crop box includes width information of 4 and height information of 4.
For the target document object 1, the width information of the crop box is smaller than that of the target document object 1, and the height information of the crop box is smaller than that of the target document object 1.
And the crop box is operated by the user and contains the contents except the target document object 1. Therefore, particularly at the time of clipping, blank content filling can be used, resulting in the adjusted target document object 1. For ease of understanding, where the adjusted target document object 1 contains an outline, this outline does not actually exist.
For the target document object 2, the width information of the cropping box is larger than that of the target document object 2, and the height information of the cropping box is smaller than that of the target document object 2.
Since the width information of the crop box is larger than that of the target document object 2, the crop box must contain contents other than the target document object 2. Specifically, during clipping, blank content may be used for filling, and the adjusted target document object 2 is obtained. For ease of understanding, where the adjusted target document object 2 contains an outline, this outline does not actually exist.
For the target document object 3, the width information of the crop box is larger than that of the target document object 3, and the height information of the crop box is larger than that of the target document object 3.
Since the width information of the crop box is larger than that of the target document object 3, the crop box must contain contents other than the target document object 3. Specifically, during clipping, blank content may be used for filling, and the adjusted target document object 3 is obtained. For ease of understanding, where the adjusted target document object 3 contains an outline, this outline does not actually exist.
Therefore, optionally, determining the adjusted targeted target document object according to the content of the targeted target document object contained in the crop box may specifically include: if the size information of the content of the targeted target document object contained in the cutting frame is different from the determined target size information, the content of the targeted target document object contained in the cutting frame can be filled with preset content, so that the size information of the filled content is the same as the determined target size information.
In another optional embodiment, for the two cropping cases, in order to further facilitate the cropping by the user, the target document object may be first scaled down or enlarged, specifically, the ratio of the width information to the height information in the size information of the target document object is ensured to be unchanged, and the width information and the height information are modified to obtain an intermediate target document object, so that the width information included in the determined target size information is less than or equal to the width information of the intermediate target document object, and the height information included in the determined target size information is less than or equal to the height information of the intermediate target document object.
And aiming at the intermediate target document object, more convenient clipping can be carried out.
For example, for the target document object 2, the width information of the crop box is larger than that of the target document object 2, and the height information of the crop box is smaller than that of the target document object 2.
Since the width information of the crop box is larger than that of the target document object 2, the crop box must contain contents other than the target document object 2 if directly cropped. However, after the intermediate target document object 2 is obtained by scaling up the target document object 2, the width information of the cropping frame may be made smaller than or equal to the width information of the intermediate target document object 2, so as to facilitate the cropping, and the cropping frame does not necessarily include contents other than the intermediate target document object 2
Thus, optionally, cropping the targeted document object includes: and modifying the size information of the target document object to obtain an intermediate target document object. The ratio of the width information to the height information is the same between the targeted target document object and the resulting intermediate target document object.
And generating a cutting frame, wherein the size information of the generated cutting frame is the same as the determined target size information.
And determining the adjusted target document object according to the content of the intermediate target document object contained in the cutting frame based on the third user operation.
Since the crop box may also contain contents other than the intermediate target document object based on user operation, the specific method explanation in this case may be referred to above.
Optionally, the size information of the target document object to which the specific modification is directed may be modified by a user in a customized manner, or may be modified according to a fixed rule. The process flow of the method is not limited to the method of modifying the size information.
In the embodiment, the size information of the target document object can be adjusted in equal proportion, so that the user can cut the target document object conveniently, and the user operation experience is improved.
Alternatively, as a result of the specific adjustment, the width information included in the determined target size information may be smaller than or equal to the width information of the intermediate target document object, and the height information included in the determined target size information may be smaller than or equal to the height information of the intermediate target document object.
In an alternative embodiment, to preserve the information in the target document object as much as possible, the width information of the intermediate target document object may be made the same as the width information in the determined target size information, and the height information of the intermediate target document object is greater than or equal to the height information in the determined target size information.
Or the height information of the intermediate target document object is the same as the height information in the determined target size information, and the width information of the intermediate target document object is greater than or equal to the width information in the determined target size information.
Specifically, modifying the size information of the target document object to obtain an intermediate target document object specifically includes: modifying the size information of the targeted target document object so that the modified width information is the same as the width information in the determined target size information, and the modified height information is greater than or equal to the height information in the determined target size information; or making the modified height information the same as the height information in the determined target size information, the modified width information being greater than or equal to the width information in the determined target size information.
And determining the modified aimed target document object as an intermediate target document object.
For ease of understanding, fig. 15 is a schematic diagram illustrating another example of clipping a target document object according to an embodiment of the present invention.
Including target document objects 1 and 2. The crop is performed using a crop box in this example. The size information of the crop box includes width information of 4 and height information of 4.
For the target document object 1, the width information is 2 and the height information is 3. Through the equal proportion adjustment, the width information of the intermediate target document object 1 is 4, the height information is 6, and further cutting can be carried out.
For the target document object 2, the width information is 8 and the height information is 12. Through the equal proportion adjustment, the width information of the intermediate target document object 2 is 4, the height information is 6, and further cutting can be carried out.
In this embodiment, by limiting the size information of the intermediate target document object, the information in the target document object can be retained as much as possible, thereby facilitating the typesetting by the user and improving the user operation experience.
In an alternative embodiment, after the target document object is resized, the different document objects may overlap due to the change in size.
To avoid this, optionally, after the size of the targeted target document object is adjusted, the position information may be modified for the targeted target document object after adjustment, so that the targeted target document object after adjustment does not overlap with any other document object.
Alternatively, the target document object may be moved directly until it does not overlap any other document object. Specifically, the target document object may be moved to a fixed direction.
In the embodiment, the position information can be automatically modified, so that the overlapping of different document objects is avoided, a user can conveniently check the document objects, the user can conveniently perform subsequent typesetting, and the user operation experience is improved.
According to the method, the size information of one or more reference document objects is recorded and the size information of one or more target document objects is adjusted, so that other document objects can be flexibly adjusted according to the size information of the existing document objects, a plurality of document objects with the same size can be quickly obtained, subsequent typesetting is facilitated, and the typesetting efficiency is improved.
In addition to the above method flows, the embodiments of the present invention also provide corresponding apparatus embodiments.
Fig. 16 is a schematic structural diagram of a document object resizing device according to an embodiment of the present invention. Which includes a reference determination unit 201 and a target adjustment unit 202.
A reference determining unit 201, configured to determine one or more document objects as reference document objects according to a first user operation, and obtain size information of the determined reference document objects, so as to obtain a preset size information set.
A target adjusting unit 202, configured to determine one or more document objects as target document objects according to a second user operation; determining one size information in a preset size information set as target size information aiming at any target document object; and adjusting the size of the targeted target document object so that the size information of the targeted target document object after adjustment is the same as the determined target size information.
Optionally, the target adjusting unit 202 may be configured to: and modifying the size information of the aimed target document object into the determined target size information.
Optionally, the target adjusting unit 202 may include: a modifying subunit 202a, configured to modify the size information of the targeted target document object into the determined target size information.
A repairing subunit 202b, configured to execute, according to a preset corresponding relationship between an object type and a repairing operation, a target repairing operation for the modified target document object, to obtain an adjusted target document object; the target repair operation may correspond to the object type of the targeted target document object.
Optionally, the repair subunit 202b includes: a cropping sub-unit 202b1, configured to crop the targeted target document object according to the determined target size information if the object type of the targeted target document object is a preset type.
Optionally, a cropping subunit 202b1 for: generating a cutting frame, wherein the size information of the generated cutting frame is the same as the determined target size information; and determining the adjusted target document object according to the content of any target document object contained in the cutting frame based on the third user operation.
Optionally, a cropping subunit 202b1 for: modifying the size information of the targeted target document object to obtain an intermediate target document object; the size information includes: width information and height information; the ratio of the width information to the height information is the same between the targeted target document object and the obtained intermediate target document object; generating a cutting frame, wherein the size information of the generated cutting frame is the same as the determined target size information; and determining the adjusted target document object according to the content of the intermediate target document object contained in the cutting frame based on the third user operation.
Optionally, a cropping subunit 202b1 for: modifying the size information of the targeted target document object so that the modified width information is the same as the width information in the determined target size information, and the modified height information is greater than or equal to the height information in the determined target size information; or making the modified height information the same as the height information in the determined target size information, the modified width information being greater than or equal to the width information in the determined target size information; and determining the modified aimed target document object as an intermediate target document object.
Optionally, the target adjusting unit 202 includes: and a target selecting subunit 202c, configured to select, for any target document object, one size information from the preset size information set according to an order of size information in the preset size information set, and determine the size information as the target size information.
Optionally, when the preset size information set includes different size information, the size information included in the preset size information set has a first order.
Optionally, the determined target document object has a second precedence order; a target selection subunit 202c operable to: and under the condition that the target document object is the first target document object in the second sequence, determining the first size information in the first sequence as the target size information.
Under the condition that the targeted target document object is not the first target document object in the second sequence, if the target size information of the previous target document object in the second sequence and the next size information exist in the first sequence, determining the next size information as the target size information; and if the next size information does not exist in the first sequence, determining the first size information as the target size information.
Optionally, the determined target document object has a second precedence order; the determined number of target document objects is the same as the number of size information in a preset size information set; a target selection subunit 202c operable to: selecting one size information from a preset size information set to determine the size information as target size information; the order of the targeted target document object in the second precedence order is the same as the order of the selected size information in the first precedence order.
Optionally, the target adjusting unit 202 includes: an operation selection subunit 202d, configured to determine, as target size information, one size information selected by the fourth user operation from the preset size information set, for any target document object.
Optionally, the preset size information set includes a correspondence between the determined object type of the reference document object and the size information; the target adjusting unit 202 includes: a type selecting subunit 202e, configured to, for any target document object, determine size information corresponding to the object type of the target document object in a preset size information set, and select one size information from the determined size information to determine as the target size information.
Optionally, a type selecting subunit 202e, configured to: under the condition that the determined size information contains different size information, a third sequence is formed among the size information contained in the determined size information; determining target size information according to the third sequence; in the case where the determined size information contains a single size information or only the same plurality of size information, any of the determined size information is determined as the target size information.
Optionally, in the determined target document objects, a fourth precedence order corresponding to the object types is provided between the target document objects with the same object type; a type selection subunit 202e for: determining a fourth sequence corresponding to the object type of the target document object; and under the condition that the target document object is the first target document object in the determined fourth sequence, determining the first size information in the third sequence as the target size information.
If the target document object is not the first target document object in the determined fourth sequence, determining the next size information as the target size information if the target size information of the previous target document object in the determined fourth sequence and the next size information exist in the third sequence; and if the next size information does not exist in the third precedence order, determining the first size information as the target size information.
Optionally, in the determined target document objects, the target document objects with the same object type have a fourth precedence order corresponding to the object type; a type selection subunit 202e for: determining a fourth sequence corresponding to the object type of the target document object; the number of the determined size information is the same as the number of the target document objects included in the fourth precedence order. Selecting one size information from the determined size information to determine as target size information; the order of the targeted target document object in the fourth precedence order is the same as the order of the selected size information in the third precedence order.
Optionally, a type selecting subunit 202e, configured to: and determining one size information selected by the fifth user operation in the determined size information as the target size information for any target document object.
Optionally, the document object resizing means further comprises: and a position adjusting unit 203, configured to modify the position information of the adjusted targeted target document object so that the adjusted targeted target document object does not overlap with any other document object.
Alternatively, the reference document object and the target document object may be in the same document; or the reference document object is in a different document than the target document object.
For the explanation of the above device embodiment, reference may be made to the above method embodiment, which is not described herein again.
An embodiment of the present invention further provides an electronic device, as shown in fig. 17, which includes a processor 801, a communication interface 802, a memory 803, and a communication bus 804, where the processor 801, the communication interface 802, and the memory 803 complete mutual communication through the communication bus 804,
a memory 803 for storing a computer program;
the processor 801 is configured to implement the document object resizing method according to any of the above embodiments when executing the program stored in the memory 803.
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, there is also provided a computer-readable storage medium having stored therein instructions, which when run on a computer, cause the computer to execute the document object resizing method described in any one of the above embodiments.
In yet 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 perform the document object resizing method of any of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized 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, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
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, for the system embodiment, since it is substantially similar to the method embodiment, the description is 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 (22)

1. A method for resizing a document object, comprising:
according to a first user operation, determining one or more document objects as reference document objects, and acquiring size information of the determined reference document objects to obtain a preset size information set;
determining one or more document objects as target document objects according to the second user operation;
for any target document object, determining one size information in the preset size information set as target size information;
and adjusting the size of any target document object to enable the size information of any target document object after adjustment to be the same as the determined target size information.
2. The method of claim 1, wherein said resizing any of said target document objects comprises:
and modifying the size information of any target document object into the determined target size information.
3. The method of claim 1, wherein said resizing any of said target document objects comprises:
modifying the size information of any target document object into the determined target size information;
according to a preset corresponding relation between the object type and the repairing operation, executing target repairing operation aiming at any modified target document object to obtain any adjusted target document object; the target repair operation corresponds to an object type of the any target document object.
4. The method according to claim 3, wherein said performing a target repair operation on said any target document object after modification comprises:
and under the condition that the object type of any target document object is a preset type, cutting any target document object according to the determined target size information.
5. The method of claim 4, wherein said cropping said any target document object comprises:
generating a cutting frame, wherein the size information of the generated cutting frame is the same as the determined target size information;
and determining the adjusted any target document object according to the content of any target document object contained in the cutting frame based on a third user operation.
6. The method of claim 4, wherein said cropping said any target document object comprises:
modifying the size information of any target document object to obtain an intermediate target document object; the size information includes: width information and height information;
the ratio of the width information to the height information between any one target document object and the obtained intermediate target document object is the same;
generating a cutting frame, wherein the size information of the generated cutting frame is the same as the determined target size information;
and determining any adjusted target document object according to the content of the intermediate target document object contained in the cutting frame based on a third user operation.
7. The method of claim 6, wherein said modifying the size information of any of the target document objects to obtain an intermediate target document object comprises:
modifying the size information of any target document object so that the modified width information is the same as the width information in the determined target size information, and the modified height information is greater than or equal to the height information in the determined target size information; or making the modified height information the same as the height information in the determined target size information, the modified width information being greater than or equal to the width information in the determined target size information;
and determining any modified target document object as an intermediate target document object.
8. The method according to claim 1, wherein the determining one of the preset size information sets as the target size information for any target document object comprises:
and aiming at any target document object, selecting one size information from the preset size information set according to the sequence of the size information in the preset size information set to determine the size information as the target size information.
9. The method according to claim 8, wherein, in a case that the preset size information set contains different size information, there is a first order between size information contained in the preset size information set.
10. The method of claim 9, wherein the determined target document object has a second precedence order;
the selecting one size information from the preset size information set to determine as the target size information includes:
determining first size information in the first sequence as target size information under the condition that any target document object is a first target document object in the second sequence;
under the condition that any target document object is not the first target document object in the second sequence, if the target size information of the previous target document object in the second sequence has the next size information in the first sequence, determining the next size information as the target size information; and if the next size information does not exist in the first sequence, determining the first size information as target size information.
11. The method of claim 9, wherein the determined target document object has a second precedence order; the determined number of target document objects is less than or equal to the number of size information in the preset size information set;
the selecting one size information from the preset size information set to determine as the target size information includes:
selecting one size information from the preset size information set to determine the size information as target size information; the order of any target document object in the second precedence order is the same as the order of the selected size information in the first precedence order.
12. The method according to claim 1, wherein the determining one of the preset size information sets as the target size information for any target document object comprises:
and for any target document object, determining one size information selected by the fourth user operation in the preset size information set as target size information.
13. The method according to claim 1, wherein the preset size information set contains a correspondence between the determined object type and size information of the reference document object;
the determining, for any target document object, one size information in the preset size information set as target size information includes:
and for any target document object, determining the size information corresponding to the object type of the any target document object in the preset size information set, and selecting one size information from the determined size information to determine the size information as the target size information.
14. The method of claim 13, wherein selecting one of the size information determined as the target size information comprises:
under the condition that the determined size information contains different size information, a third sequence is formed among the size information contained in the determined size information; determining target size information according to the third sequence;
in the case where the determined size information contains a single size information or only the same plurality of size information, any of the determined size information is determined as the target size information.
15. The method according to claim 14, wherein, among the determined target document objects, target document objects with the same object type have a fourth precedence order corresponding to the object type;
the determining the target size information according to the third sequence includes:
determining a fourth sequence corresponding to the object type of any target document object;
determining first size information in a third sequence as target size information under the condition that any target document object is a first target document object in the determined fourth sequence;
if the target size information of the previous target document object in the determined fourth sequence has next size information in the third sequence under the condition that any target document object is not the first target document object in the determined fourth sequence, determining the next size information as the target size information; and if the next size information does not exist in the third sequence, determining the first size information as target size information.
16. The method according to claim 14, wherein, among the determined target document objects, target document objects with the same object type have a fourth precedence order corresponding to the object type;
the determining the target size information according to the third sequence includes:
determining a fourth sequence corresponding to the object type of any target document object; the number of the determined size information is greater than or equal to the number of the target document objects contained in the fourth precedence order;
selecting one size information from the determined size information to determine as target size information; the order of any target document object in the fourth precedence order is the same as the order of the selected size information in the third precedence order.
17. The method of claim 13, wherein selecting one of the size information determined as the target size information comprises:
and determining one size information selected by the fifth user operation in the determined size information as the target size information for any target document object.
18. The method of claim 1, wherein after resizing the any target document object, the method further comprises:
and modifying the position information of any adjusted target document object so as to ensure that any adjusted target document object is not overlapped with any other document object.
19. The method of claim 1, wherein the reference document object is in the same document as the target document object; or the reference document object and the target document object are in different documents.
20. A document object resizing device, comprising:
the reference determining unit is used for determining one or more document objects as reference document objects according to a first user operation, and acquiring the size information of the determined reference document objects to obtain a preset size information set;
the target adjusting unit is used for determining one or more document objects as target document objects according to second user operation; for any target document object, determining one size information in the preset size information set as target size information; and adjusting the size of any target document object to enable the size information of any target document object after adjustment to be the same as the determined target size information.
21. 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 one of claims 1-19 when executing a program stored in the memory.
22. 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 claims 1-19.
CN202111248232.5A 2021-10-26 2021-10-26 Document object size adjusting method and device, electronic equipment and storage medium Pending CN113988008A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111248232.5A CN113988008A (en) 2021-10-26 2021-10-26 Document object size adjusting method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111248232.5A CN113988008A (en) 2021-10-26 2021-10-26 Document object size adjusting method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113988008A true CN113988008A (en) 2022-01-28

Family

ID=79741629

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111248232.5A Pending CN113988008A (en) 2021-10-26 2021-10-26 Document object size adjusting method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113988008A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115657920A (en) * 2022-10-17 2023-01-31 中科世通亨奇(北京)科技有限公司 Control method and device for dragging type personalized self-set workbench assembly

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115657920A (en) * 2022-10-17 2023-01-31 中科世通亨奇(北京)科技有限公司 Control method and device for dragging type personalized self-set workbench assembly

Similar Documents

Publication Publication Date Title
US10606533B2 (en) Editing an image on a medium using a template including attribute information of an object in the image
US9069445B2 (en) Electronic device with touch screen and page flipping method
DE102014006318A1 (en) Physical object detection and touchscreen interaction
CN103246458B (en) The method of self-defined soft keyboard and communication terminal
JP2000113180A (en) User interface method
JP5862103B2 (en) Electronic blackboard device, screen display method and program
US11209973B2 (en) Information processing apparatus, method, and medium to control item movement based on drag operation
CN112052038A (en) Method and device for generating front-end interface
CN113988008A (en) Document object size adjusting method and device, electronic equipment and storage medium
WO2024001966A1 (en) Icon management method and icon management device
CN112947826A (en) Information acquisition method and device and electronic equipment
CN109815977B (en) Cutting and marking integrated method for mass production of machine learning samples
US20160350273A1 (en) Data processing method
CN106649707B (en) Method and device for managing image content label
WO2021082652A1 (en) Information display method and apparatus, and computer-readable storage medium
CN115344159A (en) File processing method and device, electronic equipment and readable storage medium
CN112395840B (en) Engineering data management system
CN114518821A (en) Application icon management method and device and electronic equipment
CN111783408B (en) Cell pasting method and device, electronic equipment and storage medium
CN112417830A (en) Document page management method and device, electronic equipment and storage medium
CN111832270A (en) Method and device for displaying row number and column label of table and electronic equipment
US10514834B2 (en) Method and system for selecting objects on a computer screen
CN111897661A (en) Method and device for copying cell contents in spreadsheet and electronic equipment
WO2024000111A1 (en) Desktop display method, electronic device, display apparatus and computer-readable storage medium
KR101430964B1 (en) Method for controlling display

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