[Libreoffice-commits] core.git: sw/source
Miklos Vajna
vmiklos at collabora.co.uk
Thu Nov 27 12:07:15 PST 2014
sw/source/filter/ww8/wrtw8sty.cxx | 78 +++++++++++++++++++-------------------
1 file changed, 39 insertions(+), 39 deletions(-)
New commits:
commit b97600ff196f620145d0b56dbb589238bc6a9cbd
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Thu Nov 27 20:26:04 2014 +0100
WW8_WrPlcSubDoc::WriteGenericTxt: fix missing indentation
Change-Id: I21e47d004e011c706a1e7e591f9204beb9b6f70f
diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx
index 7593e99..cd6b3e9 100644
--- a/sw/source/filter/ww8/wrtw8sty.cxx
+++ b/sw/source/filter/ww8/wrtw8sty.cxx
@@ -2158,53 +2158,53 @@ bool WW8_WrPlcSubDoc::WriteGenericTxt( WW8Export& rWrt, sal_uInt8 nTTyp,
if( aCntnt[ i ] != NULL )
{
- // is it an writer or sdr - textbox?
- const SdrObject& rObj = *(SdrObject*)aCntnt[ i ];
- if (rObj.GetObjInventor() == FmFormInventor)
- {
- sal_uInt8 nOldTyp = rWrt.nTxtTyp;
- rWrt.nTxtTyp = nTTyp;
- rWrt.GetOCXExp().ExportControl(rWrt,&rObj);
- rWrt.nTxtTyp = nOldTyp;
- }
- else if( rObj.ISA( SdrTextObj ) )
- rWrt.WriteSdrTextObj(rObj, nTTyp);
- else
- {
- const SwFrmFmt* pFmt = ::FindFrmFmt( &rObj );
- OSL_ENSURE( pFmt, "where is the format?" );
-
- const SwNodeIndex* pNdIdx = pFmt->GetCntnt().GetCntntIdx();
- OSL_ENSURE( pNdIdx, "where is the StartNode of the Textbox?" );
- rWrt.WriteSpecialText( pNdIdx->GetIndex() + 1,
- pNdIdx->GetNode().EndOfSectionIndex(),
- nTTyp );
+ // is it an writer or sdr - textbox?
+ const SdrObject& rObj = *(SdrObject*)aCntnt[ i ];
+ if (rObj.GetObjInventor() == FmFormInventor)
+ {
+ sal_uInt8 nOldTyp = rWrt.nTxtTyp;
+ rWrt.nTxtTyp = nTTyp;
+ rWrt.GetOCXExp().ExportControl(rWrt,&rObj);
+ rWrt.nTxtTyp = nOldTyp;
+ }
+ else if( rObj.ISA( SdrTextObj ) )
+ rWrt.WriteSdrTextObj(rObj, nTTyp);
+ else
{
- SwNodeIndex aContentIdx = *pNdIdx;
- ++aContentIdx;
- if ( aContentIdx.GetNode().IsTableNode() )
+ const SwFrmFmt* pFmt = ::FindFrmFmt( &rObj );
+ OSL_ENSURE( pFmt, "where is the format?" );
+
+ const SwNodeIndex* pNdIdx = pFmt->GetCntnt().GetCntntIdx();
+ OSL_ENSURE( pNdIdx, "where is the StartNode of the Textbox?" );
+ rWrt.WriteSpecialText( pNdIdx->GetIndex() + 1,
+ pNdIdx->GetNode().EndOfSectionIndex(),
+ nTTyp );
{
- bool bContainsOnlyTables = true;
- do {
- aContentIdx = *(aContentIdx.GetNode().EndOfSectionNode());
- ++aContentIdx;
- if ( !aContentIdx.GetNode().IsTableNode() &&
- aContentIdx.GetIndex() != pNdIdx->GetNode().EndOfSectionIndex() )
+ SwNodeIndex aContentIdx = *pNdIdx;
+ ++aContentIdx;
+ if ( aContentIdx.GetNode().IsTableNode() )
+ {
+ bool bContainsOnlyTables = true;
+ do {
+ aContentIdx = *(aContentIdx.GetNode().EndOfSectionNode());
+ ++aContentIdx;
+ if ( !aContentIdx.GetNode().IsTableNode() &&
+ aContentIdx.GetIndex() != pNdIdx->GetNode().EndOfSectionIndex() )
+ {
+ bContainsOnlyTables = false;
+ }
+ } while ( aContentIdx.GetNode().IsTableNode() );
+ if ( bContainsOnlyTables )
{
- bContainsOnlyTables = false;
+ // Additional paragraph containing a space to
+ // assure that by WW created RTF from written WW8
+ // does not crash WW.
+ rWrt.WriteStringAsPara( OUString(" ") );
}
- } while ( aContentIdx.GetNode().IsTableNode() );
- if ( bContainsOnlyTables )
- {
- // Additional paragraph containing a space to
- // assure that by WW created RTF from written WW8
- // does not crash WW.
- rWrt.WriteStringAsPara( OUString(" ") );
}
}
}
}
- }
else if( i < aSpareFmts.size() )
{
if( const SwFrmFmt* pFmt = (const SwFrmFmt*)aSpareFmts[ i ] )
More information about the Libreoffice-commits
mailing list