Date: prev next · Thread: first prev next last
2010 Archives by date, by thread · List index


Sebastian Spaeth wrote:
What does bFull mean? Not so quick? What portions will be formatted if
this is FALSE? Looking at the function it either calls
 pImpEditEngine->FormatFullDoc(); 
 or 
 pImpEditEngine->FormatDoc();

What the heck is the difference between those functions? Now I have to
go another layer deeper to those 2 (both undocumented!) functions.

All that FormatFullDoc does:

  for ( sal_uInt16 nPortion = 0; nPortion < GetParaPortions().Count(); nPortion++ )
    GetParaPortions()[nPortion]->MarkSelectionInvalid( 0, 
GetParaPortions()[nPortion]->GetNode()->Len() );
  FormatDoc()

Excuse me, what does the stuff before we end up in FormatDoc() actually
do? It must modify the document somehow as a sideeffect,because we call
FormatDoc without any parameter. And it seems to mark some selections as
invalid. So perhaps bFull=FALSE only works on selected text?

For that I need to dig into what GetParaPortions and ParaPortions
actually are and do, which is an *undocumented class* implemented here: 
libs-core/editeng/source/editeng/editdoc2.cxx.

I'd give up at this point, because after reading that much code, I had
forgotten what I wanted to do in the first place :). A simple docstring
in QuickFormatDoc, such as
/**
 * param bFull determines whether we need to reflow the whole document
 or only the pieces that are visible on the screen.
 */

Hi spaetz,

see? That's what I meant, documentation for most of the higher-level
methods is either

a) superficial
b) so much prose that you're better off debugging the code in the
   first place

(bFull has *a lot* of side effects, and no, I did not bother to
research all of them for the while)

would have saved me much time, and I could actually have improved some
code rather becoming a frustrated opengrok hunter..
(note this is a bullshit comment, as I *still* don't know what bFull
really does :)).

Having a ctags and/or idutils index setup & integrated into your
editor greatly speeds up jumping around in the codebase. I'd consider
it essential for any productive work with LibO.

Cheers,

-- Thorsten

Attachment: pgpkmQEPHOMs1.pgp
Description: PGP signature


Context


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.