[Libreoffice-commits] .: Branch 'libreoffice-3-5' - 2 commits - sw/source writerfilter/source
Andras Timar
timar at kemper.freedesktop.org
Mon May 14 04:54:08 PDT 2012
sw/source/filter/ww8/rtfattributeoutput.cxx | 6 +++---
writerfilter/source/rtftok/rtfvalue.cxx | 6 +++---
writerfilter/source/rtftok/rtfvalue.hxx | 2 +-
3 files changed, 7 insertions(+), 7 deletions(-)
New commits:
commit ce37510deacf309311362a93913dfcbd7b0853c2
Author: Miklos Vajna <vmiklos at suse.cz>
Date: Thu May 10 10:35:47 2012 +0200
fdo#49692 RTFValue::Clone(): copy m_bForceString as well
Change-Id: Ib8f06ff33fd9c01ea4a1e47c97cfa12f2ced7318
Signed-off-by: Andras Timar <atimar at suse.com>
diff --git a/writerfilter/source/rtftok/rtfvalue.cxx b/writerfilter/source/rtftok/rtfvalue.cxx
index 1d1017d..7a1aec6 100644
--- a/writerfilter/source/rtftok/rtfvalue.cxx
+++ b/writerfilter/source/rtftok/rtfvalue.cxx
@@ -35,12 +35,12 @@ using rtl::OUString;
RTFValue::RTFValue(int nValue, rtl::OUString sValue, RTFSprms rAttributes,
RTFSprms rSprms, uno::Reference<drawing::XShape> rShape,
- uno::Reference<io::XInputStream> rStream)
+ uno::Reference<io::XInputStream> rStream, bool bForceString)
: m_nValue(nValue),
m_sValue(sValue),
m_rShape(rShape),
m_rStream(rStream),
- m_bForceString(false)
+ m_bForceString(bForceString)
{
m_pAttributes.reset(new RTFSprms(rAttributes));
m_pSprms.reset(new RTFSprms(rSprms));
@@ -176,7 +176,7 @@ std::string RTFValue::toString() const
RTFValue* RTFValue::Clone()
{
- return new RTFValue(m_nValue, m_sValue, *m_pAttributes, *m_pSprms, m_rShape, m_rStream);
+ return new RTFValue(m_nValue, m_sValue, *m_pAttributes, *m_pSprms, m_rShape, m_rStream, m_bForceString);
}
RTFSprms& RTFValue::getAttributes()
diff --git a/writerfilter/source/rtftok/rtfvalue.hxx b/writerfilter/source/rtftok/rtfvalue.hxx
index 7918428..5a5ff8c 100644
--- a/writerfilter/source/rtftok/rtfvalue.hxx
+++ b/writerfilter/source/rtftok/rtfvalue.hxx
@@ -41,7 +41,7 @@ namespace writerfilter {
public:
typedef boost::shared_ptr<RTFValue> Pointer_t;
RTFValue(int nValue, rtl::OUString sValue, RTFSprms rAttributes, RTFSprms rSprms, uno::Reference<drawing::XShape> rShape,
- uno::Reference<io::XInputStream> rStream);
+ uno::Reference<io::XInputStream> rStream, bool bForceString);
RTFValue(int nValue);
RTFValue(rtl::OUString sValue, bool bForce = false);
RTFValue(RTFSprms rAttributes);
commit 45884d2a1378b46ab20abe92c2498bfed09cf58e
Author: Miklos Vajna <vmiklos at suse.cz>
Date: Thu May 10 11:50:39 2012 +0200
fdo#49692 fix RTF export of empty paragraph numbering rules
When there is a numbering rule, the fallback text is constructed so that
whitespace separates the numbering and the paragraph text. When the
numbering is empty, we don't need that separator.
Change-Id: I17a11ddd73addc8c95a0c2b54402e6dd2705d094
Signed-off-by: Andras Timar <atimar at suse.com>
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index e66d5be..4beb0df 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -2511,10 +2511,9 @@ void RtfAttributeOutput::ParaNumRule_Impl( const SwTxtNode* pTxtNd, sal_Int32 nL
else
sTxt = pTxtNd->GetNumString();
- m_aStyles.append(' ');
-
if (sTxt.Len())
{
+ m_aStyles.append(' ');
m_aStyles.append(m_rExport.OutString(sTxt, m_rExport.eDefaultEncoding));
}
@@ -2522,7 +2521,8 @@ void RtfAttributeOutput::ParaNumRule_Impl( const SwTxtNode* pTxtNd, sal_Int32 nL
{
if( OUTLINE_RULE != pRule->GetRuleType() )
{
- m_aStyles.append(OOO_STRING_SVTOOLS_RTF_TAB);
+ if (sTxt.Len())
+ m_aStyles.append(OOO_STRING_SVTOOLS_RTF_TAB);
m_aStyles.append('}');
m_aStyles.append(OOO_STRING_SVTOOLS_RTF_ILVL);
if( nLvl > 8 ) // RTF knows only 9 levels
More information about the Libreoffice-commits
mailing list