fix: don't split pages while breaking paragraph

This commit is contained in:
Georgy Litvinov 2021-10-01 11:00:28 +02:00
parent b0b5460032
commit 075bfc85aa

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="journals" script:language="StarBasic">Private sub journalsMark35
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="journals" script:language="StarBasic">Private sub journalsMark36
End sub
Dim templateName As String
@ -1200,11 +1200,11 @@ Function breakParaAtCursor() As Object
oViewCursor.goToRange(oTextCursor,false)
breakParaAtCursor = oViewcursor.Text.createTextCursorByRange(oViewCursor)
Else
oTextCursor.goRight(1,false)
oViewCursor.goToRange(oTextCursor,false)
oViewCursor.BreakType = com.sun.star.style.BreakType.PAGE_BEFORE
oTextCursor.goLeft(1,false)
oViewCursor.goToRange(oTextCursor,false)
&apos;oTextCursor.goRight(1,false)
&apos;oViewCursor.goToRange(oTextCursor,false)
&apos;oViewCursor.BreakType = com.sun.star.style.BreakType.PAGE_BEFORE
&apos;oTextCursor.goLeft(1,false)
&apos;oViewCursor.goToRange(oTextCursor,false)
breakParaAtCursor = oViewcursor.Text.createTextCursorByRange(oViewCursor)
EndIf
End Function