[Libreoffice-commits] core.git: writerfilter/source
Jian Fang Zhang
zhangjf at apache.org
Sun Jun 2 15:53:16 PDT 2013
writerfilter/source/dmapper/DomainMapper.cxx | 15 +++++++++++----
writerfilter/source/dmapper/DomainMapper_Impl.cxx | 4 ++++
writerfilter/source/dmapper/DomainMapper_Impl.hxx | 4 ++++
3 files changed, 19 insertions(+), 4 deletions(-)
New commits:
commit 5f0c969f43538e8a92ed37c27fab228d97b1bebe
Author: Jian Fang Zhang <zhangjf at apache.org>
Date: Tue Sep 4 07:11:49 2012 +0000
Related: #i119607#, text font spacing in comments doesn't expand/condense...
by the expected value
Found by: xiao ting xiao, tingxiaox at gmail.com
Patch by: bjcheny, companycy at gmail.com
Review by: zhangjf
(cherry picked from commit 11fda1bd134b07c5bcaca6186d63107ec9f47b98)
Conflicts:
writerfilter/source/dmapper/DomainMapper.cxx
writerfilter/source/dmapper/DomainMapper_Impl.cxx
writerfilter/source/dmapper/DomainMapper_Impl.hxx
Change-Id: Iecdaee97e49395df59719d724e1544e1802d947d
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index 47c332b..f611bda 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -2216,10 +2216,17 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType
case 71 : //"sprmCDxaSpace"
case 96 : //"sprmCDxaSpace"
case NS_sprm::LN_CDxaSpace: // sprmCDxaSpace
- //Kerning half point values
- //TODO: there are two kerning values -
- // in ww8par6.cxx NS_sprm::LN_CHpsKern is used as boolean AutoKerning
- rContext->Insert(PROP_CHAR_CHAR_KERNING, true, uno::makeAny( sal_Int16(ConversionHelper::convertTwipToMM100(sal_Int16(nIntValue))) ) );
+ {
+ //Kerning half point values
+ //TODO: there are two kerning values -
+ // in ww8par6.cxx NS_sprm::LN_CHpsKern is used as boolean AutoKerning
+ sal_Int16 nResult = static_cast<sal_Int16>(ConversionHelper::convertTwipToMM100(nIntValue));
+ if (m_pImpl->IsInComments())
+ {
+ nResult = static_cast<sal_Int16>(nIntValue);
+ }
+ rContext->Insert(PROP_CHAR_CHAR_KERNING, true, uno::makeAny(nResult));
+ }
break;
case NS_sprm::LN_CHpsKern: // sprmCHpsKern auto kerning is bound to a minimum font size in Word - but not in Writer :-(
rContext->Insert(PROP_CHAR_AUTO_KERNING, true, uno::makeAny( sal_Bool(nIntValue) ) );
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index adf5870..fbc633d 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -182,6 +182,7 @@ DomainMapper_Impl::DomainMapper_Impl(
m_bParaChanged( false ),
m_bIsFirstParaInSection( true ),
m_bIsLastParaInSection( false ),
+ m_bIsInComments( false ),
m_bParaSectpr( false ),
m_bUsingEnhancedFields( false ),
m_bSdt(false),
@@ -189,6 +190,7 @@ DomainMapper_Impl::DomainMapper_Impl(
m_bIsNewDoc(bIsNewDoc),
m_bInTableStyleRunProps(false),
m_pSdtHelper(0)
+
{
appendTableManager( );
GetBodyText();
@@ -1571,6 +1573,7 @@ void DomainMapper_Impl::PushAnnotation()
try
{
PropertyMapPtr pTopContext = GetTopContext();
+ m_bIsInComments = true;
if (!GetTextFactory().is())
return;
m_xAnnotationField = uno::Reference< beans::XPropertySet >( GetTextFactory()->createInstance(
@@ -1600,6 +1603,7 @@ void DomainMapper_Impl::PopAnnotation()
{
RemoveLastParagraph();
+ m_bIsInComments = false;
m_aTextAppendStack.pop();
try
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
index fba658a..dc7f2dd 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
@@ -363,6 +363,7 @@ private:
bool m_bParaChanged;
bool m_bIsFirstParaInSection;
bool m_bIsLastParaInSection;
+ bool m_bIsInComments;
/// If the current paragraph contains section property definitions.
bool m_bParaSectpr;
bool m_bUsingEnhancedFields;
@@ -634,7 +635,10 @@ public:
void SetCustomFtnMark(bool bSet) { m_bIsCustomFtnMark = bSet; }
bool IsCustomFtnMark() const { return m_bIsCustomFtnMark; }
+ bool IsInComments() const { return m_bIsInComments; };
+
void CheckUnregisteredFrameConversion( );
+
void RegisterFrameConversion(
::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > xFrameStartRange,
::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > xFrameEndRange,
More information about the Libreoffice-commits
mailing list