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
ee633ec6
Kaydet (Commit)
ee633ec6
authored
Ara 04, 2014
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
TableData is only used with PropertiesPointer=TablePropertyMapPtr
Change-Id: I613addb6cd8b57fce90659209503f633ee438a58
üst
6bceec84
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
28 deletions
+20
-28
TableData.hxx
writerfilter/source/dmapper/TableData.hxx
+10
-18
TableManager.cxx
writerfilter/source/dmapper/TableManager.cxx
+9
-9
TableManager.hxx
writerfilter/source/dmapper/TableManager.hxx
+1
-1
No files found.
writerfilter/source/dmapper/TableData.hxx
Dosyayı görüntüle @
ee633ec6
...
@@ -264,19 +264,19 @@ public:
...
@@ -264,19 +264,19 @@ public:
}
}
};
};
template
<
typename
T
,
typename
PropertiesPointer
>
template
<
typename
T
>
/**
/**
Class that holds the data of a table.
Class that holds the data of a table.
*/
*/
class
TableData
class
TableData
{
{
typedef
typename
RowData
<
T
,
PropertiesPointe
r
>::
Pointer_t
RowPointer_t
;
typedef
typename
RowData
<
T
,
TablePropertyMapPt
r
>::
Pointer_t
RowPointer_t
;
typedef
::
std
::
vector
<
RowPointer_t
>
Rows
;
typedef
::
std
::
vector
<
RowPointer_t
>
Rows
;
/**
/**
the table properties
the table properties
*/
*/
PropertiesPointe
r
mpTableProps
;
TablePropertyMapPt
r
mpTableProps
;
/**
/**
the data of the rows of the table
the data of the rows of the table
...
@@ -296,10 +296,10 @@ class TableData
...
@@ -296,10 +296,10 @@ class TableData
/**
/**
initialize mpRow
initialize mpRow
*/
*/
void
newRow
()
{
mpRow
=
RowPointer_t
(
new
RowData
<
T
,
PropertiesPointe
r
>
());
}
void
newRow
()
{
mpRow
=
RowPointer_t
(
new
RowData
<
T
,
TablePropertyMapPt
r
>
());
}
public
:
public
:
typedef
boost
::
shared_ptr
<
TableData
<
T
,
PropertiesPointer
>
>
Pointer_t
;
typedef
boost
::
shared_ptr
<
TableData
<
T
>
>
Pointer_t
;
TableData
(
unsigned
int
nDepth
)
:
mnDepth
(
nDepth
)
{
newRow
();
}
TableData
(
unsigned
int
nDepth
)
:
mnDepth
(
nDepth
)
{
newRow
();
}
~
TableData
()
{}
~
TableData
()
{}
...
@@ -312,7 +312,7 @@ public:
...
@@ -312,7 +312,7 @@ public:
@param pProperties properties of the row to be ended
@param pProperties properties of the row to be ended
*/
*/
void
endRow
(
PropertiesPointe
r
pProperties
)
void
endRow
(
TablePropertyMapPt
r
pProperties
)
{
{
mpRow
->
insertProperties
(
pProperties
);
mpRow
->
insertProperties
(
pProperties
);
mRows
.
push_back
(
mpRow
);
mRows
.
push_back
(
mpRow
);
...
@@ -326,7 +326,7 @@ public:
...
@@ -326,7 +326,7 @@ public:
@param end end handle of the cell
@param end end handle of the cell
@param pProps properties of the cell
@param pProps properties of the cell
*/
*/
void
addCell
(
const
T
&
start
,
PropertiesPointe
r
pProps
)
void
addCell
(
const
T
&
start
,
TablePropertyMapPt
r
pProps
)
{
{
mpRow
->
addCell
(
start
,
pProps
);
mpRow
->
addCell
(
start
,
pProps
);
}
}
...
@@ -354,7 +354,7 @@ public:
...
@@ -354,7 +354,7 @@ public:
@param pProps the properties to add
@param pProps the properties to add
*/
*/
void
insertCellProperties
(
PropertiesPointe
r
pProps
)
void
insertCellProperties
(
TablePropertyMapPt
r
pProps
)
{
{
mpRow
->
insertCellProperties
(
pProps
);
mpRow
->
insertCellProperties
(
pProps
);
}
}
...
@@ -365,23 +365,15 @@ public:
...
@@ -365,23 +365,15 @@ public:
@param i index of the cell
@param i index of the cell
@param pProps properties to add
@param pProps properties to add
*/
*/
void
insertCellProperties
(
unsigned
int
i
,
PropertiesPointe
r
pProps
)
void
insertCellProperties
(
unsigned
int
i
,
TablePropertyMapPt
r
pProps
)
{
{
mpRow
->
insertCellProperties
(
i
,
pProps
);
mpRow
->
insertCellProperties
(
i
,
pProps
);
}
}
void
insertTableProperties
(
PropertiesPointer
pProps
)
{
if
(
mpTableProps
.
get
(
)
)
mpTableProps
->
insert
(
pProps
);
else
mpTableProps
=
pProps
;
}
/**
/**
Return the table properties.
Return the table properties.
*/
*/
PropertiesPointe
r
getTableProperties
(
)
TablePropertyMapPt
r
getTableProperties
(
)
{
{
return
mpTableProps
;
return
mpTableProps
;
}
}
...
...
writerfilter/source/dmapper/TableManager.cxx
Dosyayı görüntüle @
ee633ec6
...
@@ -38,7 +38,7 @@ void TableManager::openCell(const css::uno::Reference<css::text::XTextRange>& rH
...
@@ -38,7 +38,7 @@ void TableManager::openCell(const css::uno::Reference<css::text::XTextRange>& rH
if
(
mTableDataStack
.
size
()
>
0
)
if
(
mTableDataStack
.
size
()
>
0
)
{
{
TableData
<
css
::
uno
::
Reference
<
css
::
text
::
XTextRange
>
,
TablePropertyMapPtr
>::
Pointer_t
pTableData
=
mTableDataStack
.
top
();
TableData
<
css
::
uno
::
Reference
<
css
::
text
::
XTextRange
>
>::
Pointer_t
pTableData
=
mTableDataStack
.
top
();
pTableData
->
addCell
(
rHandle
,
pProps
);
pTableData
->
addCell
(
rHandle
,
pProps
);
}
}
...
@@ -211,7 +211,7 @@ void TableManager::closeCell(const css::uno::Reference<css::text::XTextRange>& r
...
@@ -211,7 +211,7 @@ void TableManager::closeCell(const css::uno::Reference<css::text::XTextRange>& r
if
(
mTableDataStack
.
size
()
>
0
)
if
(
mTableDataStack
.
size
()
>
0
)
{
{
TableData
<
css
::
uno
::
Reference
<
css
::
text
::
XTextRange
>
,
TablePropertyMapPtr
>::
Pointer_t
pTableData
=
mTableDataStack
.
top
();
TableData
<
css
::
uno
::
Reference
<
css
::
text
::
XTextRange
>
>::
Pointer_t
pTableData
=
mTableDataStack
.
top
();
pTableData
->
endCell
(
rHandle
);
pTableData
->
endCell
(
rHandle
);
}
}
...
@@ -225,7 +225,7 @@ void TableManager::ensureOpenCell(TablePropertyMapPtr pProps)
...
@@ -225,7 +225,7 @@ void TableManager::ensureOpenCell(TablePropertyMapPtr pProps)
if
(
mTableDataStack
.
size
()
>
0
)
if
(
mTableDataStack
.
size
()
>
0
)
{
{
TableData
<
css
::
uno
::
Reference
<
css
::
text
::
XTextRange
>
,
TablePropertyMapPtr
>::
Pointer_t
pTableData
=
mTableDataStack
.
top
();
TableData
<
css
::
uno
::
Reference
<
css
::
text
::
XTextRange
>
>::
Pointer_t
pTableData
=
mTableDataStack
.
top
();
if
(
pTableData
.
get
()
!=
nullptr
)
if
(
pTableData
.
get
()
!=
nullptr
)
{
{
...
@@ -264,7 +264,7 @@ void TableManager::endParagraphGroup()
...
@@ -264,7 +264,7 @@ void TableManager::endParagraphGroup()
if
(
mnTableDepth
>
0
)
if
(
mnTableDepth
>
0
)
{
{
TableData
<
css
::
uno
::
Reference
<
css
::
text
::
XTextRange
>
,
TablePropertyMapPtr
>::
Pointer_t
pTableData
=
mTableDataStack
.
top
();
TableData
<
css
::
uno
::
Reference
<
css
::
text
::
XTextRange
>
>::
Pointer_t
pTableData
=
mTableDataStack
.
top
();
if
(
isRowEnd
())
if
(
isRowEnd
())
{
{
...
@@ -304,7 +304,7 @@ void TableManager::resolveCurrentTable()
...
@@ -304,7 +304,7 @@ void TableManager::resolveCurrentTable()
{
{
try
try
{
{
TableData
<
css
::
uno
::
Reference
<
css
::
text
::
XTextRange
>
,
TablePropertyMapPtr
>::
Pointer_t
pTableData
=
mTableDataStack
.
top
();
TableData
<
css
::
uno
::
Reference
<
css
::
text
::
XTextRange
>
>::
Pointer_t
pTableData
=
mTableDataStack
.
top
();
unsigned
int
nRows
=
pTableData
->
getRowCount
();
unsigned
int
nRows
=
pTableData
->
getRowCount
();
...
@@ -358,7 +358,7 @@ void TableManager::endLevel()
...
@@ -358,7 +358,7 @@ void TableManager::endLevel()
#ifdef DEBUG_WRITERFILTER
#ifdef DEBUG_WRITERFILTER
if
(
mpTableLogger
!=
nullptr
)
if
(
mpTableLogger
!=
nullptr
)
{
{
TableData
<
css
::
uno
::
Reference
<
css
::
text
::
XTextRange
>
,
TablePropertyMapPtr
>::
Pointer_t
pTableData
;
TableData
<
css
::
uno
::
Reference
<
css
::
text
::
XTextRange
>
>::
Pointer_t
pTableData
;
if
(
mTableDataStack
.
size
()
>
0
)
if
(
mTableDataStack
.
size
()
>
0
)
pTableData
=
mTableDataStack
.
top
();
pTableData
=
mTableDataStack
.
top
();
...
@@ -379,7 +379,7 @@ void TableManager::startLevel()
...
@@ -379,7 +379,7 @@ void TableManager::startLevel()
#ifdef DEBUG_WRITERFILTER
#ifdef DEBUG_WRITERFILTER
if
(
mpTableLogger
!=
nullptr
)
if
(
mpTableLogger
!=
nullptr
)
{
{
TableData
<
css
::
uno
::
Reference
<
css
::
text
::
XTextRange
>
,
TablePropertyMapPtr
>::
Pointer_t
pTableData
;
TableData
<
css
::
uno
::
Reference
<
css
::
text
::
XTextRange
>
>::
Pointer_t
pTableData
;
if
(
mTableDataStack
.
size
()
>
0
)
if
(
mTableDataStack
.
size
()
>
0
)
pTableData
=
mTableDataStack
.
top
();
pTableData
=
mTableDataStack
.
top
();
...
@@ -394,8 +394,8 @@ void TableManager::startLevel()
...
@@ -394,8 +394,8 @@ void TableManager::startLevel()
}
}
#endif
#endif
TableData
<
css
::
uno
::
Reference
<
css
::
text
::
XTextRange
>
,
TablePropertyMapPtr
>::
Pointer_t
TableData
<
css
::
uno
::
Reference
<
css
::
text
::
XTextRange
>
>::
Pointer_t
pTableData
(
new
TableData
<
css
::
uno
::
Reference
<
css
::
text
::
XTextRange
>
,
TablePropertyMapPtr
>
(
mTableDataStack
.
size
()));
pTableData
(
new
TableData
<
css
::
uno
::
Reference
<
css
::
text
::
XTextRange
>
>
(
mTableDataStack
.
size
()));
// If we have an unfinished row stored here, then push it to the new TableData
// If we have an unfinished row stored here, then push it to the new TableData
if
(
mpUnfinishedRow
)
if
(
mpUnfinishedRow
)
...
...
writerfilter/source/dmapper/TableManager.hxx
Dosyayı görüntüle @
ee633ec6
...
@@ -404,7 +404,7 @@ private:
...
@@ -404,7 +404,7 @@ private:
for each level of nested tables there is one frame in the stack
for each level of nested tables there is one frame in the stack
*/
*/
std
::
stack
<
typename
TableData
<
css
::
uno
::
Reference
<
css
::
text
::
XTextRange
>
,
TablePropertyMapPtr
>::
Pointer_t
>
mTableDataStack
;
std
::
stack
<
typename
TableData
<
css
::
uno
::
Reference
<
css
::
text
::
XTextRange
>
>::
Pointer_t
>
mTableDataStack
;
RowData
<
css
::
uno
::
Reference
<
css
::
text
::
XTextRange
>
,
TablePropertyMapPtr
>::
Pointer_t
mpUnfinishedRow
;
RowData
<
css
::
uno
::
Reference
<
css
::
text
::
XTextRange
>
,
TablePropertyMapPtr
>::
Pointer_t
mpUnfinishedRow
;
bool
mbKeepUnfinishedRow
;
bool
mbKeepUnfinishedRow
;
...
...
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