[Libreoffice-commits] .: 2 commits - sw/source
Miklos Vajna
vmiklos at kemper.freedesktop.org
Tue Jun 26 08:55:25 PDT 2012
sw/source/filter/ww8/rtfattributeoutput.cxx | 7 +++++--
sw/source/filter/ww8/rtfattributeoutput.hxx | 2 ++
sw/source/filter/ww8/rtfexport.cxx | 2 +-
3 files changed, 8 insertions(+), 3 deletions(-)
New commits:
commit 9ad4c4835614fe1c1cf82a9cf02d3069fd8bff2a
Author: Miklos Vajna <vmiklos at suse.cz>
Date: Tue Jun 26 16:52:04 2012 +0200
fdo#48335 don't export zoom factor when zoom type is not percent
Change-Id: I1fb7e3d9d65f2f3388bb4851f5ad517ed1681f04
diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx
index b50fd3e..f816eb1 100644
--- a/sw/source/filter/ww8/rtfexport.cxx
+++ b/sw/source/filter/ww8/rtfexport.cxx
@@ -506,7 +506,7 @@ void RtfExport::ExportDocument_Impl()
Strm() << m_pAttrOutput->m_aTabStop.makeStringAndClear().getStr() << sNewLine;
// Zoom
ViewShell *pViewShell(pDoc->GetCurrentViewShell());
- if (pViewShell)
+ if (pViewShell && pViewShell->GetViewOptions()->GetZoomType() == SVX_ZOOM_PERCENT)
{
Strm() << OOO_STRING_SVTOOLS_RTF_VIEWSCALE;
OutULong(pViewShell->GetViewOptions()->GetZoom());
commit 5d505e5b1edee7f709e4baff70a971cb3fe851c2
Author: Miklos Vajna <vmiklos at suse.cz>
Date: Tue Jun 26 16:39:17 2012 +0200
fdo#48335 RTF export: don't try to end not started runs
Change-Id: I022556acd0891cf24963d667d34f366496453630
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 3bb8b60..6810950 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -383,6 +383,7 @@ void RtfAttributeOutput::StartRun( const SwRedlineData* pRedlineData, bool bSing
{
SAL_INFO("sw.rtf", OSL_THIS_FUNC);
+ m_bInRun = true;
m_bSingleEmptyRun = bSingleEmptyRun;
if (!m_bSingleEmptyRun)
m_aRun->append('{');
@@ -398,8 +399,9 @@ void RtfAttributeOutput::EndRun()
SAL_INFO("sw.rtf", OSL_THIS_FUNC);
m_aRun->append(m_rExport.sNewLine);
m_aRun.appendAndClear(m_aRunText);
- if (!m_bSingleEmptyRun)
+ if (!m_bSingleEmptyRun && m_bInRun)
m_aRun->append('}');
+ m_bInRun = false;
}
void RtfAttributeOutput::StartRunProperties()
@@ -3028,7 +3030,8 @@ RtfAttributeOutput::RtfAttributeOutput( RtfExport &rExport )
m_bHadFieldResult( false ),
m_bTableRowEnded( false ),
m_aCells(),
- m_bSingleEmptyRun(false)
+ m_bSingleEmptyRun(false),
+ m_bInRun(false)
{
SAL_INFO("sw.rtf", OSL_THIS_FUNC);
}
diff --git a/sw/source/filter/ww8/rtfattributeoutput.hxx b/sw/source/filter/ww8/rtfattributeoutput.hxx
index a6430f1..56c31b6 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.hxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.hxx
@@ -543,6 +543,8 @@ private:
/// If we're in a paragraph that has a single empty run only.
bool m_bSingleEmptyRun;
+
+ bool m_bInRun;
public:
RtfAttributeOutput( RtfExport &rExport );
More information about the Libreoffice-commits
mailing list