[Libreoffice-commits] .: writerfilter/source
Cédric Bosdonnat
cbosdo at kemper.freedesktop.org
Mon Dec 6 01:39:27 PST 2010
writerfilter/source/dmapper/DomainMapper.cxx | 20 ----------------
writerfilter/source/dmapper/DomainMapper_Impl.cxx | 26 ----------------------
writerfilter/source/dmapper/DomainMapper_Impl.hxx | 2 -
writerfilter/source/dmapper/PropertyMap.cxx | 23 ++-----------------
writerfilter/source/dmapper/PropertyMap.hxx | 3 --
writerfilter/source/dmapper/StyleSheetTable.cxx | 14 -----------
writerfilter/source/dmapper/StyleSheetTable.hxx | 2 -
7 files changed, 4 insertions(+), 86 deletions(-)
New commits:
commit 0d290be139e677650e3742fd95e926c60849ee01
Author: Cédric Bosdonnat <cedricbosdo at openoffice.org>
Date: Mon Dec 6 10:33:29 2010 +0100
ISO OOXML: start/end attributes reworked...
This reverts commit 344cf018285a149289ecc9af600fce6a743b01c8.
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index a5c7c84..6f7e6d5 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -1319,30 +1319,12 @@ void DomainMapper::attribute(Id nName, Value & val)
}
break;
case NS_ooxml::LN_CT_Ind_start:
- if (m_pImpl->GetTopContext())
- {
- PropertyIds eId = PROP_PARA_LEFT_MARGIN;
- if ( m_pImpl->IsRTL() )
- eId = PROP_PARA_RIGHT_MARGIN;
- m_pImpl->GetTopContext()->Insert(
- eId, true, uno::makeAny( ConversionHelper::convertTwipToMM100(nIntValue ) ));
- }
- break;
- case NS_ooxml::LN_CT_Ind_end:
- if (m_pImpl->GetTopContext())
- {
- PropertyIds eId = PROP_PARA_RIGHT_MARGIN;
- if ( m_pImpl->IsRTL() )
- eId = PROP_PARA_LEFT_MARGIN;
- m_pImpl->GetTopContext()->Insert(
- eId, true, uno::makeAny( ConversionHelper::convertTwipToMM100(nIntValue ) ));
- }
- break;
case NS_ooxml::LN_CT_Ind_left:
if (m_pImpl->GetTopContext())
m_pImpl->GetTopContext()->Insert(
PROP_PARA_LEFT_MARGIN, true, uno::makeAny( ConversionHelper::convertTwipToMM100(nIntValue ) ));
break;
+ case NS_ooxml::LN_CT_Ind_end:
case NS_ooxml::LN_CT_Ind_right:
if (m_pImpl->GetTopContext())
m_pImpl->GetTopContext()->Insert(
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 3c34b03..54ca809 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -891,32 +891,6 @@ void DomainMapper_Impl::finishParagraph( PropertyMapPtr pPropertyMap )
dmapper_logger->endElement("finishParagraph");
#endif
}
-
-bool DomainMapper_Impl::IsRTL( )
-{
- bool bRtl = false;
- bool bSet = false;
- if ( GetTopContext() )
- bRtl = GetTopContext()->IsRTL( bSet );
-
- PropertyMapPtr pParaContext = GetTopContextOfType( CONTEXT_PARAGRAPH );
- if ( !bSet && pParaContext )
- {
- ParagraphPropertyMap* pParaProps = static_cast< ParagraphPropertyMap* >( pParaContext.get() );
- rtl::OUString sStyleName = pParaProps->GetParaStyleName( );
- bRtl = m_pStyleSheetTable->IsRTL( sStyleName, bSet );
- }
-
- PropertyMapPtr pSectionContext = GetTopContextOfType( CONTEXT_SECTION );
- if ( !bSet && pSectionContext )
- {
- SectionPropertyMap* pSectionProps = static_cast< SectionPropertyMap* >( pSectionContext.get() );
- bRtl = pSectionProps->GetSFBiDi();
- }
-
- return bRtl;
-}
-
/*-------------------------------------------------------------------------
-----------------------------------------------------------------------*/
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
index fdcbce2..39d3e7f 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
@@ -598,8 +598,6 @@ public:
void ApplySettingsTable();
SectionPropertyMap * GetSectionContext();
-
- bool IsRTL();
};
} //namespace dmapper
} //namespace writerfilter
diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx
index f012e76..bb4cb35 100644
--- a/writerfilter/source/dmapper/PropertyMap.cxx
+++ b/writerfilter/source/dmapper/PropertyMap.cxx
@@ -38,7 +38,7 @@
#include <com/sun/star/container/XNameContainer.hpp>
#include <com/sun/star/style/BreakType.hpp>
#include <com/sun/star/text/RelOrientation.hpp>
-#include <com/sun/star/text/WritingMode2.hpp>
+#include <com/sun/star/text/WritingMode.hpp>
#include <com/sun/star/text/XTextColumns.hpp>
#include <com/sun/star/text/XText.hpp>
#include <com/sun/star/text/TextGridMode.hpp>
@@ -133,23 +133,6 @@ void PropertyMap::Insert( PropertyIds eId, bool bIsTextProperty, const uno::Any&
Invalidate();
}
-bool PropertyMap::IsRTL( bool& bSet )
-{
- bool bRtl = false;
- bSet = false;
-
- PropertyMap::iterator aIt = find( PropertyDefinition( PROP_WRITING_MODE, true ) );
- if( aIt != end( ) )
- {
- sal_Int16 nValue(0);
- aIt->second >>= nValue;
- bRtl = ( nValue == text::WritingMode2::RL_TB );
- bSet = true;
- }
-
- return bRtl;
-}
-
#ifdef DEBUG_DOMAINMAPPER
XMLTag::Pointer_t PropertyMap::toTag() const
{
@@ -893,14 +876,14 @@ void SectionPropertyMap::CloseSectionGroup( DomainMapper_Impl& rDM_Impl )
if( aElement != end())
aElement->second >>= nWidth;
- sal_Int32 eWritingMode = text::WritingMode2::LR_TB;
+ text::WritingMode eWritingMode = text::WritingMode_LR_TB;
aElement = find(PropertyDefinition( PROP_WRITING_MODE, false ));
if( aElement != end())
aElement->second >>= eWritingMode;
- sal_Int32 nTextAreaHeight = eWritingMode == text::WritingMode2::LR_TB ?
+ sal_Int32 nTextAreaHeight = eWritingMode == text::WritingMode_LR_TB ?
nHeight - m_nTopMargin - m_nBottomMargin :
nWidth - m_nLeftMargin - m_nRightMargin;
diff --git a/writerfilter/source/dmapper/PropertyMap.hxx b/writerfilter/source/dmapper/PropertyMap.hxx
index e77078b..e95f8dc 100644
--- a/writerfilter/source/dmapper/PropertyMap.hxx
+++ b/writerfilter/source/dmapper/PropertyMap.hxx
@@ -135,8 +135,6 @@ public:
virtual void insertTableProperties( const PropertyMap* );
- virtual bool IsRTL( bool& bSet );
-
#ifdef DEBUG_DOMAINMAPPER
virtual XMLTag::Pointer_t toTag() const;
#endif
@@ -267,7 +265,6 @@ public:
void SetGutterRTL( bool bSet ) { m_bGutterRTL = bSet;}
void SetDzaGutter( sal_Int32 nSet ) {m_nDzaGutter = nSet; }
void SetSFBiDi( bool bSet ) { m_bSFBiDi = bSet;}
- bool GetSFBiDi( ) { return m_bSFBiDi;}
void SetGridType(sal_Int32 nSet) { m_nGridType = nSet; }
void SetGridLinePitch( sal_Int32 nSet ) { m_nGridLinePitch = nSet; }
diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx
index b2e45ab..369e186 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.cxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.cxx
@@ -1408,20 +1408,6 @@ void StyleSheetTable::applyDefaults(bool bParaProperties)
return sListLabel;
}
-bool StyleSheetTable::IsRTL( rtl::OUString sStyleName, bool& bSet )
-{
- bool bRtl = false;
- bSet = false;
- StyleSheetEntryPtr pStyle = FindStyleSheetByStyleName( sStyleName );
- bRtl = pStyle->pProperties->IsRTL( bSet );
-
- StyleSheetEntryPtr pBaseStyle = FindStyleSheetByISTD( pStyle->sBaseStyleIdentifier );
- if ( !bSet && pBaseStyle )
- bRtl = IsRTL( pBaseStyle->sStyleName, bSet );
-
- return bRtl;
-}
-
}//namespace dmapper
}//namespace writerfilter
diff --git a/writerfilter/source/dmapper/StyleSheetTable.hxx b/writerfilter/source/dmapper/StyleSheetTable.hxx
index d5868e3..d474cf5 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.hxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.hxx
@@ -118,8 +118,6 @@ public:
::rtl::OUString getOrCreateCharStyle( PropertyValueVector_t& rCharProperties );
- bool IsRTL( rtl::OUString sStyleName, bool& bSet );
-
private:
void resolveAttributeProperties(Value & val);
void resolveSprmProps(Sprm & sprm_);
More information about the Libreoffice-commits
mailing list