summaryrefslogtreecommitdiff
path: root/sw/source/filter/ww8
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2013-03-27 10:58:53 +0100
committerLuboš Luňák <l.lunak@suse.cz>2013-03-29 14:26:33 +0000
commitc7ea9ac9d5f572b647f7e83ce9ae109b773052ba (patch)
treee9350a9719bf747464cb8ae44c2cdbeacde72035 /sw/source/filter/ww8
parent2511a06b5eaf831193936177a708b283849fdbcf (diff)
fdo#30983 RTF filter: fix handling of RTF_PVPG and RTF_PHPG
There were two issues here: 1) The export filter never exported these keywords. 2) The "flymaincnt" RTF extension we inherited from OOo actually never worked (i.e. it's like this since 7b0b5cdf, the initial import...), as RTFVertOrient / RTFHoriOrient's second parameter was stored in 1 bit, so text::RelOrientation::PAGE_FRAME (7) was read back as 1 instead. Note that I want to get rid of this flymaincnt extension in the exporter anyway soon, so killing the RTFVertOrient / RTFHoriOrient duplication is pointless: the sw version will go away. (cherry picked from commit b4845db4260db70cb3aaf03758cb4a1ca5fa88ed) Change-Id: I5335567833ecf87e6b0ba7c73150a7b95c57f237 Reviewed-on: https://gerrit.libreoffice.org/3081 Reviewed-by: Luboš Luňák <l.lunak@suse.cz> Tested-by: Luboš Luňák <l.lunak@suse.cz>
Diffstat (limited to 'sw/source/filter/ww8')
-rw-r--r--sw/source/filter/ww8/rtfattributeoutput.cxx20
1 files changed, 18 insertions, 2 deletions
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 36dc481e9038..33032b1905c2 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -2770,7 +2770,15 @@ void RtfAttributeOutput::FormatVertOrientation( const SwFmtVertOrient& rFlyVert
if ( m_rExport.bOutFlyFrmAttrs && m_rExport.bRTFFlySyntax )
{
- m_aRunText->append(OOO_STRING_SVTOOLS_RTF_PVPARA);
+ switch (rFlyVert.GetRelationOrient())
+ {
+ case text::RelOrientation::PAGE_FRAME:
+ m_aRunText->append(OOO_STRING_SVTOOLS_RTF_PVPG);
+ break;
+ default:
+ m_aRunText->append(OOO_STRING_SVTOOLS_RTF_PVPARA);
+ break;
+ }
switch (rFlyVert.GetVertOrient())
{
@@ -2808,7 +2816,15 @@ void RtfAttributeOutput::FormatHorizOrientation( const SwFmtHoriOrient& rFlyHori
if ( m_rExport.bOutFlyFrmAttrs && m_rExport.bRTFFlySyntax )
{
- m_aRunText->append(OOO_STRING_SVTOOLS_RTF_PHCOL);
+ switch (rFlyHori.GetRelationOrient())
+ {
+ case text::RelOrientation::PAGE_FRAME:
+ m_aRunText->append(OOO_STRING_SVTOOLS_RTF_PHPG);
+ break;
+ default:
+ m_aRunText->append(OOO_STRING_SVTOOLS_RTF_PHCOL);
+ break;
+ }
const char* pS = 0;
switch(rFlyHori.GetHoriOrient())