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
3a87ba97
Kaydet (Commit)
3a87ba97
authored
Tem 08, 2013
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
bnc#822175 DOCX filter: export wrapping of text frames
Change-Id: I5c5128686e96a97570b8cdf109dd75976a071ca8
üst
9c773140
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
53 additions
and
0 deletions
+53
-0
n822175.odt
sw/qa/extras/ooxmlexport/data/n822175.odt
+0
-0
ooxmlexport.cxx
sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+12
-0
docxattributeoutput.cxx
sw/source/filter/ww8/docxattributeoutput.cxx
+40
-0
docxattributeoutput.hxx
sw/source/filter/ww8/docxattributeoutput.hxx
+1
-0
No files found.
sw/qa/extras/ooxmlexport/data/n822175.odt
0 → 100644
Dosyayı görüntüle @
3a87ba97
File added
sw/qa/extras/ooxmlexport/ooxmlexport.cxx
Dosyayı görüntüle @
3a87ba97
...
...
@@ -29,6 +29,7 @@
#include <com/sun/star/awt/FontUnderline.hpp>
#include <com/sun/star/awt/FontSlant.hpp>
#include <com/sun/star/text/WritingMode2.hpp>
#include <com/sun/star/text/WrapTextMode.hpp>
#include <unotools/tempfile.hxx>
#include <unotools/ucbstreamhelper.hxx>
...
...
@@ -87,6 +88,7 @@ public:
void
testFdo56679
();
void
testFdo65400
();
void
testFdo66543
();
void
testN822175
();
CPPUNIT_TEST_SUITE
(
Test
);
#if !defined(MACOSX) && !defined(WNT)
...
...
@@ -147,6 +149,7 @@ void Test::run()
{
"fdo56679.docx"
,
&
Test
::
testFdo56679
},
{
"fdo65400.docx"
,
&
Test
::
testFdo65400
},
{
"fdo66543.docx"
,
&
Test
::
testFdo66543
},
{
"n822175.odt"
,
&
Test
::
testN822175
},
};
// Don't test the first import of these, for some reason those tests fail
const
char
*
aBlacklist
[]
=
{
...
...
@@ -890,6 +893,15 @@ void Test::testFdo66543()
CPPUNIT_ASSERT_EQUAL
(
sal_Int32
(
1
),
getProperty
<
sal_Int32
>
(
paragraph1
,
"ParaLineNumberStartValue"
));
}
void
Test
::
testN822175
()
{
uno
::
Reference
<
drawing
::
XDrawPageSupplier
>
xDrawPageSupplier
(
mxComponent
,
uno
::
UNO_QUERY
);
uno
::
Reference
<
container
::
XIndexAccess
>
xDraws
(
xDrawPageSupplier
->
getDrawPage
(),
uno
::
UNO_QUERY
);
uno
::
Reference
<
beans
::
XPropertySet
>
xFrame
(
xDraws
->
getByIndex
(
0
),
uno
::
UNO_QUERY
);
// Was text::WrapTextMode_THROUGH, due to missing Surround handling in the exporter.
CPPUNIT_ASSERT_EQUAL
(
text
::
WrapTextMode_PARALLEL
,
getProperty
<
text
::
WrapTextMode
>
(
xFrame
,
"Surround"
));
}
CPPUNIT_TEST_SUITE_REGISTRATION
(
Test
);
CPPUNIT_PLUGIN_IMPLEMENT
();
...
...
sw/source/filter/ww8/docxattributeoutput.cxx
Dosyayı görüntüle @
3a87ba97
...
...
@@ -340,6 +340,14 @@ void DocxAttributeOutput::EndParagraph( ww8::WW8TableNodeInfoInner::Pointer_t pT
m_rExport
.
WriteText
(
);
m_pSerializer
->
endElementNS
(
XML_w
,
XML_txbxContent
);
m_pSerializer
->
endElementNS
(
XML_v
,
XML_textbox
);
if
(
m_pFlyWrapAttrList
)
{
XFastAttributeListRef
xFlyWrapAttrList
(
m_pFlyWrapAttrList
);
m_pFlyWrapAttrList
=
NULL
;
m_pSerializer
->
singleElementNS
(
XML_w10
,
XML_wrap
,
xFlyWrapAttrList
);
}
m_pSerializer
->
endElementNS
(
XML_v
,
XML_rect
);
m_pSerializer
->
endElementNS
(
XML_w
,
XML_pict
);
m_pSerializer
->
endElementNS
(
XML_w
,
XML_r
);
...
...
@@ -4658,6 +4666,37 @@ void DocxAttributeOutput::FormatSurround( const SwFmtSurround& rSurround )
{
if
(
m_bTextFrameSyntax
)
{
OString
sType
,
sSide
;
switch
(
rSurround
.
GetSurround
())
{
case
SURROUND_NONE
:
sType
=
"topAndBottom"
;
break
;
case
SURROUND_PARALLEL
:
sType
=
"square"
;
break
;
case
SURROUND_IDEAL
:
sType
=
"square"
;
sSide
=
"largest"
;
case
SURROUND_LEFT
:
sType
=
"square"
;
sSide
=
"left"
;
case
SURROUND_RIGHT
:
sType
=
"square"
;
sSide
=
"right"
;
break
;
case
SURROUND_THROUGHT
:
default
:
break
;
}
if
(
!
sType
.
isEmpty
()
||
!
sSide
.
isEmpty
())
{
m_pFlyWrapAttrList
=
m_pSerializer
->
createAttrList
();
if
(
!
sType
.
isEmpty
())
m_pFlyWrapAttrList
->
add
(
XML_type
,
sType
);
if
(
!
sSide
.
isEmpty
())
m_pFlyWrapAttrList
->
add
(
XML_side
,
sSide
);
}
}
else
if
(
m_rExport
.
bOutFlyFrmAttrs
)
{
...
...
@@ -5055,6 +5094,7 @@ DocxAttributeOutput::DocxAttributeOutput( DocxExport &rExport, FSHelperPtr pSeri
m_pHyperlinkAttrList
(
NULL
),
m_pFlyAttrList
(
NULL
),
m_pFlyFillAttrList
(
NULL
),
m_pFlyWrapAttrList
(
NULL
),
m_pTextboxAttrList
(
NULL
),
m_pFlyFrameSize
(
0
),
m_pFootnotesList
(
new
::
docx
::
FootnotesList
()
),
...
...
sw/source/filter/ww8/docxattributeoutput.hxx
Dosyayı görüntüle @
3a87ba97
...
...
@@ -586,6 +586,7 @@ private:
::
sax_fastparser
::
FastAttributeList
*
m_pHyperlinkAttrList
;
::
sax_fastparser
::
FastAttributeList
*
m_pFlyAttrList
;
::
sax_fastparser
::
FastAttributeList
*
m_pFlyFillAttrList
;
::
sax_fastparser
::
FastAttributeList
*
m_pFlyWrapAttrList
;
/// Attributes of the next v:textbox element.
::
sax_fastparser
::
FastAttributeList
*
m_pTextboxAttrList
;
/// When exporting fly frames, this holds the real size of the frame.
...
...
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