On Sun, Mar 25, 2001 at 06:04:31PM +1000, Martin Sevior wrote:
> 
> Ok this commit completes Dom's page colour work. On gtk/gnome you can
> independent set the page color and the highlight color of text. Page
> colour is now a section level property called "background-color". The
> property "bgcolor" is actually the Highlight colour which can be
> independently set on the gnome front end.
> 
> I had to do a lot of fixes to the underlying colour logic. For a start all
> use of "clearArea" was removed since it is actually just a fillRect with
> the colour hardwired to white. Now clearscreen() actually does
> fillRect(m_colorPG,....) where m_colorPG is the page color. The drawchar()
> methods first get a fillRect(m_colorHL,....) where m_colorHL is the
> highlight colour defined from "bgcolor" above. Note that all styles are
> now set to have bgcolor as "transparent".
> 
> In the process fields have become grey on the screen again.
> 
> This property should DEFINATELY be exported to HTML! Someone
> who knows HTML should do this. No more grey web pages from Abi :-)

Well, it almost was there already.  It just was untested, so I had to
tweak it a bit.  See the attached patch.  I was exporting the 'bgcolor'
property, not the 'background-color' property.  Wasn't sure what the
difference was until this discussion.

I don't know why this would be in my source and in noone else's, but my
copy of abiword doesn't compile, dying on xad_Document, because on line
45, UT_UCS_strcpy_to_char is missing an argument.  So I added the
argument.  It's also included in the patch.  Feel free to drop that
section of the patch if I'm missing something.

Take care,

        John

P.S.  Yes, I am working on getting the styles dialog done.  Just have
... too ... many ... responsibilities.  *sigh*

P.P.S.  I'm not even going to go into my preferences on British v.
American spellings.  ;-)
Index: abi/src/af/xap/xp/xad_Document.cpp
===================================================================
RCS file: /cvsroot/abi/src/af/xap/xp/xad_Document.cpp,v
retrieving revision 1.14
diff -u -r1.14 xad_Document.cpp
--- abi/src/af/xap/xp/xad_Document.cpp  2001/03/25 14:44:30     1.14
+++ abi/src/af/xap/xp/xad_Document.cpp  2001/03/25 16:41:15
@@ -41,6 +41,7 @@
        {
                // not careful results checking, etc, in this loop, but it's just for 
debugging anyhow
                const UT_UCSChar *word = 0;
+               char * copy;
                enumIgnores(i, &word);
                UT_DEBUGMSG(("AD_Document::~AD_Document(), ignored spell word 
\"%s\"\n", UT_UCS_strcpy_to_char(copy, word)));
        }
Index: abi/src/wp/impexp/xp/ie_exp_HTML.cpp
===================================================================
RCS file: /cvsroot/abi/src/wp/impexp/xp/ie_exp_HTML.cpp,v
retrieving revision 1.49
diff -u -r1.49 ie_exp_HTML.cpp
--- abi/src/wp/impexp/xp/ie_exp_HTML.cpp        2001/03/20 13:42:42     1.49
+++ abi/src/wp/impexp/xp/ie_exp_HTML.cpp        2001/03/25 16:41:16
@@ -1112,9 +1112,9 @@
 
                        m_pie->write(" style=\"");
 
-               szValue = PP_evalProperty("bgcolor",
+               szValue = PP_evalProperty("background-color",
                        NULL, NULL, pAP, m_pDocument, true);
-                       m_pie->write("background-color: #");
+                       m_pie->write("background-color: ");
                        char color[16];
                        _convertColor(color, szValue);
                        m_pie->write(color);

Reply via email to