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
32d9f959
Kaydet (Commit)
32d9f959
authored
Mar 28, 2014
tarafından
Jürgen Schmidt
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#124468# merge from aoo410 branch, add checks for the read numbers of column for a section
üst
6dc64444
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
18 deletions
+36
-18
ww8par6.cxx
sw/source/filter/ww8/ww8par6.cxx
+25
-16
ww8struc.hxx
sw/source/filter/ww8/ww8struc.hxx
+11
-2
No files found.
sw/source/filter/ww8/ww8par6.cxx
Dosyayı görüntüle @
32d9f959
...
...
@@ -921,7 +921,14 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
// sprmSFBiDi
aNewSection
.
maSep
.
fBiDi
=
eVer
>=
ww
::
eWW8
?
ReadBSprm
(
pSep
,
0x3228
,
0
)
:
0
;
// Reading section property sprmSCcolumns - one less than the number of columns in the section.
// It must be less than MAX_NO_OF_SEP_COLUMNS according the WW8 specification.
aNewSection
.
maSep
.
ccolM1
=
ReadSprm
(
pSep
,
pIds
[
3
],
0
);
if
(
aNewSection
.
maSep
.
ccolM1
>=
MAX_NO_OF_SEP_COLUMNS
)
{
// fallback to one column
aNewSection
.
maSep
.
ccolM1
=
0
;
}
//sprmSDxaColumns - Default-Abstand 1.25 cm
aNewSection
.
maSep
.
dxaColumns
=
ReadUSprm
(
pSep
,
pIds
[
4
],
708
);
...
...
@@ -932,34 +939,36 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
if
(
eVer
>=
ww
::
eWW6
)
{
// sprmSFEvenlySpaced
aNewSection
.
maSep
.
fEvenlySpaced
=
ReadBSprm
(
pSep
,
(
eVer
<=
ww
::
eWW7
?
138
:
0x3005
),
1
)
?
true
:
false
;
aNewSection
.
maSep
.
fEvenlySpaced
=
ReadBSprm
(
pSep
,
(
eVer
<=
ww
::
eWW7
?
138
:
0x3005
),
1
)
?
true
:
false
;
if
(
aNewSection
.
maSep
.
ccolM1
>
0
&&
!
aNewSection
.
maSep
.
fEvenlySpaced
)
if
(
aNewSection
.
maSep
.
ccolM1
>
0
&&
!
aNewSection
.
maSep
.
fEvenlySpaced
)
{
aNewSection
.
maSep
.
rgdxaColumnWidthSpacing
[
0
]
=
0
;
int
nCols
=
aNewSection
.
maSep
.
ccolM1
+
1
;
int
nIdx
=
0
;
for
(
int
i
=
0
;
i
<
nCols
;
++
i
)
int
nColumnDataIdx
=
0
;
aNewSection
.
maSep
.
rgdxaColumnWidthSpacing
[
nColumnDataIdx
]
=
0
;
const
sal_uInt16
nColumnWidthSprmId
=
(
eVer
<=
ww
::
eWW7
?
136
:
0xF203
);
const
sal_uInt16
nColumnSpacingSprmId
=
(
eVer
<=
ww
::
eWW7
?
137
:
0xF204
);
const
sal_uInt8
nColumnCount
=
static_cast
<
sal_uInt8
>
(
aNewSection
.
maSep
.
ccolM1
+
1
);
for
(
sal_uInt8
nColumn
=
0
;
nColumn
<
nColumnCount
;
++
nColumn
)
{
//sprmSDxaColWidth
const
sal_uInt8
*
pSW
=
pSep
->
HasSprm
(
(
eVer
<=
ww
::
eWW7
?
136
:
0xF203
),
sal_uInt8
(
i
)
);
const
sal_uInt8
*
pSW
=
pSep
->
HasSprm
(
nColumnWidthSprmId
,
nColumn
);
ASSERT
(
pSW
,
"+Sprm 136 (bzw. 0xF203) (ColWidth) fehlt"
);
sal_uInt16
nWidth
=
pSW
?
SVBT16ToShort
(
pSW
+
1
)
:
1440
;
ASSERT
(
pSW
!=
NULL
,
"+Sprm 136 (bzw. 0xF203) (ColWidth) fehlt"
);
sal_uInt16
nWidth
=
pSW
!=
NULL
?
SVBT16ToShort
(
pSW
+
1
)
:
1440
;
aNewSection
.
maSep
.
rgdxaColumnWidthSpacing
[
++
nIdx
]
=
nWidth
;
aNewSection
.
maSep
.
rgdxaColumnWidthSpacing
[
++
n
ColumnData
Idx
]
=
nWidth
;
if
(
i
<
nCols
-
1
)
if
(
nColumn
<
nColumnCount
-
1
)
{
//sprmSDxaColSpacing
const
sal_uInt8
*
pSD
=
pSep
->
HasSprm
(
(
eVer
<=
ww
::
eWW7
?
137
:
0xF204
),
sal_uInt8
(
i
)
);
const
sal_uInt8
*
pSD
=
pSep
->
HasSprm
(
nColumnSpacingSprmId
,
nColumn
);
ASSERT
(
pSD
,
"+Sprm 137 (bzw. 0xF204) (Colspacing) fehlt"
);
if
(
pSD
)
if
(
pSD
)
{
nWidth
=
SVBT16ToShort
(
pSD
+
1
);
aNewSection
.
maSep
.
rgdxaColumnWidthSpacing
[
++
nIdx
]
=
nWidth
;
nWidth
=
SVBT16ToShort
(
pSD
+
1
);
aNewSection
.
maSep
.
rgdxaColumnWidthSpacing
[
++
n
ColumnData
Idx
]
=
nWidth
;
}
}
}
...
...
sw/source/filter/ww8/ww8struc.hxx
Dosyayı görüntüle @
32d9f959
...
...
@@ -967,6 +967,9 @@ struct WW8_WKB
# pragma pack()
#endif
// Maximum number of columns according the WW8 specification
static
const
sal_uInt8
MAX_NO_OF_SEP_COLUMNS
=
44
;
struct
SEPr
{
SEPr
();
...
...
@@ -1026,7 +1029,7 @@ struct SEPr
sal_uInt32
dzaGutter
;
sal_uInt32
dyaHdrTop
;
sal_uInt32
dyaHdrBottom
;
sal_Int16
ccolM1
;
sal_Int16
ccolM1
;
// have to be less than MAX_NO_OF_SEP_COLUMNS according the WW8 specification
sal_Int8
fEvenlySpaced
;
sal_Int8
reserved3
;
sal_uInt8
fBiDi
;
...
...
@@ -1034,7 +1037,13 @@ struct SEPr
sal_uInt8
fRTLGutter
;
sal_uInt8
fRTLAlignment
;
sal_Int32
dxaColumns
;
sal_Int32
rgdxaColumnWidthSpacing
[
89
];
// Fixed array - two entries for each SEP column to store width of column and spacing to next column.
// At odd index values [1,3,5,...] the column widths are stored.
// At even index values [2,4,6,...] the spacings to the next columns are stored.
// Value at index 0 is initialized with 0 and used for easier interation on the array
sal_Int32
rgdxaColumnWidthSpacing
[
MAX_NO_OF_SEP_COLUMNS
*
2
+
1
];
sal_Int32
dxaColumnWidth
;
sal_uInt8
dmOrientFirst
;
sal_uInt8
fLayout
;
...
...
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