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();
Context
- Re: [Libreoffice] [PATCH 4/9] binfilter sc_interpr4.cxx further warnings removal (continued)
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.