CN105677619B - A kind of method and device for adjusting paragraph spacing - Google Patents

A kind of method and device for adjusting paragraph spacing Download PDF

Info

Publication number
CN105677619B
CN105677619B CN201410665349.7A CN201410665349A CN105677619B CN 105677619 B CN105677619 B CN 105677619B CN 201410665349 A CN201410665349 A CN 201410665349A CN 105677619 B CN105677619 B CN 105677619B
Authority
CN
China
Prior art keywords
line space
value
paragraph
distance values
target phase
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201410665349.7A
Other languages
Chinese (zh)
Other versions
CN105677619A (en
Inventor
王磊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Kingsoft Office Software Inc
Zhuhai Kingsoft Office Software Co Ltd
Guangzhou Jinshan Mobile Technology Co Ltd
Original Assignee
Beijing Kingsoft Office Software Inc
Zhuhai Kingsoft Office Software Co Ltd
Guangzhou Jinshan Mobile Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Kingsoft Office Software Inc, Zhuhai Kingsoft Office Software Co Ltd, Guangzhou Jinshan Mobile Technology Co Ltd filed Critical Beijing Kingsoft Office Software Inc
Priority to CN201410665349.7A priority Critical patent/CN105677619B/en
Publication of CN105677619A publication Critical patent/CN105677619A/en
Application granted granted Critical
Publication of CN105677619B publication Critical patent/CN105677619B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • User Interface Of Digital Computer (AREA)

Abstract

The embodiment of the invention discloses a kind of method and devices for adjusting paragraph spacing.A kind of method for adjusting paragraph spacing, including:Obtain the line space value between at least two rows in destination document;Acquired line space value is counted, it is more than the line space value of preset accounting threshold value to judge whether accounting, and in the case where the judgment result is yes, the line space value for by accounting being more than preset accounting threshold value is determined as line space characteristic value;According to line space characteristic value and preset target phase distance values computation rule, target phase distance values are calculated;Paragraph spacing between at least two paragraphs in destination document is adjusted to target phase distance values, obtains new paragraph display effect.It can be seen that the paragraph spacing between two excessive paragraphs of blank in document automatically can be adjusted to the paragraph distance values that user is suitble to read by the present invention, the shortcomings that overcoming cumbersome caused by user's manual operation, efficiency is higher.

Description

A kind of method and device for adjusting paragraph spacing
Technical field
The present invention relates to office software field, more particularly to a kind of method and device for adjusting paragraph spacing.
Background technology
With the rapid development of terminal technology, the function of electronic equipment is become stronger day by day, and more and more user's selections are in electricity Reading documents in sub- equipment, such as user's reading documents on computer or smart mobile phone.For there are more blank between paragraph Document needs to be adjusted the paragraph spacing of the document, inconvenient to overcome that caused by blank is excessive between paragraph, user reads The shortcomings that.
In the prior art, user's manual setting and the relevant parameters of paragraph spacing are needed, to complete the section to document Fall the adjustment of spacing.However, due to every adjustment for carrying out a paragraph spacing, it is necessary to which manual setting and paragraph spacing are relevant Parameters, operation are comparatively laborious, less efficient.
Invention content
To solve the above-mentioned problems, the embodiment of the invention discloses it is a kind of adjust paragraph spacing method and device, specifically Technical solution is as follows:
A kind of method for adjusting paragraph spacing, including:
Obtain the line space value between at least two rows in destination document;
Acquired line space value is counted, it is more than the line space of preset accounting threshold value to judge whether accounting Value determines the line space characteristic value of the destination document according to judging result;Wherein, it is described that the mesh is determined according to judging result The line space characteristic value of document is marked, including:In the case where the judgment result is yes, it is more than the row of preset accounting threshold value by accounting Distance values are determined as line space characteristic value;
According to the line space characteristic value and preset target phase distance values computation rule, target phase distance values are calculated;
Paragraph spacing between at least two paragraphs in the destination document is adjusted to the target phase distance values, is obtained New paragraph display effect.
Optionally, the line space characteristic value that the destination document is determined according to judging result, further includes:
In the case where judging result is no, the average value of acquired line space value is calculated, is averaged what is be calculated Value is determined as line space characteristic value.
Optionally, the method further includes:
The new paragraph display effect is preserved.
Optionally, the line space value obtained in destination document between at least two rows, including:
Obtain the line space value of the full text of destination document;
Or
The line space value of the preceding M rows of current display page in destination document is obtained, wherein, M is more than 1, and aobvious less than current Show total line number of the page.
Optionally, it is described according to the line space characteristic value and preset target phase distance values computation rule, calculate mesh Bid section distance values, including:
According to the line space characteristic value and calculation formula:Target phase distance values=line space characteristic value * α, calculate mesh Bid section distance values, wherein, α is preset quantizing factor, and α>1.
Optionally, the paragraph spacing by between at least two paragraphs in the destination document is adjusted to the target phase Distance values obtain new paragraph display effect, including:
Obtain the paragraph distance values between each paragraph in destination document;
The spacing only paragraph distance values in destination document being more than between two paragraphs of the target phase distance values adjusts For the target phase distance values, new paragraph display effect is obtained.
Optionally, that the paragraph spacing between at least two paragraphs in the destination document is adjusted to the target is intersegmental Away from value, before obtaining new paragraph display effect, further include:
It is shown to user for asking whether to allow the prompt message being adjusted to paragraph spacing, and is receiving user Allow adjustment operate after, triggering perform the paragraph spacing by between at least two paragraphs in the destination document be adjusted to The target phase distance values, the step of obtaining new paragraph display effect.
A kind of device for adjusting paragraph spacing, including:
Line space value acquisition module, for obtaining the line space value in destination document between at least two rows;
Judgment module, the line space value for being obtained to the line space value acquisition module count, judge whether to deposit It is more than the line space value of preset accounting threshold value in accounting;
Line space characteristic value determining module, for determining the destination document according to the judging result of the judgment module Line space characteristic value;Wherein, the line space characteristic value determining module, is specifically used for:In the judging result of the judgment module In the case of being, the line space value for by accounting being more than preset accounting threshold value is determined as line space characteristic value;
Target phase distance values computing module, for the line space feature determined according to the line space characteristic value determining module Value and preset target phase distance values computation rule, calculate target phase distance values;
Paragraph spacing adjusts module, for the paragraph spacing between at least two paragraphs in the destination document to be adjusted to The target phase distance values obtain new paragraph display effect.
Optionally, the line space characteristic value determining module, is specifically additionally operable to:
In the case where the judging result of the judgment module is no, the average value of acquired line space value is calculated, it will The average value being calculated is determined as line space characteristic value.
Optionally, described device further includes:
Preserving module is protected for paragraph display effect adjusted to paragraph spacing adjustment module, new It deposits.
Optionally, the line space value acquisition module, is specifically used for:
Obtain the line space value of the full text of destination document;
Or
The line space value of the preceding M rows of current display page in destination document is obtained, wherein, M is more than 1, and aobvious less than current Show total line number of the page.
Optionally, the target phase distance values computing module, is specifically used for:
The line space characteristic value and calculation formula determined according to the line space characteristic value determining module:
Target phase distance values=line space characteristic value * α, calculate target phase distance values, wherein, α for preset quantization because Son, and α>1.
Optionally, the paragraph spacing adjustment module, including:
Paragraph distance values acquisition submodule, for obtaining the paragraph distance values in destination document between each paragraph;
Paragraph spacing adjusts submodule, for paragraph distance values in destination document only to be more than the target phase distance values Spacing between two paragraphs is adjusted to the target phase distance values, obtains new paragraph display effect.
Optionally, described device further includes:
Prompt message display module, for showing to ask whether to allow to carry to what paragraph spacing was adjusted to user Show information, and receive user adjustment is allowed to operate after, trigger the paragraph spacing adjustment module and perform:By the target Paragraph spacing in document between at least two paragraphs is adjusted to the target phase distance values, obtains new paragraph display effect Operation.
Using above-mentioned technical proposal, the method and device of adjustment paragraph spacing provided in an embodiment of the present invention is obtaining mesh After marking the line space value in document between at least two rows, acquired line space value can be counted, judge whether to deposit It is more than the line space value of preset accounting threshold value in accounting, the line space feature of the destination document is determined according to judging result Value;Further according to the line space characteristic value and preset target phase distance values computation rule, target phase distance values are calculated, And the paragraph spacing between at least two paragraphs in the destination document is adjusted to the target phase distance values, it is new so as to obtain , convenient for user read paragraph display effect.
Compared with prior art, the embodiment of the present invention can automatically will be between two excessive paragraphs of blank in document Paragraph spacing is adjusted to the paragraph distance values that user is suitble to read, and overcome caused by user's manual operation cumbersome lacks Point, efficiency are higher.
Description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, to embodiment or will show below There is attached drawing needed in technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention, for those of ordinary skill in the art, without creative efforts, can be with Other attached drawings are obtained according to these attached drawings.
Fig. 1 is a kind of flow chart of method for adjusting paragraph spacing provided in an embodiment of the present invention;
Fig. 2 is a kind of flow chart of embodiment of S102 in Fig. 1 provided in an embodiment of the present invention;
Fig. 3 is the flow chart of another method for adjusting paragraph spacing provided in an embodiment of the present invention;
Fig. 4 is a kind of structure diagram of device for adjusting paragraph spacing provided in an embodiment of the present invention;
Fig. 5 is a kind of structure diagram that paragraph spacing adjusts module 405 in Fig. 4 provided in an embodiment of the present invention;
Fig. 6 is the structure diagram of another device for adjusting paragraph spacing provided in an embodiment of the present invention;
Fig. 7 is the structure diagram of another device for adjusting paragraph spacing provided in an embodiment of the present invention.
Specific embodiment
In order to which those skilled in the art is made to more fully understand the technical solution in the present invention, implement below in conjunction with the present invention Attached drawing in example, is clearly and completely described the technical solution in the embodiment of the present invention, it is clear that described embodiment Only part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, the common skill in this field Art personnel all other embodiments obtained without creative efforts belong to the model that the present invention protects It encloses.
With the rapid development of terminal technology, the function of electronic equipment is become stronger day by day, and more and more user's selections are in electricity Reading documents in sub- equipment, such as user's reading documents on computer or smart mobile phone.For there are more blank between paragraph Document needs the paragraph spacing of the document being adjusted to the section distance values that user is suitble to read.
At present, the method for adjustment document segment spacing is mainly:User's manual setting and the relevant every ginseng of paragraph spacing Number, to complete the adjustment to the paragraph spacing of document.However, due to every adjustment for carrying out a paragraph spacing, it is necessary to manually Setting and the relevant parameters of paragraph spacing, therefore, operation is comparatively laborious, less efficient.To solve the above-mentioned problems, this hair Bright embodiment provides a kind of method and device for adjusting paragraph spacing.
A kind of method for adjusting paragraph spacing provided in an embodiment of the present invention is introduced first below.
As shown in Figure 1, a kind of method for adjusting paragraph spacing provided in an embodiment of the present invention, can include:
S101 obtains the line space value between at least two rows in destination document;
Specifically, in one embodiment of the invention, above-mentioned S101 can include:
Obtain the line space value of the full text of destination document;
Or
The line space value of the preceding M rows of current display page in destination document is obtained, wherein, M is more than 1, and aobvious less than current Show total line number of the page;For example the arbitrary multirow such as preceding 10 row of current display page, preceding 100 row in destination document can be obtained.
In addition it is also possible to the preceding N rows of the arbitrary page, I row to J rows etc. in destination document are obtained, wherein, N is more than 1, (J-I) is more than 1.
S102 counts acquired line space value, and it is more than preset accounting threshold value to judge whether accounting Line space value determines the line space characteristic value of the destination document according to judging result.Specifically, in the implementation of the present invention In example, as shown in Fig. 2, above-mentioned S102, can include:
S102a counts acquired line space value, and it is more than preset accounting threshold value to judge whether accounting Line space value;In the case where the judgment result is yes, triggering performs S102b, and in the case where judging result is no, triggering performs S102c。
Such as a total of 8 pages of destination document, this obtains the line space of preceding 11 row in the first page of the destination document Value, can obtain 10 line space values;Corresponding value size is respectively:a、a、a、a、a、a、a、a、b、b;
After being counted to above-mentioned 10 line space values, find:Line space value a total of 8 of the size for a, size b A total of 2 of line space value;Further, the accounting value for the line space value that size is a is (8/10) * 100%=80%, greatly The accounting value of the small line space value for being b is (2/10) * 100%=20%.
Further, judge the line space value that accounting value, the size of the line space value that size is a are b accounting value whether Which step performed to decide to continue with more than preset accounting threshold value, and then according to judging result.
It should be noted that under normal conditions, it is 70% to be empirically worth preset accounting threshold definitions, certainly, Can be 60%, 80% etc. by preset accounting threshold definitions, the embodiment of the present invention does not limit this according to actual conditions It is fixed.
S102b, the line space value for by accounting being more than preset accounting threshold value are determined as line space characteristic value.
At this time, it is assumed that preset accounting threshold value is 70%, since the accounting value 80% for the line space value that size is a is more than in advance If accounting threshold value 70%, therefore, line space value a is determined as line space characteristic value.
S102c calculates the average value of acquired line space value, the average value being calculated is determined as line space feature Value.
At this time, it is assumed that preset accounting threshold value is 80%, due to accounting value 80%, the size of line space value that size is a The accounting value 20% of line space value for b is respectively less than preset accounting threshold value 80%, therefore, calculates above-mentioned 10 line space values Average value A=(a*8+b*2)/10;
Further, average value A=(a*8+b*2)/10 is determined as line space characteristic value.
According to the line space characteristic value and preset target phase distance values computation rule, it is intersegmental to calculate target by S103 Away from value.
After line space characteristic value is obtained, line space characteristic value can be updated to preset target phase distance values and calculated In rule, the target phase distance values for being adjusted to paragraph spacing are calculated.
Specifically, in one embodiment of the invention, above-mentioned S103 can include:
According to the line space characteristic value and calculation formula:Target phase distance values=line space characteristic value * α, calculate mesh Bid section distance values, wherein, α is preset quantizing factor, and α>1.
For example α=200% is taken, target phase distance values are line space characteristic value * 200% at this time.
Specifically, in another embodiment of the present invention, above-mentioned S103 can include:
According to the line space characteristic value and calculation formula:Target phase distance values=line space characteristic value+β, calculate mesh Bid section distance values, wherein, β is preset modifying factor.
Need what is illustrated, in practical applications, can in the embodiment of the present invention preset quantizing factor α, preset repair The value of positive divisor β is adjusted.
Paragraph spacing between at least two paragraphs in the destination document is adjusted to the target phase spacing by S104 Value, obtains new paragraph display effect.
After target phase spacing is calculated, the white more place that can fall through to destination document stage casing carries out compression processing, Specifically, the excessive paragraph distance values of paragraph blank are adjusted to above-mentioned target phase distance values.
Specifically, in one embodiment of the invention, above-mentioned S104 can include:
Obtain the paragraph distance values between each paragraph in destination document;
The spacing only paragraph distance values in destination document being more than between two paragraphs of the target phase distance values adjusts For the target phase distance values, new paragraph display effect is obtained.
For example target phase distance values are M, are more than two paragraphs of M for paragraph distance values in destination document, by the two Spacing between paragraph is adjusted to M;Paragraph distance values in destination document are less than with two paragraphs of M, not to the two sections Spacing between falling is adjusted, so as to make document that user be facilitated to read.
It can be seen that the method for adjustment paragraph spacing provided in an embodiment of the present invention, at least two in destination document is obtained After line space value between a row, acquired line space value can be counted, it is more than default to judge whether accounting Accounting threshold value line space value, the line space characteristic value of the destination document is determined according to judging result;Further according to institute Line space characteristic value and preset target phase distance values computation rule are stated, calculates target phase distance values, and the target is literary Paragraph spacing in shelves between at least two paragraphs is adjusted to the target phase distance values, so as to obtain it is new, read convenient for user The paragraph display effect of reading.
Compared with prior art, the embodiment of the present invention can automatically will be between two excessive paragraphs of blank in document Paragraph spacing is adjusted to the paragraph distance values that user is suitble to read, and overcome caused by user's manual operation cumbersome lacks Point, efficiency are higher.
Optionally, in one embodiment of the invention, destination document is read for ease of user, can also schemed Increase S105 on the basis of method shown in 1, as shown in Figure 3;S105 is described below.
S105 preserves the new paragraph display effect;Thus when user reads the destination document again, The user is facilitated to read.
Optionally, in one embodiment of the invention, before above-mentioned S104, can also include:
It is shown to user for asking whether to allow the prompt message being adjusted to paragraph spacing, and is receiving user Allow adjustment operate after, triggering perform the paragraph spacing by between at least two paragraphs in the destination document be adjusted to The target phase distance values, the step of obtaining new paragraph display effect.
The embodiment of the present invention can ask the user whether to allow before the paragraph distance values to destination document are adjusted This paragraph re-pitching action in the case where user allows, is just adjusted the paragraph spacing of destination document, gives The sufficient operating right of user;In practical application, the display mode of prompt message is specifically as follows:The display mode of dialog box, The embodiment of the present invention is not construed as limiting this.
Corresponding to above method embodiment, the embodiment of the present invention additionally provides a kind of device for adjusting paragraph spacing.
As shown in figure 4, a kind of device for adjusting paragraph spacing provided in an embodiment of the present invention, can include:
Line space value acquisition module 401, for obtaining the line space value in destination document between at least two rows;
Judgment module 402, the line space value for being obtained to the line space value acquisition module 401 count, and judge It is more than the line space value of preset accounting threshold value with the presence or absence of accounting;
Line space characteristic value determining module 403, for determining the target according to the judging result of the judgment module 402 The line space characteristic value of document;Wherein, the line space characteristic value determining module 403, is specifically used for:In the judgment module 402 judging result is in the case of being, the line space value for by accounting being more than preset accounting threshold value is determined as line space feature Value;
Target phase distance values computing module 404, for being determined in the ranks according to the line space characteristic value determining module 403 Away from characteristic value and preset target phase distance values computation rule, target phase distance values are calculated;
Paragraph spacing adjusts module 405, for by the paragraph spacing tune between at least two paragraphs in the destination document Whole is the target phase distance values, obtains new paragraph display effect.
It can be seen that the device of adjustment paragraph spacing provided in an embodiment of the present invention, at least two in destination document is obtained After line space value between a row, acquired line space value can be counted, it is more than default to judge whether accounting Accounting threshold value line space value, the line space characteristic value of the destination document is determined according to judging result;Further according to institute Line space characteristic value and preset target phase distance values computation rule are stated, calculates target phase distance values, and the target is literary Paragraph spacing in shelves between at least two paragraphs is adjusted to the target phase distance values, so as to obtain it is new, read convenient for user The paragraph display effect of reading.
Compared with prior art, the embodiment of the present invention can automatically will be between two excessive paragraphs of blank in document Paragraph spacing is adjusted to the paragraph distance values that user is suitble to read, and overcome caused by user's manual operation cumbersome lacks Point, efficiency are higher.
Optionally, in another embodiment of the present invention, the line space characteristic value determining module 403, specifically may be used also For:
In the case where the judging result of the judgment module 402 is no, the average value of acquired line space value is calculated, The average value being calculated is determined as line space characteristic value.
It optionally, in one embodiment of the invention, can be with as shown in figure 5, the paragraph spacing adjusts module 405 Including:
Paragraph distance values acquisition submodule 405a, for obtaining the paragraph distance values in destination document between each paragraph;
Paragraph spacing adjusts submodule 405b, for paragraph distance values in destination document only to be more than the target phase spacing Spacing between two paragraphs of value is adjusted to the target phase distance values, obtains new paragraph display effect.
Optionally, in another embodiment of the present invention, as shown in fig. 6, adjustment paragraph provided in an embodiment of the present invention The device of spacing, can be to increase on the basis of device shown in Fig. 4:Preserving module 406;Preserving module 406 is carried out below Description.
Preserving module 406, for adjusting paragraph display effect obtain, new to paragraph spacing adjustment module 405 It is preserved;So as to which the user when user reads the destination document again, be facilitated to read.
Optionally, in one embodiment of the invention, the line space value acquisition module 401, specifically can be used for:
Obtain the line space value of the full text of destination document;
Or
The line space value of the preceding M rows of current display page in destination document is obtained, wherein, M is more than 1, and aobvious less than current Show total line number of the page.
Optionally, in one embodiment of the invention, the target phase distance values computing module 404, can specifically use In:
The line space characteristic value and calculation formula determined according to the line space characteristic value determining module 403:
Target phase distance values=line space characteristic value * α, calculate target phase distance values, wherein, α for preset quantization because Son, and α>1.
Optionally, in one embodiment of the invention, as shown in fig. 7, between adjustment paragraph provided in an embodiment of the present invention Away from device, can be to increase on the basis of device shown in Fig. 4:Prompt message display module 407;Prompt message is shown below Show that module 407 is described.
Prompt message display module 407, for showing to ask whether to allow to be adjusted paragraph spacing to user Prompt message, and receive user adjustment is allowed to operate after, trigger paragraph spacing adjustment module 405 and perform:It will Paragraph spacing in the destination document between at least two paragraphs is adjusted to the target phase distance values, obtains new paragraph and shows Show the operation of effect.
For device embodiment, since it is substantially similar to embodiment of the method, so description is fairly simple, it is related Part illustrates referring to the part of embodiment of the method.
For convenience of description, it is divided into various modules during description apparatus above with function to describe respectively.Certainly, implementing this The function of each module is realized can in the same or multiple software and or hardware during invention.
It should be noted that herein, relational terms such as first and second and the like are used merely to a reality Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation In any this practical relationship or sequence.Moreover, term " comprising ", "comprising" or its any other variant are intended to Non-exclusive inclusion, so that process, method, article or equipment including a series of elements not only will including those Element, but also including other elements that are not explicitly listed or further include as this process, method, article or equipment Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that Also there are other identical elements in process, method, article or equipment including the element.
Each embodiment in this specification is described using relevant mode, identical similar portion between each embodiment Point just to refer each other, and the highlights of each of the examples are difference from other examples.Especially for device reality For applying example, since it is substantially similar to embodiment of the method, so description is fairly simple, related part is referring to embodiment of the method Part explanation.
One of ordinary skill in the art will appreciate that all or part of step in realization above method embodiment is can It is completed with instructing relevant hardware by program, the program can be stored in computer read/write memory medium, The storage medium designated herein obtained, such as:ROM/RAM, magnetic disc, CD etc..
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the scope of the present invention.It is all Any modification, equivalent replacement, improvement and so within the spirit and principles in the present invention, are all contained in protection scope of the present invention It is interior.

Claims (14)

  1. A kind of 1. method for adjusting paragraph spacing, which is characterized in that the method includes:
    Obtain the line space value between at least two rows in destination document;
    Acquired line space value is counted, it is more than the line space value of preset accounting threshold value to judge whether accounting, The line space characteristic value of the destination document is determined according to judging result, a kind of line space value in the line space value obtained Accounting accounts for the ratio of the total number of obtained line space value for the number of the line space value;Wherein, it is described according to judging result Determine the line space characteristic value of the destination document, including:In the case where the judgment result is yes, it is more than preset account for by accounting Line space value than threshold value is determined as line space characteristic value;
    According to the line space characteristic value and preset target phase distance values computation rule, target phase distance values are calculated;
    Paragraph spacing between at least two paragraphs in the destination document is adjusted to the target phase distance values, is obtained new Paragraph display effect.
  2. 2. the according to the method described in claim 1, it is characterized in that, row that the destination document is determined according to judging result Pitch characteristics value, further includes:
    In the case where judging result is no, the average value of acquired line space value is calculated, the average value being calculated is true It is set to line space characteristic value.
  3. 3. method according to claim 1 or 2, which is characterized in that the method further includes:
    The new paragraph display effect is preserved.
  4. 4. method according to claim 1 or 2, which is characterized in that in the acquisition destination document between at least two rows Line space value, including:
    Obtain the line space value of the full text of destination document;
    Or
    The line space value of the preceding M rows of current display page in destination document is obtained, wherein, M is more than 1, and less than current display page Total line number in face.
  5. 5. method according to claim 1 or 2, which is characterized in that described according to the line space characteristic value and preset Target phase distance values computation rule, calculates target phase distance values, including:
    According to the line space characteristic value and calculation formula:Target phase distance values=line space characteristic value * α, calculate target phase Distance values, wherein, α is preset quantizing factor, and α>1.
  6. 6. method according to claim 1 or 2, which is characterized in that described by least two paragraphs in the destination document Between paragraph spacing be adjusted to the target phase distance values, obtain new paragraph display effect, including:
    Obtain the paragraph distance values between each paragraph in destination document;
    The spacing only paragraph distance values in destination document being more than between two paragraphs of the target phase distance values is adjusted to institute Target phase distance values are stated, obtain new paragraph display effect.
  7. 7. method according to claim 1 or 2, which is characterized in that by least two paragraphs in the destination document it Between paragraph spacing be adjusted to the target phase distance values, before obtaining new paragraph display effect, further include:
    It is shown to user for asking whether to allow the prompt message being adjusted to paragraph spacing, and is receiving permitting for user Perhaps after adjustment operation, triggering performs the paragraph spacing by between at least two paragraphs in the destination document and is adjusted to described Target phase distance values, the step of obtaining new paragraph display effect.
  8. 8. a kind of device for adjusting paragraph spacing, which is characterized in that described device includes:
    Line space value acquisition module, for obtaining the line space value in destination document between at least two rows;
    Judgment module, the line space value for being obtained to the line space value acquisition module count, judge whether to account for Than the line space value for being more than preset accounting threshold value, the accounting of line space value in the line space value obtained a kind of for this in the ranks Number away from value accounts for the ratio of the total number of obtained line space value;
    Line space characteristic value determining module, for determining the destination document in the ranks according to the judging result of the judgment module Away from characteristic value;Wherein, the line space characteristic value determining module, is specifically used for:It is yes in the judging result of the judgment module In the case of, the line space value for by accounting being more than preset accounting threshold value is determined as line space characteristic value;
    Target phase distance values computing module, for the line space characteristic value that is determined according to the line space characteristic value determining module and Preset target phase distance values computation rule, calculates target phase distance values;
    Paragraph spacing adjusts module, for the paragraph spacing between at least two paragraphs in the destination document to be adjusted to described Target phase distance values obtain new paragraph display effect.
  9. 9. device according to claim 8, which is characterized in that the line space characteristic value determining module is specifically additionally operable to:
    In the case where the judging result of the judgment module is no, the average value of acquired line space value is calculated, will be calculated Obtained average value is determined as line space characteristic value.
  10. 10. device according to claim 8 or claim 9, which is characterized in that described device further includes:
    Preserving module, the new paragraph display effect for being adjusted to paragraph spacing adjustment module preserve.
  11. 11. device according to claim 8 or claim 9, which is characterized in that the line space value acquisition module is specifically used for:
    Obtain the line space value of the full text of destination document;
    Or
    The line space value of the preceding M rows of current display page in destination document is obtained, wherein, M is more than 1, and less than current display page Total line number in face.
  12. 12. device according to claim 8 or claim 9, which is characterized in that the target phase distance values computing module, it is specific to use In:
    The line space characteristic value and calculation formula determined according to the line space characteristic value determining module:
    Target phase distance values=line space characteristic value * α, calculate target phase distance values, wherein, α is preset quantizing factor, and α>1。
  13. 13. device according to claim 8 or claim 9, which is characterized in that the paragraph spacing adjusts module, including:
    Paragraph distance values acquisition submodule, for obtaining the paragraph distance values in destination document between each paragraph;
    Paragraph spacing adjusts submodule, for paragraph distance values in destination document to be only more than to two of the target phase distance values Spacing between paragraph is adjusted to the target phase distance values, obtains new paragraph display effect.
  14. 14. device according to claim 8 or claim 9, which is characterized in that described device further includes:
    Prompt message display module, for showing to ask whether to allow to believe the prompting that paragraph spacing is adjusted to user Breath, and receive user adjustment is allowed to operate after, trigger paragraph spacing adjustment module and perform:By the destination document In paragraph spacing between at least two paragraphs be adjusted to the target phase distance values, obtain the behaviour of new paragraph display effect Make.
CN201410665349.7A 2014-11-19 2014-11-19 A kind of method and device for adjusting paragraph spacing Active CN105677619B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410665349.7A CN105677619B (en) 2014-11-19 2014-11-19 A kind of method and device for adjusting paragraph spacing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410665349.7A CN105677619B (en) 2014-11-19 2014-11-19 A kind of method and device for adjusting paragraph spacing

Publications (2)

Publication Number Publication Date
CN105677619A CN105677619A (en) 2016-06-15
CN105677619B true CN105677619B (en) 2018-07-10

Family

ID=56945498

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410665349.7A Active CN105677619B (en) 2014-11-19 2014-11-19 A kind of method and device for adjusting paragraph spacing

Country Status (1)

Country Link
CN (1) CN105677619B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109657221B (en) * 2018-12-13 2023-08-01 北京金山数字娱乐科技有限公司 Document paragraph sorting method, sorting device, electronic equipment and storage medium
CN112686003B (en) * 2019-10-18 2023-12-26 珠海金山办公软件有限公司 Method, device, storage medium and equipment for processing paragraph spacing in electronic document
CN113723049A (en) * 2020-05-25 2021-11-30 珠海金山办公软件有限公司 Document content interval adjusting method and device, electronic equipment and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101419591A (en) * 2008-12-17 2009-04-29 北大方正集团有限公司 Typesetting method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101984419B (en) * 2010-10-21 2013-08-28 优视科技有限公司 Method and device for reforming paragraphs of webpage picture content

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101419591A (en) * 2008-12-17 2009-04-29 北大方正集团有限公司 Typesetting method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
像八爪鱼一样调整段落;一江春水;《电脑迷》;20111231(第14期);62 *

Also Published As

Publication number Publication date
CN105677619A (en) 2016-06-15

Similar Documents

Publication Publication Date Title
CN106201661B (en) Method and apparatus for elastic telescopic cluster virtual machine
CN104809198B (en) Method, device and the terminal unit of picture cleaning
US9176804B2 (en) Memory dump optimization in a system
CN105677619B (en) A kind of method and device for adjusting paragraph spacing
CN108063818B (en) Data downloading method, device, terminal and computer readable storage medium
CN105279161A (en) Filter sequencing method and filter sequencing device for picture processing application
KR20140009074A (en) Smart scheduled sync method for sync applications and mobile device
CN103473343A (en) File management method, device and terminal
CN103218416A (en) Method, device and system for loading database
CN104735339A (en) Automatic adjusting method and electronic equipment
CN104601683A (en) File download management method, mobile terminal and communication system
CN105095384A (en) Method and device for data carrying-over
CN105260393A (en) Information pushing method and device and electronic equipment
CN106445418A (en) Method and device for self-adaptingread-write services in solid state disk
CN106933702A (en) A kind of method of intelligent terminal storage space management, device and intelligent terminal
CN104424109A (en) Information processing method and electronic equipment
CN103929480A (en) Data backup method and device based on tasks
CN105654101A (en) Information processing method and electronic equipment
CN106250992A (en) Task processing method in a kind of mobile electronic device and device
CN108614841B (en) Time interval adjusting method and device
CN107509085A (en) The storage method and device of a kind of files in stream media
CN105117470B (en) Date storage method and device
CN111158837B (en) Bank software function interface generation method and device
CN111799804A (en) Power system voltage regulation analysis method and device based on operation data
CN109803160B (en) Resource allocation method, device and system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: Jinshan software building No. 8 Jingshan Hill Road, Lane 519015 Lianshan Jida Zhuhai city in Guangdong Province

Applicant after: Zhuhai Kingsoft Office Software Co., Ltd.

Applicant after: Beijing Kingsoft office software Limited by Share Ltd

Applicant after: GUANGZHOU JINSHAN JINSHAN MOBILE TECHNOLOGY CO., LTD.

Address before: Jinshan software building No. 8 Jingshan Hill Road, Lane 519015 Lianshan Jida Zhuhai city in Guangdong Province

Applicant before: Zhuhai Kingsoft Office Software Co., Ltd.

Applicant before: Beijing Kingsoft WPS Office Co., Ltd.

Applicant before: GUANGZHOU JINSHAN JINSHAN MOBILE TECHNOLOGY CO., LTD.

COR Change of bibliographic data
GR01 Patent grant
GR01 Patent grant