Kaydet (Commit) f02abd71 authored tarafından Adam Co's avatar Adam Co Kaydeden (comit) Miklos Vajna

Changed 'Para Change' to 'Para Marker Change' in DOCX importer

This cosmetic change in function names is in order to better reflect
the purpose of these functions and variables.
They do NOT represent a change in the paragraph itself.

Change-Id: I8792ef5b43453d16ce5238906593ca2d5ac87a29
Reviewed-on: https://gerrit.libreoffice.org/6991Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
Tested-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
üst 0aab035d
......@@ -3453,7 +3453,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType
}
break;
case NS_ooxml::LN_paratrackchange:
m_pImpl->StartParaChange( );
m_pImpl->StartParaMarkerChange( );
case NS_ooxml::LN_trackchange:
case NS_ooxml::LN_EG_RPrContent_rPrChange:
{
......@@ -3465,10 +3465,11 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType
{
case ooxml::OOXML_mod :
case ooxml::OOXML_ins :
case ooxml::OOXML_del : break;
case ooxml::OOXML_del :
break;
default: OSL_FAIL( "redline token other than mod, ins or del" );
}
m_pImpl->EndParaChange( );
m_pImpl->EndParaMarkerChange( );
}
break;
case NS_ooxml::LN_endtrackchange:
......
......@@ -162,7 +162,7 @@ DomainMapper_Impl::DomainMapper_Impl(
m_bLineNumberingSet( false ),
m_bIsInFootnoteProperties( false ),
m_bIsCustomFtnMark( false ),
m_bIsParaChange( false ),
m_bIsParaMarkerChange( false ),
m_bParaChanged( false ),
m_bIsFirstParaInSection( true ),
m_bIsLastParaInSection( false ),
......@@ -1136,7 +1136,7 @@ void DomainMapper_Impl::finishParagraph( PropertyMapPtr pPropertyMap )
xCur->gotoEnd( false );
xCur->goLeft( 1 , true );
uno::Reference< text::XTextRange > xParaEnd( xCur, uno::UNO_QUERY );
CheckParaRedline( xParaEnd );
CheckParaMarkerRedline( xParaEnd );
m_bIsFirstParaInSection = false;
m_bIsLastParaInSection = false;
......@@ -1584,12 +1584,12 @@ void DomainMapper_Impl::CreateRedline( uno::Reference< text::XTextRange > xRange
}
}
void DomainMapper_Impl::CheckParaRedline( uno::Reference< text::XTextRange > xRange )
void DomainMapper_Impl::CheckParaMarkerRedline( uno::Reference< text::XTextRange > xRange )
{
if ( m_pParaRedline.get( ) )
if ( m_pParaMarkerRedline.get( ) )
{
CreateRedline( xRange, m_pParaRedline );
ResetParaRedline( );
CreateRedline( xRange, m_pParaMarkerRedline );
ResetParaMarkerRedline( );
}
}
......@@ -1611,14 +1611,14 @@ void DomainMapper_Impl::CheckRedline( uno::Reference< text::XTextRange > xRange
m_aRedlines.top().swap( aCleaned );
}
void DomainMapper_Impl::StartParaChange( )
void DomainMapper_Impl::StartParaMarkerChange( )
{
m_bIsParaChange = true;
m_bIsParaMarkerChange = true;
}
void DomainMapper_Impl::EndParaChange( )
void DomainMapper_Impl::EndParaMarkerChange( )
{
m_bIsParaChange = false;
m_bIsParaMarkerChange = false;
}
......@@ -3863,23 +3863,23 @@ void DomainMapper_Impl::AddNewRedline( )
{
RedlineParamsPtr pNew( new RedlineParams );
pNew->m_nToken = ooxml::OOXML_mod;
if ( !m_bIsParaChange )
if ( !m_bIsParaMarkerChange )
{
m_aRedlines.top().push_back( pNew );
}
else
{
m_pParaRedline.swap( pNew );
m_pParaMarkerRedline.swap( pNew );
}
}
RedlineParamsPtr DomainMapper_Impl::GetTopRedline( )
{
RedlineParamsPtr pResult;
if ( !m_bIsParaChange && m_aRedlines.top().size( ) > 0 )
if ( !m_bIsParaMarkerChange && m_aRedlines.top().size( ) > 0 )
pResult = m_aRedlines.top().back( );
else if ( m_bIsParaChange )
pResult = m_pParaRedline;
else if ( m_bIsParaMarkerChange )
pResult = m_pParaMarkerRedline;
return pResult;
}
......@@ -3952,12 +3952,12 @@ void DomainMapper_Impl::RemoveCurrentRedline( )
}
}
void DomainMapper_Impl::ResetParaRedline( )
void DomainMapper_Impl::ResetParaMarkerRedline( )
{
if ( m_pParaRedline.get( ) )
if ( m_pParaMarkerRedline.get( ) )
{
RedlineParamsPtr pEmpty;
m_pParaRedline.swap( pEmpty );
m_pParaMarkerRedline.swap( pEmpty );
}
}
......
......@@ -377,8 +377,8 @@ private:
// Redline stack
std::stack< std::vector< RedlineParamsPtr > > m_aRedlines;
RedlineParamsPtr m_pParaRedline;
bool m_bIsParaChange;
RedlineParamsPtr m_pParaMarkerRedline;
bool m_bIsParaMarkerChange;
/// If the current paragraph has any runs.
bool m_bParaChanged;
......@@ -445,12 +445,12 @@ public:
void CreateRedline( ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > xRange, RedlineParamsPtr& pRedline );
void CheckParaRedline( ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > xRange );
void CheckParaMarkerRedline( ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > xRange );
void CheckRedline( ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > xRange );
void StartParaChange( );
void EndParaChange( );
void StartParaMarkerChange( );
void EndParaMarkerChange( );
void RemoveLastParagraph( );
void SetIsLastParagraphInSection( bool bIsLast );
......@@ -680,7 +680,7 @@ public:
void SetCurrentRedlineToken( sal_Int32 nToken );
void SetCurrentRedlineRevertProperties( uno::Sequence<beans::PropertyValue> aProperties );
void RemoveCurrentRedline( );
void ResetParaRedline( );
void ResetParaMarkerRedline( );
void SetCurrentRedlineInitials( OUString sInitials );
bool IsFirstRun() { return m_bIsFirstRun;}
void SetIsFirstRun(bool bval) { m_bIsFirstRun = bval;}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment