Re: [PATCH] bug 1890: insetoptarg triggers assertion
On Wed, Jun 01, 2005 at 03:26:47PM +0200, Jean-Marc Lasgouttes wrote: Martin == Martin Vermeer [EMAIL PROTECTED] writes: Martin Hmmm. This Martin 43 InsetCollapsable::InsetCollapsable Martin 44 (BufferParams const bp, CollapseStatus status) Martin 45 : InsetText(bp), label(Label), status_(status), openinlined_(false) Martin 46 { Martin suggests that a new textinset is being created at construction Martin of the collapsable. I do not think so. It means ``use my InsetText personality to call the constructor''. Lars, Angus anyone, would you care to comment? That's the constructor of the base class. Since we are using single inheritance, the address of the InsetCollapsable is the same as that of the base class. Andre'
Re: [PATCH] bug 1890: insetoptarg triggers assertion
On Wed, Jun 01, 2005 at 03:26:47PM +0200, Jean-Marc Lasgouttes wrote: > > "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes: > > Martin> Hmmm. This > > Martin> 43 InsetCollapsable::InsetCollapsable > Martin> 44 (BufferParams const & bp, CollapseStatus status) > Martin> 45 : InsetText(bp), label("Label"), status_(status), > openinlined_(false) > Martin> 46 { > > Martin> suggests that a new textinset is being created at construction > Martin> of the collapsable. > > I do not think so. It means ``use my InsetText personality to call the > constructor''. > > Lars, Angus anyone, would you care to comment? That's the constructor of the base class. Since we are using single inheritance, the address of the InsetCollapsable is the same as that of the base class. Andre'
Re: [PATCH] bug 1890: insetoptarg triggers assertion
Jean-Marc == Jean-Marc Lasgouttes [EMAIL PROTECTED] writes: Jean-Marc The following (trivial) patch fixes bug 1890. Although it Jean-Marc is a satisfactory fix (insert the optarg inset as open Jean-Marc instead of collapsed, like for all other collapsable Jean-Marc insets), it hides a more annoying bug: when the collapsable Jean-Marc inset is inserted as collapsed, the xo() and yo() values Jean-Marc are not set correctly by the metrics (?) phase and trigger Jean-Marc an assertion. I applied the fix. JMarc
Re: [PATCH] bug 1890: insetoptarg triggers assertion
> "Jean-Marc" == Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes: Jean-Marc> The following (trivial) patch fixes bug 1890. Although it Jean-Marc> is a satisfactory fix (insert the optarg inset as open Jean-Marc> instead of collapsed, like for all other collapsable Jean-Marc> insets), it hides a more annoying bug: when the collapsable Jean-Marc> inset is inserted as collapsed, the xo() and yo() values Jean-Marc> are not set correctly by the metrics (?) phase and trigger Jean-Marc> an assertion. I applied the fix. JMarc
Re: [PATCH] bug 1890: insetoptarg triggers assertion
Jean-Marc == Jean-Marc Lasgouttes [EMAIL PROTECTED] writes: Jean-Marc The following (trivial) patch fixes bug 1890. Although it Jean-Marc is a satisfactory fix (insert the optarg inset as open Jean-Marc instead of collapsed, like for all other collapsable Jean-Marc insets), it hides a more annoying bug: when the collapsable Jean-Marc inset is inserted as collapsed, the xo() and yo() values Jean-Marc are not set correctly by the metrics (?) phase and trigger Jean-Marc an assertion. A related question: seeing that InsetCollapsable derives from InsetText and that both draw method call Inset::setPosCache, what is the _real_ value for xo and yo? JMarc
Re: [PATCH] bug 1890: insetoptarg triggers assertion
On Wed, 2005-06-01 at 15:44, Jean-Marc Lasgouttes wrote: Jean-Marc == Jean-Marc Lasgouttes [EMAIL PROTECTED] writes: Jean-Marc The following (trivial) patch fixes bug 1890. Although it Jean-Marc is a satisfactory fix (insert the optarg inset as open Jean-Marc instead of collapsed, like for all other collapsable Jean-Marc insets), it hides a more annoying bug: when the collapsable Jean-Marc inset is inserted as collapsed, the xo() and yo() values Jean-Marc are not set correctly by the metrics (?) phase and trigger Jean-Marc an assertion. A related question: seeing that InsetCollapsable derives from InsetText and that both draw method call Inset::setPosCache, what is the _real_ value for xo and yo? JMarc I would say there are two different real value pairs, as there are two insets within each other. The collapsable inset uses its own draw method, and the textinset inside it, its own. The fact that InsetCollapsable derives from InsetText is a red herring in this connection as far as I can see. - Martin signature.asc Description: This is a digitally signed message part
Re: [PATCH] bug 1890: insetoptarg triggers assertion
Martin == Martin Vermeer [EMAIL PROTECTED] writes: Martin I would say there are two different real value pairs, as there Martin are two insets within each other. The collapsable inset uses Martin its own draw method, and the textinset inside it, its own. Martin The fact that InsetCollapsable derives from InsetText is a red Martin herring in this connection as far as I can see. But there is only one inset address for the collapsable inset and the text inset, right? JMarc
Re: [PATCH] bug 1890: insetoptarg triggers assertion
On Wed, 2005-06-01 at 16:08, Jean-Marc Lasgouttes wrote: Martin == Martin Vermeer [EMAIL PROTECTED] writes: Martin I would say there are two different real value pairs, as there Martin are two insets within each other. The collapsable inset uses Martin its own draw method, and the textinset inside it, its own. Martin The fact that InsetCollapsable derives from InsetText is a red Martin herring in this connection as far as I can see. But there is only one inset address for the collapsable inset and the text inset, right? Hmmm. This 43 InsetCollapsable::InsetCollapsable 44 (BufferParams const bp, CollapseStatus status) 45 : InsetText(bp), label(Label), status_(status), openinlined_(false) 46 { suggests that a new textinset is being created at construction of the collapsable. ? - Martin signature.asc Description: This is a digitally signed message part
Re: [PATCH] bug 1890: insetoptarg triggers assertion
Martin == Martin Vermeer [EMAIL PROTECTED] writes: Martin Hmmm. This Martin 43 InsetCollapsable::InsetCollapsable Martin 44 (BufferParams const bp, CollapseStatus status) Martin 45 : InsetText(bp), label(Label), status_(status), openinlined_(false) Martin 46 { Martin suggests that a new textinset is being created at construction Martin of the collapsable. I do not think so. It means ``use my InsetText personality to call the constructor''. Lars, Angus anyone, would you care to comment? JMarc
Re: [PATCH] bug 1890: insetoptarg triggers assertion
Martin Vermeer wrote: Martin I would say there are two different real value pairs, as there Martin are two insets within each other. The collapsable inset uses Martin its own draw method, and the textinset inside it, its own. Martin The fact that InsetCollapsable derives from InsetText is a red Martin herring in this connection as far as I can see. But there is only one inset address for the collapsable inset and the text inset, right? Hmmm. This 43 InsetCollapsable::InsetCollapsable 44 (BufferParams const bp, CollapseStatus status) 45 : InsetText(bp), label(Label), status_(status), openinlined_(false) 46 { suggests that a new textinset is being created at construction of the collapsable. ? But they'll have the same address because InsetCollapsable derives from InsetText. The InsetCollapsable constructor is passing 'bp' down to its parent, InsetText, so that InsetText can be initialised correctly. Angus
Re: [PATCH] bug 1890: insetoptarg triggers assertion
Jean-Marc Lasgouttes wrote: Jean-Marc == Jean-Marc Lasgouttes [EMAIL PROTECTED] writes: Jean-Marc The following (trivial) patch fixes bug 1890. Although it Jean-Marc is a satisfactory fix (insert the optarg inset as open Jean-Marc instead of collapsed, like for all other collapsable Jean-Marc insets), it hides a more annoying bug: when the collapsable Jean-Marc inset is inserted as collapsed, the xo() and yo() values Jean-Marc are not set correctly by the metrics (?) phase and trigger Jean-Marc an assertion. I looked at that, too, but could not find the reason. In theory setPoscache should be called before xo and yo are used, but this does not seem to be the case. A related question: seeing that InsetCollapsable derives from InsetText and that both draw method call Inset::setPosCache, what is the _real_ value for xo and yo? My understanding is the following: the InsetText values + some offset are valid and used if the inset is open or inlined, and the InsetCollapsable values are used if it is closed. Georg
Re: [PATCH] bug 1890: insetoptarg triggers assertion
Georg == Georg Baum [EMAIL PROTECTED] writes: Georg Jean-Marc Lasgouttes wrote: Jean-Marc == Jean-Marc Lasgouttes [EMAIL PROTECTED] writes: Jean-Marc The following (trivial) patch fixes bug 1890. Although it Jean-Marc is a satisfactory fix (insert the optarg inset as open Jean-Marc instead of collapsed, like for all other collapsable Jean-Marc insets), it hides a more annoying bug: when the collapsable Jean-Marc inset is inserted as collapsed, the xo() and yo() values Jean-Marc are not set correctly by the metrics (?) phase and trigger Jean-Marc an assertion. Georg I looked at that, too, but could not find the reason. In theory Georg setPoscache should be called before xo and yo are used, but Georg this does not seem to be the case. So I guess I will just apply my patch now, until someone gets bitten by that in another situation. JMarc
Re: [PATCH] bug 1890: insetoptarg triggers assertion
> "Jean-Marc" == Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes: Jean-Marc> The following (trivial) patch fixes bug 1890. Although it Jean-Marc> is a satisfactory fix (insert the optarg inset as open Jean-Marc> instead of collapsed, like for all other collapsable Jean-Marc> insets), it hides a more annoying bug: when the collapsable Jean-Marc> inset is inserted as collapsed, the xo() and yo() values Jean-Marc> are not set correctly by the metrics (?) phase and trigger Jean-Marc> an assertion. A related question: seeing that InsetCollapsable derives from InsetText and that both draw method call Inset::setPosCache, what is the _real_ value for xo and yo? JMarc
Re: [PATCH] bug 1890: insetoptarg triggers assertion
On Wed, 2005-06-01 at 15:44, Jean-Marc Lasgouttes wrote: > > "Jean-Marc" == Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes: > > Jean-Marc> The following (trivial) patch fixes bug 1890. Although it > Jean-Marc> is a satisfactory fix (insert the optarg inset as open > Jean-Marc> instead of collapsed, like for all other collapsable > Jean-Marc> insets), it hides a more annoying bug: when the collapsable > Jean-Marc> inset is inserted as collapsed, the xo() and yo() values > Jean-Marc> are not set correctly by the metrics (?) phase and trigger > Jean-Marc> an assertion. > > A related question: seeing that InsetCollapsable derives from > InsetText and that both draw method call Inset::setPosCache, what is > the _real_ value for xo and yo? > > JMarc I would say there are two different real value pairs, as there are two insets within each other. The collapsable inset uses its own draw method, and the textinset inside it, its own. The fact that InsetCollapsable derives from InsetText is a red herring in this connection as far as I can see. - Martin signature.asc Description: This is a digitally signed message part
Re: [PATCH] bug 1890: insetoptarg triggers assertion
> "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes: Martin> I would say there are two different real value pairs, as there Martin> are two insets within each other. The collapsable inset uses Martin> its own draw method, and the textinset inside it, its own. Martin> The fact that InsetCollapsable derives from InsetText is a red Martin> herring in this connection as far as I can see. But there is only one inset address for the collapsable inset and the text inset, right? JMarc
Re: [PATCH] bug 1890: insetoptarg triggers assertion
On Wed, 2005-06-01 at 16:08, Jean-Marc Lasgouttes wrote: > > "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes: > > Martin> I would say there are two different real value pairs, as there > Martin> are two insets within each other. The collapsable inset uses > Martin> its own draw method, and the textinset inside it, its own. > > Martin> The fact that InsetCollapsable derives from InsetText is a red > Martin> herring in this connection as far as I can see. > > But there is only one inset address for the collapsable inset and the > text inset, right? Hmmm. This 43 InsetCollapsable::InsetCollapsable 44 (BufferParams const & bp, CollapseStatus status) 45 : InsetText(bp), label("Label"), status_(status), openinlined_(false) 46 { suggests that a new textinset is being created at construction of the collapsable. ? - Martin signature.asc Description: This is a digitally signed message part
Re: [PATCH] bug 1890: insetoptarg triggers assertion
> "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes: Martin> Hmmm. This Martin> 43 InsetCollapsable::InsetCollapsable Martin> 44 (BufferParams const & bp, CollapseStatus status) Martin> 45 : InsetText(bp), label("Label"), status_(status), openinlined_(false) Martin> 46 { Martin> suggests that a new textinset is being created at construction Martin> of the collapsable. I do not think so. It means ``use my InsetText personality to call the constructor''. Lars, Angus anyone, would you care to comment? JMarc
Re: [PATCH] bug 1890: insetoptarg triggers assertion
Martin Vermeer wrote: Martin> I would say there are two different real value pairs, as there Martin> are two insets within each other. The collapsable inset uses Martin> its own draw method, and the textinset inside it, its own. Martin> The fact that InsetCollapsable derives from InsetText is a red Martin> herring in this connection as far as I can see. But there is only one inset address for the collapsable inset and the text inset, right? Hmmm. This 43 InsetCollapsable::InsetCollapsable 44 (BufferParams const & bp, CollapseStatus status) 45 : InsetText(bp), label("Label"), status_(status), openinlined_(false) 46 { suggests that a new textinset is being created at construction of the collapsable. ? But they'll have the same address because InsetCollapsable derives from InsetText. The InsetCollapsable constructor is passing 'bp' down to its parent, InsetText, so that InsetText can be initialised correctly. Angus
Re: [PATCH] bug 1890: insetoptarg triggers assertion
Jean-Marc Lasgouttes wrote: >> "Jean-Marc" == Jean-Marc Lasgouttes >> <[EMAIL PROTECTED]> writes: > > Jean-Marc> The following (trivial) patch fixes bug 1890. Although it > Jean-Marc> is a satisfactory fix (insert the optarg inset as open > Jean-Marc> instead of collapsed, like for all other collapsable > Jean-Marc> insets), it hides a more annoying bug: when the collapsable > Jean-Marc> inset is inserted as collapsed, the xo() and yo() values > Jean-Marc> are not set correctly by the metrics (?) phase and trigger > Jean-Marc> an assertion. I looked at that, too, but could not find the reason. In theory setPoscache should be called before xo and yo are used, but this does not seem to be the case. > A related question: seeing that InsetCollapsable derives from > InsetText and that both draw method call Inset::setPosCache, what is > the _real_ value for xo and yo? My understanding is the following: the InsetText values + some offset are valid and used if the inset is open or inlined, and the InsetCollapsable values are used if it is closed. Georg
Re: [PATCH] bug 1890: insetoptarg triggers assertion
> "Georg" == Georg Baum <[EMAIL PROTECTED]> writes: Georg> Jean-Marc Lasgouttes wrote: >>> "Jean-Marc" == Jean-Marc Lasgouttes >>> <[EMAIL PROTECTED]> writes: >> Jean-Marc> The following (trivial) patch fixes bug 1890. Although it Jean-Marc> is a satisfactory fix (insert the optarg inset as open Jean-Marc> instead of collapsed, like for all other collapsable Jean-Marc> insets), it hides a more annoying bug: when the collapsable Jean-Marc> inset is inserted as collapsed, the xo() and yo() values Jean-Marc> are not set correctly by the metrics (?) phase and trigger Jean-Marc> an assertion. Georg> I looked at that, too, but could not find the reason. In theory Georg> setPoscache should be called before xo and yo are used, but Georg> this does not seem to be the case. So I guess I will just apply my patch now, until someone gets bitten by that in another situation. JMarc