Subject: [beos] a few things
From: Stephane Fritsch (sfritsch@noos.fr)
Date: Tue Jul 17 2001 - 16:04:17 CDT
Hi,
here is patch (+2 new files) that doesn't add any feature but will
allow
to build abiword on BeOS.
This patch only modifies beos files (ie files in a ../beos/.. sub-
directory).
The 2 new files should go to src/af/xap/beos .
The patch as generated using 'cvs diff -u'
Please, let me know if something is wrong about that patch.
Stephane
? src/af/xap/beos/xap_BeOSDlg_Encoding.cpp
? src/af/xap/beos/xap_BeOSDlg_Encoding.h
Index: src/af/ev/beos/ev_BeOSMenu.cpp
===================================================================
RCS file: /cvsroot/abi/src/af/ev/beos/ev_BeOSMenu.cpp,v
retrieving revision 1.16
diff -u -r1.16 ev_BeOSMenu.cpp
--- src/af/ev/beos/ev_BeOSMenu.cpp 2001/05/01 01:20:57 1.16
+++ src/af/ev/beos/ev_BeOSMenu.cpp 2001/07/17 20:41:47
@@ -205,7 +205,7 @@
// Is there a reason why this couldn't be made generic?
const char ** _ev_GetLabelName(XAP_BeOSApp * pBeOSApp,
XAP_Frame * pBeOSFrame,
- EV_Menu_Action * pAction,
+ const EV_Menu_Action * pAction,
EV_Menu_Label * pLabel)
{
static const char * data[2] = {NULL, NULL};
@@ -344,7 +344,7 @@
UT_ASSERT(pLayoutItem);
XAP_Menu_Id id = pLayoutItem->getMenuId();
- EV_Menu_Action * pAction = pMenuActionSet->getAction(id);
+ const EV_Menu_Action * pAction = pMenuActionSet->getAction(id);
UT_ASSERT(pAction);
EV_Menu_Label * pLabel = m_pMenuLabelSet->getLabel(id);
UT_ASSERT(pLabel);
@@ -647,7 +647,7 @@
XAP_Menu_Id id = pLayoutItem->getMenuId();
- EV_Menu_Action * pAction = pMenuActionSet->getAction(id);
+ const EV_Menu_Action * pAction = pMenuActionSet->getAction(id);
UT_ASSERT(pAction);
Index: src/af/ev/beos/ev_BeOSMenu.h
===================================================================
RCS file: /cvsroot/abi/src/af/ev/beos/ev_BeOSMenu.h,v
retrieving revision 1.7
diff -u -r1.7 ev_BeOSMenu.h
--- src/af/ev/beos/ev_BeOSMenu.h 2001/05/25 22:12:03 1.7
+++ src/af/ev/beos/ev_BeOSMenu.h 2001/07/17 20:41:47
@@ -51,7 +51,7 @@
class BMenuBar* pMenuBar;
- virtual bool _doAddMenuItem(XAP_Menu_Id id) { /* TODO */ }
+ virtual bool _doAddMenuItem(UT_uint32 id) { /* TODO */ }
};
/*****************************************************************/
Index: src/af/util/beos/ut_Xpm2Bitmap.cpp
===================================================================
RCS file: /cvsroot/abi/src/af/util/beos/ut_Xpm2Bitmap.cpp,v
retrieving revision 1.5
diff -u -r1.5 ut_Xpm2Bitmap.cpp
--- src/af/util/beos/ut_Xpm2Bitmap.cpp 2001/05/01 01:21:00 1.5
+++ src/af/util/beos/ut_Xpm2Bitmap.cpp 2001/07/17 20:41:48
@@ -61,7 +61,7 @@
rgb_color *pRGB = (rgb_color*)malloc((nrColors + 1) * sizeof(rgb_color));
UT_ASSERT(pRGB);
- UT_HashTable hash(61);
+ UT_StringPtrMap hash(61);
UT_RGBColor color(0,0,0);
// walk thru the palette
@@ -87,8 +87,7 @@
// make the ".." a hash key and store our color index as the data.
// we add k+1 because the hash code does not like null pointers...
- UT_sint32 resultHash = hash.addEntry(bufSymbol,0,(void *)(k+1));
- UT_ASSERT(resultHash != -1);
+ hash.insert(bufSymbol,(void *)(k+1));
// store the actual color value in the
// rgb quad array with our color index.
@@ -126,9 +125,9 @@
bufPixel[kPx] = *p++;
//printf("Looking for character %s \n", bufPixel);
- UT_HashEntry * pEntry = hash.findEntry(bufPixel);
+ const void * pEntry = hash.pick(bufPixel);
- rgb_index = ((UT_Byte)(pEntry->pData)) -1;
+ rgb_index = ((UT_Byte)(pEntry)) -1;
//printf("Returned hash index %d \n", rgb_index);
*(bits + kRow*pBBitmap->BytesPerRow() + kCol*4)
Index: src/af/xap/beos/Makefile
===================================================================
RCS file: /cvsroot/abi/src/af/xap/beos/Makefile,v
retrieving revision 1.18
diff -u -r1.18 Makefile
--- src/af/xap/beos/Makefile 2001/05/26 05:45:26 1.18
+++ src/af/xap/beos/Makefile 2001/07/17 20:41:49
@@ -40,7 +40,8 @@
xap_BeOSDlg_Zoom.cpp \
xap_BeOSDlg_Insert_Symbol.cpp \
xap_BeOSFrame.cpp \
- xap_BeOSToolbar_Icons.cpp
+ xap_BeOSToolbar_Icons.cpp \
+ xap_BeOSDlg_Encoding.cpp
CPPSRCS+= be_GRDrawView.cpp
Index: src/af/xap/beos/xap_BeOSApp.h
===================================================================
RCS file: /cvsroot/abi/src/af/xap/beos/xap_BeOSApp.h,v
retrieving revision 1.12
diff -u -r1.12 xap_BeOSApp.h
--- src/af/xap/beos/xap_BeOSApp.h 2001/05/01 01:21:04 1.12
+++ src/af/xap/beos/xap_BeOSApp.h 2001/07/17 20:41:49
@@ -65,7 +65,7 @@
virtual const XAP_StringSet * getStringSet(void) const = 0;
virtual const char * getAbiSuiteAppDir(void) const = 0;
virtual void copyToClipboard(PD_DocumentRange * pDocRange) = 0;
- virtual void pasteFromClipboard(PD_DocumentRange * pDocRange, bool) = 0;
+ //virtual void pasteFromClipboard(PD_DocumentRange * pDocRange, bool) = 0;
virtual bool canPasteFromClipboard(void) = 0;
virtual void cacheCurrentSelection(AV_View *) = 0;
virtual const char * getUserPrivateDirectory(void);
Index: src/wp/ap/beos/ap_BeOSApp.cpp
===================================================================
RCS file: /cvsroot/abi/src/wp/ap/beos/ap_BeOSApp.cpp,v
retrieving revision 1.44
diff -u -r1.44 ap_BeOSApp.cpp
--- src/wp/ap/beos/ap_BeOSApp.cpp 2001/06/18 15:11:26 1.44
+++ src/wp/ap/beos/ap_BeOSApp.cpp 2001/07/17 20:41:58
@@ -247,11 +247,12 @@
//////////////////////////////////////////////////////////////////
IE_ImpExp_RegisterXP ();
+#if 0
+ /* if'ed out like on other platforms... don't know exactly why */
//////////////////////////////////////////////////////////////////
// initializes the spell checker.
//////////////////////////////////////////////////////////////////
-#if 1
{
const char * szISpellDirectory = NULL;
getPrefsValueDirectory(false,AP_PREF_KEY_SpellDirectory,&szISpellDirectory);
@@ -460,10 +461,11 @@
}
}
-void AP_BeOSApp::pasteFromClipboard(PD_DocumentRange * pDocRange, bool)
+void AP_BeOSApp::pasteFromClipboard(PD_DocumentRange * pDocRange, bool, bool bHonorFormatting = true)
{
// paste from the system clipboard using the best-for-us format
// that is present.
+ // TODO handle bHonorFormatting
if (m_pClipboard->hasFormat(AP_CLIPBOARD_RTF))
{
Index: src/wp/ap/beos/ap_BeOSApp.h
===================================================================
RCS file: /cvsroot/abi/src/wp/ap/beos/ap_BeOSApp.h,v
retrieving revision 1.15
diff -u -r1.15 ap_BeOSApp.h
--- src/wp/ap/beos/ap_BeOSApp.h 2001/02/06 22:54:42 1.15
+++ src/wp/ap/beos/ap_BeOSApp.h 2001/07/17 20:41:59
@@ -49,7 +49,7 @@
virtual const XAP_StringSet * getStringSet(void) const;
virtual const char * getAbiSuiteAppDir(void) const;
virtual void copyToClipboard(PD_DocumentRange * pDocRange);
- virtual void pasteFromClipboard(PD_DocumentRange * pDocRange, bool);
+ virtual void pasteFromClipboard(PD_DocumentRange * pDocRange, bool, bool = true);
virtual bool canPasteFromClipboard(void);
virtual void cacheCurrentSelection(AV_View *) {};
Index: src/wp/ap/beos/ap_BeOSDialog_Options.cpp
===================================================================
RCS file: /cvsroot/abi/src/wp/ap/beos/ap_BeOSDialog_Options.cpp,v
retrieving revision 1.12
diff -u -r1.12 ap_BeOSDialog_Options.cpp
--- src/wp/ap/beos/ap_BeOSDialog_Options.cpp 2001/03/24 17:57:51 1.12
+++ src/wp/ap/beos/ap_BeOSDialog_Options.cpp 2001/07/17 20:42:00
@@ -602,6 +602,7 @@
DEFINE_GET_SET_BOOL (ViewUnprintable , "chkViewUnprintable" );
DEFINE_GET_SET_BOOL (SmartQuotesEnable , "SmartQuotes");
DEFINE_GET_SET_BOOL (AutoSaveFile, "AutoSaveFile");
+DEFINE_GET_SET_BOOL (ShowSplash, "ShowSplash");
#undef DEFINE_GET_SET_BOOL
Index: src/wp/ap/beos/ap_BeOSDialog_Options.h
===================================================================
RCS file: /cvsroot/abi/src/wp/ap/beos/ap_BeOSDialog_Options.h,v
retrieving revision 1.13
diff -u -r1.13 ap_BeOSDialog_Options.h
--- src/wp/ap/beos/ap_BeOSDialog_Options.h 2001/03/24 17:57:51 1.13
+++ src/wp/ap/beos/ap_BeOSDialog_Options.h 2001/07/17 20:42:01
@@ -77,6 +77,7 @@
SET_GATHER (ViewUnprintable, bool );
SET_GATHER (AutoSaveFile, bool);
+ SET_GATHER (ShowSplash, bool);
virtual void _gatherAutoSaveFilePeriod(UT_String &stRetVal);
virtual void _setAutoSaveFilePeriod(const UT_String &stPeriod);
virtual void _gatherAutoSaveFileExt(UT_String &stRetVal);
This archive was generated by hypermail 2b25 : Tue Jul 17 2001 - 16:04:18 CDT