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
e4de5b40
Kaydet (Commit)
e4de5b40
authored
Ara 27, 2014
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fdo#84714 ODT export: write <loext:table> inside <draw:custom-shape>
Change-Id: I543ec24f8825bcc7c35acc106402f4fc6b4b5d79
üst
62391c28
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
12 deletions
+30
-12
odfexport.cxx
sw/qa/extras/odfexport/odfexport.cxx
+5
-0
node.cxx
sw/source/core/docnode/node.cxx
+3
-0
xmltble.cxx
sw/source/filter/xml/xmltble.cxx
+22
-12
No files found.
sw/qa/extras/odfexport/odfexport.cxx
Dosyayı görüntüle @
e4de5b40
...
@@ -400,6 +400,11 @@ DECLARE_ODFEXPORT_TEST(testTextboxRoundedCorners, "textbox-rounded-corners.odt")
...
@@ -400,6 +400,11 @@ DECLARE_ODFEXPORT_TEST(testTextboxRoundedCorners, "textbox-rounded-corners.odt")
uno
::
Reference
<
text
::
XTextTable
>
xTable
(
getParagraphOrTable
(
1
,
xText
),
uno
::
UNO_QUERY
);
uno
::
Reference
<
text
::
XTextTable
>
xTable
(
getParagraphOrTable
(
1
,
xText
),
uno
::
UNO_QUERY
);
uno
::
Reference
<
text
::
XTextRange
>
xCell
(
xTable
->
getCellByName
(
"A1"
),
uno
::
UNO_QUERY
);
uno
::
Reference
<
text
::
XTextRange
>
xCell
(
xTable
->
getCellByName
(
"A1"
),
uno
::
UNO_QUERY
);
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"a"
),
xCell
->
getString
());
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"a"
),
xCell
->
getString
());
// Table inside a textbox should be in the extension namespace.
if
(
xmlDocPtr
pXmlDoc
=
parseExport
(
"content.xml"
))
// This failed, as draw:custom-shape had a table:table child.
assertXPath
(
pXmlDoc
,
"//draw:custom-shape/loext:table"
,
"name"
,
"Table1"
);
}
}
DECLARE_ODFEXPORT_TEST
(
testFdo86963
,
"fdo86963.odt"
)
DECLARE_ODFEXPORT_TEST
(
testFdo86963
,
"fdo86963.odt"
)
...
...
sw/source/core/docnode/node.cxx
Dosyayı görüntüle @
e4de5b40
...
@@ -717,6 +717,9 @@ SwFrmFmt* SwNode::GetFlyFmt() const
...
@@ -717,6 +717,9 @@ SwFrmFmt* SwNode::GetFlyFmt() const
for
(
size_t
n
=
0
;
n
<
rFrmFmtTbl
.
size
();
++
n
)
for
(
size_t
n
=
0
;
n
<
rFrmFmtTbl
.
size
();
++
n
)
{
{
SwFrmFmt
*
pFmt
=
rFrmFmtTbl
[
n
];
SwFrmFmt
*
pFmt
=
rFrmFmtTbl
[
n
];
// Only Writer fly frames can contain Writer nodes.
if
(
pFmt
->
Which
()
!=
RES_FLYFRMFMT
)
continue
;
const
SwFmtCntnt
&
rCntnt
=
pFmt
->
GetCntnt
();
const
SwFmtCntnt
&
rCntnt
=
pFmt
->
GetCntnt
();
if
(
rCntnt
.
GetCntntIdx
()
&&
if
(
rCntnt
.
GetCntntIdx
()
&&
&
rCntnt
.
GetCntntIdx
()
->
GetNode
()
==
pSttNd
)
&
rCntnt
.
GetCntntIdx
()
->
GetNode
()
==
pSttNd
)
...
...
sw/source/filter/xml/xmltble.cxx
Dosyayı görüntüle @
e4de5b40
...
@@ -50,6 +50,7 @@
...
@@ -50,6 +50,7 @@
#include "xmlexp.hxx"
#include "xmlexp.hxx"
#include <boost/foreach.hpp>
#include <boost/foreach.hpp>
#include <o3tl/sorted_vector.hxx>
#include <o3tl/sorted_vector.hxx>
#include <textboxhelper.hxx>
using
namespace
::
com
::
sun
::
star
;
using
namespace
::
com
::
sun
::
star
;
using
namespace
::
com
::
sun
::
star
::
uno
;
using
namespace
::
com
::
sun
::
star
::
uno
;
...
@@ -461,10 +462,11 @@ class SwXMLTableInfo_Impl
...
@@ -461,10 +462,11 @@ class SwXMLTableInfo_Impl
const
SwTable
*
pTable
;
const
SwTable
*
pTable
;
Reference
<
XTextSection
>
xBaseSection
;
Reference
<
XTextSection
>
xBaseSection
;
bool
bBaseSectionValid
;
bool
bBaseSectionValid
;
sal_uInt32
m_nPrefix
;
public
:
public
:
inline
SwXMLTableInfo_Impl
(
const
SwTable
*
pTbl
);
inline
SwXMLTableInfo_Impl
(
const
SwTable
*
pTbl
,
sal_uInt16
nPrefix
);
const
SwTable
*
GetTable
()
const
{
return
pTable
;
}
const
SwTable
*
GetTable
()
const
{
return
pTable
;
}
const
SwFrmFmt
*
GetTblFmt
()
const
{
return
pTable
->
GetFrmFmt
();
}
const
SwFrmFmt
*
GetTblFmt
()
const
{
return
pTable
->
GetFrmFmt
();
}
...
@@ -472,11 +474,14 @@ public:
...
@@ -472,11 +474,14 @@ public:
bool
IsBaseSectionValid
()
const
{
return
bBaseSectionValid
;
}
bool
IsBaseSectionValid
()
const
{
return
bBaseSectionValid
;
}
const
Reference
<
XTextSection
>&
GetBaseSection
()
const
{
return
xBaseSection
;
}
const
Reference
<
XTextSection
>&
GetBaseSection
()
const
{
return
xBaseSection
;
}
inline
void
SetBaseSection
(
const
Reference
<
XTextSection
>&
rBase
);
inline
void
SetBaseSection
(
const
Reference
<
XTextSection
>&
rBase
);
/// The namespace (table or loext) that should be used for the elements.
sal_uInt16
GetPrefix
()
const
{
return
m_nPrefix
;
}
};
};
inline
SwXMLTableInfo_Impl
::
SwXMLTableInfo_Impl
(
const
SwTable
*
pTbl
)
:
inline
SwXMLTableInfo_Impl
::
SwXMLTableInfo_Impl
(
const
SwTable
*
pTbl
,
sal_uInt16
nPrefix
)
:
pTable
(
pTbl
),
pTable
(
pTbl
),
bBaseSectionValid
(
false
)
bBaseSectionValid
(
false
),
m_nPrefix
(
nPrefix
)
{
{
}
}
...
@@ -719,7 +724,7 @@ void SwXMLExport::ExportTableAutoStyles( const SwTableNode& rTblNd )
...
@@ -719,7 +724,7 @@ void SwXMLExport::ExportTableAutoStyles( const SwTableNode& rTblNd )
SwXMLTableColumnsSortByWidth_Impl
aExpCols
;
SwXMLTableColumnsSortByWidth_Impl
aExpCols
;
SwXMLTableFrmFmtsSort_Impl
aExpRows
;
SwXMLTableFrmFmtsSort_Impl
aExpRows
;
SwXMLTableFrmFmtsSort_Impl
aExpCells
;
SwXMLTableFrmFmtsSort_Impl
aExpCells
;
SwXMLTableInfo_Impl
aTblInfo
(
&
rTbl
);
SwXMLTableInfo_Impl
aTblInfo
(
&
rTbl
,
XML_NAMESPACE_TABLE
);
ExportTableLinesAutoStyles
(
rTbl
.
GetTabLines
(),
nAbsWidth
,
nBaseWidth
,
ExportTableLinesAutoStyles
(
rTbl
.
GetTabLines
(),
nAbsWidth
,
nBaseWidth
,
pTblFmt
->
GetName
(),
aExpCols
,
aExpRows
,
aExpCells
,
pTblFmt
->
GetName
(),
aExpCols
,
aExpRows
,
aExpCells
,
aTblInfo
,
true
);
aTblInfo
,
true
);
...
@@ -828,7 +833,7 @@ void SwXMLExport::ExportTableBox( const SwTableBox& rBox,
...
@@ -828,7 +833,7 @@ void SwXMLExport::ExportTableBox( const SwTableBox& rBox,
}
}
// export cell element
// export cell element
SvXMLElementExport
aElem
(
*
this
,
XML_NAMESPACE_TABLE
,
SvXMLElementExport
aElem
(
*
this
,
rTblInfo
.
GetPrefix
()
,
XML_TABLE_CELL
,
true
,
true
);
XML_TABLE_CELL
,
true
,
true
);
// export cell content
// export cell content
...
@@ -879,8 +884,7 @@ void SwXMLExport::ExportTableLine( const SwTableLine& rLine,
...
@@ -879,8 +884,7 @@ void SwXMLExport::ExportTableLine( const SwTableLine& rLine,
}
}
{
{
SvXMLElementExport
aElem
(
*
this
,
XML_NAMESPACE_TABLE
,
SvXMLElementExport
aElem
(
*
this
,
rTblInfo
.
GetPrefix
(),
XML_TABLE_ROW
,
true
,
true
);
XML_TABLE_ROW
,
true
,
true
);
const
SwTableBoxes
&
rBoxes
=
rLine
.
GetTabBoxes
();
const
SwTableBoxes
&
rBoxes
=
rLine
.
GetTabBoxes
();
const
size_t
nBoxes
=
rBoxes
.
size
();
const
size_t
nBoxes
=
rBoxes
.
size
();
...
@@ -1001,8 +1005,7 @@ void SwXMLExport::ExportTableLines( const SwTableLines& rLines,
...
@@ -1001,8 +1005,7 @@ void SwXMLExport::ExportTableLines( const SwTableLines& rLines,
}
}
{
{
SvXMLElementExport
aElem
(
*
this
,
XML_NAMESPACE_TABLE
,
SvXMLElementExport
aElem
(
*
this
,
rTblInfo
.
GetPrefix
(),
XML_TABLE_COLUMN
,
true
,
true
);
XML_TABLE_COLUMN
,
true
,
true
);
}
}
nColRep
=
1
;
nColRep
=
1
;
...
@@ -1065,9 +1068,16 @@ void SwXMLExport::ExportTable( const SwTableNode& rTblNd )
...
@@ -1065,9 +1068,16 @@ void SwXMLExport::ExportTable( const SwTableNode& rTblNd )
EncodeStyleName
(
pTblFmt
->
GetName
()
)
);
EncodeStyleName
(
pTblFmt
->
GetName
()
)
);
}
}
sal_uInt16
nPrefix
=
XML_NAMESPACE_TABLE
;
if
(
const
SwFrmFmt
*
pFlyFormat
=
rTblNd
.
GetFlyFmt
())
{
std
::
set
<
const
SwFrmFmt
*>
aTextBoxes
=
SwTextBoxHelper
::
findTextBoxes
(
rTblNd
.
GetDoc
());
if
(
aTextBoxes
.
find
(
pFlyFormat
)
!=
aTextBoxes
.
end
())
nPrefix
=
XML_NAMESPACE_LO_EXT
;
}
{
{
SvXMLElementExport
aElem
(
*
this
,
XML_NAMESPACE_TABLE
,
XML_TABLE
,
SvXMLElementExport
aElem
(
*
this
,
nPrefix
,
XML_TABLE
,
true
,
true
);
true
,
true
);
// export DDE source (if this is a DDE table)
// export DDE source (if this is a DDE table)
if
(
rTbl
.
ISA
(
SwDDETable
)
)
if
(
rTbl
.
ISA
(
SwDDETable
)
)
...
@@ -1101,7 +1111,7 @@ void SwXMLExport::ExportTable( const SwTableNode& rTblNd )
...
@@ -1101,7 +1111,7 @@ void SwXMLExport::ExportTable( const SwTableNode& rTblNd )
XML_DDE_SOURCE
,
true
,
false
);
XML_DDE_SOURCE
,
true
,
false
);
}
}
SwXMLTableInfo_Impl
aTblInfo
(
&
rTbl
);
SwXMLTableInfo_Impl
aTblInfo
(
&
rTbl
,
nPrefix
);
ExportTableLines
(
rTbl
.
GetTabLines
(),
aTblInfo
,
rTbl
.
GetRowsToRepeat
()
);
ExportTableLines
(
rTbl
.
GetTabLines
(),
aTblInfo
,
rTbl
.
GetRowsToRepeat
()
);
BOOST_FOREACH
(
SwTableLine
*
pLine
,
((
SwTable
&
)
rTbl
).
GetTabLines
()
)
BOOST_FOREACH
(
SwTableLine
*
pLine
,
((
SwTable
&
)
rTbl
).
GetTabLines
()
)
...
...
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