On Tue, Jul 31, 2007 at 03:00:34PM -0400, Richard Heck wrote:
> Index: src/Buffer.h
> ===================================================================
> --- src/Buffer.h      (revision 19264)
> +++ src/Buffer.h      (working copy)
> @@ -13,7 +13,11 @@
>  #define BUFFER_H
>  
>  #include "DocIterator.h"
> +#include "ErrorList.h"
> +#include "InsetList.h"
>  
> +#include "frontends/controllers/frontend_helpers.h"

Why that? Including stuff from frontends/ in src/ is wrong in theory.

> [...]
> @@ -1359,11 +1359,12 @@
>                               static_cast<InsetBibitem const &>(*it);
>                       // FIXME UNICODE
>                       string const key = to_utf8(inset.getParam("key"));
> -                     docstring const label = inset.getParam("label");
> +                     biblio::KeyValMap keyvalmap;
> +                     keyvalmap[from_ascii("label")] = 
> inset.getParam("label");
>                       DocIterator doc_it(it); doc_it.forwardPos();
> -                     docstring const ref = 
> doc_it.paragraph().asString(*this, false);
> -                     docstring const info = label + "TheBibliographyRef" + 
> ref;
> -                     keys.push_back(pair<string, docstring>(key, info));
> +                     keyvalmap [from_ascii("ref")] = 
> doc_it.paragraph().asString(*this, false);

No space before [

> [...]
> -docstring const parseBibTeX(docstring data, std::string const & findkey);
> +docstring const getValueForKey(KeyValMap data, std::string const & findkey);

Passing a  std::map<docstring, docstring>  by value seems wrong.

>       void fillWithBibKeys(Buffer const & buffer,
> -             std::vector<std::pair<std::string, docstring> > & keys) const;
> +             std::map<std::string, std::map<docstring, docstring> > & keys) 
> const;

Maybe a typedef would make this clearer, too.

Andre'

Reply via email to