Subject: Bugfix adjustable height columns - please commit
From: Robert Altenburg (rca@xlation.com)
Date: Fri Feb 01 2002 - 23:25:58 CST
What this does:
in abi/src/text/fmt/xp/fv_View.cpp:
Adds a line for section-max-column-height so the
adjustable height columns work.
in abi/src/af/util/xp/ut_units.cpp:
Add an assert. The above fix removed the null we were
getting in the past.
Trivial stuff:
The diff also includes a fix to my spelling error in a past bugfix
and a cleans up some formatting.
I don't recall if there is a Bugzilla bug for this, I found the
problem when working on another fix. When I can get back on
zilla I'll see if I can find it posted.
-
Rob Altenburg
Index: src/af/util/xp/ut_units.cpp
===================================================================
RCS file: /cvsroot/abi/src/af/util/xp/ut_units.cpp,v
retrieving revision 1.43
diff -u -r1.43 ut_units.cpp
--- src/af/util/xp/ut_units.cpp 2002/02/01 18:10:54 1.43
+++ src/af/util/xp/ut_units.cpp 2002/02/02 05:04:07
@@ -271,11 +271,12 @@
const char * UT_reformatDimensionString(UT_Dimension dim, const char *sz, const char * szPrecision)
{
- if (!sz)
+ UT_ASSERT(sz); // this function segfaults if it gets a null
+ if (!sz) // if we really need to give it a null, we make it = 0in
{
- //catch NULLs and make them 0
sz = "0.0in";
- UT_DEBUGMSG(("UT_reformatDimensionString just made the assumption null = 0.0in\n"));
+ UT_DEBUGMSG(("UT_reformatDimensionString just made the
+ assumption null = 0.0in\n"));
}
double d = UT_convertDimensionless(sz);
Index: src/text/fmt/xp/fv_View.cpp
===================================================================
RCS file: /cvsroot/abi/src/text/fmt/xp/fv_View.cpp,v
retrieving revision 1.583
diff -u -r1.583 fv_View.cpp
--- src/text/fmt/xp/fv_View.cpp 2002/02/01 15:32:44 1.583
+++ src/text/fmt/xp/fv_View.cpp 2002/02/02 05:04:41
@@ -3867,6 +3867,7 @@
v.addItem(new _fmtPair("column-line", NULL,pBlockAP,pSectionAP,m_pDoc,false));
v.addItem(new _fmtPair("column-gap",NULL,pBlockAP,pSectionAP,m_pDoc,false));
v.addItem(new _fmtPair("section-space-after",NULL,pBlockAP,pSectionAP,m_pDoc,false));
+ v.addItem(new _fmtPair("section-max-column-height",NULL,pBlockAP,pSectionAP,m_pDoc,false));
v.addItem(new _fmtPair("section-restart",NULL,pBlockAP,pSectionAP,m_pDoc,false));
v.addItem(new _fmtPair("section-restart-value",NULL,pBlockAP,pSectionAP,m_pDoc,false));
v.addItem(new _fmtPair("footer",NULL,pBlockAP,pSectionAP,m_pDoc,false));
Index: src/text/ptbl/xp/pp_Property.cpp
===================================================================
RCS file: /cvsroot/abi/src/text/ptbl/xp/pp_Property.cpp,v
retrieving revision 1.83
diff -u -r1.83 pp_Property.cpp
--- src/text/ptbl/xp/pp_Property.cpp 2002/01/25 13:03:27 1.83
+++ src/text/ptbl/xp/pp_Property.cpp 2002/02/02 05:04:43
@@ -138,7 +138,7 @@
{ "page-margin-right", "1in", false, NULL},
{ "page-margin-top", "1in", false, NULL},
- { "section-max-column-height", "0in", false,NULL},
+ { "section-max-column-height", "0in", false,NULL},
{ "section-restart", "", false,NULL},
{ "section-restart-value", "", false,NULL},
{ "section-space-after", "0.25in", false, NULL},
Index: src/wp/ap/xp/ap_Dialog_Columns.cpp
===================================================================
RCS file: /cvsroot/abi/src/wp/ap/xp/ap_Dialog_Columns.cpp,v
retrieving revision 1.12
diff -u -r1.12 ap_Dialog_Columns.cpp
--- src/wp/ap/xp/ap_Dialog_Columns.cpp 2002/02/01 18:11:21 1.12
+++ src/wp/ap/xp/ap_Dialog_Columns.cpp 2002/02/02 05:04:49
@@ -166,10 +166,10 @@
const XML_Char ** pszSecProps = NULL;
m_pView->getSectionFormat(&pszSecProps);
- _convertToPreferedUnits( pFrame, (const XML_Char *)
+ _convertToPreferredUnits( pFrame, (const XML_Char *)
UT_getAttribute("section-space-after",pszSecProps), (const XML_Char *)pszAfter);
- _convertToPreferedUnits( pFrame, (const XML_Char *)
- UT_getAttribute("section-max-column-height",pszSecProps), (const XML_Char *)pszMaxHeight);
+ _convertToPreferredUnits( pFrame, (const XML_Char *)
+ UT_getAttribute("section-max-column-height",pszSecProps), (const XML_Char *)pszMaxHeight);
if(pszAfter && *pszAfter)
{
@@ -365,7 +365,7 @@
\params const char * sz is the string containing the old value
\params const XML_Char * pRet is the string to which the new value is copied.
*/
-void AP_Dialog_Columns::_convertToPreferedUnits(XAP_Frame * pFrame,const char *sz, const XML_Char *pRet)
+void AP_Dialog_Columns::_convertToPreferredUnits(XAP_Frame * pFrame,const char *sz, const XML_Char *pRet)
{
UT_Dimension PreferedUnits = DIM_none;
const XML_Char * pszRulerUnits = NULL;
Index: src/wp/ap/xp/ap_Dialog_Columns.h
===================================================================
RCS file: /cvsroot/abi/src/wp/ap/xp/ap_Dialog_Columns.h,v
retrieving revision 1.6
diff -u -r1.6 ap_Dialog_Columns.h
--- src/wp/ap/xp/ap_Dialog_Columns.h 2002/02/01 18:11:21 1.6
+++ src/wp/ap/xp/ap_Dialog_Columns.h 2002/02/02 05:04:49
@@ -105,7 +105,7 @@
UT_uint32 width,
UT_uint32 height);
void _drawColumnButton(GR_Graphics *gc, UT_Rect rect, UT_uint32 iColumns);
- void _convertToPreferedUnits(XAP_Frame * pFrame,const
+ void _convertToPreferredUnits(XAP_Frame * pFrame,const
char *sz, const XML_Char *pRet);
AP_Dialog_Columns::tAnswer m_answer;
AP_Columns_preview * m_pColumnsPreview;
This archive was generated by hypermail 2b25 : Fri Feb 01 2002 - 23:20:05 CST