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
637b9d4f
Kaydet (Commit)
637b9d4f
authored
Tem 13, 2012
tarafından
Noel Grandin
Kaydeden (comit)
Michael Stahl
Tem 17, 2012
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Convert SV_DECL_PTRARR_SORT_DEL(SwWriteTableRows) to o3tl::sorted_vector
Change-Id: I1731eae553e1bc47cbb01d47622b047693a6a194
üst
4991bd87
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
26 deletions
+21
-26
htmltabw.cxx
sw/source/filter/html/htmltabw.cxx
+7
-7
wrtswtbl.hxx
sw/source/filter/inc/wrtswtbl.hxx
+4
-3
wrtswtbl.cxx
sw/source/filter/writer/wrtswtbl.cxx
+10
-16
No files found.
sw/source/filter/html/htmltabw.cxx
Dosyayı görüntüle @
637b9d4f
...
@@ -589,9 +589,9 @@ void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 eAlign,
...
@@ -589,9 +589,9 @@ void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 eAlign,
// Wert fuer FRAME bestimmen
// Wert fuer FRAME bestimmen
sal_uInt16
nFrameMask
=
15
;
sal_uInt16
nFrameMask
=
15
;
if
(
!
(
aRows
[
0
]
)
->
bTopBorder
)
if
(
!
(
aRows
.
front
()
)
->
bTopBorder
)
nFrameMask
&=
~
1
;
nFrameMask
&=
~
1
;
if
(
!
(
aRows
[
aRows
.
Count
()
-
1
]
)
->
bBottomBorder
)
if
(
!
(
aRows
.
back
()
)
->
bBottomBorder
)
nFrameMask
&=
~
2
;
nFrameMask
&=
~
2
;
if
(
!
(
aCols
.
front
())
->
bLeftBorder
)
if
(
!
(
aCols
.
front
())
->
bLeftBorder
)
nFrameMask
&=
~
4
;
nFrameMask
&=
~
4
;
...
@@ -602,7 +602,7 @@ void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 eAlign,
...
@@ -602,7 +602,7 @@ void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 eAlign,
sal_Bool
bRowsHaveBorder
=
sal_False
;
sal_Bool
bRowsHaveBorder
=
sal_False
;
sal_Bool
bRowsHaveBorderOnly
=
sal_True
;
sal_Bool
bRowsHaveBorderOnly
=
sal_True
;
SwWriteTableRow
*
pRow
=
aRows
[
0
];
SwWriteTableRow
*
pRow
=
aRows
[
0
];
for
(
nRow
=
1
;
nRow
<
aRows
.
Count
();
nRow
++
)
for
(
nRow
=
1
;
nRow
<
aRows
.
size
();
nRow
++
)
{
{
SwWriteTableRow
*
pNextRow
=
aRows
[
nRow
];
SwWriteTableRow
*
pNextRow
=
aRows
[
nRow
];
sal_Bool
bBorder
=
(
pRow
->
bBottomBorder
||
pNextRow
->
bTopBorder
);
sal_Bool
bBorder
=
(
pRow
->
bBottomBorder
||
pNextRow
->
bTopBorder
);
...
@@ -841,7 +841,7 @@ void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 eAlign,
...
@@ -841,7 +841,7 @@ void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 eAlign,
// Zeile nur ausgegeben werden, wenn unter der Zeile eine Linie ist
// Zeile nur ausgegeben werden, wenn unter der Zeile eine Linie ist
if
(
bTHead
&&
if
(
bTHead
&&
(
bTSections
||
bColGroups
)
&&
(
bTSections
||
bColGroups
)
&&
nHeadEndRow
<
aRows
.
Count
()
-
1
&&
!
aRows
[
nHeadEndRow
]
->
bBottomBorder
)
nHeadEndRow
<
aRows
.
size
()
-
1
&&
!
aRows
[
nHeadEndRow
]
->
bBottomBorder
)
bTHead
=
sal_False
;
bTHead
=
sal_False
;
// <TBODY> aus ausgeben, wenn <THEAD> ausgegeben wird.
// <TBODY> aus ausgeben, wenn <THEAD> ausgegeben wird.
...
@@ -856,12 +856,12 @@ void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 eAlign,
...
@@ -856,12 +856,12 @@ void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 eAlign,
rWrt
.
IncIndentLevel
();
// Inhalt von <THEAD>/<TDATA> einr.
rWrt
.
IncIndentLevel
();
// Inhalt von <THEAD>/<TDATA> einr.
}
}
for
(
nRow
=
0
;
nRow
<
aRows
.
Count
();
nRow
++
)
for
(
nRow
=
0
;
nRow
<
aRows
.
size
();
nRow
++
)
{
{
const
SwWriteTableRow
*
pRow2
=
aRows
[
nRow
];
const
SwWriteTableRow
*
pRow2
=
aRows
[
nRow
];
OutTableCells
(
rWrt
,
pRow2
->
GetCells
(),
pRow2
->
GetBackground
()
);
OutTableCells
(
rWrt
,
pRow2
->
GetCells
(),
pRow2
->
GetBackground
()
);
if
(
!
nCellSpacing
&&
nRow
<
aRows
.
Count
()
-
1
&&
pRow2
->
bBottomBorder
&&
if
(
!
nCellSpacing
&&
nRow
<
aRows
.
size
()
-
1
&&
pRow2
->
bBottomBorder
&&
pRow2
->
nBottomBorder
>
DEF_LINE_WIDTH_1
)
pRow2
->
nBottomBorder
>
DEF_LINE_WIDTH_1
)
{
{
sal_uInt16
nCnt
=
(
pRow2
->
nBottomBorder
/
DEF_LINE_WIDTH_1
)
-
1
;
sal_uInt16
nCnt
=
(
pRow2
->
nBottomBorder
/
DEF_LINE_WIDTH_1
)
-
1
;
...
@@ -876,7 +876,7 @@ void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 eAlign,
...
@@ -876,7 +876,7 @@ void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 eAlign,
}
}
if
(
(
(
bTHead
&&
nRow
==
nHeadEndRow
)
||
if
(
(
(
bTHead
&&
nRow
==
nHeadEndRow
)
||
(
bTBody
&&
pRow2
->
bBottomBorder
)
)
&&
(
bTBody
&&
pRow2
->
bBottomBorder
)
)
&&
nRow
<
aRows
.
Count
()
-
1
)
nRow
<
aRows
.
size
()
-
1
)
{
{
rWrt
.
DecIndentLevel
();
// Inhalt von <THEAD>/<TDATA> einr.
rWrt
.
DecIndentLevel
();
// Inhalt von <THEAD>/<TDATA> einr.
rWrt
.
OutNewLine
();
// </THEAD>/</TDATA> in neue Zeile
rWrt
.
OutNewLine
();
// </THEAD>/</TDATA> in neue Zeile
...
...
sw/source/filter/inc/wrtswtbl.hxx
Dosyayı görüntüle @
637b9d4f
...
@@ -30,7 +30,6 @@
...
@@ -30,7 +30,6 @@
#include <tools/solar.h>
#include <tools/solar.h>
#include <tools/color.hxx>
#include <tools/color.hxx>
#include <svl/svarray.hxx>
#include <boost/ptr_container/ptr_vector.hpp>
#include <boost/ptr_container/ptr_vector.hpp>
#include <o3tl/sorted_vector.hxx>
#include <o3tl/sorted_vector.hxx>
...
@@ -173,8 +172,10 @@ inline int SwWriteTableRow::operator<( const SwWriteTableRow& rRow ) const
...
@@ -173,8 +172,10 @@ inline int SwWriteTableRow::operator<( const SwWriteTableRow& rRow ) const
return
nPos
<
rRow
.
nPos
-
(
mbUseLayoutHeights
?
0
:
ROWFUZZY
);
return
nPos
<
rRow
.
nPos
-
(
mbUseLayoutHeights
?
0
:
ROWFUZZY
);
}
}
typedef
SwWriteTableRow
*
SwWriteTableRowPtr
;
class
SwWriteTableRows
:
public
o3tl
::
sorted_vector
<
SwWriteTableRow
*
,
o3tl
::
less_ptr_to
<
SwWriteTableRow
>
>
{
SV_DECL_PTRARR_SORT_DEL
(
SwWriteTableRows
,
SwWriteTableRowPtr
,
5
)
public
:
~
SwWriteTableRows
()
{
DeleteAndDestroyAll
();
}
};
//-----------------------------------------------------------------------
//-----------------------------------------------------------------------
...
...
sw/source/filter/writer/wrtswtbl.cxx
Dosyayı görüntüle @
637b9d4f
...
@@ -41,8 +41,6 @@
...
@@ -41,8 +41,6 @@
using
::
editeng
::
SvxBorderLine
;
using
::
editeng
::
SvxBorderLine
;
using
namespace
::
com
::
sun
::
star
;
using
namespace
::
com
::
sun
::
star
;
SV_IMPL_OP_PTRARR_SORT
(
SwWriteTableRows
,
SwWriteTableRowPtr
)
//-----------------------------------------------------------------------
//-----------------------------------------------------------------------
sal_Int16
SwWriteTableCell
::
GetVertOri
()
const
sal_Int16
SwWriteTableCell
::
GetVertOri
()
const
...
@@ -269,7 +267,7 @@ sal_uInt16 SwWriteTable::MergeBoxBorders( const SwTableBox *pBox,
...
@@ -269,7 +267,7 @@ sal_uInt16 SwWriteTable::MergeBoxBorders( const SwTableBox *pBox,
if
(
rBoxItem
.
GetBottom
()
)
if
(
rBoxItem
.
GetBottom
()
)
{
{
nBorderMask
|=
2
;
nBorderMask
|=
2
;
MergeBorders
(
rBoxItem
.
GetBottom
(),
nRow
+
nRowSpan
==
aRows
.
Count
()
);
MergeBorders
(
rBoxItem
.
GetBottom
(),
nRow
+
nRowSpan
==
aRows
.
size
()
);
rBottomBorder
=
rBoxItem
.
GetBottom
()
->
GetOutWidth
();
rBottomBorder
=
rBoxItem
.
GetBottom
()
->
GetOutWidth
();
}
}
...
@@ -396,7 +394,7 @@ long SwWriteTable::GetAbsHeight( long nRawHeight, sal_uInt16 nRow,
...
@@ -396,7 +394,7 @@ long SwWriteTable::GetAbsHeight( long nRawHeight, sal_uInt16 nRow,
}
}
// In der letzten Zeile noch die Liniendicke abziehen
// In der letzten Zeile noch die Liniendicke abziehen
if
(
nRow
+
nRowSpan
==
aRows
.
Count
()
)
if
(
nRow
+
nRowSpan
==
aRows
.
size
()
)
{
{
if
(
!
pRow
||
nRowSpan
>
1
)
if
(
!
pRow
||
nRowSpan
>
1
)
pRow
=
aRows
[
nRow
+
nRowSpan
-
1
];
pRow
=
aRows
[
nRow
+
nRowSpan
-
1
];
...
@@ -452,11 +450,8 @@ void SwWriteTable::CollectTableRowsCols( long nStartRPos,
...
@@ -452,11 +450,8 @@ void SwWriteTable::CollectTableRowsCols( long nStartRPos,
nRPos
+=
nLineHeight
;
nRPos
+=
nLineHeight
;
}
}
SwWriteTableRow
*
pRow
=
new
SwWriteTableRow
(
nRPos
,
bUseLayoutHeights
);
SwWriteTableRow
*
pRow
=
new
SwWriteTableRow
(
nRPos
,
bUseLayoutHeights
);
sal_uInt16
nRow
;
if
(
!
aRows
.
insert
(
pRow
).
second
)
if
(
aRows
.
Seek_Entry
(
pRow
,
&
nRow
)
)
delete
pRow
;
delete
pRow
;
else
aRows
.
Insert
(
pRow
);
}
}
else
else
{
{
...
@@ -465,9 +460,8 @@ void SwWriteTable::CollectTableRowsCols( long nStartRPos,
...
@@ -465,9 +460,8 @@ void SwWriteTable::CollectTableRowsCols( long nStartRPos,
#endif
#endif
nRPos
=
nStartRPos
+
nParentLineHeight
;
nRPos
=
nStartRPos
+
nParentLineHeight
;
#if OSL_DEBUG_LEVEL > 0
#if OSL_DEBUG_LEVEL > 0
SwWriteTableRow
aRow
(
nStartRPos
+
nParentLineHeight
,
bUseLayoutHeights
);
SwWriteTableRow
aSrchRow
(
nRPos
,
bUseLayoutHeights
);
OSL_ENSURE
(
aRows
.
Seek_Entry
(
&
aRow
),
OSL_ENSURE
(
aRows
.
find
(
&
aSrchRow
)
!=
aRows
.
end
(),
"Parent-Zeile nicht gefunden"
);
"Parent-Zeile nicht gefunden"
);
SwWriteTableRow
aRowCheckPos
(
nCheckPos
,
bUseLayoutHeights
);
SwWriteTableRow
aRowCheckPos
(
nCheckPos
,
bUseLayoutHeights
);
SwWriteTableRow
aRowRPos
(
nRPos
,
bUseLayoutHeights
);
SwWriteTableRow
aRowRPos
(
nRPos
,
bUseLayoutHeights
);
OSL_ENSURE
(
!
bUseLayoutHeights
||
OSL_ENSURE
(
!
bUseLayoutHeights
||
...
@@ -584,10 +578,10 @@ void SwWriteTable::FillTableRowsCols( long nStartRPos, sal_uInt16 nStartRow,
...
@@ -584,10 +578,10 @@ void SwWriteTable::FillTableRowsCols( long nStartRPos, sal_uInt16 nStartRow,
// Und ihren Index
// Und ihren Index
sal_uInt16
nOldRow
=
nRow
;
sal_uInt16
nOldRow
=
nRow
;
SwWriteTableRow
aRow
(
nRPos
,
bUseLayoutHeights
);
SwWriteTableRow
a
Srch
Row
(
nRPos
,
bUseLayoutHeights
);
bool
const
bFound
=
aRows
.
Seek_Entry
(
&
aRow
,
&
n
Row
);
SwWriteTableRows
::
const_iterator
it2
=
aRows
.
find
(
&
aSrch
Row
);
OSL_ENSURE
(
bFound
,
"missing row"
);
OSL_ENSURE
(
it2
!=
aRows
.
end
()
,
"missing row"
);
(
void
)
bFound
;
// unused in non-debug
nRow
=
it2
-
aRows
.
begin
();
OSL_ENSURE
(
nOldRow
<=
nRow
,
"Don't look back!"
);
OSL_ENSURE
(
nOldRow
<=
nRow
,
"Don't look back!"
);
if
(
nOldRow
>
nRow
)
if
(
nOldRow
>
nRow
)
...
@@ -818,7 +812,7 @@ SwWriteTable::SwWriteTable( const SwHTMLTableLayout *pLayoutInfo )
...
@@ -818,7 +812,7 @@ SwWriteTable::SwWriteTable( const SwHTMLTableLayout *pLayoutInfo )
new
SwWriteTableRow
(
(
nRow
+
1
)
*
ROW_DFLT_HEIGHT
,
bUseLayoutHeights
);
new
SwWriteTableRow
(
(
nRow
+
1
)
*
ROW_DFLT_HEIGHT
,
bUseLayoutHeights
);
pRow
->
nTopBorder
=
0
;
pRow
->
nTopBorder
=
0
;
pRow
->
nBottomBorder
=
0
;
pRow
->
nBottomBorder
=
0
;
aRows
.
I
nsert
(
pRow
);
aRows
.
i
nsert
(
pRow
);
}
}
// Und jetzt mit leben fuellen
// Und jetzt mit leben fuellen
...
...
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