Hi, First thanks for reviewing, catching my errors and correcting. I have learned a lot. Next time I do so many errors, please reject and I will correct it myself.
Michael, I will wait making less errors in changes before requesting an account, if you don't mind. Just a question for: > Err, you sort of changed the logic there. That doesn't look quite right. > OutAttrSet went from getting called always to only getting called when > pExportInfo is set. I've fixed this up now as well. I don't understand my error: I wanted to keep the logic with structure changes, going from: var -> here waring not initialized if (pexportinfo) { stuff 1 } OutAttrSet -----> the one you mentionned if (pexportinfo) { stuff 2 } to the new structure having (at least I though) the same overall logic but written slightly differently: if (pexportinfo) { var stuff 1 outAttrSet stuff 2 } else { OutAttrSet } I though, this would be better, solving the uninitialized warning, initializing only if needed and having only one IF evaluation. The OutAttrSet seems me to be executed in all case one and only once, as before. Is there a logic error here? Or did the patch 0009 (the concerned part attached here) something else? Thanks helping me to improve. regards Pierre-André
@@ -938,21 +938,21 @@ sal_Bool lcl_sw3io_insFtn( const SwTxtNode *pTxtNd ) /*N*/ if( bWriteName ) /*N*/ OutString( *pStrm, rFmt.GetName() ); /*N*/ -/*N*/ BOOL bOldExportFlyFrmFmt; -/*N*/ const SwFlyFrm* pOldExportFlyFrm; /*N*/ if( pExportInfo ) /*N*/ { -/*N*/ bOldExportFlyFrmFmt = pExportInfo->bFlyFrmFmt; -/*N*/ pOldExportFlyFrm = pExportInfo->pFlyFrm; +/*N*/ BOOL bOldExportFlyFrmFmt = pExportInfo->bFlyFrmFmt; +/*N*/ const SwFlyFrm* pOldExportFlyFrm = pExportInfo->pFlyFrm; /*N*/ pExportInfo->bFlyFrmFmt = (cType == SWG_FLYFMT); /*N*/ pExportInfo->pFlyFrm = pExportFlyFrm; -/*N*/ } -/*N*/ OutAttrSet( rFmt.GetAttrSet(), SWG_SECTFMT == cType ); -/*N*/ if( pExportInfo ) -/*N*/ { + OutAttrSet( rFmt.GetAttrSet(), SWG_SECTFMT == cType ); /*N*/ pExportInfo->bFlyFrmFmt = bOldExportFlyFrmFmt; /*N*/ pExportInfo->pFlyFrm = pOldExportFlyFrm; + /*N*/ } + else + { +/*N*/ OutAttrSet( rFmt.GetAttrSet(), SWG_SECTFMT == cType ); + } /*N*/ CloseRec( cType ); /*N*/ if( cType != SWG_FREEFMT && cType != SWG_SECTFMT ) /*N*/ ((SwFmt&)rFmt).SetWritten();
_______________________________________________ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice