Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
8d741c04
Kaydet (Commit)
8d741c04
authored
Şub 14, 2012
tarafından
Pedro Giffuni
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
i20878 - Q-PCD shows spaces at end of a wrapped line in Writer.
üst
82a0ff3a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
26 deletions
+42
-26
paratr.hxx
sw/inc/paratr.hxx
+7
-6
guess.cxx
sw/source/core/text/guess.cxx
+35
-20
No files found.
sw/inc/paratr.hxx
Dosyayı görüntüle @
8d741c04
...
...
@@ -30,6 +30,7 @@
#include <swatrset.hxx>
#include <format.hxx>
#include <swtypes.hxx>
#include <editeng/adjitem.hxx>
class
SwCharFmt
;
class
IntlWrapper
;
...
...
@@ -47,12 +48,12 @@ class IntlWrapper;
//SwFmtDrop an die Absatze propagiert.
class
SW_DLLPUBLIC
SwFmtDrop
:
public
SfxPoolItem
,
public
SwClient
{
SwModify
*
pDefinedIn
;
// Modify-Object, in
dem der DropCaps steht
//
kann nur TxtFmtCollection/TxtNode sein
sal_uInt16
nDistance
;
//
Abstand zum Textbeginn
sal_uInt16
nReadFmt
;
// f
uer den Sw3-Reader: CharFormat-Id (Pool laden
!)
sal_uInt8
nLines
;
//
Anzahl der Zeilen
sal_uInt8
nChars
;
//
Anzahl der Zeichen
SwModify
*
pDefinedIn
;
// Modify-Object, in
which DropCaps exists
//
can have only TxtFmtCollection/TxtNode
sal_uInt16
nDistance
;
//
Distance from the text beginning
sal_uInt16
nReadFmt
;
// f
or the Sw3-Reader: CharFormat-Id (Pool load
!)
sal_uInt8
nLines
;
//
Number of lines
sal_uInt8
nChars
;
//
Number of characters
sal_Bool
bWholeWord
;
// Erstes Wort als Initialen
public
:
TYPEINFO
();
//Bereits in der Basisklasse SwClient
...
...
sw/source/core/text/guess.cxx
Dosyayı görüntüle @
8d741c04
...
...
@@ -24,7 +24,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
#include <ctype.h>
#include <editeng/unolingu.hxx>
#include <tools/shl.hxx> // needed for SW_MOD() macro
...
...
@@ -42,6 +41,7 @@
#include <com/sun/star/i18n/WordType.hpp>
#include <unotools/charclass.hxx>
#include <porfld.hxx>
#include <paratr.hxx>
using
::
rtl
::
OUString
;
using
namespace
::
com
::
sun
::
star
;
...
...
@@ -65,7 +65,7 @@ sal_Bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
{
nCutPos
=
rInf
.
GetIdx
();
//
Leere Strings sind immer
0
//
Empty strings are always
0
if
(
!
rInf
.
GetLen
()
||
!
rInf
.
GetTxt
().
Len
()
)
return
sal_False
;
...
...
@@ -188,8 +188,8 @@ sal_Bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
nBreakWidth
=
nMinSize
;
//
Der folgende Vergleich sollte eigenlich immer sal_True ergeben, sonst
//
hat es wohl bei GetTxtBreak einen Pixel-Rundungsfehler gegeben...
//
The following comparison should always give sal_True, otherwise
//
a pixel rounding error in GetTxtBreak will appear
if
(
nBreakWidth
<=
nLineWidth
)
{
if
(
nItalic
&&
(
nBreakPos
+
1
)
>=
rInf
.
GetTxt
().
Len
()
)
...
...
@@ -220,12 +220,23 @@ sal_Bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
nBreakPos
=
nCutPos
;
xub_StrLen
nX
=
nBreakPos
;
// we step back until a non blank character has been found
// or there is only one more character left
while
(
nX
&&
nBreakPos
>
rInf
.
GetLineStart
()
+
1
&&
(
CH_BLANK
==
(
cCutChar
=
rInf
.
GetChar
(
--
nX
)
)
||
CH_FULL_BLANK
==
cCutChar
)
)
--
nBreakPos
;
const
SvxAdjust
&
rAdjust
=
rInf
.
GetTxtFrm
()
->
GetTxtNode
()
->
GetSwAttrSet
().
GetAdjust
().
GetAdjust
();
if
(
rAdjust
==
SVX_ADJUST_LEFT
)
{
// we step back until a non blank character has been found
// or there is only one more character left
while
(
nX
&&
nBreakPos
>
rInf
.
GetTxt
().
Len
()
&&
(
CH_BLANK
==
(
cCutChar
=
rInf
.
GetChar
(
--
nX
)
)
||
CH_FULL_BLANK
==
cCutChar
)
)
--
nBreakPos
;
}
else
{
while
(
nX
&&
nBreakPos
>
rInf
.
GetLineStart
()
+
1
&&
(
CH_BLANK
==
(
cCutChar
=
rInf
.
GetChar
(
--
nX
)
)
||
CH_FULL_BLANK
==
cCutChar
)
)
--
nBreakPos
;
}
if
(
nBreakPos
>
rInf
.
GetIdx
()
)
nPorLen
=
nBreakPos
-
rInf
.
GetIdx
();
...
...
@@ -429,16 +440,20 @@ sal_Bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
CHAR_SOFTHYPHEN
==
rInf
.
GetTxt
().
GetChar
(
nBreakPos
-
1
)
)
nBreakPos
=
rInf
.
GetIdx
()
-
1
;
// Delete any blanks at the end of a line, but be careful:
// If a field has been expanded, we do not want to delete any
// blanks inside the field portion. This would cause an unwanted
// underflow
xub_StrLen
nX
=
nBreakPos
;
while
(
nX
>
rInf
.
GetLineStart
()
&&
(
CH_TXTATR_BREAKWORD
!=
cFldChr
||
nX
>
rInf
.
GetIdx
()
)
&&
(
CH_BLANK
==
rInf
.
GetChar
(
--
nX
)
||
CH_FULL_BLANK
==
rInf
.
GetChar
(
nX
)
)
)
nBreakPos
=
nX
;
const
SvxAdjust
&
rAdjust
=
rInf
.
GetTxtFrm
()
->
GetTxtNode
()
->
GetSwAttrSet
().
GetAdjust
().
GetAdjust
();
if
(
rAdjust
!=
SVX_ADJUST_LEFT
)
{
// Delete any blanks at the end of a line, but be careful:
// If a field has been expanded, we do not want to delete any
// blanks inside the field portion. This would cause an unwanted
// underflow
xub_StrLen
nX
=
nBreakPos
;
while
(
nX
>
rInf
.
GetLineStart
()
&&
(
CH_TXTATR_BREAKWORD
!=
cFldChr
||
nX
>
rInf
.
GetIdx
()
)
&&
(
CH_BLANK
==
rInf
.
GetChar
(
--
nX
)
||
CH_FULL_BLANK
==
rInf
.
GetChar
(
nX
)
)
)
nBreakPos
=
nX
;
}
if
(
nBreakPos
>
rInf
.
GetIdx
()
)
nPorLen
=
nBreakPos
-
rInf
.
GetIdx
();
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment