Only in ../abi: .tm_project.cache Only in ../abi: AbiSuite-2.0-2.0.11 Only in ../abi: GNUmakefile Only in ../abi: GNUmakefile.in diff -ru ../../abiword-2.0.11.abicvs/abi/Makefile ../abi/Makefile --- ../../abiword-2.0.11.abicvs/abi/Makefile 2002-01-28 12:40:05.000000000 +0000 +++ ../abi/Makefile 2004-09-02 12:27:27.000000000 +0100 @@ -82,6 +82,13 @@ $(MAKE) prefix=$(prefix) ABI_OPT_DEBUG=1 -C src install ################################################################## +# ipkg + +install_ipkg: + @echo Installing AbiSuite for ipkg + $(MAKE) prefix=$(ABI_ROOT)/../ipkg_dist/$(prefix) -C src install + +################################################################## install_redhat: @echo Installing AbiSuite for Red Hat Linux systems diff -ru ../../abiword-2.0.11.abicvs/abi/abiword.prj ../abi/abiword.prj --- ../../abiword-2.0.11.abicvs/abi/abiword.prj 2002-09-04 19:46:57.000000000 +0100 +++ ../abi/abiword.prj 2004-09-02 12:27:27.000000000 +0100 @@ -1,4 +1,4 @@ -# Anjuta Version 0.9.99 +# Anjuta Version 1.2.2 Compatibility Level: 1 @@ -22,7 +22,7 @@ props.file.type=project -anjuta.version=0.9.99 +anjuta.version=1.2.2 anjuta.compatibility.level=1 project.name=abiword @@ -31,12 +31,15 @@ project.version=1.1.1 project.author=Abi the Ant project.source.target=abiword - -project.excluded.modules= - project.has.gettext=0 - +project.gui.command= project.programming.language=C++ +project.excluded.modules=intl + +project.config.extra.modules.before= +project.config.extra.modules.after= +project.config.blocked=0 +project.config.disable.overwriting=1 1 1 1 1 1 1 1 1 project.menu.entry=AbiWord Version 0.1 project.menu.group=Applications @@ -45,70 +48,60 @@ project.menu.need.terminal=0 project.configure.options= - anjuta.program.arguments= - -project.config.blocked=0 - -project.config.disable.overwriting=1 1 1 1 1 1 1 1 1 -project.config.extra.modules.before= -project.config.extra.modules.after= +preferences.build.option.jobs=0 +preferences.build.option.silent=0 +preferences.build.option.autosave=1 +preferences.make=make +preferences.build.option.keep.going=1 +preferences.build.option.warn.undef=0 +preferences.autoformat.custom.style= -i8 -sc -bli0 -bl0 -cbi0 -ss +preferences.indent.opening=0 +preferences.autoformat.disable=0 +preferences.indent.automatic=1 +preferences.use.tabs=1 +preferences.indent.size=4 +preferences.tabsize=4 +preferences.indent.closing=0 module.include.name=include module.include.type= -module.include.expanded=0 module.include.files= module.source.name=src module.source.type= -module.source.expanded=0 module.source.files= module.pixmap.name=pixmaps module.pixmap.type= -module.pixmap.expanded=0 module.pixmap.files= module.data.name=data module.data.type= -module.data.expanded=0 module.data.files= module.help.name=help module.help.type= -module.help.expanded=0 module.help.files= module.doc.name=doc module.doc.type= -module.doc.expanded=0 module.doc.files= -module.po.expanded=0 module.po.files= compiler.options.supports= - compiler.options.include.paths= - compiler.options.library.paths= - compiler.options.libraries= compiler.options.libraries.selected= - compiler.options.defines= - +compiler.options.defines.selected= compiler.options.warning.buttons=0 0 1 1 1 1 1 1 1 1 1 0 1 1 0 1 - compiler.options.optimize.buttons=0 1 0 0 - compiler.options.other.buttons=1 0 - compiler.options.other.c.flags= - compiler.options.other.l.flags= - compiler.options.other.l.libs= -project.source.paths= - +project.src.paths= Only in ../abi: abiword.pws Only in ../abi/ac-helpers: config.guess Only in ../abi/ac-helpers: config.sub Only in ../abi/ac-helpers: install-sh Only in ../abi/ac-helpers: missing Only in ../abi/ac-helpers: mkinstalldirs Only in ../abi: aclocal.m4 Only in ../abi: autogen.err Only in ../abi: autom4te.cache Only in ../abi: config.log Only in ../abi: config.status Only in ../abi: configure diff -ru ../../abiword-2.0.11.abicvs/abi/configure.ac ../abi/configure.ac --- ../../abiword-2.0.11.abicvs/abi/configure.ac 2004-08-27 12:30:18.000000000 +0100 +++ ../abi/configure.ac 2004-09-02 12:27:29.000000000 +0100 @@ -112,7 +112,7 @@ ABI_DETECT_ICONV -ABIWORD_APP_NAME="AbiWord" +ABIWORD_APP_NAME="Word" AC_SUBST(ABIWORD_APP_NAME) ABIWORD_APP_LIBDIR="AbiWord" AC_SUBST(ABIWORD_APP_LIBDIR) diff -ru ../../abiword-2.0.11.abicvs/abi/configure.in ../abi/configure.in --- ../../abiword-2.0.11.abicvs/abi/configure.in 2004-08-27 12:30:18.000000000 +0100 +++ ../abi/configure.in 2004-09-02 12:27:29.000000000 +0100 @@ -106,7 +106,7 @@ ABI_DETECT_ICONV -ABIWORD_APP_NAME="AbiWord" +ABIWORD_APP_NAME="Word" AC_SUBST(ABIWORD_APP_NAME) ABIWORD_APP_LIBDIR="AbiWord" AC_SUBST(ABIWORD_APP_LIBDIR) Only in ../abi/src: GNUmakefile Only in ../abi/src: GNUmakefile.in Only in ../abi/src/af: GNUmakefile Only in ../abi/src/af: GNUmakefile.in Only in ../abi/src/af/ev: GNUmakefile Only in ../abi/src/af/ev: GNUmakefile.in Only in ../abi/src/af/ev/cocoa: GNUmakefile Only in ../abi/src/af/ev/cocoa: GNUmakefile.in Only in ../abi/src/af/ev: libEv.a Only in ../abi/src/af/ev/qnx: GNUmakefile Only in ../abi/src/af/ev/qnx: GNUmakefile.in Only in ../abi/src/af/ev/unix: .deps Only in ../abi/src/af/ev/unix: GNUmakefile Only in ../abi/src/af/ev/unix: GNUmakefile.in Only in ../abi/src/af/ev/unix: ev_UnixKeyboard.o diff -ru ../../abiword-2.0.11.abicvs/abi/src/af/ev/unix/ev_UnixMenu.cpp ../abi/src/af/ev/unix/ev_UnixMenu.cpp --- ../../abiword-2.0.11.abicvs/abi/src/af/ev/unix/ev_UnixMenu.cpp 2004-05-20 01:58:06.000000000 +0100 +++ ../abi/src/af/ev/unix/ev_UnixMenu.cpp 2004-09-17 14:47:43.000000000 +0100 @@ -522,7 +522,7 @@ {AP_MENU_ID_FILE_PRINT_PREVIEW, GTK_STOCK_PRINT_PREVIEW}, {AP_MENU_ID_FILE_EXIT, GTK_STOCK_QUIT}, {AP_MENU_ID_FILE_REVERT, GTK_STOCK_REVERT_TO_SAVED}, - + {AP_MENU_ID_FILE_RECENT_1, GTK_STOCK_NEW}, {AP_MENU_ID_FILE_RECENT_2, GTK_STOCK_NEW}, {AP_MENU_ID_FILE_RECENT_3, GTK_STOCK_NEW}, @@ -1080,6 +1080,24 @@ GtkWidget * item = static_cast(m_vecMenuWidgets.getNthItem(k)); UT_ASSERT(item); + // Get the dynamic label + const char ** data = _ev_GetLabelName(m_pUnixApp, m_pFrame, pAction, pLabel); + const char * szLabelName = data[0]; + const char * szMnemonicName = data[1]; + + // Dynamic label, check for add/change + // We always change the labels every time, it's actually cheaper + // than doing the test for conditional changes. + // The first child _should_ be a label + GtkWidget * child = gtk_bin_get_child(GTK_BIN(item)); + if (child) + { + // create a new updated label + char labelBuf[1024]; + // convert label into underscored version + _ev_convert(labelBuf, szLabelName); + gtk_label_set_text_with_mnemonic(GTK_LABEL(child), labelBuf); + } bool bEnable = true; if (pAction->hasGetStateFunction()) { Only in ../abi/src/af/ev/unix: ev_UnixMenu.o Only in ../abi/src/af/ev/unix: ev_UnixMouse.o diff -ru ../../abiword-2.0.11.abicvs/abi/src/af/ev/unix/ev_UnixToolbar.cpp ../abi/src/af/ev/unix/ev_UnixToolbar.cpp --- ../../abiword-2.0.11.abicvs/abi/src/af/ev/unix/ev_UnixToolbar.cpp 2004-05-20 01:58:06.000000000 +0100 +++ ../abi/src/af/ev/unix/ev_UnixToolbar.cpp 2004-09-12 16:54:55.000000000 +0100 @@ -570,6 +570,9 @@ case AP_TOOLBAR_ID_EDIT_CUT: stock_id = GTK_STOCK_CUT ; break ; case AP_TOOLBAR_ID_EDIT_COPY: stock_id = GTK_STOCK_COPY ; break ; case AP_TOOLBAR_ID_EDIT_PASTE: stock_id = GTK_STOCK_PASTE ; break ; + + case AP_TOOLBAR_ID_ZOOM_IN: stock_id = GTK_STOCK_ZOOM_IN ; break ; + case AP_TOOLBAR_ID_ZOOM_OUT: stock_id = GTK_STOCK_ZOOM_OUT ; break ; case AP_TOOLBAR_ID_FMT_BOLD: stock_id = GTK_STOCK_BOLD ; break ; case AP_TOOLBAR_ID_FMT_ITALIC: stock_id = GTK_STOCK_ITALIC ; break ; diff -ru ../../abiword-2.0.11.abicvs/abi/src/af/ev/unix/ev_UnixToolbar.h ../abi/src/af/ev/unix/ev_UnixToolbar.h --- ../../abiword-2.0.11.abicvs/abi/src/af/ev/unix/ev_UnixToolbar.h 2003-03-06 22:17:38.000000000 +0000 +++ ../abi/src/af/ev/unix/ev_UnixToolbar.h 2004-09-02 12:27:30.000000000 +0100 @@ -80,12 +80,3 @@ }; #endif /* EV_UNIXTOOLBAR_H */ - - - - - - - - - Only in ../abi/src/af/ev/unix: ev_UnixToolbar.o Only in ../abi/src/af/ev/unix: ev_UnixToolbar_ViewListener.o Only in ../abi/src/af/ev/unix: libEv_unix.a Only in ../abi/src/af/ev/xp: .deps Only in ../abi/src/af/ev/xp: GNUmakefile Only in ../abi/src/af/ev/xp: GNUmakefile.in diff -ru ../../abiword-2.0.11.abicvs/abi/src/af/ev/xp/ev_EditBinding.cpp ../abi/src/af/ev/xp/ev_EditBinding.cpp --- ../../abiword-2.0.11.abicvs/abi/src/af/ev/xp/ev_EditBinding.cpp 2003-08-16 16:39:54.000000000 +0100 +++ ../abi/src/af/ev/xp/ev_EditBinding.cpp 2004-09-15 11:48:49.000000000 +0100 @@ -23,6 +23,7 @@ #include #include #include +#include #include "ut_assert.h" #include "ut_debugmsg.h" @@ -404,7 +405,11 @@ // translate into displayable string static char buf[128]; memset(buf,0,NrElements(buf)); - + + // PSION-ABL to enable Shifted key mappings in menus. + if(((i-1) >= 'A' && (i-1) <='Z') || (i-1)=='+' || (i-1)=='*') + ems|=EV_EMS_SHIFT; + if (ems&EV_EMS_CONTROL) strcat(buf, "Ctrl+"); @@ -430,6 +435,10 @@ case EV_NVK_DELETE: szNVK = "Del"; break; + + case EV_NVK_HELP: + szNVK = "Fn+Help"; + break; case EV_NVK_F1: szNVK = "F1"; Only in ../abi/src/af/ev/xp: ev_EditBinding.o Only in ../abi/src/af/ev/xp: ev_EditEventMapper.o diff -ru ../../abiword-2.0.11.abicvs/abi/src/af/ev/xp/ev_EditMethod.cpp ../abi/src/af/ev/xp/ev_EditMethod.cpp --- ../../abiword-2.0.11.abicvs/abi/src/af/ev/xp/ev_EditMethod.cpp 2003-03-15 01:56:18.000000000 +0000 +++ ../abi/src/af/ev/xp/ev_EditMethod.cpp 2004-09-02 12:27:30.000000000 +0100 @@ -364,5 +364,3 @@ { return ev_EditMethod_lookup ( methodName.c_str() ) ; } - - Only in ../abi/src/af/ev/xp: ev_EditMethod.o Only in ../abi/src/af/ev/xp: ev_Keyboard.o Only in ../abi/src/af/ev/xp: ev_Menu.o Only in ../abi/src/af/ev/xp: ev_Menu_Actions.o Only in ../abi/src/af/ev/xp: ev_Menu_Labels.o Only in ../abi/src/af/ev/xp: ev_Menu_Layouts.o Only in ../abi/src/af/ev/xp: ev_Mouse.o Only in ../abi/src/af/ev/xp: ev_NamedVirtualKey.o Only in ../abi/src/af/ev/xp: ev_Toolbar.o diff -ru ../../abiword-2.0.11.abicvs/abi/src/af/ev/xp/ev_Toolbar_Actions.h ../abi/src/af/ev/xp/ev_Toolbar_Actions.h --- ../../abiword-2.0.11.abicvs/abi/src/af/ev/xp/ev_Toolbar_Actions.h 2001-09-28 21:56:18.000000000 +0100 +++ ../abi/src/af/ev/xp/ev_Toolbar_Actions.h 2004-09-02 12:27:30.000000000 +0100 @@ -73,9 +73,9 @@ EV_TBIT_DropDown = 5, /* list box w/no text entry */ EV_TBIT_ComboBox = 6, /* list box w/ text entry */ EV_TBIT_StaticLabel = 7, /* a static control */ - EV_TBIT_Spacer = 8, /* for extra space between buttons */ - EV_TBIT_ColorFore = 9, /* control to set the foreground color */ - EV_TBIT_ColorBack = 10 /* control to set the background color */ + EV_TBIT_Spacer = 8, /* for extra space between buttons */ + EV_TBIT_ColorFore = 9, /* control to set the foreground color */ + EV_TBIT_ColorBack = 10 /* control to set the background color */ } EV_Toolbar_ItemType; Only in ../abi/src/af/ev/xp: ev_Toolbar_Actions.o Only in ../abi/src/af/ev/xp: ev_Toolbar_Control.o Only in ../abi/src/af/ev/xp: ev_Toolbar_Labels.o Only in ../abi/src/af/ev/xp: ev_Toolbar_Layouts.o Only in ../abi/src/af/ev/xp: libEv_xp.a Only in ../abi/src/af/gr: GNUmakefile Only in ../abi/src/af/gr: GNUmakefile.in Only in ../abi/src/af/gr/cocoa: GNUmakefile Only in ../abi/src/af/gr/cocoa: GNUmakefile.in Only in ../abi/src/af/gr: libGr.a Only in ../abi/src/af/gr/qnx: GNUmakefile Only in ../abi/src/af/gr/qnx: GNUmakefile.in Only in ../abi/src/af/gr/unix: .deps Only in ../abi/src/af/gr/unix: GNUmakefile Only in ../abi/src/af/gr/unix: GNUmakefile.in diff -ru ../../abiword-2.0.11.abicvs/abi/src/af/gr/unix/gr_UnixGraphics.cpp ../abi/src/af/gr/unix/gr_UnixGraphics.cpp --- ../../abiword-2.0.11.abicvs/abi/src/af/gr/unix/gr_UnixGraphics.cpp 2004-03-24 14:02:05.000000000 +0000 +++ ../abi/src/af/gr/unix/gr_UnixGraphics.cpp 2004-09-02 12:27:30.000000000 +0100 @@ -1014,7 +1014,8 @@ GtkStyle *tempStyle = gtk_style_new(); const char *guiFontName = pango_font_description_get_family(tempStyle->font_desc); if (!guiFontName) - guiFontName = "Times New Roman"; +// guiFontName = "Times New Roman"; + guiFontName = "Thorndale AMT"; XAP_UnixFont * font = static_cast(m_pFontManager->searchFont(guiFontName)); // this operation should never fail g_object_unref(G_OBJECT(tempStyle)); UT_ASSERT(font); @@ -1304,6 +1305,7 @@ { gdk_window_scroll(m_pWin,ddx,ddy); } + setExposePending(true); // PSION-ABL AbiBug #7148 Backport. #else GdkRectangle xRect; GdkRectangle yRect; Only in ../abi/src/af/gr/unix: gr_UnixGraphics.o Only in ../abi/src/af/gr/unix: gr_UnixImage.o Only in ../abi/src/af/gr/unix: libGr_unix.a Only in ../abi/src/af/gr/xp: .deps Only in ../abi/src/af/gr/xp: GNUmakefile Only in ../abi/src/af/gr/xp: GNUmakefile.in diff -ru ../../abiword-2.0.11.abicvs/abi/src/af/gr/xp/gr_Caret.cpp ../abi/src/af/gr/xp/gr_Caret.cpp --- ../../abiword-2.0.11.abicvs/abi/src/af/gr/xp/gr_Caret.cpp 2003-10-26 15:35:53.000000000 +0000 +++ ../abi/src/af/gr/xp/gr_Caret.cpp 2004-09-13 13:56:38.000000000 +0100 @@ -394,4 +394,12 @@ m_pG->flush(); } + +/*! + * Only call this is you are absolutely certain you need it! + */ +void GR_Caret::forceDraw(void) +{ + _blink(true); +} ////////////////////////////////////////////////////////////////////////////////////// diff -ru ../../abiword-2.0.11.abicvs/abi/src/af/gr/xp/gr_Caret.h ../abi/src/af/gr/xp/gr_Caret.h --- ../../abiword-2.0.11.abicvs/abi/src/af/gr/xp/gr_Caret.h 2003-03-10 06:24:05.000000000 +0000 +++ ../abi/src/af/gr/xp/gr_Caret.h 2004-09-13 13:56:39.000000000 +0100 @@ -46,6 +46,7 @@ inline bool isEnabled() const { return m_nDisableCount == 0; } void setBlink(bool bBlink); + void forceDraw(void); // When you call setCoords, the cursor is explicitly shown // and the timer restarts from 0 for the next 500ms cycle. Only in ../abi/src/af/gr/xp: gr_Caret.o Only in ../abi/src/af/gr/xp: gr_CharWidths.o Only in ../abi/src/af/gr/xp: gr_CharWidthsCache.o Only in ../abi/src/af/gr/xp: gr_DrawArgs.o Only in ../abi/src/af/gr/xp: gr_Graphics.o Only in ../abi/src/af/gr/xp: gr_Image.o Only in ../abi/src/af/gr/xp: gr_Transform.o Only in ../abi/src/af/gr/xp: gr_VectorImage.o Only in ../abi/src/af/gr/xp: libGr_xp.a Only in ../abi/src/af/util: GNUmakefile Only in ../abi/src/af/util: GNUmakefile.in Only in ../abi/src/af/util: libUtil.a Only in ../abi/src/af/util/qnx: GNUmakefile Only in ../abi/src/af/util/qnx: GNUmakefile.in Only in ../abi/src/af/util/unix: .deps Only in ../abi/src/af/util/unix: GNUmakefile Only in ../abi/src/af/util/unix: GNUmakefile.in Only in ../abi/src/af/util/unix: libUtil_unix.a Only in ../abi/src/af/util/unix: ut_debugmsg.o Only in ../abi/src/af/util/unix: ut_files.o Only in ../abi/src/af/util/unix: ut_path.o Only in ../abi/src/af/util/unix: ut_unixAssert.o Only in ../abi/src/af/util/unix: ut_unixDirent.o Only in ../abi/src/af/util/unix: ut_unixIdle.o Only in ../abi/src/af/util/unix: ut_unixString.o Only in ../abi/src/af/util/unix: ut_unixTimer.o Only in ../abi/src/af/util/xp: .deps Only in ../abi/src/af/util/xp: GNUmakefile Only in ../abi/src/af/util/xp: GNUmakefile.in Only in ../abi/src/af/util/xp: libUtil_xp.a Only in ../abi/src/af/util/xp: ut_AbiObject.o Only in ../abi/src/af/util/xp: ut_AdobeEncoding.o Only in ../abi/src/af/util/xp: ut_Encoding.o Only in ../abi/src/af/util/xp: ut_IntStrMap.o Only in ../abi/src/af/util/xp: ut_Language.o Only in ../abi/src/af/util/xp: ut_OverstrikingChars.o Only in ../abi/src/af/util/xp: ut_Script.o Only in ../abi/src/af/util/xp: ut_allocator.o Only in ../abi/src/af/util/xp: ut_base64.o Only in ../abi/src/af/util/xp: ut_base64_TestRoutines.o Only in ../abi/src/af/util/xp: ut_bijection.o Only in ../abi/src/af/util/xp: ut_bytebuf.o Only in ../abi/src/af/util/xp: ut_contextGlyph.o Only in ../abi/src/af/util/xp: ut_decompress.o Only in ../abi/src/af/util/xp: ut_growbuf.o Only in ../abi/src/af/util/xp: ut_hash.o Only in ../abi/src/af/util/xp: ut_iconv.o Only in ../abi/src/af/util/xp: ut_idle.o Only in ../abi/src/af/util/xp: ut_locale.o diff -ru ../../abiword-2.0.11.abicvs/abi/src/af/util/xp/ut_map.h ../abi/src/af/util/xp/ut_map.h --- ../../abiword-2.0.11.abicvs/abi/src/af/util/xp/ut_map.h 2002-08-15 14:14:56.000000000 +0100 +++ ../abi/src/af/util/xp/ut_map.h 2004-09-02 12:27:30.000000000 +0100 @@ -61,7 +61,8 @@ #ifdef DEBUG void print() const { m_rbtree.print(); } // This method should be const. See UT_RBTree::checkInvariants comment - bool checkInvariants() { return m_rbtree.checkInvariants(); } + // PSION-ABL Arm compiler problem with this + // bool checkInvariants() { return m_rbtree.checkInvariants(); } #endif private: Only in ../abi/src/af/util/xp: ut_map.o Only in ../abi/src/af/util/xp: ut_math.o Only in ../abi/src/af/util/xp: ut_mbtowc.o Only in ../abi/src/af/util/xp: ut_misc.o Only in ../abi/src/af/util/xp: ut_mutex.o Only in ../abi/src/af/util/xp: ut_pair.o Only in ../abi/src/af/util/xp: ut_png.o Only in ../abi/src/af/util/xp: ut_rand.o diff -ru ../../abiword-2.0.11.abicvs/abi/src/af/util/xp/ut_rbtree.cpp ../abi/src/af/util/xp/ut_rbtree.cpp --- ../../abiword-2.0.11.abicvs/abi/src/af/util/xp/ut_rbtree.cpp 2001-07-20 01:12:41.000000000 +0100 +++ ../abi/src/af/util/xp/ut_rbtree.cpp 2004-09-02 12:27:30.000000000 +0100 @@ -635,6 +635,7 @@ return retval; } +/* PSION-ABL Arm compiler problem with this bool UT_RBTree::checkInvariants() { @@ -657,6 +658,7 @@ return true; } +*/ #endif UT_RBTree::Node* @@ -680,4 +682,3 @@ { return (strcmp(static_cast (x), static_cast (y)) == 0); } - Only in ../abi/src/af/util/xp: ut_rbtree.o diff -ru ../../abiword-2.0.11.abicvs/abi/src/af/util/xp/ut_set.h ../abi/src/af/util/xp/ut_set.h --- ../../abiword-2.0.11.abicvs/abi/src/af/util/xp/ut_set.h 2002-08-15 14:15:03.000000000 +0100 +++ ../abi/src/af/util/xp/ut_set.h 2004-09-02 12:27:30.000000000 +0100 @@ -54,7 +54,8 @@ #ifdef DEBUG void print() const { m_rbtree.print(); } // This method should be const. See UT_RBTree::checkInvariants comment - bool checkInvariants() { return m_rbtree.checkInvariants(); } + // PSION-ABL Arm compiler problem with this + // bool checkInvariants() { return m_rbtree.checkInvariants(); } #endif private: Only in ../abi/src/af/util/xp: ut_set.o Only in ../abi/src/af/util/xp: ut_spi.o Only in ../abi/src/af/util/xp: ut_stack.o Only in ../abi/src/af/util/xp: ut_string.o Only in ../abi/src/af/util/xp: ut_string_class.o Only in ../abi/src/af/util/xp: ut_stringbuf.o Only in ../abi/src/af/util/xp: ut_svg.o Only in ../abi/src/af/util/xp: ut_test.o Only in ../abi/src/af/util/xp: ut_thread.o Only in ../abi/src/af/util/xp: ut_timer.o Only in ../abi/src/af/util/xp: ut_types.o Only in ../abi/src/af/util/xp: ut_units.o Only in ../abi/src/af/util/xp: ut_vector.o Only in ../abi/src/af/util/xp: ut_wctomb.o Only in ../abi/src/af/util/xp: ut_worker.o Only in ../abi/src/af/util/xp: ut_xml.o diff -ru ../../abiword-2.0.11.abicvs/abi/src/af/util/xp/ut_xml_libxml2.cpp ../abi/src/af/util/xp/ut_xml_libxml2.cpp --- ../../abiword-2.0.11.abicvs/abi/src/af/util/xp/ut_xml_libxml2.cpp 2003-08-05 20:53:04.000000000 +0100 +++ ../abi/src/af/util/xp/ut_xml_libxml2.cpp 2004-09-02 12:27:31.000000000 +0100 @@ -182,7 +182,7 @@ if (xmlParseChunk (ctxt, buffer, static_cast(length), 0)) { - UT_DEBUGMSG (("Error parsing '%s' (Line: %d, Column: %d)\n", szFilename, getLineNumber(ctxt), getColumnNumber(ctxt))); +// PSION-ABL UT_DEBUGMSG (("Error parsing '%s' (Line: %d, Column: %d)\n", szFilename, getLineNumber(ctxt), getColumnNumber(ctxt))); ret = UT_IE_IMPORTERROR; break; } @@ -192,7 +192,7 @@ { if (xmlParseChunk (ctxt, "", 0, 1)) { - UT_DEBUGMSG (("Error parsing '%s' (Line: %d, Column: %d)\n", szFilename, getLineNumber(ctxt), getColumnNumber(ctxt))); +// PSION-ABL UT_DEBUGMSG (("Error parsing '%s' (Line: %d, Column: %d)\n", szFilename, getLineNumber(ctxt), getColumnNumber(ctxt))); ret = UT_IE_IMPORTERROR; } } Only in ../abi/src/af/util/xp: ut_xml_libxml2.o Only in ../abi/src/af/xap: GNUmakefile Only in ../abi/src/af/xap: GNUmakefile.in Only in ../abi/src/af/xap/cocoa: GNUmakefile Only in ../abi/src/af/xap/cocoa: GNUmakefile.in Only in ../abi/src/af/xap: libXap.a Only in ../abi/src/af/xap/qnx: GNUmakefile Only in ../abi/src/af/xap/qnx: GNUmakefile.in Only in ../abi/src/af/xap/unix: .deps Only in ../abi/src/af/xap/unix: GNUmakefile Only in ../abi/src/af/xap/unix: GNUmakefile.in Only in ../abi/src/af/xap/unix/gnome: GNUmakefile Only in ../abi/src/af/xap/unix/gnome: GNUmakefile.in diff -ru ../../abiword-2.0.11.abicvs/abi/src/af/xap/unix/gnome/xap_UnixGnomeDlg_About.cpp ../abi/src/af/xap/unix/gnome/xap_UnixGnomeDlg_About.cpp --- ../../abiword-2.0.11.abicvs/abi/src/af/xap/unix/gnome/xap_UnixGnomeDlg_About.cpp 2004-04-28 10:51:11.000000000 +0100 +++ ../abi/src/af/xap/unix/gnome/xap_UnixGnomeDlg_About.cpp 2004-09-02 12:27:31.000000000 +0100 @@ -83,4 +83,3 @@ abiSetupModelessDialog (GTK_DIALOG(mainWindow), pFrame, this, GTK_RESPONSE_CLOSE, false); gtk_widget_show (mainWindow); } - Only in ../abi/src/af/xap/unix: libXap_unix.a Only in ../abi/src/af/xap/unix: xap_UnixApp.o Only in ../abi/src/af/xap/unix: xap_UnixClipboard.o Only in ../abi/src/af/xap/unix: xap_UnixDialogHelper.o diff -ru ../../abiword-2.0.11.abicvs/abi/src/af/xap/unix/xap_UnixDlg_About.cpp ../abi/src/af/xap/unix/xap_UnixDlg_About.cpp --- ../../abiword-2.0.11.abicvs/abi/src/af/xap/unix/xap_UnixDlg_About.cpp 2003-07-24 23:14:11.000000000 +0100 +++ ../abi/src/af/xap/unix/xap_UnixDlg_About.cpp 2004-09-02 12:27:31.000000000 +0100 @@ -150,9 +150,12 @@ abiDialogSetTitle(window, XAP_ABOUT_TITLE, m_pApp->getApplicationName()); - UT_String title = UT_String_sprintf("%s %s", m_pApp->getApplicationName(), XAP_App::s_szBuild_Version); + UT_String title = UT_String_sprintf("%s %s", "AbiWord", XAP_App::s_szBuild_Version); setLabelMarkup(glade_xml_get_widget(xml, "lbTitle"), title.c_str()); + //UT_String description = UT_String_sprintf(XAP_ABOUT_APP_VERSION_DESCRIPTION"%s %s", "AbiWord", XAP_App::s_szBuild_Version); + setLabelMarkup(glade_xml_get_widget(xml, "lbDesc"), XAP_ABOUT_APP_VERSION_DESCRIPTION);//description.c_str()); + UT_String license = UT_String_sprintf(XAP_ABOUT_GPL_LONG_LINE_BROKEN, m_pApp->getApplicationName()); setLabelMarkup(glade_xml_get_widget(xml, "lbLicense"), license.c_str()); diff -ru ../../abiword-2.0.11.abicvs/abi/src/af/xap/unix/xap_UnixDlg_About.glade ../abi/src/af/xap/unix/xap_UnixDlg_About.glade --- ../../abiword-2.0.11.abicvs/abi/src/af/xap/unix/xap_UnixDlg_About.glade 2003-04-24 01:23:45.000000000 +0100 +++ ../abi/src/af/xap/unix/xap_UnixDlg_About.glade 2004-09-02 12:27:31.000000000 +0100 @@ -11,6 +11,11 @@ True True False + True + False + False + GDK_WINDOW_TYPE_HINT_DIALOG + GDK_GRAVITY_NORTH_WEST True @@ -32,6 +37,7 @@ http://www.abisource.com True GTK_RELIEF_NORMAL + True 1 @@ -44,6 +50,7 @@ gtk-ok True GTK_RELIEF_NORMAL + True 0 @@ -59,20 +66,20 @@ True - 4 + 5 1 False 0 0 - + True - <span size="smaller">%s</span> + <span weight="ultrabold" size="xx-large">%s</span> False True - GTK_JUSTIFY_CENTER - True + GTK_JUSTIFY_LEFT + False False 0.5 0.5 @@ -82,8 +89,25 @@ 0 1 - 2 - 3 + 1 + 2 + 12 + + + + + + + + 0 + 1 + 0 + 1 + @@ -105,21 +129,21 @@ 0 1 - 3 - 4 + 4 + 5 12 - + True - <span weight="ultrabold" size="xx-large">%s</span> + <span size="smaller">%s</span> False True - GTK_JUSTIFY_LEFT - False + GTK_JUSTIFY_CENTER + True False 0.5 0.5 @@ -129,25 +153,32 @@ 0 1 - 1 - 2 - 12 + 3 + 4 - Only in ../abi/src/af/xap/unix: xap_UnixDlg_About.o Only in ../abi/src/af/xap/unix: xap_UnixDlg_ClipArt.o Only in ../abi/src/af/xap/unix: xap_UnixDlg_Encoding.o Only in ../abi/src/af/xap/unix: xap_UnixDlg_FileOpenSaveAs.o Only in ../abi/src/af/xap/unix: xap_UnixDlg_FontChooser.o Only in ../abi/src/af/xap/unix: xap_UnixDlg_HTMLOptions.o Only in ../abi/src/af/xap/unix: xap_UnixDlg_Image.o Only in ../abi/src/af/xap/unix: xap_UnixDlg_Insert_Symbol.o Only in ../abi/src/af/xap/unix: xap_UnixDlg_Language.o Only in ../abi/src/af/xap/unix: xap_UnixDlg_MessageBox.o Only in ../abi/src/af/xap/unix: xap_UnixDlg_Password.o Only in ../abi/src/af/xap/unix: xap_UnixDlg_PluginManager.o Only in ../abi/src/af/xap/unix: xap_UnixDlg_Print.o Only in ../abi/src/af/xap/unix: xap_UnixDlg_PrintPreview.o Only in ../abi/src/af/xap/unix: xap_UnixDlg_WindowMore.o diff -ru ../../abiword-2.0.11.abicvs/abi/src/af/xap/unix/xap_UnixDlg_Zoom.cpp ../abi/src/af/xap/unix/xap_UnixDlg_Zoom.cpp --- ../../abiword-2.0.11.abicvs/abi/src/af/xap/unix/xap_UnixDlg_Zoom.cpp 2003-09-30 13:29:25.000000000 +0100 +++ ../abi/src/af/xap/unix/xap_UnixDlg_Zoom.cpp 2004-09-20 14:47:56.000000000 +0100 @@ -63,8 +63,9 @@ m_previewArea = NULL; m_radio200 = NULL; + m_radio150 = NULL; m_radio100 = NULL; - m_radio75 = NULL; +// m_radio75 = NULL; m_radioPageWidth = NULL; m_radioWholePage = NULL; m_radioPercent = NULL; @@ -87,17 +88,24 @@ dlg->event_Radio200Clicked(); } +void XAP_UnixDialog_Zoom::s_radio_150_clicked(GtkWidget * widget, XAP_UnixDialog_Zoom * dlg) +{ + UT_return_if_fail(widget && dlg); + dlg->event_Radio150Clicked(); +} + void XAP_UnixDialog_Zoom::s_radio_100_clicked(GtkWidget * widget, XAP_UnixDialog_Zoom * dlg) { UT_return_if_fail(widget && dlg); dlg->event_Radio100Clicked(); } +/* void XAP_UnixDialog_Zoom::s_radio_75_clicked(GtkWidget * widget, XAP_UnixDialog_Zoom * dlg) { UT_return_if_fail(widget && dlg); dlg->event_Radio75Clicked(); } - +*/ void XAP_UnixDialog_Zoom::s_radio_PageWidth_clicked(GtkWidget * widget, XAP_UnixDialog_Zoom * dlg) { UT_return_if_fail(widget && dlg); @@ -192,17 +200,23 @@ _updatePreviewZoomPercent(200); } +void XAP_UnixDialog_Zoom::event_Radio150Clicked(void) +{ + _enablePercentSpin(false); + _updatePreviewZoomPercent(150); +} + void XAP_UnixDialog_Zoom::event_Radio100Clicked(void) { _enablePercentSpin(false); _updatePreviewZoomPercent(100); } -void XAP_UnixDialog_Zoom::event_Radio75Clicked(void) +/*void XAP_UnixDialog_Zoom::event_Radio75Clicked(void) { _enablePercentSpin(false); _updatePreviewZoomPercent(75); -} +}*/ void XAP_UnixDialog_Zoom::event_RadioPageWidthClicked(void) { @@ -262,8 +276,9 @@ m_previewArea = glade_xml_get_widget(xml, "daPreview"); m_radioGroup = gtk_radio_button_get_group (GTK_RADIO_BUTTON ( glade_xml_get_widget(xml, "rbPercent200") )); m_radio200 = glade_xml_get_widget(xml, "rbPercent200"); + m_radio150 = glade_xml_get_widget(xml, "rbPercent150"); m_radio100 = glade_xml_get_widget(xml, "rbPercent100"); - m_radio75 = glade_xml_get_widget(xml, "rbPercent75"); +// m_radio75 = glade_xml_get_widget(xml, "rbPercent75"); m_radioPageWidth = glade_xml_get_widget(xml, "rbPageWidth"); m_radioWholePage = glade_xml_get_widget(xml, "rbWholePage"); m_radioPercent = glade_xml_get_widget(xml, "rbPercent"); @@ -282,12 +297,15 @@ localizeButton(m_radio200, pSS, XAP_STRING_ID_DLG_Zoom_200); g_object_set_data (G_OBJECT (m_radio200), WIDGET_ID_TAG_KEY, GINT_TO_POINTER(XAP_Frame::z_200)); + + localizeButton(m_radio150, pSS, XAP_STRING_ID_DLG_Zoom_150); + g_object_set_data (G_OBJECT (m_radio150), WIDGET_ID_TAG_KEY, GINT_TO_POINTER(XAP_Frame::z_150)); localizeButton(m_radio100, pSS, XAP_STRING_ID_DLG_Zoom_100); g_object_set_data (G_OBJECT (m_radio100), WIDGET_ID_TAG_KEY, GINT_TO_POINTER(XAP_Frame::z_100)); - localizeButton(m_radio75, pSS, XAP_STRING_ID_DLG_Zoom_75); - g_object_set_data (G_OBJECT (m_radio75), WIDGET_ID_TAG_KEY, GINT_TO_POINTER(XAP_Frame::z_75)); +/* localizeButton(m_radio75, pSS, XAP_STRING_ID_DLG_Zoom_75); + g_object_set_data (G_OBJECT (m_radio75), WIDGET_ID_TAG_KEY, GINT_TO_POINTER(XAP_Frame::z_75));*/ localizeButton(m_radioPageWidth, pSS, XAP_STRING_ID_DLG_Zoom_PageWidth); g_object_set_data (G_OBJECT (m_radioPageWidth), WIDGET_ID_TAG_KEY, GINT_TO_POINTER(XAP_Frame::z_PAGEWIDTH)); @@ -302,8 +320,9 @@ // Connect clicked signals so that our callbacks get called. g_signal_connect(G_OBJECT(m_radio200), "clicked", G_CALLBACK(s_radio_200_clicked), static_cast(this)); + g_signal_connect(G_OBJECT(m_radio100), "clicked", G_CALLBACK(s_radio_150_clicked), static_cast(this)); g_signal_connect(G_OBJECT(m_radio100), "clicked", G_CALLBACK(s_radio_100_clicked), static_cast(this)); - g_signal_connect(G_OBJECT(m_radio75), "clicked", G_CALLBACK(s_radio_75_clicked), static_cast(this)); +// g_signal_connect(G_OBJECT(m_radio75), "clicked", G_CALLBACK(s_radio_75_clicked), static_cast(this)); g_signal_connect(G_OBJECT(m_radioPageWidth), "clicked", G_CALLBACK(s_radio_PageWidth_clicked), static_cast(this)); g_signal_connect(G_OBJECT(m_radioWholePage), "clicked", G_CALLBACK(s_radio_WholePage_clicked), static_cast(this)); g_signal_connect(G_OBJECT(m_radioPercent), "clicked", G_CALLBACK(s_radio_Percent_clicked), static_cast(this)); @@ -332,14 +351,18 @@ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(m_radio200), TRUE); _updatePreviewZoomPercent(200); break; + case XAP_Frame::z_150: + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(m_radio100), TRUE); + _updatePreviewZoomPercent(100); + break; case XAP_Frame::z_100: gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(m_radio100), TRUE); _updatePreviewZoomPercent(100); break; - case XAP_Frame::z_75: + /*case XAP_Frame::z_75: gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(m_radio75), TRUE); _updatePreviewZoomPercent(75); - break; + break;*/ case XAP_Frame::z_PAGEWIDTH: gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(m_radioPageWidth), TRUE); break; diff -ru ../../abiword-2.0.11.abicvs/abi/src/af/xap/unix/xap_UnixDlg_Zoom.glade ../abi/src/af/xap/unix/xap_UnixDlg_Zoom.glade --- ../../abiword-2.0.11.abicvs/abi/src/af/xap/unix/xap_UnixDlg_Zoom.glade 2003-04-24 01:23:46.000000000 +0100 +++ ../abi/src/af/xap/unix/xap_UnixDlg_Zoom.glade 2004-09-20 18:02:59.000000000 +0100 @@ -11,6 +11,11 @@ True True False + True + False + False + GDK_WINDOW_TYPE_HINT_DIALOG + GDK_GRAVITY_NORTH_WEST True @@ -32,6 +37,7 @@ gtk-cancel True GTK_RELIEF_NORMAL + True -6 @@ -44,6 +50,7 @@ gtk-ok True GTK_RELIEF_NORMAL + True -5 @@ -129,6 +136,7 @@ 200% True GTK_RELIEF_NORMAL + True True False True @@ -145,13 +153,14 @@ - + True True - 100% + Whole page True GTK_RELIEF_NORMAL - False + True + True False True rbPercent200 @@ -159,43 +168,49 @@ 0 1 - 2 - 3 + 5 + 6 12 + 6 - + True - True - Whole page - True - GTK_RELIEF_NORMAL - True - False - True - rbPercent200 + 0 + 0 + GTK_SHADOW_OUT + + + + 146 + 190 + True + + - 0 - 1 - 5 - 6 + 1 + 2 + 1 + 8 12 6 - + fill + fill - + True True - 75% + Percent: True GTK_RELIEF_NORMAL + True False False True @@ -204,72 +219,71 @@ 0 1 - 3 - 4 + 6 + 7 12 - 6 fill - + True True - Page width - True - GTK_RELIEF_NORMAL - False - False - True - rbPercent200 + 1 + 0 + True + GTK_UPDATE_ALWAYS + False + False + 100 10 500 1 10 10 0 1 - 4 - 5 - 12 + 7 + 8 + 24 + 6 fill - + True - 0 - 0 - GTK_SHADOW_OUT - - - - 146 - 190 - True - - + True + 150% + True + GTK_RELIEF_NORMAL + True + False + False + True + rbPercent200 - 1 - 2 - 1 - 8 + 0 + 1 + 2 + 3 12 6 fill - fill + - + True True - Percent: + 100% True GTK_RELIEF_NORMAL + True False False True @@ -278,32 +292,33 @@ 0 1 - 6 - 7 + 3 + 4 12 - fill + 6 - + True True - 1 - 0 - True - GTK_UPDATE_ALWAYS - False - False - 100 10 500 1 10 10 + Page width + True + GTK_RELIEF_NORMAL + True + False + False + True + rbPercent200 0 1 - 7 - 8 - 24 + 4 + 5 + 12 6 fill Only in ../abi/src/af/xap/unix: xap_UnixDlg_Zoom.glade.bak Only in ../abi/src/af/xap/unix: xap_UnixDlg_Zoom.gladep Only in ../abi/src/af/xap/unix: xap_UnixDlg_Zoom.gladep.bak diff -ru ../../abiword-2.0.11.abicvs/abi/src/af/xap/unix/xap_UnixDlg_Zoom.h ../abi/src/af/xap/unix/xap_UnixDlg_Zoom.h --- ../../abiword-2.0.11.abicvs/abi/src/af/xap/unix/xap_UnixDlg_Zoom.h 2003-07-24 23:14:17.000000000 +0100 +++ ../abi/src/af/xap/unix/xap_UnixDlg_Zoom.h 2004-09-20 14:47:56.000000000 +0100 @@ -41,8 +41,9 @@ // callbacks can fire these events virtual void event_Radio200Clicked(void); + virtual void event_Radio150Clicked(void); virtual void event_Radio100Clicked(void); - virtual void event_Radio75Clicked(void); +// virtual void event_Radio75Clicked(void); virtual void event_RadioPageWidthClicked(void); virtual void event_RadioWholePageClicked(void); @@ -54,8 +55,10 @@ static void s_radio_200_clicked(GtkWidget * widget, XAP_UnixDialog_Zoom * dlg) ; static void s_radio_100_clicked(GtkWidget * widget, XAP_UnixDialog_Zoom * dlg) ; + + static void s_radio_150_clicked(GtkWidget * widget, XAP_UnixDialog_Zoom * dlg) ; - static void s_radio_75_clicked(GtkWidget * widget, XAP_UnixDialog_Zoom * dlg) ; +// static void s_radio_75_clicked(GtkWidget * widget, XAP_UnixDialog_Zoom * dlg) ; static void s_radio_PageWidth_clicked(GtkWidget * widget, XAP_UnixDialog_Zoom * dlg) ; @@ -83,8 +86,9 @@ GtkWidget * m_previewArea; GtkWidget * m_radio200; + GtkWidget * m_radio150; GtkWidget * m_radio100; - GtkWidget * m_radio75; +// GtkWidget * m_radio75; GtkWidget * m_radioPageWidth; GtkWidget * m_radioWholePage; GtkWidget * m_radioPercent; Only in ../abi/src/af/xap/unix: xap_UnixDlg_Zoom.o Only in ../abi/src/af/xap/unix: xap_UnixEncodingManager.o diff -ru ../../abiword-2.0.11.abicvs/abi/src/af/xap/unix/xap_UnixFont.cpp ../abi/src/af/xap/unix/xap_UnixFont.cpp --- ../../abiword-2.0.11.abicvs/abi/src/af/xap/unix/xap_UnixFont.cpp 2004-03-24 14:02:19.000000000 +0000 +++ ../abi/src/af/xap/unix/xap_UnixFont.cpp 2004-09-02 12:27:31.000000000 +0100 @@ -281,6 +281,7 @@ if (stFontFile > 4) { if (!UT_stricmp(m_fontfile + stFontFile - 4, ".ttf") || + !UT_stricmp(m_fontfile + stFontFile - 4, ".otf") || !UT_stricmp(m_fontfile + stFontFile - 5, ".font")) m_fontType = FONT_TYPE_TTF; else if (!UT_stricmp(m_fontfile + stFontFile - 4, ".pfa")) Only in ../abi/src/af/xap/unix: xap_UnixFont.o Only in ../abi/src/af/xap/unix: xap_UnixFontManager.o Only in ../abi/src/af/xap/unix: xap_UnixFontPreview.o Only in ../abi/src/af/xap/unix: xap_UnixFontXLFD.o diff -ru ../../abiword-2.0.11.abicvs/abi/src/af/xap/unix/xap_UnixFrameImpl.cpp ../abi/src/af/xap/unix/xap_UnixFrameImpl.cpp --- ../../abiword-2.0.11.abicvs/abi/src/af/xap/unix/xap_UnixFrameImpl.cpp 2004-02-15 21:48:32.000000000 +0000 +++ ../abi/src/af/xap/unix/xap_UnixFrameImpl.cpp 2004-09-08 15:43:20.000000000 +0100 @@ -774,7 +774,7 @@ rClip.top = pGr->tlu(pExposeEvent->area.y); rClip.width = pGr->tlu(pExposeEvent->area.width); rClip.height = pGr->tlu(pExposeEvent->area.height); - + pGr->setExposePending(false); // PSION-ABL AbiBug #7148 Backport. pView->draw(&rClip); } return FALSE; Only in ../abi/src/af/xap/unix: xap_UnixFrameImpl.cpp.orig Only in ../abi/src/af/xap/unix: xap_UnixFrameImpl.o Only in ../abi/src/af/xap/unix: xap_UnixGtkColorPicker.o Only in ../abi/src/af/xap/unix: xap_UnixModule.o Only in ../abi/src/af/xap/unix: xap_UnixNullGraphics.o Only in ../abi/src/af/xap/unix: xap_UnixPSFont.o Only in ../abi/src/af/xap/unix: xap_UnixPSGenerate.o Only in ../abi/src/af/xap/unix: xap_UnixPSGraphics.o Only in ../abi/src/af/xap/unix: xap_UnixPSImage.o Only in ../abi/src/af/xap/unix: xap_UnixPSParseAFM.o Only in ../abi/src/af/xap/unix: xap_UnixTableWidget.o Only in ../abi/src/af/xap/unix: xap_UnixToolbar_Icons.o Only in ../abi/src/af/xap/xp: .deps Only in ../abi/src/af/xap/xp: GNUmakefile Only in ../abi/src/af/xap/xp: GNUmakefile.in Only in ../abi/src/af/xap/xp: libXap_xp.a Only in ../abi/src/af/xap/xp: xad_Document.o Only in ../abi/src/af/xap/xp: xap_App.o Only in ../abi/src/af/xap/xp: xap_Args.o Only in ../abi/src/af/xap/xp: xap_Clipboard.o Only in ../abi/src/af/xap/xp: xap_Dialog.o Only in ../abi/src/af/xap/xp: xap_DialogFactory.o Only in ../abi/src/af/xap/xp: xap_Dictionary.o diff -ru ../../abiword-2.0.11.abicvs/abi/src/af/xap/xp/xap_Dlg_About.h ../abi/src/af/xap/xp/xap_Dlg_About.h --- ../../abiword-2.0.11.abicvs/abi/src/af/xap/xp/xap_Dlg_About.h 2004-04-28 10:51:12.000000000 +0100 +++ ../abi/src/af/xap/xp/xap_Dlg_About.h 2004-09-06 14:50:03.000000000 +0100 @@ -33,7 +33,8 @@ #define XAP_ABOUT_VERSION "Version: %s" #define XAP_ABOUT_BUILD "Build options: %s" #define XAP_ABOUT_URL "For more information: http://www.abisource.com/" -#define XAP_ABOUT_GPL_LONG "AbiWord and AbiSource are trademarks of AbiSource, Inc.\r\n\r\n%s is free software; you can redistribute it and/or \ +#define XAP_ABOUT_GPL_LONG "AbiWord and AbiSource are trademarks of AbiSource, Inc.\r\n \ PSION and the PSION Logo are trademarks of PSION PLC.\r\n\ +\r\n%s / AbiWord is free software; you can redistribute it and/or \ modify it under the terms of the GNU General Public License \ as published by the Free Software Foundation; either version 2 \ of the License, or (at your option) any later version.\r\n\r\n\ @@ -42,7 +43,10 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the \ GNU General Public License for more details." -#define XAP_ABOUT_GPL_LONG_LINE_BROKEN "AbiWord and AbiSource are trademarks of\nAbiSource, Inc.\n\n%s is free software; you can redistribute it\n \ +#define XAP_ABOUT_APP_VERSION_DESCRIPTION "The Word Processor on your Psion" + +#define XAP_ABOUT_GPL_LONG_LINE_BROKEN "AbiWord and AbiSource are trademarks of\nAbiSource, Inc.\n\nPSION and the PSION Logo are trademarks of PSION PLC.\n\ +\n\%s / AbiWord is free software; you can redistribute it\n \ and/or modify it under the terms of the GNU General\n \ Public License as published by the Free Software\n \ Foundation; either version 2 of the License, or (at your\n \ @@ -53,7 +57,7 @@ FOR A PARTICULAR PURPOSE. See the GNU General\n \ Public License for more details." -#define XAP_ABOUT_GPL_LONG_LF "AbiWord and AbiSource are trademarks of AbiSource, Inc.\n\n%s is free software; you can redistribute it and/or \ +#define XAP_ABOUT_GPL_LONG_LF "AbiWord and AbiSource are trademarks of AbiSource, Inc.\n\n%s / AbiWord is free software; you can redistribute it and/or \ modify it under the terms of the GNU General Public License \ as published by the Free Software Foundation; either version 2 \ of the License, or (at your option) any later version.\n\n\ Only in ../abi/src/af/xap/xp: xap_Dlg_About.o Only in ../abi/src/af/xap/xp: xap_Dlg_ClipArt.o Only in ../abi/src/af/xap/xp: xap_Dlg_Encoding.o Only in ../abi/src/af/xap/xp: xap_Dlg_FileOpenSaveAs.o diff -ru ../../abiword-2.0.11.abicvs/abi/src/af/xap/xp/xap_Dlg_FontChooser.cpp ../abi/src/af/xap/xp/xap_Dlg_FontChooser.cpp --- ../../abiword-2.0.11.abicvs/abi/src/af/xap/xp/xap_Dlg_FontChooser.cpp 2003-08-11 20:50:26.000000000 +0100 +++ ../abi/src/af/xap/xp/xap_Dlg_FontChooser.cpp 2004-09-02 12:27:31.000000000 +0100 @@ -611,7 +611,8 @@ const char* pszStretch = getVal("font-stretch"); const char* pszSize = getVal("font-size"); if(!pszFamily) - pszFamily = "Times New Roman"; +// pszFamily = "Times New Roman"; + pszFamily = "Thorndale AMT"; if(!pszStyle) pszStyle = "normal"; Only in ../abi/src/af/xap/xp: xap_Dlg_FontChooser.o Only in ../abi/src/af/xap/xp: xap_Dlg_HTMLOptions.o Only in ../abi/src/af/xap/xp: xap_Dlg_Image.o Only in ../abi/src/af/xap/xp: xap_Dlg_Insert_Symbol.o Only in ../abi/src/af/xap/xp: xap_Dlg_Language.o Only in ../abi/src/af/xap/xp: xap_Dlg_MessageBox.o Only in ../abi/src/af/xap/xp: xap_Dlg_Password.o Only in ../abi/src/af/xap/xp: xap_Dlg_PluginManager.o Only in ../abi/src/af/xap/xp: xap_Dlg_Print.o Only in ../abi/src/af/xap/xp: xap_Dlg_PrintPreview.o Only in ../abi/src/af/xap/xp: xap_Dlg_WindowMore.o diff -ru ../../abiword-2.0.11.abicvs/abi/src/af/xap/xp/xap_Dlg_Zoom.cpp ../abi/src/af/xap/xp/xap_Dlg_Zoom.cpp --- ../../abiword-2.0.11.abicvs/abi/src/af/xap/xp/xap_Dlg_Zoom.cpp 2003-03-19 20:37:45.000000000 +0000 +++ ../abi/src/af/xap/xp/xap_Dlg_Zoom.cpp 2004-09-17 17:24:04.000000000 +0100 @@ -69,6 +69,9 @@ case 200: m_zoomType = XAP_Frame::z_200; break; + case 150: + m_zoomType = XAP_Frame::z_150; + break; case 100: m_zoomType = XAP_Frame::z_100; break; @@ -99,6 +102,8 @@ { case XAP_Frame::z_200: return 200; + case XAP_Frame::z_150: + return 150; case XAP_Frame::z_100: return 100; case XAP_Frame::z_75: @@ -143,7 +148,8 @@ UT_ASSERT(m_zoomPreview); m_zoomPreview->setWindowSize(width, height); - m_zoomPreview->setString("10-pt Times New Roman"); +// m_zoomPreview->setString("10-pt Times New Roman"); + m_zoomPreview->setString("10-pt Thorndale AMT"); m_zoomPreview->setFont(XAP_Preview_Zoom::font_NORMAL); m_zoomPreview->setZoomPercent(m_zoomPercent); Only in ../abi/src/af/xap/xp: xap_Dlg_Zoom.o Only in ../abi/src/af/xap/xp: xap_Draw_Symbol.o Only in ../abi/src/af/xap/xp: xap_EncodingManager.o Only in ../abi/src/af/xap/xp: xap_FakeClipboard.o Only in ../abi/src/af/xap/xp: xap_FontPreview.o diff -ru ../../abiword-2.0.11.abicvs/abi/src/af/xap/xp/xap_Frame.cpp ../abi/src/af/xap/xp/xap_Frame.cpp --- ../../abiword-2.0.11.abicvs/abi/src/af/xap/xp/xap_Frame.cpp 2003-12-10 16:51:55.000000000 +0000 +++ ../abi/src/af/xap/xp/xap_Frame.cpp 2004-09-02 12:27:31.000000000 +0100 @@ -697,7 +697,7 @@ bool XAP_Frame::repopulateCombos(void) { - // +// // Update the styles combo box. // EV_Toolbar * pTbar = NULL; @@ -706,7 +706,9 @@ { pTbar = getToolbar(ibar++); if(pTbar) + { pTbar->repopulateStyles(); + } } while(pTbar); return true; @@ -1145,4 +1147,3 @@ return NULL; } - diff -ru ../../abiword-2.0.11.abicvs/abi/src/af/xap/xp/xap_Frame.h ../abi/src/af/xap/xp/xap_Frame.h --- ../../abiword-2.0.11.abicvs/abi/src/af/xap/xp/xap_Frame.h 2003-07-22 09:10:45.000000000 +0100 +++ ../abi/src/af/xap/xp/xap_Frame.h 2004-09-17 17:24:04.000000000 +0100 @@ -169,7 +169,7 @@ bool runModalContextMenu(AV_View * pView, const char * szMenuName, UT_sint32 x, UT_sint32 y) { return m_pFrameImpl->_runModalContextMenu(pView, szMenuName, x, y); } - typedef enum { z_200, z_100, z_75, z_PAGEWIDTH, z_WHOLEPAGE, z_PERCENT } tZoomType; + typedef enum { z_200, z_150, z_100, z_75, z_PAGEWIDTH, z_WHOLEPAGE, z_PERCENT } tZoomType; virtual void setZoomPercentage(UT_uint32 iZoom); virtual UT_uint32 getZoomPercentage(); void setZoomType(XAP_Frame::tZoomType z_Type){ m_zoomType = z_Type; } @@ -298,12 +298,3 @@ }; #endif /* XAP_Frame_H */ - - - - - - - - - Only in ../abi/src/af/xap/xp: xap_Frame.o Only in ../abi/src/af/xap/xp: xap_FrameImpl.o Only in ../abi/src/af/xap/xp: xap_LoadBindings.o Only in ../abi/src/af/xap/xp: xap_Log.o Only in ../abi/src/af/xap/xp: xap_Module.o Only in ../abi/src/af/xap/xp: xap_ModuleManager.o Only in ../abi/src/af/xap/xp: xap_Prefs.o diff -ru ../../abiword-2.0.11.abicvs/abi/src/af/xap/xp/xap_Prefs_SchemeIds.h ../abi/src/af/xap/xp/xap_Prefs_SchemeIds.h --- ../../abiword-2.0.11.abicvs/abi/src/af/xap/xp/xap_Prefs_SchemeIds.h 2003-08-11 20:50:27.000000000 +0100 +++ ../abi/src/af/xap/xp/xap_Prefs_SchemeIds.h 2004-09-02 12:27:31.000000000 +0100 @@ -42,7 +42,7 @@ ////////////////////////////////////////////////////////////////////////////////////// #define XAP_PREF_KEY_ToolbarAppearance "ToolbarAppearance" -#define XAP_PREF_DEFAULT_ToolbarAppearance "icon" /* {icon,text,both} */ +#define XAP_PREF_DEFAULT_ToolbarAppearance "icon"//"both"//"icon" /* {icon,text,both} */ #define XAP_PREF_KEY_RemapGlyphsDefault "RemapGlyphsDefault" /* default replacement glyph for originals not mentioned in the table */ @@ -52,7 +52,7 @@ /* smart quotes */ #define XAP_PREF_KEY_SmartQuotesEnable "SmartQuotesEnable" /* substitute curly smart quotes on the fly */ -#define XAP_PREF_DEFAULT_SmartQuotesEnable "0" +#define XAP_PREF_DEFAULT_SmartQuotesEnable "1" #define XAP_PREF_KEY_UseSuffix "UseSuffix" /* append suffixes to saved files */ @@ -123,7 +123,7 @@ #define XAP_PREF_DEFAULT_ColorForRevision10 "ff0000" #define XAP_PREF_KEY_DefaultSaveDirectory "DefaultSaveDirectory" -#define XAP_PREF_DEFAULT_DefaultSaveDirectory "" /* empty for $PWD basically */ +#define XAP_PREF_DEFAULT_DefaultSaveDirectory "~/My\ Documents" /* empty for $PWD basically */ #define XAP_PREF_KEY_ZoomType "ZoomType" #define XAP_PREF_DEFAULT_ZoomType "Width" /* 100, Width, Page */ @@ -133,13 +133,13 @@ #define XAP_PREF_DEFAULT_ZoomPercentage "100" #define XAP_PREF_KEY_AllowCustomToolbars "AllowCustomToolbars" -#define XAP_PREF_DEFAULT_AllowCustomToolbars "0" +#define XAP_PREF_DEFAULT_AllowCustomToolbars "0"//"0" #define XAP_PREF_KEY_EnableSmoothScrolling "EnableSmoothScrolling" -#define XAP_PREF_DEFAULT_EnableSmoothScrolling "1" +#define XAP_PREF_DEFAULT_EnableSmoothScrolling "0"//"1" #define XAP_PREF_KEY_HaveCustomToolbars "HaveCustomToolbars" -#define XAP_PREF_DEFAULT_HaveCustomToolbars "0" +#define XAP_PREF_DEFAULT_HaveCustomToolbars "0"//"0" #define XAP_PREF_KEY_AutoLoadPlugins "AutoLoadPlugins" #define XAP_PREF_DEFAULT_AutoLoadPlugins "1" Only in ../abi/src/af/xap/xp: xap_Preview.o diff -ru ../../abiword-2.0.11.abicvs/abi/src/af/xap/xp/xap_Preview_Zoom.cpp ../abi/src/af/xap/xp/xap_Preview_Zoom.cpp --- ../../abiword-2.0.11.abicvs/abi/src/af/xap/xp/xap_Preview_Zoom.cpp 2003-03-19 20:37:46.000000000 +0000 +++ ../abi/src/af/xap/xp/xap_Preview_Zoom.cpp 2004-09-02 12:27:31.000000000 +0100 @@ -81,7 +81,8 @@ { case XAP_Preview_Zoom::font_NORMAL: sprintf (fontString, "%dpt", (10 * m_zoomPercent / 100)); - found = m_gc->findFont("Times New Roman", "normal", "", "normal", "", fontString); + //found = m_gc->findFont("Times New Roman", "normal", "", "normal", "", fontString); + found = m_gc->findFont("Thorndale", "normal", "", "normal", "", fontString); if (found) { Only in ../abi/src/af/xap/xp: xap_Preview_Zoom.o Only in ../abi/src/af/xap/xp: xap_Scrollbar_ViewListener.o Only in ../abi/src/af/xap/xp: xap_Spider.o Only in ../abi/src/af/xap/xp: xap_StatusBar.o diff -ru ../../abiword-2.0.11.abicvs/abi/src/af/xap/xp/xap_String_Id.h ../abi/src/af/xap/xp/xap_String_Id.h --- ../../abiword-2.0.11.abicvs/abi/src/af/xap/xp/xap_String_Id.h 2004-08-07 20:05:55.000000000 +0100 +++ ../abi/src/af/xap/xp/xap_String_Id.h 2004-09-21 14:32:17.000000000 +0100 @@ -34,7 +34,8 @@ /* Styles */ dcl(STYLE_NUMBER_LIST, "Numbered List") -dcl(STYLE_PLAIN_TEXT, "Plain Text") +//dcl(STYLE_PLAIN_TEXT, "Plain Text") +dcl(STYLE_PLAIN_TEXT, "Typewriter") dcl(STYLE_NORMAL, "Normal") dcl(STYLE_HEADING1, "Heading 1") dcl(STYLE_HEADING2, "Heading 2") @@ -112,17 +113,17 @@ dcl(DLG_UFS_UnderlineCheck, "Underline") dcl(DLG_UFS_OverlineCheck, "Overline") dcl(DLG_UFS_HiddenCheck, "Hidden") -dcl(DLG_UFS_TransparencyCheck, "Set no Highlight Color") -dcl(DLG_UFS_FontTab, " Font ") -dcl(DLG_UFS_ColorTab, "Text Color") -dcl(DLG_UFS_BGColorTab, "HighLight Color") +dcl(DLG_UFS_TransparencyCheck, "Set no Highlight Colour") +dcl(DLG_UFS_FontTab, "Font") +dcl(DLG_UFS_ColorTab, "Text Colour") +dcl(DLG_UFS_BGColorTab, "HighLight Colour") dcl(DLG_UFS_StyleRegular, "Regular") dcl(DLG_UFS_StyleItalic, "Italic") dcl(DLG_UFS_StyleBold, "Bold") dcl(DLG_UFS_StyleBoldItalic, "Bold Italic") dcl(DLG_UFS_ToplineCheck, "Topline") dcl(DLG_UFS_BottomlineCheck, "Bottomline") -dcl(DLG_UFS_ColorLabel, "Color:") +dcl(DLG_UFS_ColorLabel, "Colour:") dcl(DLG_UFS_ScriptLabel, "Script:") dcl(DLG_UFS_SampleFrameLabel, "Sample") dcl(DLG_UFS_SuperScript, "Superscript") @@ -155,8 +156,9 @@ dcl(DLG_Zoom_ZoomTitle, "Zoom") dcl(DLG_Zoom_RadioFrameCaption, "Zoom to") dcl(DLG_Zoom_200, "&200%") +dcl(DLG_Zoom_150, "&150%") dcl(DLG_Zoom_100, "&100%") -dcl(DLG_Zoom_75, "&75%") +//dcl(DLG_Zoom_75, "&75%") dcl(DLG_Zoom_PageWidth, "&Page width") dcl(DLG_Zoom_WholePage, "&Whole page") dcl(DLG_Zoom_Percent, "P&ercent:") @@ -187,7 +189,7 @@ dcl(DLG_UP_PrintIn, "Print in: ") dcl(DLG_UP_BlackWhite, "Black & White") dcl(DLG_UP_Grayscale, "Grayscale") -dcl(DLG_UP_Color, "Color") +dcl(DLG_UP_Color, "Colour") /* Insert Symbol dialog */ dcl(DLG_Insert_SymbolTitle, "Insert Symbol") Only in ../abi/src/af/xap/xp: xap_Strings.o Only in ../abi/src/af/xap/xp: xap_Toolbar_ControlFactory.o Only in ../abi/src/af/xap/xp: xap_ViewListener.o Only in ../abi/src/af/xap/xp: xav_View.o Only in ../abi/src/bindings: GNUmakefile Only in ../abi/src/bindings: GNUmakefile.in Only in ../abi/src/bindings/perl: GNUmakefile Only in ../abi/src/bindings/perl: GNUmakefile.in diff -ru ../../abiword-2.0.11.abicvs/abi/src/hello/ap/xp/ap_EditMethods.cpp ../abi/src/hello/ap/xp/ap_EditMethods.cpp --- ../../abiword-2.0.11.abicvs/abi/src/hello/ap/xp/ap_EditMethods.cpp 2001-02-06 22:54:30.000000000 +0000 +++ ../abi/src/hello/ap/xp/ap_EditMethods.cpp 2004-09-20 16:47:45.000000000 +0100 @@ -1,5 +1,6 @@ -/* AbiHello - * Copyright (C) 1999 AbiSource, Inc. +/* AbiWord + * Copyright (C) 1998-2000 AbiSource, Inc. + * Copyright (C) 2001 Tomas Frydrych * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -20,65 +21,603 @@ #include #include #include +#include +#include + #include "ut_debugmsg.h" #include "ut_string.h" #include "ut_bytebuf.h" +#include "ut_Language.h" #include "ev_EditMethod.h" #include "xav_View.h" +#include "fv_View.h" +#include "fl_DocLayout.h" +#include "fl_AutoLists.h" +#include "fp_Page.h" +#include "fp_Line.h" +#include "fg_Graphic.h" +#include "pd_Document.h" #include "gr_Graphics.h" #include "xap_App.h" #include "xap_Frame.h" #include "xap_EditMethods.h" #include "xap_Menu_Layouts.h" #include "xap_Prefs.h" - #include "ap_Strings.h" -#include "xap_Dialog_Id.h" -#include "xap_Dlg_About.h" +#include "ap_LoadBindings.h" +#include "ap_FrameData.h" +#include "ap_LeftRuler.h" +#include "ap_TopRuler.h" +#include "ap_Prefs.h" +#include "ut_string_class.h" + +#include "ap_Dialog_Id.h" +#include "ap_Dialog_Replace.h" +#include "ap_Dialog_Goto.h" +#include "ap_Dialog_Break.h" +#include "ap_Dialog_InsertTable.h" +#include "ap_Dialog_Paragraph.h" +#include "ap_Dialog_PageNumbers.h" +#include "ap_Dialog_PageSetup.h" +#include "ap_Dialog_Lists.h" +#include "ap_Dialog_Options.h" +#include "ap_Dialog_Spell.h" +#include "ap_Dialog_Styles.h" +#include "ap_Dialog_Tab.h" +#include "ap_Dialog_Insert_DateTime.h" +#include "ap_Dialog_Field.h" +#include "ap_Dialog_WordCount.h" +#include "ap_Dialog_Columns.h" +#include "ap_Dialog_Tab.h" +#include "ap_Dialog_ToggleCase.h" +#include "ap_Dialog_Background.h" +#include "ap_Dialog_New.h" +#include "ap_Dialog_HdrFtr.h" +#include "ap_Dialog_InsertBookmark.h" +#include "ap_Dialog_InsertHyperlink.h" +#include "ap_Dialog_MetaData.h" +#include "ap_Dialog_MarkRevisions.h" +#include "ap_Dialog_ListRevisions.h" +#include "ap_Dialog_MergeCells.h" +#include "ap_Dialog_FormatTable.h" +#include "ap_Dialog_FormatFootnotes.h" +#include "ap_Dialog_MailMerge.h" +#include "fl_FootnoteLayout.h" +#include "xap_App.h" #include "xap_DialogFactory.h" +#include "xap_Dlg_About.h" +#include "xap_Dlg_ClipArt.h" #include "xap_Dlg_MessageBox.h" #include "xap_Dlg_FileOpenSaveAs.h" #include "xap_Dlg_FontChooser.h" #include "xap_Dlg_Print.h" +#include "xap_Dlg_PrintPreview.h" #include "xap_Dlg_WindowMore.h" +#include "xap_Dlg_Zoom.h" +#include "xap_Dlg_Insert_Symbol.h" +#include "xap_Dlg_Language.h" +#include "xap_Dlg_PluginManager.h" +#include "xap_Dlg_Image.h" + +#include "ie_imp.h" +#include "ie_impGraphic.h" +#include "ie_exp.h" +#include "ie_types.h" + +#include "ut_timer.h" +#include "ut_Script.h" +#include "ut_path.h" +#include "ie_mailmerge.h" /*****************************************************************/ /*****************************************************************/ /* abbreviations: -** BOL beginning of line -** EOL end of line -** BOW beginning of word -** EOW end of word -** BOW beginning of sentence -** EOS end of sentence -** BOB beginning of block -** EOB end of block -** BOD beginning of document -** EOD end of document +** BOL beginning of line +** EOL end of line +** BOW beginning of word +** EOW end of word +** BOW beginning of sentence +** EOS end of sentence +** BOB beginning of block +** EOB end of block +** BOD beginning of document +** EOD end of document ** -** warpInsPt warp insertion point -** extSel extend selection -** del delete -** bck backwards -** fwd forwards +** warpInsPt warp insertion point +** extSel extend selection +** del delete +** bck backwards +** fwd forwards **/ class ap_EditMethods { public: + static EV_EditMethod_Fn scrollPageDown; + static EV_EditMethod_Fn scrollPageUp; + static EV_EditMethod_Fn scrollPageLeft; + static EV_EditMethod_Fn scrollPageRight; + static EV_EditMethod_Fn scrollLineDown; + static EV_EditMethod_Fn scrollLineUp; + static EV_EditMethod_Fn scrollLineLeft; + static EV_EditMethod_Fn scrollLineRight; + static EV_EditMethod_Fn scrollToTop; + static EV_EditMethod_Fn scrollToBottom; + static EV_EditMethod_Fn scrollWheelMouseDown; + static EV_EditMethod_Fn scrollWheelMouseUp; + + static EV_EditMethod_Fn warpInsPtToXY; + static EV_EditMethod_Fn warpInsPtLeft; + static EV_EditMethod_Fn warpInsPtRight; + static EV_EditMethod_Fn warpInsPtBOP; + static EV_EditMethod_Fn warpInsPtEOP; + static EV_EditMethod_Fn warpInsPtBOL; + static EV_EditMethod_Fn warpInsPtEOL; + static EV_EditMethod_Fn warpInsPtBOW; + static EV_EditMethod_Fn warpInsPtEOW; + static EV_EditMethod_Fn warpInsPtBOS; + static EV_EditMethod_Fn warpInsPtEOS; + static EV_EditMethod_Fn warpInsPtBOB; + static EV_EditMethod_Fn warpInsPtEOB; + static EV_EditMethod_Fn warpInsPtBOD; + static EV_EditMethod_Fn warpInsPtEOD;; + + static EV_EditMethod_Fn warpInsPtPrevPage; + static EV_EditMethod_Fn warpInsPtNextPage; + static EV_EditMethod_Fn warpInsPtPrevScreen; + static EV_EditMethod_Fn warpInsPtNextScreen; + static EV_EditMethod_Fn warpInsPtPrevLine; + static EV_EditMethod_Fn warpInsPtNextLine; + + static EV_EditMethod_Fn cursorDefault; + static EV_EditMethod_Fn cursorIBeam; + static EV_EditMethod_Fn cursorRightArrow; + static EV_EditMethod_Fn cursorVline; + static EV_EditMethod_Fn cursorHline; + static EV_EditMethod_Fn cursorLeftArrow; + static EV_EditMethod_Fn cursorImage; + static EV_EditMethod_Fn cursorImageSize; + + static EV_EditMethod_Fn contextImage; + static EV_EditMethod_Fn contextHyperlink; + static EV_EditMethod_Fn contextMenu; + static EV_EditMethod_Fn contextRevision; + static EV_EditMethod_Fn contextText; + static EV_EditMethod_Fn contextMisspellText; + + static EV_EditMethod_Fn spellSuggest_1; + static EV_EditMethod_Fn spellSuggest_2; + static EV_EditMethod_Fn spellSuggest_3; + static EV_EditMethod_Fn spellSuggest_4; + static EV_EditMethod_Fn spellSuggest_5; + static EV_EditMethod_Fn spellSuggest_6; + static EV_EditMethod_Fn spellSuggest_7; + static EV_EditMethod_Fn spellSuggest_8; + static EV_EditMethod_Fn spellSuggest_9; + + static EV_EditMethod_Fn spellIgnoreAll; + static EV_EditMethod_Fn spellAdd; + + static EV_EditMethod_Fn dragToXY; + static EV_EditMethod_Fn dragToXYword; + static EV_EditMethod_Fn endDrag; + + static EV_EditMethod_Fn dragSelectionBegin; + static EV_EditMethod_Fn dragSelectionEnd; + + static EV_EditMethod_Fn extSelToXY; + static EV_EditMethod_Fn extSelLeft; + static EV_EditMethod_Fn extSelRight; + static EV_EditMethod_Fn extSelBOL; + static EV_EditMethod_Fn extSelEOL; + static EV_EditMethod_Fn extSelBOW; + static EV_EditMethod_Fn extSelEOW; + static EV_EditMethod_Fn extSelBOS; + static EV_EditMethod_Fn extSelEOS; + static EV_EditMethod_Fn extSelBOB; + static EV_EditMethod_Fn extSelEOB; + static EV_EditMethod_Fn extSelBOD; + static EV_EditMethod_Fn extSelEOD; + static EV_EditMethod_Fn extSelPrevLine; + static EV_EditMethod_Fn extSelNextLine; + static EV_EditMethod_Fn extSelPageDown; + static EV_EditMethod_Fn extSelPageUp; + static EV_EditMethod_Fn extSelScreenUp; + static EV_EditMethod_Fn extSelScreenDown; + static EV_EditMethod_Fn selectAll; + static EV_EditMethod_Fn selectWord; + static EV_EditMethod_Fn selectLine; + static EV_EditMethod_Fn selectBlock; + static EV_EditMethod_Fn selectObject; + static EV_EditMethod_Fn selectTable; + static EV_EditMethod_Fn selectRow; + static EV_EditMethod_Fn selectCell; + + static EV_EditMethod_Fn delLeft; + static EV_EditMethod_Fn delRight; + static EV_EditMethod_Fn delBOL; + static EV_EditMethod_Fn delEOL; + static EV_EditMethod_Fn delBOW; + static EV_EditMethod_Fn delEOW; + static EV_EditMethod_Fn delBOS; + static EV_EditMethod_Fn delEOS; + static EV_EditMethod_Fn delBOB; + static EV_EditMethod_Fn delEOB; + static EV_EditMethod_Fn delBOD; + static EV_EditMethod_Fn delEOD; + static EV_EditMethod_Fn deleteBookmark; + static EV_EditMethod_Fn deleteColumns; + static EV_EditMethod_Fn deleteCell; + static EV_EditMethod_Fn deleteHyperlink; + static EV_EditMethod_Fn deleteRows; + static EV_EditMethod_Fn deleteTable; + + + static EV_EditMethod_Fn insertBookmark; + static EV_EditMethod_Fn insertHyperlink; + static EV_EditMethod_Fn insertColsAfter; + static EV_EditMethod_Fn insertColsBefore; + static EV_EditMethod_Fn insertColumnBreak; + static EV_EditMethod_Fn insertData; + static EV_EditMethod_Fn insertLineBreak; + static EV_EditMethod_Fn insertParagraphBreak; + static EV_EditMethod_Fn insertPageBreak; + static EV_EditMethod_Fn insertRowsAfter; + static EV_EditMethod_Fn insertRowsBefore; + static EV_EditMethod_Fn insertSectionBreak; + static EV_EditMethod_Fn insertSoftBreak; + static EV_EditMethod_Fn insertTab; + + static EV_EditMethod_Fn insertSpace; + static EV_EditMethod_Fn insertNBSpace; + static EV_EditMethod_Fn insertNBZWSpace; + static EV_EditMethod_Fn insertZWJoiner; + static EV_EditMethod_Fn insertLRM; + static EV_EditMethod_Fn insertRLM; + static EV_EditMethod_Fn insertClosingParenthesis; + static EV_EditMethod_Fn insertOpeningParenthesis; + + static EV_EditMethod_Fn insertGraveData; // for certain european keys + static EV_EditMethod_Fn insertAcuteData; + static EV_EditMethod_Fn insertCircumflexData; + static EV_EditMethod_Fn insertTildeData; + static EV_EditMethod_Fn insertMacronData; + static EV_EditMethod_Fn insertBreveData; + static EV_EditMethod_Fn insertAbovedotData; + static EV_EditMethod_Fn insertDiaeresisData; + static EV_EditMethod_Fn insertDoubleacuteData; + static EV_EditMethod_Fn insertCaronData; + static EV_EditMethod_Fn insertCedillaData; + static EV_EditMethod_Fn insertOgonekData; + + static EV_EditMethod_Fn mergeCells; + static EV_EditMethod_Fn formatTable; + + static EV_EditMethod_Fn replaceChar; + + static EV_EditMethod_Fn resizeImage; + static EV_EditMethod_Fn endResizeImage; + static EV_EditMethod_Fn dragImage; + static EV_EditMethod_Fn dropImage; + + static EV_EditMethod_Fn beginVDrag; + static EV_EditMethod_Fn clearSetCols; + static EV_EditMethod_Fn dragVline; + static EV_EditMethod_Fn endDragVline; + + static EV_EditMethod_Fn beginHDrag; + static EV_EditMethod_Fn clearSetRows; + static EV_EditMethod_Fn dragHline; + static EV_EditMethod_Fn endDragHline; + + + // TODO add functions for all of the standard menu commands. + // TODO here are a few that i started. + static EV_EditMethod_Fn fileNew; + static EV_EditMethod_Fn fileRevert; + static EV_EditMethod_Fn toolbarNew; static EV_EditMethod_Fn fileOpen; static EV_EditMethod_Fn fileSave; static EV_EditMethod_Fn fileSaveAs; - static EV_EditMethod_Fn fileInsertImage; - static EV_EditMethod_Fn insertData; - + static EV_EditMethod_Fn fileSaveImage; + static EV_EditMethod_Fn fileExport; + static EV_EditMethod_Fn fileImport; + static EV_EditMethod_Fn importStyles; + static EV_EditMethod_Fn formatPainter; + static EV_EditMethod_Fn pageSetup; + static EV_EditMethod_Fn print; + static EV_EditMethod_Fn printTB; + static EV_EditMethod_Fn printPreview; + static EV_EditMethod_Fn printDirectly; + static EV_EditMethod_Fn fileInsertGraphic; + static EV_EditMethod_Fn insertClipart; + static EV_EditMethod_Fn fileSaveAsWeb; + static EV_EditMethod_Fn fileSaveTemplate; + static EV_EditMethod_Fn filePreviewWeb; + static EV_EditMethod_Fn openTemplate; + + static EV_EditMethod_Fn undo; + static EV_EditMethod_Fn redo; + static EV_EditMethod_Fn cut; + static EV_EditMethod_Fn copy; + static EV_EditMethod_Fn paste; + static EV_EditMethod_Fn pasteSelection; + static EV_EditMethod_Fn pasteSpecial; + static EV_EditMethod_Fn find; + static EV_EditMethod_Fn findAgain; + static EV_EditMethod_Fn go; + static EV_EditMethod_Fn replace; + static EV_EditMethod_Fn editHeader; + static EV_EditMethod_Fn editFooter; + static EV_EditMethod_Fn removeHeader; + static EV_EditMethod_Fn removeFooter; + + static EV_EditMethod_Fn viewStd; + static EV_EditMethod_Fn viewFormat; + static EV_EditMethod_Fn viewExtra; + static EV_EditMethod_Fn viewTable; + static EV_EditMethod_Fn viewTB1; + static EV_EditMethod_Fn viewTB2; + static EV_EditMethod_Fn viewTB3; + static EV_EditMethod_Fn viewTB4; + static EV_EditMethod_Fn lockToolbarLayout; + static EV_EditMethod_Fn defaultToolbarLayout; + static EV_EditMethod_Fn viewRuler; + static EV_EditMethod_Fn viewStatus; + static EV_EditMethod_Fn viewPara; + static EV_EditMethod_Fn viewLockStyles; + static EV_EditMethod_Fn viewHeadFoot; + static EV_EditMethod_Fn zoom; + static EV_EditMethod_Fn dlgZoom; + static EV_EditMethod_Fn viewFullScreen; + + static EV_EditMethod_Fn zoom200; + static EV_EditMethod_Fn zoom150; + static EV_EditMethod_Fn zoom100; + static EV_EditMethod_Fn zoom75; + static EV_EditMethod_Fn zoom50; + static EV_EditMethod_Fn zoomWidth; + static EV_EditMethod_Fn zoomWhole; + static EV_EditMethod_Fn zoomIn; + static EV_EditMethod_Fn zoomOut; + + static EV_EditMethod_Fn insBreak; + static EV_EditMethod_Fn insPageNo; + static EV_EditMethod_Fn insDateTime; + static EV_EditMethod_Fn insField; + static EV_EditMethod_Fn insMailMerge; + static EV_EditMethod_Fn insSymbol; + static EV_EditMethod_Fn insFile; + static EV_EditMethod_Fn insFootnote; + static EV_EditMethod_Fn insEndnote; + + static EV_EditMethod_Fn dlgSpell; + static EV_EditMethod_Fn dlgSpellPrefs; + static EV_EditMethod_Fn dlgWordCount; static EV_EditMethod_Fn dlgOptions; - static EV_EditMethod_Fn dlgAbout; + static EV_EditMethod_Fn dlgMetaData; + static EV_EditMethod_Fn dlgFont; + static EV_EditMethod_Fn dlgParagraph; + static EV_EditMethod_Fn dlgBullets; + static EV_EditMethod_Fn dlgBorders; + static EV_EditMethod_Fn dlgColumns; + static EV_EditMethod_Fn dlgFmtImage; + static EV_EditMethod_Fn dlgHdrFtr; + static EV_EditMethod_Fn style; + static EV_EditMethod_Fn dlgBackground; + static EV_EditMethod_Fn dlgStyle; + static EV_EditMethod_Fn dlgStyleParagraph; + static EV_EditMethod_Fn dlgStyleFont; + static EV_EditMethod_Fn dlgStyleTabs; + static EV_EditMethod_Fn dlgStyleNumbering; + static EV_EditMethod_Fn dlgStyleLanguage; + static EV_EditMethod_Fn dlgTabs; + static EV_EditMethod_Fn formatFootnotes; + static EV_EditMethod_Fn dlgToggleCase; + static EV_EditMethod_Fn rotateCase; + static EV_EditMethod_Fn dlgLanguage; + static EV_EditMethod_Fn dlgPlugins; + static EV_EditMethod_Fn dlgColorPickerFore; + static EV_EditMethod_Fn dlgColorPickerBack; + static EV_EditMethod_Fn language; + static EV_EditMethod_Fn fontFamily; + static EV_EditMethod_Fn fontSize; + static EV_EditMethod_Fn fontSizeIncrease; + static EV_EditMethod_Fn fontSizeDecrease; + static EV_EditMethod_Fn toggleBold; + static EV_EditMethod_Fn toggleHidden; + static EV_EditMethod_Fn toggleItalic; + static EV_EditMethod_Fn toggleUline; + static EV_EditMethod_Fn toggleOline; + static EV_EditMethod_Fn toggleStrike; + static EV_EditMethod_Fn toggleTopline; + static EV_EditMethod_Fn toggleBottomline; + static EV_EditMethod_Fn toggleSuper; + static EV_EditMethod_Fn toggleSub; + static EV_EditMethod_Fn togglePlain; + static EV_EditMethod_Fn toggleDirOverrideLTR; + static EV_EditMethod_Fn toggleDirOverrideRTL; + static EV_EditMethod_Fn toggleDomDirection; + + static EV_EditMethod_Fn doBullets; + static EV_EditMethod_Fn doNumbers; + + static EV_EditMethod_Fn colorForeTB; + static EV_EditMethod_Fn colorBackTB; + + static EV_EditMethod_Fn toggleIndent; + static EV_EditMethod_Fn toggleUnIndent; + + static EV_EditMethod_Fn alignLeft; + static EV_EditMethod_Fn alignCenter; + static EV_EditMethod_Fn alignRight; + static EV_EditMethod_Fn alignJustify; + + static EV_EditMethod_Fn setStyleHeading1; + static EV_EditMethod_Fn setStyleHeading2; + static EV_EditMethod_Fn setStyleHeading3; + + static EV_EditMethod_Fn paraBefore0; + static EV_EditMethod_Fn paraBefore12; + + static EV_EditMethod_Fn sectColumns1; + static EV_EditMethod_Fn sectColumns2; + static EV_EditMethod_Fn sectColumns3; + + static EV_EditMethod_Fn singleSpace; + static EV_EditMethod_Fn middleSpace; + static EV_EditMethod_Fn doubleSpace; + + static EV_EditMethod_Fn openRecent_1; + static EV_EditMethod_Fn openRecent_2; + static EV_EditMethod_Fn openRecent_3; + static EV_EditMethod_Fn openRecent_4; + static EV_EditMethod_Fn openRecent_5; + static EV_EditMethod_Fn openRecent_6; + static EV_EditMethod_Fn openRecent_7; + static EV_EditMethod_Fn openRecent_8; + static EV_EditMethod_Fn openRecent_9; + + static EV_EditMethod_Fn activateWindow_1; + static EV_EditMethod_Fn activateWindow_2; + static EV_EditMethod_Fn activateWindow_3; + static EV_EditMethod_Fn activateWindow_4; + static EV_EditMethod_Fn activateWindow_5; + static EV_EditMethod_Fn activateWindow_6; + static EV_EditMethod_Fn activateWindow_7; + static EV_EditMethod_Fn activateWindow_8; + static EV_EditMethod_Fn activateWindow_9; + static EV_EditMethod_Fn dlgMoreWindows; + + static EV_EditMethod_Fn dlgAbout; + static EV_EditMethod_Fn helpContents; + static EV_EditMethod_Fn helpIndex; + static EV_EditMethod_Fn helpSearch; + static EV_EditMethod_Fn helpCheckVer; + static EV_EditMethod_Fn helpAboutOS; + static EV_EditMethod_Fn helpAboutGnu; + static EV_EditMethod_Fn helpAboutGnomeOffice; + static EV_EditMethod_Fn helpCredits; + static EV_EditMethod_Fn helpReportBug; + + static EV_EditMethod_Fn newWindow; + static EV_EditMethod_Fn cycleWindows; + static EV_EditMethod_Fn cycleWindowsBck; static EV_EditMethod_Fn closeWindow; + static EV_EditMethod_Fn closeWindowX; + static EV_EditMethod_Fn querySaveAndExit; + + static EV_EditMethod_Fn setEditVI; + static EV_EditMethod_Fn setInputVI; + static EV_EditMethod_Fn cycleInputMode; + static EV_EditMethod_Fn toggleInsertMode; + + static EV_EditMethod_Fn viCmd_5e; + static EV_EditMethod_Fn viCmd_A; + static EV_EditMethod_Fn viCmd_C; + static EV_EditMethod_Fn viCmd_I; + static EV_EditMethod_Fn viCmd_J; + static EV_EditMethod_Fn viCmd_O; + static EV_EditMethod_Fn viCmd_P; + static EV_EditMethod_Fn viCmd_a; + static EV_EditMethod_Fn viCmd_c24; + static EV_EditMethod_Fn viCmd_c28; + static EV_EditMethod_Fn viCmd_c29; + static EV_EditMethod_Fn viCmd_c5b; + static EV_EditMethod_Fn viCmd_c5d; + static EV_EditMethod_Fn viCmd_c5e; + static EV_EditMethod_Fn viCmd_cb; + static EV_EditMethod_Fn viCmd_cw; + static EV_EditMethod_Fn viCmd_d24; + static EV_EditMethod_Fn viCmd_d28; + static EV_EditMethod_Fn viCmd_d29; + static EV_EditMethod_Fn viCmd_d5b; + static EV_EditMethod_Fn viCmd_d5d; + static EV_EditMethod_Fn viCmd_d5e; + static EV_EditMethod_Fn viCmd_db; + static EV_EditMethod_Fn viCmd_dd; + static EV_EditMethod_Fn viCmd_dw; + static EV_EditMethod_Fn viCmd_o; + static EV_EditMethod_Fn viCmd_y24; + static EV_EditMethod_Fn viCmd_y28; + static EV_EditMethod_Fn viCmd_y29; + static EV_EditMethod_Fn viCmd_y5b; + static EV_EditMethod_Fn viCmd_y5d; + static EV_EditMethod_Fn viCmd_y5e; + static EV_EditMethod_Fn viCmd_yb; + static EV_EditMethod_Fn viCmd_yw; + static EV_EditMethod_Fn viCmd_yy; + + static EV_EditMethod_Fn viewNormalLayout; + static EV_EditMethod_Fn viewPrintLayout; + static EV_EditMethod_Fn viewWebLayout; + + static EV_EditMethod_Fn toggleAutoSpell; + + static EV_EditMethod_Fn insAutotext_attn_1; + static EV_EditMethod_Fn insAutotext_attn_2; + + static EV_EditMethod_Fn insAutotext_closing_1; + static EV_EditMethod_Fn insAutotext_closing_2; + static EV_EditMethod_Fn insAutotext_closing_3; + static EV_EditMethod_Fn insAutotext_closing_4; + static EV_EditMethod_Fn insAutotext_closing_5; + static EV_EditMethod_Fn insAutotext_closing_6; + static EV_EditMethod_Fn insAutotext_closing_7; + static EV_EditMethod_Fn insAutotext_closing_8; + static EV_EditMethod_Fn insAutotext_closing_9; + static EV_EditMethod_Fn insAutotext_closing_10; + static EV_EditMethod_Fn insAutotext_closing_11; + static EV_EditMethod_Fn insAutotext_closing_12; + + static EV_EditMethod_Fn insAutotext_mail_1; + static EV_EditMethod_Fn insAutotext_mail_2; + static EV_EditMethod_Fn insAutotext_mail_3; + static EV_EditMethod_Fn insAutotext_mail_4; + static EV_EditMethod_Fn insAutotext_mail_5; + static EV_EditMethod_Fn insAutotext_mail_6; + static EV_EditMethod_Fn insAutotext_mail_7; + static EV_EditMethod_Fn insAutotext_mail_8; + + static EV_EditMethod_Fn insAutotext_reference_1; + static EV_EditMethod_Fn insAutotext_reference_2; + static EV_EditMethod_Fn insAutotext_reference_3; + + static EV_EditMethod_Fn insAutotext_salutation_1; + static EV_EditMethod_Fn insAutotext_salutation_2; + static EV_EditMethod_Fn insAutotext_salutation_3; + static EV_EditMethod_Fn insAutotext_salutation_4; + + static EV_EditMethod_Fn insAutotext_subject_1; + + static EV_EditMethod_Fn insAutotext_email_1; + static EV_EditMethod_Fn insAutotext_email_2; + static EV_EditMethod_Fn insAutotext_email_3; + static EV_EditMethod_Fn insAutotext_email_4; + static EV_EditMethod_Fn insAutotext_email_5; + static EV_EditMethod_Fn insAutotext_email_6; + + static EV_EditMethod_Fn scriptPlay; + static EV_EditMethod_Fn executeScript; + + static EV_EditMethod_Fn mailMerge; + + static EV_EditMethod_Fn hyperlinkJump; + static EV_EditMethod_Fn hyperlinkStatusBar; + + static EV_EditMethod_Fn lockGUI; + static EV_EditMethod_Fn unlockGUI; + + static EV_EditMethod_Fn toggleMarkRevisions; + static EV_EditMethod_Fn revisionAccept; + static EV_EditMethod_Fn revisionReject; + static EV_EditMethod_Fn revisionSetViewLevel; + + static EV_EditMethod_Fn insertTable; static EV_EditMethod_Fn noop; @@ -86,32 +625,515 @@ #if defined(PT_TEST) || defined(FMT_TEST) || defined(UT_TEST) static EV_EditMethod_Fn Test_Dump; + static EV_EditMethod_Fn Test_Ftr; #endif + }; /*****************************************************************/ /*****************************************************************/ -#define _D_ EV_EMT_REQUIREDATA +#define _D_ EV_EMT_REQUIREDATA #define F(fn) ap_EditMethods::fn #define N(fn) #fn #define NF(fn) N(fn), F(fn) +// !!!!!!!!!!!!! IMPORTANT !!!!!!!!!!!!!!!!!!!!!!!!!!! +// +// keep this array alphabetically (strcmp) ordered under +// penalty of being forced to port Abi to the PalmOS +// +// YOUR NEW METHOD WON'T BE FOUND AND YOU'LL SCREW UP ALL THE OTHER METHODS +// IF YOU DON'T DO THIS +// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! static EV_EditMethod s_arrayEditMethods[] = { - EV_EditMethod(NF(dlgAbout), 0, ""), - - EV_EditMethod(NF(closeWindow), 0, ""), - - EV_EditMethod(NF(noop), 0, ""), - #if defined(PT_TEST) || defined(FMT_TEST) || defined(UT_TEST) - EV_EditMethod(NF(Test_Dump), 0, "") + EV_EditMethod(NF(Test_Dump), 0, ""), + EV_EditMethod(NF(Test_Ftr), 0, ""), #endif + + // a + EV_EditMethod(NF(activateWindow_1), 0, ""), + EV_EditMethod(NF(activateWindow_2), 0, ""), + EV_EditMethod(NF(activateWindow_3), 0, ""), + EV_EditMethod(NF(activateWindow_4), 0, ""), + EV_EditMethod(NF(activateWindow_5), 0, ""), + EV_EditMethod(NF(activateWindow_6), 0, ""), + EV_EditMethod(NF(activateWindow_7), 0, ""), + EV_EditMethod(NF(activateWindow_8), 0, ""), + EV_EditMethod(NF(activateWindow_9), 0, ""), + EV_EditMethod(NF(alignCenter), 0, ""), + EV_EditMethod(NF(alignJustify), 0, ""), + EV_EditMethod(NF(alignLeft), 0, ""), + EV_EditMethod(NF(alignRight), 0, ""), + + // b + EV_EditMethod(NF(beginHDrag), 0, ""), + EV_EditMethod(NF(beginVDrag), 0, ""), + + // c + EV_EditMethod(NF(clearSetCols), 0, ""), + EV_EditMethod(NF(clearSetRows), 0, ""), + EV_EditMethod(NF(closeWindow), 0, ""), + EV_EditMethod(NF(closeWindowX), 0, ""), + EV_EditMethod(NF(colorBackTB), _D_, ""), + EV_EditMethod(NF(colorForeTB), _D_, ""), + EV_EditMethod(NF(contextHyperlink), 0, ""), + EV_EditMethod(NF(contextImage), 0, ""), + EV_EditMethod(NF(contextMenu), 0, ""), + EV_EditMethod(NF(contextMisspellText), 0, ""), + EV_EditMethod(NF(contextRevision), 0, ""), + EV_EditMethod(NF(contextText), 0, ""), + EV_EditMethod(NF(copy), 0, ""), + EV_EditMethod(NF(cursorDefault), 0, ""), + EV_EditMethod(NF(cursorHline), 0, ""), + EV_EditMethod(NF(cursorIBeam), 0, ""), + EV_EditMethod(NF(cursorImage), 0, ""), + EV_EditMethod(NF(cursorImageSize), 0, ""), + EV_EditMethod(NF(cursorLeftArrow), 0, ""), + EV_EditMethod(NF(cursorRightArrow), 0, ""), + EV_EditMethod(NF(cursorVline), 0, ""), + EV_EditMethod(NF(cut), 0, ""), + EV_EditMethod(NF(cycleInputMode), 0, ""), + EV_EditMethod(NF(cycleWindows), 0, ""), + EV_EditMethod(NF(cycleWindowsBck), 0, ""), + + // d + EV_EditMethod(NF(defaultToolbarLayout), 0, ""), + EV_EditMethod(NF(delBOB), 0, ""), + EV_EditMethod(NF(delBOD), 0, ""), + EV_EditMethod(NF(delBOL), 0, ""), + EV_EditMethod(NF(delBOS), 0, ""), + EV_EditMethod(NF(delBOW), 0, ""), + EV_EditMethod(NF(delEOB), 0, ""), + EV_EditMethod(NF(delEOD), 0, ""), + EV_EditMethod(NF(delEOL), 0, ""), + EV_EditMethod(NF(delEOS), 0, ""), + EV_EditMethod(NF(delEOW), 0, ""), + EV_EditMethod(NF(delLeft), 0, ""), + EV_EditMethod(NF(delRight), 0, ""), + EV_EditMethod(NF(deleteBookmark), 0, ""), + EV_EditMethod(NF(deleteCell), 0, ""), + EV_EditMethod(NF(deleteColumns), 0, ""), + EV_EditMethod(NF(deleteHyperlink), 0, ""), + EV_EditMethod(NF(deleteRows), 0, ""), + EV_EditMethod(NF(deleteTable), 0, ""), + EV_EditMethod(NF(dlgAbout), 0, ""), + EV_EditMethod(NF(dlgBackground), 0, ""), + EV_EditMethod(NF(dlgBorders), 0, ""), + EV_EditMethod(NF(dlgBullets), 0, ""), + EV_EditMethod(NF(dlgColorPickerBack), 0, ""), + EV_EditMethod(NF(dlgColorPickerFore), 0, ""), + EV_EditMethod(NF(dlgColumns), 0, ""), + EV_EditMethod(NF(dlgFmtImage), 0, ""), + EV_EditMethod(NF(dlgFont), 0, ""), + EV_EditMethod(NF(dlgHdrFtr), 0, ""), + EV_EditMethod(NF(dlgLanguage), 0, ""), + EV_EditMethod(NF(dlgMetaData), 0, ""), + EV_EditMethod(NF(dlgMoreWindows), 0, ""), + EV_EditMethod(NF(dlgOptions), 0, ""), + EV_EditMethod(NF(dlgParagraph), 0, ""), + EV_EditMethod(NF(dlgPlugins), 0, ""), + EV_EditMethod(NF(dlgSpell), 0, ""), + EV_EditMethod(NF(dlgSpellPrefs), 0, ""), + EV_EditMethod(NF(dlgStyle), 0, ""), + EV_EditMethod(NF(dlgStyleFont), 0, ""), + EV_EditMethod(NF(dlgStyleLanguage), 0, ""), + EV_EditMethod(NF(dlgStyleNumbering), 0, ""), + EV_EditMethod(NF(dlgStyleParagraph), 0, ""), + EV_EditMethod(NF(dlgStyleTabs), 0, ""), + EV_EditMethod(NF(dlgTabs), 0, ""), + EV_EditMethod(NF(dlgToggleCase), 0, ""), + EV_EditMethod(NF(dlgWordCount), 0, ""), + EV_EditMethod(NF(dlgZoom), 0, ""), + EV_EditMethod(NF(doBullets), 0, ""), + EV_EditMethod(NF(doNumbers), 0, ""), + EV_EditMethod(NF(doubleSpace), 0, ""), + EV_EditMethod(NF(dragHline), 0, ""), + EV_EditMethod(NF(dragImage), 0, ""), + EV_EditMethod(NF(dragSelectionBegin), 0, ""), + EV_EditMethod(NF(dragSelectionEnd), 0, ""), + EV_EditMethod(NF(dragToXY), 0, ""), + EV_EditMethod(NF(dragToXYword), 0, ""), + EV_EditMethod(NF(dragVline), 0, ""), + EV_EditMethod(NF(dropImage), 0, ""), + + + // e + EV_EditMethod(NF(editFooter), 0, ""), + EV_EditMethod(NF(editHeader), 0, ""), + EV_EditMethod(NF(endDrag), 0, ""), + EV_EditMethod(NF(endDragHline), 0, ""), + EV_EditMethod(NF(endDragVline), 0, ""), + EV_EditMethod(NF(endResizeImage), 0, ""), + EV_EditMethod(NF(executeScript), EV_EMT_REQUIRE_SCRIPT_NAME, ""), + EV_EditMethod(NF(extSelBOB), 0, ""), + EV_EditMethod(NF(extSelBOD), 0, ""), + EV_EditMethod(NF(extSelBOL), 0, ""), + EV_EditMethod(NF(extSelBOS), 0, ""), + EV_EditMethod(NF(extSelBOW), 0, ""), + EV_EditMethod(NF(extSelEOB), 0, ""), + EV_EditMethod(NF(extSelEOD), 0, ""), + EV_EditMethod(NF(extSelEOL), 0, ""), + EV_EditMethod(NF(extSelEOS), 0, ""), + EV_EditMethod(NF(extSelEOW), 0, ""), + EV_EditMethod(NF(extSelLeft), 0, ""), + EV_EditMethod(NF(extSelNextLine), 0, ""), + EV_EditMethod(NF(extSelPageDown), 0, ""), + EV_EditMethod(NF(extSelPageUp), 0, ""), + EV_EditMethod(NF(extSelPrevLine), 0, ""), + EV_EditMethod(NF(extSelRight), 0, ""), + EV_EditMethod(NF(extSelScreenDown), 0, ""), + EV_EditMethod(NF(extSelScreenUp), 0, ""), + EV_EditMethod(NF(extSelToXY), 0, ""), + + // f + EV_EditMethod(NF(fileExport), 0, ""), + EV_EditMethod(NF(fileImport), 0, ""), + EV_EditMethod(NF(fileInsertGraphic), 0, ""), + EV_EditMethod(NF(fileNew), 0, ""), + EV_EditMethod(NF(fileOpen), 0, ""), + EV_EditMethod(NF(filePreviewWeb), 0, ""), + EV_EditMethod(NF(fileRevert), 0, ""), + EV_EditMethod(NF(fileSave), 0, ""), + EV_EditMethod(NF(fileSaveAs), 0, ""), + EV_EditMethod(NF(fileSaveAsWeb), 0, ""), + EV_EditMethod(NF(fileSaveImage), 0, ""), + EV_EditMethod(NF(fileSaveTemplate), 0, ""), + EV_EditMethod(NF(find), 0, ""), + EV_EditMethod(NF(findAgain), 0, ""), + EV_EditMethod(NF(fontFamily), _D_, ""), + EV_EditMethod(NF(fontSize), _D_, ""), + EV_EditMethod(NF(fontSizeDecrease), 0, ""), + EV_EditMethod(NF(fontSizeIncrease), 0, ""), + EV_EditMethod(NF(formatFootnotes), 0, ""), + EV_EditMethod(NF(formatPainter), 0, ""), + EV_EditMethod(NF(formatTable), 0, ""), + + // g + EV_EditMethod(NF(go), 0, ""), + + // h + EV_EditMethod(NF(helpAboutGnomeOffice), 0, ""), + EV_EditMethod(NF(helpAboutGnu), 0, ""), + EV_EditMethod(NF(helpAboutOS), 0, ""), + EV_EditMethod(NF(helpCheckVer), 0, ""), + EV_EditMethod(NF(helpContents), 0, ""), + EV_EditMethod(NF(helpCredits), 0, ""), + EV_EditMethod(NF(helpIndex), 0, ""), + EV_EditMethod(NF(helpReportBug), 0, ""), + EV_EditMethod(NF(helpSearch), 0, ""), + EV_EditMethod(NF(hyperlinkJump), 0, ""), + EV_EditMethod(NF(hyperlinkStatusBar), 0, ""), + // i + EV_EditMethod(NF(importStyles), 0, ""), + EV_EditMethod(NF(insAutotext_attn_1), 0, ""), + EV_EditMethod(NF(insAutotext_attn_2), 0, ""), + EV_EditMethod(NF(insAutotext_closing_1), 0, ""), + EV_EditMethod(NF(insAutotext_closing_10), 0, ""), + EV_EditMethod(NF(insAutotext_closing_11), 0, ""), + EV_EditMethod(NF(insAutotext_closing_12), 0, ""), + EV_EditMethod(NF(insAutotext_closing_2), 0, ""), + EV_EditMethod(NF(insAutotext_closing_3), 0, ""), + EV_EditMethod(NF(insAutotext_closing_4), 0, ""), + EV_EditMethod(NF(insAutotext_closing_5), 0, ""), + EV_EditMethod(NF(insAutotext_closing_6), 0, ""), + EV_EditMethod(NF(insAutotext_closing_7), 0, ""), + EV_EditMethod(NF(insAutotext_closing_8), 0, ""), + EV_EditMethod(NF(insAutotext_closing_9), 0, ""), + EV_EditMethod(NF(insAutotext_email_1), 0, ""), + EV_EditMethod(NF(insAutotext_email_2), 0, ""), + EV_EditMethod(NF(insAutotext_email_3), 0, ""), + EV_EditMethod(NF(insAutotext_email_4), 0, ""), + EV_EditMethod(NF(insAutotext_email_5), 0, ""), + EV_EditMethod(NF(insAutotext_email_6), 0, ""), + EV_EditMethod(NF(insAutotext_mail_1), 0, ""), + EV_EditMethod(NF(insAutotext_mail_2), 0, ""), + EV_EditMethod(NF(insAutotext_mail_3), 0, ""), + EV_EditMethod(NF(insAutotext_mail_4), 0, ""), + EV_EditMethod(NF(insAutotext_mail_5), 0, ""), + EV_EditMethod(NF(insAutotext_mail_6), 0, ""), + EV_EditMethod(NF(insAutotext_mail_7), 0, ""), + EV_EditMethod(NF(insAutotext_mail_8), 0, ""), + EV_EditMethod(NF(insAutotext_reference_1), 0, ""), + EV_EditMethod(NF(insAutotext_reference_2), 0, ""), + EV_EditMethod(NF(insAutotext_reference_3), 0, ""), + EV_EditMethod(NF(insAutotext_salutation_1), 0, ""), + EV_EditMethod(NF(insAutotext_salutation_2), 0, ""), + EV_EditMethod(NF(insAutotext_salutation_3), 0, ""), + EV_EditMethod(NF(insAutotext_salutation_4), 0, ""), + EV_EditMethod(NF(insAutotext_subject_1), 0, ""), + EV_EditMethod(NF(insBreak), 0, ""), + EV_EditMethod(NF(insDateTime), 0, ""), + EV_EditMethod(NF(insEndnote), 0, ""), + EV_EditMethod(NF(insField), 0, ""), + EV_EditMethod(NF(insFile), 0, ""), + EV_EditMethod(NF(insFootnote), 0, ""), + EV_EditMethod(NF(insMailMerge), 0, ""), + EV_EditMethod(NF(insPageNo), 0, ""), + EV_EditMethod(NF(insSymbol), 0, ""), + EV_EditMethod(NF(insertAbovedotData), _D_, ""), + EV_EditMethod(NF(insertAcuteData), _D_, ""), + EV_EditMethod(NF(insertBookmark), 0, ""), + EV_EditMethod(NF(insertBreveData), _D_, ""), + EV_EditMethod(NF(insertCaronData), _D_, ""), + EV_EditMethod(NF(insertCedillaData), _D_, ""), + EV_EditMethod(NF(insertCircumflexData), _D_, ""), + EV_EditMethod(NF(insertClipart), 0, ""), + EV_EditMethod(NF(insertClosingParenthesis), _D_,""), + EV_EditMethod(NF(insertColsAfter), 0, ""), + EV_EditMethod(NF(insertColsBefore), 0, ""), + EV_EditMethod(NF(insertColumnBreak), 0, ""), + EV_EditMethod(NF(insertData), _D_, ""), + EV_EditMethod(NF(insertDiaeresisData), _D_, ""), + EV_EditMethod(NF(insertDoubleacuteData),_D_, ""), + EV_EditMethod(NF(insertGraveData), _D_, ""), + EV_EditMethod(NF(insertHyperlink), 0, ""), + EV_EditMethod(NF(insertLRM), 0, ""), + EV_EditMethod(NF(insertLineBreak), 0, ""), + EV_EditMethod(NF(insertMacronData), _D_, ""), + EV_EditMethod(NF(insertNBSpace), 0, ""), + EV_EditMethod(NF(insertNBZWSpace), 0, ""), + EV_EditMethod(NF(insertOgonekData), _D_, ""), + EV_EditMethod(NF(insertOpeningParenthesis), _D_,""), + EV_EditMethod(NF(insertPageBreak), 0, ""), + EV_EditMethod(NF(insertParagraphBreak), 0, ""), + EV_EditMethod(NF(insertRLM), 0, ""), + EV_EditMethod(NF(insertRowsAfter), 0, ""), + EV_EditMethod(NF(insertRowsBefore), 0, ""), + EV_EditMethod(NF(insertSectionBreak), 0, ""), + EV_EditMethod(NF(insertSoftBreak), 0, ""), + EV_EditMethod(NF(insertSpace), 0, ""), + EV_EditMethod(NF(insertTab), 0, ""), + EV_EditMethod(NF(insertTable), 0, ""), + EV_EditMethod(NF(insertTildeData), _D_, ""), + EV_EditMethod(NF(insertZWJoiner), 0, ""), + + // j + + // k + + // l + EV_EditMethod(NF(language), 0, ""), + EV_EditMethod(NF(lockGUI), 0, ""), + EV_EditMethod(NF(lockToolbarLayout), 0, ""), + + // m + EV_EditMethod(NF(mailMerge), 0, ""), + EV_EditMethod(NF(mergeCells), 0, ""), + EV_EditMethod(NF(middleSpace), 0, ""), + + // n + EV_EditMethod(NF(newWindow), 0, ""), + EV_EditMethod(NF(noop), 0, ""), + + // o + EV_EditMethod(NF(openRecent_1), 0, ""), + EV_EditMethod(NF(openRecent_2), 0, ""), + EV_EditMethod(NF(openRecent_3), 0, ""), + EV_EditMethod(NF(openRecent_4), 0, ""), + EV_EditMethod(NF(openRecent_5), 0, ""), + EV_EditMethod(NF(openRecent_6), 0, ""), + EV_EditMethod(NF(openRecent_7), 0, ""), + EV_EditMethod(NF(openRecent_8), 0, ""), + EV_EditMethod(NF(openRecent_9), 0, ""), + EV_EditMethod(NF(openTemplate), 0, ""), + + // p + EV_EditMethod(NF(pageSetup), 0, ""), + EV_EditMethod(NF(paraBefore0), 0, ""), + EV_EditMethod(NF(paraBefore12), 0, ""), + // intended for ^V and Menu[Edit/Paste] + EV_EditMethod(NF(paste), 0, ""), + // intended for X11 middle mouse + EV_EditMethod(NF(pasteSelection), 0, ""), + EV_EditMethod(NF(pasteSpecial), 0, ""), + EV_EditMethod(NF(print), 0, ""), + EV_EditMethod(NF(printDirectly), 0, ""), + EV_EditMethod(NF(printPreview), 0, ""), + EV_EditMethod(NF(printTB), 0, ""), + + // q + EV_EditMethod(NF(querySaveAndExit), 0, ""), + + // r + EV_EditMethod(NF(redo), 0, ""), + EV_EditMethod(NF(removeFooter), 0, ""), + EV_EditMethod(NF(removeHeader), 0, ""), + EV_EditMethod(NF(replace), 0, ""), + EV_EditMethod(NF(replaceChar), _D_,""), + EV_EditMethod(NF(resizeImage), 0, ""), + EV_EditMethod(NF(revisionAccept), 0, ""), + EV_EditMethod(NF(revisionReject), 0, ""), + EV_EditMethod(NF(revisionSetViewLevel), 0, ""), + EV_EditMethod(NF(rotateCase), 0, ""), + + // s + EV_EditMethod(NF(scriptPlay), 0, ""), + EV_EditMethod(NF(scrollLineDown), 0, ""), + EV_EditMethod(NF(scrollLineLeft), 0, ""), + EV_EditMethod(NF(scrollLineRight), 0, ""), + EV_EditMethod(NF(scrollLineUp), 0, ""), + EV_EditMethod(NF(scrollPageDown), 0, ""), + EV_EditMethod(NF(scrollPageLeft), 0, ""), + EV_EditMethod(NF(scrollPageRight), 0, ""), + EV_EditMethod(NF(scrollPageUp), 0, ""), + EV_EditMethod(NF(scrollToBottom), 0, ""), + EV_EditMethod(NF(scrollToTop), 0, ""), + EV_EditMethod(NF(scrollWheelMouseDown), 0, ""), + EV_EditMethod(NF(scrollWheelMouseUp), 0, ""), + EV_EditMethod(NF(sectColumns1), 0, ""), + EV_EditMethod(NF(sectColumns2), 0, ""), + EV_EditMethod(NF(sectColumns3), 0, ""), + EV_EditMethod(NF(selectAll), 0, ""), + EV_EditMethod(NF(selectBlock), 0, ""), + EV_EditMethod(NF(selectCell), 0, ""), + EV_EditMethod(NF(selectLine), 0, ""), + EV_EditMethod(NF(selectObject), 0, ""), + EV_EditMethod(NF(selectRow), 0, ""), + EV_EditMethod(NF(selectTable), 0, ""), + EV_EditMethod(NF(selectWord), 0, ""), + EV_EditMethod(NF(setEditVI), 0, ""), + EV_EditMethod(NF(setInputVI), 0, ""), + EV_EditMethod(NF(setStyleHeading1), 0, ""), + EV_EditMethod(NF(setStyleHeading2), 0, ""), + EV_EditMethod(NF(setStyleHeading3), 0, ""), + EV_EditMethod(NF(singleSpace), 0, ""), + EV_EditMethod(NF(spellAdd), 0, ""), + EV_EditMethod(NF(spellIgnoreAll), 0, ""), + EV_EditMethod(NF(spellSuggest_1), 0, ""), + EV_EditMethod(NF(spellSuggest_2), 0, ""), + EV_EditMethod(NF(spellSuggest_3), 0, ""), + EV_EditMethod(NF(spellSuggest_4), 0, ""), + EV_EditMethod(NF(spellSuggest_5), 0, ""), + EV_EditMethod(NF(spellSuggest_6), 0, ""), + EV_EditMethod(NF(spellSuggest_7), 0, ""), + EV_EditMethod(NF(spellSuggest_8), 0, ""), + EV_EditMethod(NF(spellSuggest_9), 0, ""), + EV_EditMethod(NF(style), _D_,""), + + // t + EV_EditMethod(NF(toggleAutoSpell), 0, ""), + EV_EditMethod(NF(toggleBold), 0, ""), + EV_EditMethod(NF(toggleBottomline), 0, ""), + EV_EditMethod(NF(toggleDirOverrideLTR), 0, ""), + EV_EditMethod(NF(toggleDirOverrideRTL), 0, ""), + EV_EditMethod(NF(toggleDomDirection), 0, ""), + EV_EditMethod(NF(toggleHidden), 0, ""), + EV_EditMethod(NF(toggleIndent), 0, ""), + EV_EditMethod(NF(toggleInsertMode), 0, ""), + EV_EditMethod(NF(toggleItalic), 0, ""), + EV_EditMethod(NF(toggleMarkRevisions), 0, ""), + EV_EditMethod(NF(toggleOline), 0, ""), + EV_EditMethod(NF(togglePlain), 0, ""), + EV_EditMethod(NF(toggleStrike), 0, ""), + EV_EditMethod(NF(toggleSub), 0, ""), + EV_EditMethod(NF(toggleSuper), 0, ""), + EV_EditMethod(NF(toggleTopline), 0, ""), + EV_EditMethod(NF(toggleUline), 0, ""), + EV_EditMethod(NF(toggleUnIndent), 0, ""), + EV_EditMethod(NF(toolbarNew), 0, ""), + + // u + EV_EditMethod(NF(undo), 0, ""), + EV_EditMethod(NF(unlockGUI), 0, ""), + + // v + EV_EditMethod(NF(viCmd_5e), 0, ""), //^ + EV_EditMethod(NF(viCmd_A), 0, ""), + EV_EditMethod(NF(viCmd_C), 0, ""), + EV_EditMethod(NF(viCmd_I), 0, ""), + EV_EditMethod(NF(viCmd_J), 0, ""), + EV_EditMethod(NF(viCmd_O), 0, ""), + EV_EditMethod(NF(viCmd_P), 0, ""), + EV_EditMethod(NF(viCmd_a), 0, ""), + EV_EditMethod(NF(viCmd_c24), 0, ""), + EV_EditMethod(NF(viCmd_c28), 0, ""), + EV_EditMethod(NF(viCmd_c29), 0, ""), + EV_EditMethod(NF(viCmd_c5b), 0, ""), + EV_EditMethod(NF(viCmd_c5d), 0, ""), + EV_EditMethod(NF(viCmd_c5e), 0, ""), + EV_EditMethod(NF(viCmd_cb), 0, ""), + EV_EditMethod(NF(viCmd_cw), 0, ""), + EV_EditMethod(NF(viCmd_d24), 0, ""), + EV_EditMethod(NF(viCmd_d28), 0, ""), + EV_EditMethod(NF(viCmd_d29), 0, ""), + EV_EditMethod(NF(viCmd_d5b), 0, ""), + EV_EditMethod(NF(viCmd_d5d), 0, ""), + EV_EditMethod(NF(viCmd_d5e), 0, ""), + EV_EditMethod(NF(viCmd_db), 0, ""), + EV_EditMethod(NF(viCmd_dd), 0, ""), + EV_EditMethod(NF(viCmd_dw), 0, ""), + EV_EditMethod(NF(viCmd_o), 0, ""), + EV_EditMethod(NF(viCmd_y24), 0, ""), + EV_EditMethod(NF(viCmd_y28), 0, ""), + EV_EditMethod(NF(viCmd_y29), 0, ""), + EV_EditMethod(NF(viCmd_y5b), 0, ""), + EV_EditMethod(NF(viCmd_y5d), 0, ""), + EV_EditMethod(NF(viCmd_y5e), 0, ""), + EV_EditMethod(NF(viCmd_yb), 0, ""), + EV_EditMethod(NF(viCmd_yw), 0, ""), + EV_EditMethod(NF(viCmd_yy), 0, ""), + EV_EditMethod(NF(viewExtra), 0, ""), + EV_EditMethod(NF(viewFormat), 0, ""), + EV_EditMethod(NF(viewFullScreen), 0, ""), + EV_EditMethod(NF(viewHeadFoot), 0, ""), + EV_EditMethod(NF(viewLockStyles), 0, ""), + EV_EditMethod(NF(viewNormalLayout), 0, ""), + EV_EditMethod(NF(viewPara), 0, ""), + EV_EditMethod(NF(viewPrintLayout), 0, ""), + EV_EditMethod(NF(viewRuler), 0, ""), + EV_EditMethod(NF(viewStatus), 0, ""), + EV_EditMethod(NF(viewStd), 0, ""), + EV_EditMethod(NF(viewTB1), 0, ""), + EV_EditMethod(NF(viewTB2), 0, ""), + EV_EditMethod(NF(viewTB3), 0, ""), + EV_EditMethod(NF(viewTB4), 0, ""), + EV_EditMethod(NF(viewTable), 0, ""), + EV_EditMethod(NF(viewWebLayout), 0, ""), + + // w + EV_EditMethod(NF(warpInsPtBOB), 0, ""), + EV_EditMethod(NF(warpInsPtBOD), 0, ""), + EV_EditMethod(NF(warpInsPtBOL), 0, ""), + EV_EditMethod(NF(warpInsPtBOP), 0, ""), + EV_EditMethod(NF(warpInsPtBOS), 0, ""), + EV_EditMethod(NF(warpInsPtBOW), 0, ""), + EV_EditMethod(NF(warpInsPtEOB), 0, ""), + EV_EditMethod(NF(warpInsPtEOD), 0, ""), + EV_EditMethod(NF(warpInsPtEOL), 0, ""), + EV_EditMethod(NF(warpInsPtEOP), 0, ""), + EV_EditMethod(NF(warpInsPtEOS), 0, ""), + EV_EditMethod(NF(warpInsPtEOW), 0, ""), + EV_EditMethod(NF(warpInsPtLeft), 0, ""), + EV_EditMethod(NF(warpInsPtNextLine), 0, ""), + EV_EditMethod(NF(warpInsPtNextPage), 0, ""), + EV_EditMethod(NF(warpInsPtNextScreen), 0, ""), + EV_EditMethod(NF(warpInsPtPrevLine), 0, ""), + EV_EditMethod(NF(warpInsPtPrevPage), 0, ""), + EV_EditMethod(NF(warpInsPtPrevScreen), 0, ""), + EV_EditMethod(NF(warpInsPtRight), 0, ""), + EV_EditMethod(NF(warpInsPtToXY), 0, ""), + + // x + + // y + + // z + EV_EditMethod(NF(zoom), 0, ""), + EV_EditMethod(NF(zoom200), 0, ""), + EV_EditMethod(NF(zoom150), 0, ""), + EV_EditMethod(NF(zoom100), 0, ""), + EV_EditMethod(NF(zoom50), 0, ""), + EV_EditMethod(NF(zoom75), 0, ""), + EV_EditMethod(NF(zoomIn), 0, ""), + EV_EditMethod(NF(zoomOut), 0, ""), + EV_EditMethod(NF(zoomWhole), 0, ""), + EV_EditMethod(NF(zoomWidth), 0, "") }; -#define NrElements(a) ((sizeof(a)/sizeof(a[0]))) EV_EditMethodContainer * AP_GetEditMethods(void) @@ -131,79 +1153,10884 @@ /*****************************************************************/ #define F(fn) ap_EditMethods::fn -#define Defun(fn) bool F(fn)(AV_View* pAV_View, EV_EditMethodCallData * pCallData ) +#define Defun(fn) bool F(fn)(AV_View* pAV_View, EV_EditMethodCallData * pCallData ) #define Defun0(fn) bool F(fn)(AV_View* /*pAV_View*/, EV_EditMethodCallData * /*pCallData*/) #define Defun1(fn) bool F(fn)(AV_View* pAV_View, EV_EditMethodCallData * /*pCallData*/) #define EX(fn) F(fn)(pAV_View, pCallData) +// forward declaration +static bool _openURL(AV_View* pAV_View, const char* url); +static UT_Timer * s_pToUpdateCursor = NULL; +static UT_Worker * s_pFrequentRepeat = NULL; +static XAP_Frame * s_pLoadingFrame = NULL; +static AD_Document * s_pLoadingDoc = NULL; +static bool s_LockOutGUI = false; -#if defined(PT_TEST) || defined(FMT_TEST) || defined(UT_TEST) -Defun1(Test_Dump) +class _Freq +{ +public: + _Freq(AV_View * pView,EV_EditMethodCallData * pData, void(* exe)(AV_View *pView,EV_EditMethodCallData * pData)): + m_pView (pView), + m_pData(pData), + m_pExe(exe) + {}; + AV_View * m_pView; + EV_EditMethodCallData * m_pData; + void(* m_pExe)(AV_View * ,EV_EditMethodCallData *) ; +}; + +/*! +This little macro locks out loading frames from any activity thus preventing +segfaults. +*/ + +static bool s_EditMethods_check_frame(void) +{ + bool result = false; + if(s_LockOutGUI) + { + return true; + } + if(s_pFrequentRepeat != NULL) + { + return true; + } + XAP_Frame * pFrame = XAP_App::getApp()->getLastFocussedFrame(); + AV_View * pView = NULL; + if(pFrame) + { + pView = pFrame->getCurrentView(); + } + if(s_pLoadingFrame && (pFrame == s_pLoadingFrame)) + { + result = true; + } + else if(pFrame && (s_pLoadingDoc != NULL) && (pFrame->getCurrentDoc() == s_pLoadingDoc)) + { + result = true; + } + else if(pView && ((pView->getPoint() == 0) || pView->isLayoutFilling())) + { + result = true; + } + return result; +} + +/*! + * Call this if you want to prevent GUI operations on AbiWord. + */ +Defun(lockGUI) { + s_LockOutGUI = true; return true; } -#endif -Defun1(noop) + +/*! + * Call this to allow GUI operations on AbiWord. + */ +Defun(unlockGUI) { - // this is a no-op, so unbound menus don't assert at trade shows + s_LockOutGUI = false; return true; } -static bool s_doAboutDlg(XAP_Frame* pFrame, XAP_Dialog_Id id) +#define CHECK_FRAME if(s_EditMethods_check_frame()) return true; + + +/*! + * use this code to execute a one-off operation in an idle loop. + * This allows us to drop frequent events like those that come from arrow keys + * so we never get ahead of ourselves. + */ +static void _sFrequentRepeat(UT_Worker * pWorker) +{ + _Freq * pFreq = static_cast<_Freq *>(pWorker->getInstanceData()); + pFreq->m_pExe(pFreq->m_pView,pFreq->m_pData); +// +// Once then delete, stop and set to NULL +// + DELETEP(pFreq->m_pData); + delete pFreq; + s_pFrequentRepeat->stop(); + delete s_pFrequentRepeat; + s_pFrequentRepeat = NULL; +} + + +Defun1(toggleAutoSpell) +{ + CHECK_FRAME; + XAP_Frame * pFrame = static_cast ( pAV_View->getParentData()); + UT_ASSERT(pFrame); + + XAP_App * pApp = pFrame->getApp(); + UT_ASSERT(pApp); + XAP_Prefs * pPrefs = pApp->getPrefs(); + UT_ASSERT(pPrefs); + + XAP_PrefsScheme *pPrefsScheme = pPrefs->getCurrentScheme(); + UT_ASSERT(pPrefsScheme); + + bool b = false; + + pPrefs->getPrefsValueBool(static_cast(AP_PREF_KEY_AutoSpellCheck), &b); + return pPrefsScheme->setValueBool(static_cast(AP_PREF_KEY_AutoSpellCheck), !b); +} + +Defun1(scrollPageDown) +{ + CHECK_FRAME; + pAV_View->cmdScroll(AV_SCROLLCMD_PAGEDOWN); + + return true; +} + +Defun1(scrollPageUp) +{ + CHECK_FRAME; + pAV_View->cmdScroll(AV_SCROLLCMD_PAGEUP); + + return true; +} + +Defun1(scrollPageLeft) +{ + CHECK_FRAME; + pAV_View->cmdScroll(AV_SCROLLCMD_PAGELEFT); + + return true; +} + +Defun1(scrollPageRight) +{ + CHECK_FRAME; + pAV_View->cmdScroll(AV_SCROLLCMD_PAGERIGHT); + + return true; +} + +Defun1(scrollLineDown) +{ + CHECK_FRAME; + pAV_View->cmdScroll(AV_SCROLLCMD_LINEDOWN); + + return true; +} + +Defun1(scrollLineUp) +{ + CHECK_FRAME; + pAV_View->cmdScroll(AV_SCROLLCMD_LINEUP); + + return true; +} + +Defun1(scrollWheelMouseDown) +{ + CHECK_FRAME; + pAV_View->cmdScroll(AV_SCROLLCMD_LINEDOWN, pAV_View->getGraphics()->tlu(60)); + + return true; +} + +Defun1(scrollWheelMouseUp) +{ + CHECK_FRAME; + pAV_View->cmdScroll(AV_SCROLLCMD_LINEUP, pAV_View->getGraphics()->tlu (60)); + + return true; +} + +Defun1(scrollLineLeft) +{ + CHECK_FRAME; + pAV_View->cmdScroll(AV_SCROLLCMD_LINELEFT); + + return true; +} + +Defun1(scrollLineRight) +{ + CHECK_FRAME; + pAV_View->cmdScroll(AV_SCROLLCMD_LINERIGHT); + + return true; +} + +Defun1(scrollToTop) +{ + CHECK_FRAME; + pAV_View->cmdScroll(AV_SCROLLCMD_TOTOP); + + return true; +} + +Defun1(scrollToBottom) { + CHECK_FRAME; + pAV_View->cmdScroll(AV_SCROLLCMD_TOBOTTOM); + + return true; +} + +Defun1(toolbarNew) +{ + CHECK_FRAME; + XAP_Frame * pFrame = static_cast ( pAV_View->getParentData()); UT_ASSERT(pFrame); + XAP_App * pApp = pFrame->getApp(); + UT_ASSERT(pApp); + + XAP_Frame * pNewFrame = pApp->newFrame(); + + if (pNewFrame) + pFrame = pNewFrame; + + // the IEFileType here doesn't really matter, since the name is NULL + UT_Error error = pFrame->loadDocument(NULL, IEFT_Unknown); + + if (pNewFrame) + { + pNewFrame->show(); + } + return E2B(error); +} + +/*****************************************************************/ +/*****************************************************************/ + +// TODO i've pulled the code to compose a question in a message +// TODO box into these little s_Ask*() functions. part of this +// TODO is to isolate the question asking from the code which +// TODO decides what to do with the answer. but also to see if +// TODO we want to abstract things further and make us think about +// TODO localization of the question strings.... + +/*! + * Callback function to implement the updating loader. This enables the user + * to see the document as soon as possible and updates the size of the scroll + * bars as the document is loaded. + */ +static bool s_bFirstDrawDone = false; +static UT_sint32 s_iLastYScrollOffset = -1; +static UT_sint32 s_iLastXScrollOffset = -1; +static bool s_bFreshDraw = false; + +static void s_LoadingCursorCallback(UT_Worker * pTimer ) +{ + UT_ASSERT(pTimer); + xxx_UT_DEBUGMSG(("Update Screen on load Frame %x \n",s_pLoadingFrame)); + XAP_Frame * pFrame = s_pLoadingFrame; + UT_uint32 iPageCount = 0; + + if(pFrame == NULL) + { + s_bFirstDrawDone = false; + return; + } + const XAP_StringSet * pSS = pFrame->getApp()->getStringSet(); + pFrame->setCursor(GR_Graphics::GR_CURSOR_WAIT); + FV_View * pView = static_cast(pFrame->getCurrentView()); + if(pView) + { + GR_Graphics * pG = pView->getGraphics(); + if(pG) + { + pG->setCursor(GR_Graphics::GR_CURSOR_WAIT); + } + FL_DocLayout * pLayout = pView->getLayout(); + if(pView->getPoint() > 0) + { + pLayout->updateLayout(); + iPageCount = pLayout->countPages(); + + if(!s_bFirstDrawDone) + { + pView->draw(); + s_bFirstDrawDone = true; + } + else + { + // we only want to draw if we need to: + // (1) if the scroller position has changed + // (2) if the previous draw was due to a scroll change + // + // This way each change of scroller position will + // result in two draws, the second of which will + // ensure that anything from the current vieport that + // was not yet laid out when the first draw was made + // is drawn + if(iPageCount > 1) + { + if(pView->getYScrollOffset() != s_iLastYScrollOffset || + pView->getXScrollOffset() != s_iLastXScrollOffset) + { + pView->updateScreen(true); + s_iLastYScrollOffset = pView->getYScrollOffset(); + s_iLastXScrollOffset = pView->getXScrollOffset(); + s_bFreshDraw = true; + xxx_UT_DEBUGMSG(("Incr. loader: primary draw\n")); + } + else if(s_bFreshDraw) + { + pView->updateScreen(true); + s_bFreshDraw = false; + xxx_UT_DEBUGMSG(("Incr. loader: secondary draw\n")); + } + else + { + xxx_UT_DEBUGMSG(("Incr. loader: draw not needed\n")); + } + } + + } + + if(iPageCount > 1) + { + UT_String msg (pSS->getValue(XAP_STRING_ID_MSG_BuildingDoc)); + pFrame->setStatusMessage ( static_cast(msg.c_str()) ); + } + else + { + UT_String msg (pSS->getValue(XAP_STRING_ID_MSG_ImportingDoc)); + pFrame->setStatusMessage ( static_cast(msg.c_str()) ); + } + } + else + { + UT_String msg (pSS->getValue(XAP_STRING_ID_MSG_ImportingDoc)); + pFrame->setStatusMessage ( static_cast(msg.c_str()) ); + } + } + else + { + UT_String msg (pSS->getValue(XAP_STRING_ID_MSG_ImportingDoc)); + pFrame->setStatusMessage ( static_cast(msg.c_str()) ); s_bFirstDrawDone = false; + } +} + +/*! + * Control Method for the updating loader. +\params bool bStartStop true to start the updating loader, flase to stop it + after the document has loaded. +\params XAP_Frame * pFrame Pointer to the new frame being loaded. +*/ +static void s_StartStopLoadingCursor( bool bStartStop, XAP_Frame * pFrame) +{ + // Now construct the timer for auto-updating + if(bStartStop) + { +// +// Can't have multiple loading document yet. Need Vectors of loading frames +// and auto-updaters. Do this later. +// + if(s_pLoadingFrame != NULL) + { + return; + } + s_pLoadingFrame = pFrame; + s_pLoadingDoc = pFrame->getCurrentDoc(); + if(s_pToUpdateCursor == NULL) + { + GR_Graphics * pG = NULL; + s_pToUpdateCursor = UT_Timer::static_constructor(s_LoadingCursorCallback,NULL,pG); + } + s_bFirstDrawDone = false; + s_pToUpdateCursor->set(1000); + s_pToUpdateCursor->start(); +// s_pLoadingFrame = XAP_App::getApp()->getLastFocussedFrame(); + } + else + { + if(s_pToUpdateCursor != NULL) + { + s_pToUpdateCursor->stop(); + DELETEP(s_pToUpdateCursor); + s_pToUpdateCursor = NULL; + if(s_pLoadingFrame != NULL) + { + s_pLoadingFrame->setCursor(GR_Graphics::GR_CURSOR_DEFAULT); + FV_View * pView = static_cast(s_pLoadingFrame->getCurrentView()); + if(pView) + { + pView->setCursorToContext(); + pView->focusChange(AV_FOCUS_HERE); + } + } + s_pLoadingFrame = NULL; + } + s_pLoadingDoc = NULL; + } +} + + +static void s_TellOpenFailed(XAP_Frame * pFrame, const char * fileName, UT_Error errorCode) +{ + XAP_String_Id String_id = AP_STRING_ID_MSG_OpenFailed; + +// TODO use switch statement for more error codes +#if 0 + switch(errorCode) + { + default: + String_id = AP_STRING_ID_MSG_OpenFailed; + break; + } +#endif + + pFrame->showMessageBox(String_id, + XAP_Dialog_MessageBox::b_O, + XAP_Dialog_MessageBox::a_OK, + fileName); +} + +static void s_TellSaveFailed(XAP_Frame * pFrame, const char * fileName, UT_Error errorCode) +{ + if (errorCode == UT_SAVE_CANCELLED) // We actually don't have a write error + return; + + XAP_String_Id String_id; + + if (errorCode == -201) // We have a write error + String_id = AP_STRING_ID_MSG_SaveFailedWrite; + + else if (errorCode == -202) // We have a name error + String_id = AP_STRING_ID_MSG_SaveFailedName; + + else if (errorCode == -203) // We have an export error + String_id = AP_STRING_ID_MSG_SaveFailedExport; + + else // The generic case - should be eliminated eventually + String_id = AP_STRING_ID_MSG_SaveFailed; + + pFrame->showMessageBox(String_id, + XAP_Dialog_MessageBox::b_O, + XAP_Dialog_MessageBox::a_OK, + fileName); +} + +static void s_TellSpellDone(XAP_Frame * pFrame, bool bIsSelection) +{ + pFrame->showMessageBox(bIsSelection ? AP_STRING_ID_MSG_SpellSelectionDone : AP_STRING_ID_MSG_SpellDone, + XAP_Dialog_MessageBox::b_O, + XAP_Dialog_MessageBox::a_OK); +} + +static void s_TellNotImplemented(XAP_Frame * pFrame, const char * szWhat, int iLine) +{ + XAP_Dialog_MessageBox * message = + pFrame->createMessageBox(AP_STRING_ID_MSG_DlgNotImp, + XAP_Dialog_MessageBox::b_O, + XAP_Dialog_MessageBox::a_OK, + szWhat, __FILE__, iLine); + pFrame->showMessageBox(message); + +} + +static bool s_AskRevertFile(XAP_Frame * pFrame) +{ + // return true if we should revert the file (back to the saved copy). + + return (pFrame->showMessageBox(AP_STRING_ID_MSG_RevertBuffer, + XAP_Dialog_MessageBox::b_YN, + XAP_Dialog_MessageBox::a_YES, + pFrame->getFilename()) + == XAP_Dialog_MessageBox::a_YES); +} + +static bool s_AskCloseAllAndExit(XAP_Frame * pFrame) +{ + // return true if we should quit. + return (pFrame->showMessageBox(AP_STRING_ID_MSG_QueryExit, + XAP_Dialog_MessageBox::b_YN, + XAP_Dialog_MessageBox::a_NO) + == XAP_Dialog_MessageBox::a_YES); + +} + +static XAP_Dialog_MessageBox::tAnswer s_AskSaveFile(XAP_Frame * pFrame) +{ + XAP_Dialog_MessageBox * message = + pFrame->createMessageBox(AP_STRING_ID_MSG_ConfirmSave, + XAP_Dialog_MessageBox::b_YNC, + XAP_Dialog_MessageBox::a_YES, + pFrame->getNonDecoratedTitle()); + message->setSecondaryMessage(AP_STRING_ID_MSG_ConfirmSaveSecondary); + return pFrame->showMessageBox(message); +} + +static bool s_AskForPathname(XAP_Frame * pFrame, + bool bSaveAs, + XAP_Dialog_Id id, + const char * pSuggestedName, + char ** ppPathname, + IEFileType * ieft) +{ + // raise the file-open or file-save-as dialog. + // return a_OK or a_CANCEL depending on which button + // the user hits. + // return a pointer a UT_strdup()'d string containing the + // pathname the user entered -- ownership of this goes + // to the caller (so free it when you're done with it). + + UT_DEBUGMSG(("s_AskForPathname: frame %p, bSaveAs %ld, suggest=[%s]\n", + pFrame,bSaveAs,((pSuggestedName) ? pSuggestedName : ""))); + + UT_ASSERT(ppPathname); + *ppPathname = NULL; pFrame->raise(); XAP_DialogFactory * pDialogFactory - = (XAP_DialogFactory *)(pFrame->getDialogFactory()); + = static_cast(pFrame->getDialogFactory()); - XAP_Dialog_About * pDialog - = (XAP_Dialog_About *)(pDialogFactory->requestDialog(id)); + XAP_Dialog_FileOpenSaveAs * pDialog + = static_cast(pDialogFactory->requestDialog(id)); UT_ASSERT(pDialog); + if (!pDialog) + return false; + + if (pSuggestedName && *pSuggestedName) + { + // if caller wants to suggest a name, use it and seed the + // dialog in that directory and set the filename. + pDialog->setCurrentPathname(pSuggestedName); + pDialog->setSuggestFilename(true); + } + else + { + // if caller does not want to suggest a name, seed the dialog + // to the directory containing this document (if it has a + // name), but don't put anything in the filename portion. + PD_Document * pDoc = static_cast(pFrame->getCurrentDoc()); + UT_UTF8String title; + + if (pDoc->getMetaDataProp (PD_META_KEY_TITLE, title) && title.size()) { + pDialog->setCurrentPathname(title.utf8_str()); + pDialog->setSuggestFilename(true); + } else { + pDialog->setCurrentPathname(pFrame->getFilename()); + pDialog->setSuggestFilename(false); + } + } + + // to fill the file types popup list, we need to convert + // AP-level Imp/Exp descriptions, suffixes, and types into + // strings. + + UT_uint32 filterCount = 0; + + if (bSaveAs) + filterCount = IE_Exp::getExporterCount(); + else + filterCount = IE_Imp::getImporterCount(); + + const char ** szDescList = static_cast(UT_calloc(filterCount + 1, sizeof(char *))); + const char ** szSuffixList = static_cast(UT_calloc(filterCount + 1, sizeof(char *))); + IEFileType * nTypeList = static_cast(UT_calloc(filterCount + 1, sizeof(IEFileType))); + UT_uint32 k = 0; + + if (bSaveAs) + while (IE_Exp::enumerateDlgLabels(k, &szDescList[k], &szSuffixList[k], &nTypeList[k])) + k++; + else + while (IE_Imp::enumerateDlgLabels(k, &szDescList[k], &szSuffixList[k], &nTypeList[k])) + k++; + + pDialog->setFileTypeList(szDescList, szSuffixList, static_cast(nTypeList)); + + // AbiWord uses IEFT_AbiWord_1 as the default + + // try to remember the previous file type + static IEFileType dflFileType = IEFT_Bogus; + + if (ieft != NULL && *ieft != IEFT_Bogus) + { + // have a pre-existing file format, try to default to that + UT_DEBUGMSG(("DOM: using filetype %d\n", *ieft)); + dflFileType = *ieft; + } + else if (bSaveAs) + { + XAP_App * pApp = pFrame->getApp(); + UT_ASSERT(pApp); + XAP_Prefs * pPrefs = pApp->getPrefs(); + UT_ASSERT(pPrefs); + + const XML_Char * ftype = 0; + + pPrefs->getPrefsValue (static_cast(AP_PREF_KEY_DefaultSaveFormat), &ftype); + if (!ftype) + ftype = ".abw"; + + // load the default file format + dflFileType = IE_Exp::fileTypeForSuffix (ftype); + UT_DEBUGMSG(("DOM: reverting to default file type: %s (%d)\n", ftype, dflFileType)); + } + else + { + // try to load ABW by default + dflFileType = IE_Imp::fileTypeForSuffix (".abw"); + } + + pDialog->setDefaultFileType(dflFileType); - // run the dialog (it should really be modeless if anyone - // gets the urge to make it safe that way) pDialog->runModal(pFrame); - bool bOK = true; + XAP_Dialog_FileOpenSaveAs::tAnswer ans = pDialog->getAnswer(); + bool bOK = (ans == XAP_Dialog_FileOpenSaveAs::a_OK); + + if (bOK) + { + const char * szResultPathname = pDialog->getPathname(); + if (szResultPathname && *szResultPathname) + UT_cloneString(*ppPathname,szResultPathname); + + UT_sint32 type = pDialog->getFileType(); + dflFileType = type; + + // If the number is negative, it's a special type. + // Some operating systems which depend solely on filename + // suffixes to identify type (like Windows) will always + // want auto-detection. + if (type < 0) + switch (type) + { + case XAP_DIALOG_FILEOPENSAVEAS_FILE_TYPE_AUTO: + // do some automagical detecting + *ieft = IEFT_Unknown; + break; + default: + // it returned a type we don't know how to handle + UT_ASSERT(UT_SHOULD_NOT_HAPPEN); + } + else + *ieft = static_cast(pDialog->getFileType()); + } + + FREEP(szDescList); + FREEP(szSuffixList); + FREEP(nTypeList); pDialogFactory->releaseDialog(pDialog); return bOK; } -Defun1(dlgAbout) +static bool s_AskForGraphicPathname(XAP_Frame * pFrame, + char ** ppPathname, + IEGraphicFileType * iegft) { - XAP_Frame * pFrame = (XAP_Frame *) pAV_View->getParentData(); - UT_ASSERT(pFrame); + // raise the file-open dialog for inserting an image. + // return a_OK or a_CANCEL depending on which button + // the user hits. + // return a pointer a UT_strdup()'d string containing the + // pathname the user entered -- ownership of this goes + // to the caller (so free it when you're done with it). - s_doAboutDlg(pFrame, XAP_DIALOG_ID_ABOUT); + UT_DEBUGMSG(("s_AskForGraphicPathname: frame %p\n", + pFrame)); - return true; + UT_ASSERT(ppPathname); + *ppPathname = NULL; + + pFrame->raise(); + + XAP_DialogFactory * pDialogFactory + = static_cast(pFrame->getDialogFactory()); + + XAP_Dialog_FileOpenSaveAs * pDialog + = static_cast(pDialogFactory->requestDialog(XAP_DIALOG_ID_INSERT_PICTURE)); + UT_ASSERT(pDialog); + + pDialog->setCurrentPathname(NULL); + pDialog->setSuggestFilename(false); + + // to fill the file types popup list, we need to convert AP-level + // ImpGraphic descriptions, suffixes, and types into strings. + + UT_uint32 filterCount = IE_ImpGraphic::getImporterCount(); + + const char ** szDescList = static_cast(UT_calloc(filterCount + 1, sizeof(char *))); + const char ** szSuffixList = static_cast(UT_calloc(filterCount + 1, sizeof(char *))); + IEGraphicFileType * nTypeList = (IEGraphicFileType *) + UT_calloc(filterCount + 1, sizeof(IEGraphicFileType)); + UT_uint32 k = 0; + + while (IE_ImpGraphic::enumerateDlgLabels(k, &szDescList[k], &szSuffixList[k], &nTypeList[k])) + k++; + + pDialog->setFileTypeList(szDescList, szSuffixList, static_cast(nTypeList)); + if (iegft != NULL) + pDialog->setDefaultFileType(*iegft); + pDialog->runModal(pFrame); + + XAP_Dialog_FileOpenSaveAs::tAnswer ans = pDialog->getAnswer(); + bool bOK = (ans == XAP_Dialog_FileOpenSaveAs::a_OK); + + if (bOK) + { + const char * szResultPathname = pDialog->getPathname(); + if (szResultPathname && *szResultPathname) + UT_cloneString(*ppPathname,szResultPathname); + + UT_sint32 type = pDialog->getFileType(); + + // If the number is negative, it's a special type. + // Some operating systems which depend solely on filename + // suffixes to identify type (like Windows) will always + // want auto-detection. + if (type < 0) + switch (type) + { + case XAP_DIALOG_FILEOPENSAVEAS_FILE_TYPE_AUTO: + // do some automagical detecting + *iegft = IEGFT_Unknown; + break; + default: + // it returned a type we don't know how to handle + UT_ASSERT(UT_SHOULD_NOT_HAPPEN); + } + else + *iegft = static_cast(pDialog->getFileType()); + } + + FREEP(szDescList); + FREEP(szSuffixList); + FREEP(nTypeList); + + pDialogFactory->releaseDialog(pDialog); + + return bOK; } -Defun(closeWindow) +/*****************************************************************/ +/*****************************************************************/ + +XAP_Dialog_MessageBox::tAnswer s_CouldNotLoadFileMessage(XAP_Frame * pFrame, const char * pNewFile, UT_Error errorCode) { - XAP_Frame * pFrame = (XAP_Frame *) pAV_View->getParentData(); - UT_ASSERT(pFrame); + XAP_String_Id String_id; + + switch (errorCode) + { + case -301: + String_id = AP_STRING_ID_MSG_IE_FileNotFound; + break; + + case -302: + String_id = AP_STRING_ID_MSG_IE_NoMemory; + break; + + case -303: + String_id = AP_STRING_ID_MSG_IE_UnsupportedType; + //AP_STRING_ID_MSG_IE_UnknownType; + break; + + case -304: + String_id = AP_STRING_ID_MSG_IE_BogusDocument; + break; + + case -305: + String_id = AP_STRING_ID_MSG_IE_CouldNotOpen; + break; + + case -306: + String_id = AP_STRING_ID_MSG_IE_CouldNotWrite; + break; + + case -307: + String_id = AP_STRING_ID_MSG_IE_FakeType; + break; + + case -311: + String_id = AP_STRING_ID_MSG_IE_UnsupportedType; + break; + + default: + String_id = AP_STRING_ID_MSG_ImportError; + } + + return pFrame->showMessageBox(String_id, + XAP_Dialog_MessageBox::b_O, + XAP_Dialog_MessageBox::a_OK, + pNewFile); +} + +UT_Error fileOpen(XAP_Frame * pFrame, const char * pNewFile, IEFileType ieft) +{ + UT_DEBUGMSG(("fileOpen: loading [%s]\n",pNewFile)); XAP_App * pApp = pFrame->getApp(); UT_ASSERT(pApp); - // are we the last window? - if (1 >= pApp->getFrameCount()) + XAP_Frame * pNewFrame = NULL; + // not needed bool bRes = false; + UT_Error errorCode = UT_IE_IMPORTERROR; + + // see if requested file is already open in another frame + UT_sint32 ndx = pApp->findFrame(pNewFile); + if (ndx >= 0) { - pApp->reallyExit(); + // yep, reuse it + pNewFrame = pApp->getFrame(ndx); + UT_ASSERT(pNewFrame); + + if (s_AskRevertFile(pNewFrame)) + { + // re-load the document in pNewFrame + s_StartStopLoadingCursor( true,pNewFrame); + errorCode = pNewFrame->loadDocument(pNewFile, ieft); + if (!errorCode) + { + pNewFrame->show(); + } + else + { + s_CouldNotLoadFileMessage(pNewFrame,pNewFile, errorCode); + } + } + else + { + // cancel the FileOpen. + errorCode = UT_OK; // don't remove from recent list + } + s_StartStopLoadingCursor( false,NULL); + return errorCode; } - // nuke the window - pFrame->close(); - pApp->forgetFrame(pFrame); - delete pFrame; - - return true; -} + // We generally open documents in a new frame, which keeps the + // contents of the current frame available. + // However, as a convenience we do replace the contents of the + // current frame if it's the only top-level view on an empty, + // untitled document. + if (pFrame->isDirty() || pFrame->getFilename() || (pFrame->getViewNumber() > 0)) + { + // open new document in a new frame. if we fail, + // put up an error dialog on current frame (our + // new one is not completely instantiated) and + // return. we do not create a new untitled document + // in this case. + pNewFrame = pApp->newFrame(); + if (!pNewFrame) + { + s_StartStopLoadingCursor( false,NULL); + return false; + } + +// Open a complete but blank frame, then load the document into it + + errorCode = pNewFrame->loadDocument(NULL, IEFT_Unknown); + if (!errorCode) + { + pNewFrame->show(); + } + else + { + return false; + } + + + s_StartStopLoadingCursor( true,pNewFrame); + errorCode = pNewFrame->loadDocument(pNewFile, ieft); + if (!errorCode) + { + pNewFrame->show(); + } +#if 0 + else + { + // TODO there is a problem with the way we create a + // TODO new frame and then load a documentent into + // TODO it. if we try to load pNewFile and fail, + // TODO and then destroy the window, and raise a + // TODO message box (on the original window) we get + // TODO nasty race on UNIX. raising the dialog and + // TODO waiting for input flushes out the show-windows + // TODO on the new (and not yet completely instantiated) + // TODO window. this causes a view-less top-level + // TODO window to appear -- which causes lots of + // TODO expose-related problems... and then other + // TODO problems which appear to be related to having + // TODO multiple gtk_main()'s on the stack.... + // TODO + // TODO for now, we force a new untitled document into + // TODO the new window and then raise the message on + // TODO this new window. + // TODO + // TODO long term, we may want to modified pApp->newFrame() + // TODO to take an 'bool bShowWindow' argument.... + + // the IEFileType here doesn't really matter since the file name is NULL + errorCode = pNewFrame->loadDocument(NULL, IEFT_Unknown); + if (!errorCode) + pNewFrame->updateZoom(); + pNewFrame->show(); + s_CouldNotLoadFileMessage(pNewFrame,pNewFile, errorCode); + } +#endif + s_StartStopLoadingCursor( false,NULL); + return errorCode; + } + // we are replacing the single-view, unmodified, untitled document. + // if we fail, put up an error message on the current frame + // and return -- we do not replace this untitled document with a + // new untitled document. + s_StartStopLoadingCursor( true,pFrame); + errorCode = pFrame->loadDocument(pNewFile, ieft); + if (!errorCode) + { + pFrame->updateZoom(); + pFrame->show(); + } + else + { + s_CouldNotLoadFileMessage(pFrame,pNewFile, errorCode); + } + s_StartStopLoadingCursor( false,NULL); + return errorCode; +} + +#define ABIWORD_VIEW FV_View * pView = static_cast(pAV_View); + +Defun1(importStyles) +{ + CHECK_FRAME; + XAP_Frame * pFrame = static_cast (pAV_View->getParentData()); + UT_return_val_if_fail(pFrame,false); + + UT_Error error = UT_IE_IMPORTERROR; + char * pFile = NULL; + IEFileType ieft = IEFT_Unknown; + bool bOK = s_AskForPathname(pFrame,false, XAP_DIALOG_ID_FILE_OPEN, NULL,&pFile,&ieft); + + if (!bOK || !pFile) + return false; + + PD_Document * pDoc = static_cast(pFrame->getCurrentDoc()); + + UT_return_val_if_fail(pDoc,false); + + error = pDoc->importStyles(pFile,ieft); + + return E2B(error); +} + + +Defun1(fileOpen) +{ + CHECK_FRAME; + XAP_Frame * pFrame = static_cast (pAV_View->getParentData()); + UT_ASSERT(pFrame); + + char * pNewFile = NULL; + IEFileType ieft = static_cast(pFrame->getCurrentDoc())->getLastOpenedType(); + bool bOK = s_AskForPathname(pFrame,false, XAP_DIALOG_ID_FILE_OPEN, NULL,&pNewFile,&ieft); + + if (!bOK || !pNewFile) + return false; + + // we own storage for pNewFile and must free it. + + UT_Error error = ::fileOpen(pFrame, pNewFile, ieft); + + free(pNewFile); + return E2B(error); +} + +static UT_Error +s_importFile (XAP_Frame * pFrame, const char * pNewFile, IEFileType ieft) +{ + UT_DEBUGMSG(("fileOpen: loading [%s]\n",pNewFile)); + XAP_App * pApp = pFrame->getApp(); + UT_ASSERT(pApp); + XAP_Frame * pNewFrame = NULL; + // not needed bool bRes = false; + UT_Error errorCode = UT_IE_IMPORTERROR; + + // We open documents in a new frame, which keeps the + // contents of the current frame available. + // However, as a convenience we do replace the contents of the + // current frame if it's the only top-level view on an empty, + // untitled document. + + if (pFrame->isDirty() || pFrame->getFilename() || (pFrame->getViewNumber() > 0)) + { + // open new document in a new frame. if we fail, + // put up an error dialog on current frame (our + // new one is not completely instantiated) and + // return. we do not create a new untitled document + // in this case. + + pNewFrame = pApp->newFrame(); + if (!pNewFrame) + { + s_StartStopLoadingCursor( false,NULL); + return false; + } + + // treat import as creating a new, dirty document that + // must be saved to be made 'clean' + s_StartStopLoadingCursor( true,pNewFrame); + errorCode = pNewFrame->importDocument(pNewFile, ieft, false); + if (!errorCode) + { + pNewFrame->show(); // don't add to the MRU + } + else + { + // see problem documented in ::fileOpen() + errorCode = pNewFrame->loadDocument(NULL, IEFT_Unknown); + if (!errorCode) + pNewFrame->show(); + s_CouldNotLoadFileMessage(pNewFrame,pNewFile, errorCode); + } + s_StartStopLoadingCursor( false,NULL); + return errorCode; + } + + // we are replacing the single-view, unmodified, untitled document. + // if we fail, put up an error message on the current frame + // and return -- we do not replace this untitled document with a + // new untitled document. + s_StartStopLoadingCursor( true,pFrame); + errorCode = pFrame->importDocument(pNewFile, ieft); + if (!errorCode) + { + pFrame->show(); // don't add to the MRU + } + else + { + s_CouldNotLoadFileMessage(pFrame,pNewFile, errorCode); + } + s_StartStopLoadingCursor( false,NULL); + return errorCode; +} + +Defun1(openTemplate) +{ + CHECK_FRAME; + XAP_Frame * pFrame = static_cast ( pAV_View->getParentData()); + UT_ASSERT(pFrame); + + char * pNewFile = NULL; + IEFileType ieft = static_cast(pFrame->getCurrentDoc())->getLastOpenedType(); + bool bOK = s_AskForPathname(pFrame,false, XAP_DIALOG_ID_FILE_IMPORT, NULL,&pNewFile,&ieft); + + if (!bOK || !pNewFile) + return false; + + // we own storage for pNewFile and must free it. + + UT_Error error = s_importFile(pFrame, pNewFile, ieft); + + free(pNewFile); + return E2B(error); +} + +Defun(fileSave) +{ + CHECK_FRAME; + XAP_Frame * pFrame = static_cast (pAV_View->getParentData()); + UT_ASSERT(pFrame); + + // can only save without prompting if filename already known + if (!pFrame->getFilename()) + return EX(fileSaveAs); + + UT_Error errSaved; + errSaved = pAV_View->cmdSave(); + + // if it has a problematic extension save as instead + if (errSaved == UT_EXTENSIONERROR) + return EX(fileSaveAs); + + if (errSaved) + { + // throw up a dialog + s_TellSaveFailed(pFrame, pFrame->getFilename(), errSaved); + return false; + } + + if (pFrame->getViewNumber() > 0) + { + XAP_App * pApp = pFrame->getApp(); + UT_ASSERT(pApp); + + pApp->updateClones(pFrame); + } + + return true; +} + +static bool +s_actuallySaveAs(AV_View * pAV_View, bool overwriteName) +{ + XAP_Frame * pFrame = static_cast ( pAV_View->getParentData()); + UT_ASSERT(pFrame); + + IEFileType ieft = static_cast(pFrame->getCurrentDoc())->getLastSavedAsType(); + char * pNewFile = NULL; + XAP_Dialog_Id id = XAP_DIALOG_ID_FILE_SAVEAS; + + if ( !overwriteName ) + id = XAP_DIALOG_ID_FILE_EXPORT; + + bool bOK = s_AskForPathname(pFrame,true, id, pFrame->getFilename(),&pNewFile,&ieft); + + if (!bOK || !pNewFile) + return false; + + UT_DEBUGMSG(("fileSaveAs: saving as [%s]\n",pNewFile)); + + UT_Error errSaved; + errSaved = pAV_View->cmdSaveAs(pNewFile, static_cast(ieft), overwriteName); + if (errSaved) + { + // throw up a dialog + s_TellSaveFailed(pFrame, pNewFile, errSaved); + free(pNewFile); + return false; + } + + // ignore all of this stuff + if (!overwriteName) + return bOK; + + // update the MRU list + XAP_App * pApp = pFrame->getApp(); + UT_ASSERT(pApp); + free(pNewFile); + + if (pFrame->getViewNumber() > 0) + { + // renumber clones + pApp->updateClones(pFrame); + } + + return true; +} + +Defun1(fileExport) +{ + CHECK_FRAME; + return s_actuallySaveAs(pAV_View, false); +} + +Defun1(fileImport) +{ + CHECK_FRAME; + XAP_Frame * pFrame = static_cast ( pAV_View->getParentData()); + UT_ASSERT(pFrame); + + char * pNewFile = NULL; + IEFileType ieft = static_cast(pFrame->getCurrentDoc())->getLastOpenedType(); + bool bOK = s_AskForPathname(pFrame,false, XAP_DIALOG_ID_FILE_IMPORT, NULL,&pNewFile,&ieft); + + if (!bOK || !pNewFile) + return false; + + // we own storage for pNewFile and must free it. + + UT_Error error = s_importFile(pFrame, pNewFile, ieft); + + free(pNewFile); + return E2B(error); +} + +Defun1(fileSaveAs) +{ + CHECK_FRAME; + return s_actuallySaveAs(pAV_View, true); +} + +Defun1(fileSaveTemplate) +{ + CHECK_FRAME; + + XAP_Frame * pFrame = static_cast ( pAV_View->getParentData()); + UT_ASSERT(pFrame); + + IEFileType ieft = IE_Exp::fileTypeForSuffix ( ".awt" ) ; + char * pNewFile = NULL; + XAP_Dialog_Id id = XAP_DIALOG_ID_FILE_SAVEAS; + + UT_String suggestedName (XAP_App::getApp()->getUserPrivateDirectory()); + suggestedName += "/templates/" ; + + bool bOK = s_AskForPathname(pFrame,true, id, suggestedName.c_str(),&pNewFile,&ieft); + + if (!bOK || !pNewFile) + return false; + + UT_DEBUGMSG(("fileSaveTemplate: saving as [%s]\n",pNewFile)); + + UT_Error errSaved; + errSaved = pAV_View->cmdSaveAs(pNewFile, static_cast(ieft), false); + if (errSaved) + { + // throw up a dialog + s_TellSaveFailed(pFrame, pNewFile, errSaved); + free(pNewFile); + return false; + } + + return bOK; +} + +Defun1(fileSaveAsWeb) +{ + CHECK_FRAME; + XAP_Frame * pFrame = static_cast(pAV_View->getParentData()); + IEFileType ieft = IE_Exp::fileTypeForSuffix (".xhtml"); + char * pNewFile = NULL; + bool bOK = s_AskForPathname(pFrame,true, XAP_DIALOG_ID_FILE_SAVEAS, pFrame->getFilename(),&pNewFile,&ieft); + + if (!bOK || !pNewFile) + return false; + + UT_Error errSaved; + errSaved = pAV_View->cmdSaveAs(pNewFile, ieft); + if (errSaved) + { + // throw up a dialog + s_TellSaveFailed(pFrame, pNewFile, errSaved); + free(pNewFile); + return false; + } + + return true; +} + +Defun1(fileSaveImage) +{ + CHECK_FRAME; + XAP_Frame * pFrame = static_cast ( pAV_View->getParentData()); + UT_ASSERT(pFrame); + + XAP_DialogFactory * pDialogFactory + = static_cast(pFrame->getDialogFactory()); + + XAP_Dialog_FileOpenSaveAs * pDialog + = static_cast(pDialogFactory->requestDialog(XAP_DIALOG_ID_FILE_SAVEAS)); + UT_ASSERT(pDialog); + + UT_uint32 filterCount = 1; + const char ** szDescList = static_cast(UT_calloc(filterCount + 1, sizeof(char *))); + const char ** szSuffixList = static_cast(UT_calloc(filterCount + 1, sizeof(char *))); + IEFileType * nTypeList = static_cast(UT_calloc(filterCount + 1, sizeof(IEFileType))); + + // we only support saving images in png format for now + szDescList[0] = "Portable Network Graphics (.png)"; + szSuffixList[0] = "*.png"; + nTypeList[0] = static_cast(1); + + pDialog->setFileTypeList(szDescList, szSuffixList, + static_cast(nTypeList)); + + pDialog->setDefaultFileType(static_cast(1)); + + pDialog->runModal(pFrame); + + XAP_Dialog_FileOpenSaveAs::tAnswer ans = pDialog->getAnswer(); + bool bOK = (ans == XAP_Dialog_FileOpenSaveAs::a_OK); + + if (bOK) + { + const char * szResultPathname = pDialog->getPathname(); + if (szResultPathname && *szResultPathname) + { + FV_View * pView = static_cast(pAV_View); + pView->saveSelectedImage (szResultPathname); + } + } + + FREEP(szDescList); + FREEP(szSuffixList); + FREEP(nTypeList); + + pDialogFactory->releaseDialog(pDialog); + + return true; +} + +Defun1(filePreviewWeb) +{ + CHECK_FRAME; + XAP_Frame * pFrame = static_cast(pAV_View->getParentData()); + char szTempFileName[ 2048 ]; + + UT_tmpnam(szTempFileName); + + // Make sure that our filename ends with .html + // This is necessary for this feature to work on Win32! + if( strlen( szTempFileName ) > 5 ) + { + char *pWhere = strrchr( szTempFileName, '.' ); + + if( pWhere ) + { + if( UT_stricmp( pWhere, ".html" ) && UT_stricmp( pWhere, ".htm" ) ) + strcpy( pWhere, ".html" ); + } + else + strcat( szTempFileName, ".html" ); + } + + UT_Error errSaved = UT_OK; + + // we do this because we don't want to change the default + // document extension or rename what we're working on + errSaved = pAV_View->cmdSaveAs(szTempFileName, IE_Exp::fileTypeForSuffix(".xhtml"), false); + + if(errSaved != UT_OK) + { + // throw up a dialog + s_TellSaveFailed(pFrame, szTempFileName, errSaved); + return false; + } + + char * tmpUrl = NULL; + + if (szTempFileName[0] == '/') + tmpUrl = UT_catPathname("file://", szTempFileName); + else + tmpUrl = UT_catPathname("file:///", szTempFileName); + + bool bOk = _openURL(pAV_View, tmpUrl); + FREEP(tmpUrl); + +#if 0 + // ugly race condition + UT_unlink (szTempFileName); +#endif + + return bOk; +} + +Defun1(undo) +{ + CHECK_FRAME; + pAV_View->cmdUndo(1); + return true; +} + +Defun1(redo) +{ + CHECK_FRAME; + pAV_View->cmdRedo(1); + return true; +} + +Defun1(newWindow) +{ + CHECK_FRAME; + XAP_Frame * pFrame = static_cast ( pAV_View->getParentData()); + UT_ASSERT(pFrame); + XAP_Frame * pClone = pFrame->cloneFrame(); + if(!pClone) + { + return false; + } + s_StartStopLoadingCursor(true,pClone); + pClone = pFrame->buildFrame(pClone); + s_StartStopLoadingCursor(false,pClone); + return (pClone ? true : false); +} + +static bool _openRecent(AV_View* pAV_View, UT_uint32 ndx) +{ + XAP_Frame * pFrame = static_cast ( pAV_View->getParentData()); + UT_ASSERT(pFrame); + XAP_App * pApp = pFrame->getApp(); + UT_ASSERT(pApp); + XAP_Prefs * pPrefs = pApp->getPrefs(); + UT_ASSERT(pPrefs); + + UT_ASSERT(ndx > 0); + UT_ASSERT(ndx <= pPrefs->getRecentCount()); + + const char * szRecent = pPrefs->getRecent(ndx); + + // TODO HACK BROKEN BUSTED BLAH WARNING NOTE ERROR + // BROKEN: We should store some sort of file type with the MRU data + // BROKEN: or we don't know what to open it as! We can't assume + // BROKEN: IEFT_Unknown will detect what the user saved it as, + // BROKEN: since the user can explictly export as any type. + // TODO HACK BROKEN BUSTED BLAH WARNING NOTE ERROR + + UT_Error error = fileOpen(pFrame, szRecent, IEFT_Unknown); + + if (error) + pPrefs->removeRecent(ndx); + + return E2B(error); +} + +Defun1(openRecent_1) +{ + CHECK_FRAME; + return _openRecent(pAV_View, 1); +} +Defun1(openRecent_2) +{ + CHECK_FRAME; + return _openRecent(pAV_View, 2); +} +Defun1(openRecent_3) +{ + CHECK_FRAME; + return _openRecent(pAV_View, 3); +} +Defun1(openRecent_4) +{ + CHECK_FRAME; + return _openRecent(pAV_View, 4); +} +Defun1(openRecent_5) +{ + CHECK_FRAME; + return _openRecent(pAV_View, 5); +} +Defun1(openRecent_6) +{ + CHECK_FRAME; + return _openRecent(pAV_View, 6); +} +Defun1(openRecent_7) +{ + CHECK_FRAME; + return _openRecent(pAV_View, 7); +} +Defun1(openRecent_8) +{ + CHECK_FRAME; + return _openRecent(pAV_View, 8); +} +Defun1(openRecent_9) +{ + CHECK_FRAME; + return _openRecent(pAV_View, 9); +} + +static bool _activateWindow(AV_View* pAV_View, UT_uint32 ndx) +{ + XAP_Frame * pFrame = static_cast ( pAV_View->getParentData()); + UT_ASSERT(pFrame); + XAP_App * pApp = pFrame->getApp(); + UT_ASSERT(pApp); + + UT_ASSERT(ndx > 0); + UT_ASSERT(ndx <= pApp->getFrameCount()); + + + XAP_Frame * pSelFrame = pApp->getFrame(ndx - 1); + + if (pSelFrame) + pSelFrame->raise(); + + return true; +} + +Defun1(activateWindow_1) +{ + CHECK_FRAME; + return _activateWindow(pAV_View, 1); +} +Defun1(activateWindow_2) +{ + CHECK_FRAME; + return _activateWindow(pAV_View, 2); +} +Defun1(activateWindow_3) +{ + CHECK_FRAME; + return _activateWindow(pAV_View, 3); +} +Defun1(activateWindow_4) +{ + CHECK_FRAME; + return _activateWindow(pAV_View, 4); +} +Defun1(activateWindow_5) +{ + CHECK_FRAME; + return _activateWindow(pAV_View, 5); +} +Defun1(activateWindow_6) +{ + CHECK_FRAME; + return _activateWindow(pAV_View, 6); +} +Defun1(activateWindow_7) +{ + CHECK_FRAME; + return _activateWindow(pAV_View, 7); +} +Defun1(activateWindow_8) +{ + CHECK_FRAME; + return _activateWindow(pAV_View, 8); +} +Defun1(activateWindow_9) +{ + CHECK_FRAME; + return _activateWindow(pAV_View, 9); +} + +static bool s_doMoreWindowsDlg(XAP_Frame* pFrame, XAP_Dialog_Id id) +{ + UT_ASSERT(pFrame); + + pFrame->raise(); + + XAP_DialogFactory * pDialogFactory + = static_cast(pFrame->getDialogFactory()); + + XAP_Dialog_WindowMore * pDialog + = static_cast(pDialogFactory->requestDialog(id)); + UT_ASSERT(pDialog); + if (!pDialog) + return false; + + // run the dialog + pDialog->runModal(pFrame); + + XAP_Frame * pSelFrame = NULL; + bool bOK = (pDialog->getAnswer() == XAP_Dialog_WindowMore::a_OK); + + if (bOK) + pSelFrame = pDialog->getSelFrame(); + + pDialogFactory->releaseDialog(pDialog); + + // now do it + if (pSelFrame) + pSelFrame->raise(); + + return bOK; +} + +Defun1(dlgMoreWindows) +{ + CHECK_FRAME; + XAP_Frame * pFrame = static_cast ( pAV_View->getParentData()); + UT_ASSERT(pFrame); + + s_doMoreWindowsDlg(pFrame, XAP_DIALOG_ID_WINDOWMORE); + return true; +} + +static bool s_doAboutDlg(XAP_Frame* pFrame, XAP_Dialog_Id id) +{ + UT_ASSERT(pFrame); + + pFrame->raise(); + + XAP_DialogFactory * pDialogFactory + = static_cast(pFrame->getDialogFactory()); + + XAP_Dialog_About * pDialog + = static_cast(pDialogFactory->requestDialog(id)); + UT_ASSERT(pDialog); + if (!pDialog) + return false; + + // run the dialog (it should really be modeless if anyone + // gets the urge to make it safe that way) + pDialog->runModal(pFrame); + + bool bOK = true; + + pDialogFactory->releaseDialog(pDialog); + + return bOK; +} + +static bool s_doToggleCase(XAP_Frame * pFrame, FV_View * pView, XAP_Dialog_Id id) +{ + UT_ASSERT(pFrame); + + pFrame->raise(); + +#if 0 + // we do not need selection (if there is none, we will try to apply + // the case to the word at editing position) + if (pView->isSelectionEmpty()) + { + pFrame->showMessageBox(AP_STRING_ID_MSG_EmptySelection, + XAP_Dialog_MessageBox::b_O, + XAP_Dialog_MessageBox::a_OK); + return false; + } +#endif + + XAP_DialogFactory * pDialogFactory + = static_cast(pFrame->getDialogFactory()); + + AP_Dialog_ToggleCase * pDialog + = static_cast(pDialogFactory->requestDialog(id)); + UT_ASSERT(pDialog); + if (!pDialog) + return false; + + // run the dialog (it should really be modeless if anyone + // gets the urge to make it safe that way) + pDialog->runModal(pFrame); + bool bOK = (pDialog->getAnswer() == AP_Dialog_ToggleCase::a_OK); + + if (bOK) + pView->toggleCase(pDialog->getCase()); + + pDialogFactory->releaseDialog(pDialog); + + return bOK; +} + +Defun1(dlgToggleCase) +{ + CHECK_FRAME; + XAP_Frame * pFrame = static_cast ( pAV_View->getParentData()); + UT_ASSERT(pFrame); + + return s_doToggleCase(pFrame, static_cast(pAV_View), AP_DIALOG_ID_TOGGLECASE); +} + +Defun1(rotateCase) +{ + CHECK_FRAME; + FV_View * pView = static_cast(pAV_View); + pView->toggleCase(CASE_ROTATE); + + return true; +} + +Defun1(dlgAbout) +{ + CHECK_FRAME; + XAP_Frame * pFrame = static_cast ( pAV_View->getParentData()); + UT_ASSERT(pFrame); + + s_doAboutDlg(pFrame, XAP_DIALOG_ID_ABOUT); + + return true; +} + +Defun(dlgMetaData) +{ + CHECK_FRAME; + + FV_View * pView = static_cast(pAV_View); + + XAP_Frame * pFrame = static_cast(pView->getParentData()); + UT_ASSERT(pFrame); + + XAP_App * pApp = pFrame->getApp(); + UT_ASSERT(pApp); + + pFrame->raise(); + + XAP_DialogFactory * pDialogFactory + = static_cast(pFrame->getDialogFactory()); + + AP_Dialog_MetaData * pDialog + = static_cast(pDialogFactory->requestDialog(AP_DIALOG_ID_METADATA)); + UT_ASSERT(pDialog); + if (!pDialog) + return false; + + // get the properties + + PD_Document * pDocument = pView->getDocument(); + + UT_String prop ( "" ) ; + + if ( pDocument->getMetaDataProp ( PD_META_KEY_TITLE, prop ) ) + pDialog->setTitle ( prop ) ; + if ( pDocument->getMetaDataProp ( PD_META_KEY_SUBJECT, prop ) ) + pDialog->setSubject ( prop ) ; + if ( pDocument->getMetaDataProp ( PD_META_KEY_CREATOR, prop ) ) + pDialog->setAuthor ( prop ) ; + if ( pDocument->getMetaDataProp ( PD_META_KEY_PUBLISHER, prop ) ) + pDialog->setPublisher ( prop ) ; + if ( pDocument->getMetaDataProp ( PD_META_KEY_CONTRIBUTOR, prop ) ) + pDialog->setCoAuthor ( prop ) ; + if ( pDocument->getMetaDataProp ( PD_META_KEY_TYPE, prop ) ) + pDialog->setCategory ( prop ) ; + if ( pDocument->getMetaDataProp ( PD_META_KEY_KEYWORDS, prop ) ) + pDialog->setKeywords ( prop ) ; + if ( pDocument->getMetaDataProp ( PD_META_KEY_LANGUAGE, prop ) ) + pDialog->setLanguages ( prop ) ; + if ( pDocument->getMetaDataProp ( PD_META_KEY_SOURCE, prop ) ) + pDialog->setSource ( prop ) ; + if ( pDocument->getMetaDataProp ( PD_META_KEY_RELATION, prop ) ) + pDialog->setRelation ( prop ) ; + if ( pDocument->getMetaDataProp ( PD_META_KEY_COVERAGE, prop ) ) + pDialog->setCoverage ( prop ) ; + if ( pDocument->getMetaDataProp ( PD_META_KEY_RIGHTS, prop ) ) + pDialog->setRights ( prop ) ; + if ( pDocument->getMetaDataProp ( PD_META_KEY_DESCRIPTION, prop ) ) + pDialog->setDescription ( prop ) ; + + // run the dialog + + pDialog->runModal(pFrame); + bool bOK = (pDialog->getAnswer() == AP_Dialog_MetaData::a_OK); + + if (bOK) + { + // reset the props + pDocument->setMetaDataProp ( PD_META_KEY_TITLE, pDialog->getTitle() ) ; + pDocument->setMetaDataProp ( PD_META_KEY_SUBJECT, pDialog->getSubject() ) ; + pDocument->setMetaDataProp ( PD_META_KEY_CREATOR, pDialog->getAuthor() ) ; + pDocument->setMetaDataProp ( PD_META_KEY_PUBLISHER, pDialog->getPublisher() ) ; + pDocument->setMetaDataProp ( PD_META_KEY_CONTRIBUTOR, pDialog->getCoAuthor() ) ; + pDocument->setMetaDataProp ( PD_META_KEY_TYPE, pDialog->getCategory() ) ; + pDocument->setMetaDataProp ( PD_META_KEY_KEYWORDS, pDialog->getKeywords() ) ; + pDocument->setMetaDataProp ( PD_META_KEY_LANGUAGE, pDialog->getLanguages() ) ; + pDocument->setMetaDataProp ( PD_META_KEY_SOURCE, pDialog->getSource() ) ; + pDocument->setMetaDataProp ( PD_META_KEY_RELATION, pDialog->getRelation() ) ; + pDocument->setMetaDataProp ( PD_META_KEY_COVERAGE, pDialog->getCoverage() ) ; + pDocument->setMetaDataProp ( PD_META_KEY_RIGHTS, pDialog->getRights() ) ; + pDocument->setMetaDataProp ( PD_META_KEY_DESCRIPTION, pDialog->getDescription() ) ; + + // TODO: set the document as dirty when something changed + } + + // release the dialog + + pDialogFactory->releaseDialog(pDialog); + return true ; +} + +Defun(fileNew) +{ + CHECK_FRAME; + FV_View * pView = static_cast(pAV_View); + + XAP_Frame * pFrame = static_cast(pView->getParentData()); + UT_ASSERT(pFrame); + + XAP_App * pApp = pFrame->getApp(); + UT_ASSERT(pApp); + + pFrame->raise(); + + XAP_DialogFactory * pDialogFactory + = static_cast(pFrame->getDialogFactory()); + + AP_Dialog_New * pDialog + = static_cast(pDialogFactory->requestDialog(AP_DIALOG_ID_FILE_NEW)); + UT_ASSERT(pDialog); + if (!pDialog) + return false; + + pDialog->runModal(pFrame); + bool bOK = (pDialog->getAnswer() == AP_Dialog_New::a_OK); + + if (bOK) + { + UT_String str; + const char * szStr; + + switch(pDialog->getOpenType()) + { + // this will just open up a blank document + case AP_Dialog_New::open_New : + break; + + // these two will open things as templates + case AP_Dialog_New::open_Existing : + case AP_Dialog_New::open_Template : + szStr = pDialog->getFileName(); + if (szStr) + str += szStr; + break; + } + + if (str.size()) + { + // we want to create from a template + bOK = s_importFile (pFrame, str.c_str(), IEFT_Unknown) == UT_OK; + } + else + { + // we want a new blank doc + XAP_Frame * pNewFrame = pApp->newFrame(); + + if (pNewFrame) + pFrame = pNewFrame; + + bOK = pFrame->loadDocument(NULL, IEFT_Unknown) == UT_OK; + + if (pNewFrame) + { + pNewFrame->show(); + } + } + } + + pDialogFactory->releaseDialog(pDialog); + return bOK; +} + +static bool _helpOpenURL(XAP_Frame * pFrame, const char* helpURL) +{ + UT_return_val_if_fail(pFrame, false); + pFrame->openHelpURL(helpURL); + return true; +} + +static bool _openURL(AV_View* pAV_View, const char* url) +{ + XAP_Frame* pFrame = static_cast (pAV_View->getParentData()); + pFrame->openURL (url); + return true; +} + +bool helpLocalizeAndOpenURL(XAP_Frame * pFrame, bool bLocal, const char* pathBeforeLang, const char* pathAfterLang) +{ + UT_return_val_if_fail(pFrame, false); + UT_String url (pFrame->localizeHelpUrl (bLocal, pathBeforeLang, pathAfterLang)); + return _helpOpenURL(pFrame, url.c_str()); +} + +static bool _helpLocalizeAndOpenURL(AV_View* pAV_View, bool bLocal, const char* pathBeforeLang, const char* pathAfterLang) +{ + XAP_Frame* pFrame = static_cast (pAV_View->getParentData()); + + return helpLocalizeAndOpenURL(pFrame, bLocal, pathBeforeLang, pathAfterLang); +} + +Defun1(helpContents) +{ + CHECK_FRAME; + return _helpLocalizeAndOpenURL(pAV_View, true, "AbiWord/help", "index"); +} + +Defun1(helpIndex) +{ + CHECK_FRAME; + return _helpLocalizeAndOpenURL(pAV_View, true, "AbiWord/help", "introduction"); +} + +Defun1(helpCheckVer) +{ + CHECK_FRAME; + UT_String versionURL ("http://www.abisource.com/users/check_version.phtml?version="); + versionURL += XAP_App::s_szBuild_Version; + return _openURL(pAV_View, versionURL.c_str()); +} + +Defun1(helpReportBug) +{ + CHECK_FRAME; + UT_String bugURL ("http://bugzilla.abisource.com/enter_bug.cgi?product=AbiWord"); + + bugURL += "&version="; + bugURL += XAP_App::s_szBuild_Version; + bugURL += "&comment=("; + bugURL += XAP_App::s_szBuild_Options; + bugURL += ")%0d%0a%0d%0a"; + + return _openURL(pAV_View, bugURL.c_str()); +} + +Defun1(helpSearch) +{ + CHECK_FRAME; + return _helpLocalizeAndOpenURL(pAV_View, true, "AbiWord/help", "search"); +} + +Defun1(helpCredits) +{ + CHECK_FRAME; + return _helpLocalizeAndOpenURL(pAV_View, true, "AbiWord/help", "credits"); +} + +Defun1(helpAboutGnu) +{ + CHECK_FRAME; + return _openURL(pAV_View, "http://www.gnu.org/philosophy/"); +} + +Defun1(helpAboutGnomeOffice) +{ + CHECK_FRAME; + return _openURL(pAV_View, "http://www.gnome.org/gnome-office/"); +} + +Defun1(helpAboutOS) +{ + CHECK_FRAME; + return _helpLocalizeAndOpenURL(pAV_View, true, "AbiWord/help", "aboutos"); +} + +Defun1(cycleWindows) +{ + CHECK_FRAME; + XAP_Frame * pFrame = static_cast ( pAV_View->getParentData()); + UT_ASSERT(pFrame); + XAP_App * pApp = pFrame->getApp(); + UT_ASSERT(pApp); + + UT_sint32 ndx = pApp->findFrame(pFrame); + UT_ASSERT(ndx >= 0); + + if (ndx < static_cast(pApp->getFrameCount()) - 1) + ndx++; + else + ndx = 0; + + XAP_Frame * pSelFrame = pApp->getFrame(ndx); + + if (pSelFrame) + pSelFrame->raise(); + + return true; +} + +Defun1(cycleWindowsBck) +{ + CHECK_FRAME; + XAP_Frame * pFrame = static_cast ( pAV_View->getParentData()); + UT_ASSERT(pFrame); + XAP_App * pApp = pFrame->getApp(); + UT_ASSERT(pApp); + + UT_sint32 ndx = pApp->findFrame(pFrame); + UT_ASSERT(ndx >= 0); + + if (ndx > 0) + ndx--; + else + ndx = pApp->getFrameCount() - 1; + + XAP_Frame * pSelFrame = pApp->getFrame(ndx); + + if (pSelFrame) + pSelFrame->raise(); + + return true; +} + +static bool +s_closeWindow (AV_View * pAV_View, EV_EditMethodCallData * pCallData, + bool bCanExit) +{ + XAP_Frame * pFrame = static_cast ( pAV_View->getParentData()); + UT_ASSERT(pFrame); + XAP_App * pApp = pFrame->getApp(); + UT_ASSERT(pApp); + + if(pFrame == pApp->getLastFocussedFrame()) + { + + // This probabally not necessary given the code that's in xap_App + // but I hate seg faults. + + pApp->clearLastFocussedFrame(); + } + if (1 >= pApp->getFrameCount()) + { + // Delete all the open modeless dialogs + + pApp->closeModelessDlgs(); + } + + // is this the last view on a dirty document? + if ((pFrame->getViewNumber() == 0) && + (pFrame->isDirty())) + { + XAP_Dialog_MessageBox::tAnswer ans = s_AskSaveFile(pFrame); + + switch (ans) + { + case XAP_Dialog_MessageBox::a_YES: // save it first + { + bool bRet = EX(fileSave); + if (!bRet) // didn't successfully save, + return false; // so don't close + } + break; + + case XAP_Dialog_MessageBox::a_NO: // just close it + break; + + case XAP_Dialog_MessageBox::a_CANCEL: // don't close it + return false; + + default: + UT_ASSERT(UT_SHOULD_NOT_HAPPEN); + return false; + } + } + + // are we the last window? + if (1 >= pApp->getFrameCount()) + { + // Delete all the open modeless dialogs + + pApp->closeModelessDlgs(); + + if (bCanExit) + { + pApp->reallyExit(); + } + else + { + // keep the app open with an empty document (in this frame) + pFrame->loadDocument(NULL, IEFT_Unknown); + pFrame->updateZoom(); + pFrame->show(); + return true; + } + } + + // nuke the window + + pApp->forgetFrame(pFrame); + pFrame->close(); + delete pFrame; + + return true; +} + +Defun(closeWindow) +{ + CHECK_FRAME; +#if !defined(XP_UNIX_TARGET_GTK) + XAP_Frame * pFrame = static_cast ( pAV_View->getParentData()); + UT_ASSERT(pFrame); + XAP_App * pApp = pFrame->getApp(); + UT_ASSERT(pApp); + + XAP_Prefs * pPrefs = pApp->getPrefs(); + UT_ASSERT(pPrefs); + + bool close = false; + + pPrefs->getPrefsValueBool(static_cast(AP_PREF_KEY_CloseOnLastDoc), &close); + return s_closeWindow (pAV_View, pCallData, close); +#else + // must, to comply with the HIG + return s_closeWindow (pAV_View, pCallData, true); +#endif +} + +Defun(closeWindowX) +{ + CHECK_FRAME; + return s_closeWindow (pAV_View, pCallData, true); +} + +Defun(querySaveAndExit) +{ + CHECK_FRAME; + XAP_Frame * pFrame = static_cast ( pAV_View->getParentData()); + UT_ASSERT(pFrame); + XAP_App * pApp = pFrame->getApp(); + UT_ASSERT(pApp); + + + if (1 < pApp->getFrameCount()) + { + if (!s_AskCloseAllAndExit(pFrame)) + { + // never mind + return false; + } + } + + + bool bRet = true; + UT_uint32 ndx = pApp->getFrameCount(); + + // loop over windows, but stop if one can't close + while (bRet && ndx > 0) + { + XAP_Frame * f = pApp->getFrame(ndx - 1); + UT_ASSERT(f); + pAV_View = f->getCurrentView(); + UT_ASSERT(pAV_View); + + bRet = s_closeWindow (pAV_View, pCallData, true); + + ndx--; + } + + if (bRet) + { + + // delete all open modeless dialogs + pApp->closeModelessDlgs(); + + // TODO: this shouldn't be necessary, but just in case + pApp->reallyExit(); + } + + return bRet; +} + +/*****************************************************************/ +/*****************************************************************/ + +/* + NOTE: This file should really be split in two: + + 1. XAP methods (above) + 2. AbiWord-specific methods (below) + + Until we do the necessary architectural work, we just segregate + the methods within the same file. +*/ + +Defun(fileRevert) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + XAP_Frame * pFrame = static_cast (pAV_View->getParentData()); + + if (XAP_Dialog_MessageBox::a_YES == pFrame->showMessageBox(AP_STRING_ID_MSG_RevertFile, + XAP_Dialog_MessageBox::b_YN, + XAP_Dialog_MessageBox::a_NO)) + pView->cmdUndo ( pView->undoCount(true) - pView->undoCount(false) ); + + return true; +} + +Defun1(insertClipart) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + UT_DEBUGMSG(("DOM: insert clipart\n")); + + XAP_Frame * pFrame = static_cast(pView->getParentData()); + UT_ASSERT(pFrame); + + XAP_App * pApp = pFrame->getApp(); + UT_ASSERT(pApp); + + pFrame->raise(); + + XAP_DialogFactory * pDialogFactory + = static_cast(pFrame->getDialogFactory()); + + XAP_Dialog_ClipArt * pDialog + = static_cast(pDialogFactory->requestDialog(XAP_DIALOG_ID_CLIPART)); + UT_ASSERT(pDialog); + if (!pDialog) + return false; + + // set the initial directory + UT_String dir(pApp->getAbiSuiteLibDir()); + dir += "/clipart/"; + + pDialog->setInitialDir (dir.c_str()); + + pDialog->runModal(pFrame); + bool bOK = (pDialog->getAnswer() == XAP_Dialog_ClipArt::a_OK); + const char * pNewFile = pDialog->getGraphicName (); + + bool ret = false; + + if (bOK && pNewFile) + { + IEGraphicFileType iegft = IEGFT_Unknown; + IE_ImpGraphic *pIEG; + FG_Graphic* pFG; + + UT_Error errorCode; + + errorCode = IE_ImpGraphic::constructImporter(pNewFile, iegft, &pIEG); + if(errorCode) + { + s_CouldNotLoadFileMessage(pFrame, pNewFile, errorCode); + goto Cleanup; + } + + errorCode = pIEG->importGraphic(pNewFile, &pFG); + if(errorCode) + { + s_CouldNotLoadFileMessage(pFrame, pNewFile, errorCode); + DELETEP(pIEG); + goto Cleanup; + } + + DELETEP(pIEG); + + errorCode = pView->cmdInsertGraphic(pFG, pNewFile); + if (errorCode) + { + s_CouldNotLoadFileMessage(pFrame, pNewFile, errorCode); + DELETEP(pFG); + goto Cleanup; + } + + DELETEP(pFG); + ret = true; // goes to Cleanup + } + + Cleanup: + + pDialogFactory->releaseDialog(pDialog); + return ret; +} + +Defun1(fileInsertGraphic) +{ + CHECK_FRAME; + XAP_Frame * pFrame = static_cast ( pAV_View->getParentData()); + UT_ASSERT(pFrame); + + char* pNewFile = NULL; + + + IEGraphicFileType iegft = IEGFT_Unknown; + bool bOK = s_AskForGraphicPathname(pFrame,&pNewFile,&iegft); + + if (!bOK || !pNewFile) + return false; + + // we own storage for pNewFile and must free it. + UT_DEBUGMSG(("fileInsertGraphic: loading [%s]\n",pNewFile)); + + IE_ImpGraphic *pIEG; + FG_Graphic* pFG; + + UT_Error errorCode; + + errorCode = IE_ImpGraphic::constructImporter(pNewFile, iegft, &pIEG); + if(errorCode != UT_OK) + { + s_CouldNotLoadFileMessage(pFrame, pNewFile, errorCode); + FREEP(pNewFile); + return false; + } + + errorCode = pIEG->importGraphic(pNewFile, &pFG); + if(errorCode != UT_OK || !pFG) + { + s_CouldNotLoadFileMessage(pFrame, pNewFile, errorCode); + FREEP(pNewFile); + DELETEP(pIEG); + return false; + } + + DELETEP(pIEG); + + ABIWORD_VIEW; + + errorCode = pView->cmdInsertGraphic(pFG, pNewFile); + if (errorCode != UT_OK) + { + s_CouldNotLoadFileMessage(pFrame, pNewFile, errorCode); + + FREEP(pNewFile); + DELETEP(pFG); + return false; + } + + FREEP(pNewFile); + DELETEP(pFG); + + return true; +} + +Defun(selectObject) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + // check if the run to select is a fp_ImageRun. If, so, don't move the view + PT_DocPosition pos = pView->getDocPositionFromXY(pCallData->m_xPos, pCallData->m_yPos); + fl_BlockLayout * pBlock = pView->getBlockAtPosition(pos); + if(pBlock) + { + UT_sint32 x1,x2,y1,y2,iHeight; + bool bEOL = false; + bool bDir = false; + + fp_Run * pRun = NULL; + + pRun = pBlock->findPointCoords(pos,bEOL,x1,y1,x2,y2,iHeight,bDir); + while(pRun && pRun->getType() != FPRUN_IMAGE) + { + pRun = pRun->getNext(); + } + if(pRun && pRun->getType() == FPRUN_IMAGE) + { + // we've found an image: do not move the view, just select the image and exit + pView->cmdSelect(pos,pos+1); + return true; + } + else + { + // do nothing... + } + } + + // no, the run is something else (ie. not a fp_ImageRun) + pView->warpInsPtToXY(pCallData->m_xPos, pCallData->m_yPos, true); + pView->extSelHorizontal(true, 1); // move point forward one + + return true; +} + +Defun(warpInsPtToXY) +{ + CHECK_FRAME; + ABIWORD_VIEW; + pView->warpInsPtToXY(pCallData->m_xPos, pCallData->m_yPos, true); + + return true; +} + +static void sActualMoveLeft(AV_View * pAV_View, EV_EditMethodCallData * pCallData) +{ + ABIWORD_VIEW; + pView->cmdCharMotion(false,1); + if(pView->getGraphics() && pView->getGraphics()->getCaret()) + { +// +// Draw fsking caret for sure!!! +// + pView->getGraphics()->getCaret()->forceDraw(); + } +} + +Defun1(warpInsPtLeft) +{ + CHECK_FRAME; + ABIWORD_VIEW; + pView->cmdCharMotion(pView->getCurrentBlock()->getDominantDirection() == FRIBIDI_TYPE_RTL,1); +// +// Do this operation in an idle loop so when can reject queued events +// +// +// This code sets things up to handle the warp right in an idle loop. +// + int inMode = UT_WorkerFactory::IDLE | UT_WorkerFactory::TIMER; + UT_WorkerFactory::ConstructMode outMode = UT_WorkerFactory::NONE; + GR_Graphics * pG = pView->getGraphics(); + _Freq * pFreq = new _Freq(pView,NULL,sActualMoveLeft); + s_pFrequentRepeat = UT_WorkerFactory::static_constructor (_sFrequentRepeat,pFreq, inMode, outMode, pG); + + UT_ASSERT(s_pFrequentRepeat); + UT_ASSERT(outMode != UT_WorkerFactory::NONE); + + // If the worker is working on a timer instead of in the idle + // time, set the frequency of the checks. + if ( UT_WorkerFactory::TIMER == outMode ) + { + // this is really a timer, so it's safe to static_cast it + static_cast(s_pFrequentRepeat)->set(1); + } + s_pFrequentRepeat->start(); + return true; +} + +static void sActualMoveRight(AV_View * pAV_View, EV_EditMethodCallData * pCallData) +{ + ABIWORD_VIEW; + pView->cmdCharMotion(true,1); + if(pView->getGraphics() && pView->getGraphics()->getCaret()) + { +// +// Draw the fsking caret for sure!!! +// + pView->getGraphics()->getCaret()->forceDraw(); + } + return; +} + + +Defun1(warpInsPtRight) +{ + CHECK_FRAME; + ABIWORD_VIEW; +// +// Do this operation in an idle loop so when can reject queued events +// +// +// This code sets things up to handle the warp right in an idle loop. +// + int inMode = UT_WorkerFactory::IDLE | UT_WorkerFactory::TIMER; + UT_WorkerFactory::ConstructMode outMode = UT_WorkerFactory::NONE; + GR_Graphics * pG = pView->getGraphics(); + _Freq * pFreq = new _Freq(pView,NULL,sActualMoveRight); + s_pFrequentRepeat = UT_WorkerFactory::static_constructor (_sFrequentRepeat,pFreq, inMode, outMode, pG); + + UT_ASSERT(s_pFrequentRepeat); + UT_ASSERT(outMode != UT_WorkerFactory::NONE); + + // If the worker is working on a timer instead of in the idle + // time, set the frequency of the checks. + if ( UT_WorkerFactory::TIMER == outMode ) + { + // this is really a timer, so it's safe to static_cast it + static_cast(s_pFrequentRepeat)->set(1); + } + s_pFrequentRepeat->start(); + return true; +} + +Defun1(warpInsPtBOP) +{ + CHECK_FRAME; + ABIWORD_VIEW; + pView->moveInsPtTo(FV_DOCPOS_BOP); + return true; +} + +Defun1(warpInsPtEOP) +{ + CHECK_FRAME; + ABIWORD_VIEW; + pView->moveInsPtTo(FV_DOCPOS_EOP); + return true; +} + +Defun1(warpInsPtBOL) +{ + CHECK_FRAME; + ABIWORD_VIEW; + pView->moveInsPtTo(FV_DOCPOS_BOL); + return true; +} + +Defun1(warpInsPtEOL) +{ + CHECK_FRAME; + ABIWORD_VIEW; + pView->moveInsPtTo(FV_DOCPOS_EOL); + return true; +} + +Defun1(warpInsPtBOW) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + if(pView->getCurrentBlock()->getDominantDirection()==FRIBIDI_TYPE_RTL) + pView->moveInsPtTo(FV_DOCPOS_EOW_MOVE); + else + pView->moveInsPtTo(FV_DOCPOS_BOW); + + return true; +} + +Defun1(warpInsPtEOW) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + if(pView->getCurrentBlock()->getDominantDirection()==FRIBIDI_TYPE_RTL) + pView->moveInsPtTo(FV_DOCPOS_BOW); + else + pView->moveInsPtTo(FV_DOCPOS_EOW_MOVE); + + return true; +} + +Defun0(warpInsPtBOS) +{ + CHECK_FRAME; + return true; +} + +Defun0(warpInsPtEOS) +{ + CHECK_FRAME; + return true; +} + +Defun1(warpInsPtBOB) +{ + CHECK_FRAME; + ABIWORD_VIEW; + pView->moveInsPtTo(FV_DOCPOS_BOB); + return true; +} + +Defun1(warpInsPtEOB) +{ + CHECK_FRAME; + ABIWORD_VIEW; + pView->moveInsPtTo(FV_DOCPOS_EOB); + return true; +} + +Defun1(warpInsPtBOD) +{ + CHECK_FRAME; + ABIWORD_VIEW; + pView->moveInsPtTo(FV_DOCPOS_BOD); + return true; +} + +Defun1(warpInsPtEOD) +{ + CHECK_FRAME; + ABIWORD_VIEW; +// +// This is called on cntrl-End. If called from within a footnote/endnote +// jump back to just after the insertion point +// + if(pView->isInFootnote()) + { + fl_FootnoteLayout * pFL = pView->getClosestFootnote(pView->getPoint()); + PT_DocPosition pos = pFL->getDocPosition() + pFL->getLength(); + pView->setPoint(pos); + pView->ensureInsertionPointOnScreen(); + return true; + } + if(pView->isInEndnote()) + { + fl_EndnoteLayout * pEL = pView->getClosestEndnote(pView->getPoint()); + PT_DocPosition pos = pEL->getDocPosition() + pEL->getLength(); + pView->setPoint(pos); + pView->ensureInsertionPointOnScreen(); + return true; + } + + pView->moveInsPtTo(FV_DOCPOS_EOD); + return true; +} + +Defun1(warpInsPtPrevPage) +{ + CHECK_FRAME; + ABIWORD_VIEW; + pView->warpInsPtNextPrevPage(false); + return true; +} + +Defun1(warpInsPtNextPage) +{ + CHECK_FRAME; + ABIWORD_VIEW; + pView->warpInsPtNextPrevPage(true); + return true; +} + +Defun1(warpInsPtPrevScreen) +{ + ABIWORD_VIEW; + pView->warpInsPtNextPrevScreen(false); + return true; +} + +Defun1(warpInsPtNextScreen) +{ + ABIWORD_VIEW; + pView->warpInsPtNextPrevScreen(true); + return true; +} + +Defun1(warpInsPtPrevLine) +{ + CHECK_FRAME; + ABIWORD_VIEW; +// +// Finish handling current expose before doing the next movement +// + GR_Graphics * pG = pView->getGraphics(); + if(pG && pG->isExposePending()) + { + return true; + } + pView->warpInsPtNextPrevLine(false); + if(pView->getGraphics() && pView->getGraphics()->getCaret()) + { +// +// Draw fsking caret for sure!!! +// + pView->getGraphics()->getCaret()->forceDraw(); + } + return true; +} + +Defun1(warpInsPtNextLine) +{ + CHECK_FRAME; + ABIWORD_VIEW; +// +// Finish handling current expose before doing the next movement +// + GR_Graphics * pG = pView->getGraphics(); + if(pG && pG->isExposePending()) + { + return true; + } + pView->warpInsPtNextPrevLine(true); + if(pView->getGraphics() && pView->getGraphics()->getCaret()) + { +// +// Draw fsking caret for sure!!! +// + pView->getGraphics()->getCaret()->forceDraw(); + } + return true; +} + +/*****************************************************************/ + +Defun1(cursorDefault) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + // clear status bar of any lingering messages + XAP_Frame * pFrame = static_cast (pView->getParentData()); + pFrame->setStatusMessage(NULL); + + GR_Graphics * pG = pView->getGraphics(); + if (pG) + { + pG->setCursor(GR_Graphics::GR_CURSOR_DEFAULT); + } + return true; +} + +Defun1(cursorIBeam) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + // clear status bar of any lingering messages + XAP_Frame * pFrame = static_cast (pView->getParentData()); + pFrame->setStatusMessage(NULL); + + GR_Graphics * pG = pView->getGraphics(); + if (pG) + { + pG->setCursor(GR_Graphics::GR_CURSOR_IBEAM); + } + return true; +} + +Defun1(cursorRightArrow) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + // clear status bar of any lingering messages + XAP_Frame * pFrame = static_cast (pView->getParentData()); + pFrame->setStatusMessage(NULL); + + GR_Graphics * pG = pView->getGraphics(); + if (pG) + { + pG->setCursor(GR_Graphics::GR_CURSOR_RIGHTARROW); + } + return true; +} + + +Defun1(cursorVline) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + // clear status bar of any lingering messages + XAP_Frame * pFrame = static_cast (pView->getParentData()); + pFrame->setStatusMessage(NULL); + + GR_Graphics * pG = pView->getGraphics(); + if (pG) + { + pG->setCursor(GR_Graphics::GR_CURSOR_VLINE_DRAG); + } + return true; +} + + +Defun1(cursorHline) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + // clear status bar of any lingering messages + XAP_Frame * pFrame = static_cast (pView->getParentData()); + pFrame->setStatusMessage(NULL); + + GR_Graphics * pG = pView->getGraphics(); + if (pG) + { + pG->setCursor(GR_Graphics::GR_CURSOR_HLINE_DRAG); + } + return true; +} + +Defun1(cursorLeftArrow) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + // clear status bar of any lingering messages + XAP_Frame * pFrame = static_cast (pView->getParentData()); + pFrame->setStatusMessage(NULL); + + GR_Graphics * pG = pView->getGraphics(); + if (pG) + { + pG->setCursor(GR_Graphics::GR_CURSOR_LEFTARROW); + } + return true; +} + +Defun1(cursorImage) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + // clear status bar of any lingering messages + XAP_Frame * pFrame = static_cast (pView->getParentData()); + pFrame->setStatusMessage(NULL); + + GR_Graphics * pG = pView->getGraphics(); + if (pG) + { + pG->setCursor(GR_Graphics::GR_CURSOR_IMAGE); + } + return true; +} + +Defun1(cursorImageSize) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + // clear status bar of any lingering messages + XAP_Frame * pFrame = static_cast (pView->getParentData()); + pFrame->setStatusMessage(NULL); + + GR_Graphics * pG = pView->getGraphics(); + if (pG) + { + // set the mouse cursor to the appropriate shape + pG->setCursor( pView->getImageSelCursor() ); + } + return true; +} + +/*****************************************************************/ + +Defun1(contextMenu) +{ + CHECK_FRAME; +// raise context menu over whatever we are over. this is + // intended for use by the keyboard accelerator rather than + // the other "targeted" context{...} methods which are bound + // to the mouse. + + ABIWORD_VIEW; + XAP_Frame * pFrame = static_cast (pView->getParentData()); + UT_ASSERT(pFrame); + + UT_sint32 xPos, yPos; + EV_EditMouseContext emc = pView->getInsertionPointContext(&xPos,&yPos); + + const char * szContextMenuName = XAP_App::getApp()->getMenuFactory()->FindContextMenu(emc); + if (!szContextMenuName) + return false; + bool res = pFrame->runModalContextMenu(pView,szContextMenuName,xPos,yPos); + return res; +} + +static bool s_doContextMenu_no_move( EV_EditMouseContext emc, + UT_sint32 xPos, + UT_sint32 yPos, + FV_View * pView, + XAP_Frame * pFrame) +{ + const char * szContextMenuName = XAP_App::getApp()->getMenuFactory()->FindContextMenu(emc); + xxx_UT_DEBUGMSG(("Context Menu Name is........ %s \N",szContextMenuName)); + if (!szContextMenuName) + return false; + bool res = pFrame->runModalContextMenu(pView,szContextMenuName, + xPos,yPos); + return res; +} + +bool static s_doContextMenu(EV_EditMouseContext emc, + UT_sint32 xPos, + UT_sint32 yPos, + FV_View * pView, + XAP_Frame * pFrame) +{ + // move the IP so actions have the right context + if (!pView->isXYSelected(xPos, yPos)) + pView->warpInsPtToXY(xPos,yPos,true); + + return s_doContextMenu_no_move(emc,xPos,yPos,pView,pFrame); +} + +Defun(contextText) +{ + CHECK_FRAME; + ABIWORD_VIEW; + XAP_Frame * pFrame = static_cast (pView->getParentData()); + UT_ASSERT(pFrame); + return s_doContextMenu(EV_EMC_TEXT,pCallData->m_xPos, pCallData->m_yPos,pView,pFrame); +} + +Defun(contextRevision) +{ + CHECK_FRAME; + ABIWORD_VIEW; + XAP_Frame * pFrame = static_cast (pView->getParentData()); + UT_ASSERT(pFrame); + return s_doContextMenu(EV_EMC_REVISION,pCallData->m_xPos, pCallData->m_yPos,pView,pFrame); +} + +Defun(contextMisspellText) +{ + CHECK_FRAME; + ABIWORD_VIEW; + XAP_Frame * pFrame = static_cast (pView->getParentData()); + UT_ASSERT(pFrame); + return s_doContextMenu(EV_EMC_MISSPELLEDTEXT,pCallData->m_xPos, pCallData->m_yPos,pView,pFrame); +} + +Defun(contextImage) +{ +CHECK_FRAME; + ABIWORD_VIEW; + XAP_Frame * pFrame = static_cast (pView->getParentData()); + UT_ASSERT(pFrame); + + if ( pView->isSelectionEmpty () ) + { + // select the image if it isn't already + UT_DEBUGMSG(("Selecting image: %d\n", pCallData->m_xPos)); + pView->warpInsPtToXY(pCallData->m_xPos, pCallData->m_yPos, true); + pView->extSelHorizontal (true, 1); + } + return s_doContextMenu(EV_EMC_IMAGE,pCallData->m_xPos, pCallData->m_yPos,pView,pFrame); +} + +Defun(contextHyperlink) +{ + CHECK_FRAME; + ABIWORD_VIEW; + XAP_Frame * pFrame = static_cast (pView->getParentData()); + UT_ASSERT(pFrame); + + // move the IP so actions have the right context + if (!pView->isXYSelected(pCallData->m_xPos, pCallData->m_yPos)) + EX(warpInsPtToXY); + + if(pView->isTextMisspelled()) + return s_doContextMenu_no_move(EV_EMC_HYPERLINKMISSPELLED,pCallData->m_xPos, pCallData->m_yPos,pView,pFrame); + else + return s_doContextMenu_no_move(EV_EMC_HYPERLINKTEXT,pCallData->m_xPos, pCallData->m_yPos,pView,pFrame); + +} + +static bool _spellSuggest(AV_View* pAV_View, UT_uint32 ndx) +{ + ABIWORD_VIEW; + pView->cmdContextSuggest(ndx); + return true; +} + +Defun1(spellSuggest_1) +{ + CHECK_FRAME; + return _spellSuggest(pAV_View, 1); +} +Defun1(spellSuggest_2) +{ + CHECK_FRAME; + return _spellSuggest(pAV_View, 2); +} +Defun1(spellSuggest_3) +{ + CHECK_FRAME; + return _spellSuggest(pAV_View, 3); +} +Defun1(spellSuggest_4) +{ + CHECK_FRAME; + return _spellSuggest(pAV_View, 4); +} +Defun1(spellSuggest_5) +{ + CHECK_FRAME; + return _spellSuggest(pAV_View, 5); +} +Defun1(spellSuggest_6) +{ + CHECK_FRAME; + return _spellSuggest(pAV_View, 6); +} +Defun1(spellSuggest_7) +{ + CHECK_FRAME; + return _spellSuggest(pAV_View, 7); +} +Defun1(spellSuggest_8) +{ + CHECK_FRAME; + return _spellSuggest(pAV_View, 8); +} +Defun1(spellSuggest_9) +{ + CHECK_FRAME; + return _spellSuggest(pAV_View, 9); +} + +Defun1(spellIgnoreAll) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + pView->cmdContextIgnoreAll(); + return true; +} + +Defun1(spellAdd) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + pView->cmdContextAdd(); + return true; +} + + +/*****************************************************************/ + +Defun(dragSelectionBegin) +{ + // begin of drag+drop edit + + CHECK_FRAME; + //ABIWORD_VIEW; + + return true; +} + +Defun(dragSelectionEnd) +{ + // end of drag+drop edit + + CHECK_FRAME; + ABIWORD_VIEW; + + if (pView->isSelectionEmpty()) + return true; + + pView->endDragSelection(pCallData->m_xPos, pCallData->m_yPos); + return true; +} + +Defun(dragToXY) +{ + CHECK_FRAME; + ABIWORD_VIEW; + pView->extSelToXY(pCallData->m_xPos, pCallData->m_yPos, true); + return true; +} + +Defun(dragToXYword) +{ + CHECK_FRAME; + ABIWORD_VIEW; + pView->extSelToXYword(pCallData->m_xPos, pCallData->m_yPos, true); + return true; +} + +Defun(endDrag) +{ + CHECK_FRAME; + ABIWORD_VIEW; + +pView->endDrag(pCallData->m_xPos, pCallData->m_yPos); + return true; +} + +Defun(extSelToXY) +{ + CHECK_FRAME; + ABIWORD_VIEW; + pView->extSelToXY(pCallData->m_xPos, pCallData->m_yPos, false); + return true; +} + +Defun1(extSelLeft) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + pView->extSelHorizontal(pView->getCurrentBlock()->getDominantDirection()==FRIBIDI_TYPE_RTL,1); + + return true; +} + +Defun1(extSelRight) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + pView->extSelHorizontal(pView->getCurrentBlock()->getDominantDirection()!=FRIBIDI_TYPE_RTL,1); + + return true; +} + +Defun1(extSelBOL) +{ + CHECK_FRAME; + ABIWORD_VIEW; + pView->extSelTo(FV_DOCPOS_BOL); + return true; +} + +Defun1(extSelEOL) +{ + CHECK_FRAME; + ABIWORD_VIEW; + pView->extSelTo(FV_DOCPOS_EOL); + return true; +} + +Defun1(extSelBOW) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + if(pView->getCurrentBlock()->getDominantDirection()==FRIBIDI_TYPE_RTL) + pView->extSelTo(FV_DOCPOS_EOW_MOVE); + else + pView->extSelTo(FV_DOCPOS_BOW); + + return true; +} + +Defun1(extSelEOW) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + if(pView->getCurrentBlock()->getDominantDirection()==FRIBIDI_TYPE_RTL) + pView->extSelTo(FV_DOCPOS_BOW); + else + pView->extSelTo(FV_DOCPOS_EOW_MOVE); + + return true; +} + +Defun0(extSelBOS) +{ + CHECK_FRAME; + return true; +} + +Defun0(extSelEOS) +{ + CHECK_FRAME; + return true; +} + +Defun1(extSelBOB) +{ + CHECK_FRAME; + ABIWORD_VIEW; + pView->extSelTo(FV_DOCPOS_BOB); + return true; +} + +Defun1(extSelEOB) +{ + CHECK_FRAME; + ABIWORD_VIEW; + pView->extSelTo(FV_DOCPOS_EOB); + return true; +} + +Defun1(extSelBOD) +{ + CHECK_FRAME; + ABIWORD_VIEW; + pView->extSelTo(FV_DOCPOS_BOD); + return true; +} + +Defun1(extSelEOD) +{ + CHECK_FRAME; + ABIWORD_VIEW; + pView->extSelTo(FV_DOCPOS_EOD); + return true; +} + +Defun1(extSelPrevLine) +{ + CHECK_FRAME; + ABIWORD_VIEW; + pView->extSelNextPrevLine(false); + return true; +} + +Defun1(extSelNextLine) +{ + CHECK_FRAME; + ABIWORD_VIEW; + pView->extSelNextPrevLine(true); + return true; +} + +Defun1(extSelPageDown) +{ + CHECK_FRAME; + ABIWORD_VIEW; + pView->extSelNextPrevPage(true); + return true; +} + +Defun1(extSelPageUp) +{ + CHECK_FRAME; + ABIWORD_VIEW; + pView->extSelNextPrevPage(false); + return true; +} + +Defun1(extSelScreenDown) +{ + ABIWORD_VIEW; + pView->extSelNextPrevScreen(true); + return true; +} + +Defun1(extSelScreenUp) +{ + ABIWORD_VIEW; + pView->extSelNextPrevScreen(false); + return true; +} + +Defun(selectAll) +{ + CHECK_FRAME; + ABIWORD_VIEW; + pView->cmdSelect(pCallData->m_xPos, pCallData->m_yPos, FV_DOCPOS_BOD, FV_DOCPOS_EOD); + return true; +} + +Defun(selectWord) +{ + CHECK_FRAME; + ABIWORD_VIEW; + pView->cmdSelect(pCallData->m_xPos, pCallData->m_yPos, FV_DOCPOS_BOW, FV_DOCPOS_EOW_SELECT); + return true; +} + +Defun(selectLine) +{ + CHECK_FRAME; + ABIWORD_VIEW; + pView->cmdSelect(pCallData->m_xPos, pCallData->m_yPos, FV_DOCPOS_BOL, FV_DOCPOS_EOL); + return true; +} + +Defun(selectBlock) +{ + CHECK_FRAME; + ABIWORD_VIEW; + pView->cmdSelect(pCallData->m_xPos, pCallData->m_yPos, FV_DOCPOS_BOB, FV_DOCPOS_EOB); + return true; +} + +Defun1(selectTable) +{ + CHECK_FRAME; + ABIWORD_VIEW; + PT_DocPosition posStartTab,posEndTab; + PL_StruxDocHandle tableSDH,endTableSDH; + PD_Document * pDoc = pView->getDocument(); + bool bRes = pDoc->getStruxOfTypeFromPosition(pView->getPoint(),PTX_SectionTable,&tableSDH); + if(!bRes) + { + UT_DEBUGMSG(("No Table Strux found!! \n")); + return false; + } + posStartTab = pDoc->getStruxPosition(tableSDH); //was -1 + UT_DEBUGMSG(("PosStart %d TableSDH %x \n",posStartTab,tableSDH)); + bRes = pDoc->getNextStruxOfType(tableSDH,PTX_EndTable,&endTableSDH); + if(!bRes) + { + UT_DEBUGMSG(("No End Table Strux found!! \n")); + return false; + } + posEndTab = pDoc->getStruxPosition(endTableSDH); //was +1 + UT_DEBUGMSG(("PosEndTab %d endTableSDH %x \n",posEndTab,endTableSDH)); + pView->cmdSelect(posStartTab,posEndTab); + return true; +} + + +Defun1(selectRow) +{ + CHECK_FRAME; + ABIWORD_VIEW; + PT_DocPosition posTable,posStartRow,posEndRow; + PL_StruxDocHandle rowSDH,endRowSDH,tableSDH; + UT_sint32 iLeft,iRight,iTop,iBot; + + PD_Document * pDoc = pView->getDocument(); + pView->getCellParams(pView->getPoint(), &iLeft, &iRight,&iTop,&iBot); + + bool bRes = pDoc->getStruxOfTypeFromPosition(pView->getPoint(),PTX_SectionTable,&tableSDH); + if(!bRes) + { + return false; + } + posTable = pDoc->getStruxPosition(tableSDH) + 1; + + // + // Now find the number of rows and columns inthis table. + // + UT_sint32 numRows,numCols; + bRes = pDoc->getRowsColsFromTableSDH(tableSDH,&numRows,&numCols); + if(!bRes) + { + return false; + } + rowSDH = pDoc->getCellSDHFromRowCol(tableSDH,iTop,0); + posStartRow = pDoc->getStruxPosition(rowSDH) - 1; + endRowSDH = pDoc->getCellSDHFromRowCol(tableSDH,iTop,numCols -1); + posEndRow = pDoc->getStruxPosition(endRowSDH); + bRes = pDoc->getNextStruxOfType(endRowSDH,PTX_EndCell,&endRowSDH); + if(!bRes) + { + return false; + } + posEndRow = pDoc->getStruxPosition(endRowSDH)+1; + pView->cmdSelect(posStartRow,posEndRow); + return true; +} + + +Defun1(selectCell) +{ + CHECK_FRAME; + ABIWORD_VIEW; + PT_DocPosition posStartCell,posEndCell; + PL_StruxDocHandle cellSDH,endCellSDH; + PD_Document * pDoc = pView->getDocument(); + bool bRes = pDoc->getStruxOfTypeFromPosition(pView->getPoint(),PTX_SectionCell,&cellSDH); + if(!bRes) + { + return false; + } + posStartCell = pDoc->getStruxPosition(cellSDH) - 1; + bRes = pDoc->getNextStruxOfType(cellSDH,PTX_EndCell,&endCellSDH); + if(!bRes) + { + return false; + } + posEndCell = pDoc->getStruxPosition(endCellSDH)+1; + pView->cmdSelect(posStartCell,posEndCell); + return true; +} + +static void sActualDelLeft(AV_View * pAV_View, EV_EditMethodCallData * pCallData) +{ + ABIWORD_VIEW; + pView->cmdCharDelete(false,1); +} + +Defun1(delLeft) +{ + CHECK_FRAME; + ABIWORD_VIEW; +// +// Do this operation in an idle loop so when can reject queued events +// +// +// This code sets things up to handle the warp right in an idle loop. +// + int inMode = UT_WorkerFactory::IDLE | UT_WorkerFactory::TIMER; + UT_WorkerFactory::ConstructMode outMode = UT_WorkerFactory::NONE; + GR_Graphics * pG = pView->getGraphics(); + _Freq * pFreq = new _Freq(pView,NULL,sActualDelLeft); + s_pFrequentRepeat = UT_WorkerFactory::static_constructor (_sFrequentRepeat,pFreq, inMode, outMode, pG); + + UT_ASSERT(s_pFrequentRepeat); + UT_ASSERT(outMode != UT_WorkerFactory::NONE); + + // If the worker is working on a timer instead of in the idle + // time, set the frequency of the checks. + if ( UT_WorkerFactory::TIMER == outMode ) + { + // this is really a timer, so it's safe to static_cast it + static_cast(s_pFrequentRepeat)->set(1); + } + s_pFrequentRepeat->start(); + return true; +} + +static void sActualDelRight(AV_View * pAV_View, EV_EditMethodCallData * pCallData) +{ + ABIWORD_VIEW; + pView->cmdCharDelete(true,1); +} + +Defun1(delRight) +{ + CHECK_FRAME; + ABIWORD_VIEW; +// +// Do this operation in an idle loop so when can reject queued events +// +// +// This code sets things up to handle the warp right in an idle loop. +// + int inMode = UT_WorkerFactory::IDLE | UT_WorkerFactory::TIMER; + UT_WorkerFactory::ConstructMode outMode = UT_WorkerFactory::NONE; + GR_Graphics * pG = pView->getGraphics(); + _Freq * pFreq = new _Freq(pView,NULL,sActualDelRight); + s_pFrequentRepeat = UT_WorkerFactory::static_constructor (_sFrequentRepeat,pFreq, inMode, outMode, pG); + + UT_ASSERT(s_pFrequentRepeat); + UT_ASSERT(outMode != UT_WorkerFactory::NONE); + + // If the worker is working on a timer instead of in the idle + // time, set the frequency of the checks. + if ( UT_WorkerFactory::TIMER == outMode ) + { + // this is really a timer, so it's safe to static_cast it + static_cast(s_pFrequentRepeat)->set(1); + } + s_pFrequentRepeat->start(); + return true; +} + +Defun1(delBOL) +{ + CHECK_FRAME; + ABIWORD_VIEW; + pView->delTo(FV_DOCPOS_BOL); + return true; +} + +Defun1(delEOL) +{ + CHECK_FRAME; + ABIWORD_VIEW; + pView->delTo(FV_DOCPOS_EOL); + return true; +} + +Defun1(delBOW) +{ + CHECK_FRAME; + ABIWORD_VIEW; + pView->delTo(FV_DOCPOS_BOW); + return true; +} + +Defun1(delEOW) +{ + CHECK_FRAME; + ABIWORD_VIEW; + pView->delTo(FV_DOCPOS_EOW_MOVE); + return true; +} + +Defun0(delBOS) +{ + CHECK_FRAME; + return true; +} + +Defun0(delEOS) +{ + CHECK_FRAME; + return true; +} + +Defun1(delBOB) +{ + CHECK_FRAME; + ABIWORD_VIEW; + pView->delTo(FV_DOCPOS_BOB); + return true; +} + +Defun1(delEOB) +{ + CHECK_FRAME; + ABIWORD_VIEW; + pView->delTo(FV_DOCPOS_EOB); + return true; +} + +Defun1(delBOD) +{ + CHECK_FRAME; + ABIWORD_VIEW; + pView->delTo(FV_DOCPOS_BOD); + return true; +} + +Defun1(delEOD) +{ + CHECK_FRAME; + ABIWORD_VIEW; + pView->delTo(FV_DOCPOS_EOD); + return true; +} + +static void sActualInsertData(AV_View * pAV_View, EV_EditMethodCallData * pCallData) +{ + ABIWORD_VIEW; + pView->cmdCharInsert(pCallData->m_pData, pCallData->m_dataLength); + return; +} + +Defun(insertData) +{ + CHECK_FRAME; + ABIWORD_VIEW; +// +// Do this operation in an idle loop so when can reject queued events +// +// +// This code sets things up to handle the warp right in an idle loop. +// + int inMode = UT_WorkerFactory::IDLE | UT_WorkerFactory::TIMER; + UT_WorkerFactory::ConstructMode outMode = UT_WorkerFactory::NONE; + GR_Graphics * pG = pView->getGraphics(); + EV_EditMethodCallData * pNewData = new EV_EditMethodCallData(pCallData->m_pData,pCallData->m_dataLength); + _Freq * pFreq = new _Freq(pView,pNewData,sActualInsertData); + s_pFrequentRepeat = UT_WorkerFactory::static_constructor (_sFrequentRepeat,pFreq, inMode, outMode, pG); + + UT_ASSERT(s_pFrequentRepeat); + UT_ASSERT(outMode != UT_WorkerFactory::NONE); + + // If the worker is working on a timer instead of in the idle + // time, set the frequency of the checks. + if ( UT_WorkerFactory::TIMER == outMode ) + { + // this is really a timer, so it's safe to static_cast it + static_cast(s_pFrequentRepeat)->set(1); + } + s_pFrequentRepeat->start(); + return true; +} + +Defun(insertClosingParenthesis) +{ + CHECK_FRAME; + XAP_Frame * pFrame = static_cast ( pAV_View->getParentData()); + UT_return_val_if_fail(pFrame, false); + ABIWORD_VIEW; + + XAP_App * pApp = pFrame->getApp(); + UT_return_val_if_fail(pApp, false); + XAP_Prefs * pPrefs = pApp->getPrefs(); + UT_return_val_if_fail(pPrefs, false); + + XAP_PrefsScheme *pPrefsScheme = pPrefs->getCurrentScheme(); + UT_return_val_if_fail(pPrefsScheme, false); + + bool b = false; + + pPrefs->getPrefsValueBool(static_cast(XAP_PREF_KEY_ChangeLanguageWithKeyboard), &b); + if(b) + { + pPrefs->getPrefsValueBool(static_cast(XAP_PREF_KEY_DirMarkerAfterClosingParenthesis), &b); + } + + if(b) + { + UT_return_val_if_fail(pCallData->m_dataLength == 1, false); + UT_UCS4Char data[2]; + data[0] = (UT_UCS4Char) *(pCallData->m_pData); + + + const XML_Char ** props_in = NULL; + if (pView->getCharFormat(&props_in)) + { + const XML_Char * s = UT_getAttribute("lang", props_in); + UT_Language l; + UT_LANGUAGE_DIR order = l.getDirFromCode(s); + FREEP(props_in); + + if(order == UTLANG_RTL) + { + data[1] = UCS_RLM; + } + else if(order == UTLANG_LTR) + { + data[1] = UCS_LRM; + } + else + { + goto normal_insert; + } + + pView->cmdCharInsert(&data[0], 2); + return true; + } + + return false; + } + + normal_insert: + pView->cmdCharInsert(pCallData->m_pData, pCallData->m_dataLength); + return true; +} + +Defun(insertOpeningParenthesis) +{ + CHECK_FRAME; + XAP_Frame * pFrame = static_cast ( pAV_View->getParentData()); + UT_return_val_if_fail(pFrame, false); + ABIWORD_VIEW; + + XAP_App * pApp = pFrame->getApp(); + UT_return_val_if_fail(pApp, false); + XAP_Prefs * pPrefs = pApp->getPrefs(); + UT_return_val_if_fail(pPrefs, false); + + XAP_PrefsScheme *pPrefsScheme = pPrefs->getCurrentScheme(); + UT_return_val_if_fail(pPrefsScheme, false); + + bool b = false; + + pPrefs->getPrefsValueBool(static_cast(XAP_PREF_KEY_ChangeLanguageWithKeyboard), &b); + if(b) + { + pPrefs->getPrefsValueBool(static_cast(XAP_PREF_KEY_DirMarkerAfterClosingParenthesis), &b); + } + + if(b) + { + UT_return_val_if_fail(pCallData->m_dataLength == 1, false); + UT_UCS4Char data[2]; + data[1] = (UT_UCS4Char) *(pCallData->m_pData); + + + const XML_Char ** props_in = NULL; + if (pView->getCharFormat(&props_in)) + { + const XML_Char * s = UT_getAttribute("lang", props_in); + UT_Language l; + UT_LANGUAGE_DIR order = l.getDirFromCode(s); + FREEP(props_in); + + if(order == UTLANG_RTL) + { + data[0] = UCS_RLM; + } + else if(order == UTLANG_LTR) + { + data[0] = UCS_LRM; + } + else + { + goto normal_insert; + } + + pView->cmdCharInsert(&data[0], 2); + return true; + } + + return false; + } + + normal_insert: + pView->cmdCharInsert(pCallData->m_pData, pCallData->m_dataLength); + return true; +} + +Defun1(insertLRM) +{ + CHECK_FRAME; + ABIWORD_VIEW; + UT_UCS4Char cM = UCS_LRM; + pView->cmdCharInsert(&cM, 1); + return true; +} + +Defun1(insertRLM) +{ + CHECK_FRAME; + ABIWORD_VIEW; + UT_UCS4Char cM = UCS_RLM; + pView->cmdCharInsert(&cM, 1); + return true; +} + +/*****************************************************************/ +// TODO the bInsert parameter is currently not used; it would require +// changes to the dialogues so that if bInsert == false the dialogue +// would be labeled "Delete bookmark" + +static bool s_doBookmarkDlg(FV_View * pView, bool /*bInsert*/) +{ + XAP_Frame * pFrame = static_cast ( pView->getParentData()); + UT_ASSERT(pFrame); + + pFrame->raise(); + + XAP_DialogFactory * pDialogFactory + = static_cast(pFrame->getDialogFactory()); + + AP_Dialog_InsertBookmark * pDialog + = static_cast(pDialogFactory->requestDialog(AP_DIALOG_ID_INSERTBOOKMARK)); + UT_ASSERT(pDialog); + if (!pDialog) + return false; + + if (!pView->isSelectionEmpty()) + { + UT_UCSChar * buffer = pView->getSelectionText(); + pDialog->setSuggestedBM(buffer); + FREEP(buffer); + } + + pDialog->setDoc(pView); + pDialog->runModal(pFrame); + + AP_Dialog_InsertBookmark::tAnswer ans = pDialog->getAnswer(); + + if (ans == AP_Dialog_InsertBookmark::a_OK) + { + pView->cmdInsertBookmark(pDialog->getBookmark()); + } + else if(ans == AP_Dialog_InsertBookmark::a_DELETE) + { + pView->cmdDeleteBookmark(pDialog->getBookmark()); + } + pDialogFactory->releaseDialog(pDialog); + + return (ans == AP_Dialog_InsertBookmark::a_DELETE || ans == AP_Dialog_InsertBookmark::a_OK); +} + +Defun1(insertBookmark) +{ + CHECK_FRAME; + ABIWORD_VIEW; + s_doBookmarkDlg(pView, true); + return true; +} + +Defun1(deleteBookmark) +{ + CHECK_FRAME; + ABIWORD_VIEW; + s_doBookmarkDlg(pView, false); + return true; +} + +/*****************************************************************/ +static bool s_doHyperlinkDlg(FV_View * pView) +{ + XAP_Frame * pFrame = static_cast ( pView->getParentData()); + UT_ASSERT(pFrame); + + pFrame->raise(); + + XAP_DialogFactory * pDialogFactory + = static_cast(pFrame->getDialogFactory()); + + AP_Dialog_InsertHyperlink * pDialog + = static_cast(pDialogFactory->requestDialog(AP_DIALOG_ID_INSERTHYPERLINK)); + UT_ASSERT(pDialog); + if (!pDialog) + return false; + + pDialog->setDoc(pView); + + pDialog->runModal(pFrame); + + AP_Dialog_InsertHyperlink::tAnswer ans = pDialog->getAnswer(); + bool bOK = (ans == AP_Dialog_InsertHyperlink::a_OK); + + if (bOK) + { + pView->cmdInsertHyperlink(pDialog->getHyperlink()); + } + + pDialogFactory->releaseDialog(pDialog); + + return bOK; +} + +Defun1(insertHyperlink) +{ + CHECK_FRAME; + ABIWORD_VIEW; + if(pView->isSelectionEmpty()) + { + //No selection + XAP_Frame * pFrame = static_cast(pView->getParentData()); + UT_ASSERT((pFrame)); + + + pFrame->showMessageBox(AP_STRING_ID_MSG_HyperlinkNoSelection, + XAP_Dialog_MessageBox::b_O, XAP_Dialog_MessageBox::a_OK); + return false; + } + else + s_doHyperlinkDlg(pView); + return true; +} + +Defun(replaceChar) +{ + CHECK_FRAME; +//ABIWORD_VIEW; + return ( EX(delRight) && EX(insertData) && EX(setEditVI) ); +} + +Defun0(insertSoftBreak) +{ + CHECK_FRAME; + return true; +} + +Defun1(insertParagraphBreak) +{ + CHECK_FRAME; + ABIWORD_VIEW; + pView->insertParagraphBreak(); + return true; +} + +Defun1(insertSectionBreak) +{ + CHECK_FRAME; + ABIWORD_VIEW; +// +// No section breaks in header/Footers +// + if(pView->isHdrFtrEdit()) + return true; + if(pView->isInTable()) + { + XAP_Frame * pFrame = static_cast (pAV_View->getParentData()); + pFrame->showMessageBox(AP_STRING_ID_MSG_NoBreakInsideTable, + XAP_Dialog_MessageBox::b_O, + XAP_Dialog_MessageBox::a_OK); + return true; + } + + pView->insertSectionBreak(); + return true; +} + +/* + Note that within the piece table, we use the following + representations: + char code meaning + UCS_TAB (tab) tab + UCS_LF (line feed) forced line break + UCS_VTAB (vertical tab) forced column break + UCS_FF (form feed) forced page break +*/ + +Defun1(insertTab) +{ + CHECK_FRAME; + ABIWORD_VIEW; + UT_UCSChar c = UCS_TAB; + pView->cmdCharInsert(&c,1); + return true; +} + +Defun1(insertLineBreak) +{ + CHECK_FRAME; + ABIWORD_VIEW; + UT_UCSChar c = UCS_LF; + pView->cmdCharInsert(&c,1); + return true; +} + +Defun1(insertColumnBreak) +{ + CHECK_FRAME; + ABIWORD_VIEW; +// +// No column breaks in header/Footers +// + if(pView->isHdrFtrEdit()) + return true; + if(pView->isInTable()) + { + XAP_Frame * pFrame = static_cast (pAV_View->getParentData()); + pFrame->showMessageBox(AP_STRING_ID_MSG_NoBreakInsideTable, + XAP_Dialog_MessageBox::b_O, + XAP_Dialog_MessageBox::a_OK); + return true; + } + + UT_UCSChar c = UCS_VTAB; + pView->cmdCharInsert(&c,1); + return true; +} + +Defun1(insertColsBefore) +{ + CHECK_FRAME; + ABIWORD_VIEW; + PT_DocPosition insPoint; + PT_DocPosition insAnchor; + if(pView->isSelectionEmpty()) + { + insPoint = pView->getPoint(); + } + else + { + insPoint = pView->getPoint(); + insAnchor = pView->getSelectionAnchor(); + if(insAnchor < insPoint) + { + insPoint = insAnchor; + } + } + + pView->cmdInsertCol(insPoint,true); // is before + return true; +} + + +Defun1(insertColsAfter) +{ + CHECK_FRAME; + ABIWORD_VIEW; + PT_DocPosition insPoint; + PT_DocPosition insAnchor; + if(pView->isSelectionEmpty()) + { + insPoint = pView->getPoint(); + } + else + { + insPoint = pView->getPoint(); + insAnchor = pView->getSelectionAnchor(); + if(insAnchor < insPoint) + { + insPoint = insAnchor; + } + } + + pView->cmdInsertCol(insPoint,false); // is After + return true; +} + + +Defun1(insertRowsBefore) +{ + CHECK_FRAME; + ABIWORD_VIEW; + PT_DocPosition insPoint; + PT_DocPosition insAnchor; + if(pView->isSelectionEmpty()) + { + insPoint = pView->getPoint(); + } + else + { + insPoint = pView->getPoint(); + insAnchor = pView->getSelectionAnchor(); + if(insAnchor < insPoint) + { + insPoint = insAnchor; + } + } + pView->cmdInsertRow(insPoint,true); // is before + return true; +} + + +Defun1(insertRowsAfter) +{ + CHECK_FRAME; + ABIWORD_VIEW; + PT_DocPosition insPoint; + PT_DocPosition insAnchor; + if(pView->isSelectionEmpty()) + { + insPoint = pView->getPoint(); + } + else + { + insPoint = pView->getPoint(); + insAnchor = pView->getSelectionAnchor(); + if(insAnchor > insPoint) + { + insPoint = insAnchor; + } + } + pView->cmdInsertRow(insPoint,false); // is After + return true; +} + +/*********************************************************************************/ + +static bool s_doMergeCellsDlg(FV_View * pView) +{ + XAP_Frame * pFrame = static_cast ( pView->getParentData()); + UT_ASSERT(pFrame); + + pFrame->raise(); + + XAP_DialogFactory * pDialogFactory + = static_cast(pFrame->getDialogFactory()); + + AP_Dialog_MergeCells * pDialog + = static_cast(pDialogFactory->requestDialog(AP_DIALOG_ID_MERGE_CELLS)); + UT_ASSERT(pDialog); + if (!pDialog) + return false; + + if(pDialog->isRunning() == true) + { + pDialog->activate(); + } + else + { + pDialog->runModeless(pFrame); + } + return true; +} + + +Defun1(mergeCells) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + s_doMergeCellsDlg(pView); + return true; +} + +/***********************************************************************************/ + +static bool s_doFormatTableDlg(FV_View * pView) +{ + XAP_Frame * pFrame = static_cast ( pView->getParentData()); + UT_ASSERT(pFrame); + + pFrame->raise(); + + XAP_DialogFactory * pDialogFactory + = static_cast(pFrame->getDialogFactory()); + + AP_Dialog_FormatTable * pDialog + = static_cast(pDialogFactory->requestDialog(AP_DIALOG_ID_FORMAT_TABLE)); + UT_ASSERT(pDialog); + if (!pDialog) + return false; + + if(pDialog->isRunning() == true) + { + pDialog->activate(); + } + else + { + pDialog->runModeless(pFrame); + } + return true; +} + + +Defun1(formatTable) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + s_doFormatTableDlg(pView); + return true; +} + +/***********************************************************************************/ + +Defun1(deleteCell) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + pView->cmdDeleteCell(pView->getPoint()); + return true; +} + + +Defun1(deleteColumns) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + pView->cmdDeleteCol(pView->getPoint()); + return true; +} + + +Defun1(deleteRows) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + pView->cmdDeleteRow(pView->getPoint()); + return true; +} + +Defun1(deleteTable) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + pView->cmdDeleteTable(pView->getPoint()); + return true; +} + +Defun1(insertPageBreak) +{ + CHECK_FRAME; + ABIWORD_VIEW; + UT_UCSChar c = UCS_FF; +// +// No page breaks in header/Footers +// + if(pView->isHdrFtrEdit()) + return true; + if(pView->isInTable()) + { + XAP_Frame * pFrame = static_cast (pAV_View->getParentData()); + pFrame->showMessageBox(AP_STRING_ID_MSG_NoBreakInsideTable, + XAP_Dialog_MessageBox::b_O, + XAP_Dialog_MessageBox::a_OK); + return true; + } + pView->cmdCharInsert(&c,1); + return true; +} + +Defun1(insertSpace) +{ + CHECK_FRAME; + ABIWORD_VIEW; + UT_UCSChar c = UCS_SPACE; + pView->cmdCharInsert(&c,1); + return true; +} + +Defun1(insertNBSpace) +{ + CHECK_FRAME; + ABIWORD_VIEW; + UT_UCSChar c = UCS_NBSP; // decimal 160 is NBS + pView->cmdCharInsert(&c,1); + return true; +} + +// non-breaking, zerrow width +Defun1(insertNBZWSpace) +{ + CHECK_FRAME; + ABIWORD_VIEW; + UT_UCSChar c = 0xFEFF; + pView->cmdCharInsert(&c,1); + return true; +} + +// zero width joiner +Defun1(insertZWJoiner) +{ + CHECK_FRAME; + ABIWORD_VIEW; + UT_UCSChar c = 0x200D; + pView->cmdCharInsert(&c,1); + return true; +} + +/*****************************************************************/ + +Defun(insertGraveData) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + // This function provides an interlude. All of the keys + // on the Dead_Grave map are mapped here. The desired + // character is in the argument (just like in insertData()). + // We do the character mapping here. + // + // This keeps us from having to define 10 EditMethod + // functions (one for each grave character). + // + // It would be nice if the key-binding mechanism (in + // ap_LoadBindings_*.cpp) were extended to allow a constant + // to be specified along with the function binding, so that + // we could have bound 'A' on the DeadGrave map to + // "insertData(0x00c0)", for example. + + UT_ASSERT(pCallData->m_dataLength==1); + UT_UCSChar graveChar = 0x0000; + switch (pCallData->m_pData[0]) + { + case 0x41: graveChar=0x00c0; break; // Agrave + case 0x45: graveChar=0x00c8; break; // Egrave + case 0x49: graveChar=0x00cc; break; // Igrave + case 0x4f: graveChar=0x00d2; break; // Ograve + case 0x55: graveChar=0x00d9; break; // Ugrave + + case 0x61: graveChar=0x00e0; break; // agrave + case 0x65: graveChar=0x00e8; break; // egrave + case 0x69: graveChar=0x00ec; break; // igrave + case 0x6f: graveChar=0x00f2; break; // ograve + case 0x75: graveChar=0x00f9; break; // ugrave + default: + UT_ASSERT(UT_SHOULD_NOT_HAPPEN); + return false; + } + + pView->cmdCharInsert(&graveChar, 1); + return true; +} + +Defun(insertAcuteData) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + // This function provides an interlude. All of the keys + // on the Dead_Acute map are mapped here. The desired + // character is in the argument (just like in insertData()). + // We do the character mapping here. + // + // See note in Defun(insertGraveData) + + UT_ASSERT(pCallData->m_dataLength==1); + UT_UCSChar acuteChar = 0x0000; + switch (pCallData->m_pData[0]) + { + case 0x41: acuteChar=0x00c1; break; // Aacute + case 0x45: acuteChar=0x00c9; break; // Eacute + case 0x49: acuteChar=0x00cd; break; // Iacute + case 0x4f: acuteChar=0x00d3; break; // Oacute + case 0x55: acuteChar=0x00da; break; // Uacute + case 0x59: acuteChar=0x00dd; break; // Yacute + + case 0x61: acuteChar=0x00e1; break; // aacute + case 0x65: acuteChar=0x00e9; break; // eacute + case 0x69: acuteChar=0x00ed; break; // iacute + case 0x6f: acuteChar=0x00f3; break; // oacute + case 0x75: acuteChar=0x00fa; break; // uacute + case 0x79: acuteChar=0x00fd; break; // yacute + + // Latin-2 characters + case 0x53: acuteChar=0x01a6; break; // Sacute + case 0x5a: acuteChar=0x01ac; break; // Zacute + case 0x52: acuteChar=0x01c0; break; // Racute + case 0x4c: acuteChar=0x01c5; break; // Lacute + case 0x43: acuteChar=0x01c6; break; // Cacute + case 0x4e: acuteChar=0x01d1; break; // Nacute + + case 0x73: acuteChar=0x01b6; break; // sacute + case 0x7a: acuteChar=0x01bc; break; // zacute + case 0x72: acuteChar=0x01e0; break; // racute + case 0x6c: acuteChar=0x01e5; break; // lacute + case 0x63: acuteChar=0x01e6; break; // cacute + case 0x6e: acuteChar=0x01f1; break; // nacute + + default: + UT_ASSERT(UT_SHOULD_NOT_HAPPEN); + return false; + } + + pView->cmdCharInsert(´Char, 1); + return true; +} + +Defun(insertCircumflexData) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + // This function provides an interlude. All of the keys + // on the Dead_Circumflex map are mapped here. The desired + // character is in the argument (just like in insertData()). + // We do the character mapping here. + // + // See note in Defun(insertGraveData) + + UT_ASSERT(pCallData->m_dataLength==1); + UT_UCSChar circumflexChar = 0x0000; + switch (pCallData->m_pData[0]) + { + case 0x41: circumflexChar=0x00c2; break; // Acircumflex + case 0x45: circumflexChar=0x00ca; break; // Ecircumflex + case 0x49: circumflexChar=0x00ce; break; // Icircumflex + case 0x4f: circumflexChar=0x00d4; break; // Ocircumflex + case 0x55: circumflexChar=0x00db; break; // Ucircumflex + + case 0x61: circumflexChar=0x00e2; break; // acircumflex + case 0x65: circumflexChar=0x00ea; break; // ecircumflex + case 0x69: circumflexChar=0x00ee; break; // icircumflex + case 0x6f: circumflexChar=0x00f4; break; // ocircumflex + case 0x75: circumflexChar=0x00fb; break; // ucircumflex + + // Latin-3 characters + case 0x48: circumflexChar=0x02a6; break; // Hcircumflex + case 0x4a: circumflexChar=0x02ac; break; // Jcircumflex + case 0x43: circumflexChar=0x02c6; break; // Ccircumflex + case 0x47: circumflexChar=0x02d8; break; // Gcircumflex + case 0x53: circumflexChar=0x02de; break; // Scircumflex + + case 0x68: circumflexChar=0x02b6; break; // hcircumflex + case 0x6a: circumflexChar=0x02bc; break; // jcircumflex + case 0x63: circumflexChar=0x02e6; break; // ccircumflex + case 0x67: circumflexChar=0x02f8; break; // gcircumflex + case 0x73: circumflexChar=0x02fe; break; // scircumflex + + default: + UT_ASSERT(UT_SHOULD_NOT_HAPPEN); + return false; + } + + pView->cmdCharInsert(&circumflexChar, 1); + return true; +} + +Defun(insertTildeData) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + // This function provides an interlude. All of the keys + // on the Dead_Tilde map are mapped here. The desired + // character is in the argument (just like in insertData()). + // We do the character mapping here. + // + // See note in Defun(insertGraveData) + + UT_ASSERT(pCallData->m_dataLength==1); + UT_UCSChar tildeChar = 0x0000; + switch (pCallData->m_pData[0]) + { + case 0x41: tildeChar=0x00c3; break; // Atilde + case 0x4e: tildeChar=0x00d1; break; // Ntilde + case 0x4f: tildeChar=0x00d5; break; // Otilde + + case 0x61: tildeChar=0x00e3; break; // atilde + case 0x6e: tildeChar=0x00f1; break; // ntilde + case 0x6f: tildeChar=0x00f5; break; // otilde + + // Latin-4 characters + case 0x49: tildeChar=0x03a5; break; // Itilde + case 0x55: tildeChar=0x03dd; break; // Utilde + + case 0x69: tildeChar=0x03b5; break; // itilde + case 0x75: tildeChar=0x03fd; break; // utilde + + default: + UT_ASSERT(UT_SHOULD_NOT_HAPPEN); + return false; + } + + pView->cmdCharInsert(&tildeChar, 1); + return true; +} + +Defun(insertMacronData) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + // This function provides an interlude. All of the keys + // on the Dead_Macron map are mapped here. The desired + // character is in the argument (just like in insertData()). + // We do the character mapping here. + // + // See note in Defun(insertGraveData) + + UT_ASSERT(pCallData->m_dataLength==1); + UT_UCSChar macronChar = 0x0000; + + switch (pCallData->m_pData[0]) + { +// Latin-4 characters + case 0x45: macronChar=0x03aa; break; // Emacron + case 0x41: macronChar=0x03c0; break; // Amacron + case 0x49: macronChar=0x03cf; break; // Imacron + case 0x4f: macronChar=0x03d2; break; // Omacron + case 0x55: macronChar=0x03de; break; // Umacron + + case 0x65: macronChar=0x03ba; break; // emacron + case 0x61: macronChar=0x03e0; break; // amacron + case 0x69: macronChar=0x03ef; break; // imacron + case 0x6f: macronChar=0x03f2; break; // omacron + case 0x75: macronChar=0x03fe; break; // umacron + + default: + UT_ASSERT(UT_SHOULD_NOT_HAPPEN); + return false; + } + + pView->cmdCharInsert(¯onChar, 1); + return true; +} + +Defun(insertBreveData) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + // This function provides an interlude. All of the keys + // on the Dead_Breve map are mapped here. The desired + // character is in the argument (just like in insertData()). + // We do the character mapping here. + // + // See note in Defun(insertGraveData) + + UT_ASSERT(pCallData->m_dataLength==1); + UT_UCSChar breveChar = 0x0000; + + switch (pCallData->m_pData[0]) + { +// Latin-[23] characters + case 0x41: breveChar=0x01c3; break; // Abreve + case 0x47: breveChar=0x02ab; break; // Gbreve + case 0x55: breveChar=0x02dd; break; // Ubreve + + case 0x61: breveChar=0x01e3; break; // abreve + case 0x67: breveChar=0x02bb; break; // gbreve + case 0x75: breveChar=0x02fd; break; // ubreve + + default: + UT_ASSERT(UT_SHOULD_NOT_HAPPEN); + return false; + } + + pView->cmdCharInsert(&breveChar, 1); + return true; +} + +Defun(insertAbovedotData) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + // This function provides an interlude. All of the keys + // on the Dead_Abovedot map are mapped here. The desired + // character is in the argument (just like in insertData()). + // We do the character mapping here. + // + // See note in Defun(insertGraveData) + + UT_ASSERT(pCallData->m_dataLength==1); + UT_UCSChar abovedotChar = 0x0000; + + switch (pCallData->m_pData[0]) + { +// Latin-[234] characters + case 0x5a: abovedotChar=0x01af; break; // Zabovedot + case 0x49: abovedotChar=0x02a9; break; // Iabovedot + case 0x43: abovedotChar=0x02c5; break; // Cabovedot + case 0x47: abovedotChar=0x02d5; break; // Gabovedot + case 0x45: abovedotChar=0x03cc; break; // Eabovedot + + case 0x7a: abovedotChar=0x01bf; break; // zabovedot + //case 0x69: TODO no corresponding 'iabovedot', is this supposed to be 'idotless' ?? + case 0x63: abovedotChar=0x02e5; break; // cabovedot + case 0x67: abovedotChar=0x02f5; break; // gabovedot + case 0x65: abovedotChar=0x03ec; break; // eabovedot + + default: + UT_ASSERT(UT_SHOULD_NOT_HAPPEN); + return false; + } + + pView->cmdCharInsert(&abovedotChar, 1); + return true; +} + +Defun(insertDiaeresisData) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + // This function provides an interlude. All of the keys + // on the Dead_Diaeresis map are mapped here. The desired + // character is in the argument (just like in insertData()). + // We do the character mapping here. + // + // See note in Defun(insertGraveData) + + UT_ASSERT(pCallData->m_dataLength==1); + UT_UCSChar diaeresisChar = 0x0000; + switch (pCallData->m_pData[0]) + { + case 0x41: diaeresisChar=0x00c4; break; // Adiaeresis + case 0x45: diaeresisChar=0x00cb; break; // Ediaeresis + case 0x49: diaeresisChar=0x00cf; break; // Idiaeresis + case 0x4f: diaeresisChar=0x00d6; break; // Odiaeresis + case 0x55: diaeresisChar=0x00dc; break; // Udiaeresis + // TODO no Ydiaeresis ?? + + case 0x61: diaeresisChar=0x00e4; break; // adiaeresis + case 0x65: diaeresisChar=0x00eb; break; // ediaeresis + case 0x69: diaeresisChar=0x00ef; break; // idiaeresis + case 0x6f: diaeresisChar=0x00f6; break; // odiaeresis + case 0x75: diaeresisChar=0x00fc; break; // udiaeresis + case 0x79: diaeresisChar=0x00ff; break; // ydiaeresis + default: + UT_ASSERT(UT_SHOULD_NOT_HAPPEN); + return false; + } + + pView->cmdCharInsert(&diaeresisChar, 1); + return true; +} + +Defun(insertDoubleacuteData) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + // This function provides an interlude. All of the keys + // on the Dead_Doubleacute map are mapped here. The desired + // character is in the argument (just like in insertData()). + // We do the character mapping here. + // + // See note in Defun(insertGraveData) + + UT_ASSERT(pCallData->m_dataLength==1); + UT_UCSChar doubleacuteChar = 0x0000; + + switch (pCallData->m_pData[0]) + { +// Latin-2 characters + case 0x4f: doubleacuteChar=0x01d5; break; // Odoubleacute + case 0x55: doubleacuteChar=0x01db; break; // Udoubleacute + + case 0x6f: doubleacuteChar=0x01f5; break; // odoubleacute + case 0x75: doubleacuteChar=0x01fb; break; // udoubleacute + + default: + UT_ASSERT(UT_SHOULD_NOT_HAPPEN); + return false; + } + + pView->cmdCharInsert(&doubleacuteChar, 1); + return true; +} + +Defun(insertCaronData) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + // This function provides an interlude. All of the keys + // on the Dead_Caron map are mapped here. The desired + // character is in the argument (just like in insertData()). + // We do the character mapping here. + // + // See note in Defun(insertGraveData) + + UT_ASSERT(pCallData->m_dataLength==1); + UT_UCSChar caronChar = 0x0000; + + switch (pCallData->m_pData[0]) + { +// Latin-2 characters + case 0x4c: caronChar=0x013d; break; // Lcaron + case 0x53: caronChar=0x0160; break; // Scaron + case 0x54: caronChar=0x0164; break; // Tcaron + case 0x5a: caronChar=0x017d; break; // Zcaron + case 0x43: caronChar=0x010c; break; // Ccaron + case 0x45: caronChar=0x011a; break; // Ecaron + case 0x44: caronChar=0x010e; break; // Dcaron + case 0x4e: caronChar=0x0147; break; // Ncaron + case 0x52: caronChar=0x0158; break; // Rcaron + + case 0x6c: caronChar=0x013e; break; // lcaron + case 0x73: caronChar=0x0161; break; // scaron + case 0x74: caronChar=0x0165; break; // tcaron + case 0x7a: caronChar=0x017e; break; // zcaron + case 0x63: caronChar=0x010d; break; // ccaron + case 0x65: caronChar=0x011b; break; // ecaron + case 0x64: caronChar=0x010f; break; // dcaron + case 0x6e: caronChar=0x0148; break; // ncaron + case 0x72: caronChar=0x0159; break; // rcaron + + default: + UT_ASSERT(UT_SHOULD_NOT_HAPPEN); + return false; + } + + pView->cmdCharInsert(&caronChar, 1); + return true; +} + +Defun(insertCedillaData) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + // This function provides an interlude. All of the keys + // on the Dead_Cedilla map are mapped here. The desired + // character is in the argument (just like in insertData()). + // We do the character mapping here. + // + // See note in Defun(insertGraveData) + + UT_ASSERT(pCallData->m_dataLength==1); + UT_UCSChar cedillaChar = 0x0000; + switch (pCallData->m_pData[0]) + { + case 0x43: cedillaChar=0x00c7; break; // Ccedilla + case 0x63: cedillaChar=0x00e7; break; // ccedilla + + // Latin-[24] characters + case 0x53: cedillaChar=0x01aa; break; // Scedilla + case 0x54: cedillaChar=0x01de; break; // Tcedilla + case 0x52: cedillaChar=0x03a3; break; // Rcedilla + case 0x4c: cedillaChar=0x03a6; break; // Lcedilla + case 0x47: cedillaChar=0x03ab; break; // Gcedilla + case 0x4e: cedillaChar=0x03d1; break; // Ncedilla + case 0x4b: cedillaChar=0x03d3; break; // Kcedilla + + case 0x73: cedillaChar=0x01ba; break; // scedilla + case 0x74: cedillaChar=0x01fe; break; // tcedilla + case 0x72: cedillaChar=0x03b3; break; // rcedilla + case 0x6c: cedillaChar=0x03b6; break; // lcedilla + case 0x67: cedillaChar=0x03bb; break; // gcedilla + case 0x6e: cedillaChar=0x03f1; break; // ncedilla + case 0x6b: cedillaChar=0x03f3; break; // kcedilla + + default: + UT_ASSERT(UT_SHOULD_NOT_HAPPEN); + return false; + } + + pView->cmdCharInsert(¸laChar, 1); + return true; +} + +Defun(insertOgonekData) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + // This function provides an interlude. All of the keys + // on the Dead_Ogonek map are mapped here. The desired + // character is in the argument (just like in insertData()). + // We do the character mapping here. + // + // See note in Defun(insertGraveData) + + UT_ASSERT(pCallData->m_dataLength==1); + UT_UCSChar ogonekChar = 0x0000; + + switch (pCallData->m_pData[0]) + { +// Latin-[24] characters + case 0x41: ogonekChar=0x01a1; break; // Aogonek + case 0x45: ogonekChar=0x01ca; break; // Eogonek + case 0x49: ogonekChar=0x03c7; break; // Iogonek + case 0x55: ogonekChar=0x03d9; break; // Uogonek + + case 0x65: ogonekChar=0x01b1; break; // eogonek + case 0x61: ogonekChar=0x01ea; break; // aogonek + case 0x69: ogonekChar=0x03e7; break; // iogonek + case 0x75: ogonekChar=0x03f9; break; // uogonek + + default: + UT_ASSERT(UT_SHOULD_NOT_HAPPEN); + return false; + } + + pView->cmdCharInsert(&ogonekChar, 1); + return true; +} + +/*****************************************************************/ + +Defun1(cut) +{ + CHECK_FRAME; + ABIWORD_VIEW; + pView->cmdCut(); + + return true; +} + +Defun1(copy) +{ + CHECK_FRAME; + ABIWORD_VIEW; + pView->cmdCopy(); + + return true; +} + +static void sActualPaste(AV_View * pAV_View, EV_EditMethodCallData * pCallData) +{ + ABIWORD_VIEW; + pView->cmdPaste(); + return; +} + +Defun1(paste) +{ + CHECK_FRAME; + ABIWORD_VIEW; +// +// Do this operation in an idle loop so when can reject queued events +// +// +// This code sets things up to handle the warp right in an idle loop. +// + int inMode = UT_WorkerFactory::IDLE | UT_WorkerFactory::TIMER; + UT_WorkerFactory::ConstructMode outMode = UT_WorkerFactory::NONE; + GR_Graphics * pG = pView->getGraphics(); + _Freq * pFreq = new _Freq(pView,NULL,sActualPaste); + s_pFrequentRepeat = UT_WorkerFactory::static_constructor (_sFrequentRepeat,pFreq, inMode, outMode, pG); + + UT_ASSERT(s_pFrequentRepeat); + UT_ASSERT(outMode != UT_WorkerFactory::NONE); + + // If the worker is working on a timer instead of in the idle + // time, set the frequency of the checks. + if ( UT_WorkerFactory::TIMER == outMode ) + { + // this is really a timer, so it's safe to static_cast it + static_cast(s_pFrequentRepeat)->set(1); + } + s_pFrequentRepeat->start(); + + return true; +} + +Defun(pasteSelection) +{ + CHECK_FRAME; +// this is intended for the X11 middle mouse thing. + ABIWORD_VIEW; + pView->cmdPasteSelectionAt(pCallData->m_xPos, pCallData->m_yPos); + + return true; +} + +Defun1(pasteSpecial) +{ + CHECK_FRAME; + ABIWORD_VIEW; + pView->cmdPaste(false); + + return true; +} + +static bool checkViewModeIsPrint(FV_View * pView) +{ + if(pView->getViewMode() != VIEW_PRINT) + { + XAP_Frame * pFrame = static_cast (pView->getParentData()); + UT_ASSERT(pFrame); + XAP_Dialog_MessageBox::tAnswer res = pFrame->showMessageBox(AP_STRING_ID_MSG_CHECK_PRINT_MODE, + XAP_Dialog_MessageBox::b_YN, + XAP_Dialog_MessageBox::a_NO); + if(res == XAP_Dialog_MessageBox::a_NO) + { + return false; + } + else + { + + AP_FrameData *pFrameData = static_cast(pFrame->getFrameData()); + UT_ASSERT(pFrameData); + + pFrameData->m_pViewMode = VIEW_PRINT; + pFrame->toggleLeftRuler (true && (pFrameData->m_bShowRuler) && + (!pFrameData->m_bIsFullScreen)); + + + pView->setViewMode (VIEW_PRINT); + + // POLICY: make this the default for new frames, too + XAP_App * pApp = pFrame->getApp(); + UT_ASSERT(pApp); + XAP_Prefs * pPrefs = pApp->getPrefs(); + UT_ASSERT(pPrefs); + XAP_PrefsScheme * pScheme = pPrefs->getCurrentScheme(true); + UT_ASSERT(pScheme); + + pScheme->setValue(AP_PREF_KEY_LayoutMode, "1"); + + pView->updateScreen(false); + pView->notifyListeners(AV_CHG_ALL); + } + } + return true; +} + +Defun1(editFooter) +{ + CHECK_FRAME; + ABIWORD_VIEW; + if(checkViewModeIsPrint(pView)) + { + pView->cmdEditFooter(); + } + return true; +} + +Defun1(removeHeader) +{ + CHECK_FRAME; + ABIWORD_VIEW; + if(checkViewModeIsPrint(pView)) + { + pView->cmdRemoveHdrFtr(true); + } + return true; +} + +Defun1(removeFooter) +{ + CHECK_FRAME; + ABIWORD_VIEW; + if(checkViewModeIsPrint(pView)) + { + pView->cmdRemoveHdrFtr(false); + } + return true; +} + +Defun1(editHeader) +{ + CHECK_FRAME; + ABIWORD_VIEW; + if(checkViewModeIsPrint(pView)) + { + pView->cmdEditHeader(); + } + return true; +} + +/*****************************************************************/ + +static bool s_doGotoDlg(FV_View * pView, XAP_Dialog_Id id) +{ + XAP_Frame * pFrame = static_cast ( pView->getParentData()); + UT_ASSERT(pFrame); + + pFrame->raise(); + + XAP_DialogFactory * pDialogFactory + = static_cast(pFrame->getDialogFactory()); + + AP_Dialog_Goto * pDialog + = static_cast(pDialogFactory->requestDialog(id)); + UT_ASSERT(pDialog); + if (!pDialog) + return false; + + if(pDialog->isRunning() == true) + { + pDialog->activate(); + } + else + { + pDialog->setView(pView); + pDialog->runModeless(pFrame); + } + return true; +} + +Defun1(go) +{ + CHECK_FRAME; + ABIWORD_VIEW; + XAP_Dialog_Id id = AP_DIALOG_ID_GOTO; + + return s_doGotoDlg(pView, id); +} + + +/*****************************************************************/ + +static bool s_doSpellDlg(FV_View * pView, XAP_Dialog_Id id) +{ + XAP_Frame * pFrame = static_cast ( pView->getParentData()); + UT_ASSERT(pFrame); + + pFrame->raise(); + + XAP_DialogFactory * pDialogFactory + = static_cast(pFrame->getDialogFactory()); + + AP_Dialog_Spell * pDialog + = static_cast(pDialogFactory->requestDialog(id)); + UT_ASSERT(pDialog); + if (!pDialog) + return false; + + // run the dialog (it probably should be modeless if anyone + // gets the urge to make it safe that way) + pDialog->runModal(pFrame); + bool bOK = pDialog->isComplete(); + + if (bOK) + s_TellSpellDone(pFrame, pDialog->isSelection()); + + pDialogFactory->releaseDialog(pDialog); + + return bOK; +} + + +Defun1(dlgSpell) +{ + CHECK_FRAME; + ABIWORD_VIEW; + XAP_Dialog_Id id = AP_DIALOG_ID_SPELL; + + return s_doSpellDlg(pView,id); +} + +/*****************************************************************/ + +static bool s_doFindOrFindReplaceDlg(FV_View * pView, XAP_Dialog_Id id) +{ + XAP_Frame * pFrame = static_cast ( pView->getParentData()); + UT_ASSERT(pFrame); + + pFrame->raise(); + + XAP_DialogFactory * pDialogFactory + = static_cast(pFrame->getDialogFactory()); + + AP_Dialog_Replace * pDialog + = static_cast(pDialogFactory->requestDialog(id)); + UT_ASSERT(pDialog); + if (!pDialog) + return false; + + // don't match case by default + pDialog->setMatchCase(false); + + // prime the dialog with a "find" string if there's a + // current selection. + if (!pView->isSelectionEmpty()) + { + UT_UCSChar * buffer = pView->getSelectionText(); + + pDialog->setFindString(buffer); + + FREEP(buffer); + } + + // run the dialog (it should really be modeless if anyone + // gets the urge to make it safe that way) + // OK I Will + if(pDialog->isRunning() == true) + { + pDialog->activate(); + } + else + { + pDialog->runModeless(pFrame); + } + bool bOK = true; + return bOK; +} + + +Defun1(find) +{ + CHECK_FRAME; + ABIWORD_VIEW; + XAP_Dialog_Id id = AP_DIALOG_ID_FIND; + + return s_doFindOrFindReplaceDlg(pView,id); +} + +Defun1(findAgain) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + return pView->findAgain(); +} + +Defun1(replace) +{ + CHECK_FRAME; + ABIWORD_VIEW; + XAP_Dialog_Id id = AP_DIALOG_ID_REPLACE; + + return s_doFindOrFindReplaceDlg(pView,id); +} + +/*****************************************************************/ + +static bool s_doLangDlg(FV_View * pView) +{ + XAP_Frame * pFrame = static_cast ( pView->getParentData()); + UT_ASSERT(pFrame); + + pFrame->raise(); + + XAP_Dialog_Id id = XAP_DIALOG_ID_LANGUAGE; + + XAP_DialogFactory * pDialogFactory + = static_cast(pFrame->getDialogFactory()); + + XAP_Dialog_Language * pDialog + = static_cast(pDialogFactory->requestDialog(id)); + UT_ASSERT(pDialog); + if (!pDialog) + return false; + + const XML_Char ** props_in = NULL; + if (pView->getCharFormat(&props_in)) + { + pDialog->setLanguageProperty(UT_getAttribute("lang", props_in)); + FREEP(props_in); + } + + // run the dialog + + pDialog->runModal(pFrame); + + // extract what they did + + bool bOK = (pDialog->getAnswer() == XAP_Dialog_Language::a_OK); + + if (bOK) + { + //UT_DEBUGMSG(("pressed OK\n")); + UT_uint16 k = 0; + const XML_Char * props_out[3]; + const XML_Char * s; + static XML_Char szLang[50]; + + if (pDialog->getChangedLangProperty(&s)) + { + //UT_DEBUGMSG(("some change\n")); + sprintf(szLang,"%s",s); + props_out[k++] = "lang"; + props_out[k++] = static_cast(szLang); + } + + props_out[k] = 0; // put null after last pair. + + if (k > 0) // if something changed + pView->setCharFormat(props_out); + } + + pDialogFactory->releaseDialog(pDialog); + + return bOK; +} + +/*****************************************************************/ + +static bool s_doFontDlg(FV_View * pView) +{ + XAP_Frame * pFrame = static_cast ( pView->getParentData()); + UT_ASSERT(pFrame); + + pFrame->raise(); + + XAP_Dialog_Id id = XAP_DIALOG_ID_FONT; + + XAP_DialogFactory * pDialogFactory + = static_cast(pFrame->getDialogFactory()); + + XAP_Dialog_FontChooser * pDialog + = static_cast(pDialogFactory->requestDialog(id)); + UT_ASSERT(pDialog); + if (!pDialog) + return false; + + // stuff the GR_Graphics into the dialog so that it + // can query the system for font info relative to our + // context. + + pDialog->setGraphicsContext(pView->getLayout()->getGraphics()); + + // get current font info from pView + + const XML_Char ** props_in = NULL; + if (pView->getCharFormat(&props_in)) + { + // stuff font properties into the dialog. + // for a/p which are constant across the selection (always + // present) we will set the field in the dialog. for things + // which change across the selection, we ask the dialog not + // to set the field (by passing null). + + pDialog->setFontFamily(UT_getAttribute("font-family", props_in)); + pDialog->setFontSize(UT_getAttribute("font-size", props_in)); + pDialog->setFontWeight(UT_getAttribute("font-weight", props_in)); + pDialog->setFontStyle(UT_getAttribute("font-style", props_in)); + pDialog->setColor(UT_getAttribute("color", props_in)); + pDialog->setBGColor(UT_getAttribute("bgcolor", props_in)); + +// +// Set the background color for the preview +// + XML_Char background[8]; + UT_RGBColor * bgCol = pView->getCurrentPage()->getOwningSection()->getPaperColor(); + sprintf(background, "%02x%02x%02x",bgCol->m_red, + bgCol->m_grn,bgCol->m_blu); + pDialog->setBackGroundColor( static_cast(background)); + + // these behave a little differently since they are + // probably just check boxes and we don't have to + // worry about initializing a combo box with a choice + // (and because they are all stuck under one CSS attribute). + + bool bUnderline = false; + bool bOverline = false; + bool bStrikeOut = false; + bool bTopLine = false; + bool bBottomLine = false; + + const XML_Char * s = UT_getAttribute("text-decoration", props_in); + if (s) + { + bUnderline = (strstr(s, "underline") != NULL); + bOverline = (strstr(s, "overline") != NULL); + bStrikeOut = (strstr(s, "line-through") != NULL); + bTopLine = (strstr(s, "topline") != NULL); + bBottomLine = (strstr(s, "bottomline") != NULL); + } + pDialog->setFontDecoration(bUnderline,bOverline,bStrikeOut,bTopLine,bBottomLine); + + bool bHidden = false; + const XML_Char * h = UT_getAttribute("display", props_in); + if(h) + { + bHidden = (strstr(h, "none") != NULL); + } + pDialog->setHidden(bHidden); + + bool bSuperScript = false; + h = UT_getAttribute("text-position", props_in); + if(h) + { + bSuperScript = (strstr(h, "superscript") != NULL); + } + pDialog->setSuperScript(bSuperScript); + + bool bSubScript = false; + h = UT_getAttribute("text-position", props_in); + if(h) + { + bSubScript = (strstr(h, "subscript") != NULL); + } + pDialog->setSuperScript(bSubScript); + + FREEP(props_in); + } + + if(!pView->isSelectionEmpty()) + { + // set the drawable string to the selection text + pDialog->setDrawString(pView->getSelectionText()); + } + + // run the dialog + + pDialog->runModal(pFrame); + + // extract what they did + + bool bOK = (pDialog->getAnswer() == XAP_Dialog_FontChooser::a_OK); + + if (bOK) + { + UT_uint32 k = 0; + const XML_Char * props_out[19]; + const XML_Char * s; + + if (pDialog->getChangedFontFamily(&s)) + { + props_out[k++] = "font-family"; + props_out[k++] = s; + } + + if (pDialog->getChangedFontSize(&s)) + { + props_out[k++] = "font-size"; + props_out[k++] = s; + } + + if (pDialog->getChangedFontWeight(&s)) + { + props_out[k++] = "font-weight"; + props_out[k++] = s; + } + + if (pDialog->getChangedFontStyle(&s)) + { + props_out[k++] = "font-style"; + props_out[k++] = s; + } + + if (pDialog->getChangedColor(&s)) + { + props_out[k++] = "color"; + props_out[k++] = s; + } + + if (pDialog->getChangedBGColor(&s)) + { + props_out[k++] = "bgcolor"; + props_out[k++] = s; + } + + bool bUnderline = false; + bool bChangedUnderline = pDialog->getChangedUnderline(&bUnderline); + bool bOverline = false; + bool bChangedOverline = pDialog->getChangedOverline(&bOverline); + bool bStrikeOut = false; + bool bChangedStrikeOut = pDialog->getChangedStrikeOut(&bStrikeOut); + bool bTopline = false; + bool bChangedTopline = pDialog->getChangedTopline(&bTopline); + bool bBottomline = false; + bool bChangedBottomline = pDialog->getChangedBottomline(&bBottomline); + UT_String decors; + static XML_Char sstr[50]; + if (bChangedUnderline || bChangedStrikeOut || bChangedOverline || bChangedTopline || bChangedBottomline) + { + decors.clear(); + if(bUnderline) + decors += "underline "; + if(bStrikeOut) + decors += "line-through "; + if(bOverline) + decors += "overline "; + if(bTopline) + decors += "topline "; + if(bBottomline) + decors += "bottomline "; + if(!bUnderline && !bStrikeOut && !bOverline && !bTopline && !bBottomline) + decors = "none"; + sprintf(sstr,"%s",decors.c_str()); + props_out[k++] = "text-decoration"; + props_out[k++] = static_cast(sstr); + } + + bool bHidden = false; + bool bChangedHidden = pDialog->getChangedHidden(&bHidden); + + if (bChangedHidden) + { + if(bHidden) + { + props_out[k++] = "display"; + props_out[k++] = "none"; + + } + else + { + props_out[k++] = "display"; + props_out[k++] ="inline"; + } + } + + bool bSuperScript = false; + bool bChangedSuperScript = pDialog->getChangedSuperScript(&bSuperScript); + + if (bChangedSuperScript) + { + if(bSuperScript) + { + props_out[k++] = "text-position"; + props_out[k++] = "superscript"; + + } + else + { + props_out[k++] = "text-position"; + props_out[k++] =""; + } + } + + bool bSubScript = false; + bool bChangedSubScript = pDialog->getChangedSubScript(&bSubScript); + + if (bChangedSubScript) + { + if(bSubScript) + { + props_out[k++] = "text-position"; + props_out[k++] = "subscript"; + + } + else + { + props_out[k++] = "text-position"; + props_out[k++] =""; + } + } + + + props_out[k] = 0; // put null after last pair. + UT_ASSERT(k < NrElements(props_out)); + for(UT_uint32 i = 0; i 0) // if something changed + pView->setCharFormat(props_out); + } + + pDialogFactory->releaseDialog(pDialog); + + return bOK; +} + +static void +s_TabSaveCallBack (AP_Dialog_Tab * pDlg, FV_View * pView, + const char * szTabStops, const char * szDflTabStop, + void * closure) +{ + UT_return_if_fail(szTabStops && szDflTabStop); + + const XML_Char * properties[3]; + properties[0] = "tabstops"; + properties[1] = szTabStops; + properties[2] = 0; + UT_DEBUGMSG(("AP_Dialog_Tab: Tab Stop [%s]\n",properties[1])); + if(szTabStops && *szTabStops) + { + pView->setBlockFormat(properties); + } + else + { + properties[1] = " "; + pView->setBlockFormat(properties); + } + + properties[0] = "default-tab-interval"; + properties[1] = szDflTabStop; + properties[2] = 0; + UT_ASSERT(properties[1]); + UT_DEBUGMSG(("AP_Dialog_Tab: Default Tab Stop [%s]\n",properties[1])); + + pView->setBlockFormat(properties); +} + +static bool s_doTabDlg(FV_View * pView) +{ + + + XAP_Frame * pFrame = static_cast(pView->getParentData()); + UT_ASSERT(pFrame); + + pFrame->raise(); + + XAP_DialogFactory * pDialogFactory + = static_cast(pFrame->getDialogFactory()); + + AP_Dialog_Tab * pDialog + = static_cast(pDialogFactory->requestDialog(AP_DIALOG_ID_TAB)); + + if(pDialog) + { + // setup the callback function, no closure + pDialog->setSaveCallback(s_TabSaveCallBack, NULL); + + // run the dialog + pDialog->runModal(pFrame); + + // get the dialog answer + AP_Dialog_Tab::tAnswer answer = pDialog->getAnswer(); + + switch (answer) + { + case AP_Dialog_Tab::a_OK: + case AP_Dialog_Tab::a_CANCEL: + // do nothing + break; + default: + UT_ASSERT(UT_SHOULD_NOT_HAPPEN); + } + + pDialogFactory->releaseDialog(pDialog); + } + else + { + s_TellNotImplemented(pFrame, "Tabs dialog", __LINE__); + } + return true; +} + + +static bool s_doParagraphDlg(FV_View * pView) +{ + XAP_Frame * pFrame = static_cast ( pView->getParentData()); + UT_ASSERT(pFrame); + + pFrame->raise(); + + XAP_DialogFactory * pDialogFactory + = static_cast(pFrame->getDialogFactory()); + + AP_Dialog_Paragraph * pDialog + = static_cast(pDialogFactory->requestDialog(AP_DIALOG_ID_PARAGRAPH)); + UT_ASSERT(pDialog); + if (!pDialog) + return false; + + const XML_Char ** props = NULL; + + if (!pView->getBlockFormat(&props)) + return false; + + if (!pDialog->setDialogData(props)) + return false; + + FREEP(props); + + // let's steal the width from getTopRulerInfo. + AP_TopRulerInfo info; + pView->getTopRulerInfo(&info); + + // TODO tables + pDialog->setMaxWidth (info.u.c.m_xColumnWidth); + + // run the dialog + pDialog->runModal(pFrame); + + // get the dialog answer + AP_Dialog_Paragraph::tAnswer answer = pDialog->getAnswer(); + + const XML_Char ** propitem = NULL; + + switch (answer) + { + case AP_Dialog_Paragraph::a_OK: + + // getDialogData() returns us XML_Char ** data we have to free + pDialog->getDialogData(props); + UT_ASSERT(props); + + // set properties back to document + if (props && props[0]) + pView->setBlockFormat(props); + + // we have to loop through the props pairs, freeing each string + // referenced, then freeing the pointers themselves + if (props) + { + propitem = props; + + while (propitem[0] && propitem[1]) + { + FREEP(propitem[0]); + FREEP(propitem[1]); + propitem += 2; + } + } + + // now free props + FREEP(props); + + break; + + case AP_Dialog_Paragraph::a_TABS: + + s_doTabDlg(pView); + + break; + + case AP_Dialog_Paragraph::a_CANCEL: + // do nothing + break; + default: + UT_ASSERT(UT_SHOULD_NOT_HAPPEN); + } + + pDialogFactory->releaseDialog(pDialog); + + return true; +} + + +static bool s_doOptionsDlg(FV_View * pView, int which = -1) +{ + XAP_Frame * pFrame = static_cast ( pView->getParentData()); + UT_ASSERT(pFrame); + + pFrame->raise(); + + XAP_DialogFactory * pDialogFactory + = static_cast(pFrame->getDialogFactory()); + + AP_Dialog_Options * pDialog + = static_cast(pDialogFactory->requestDialog(AP_DIALOG_ID_OPTIONS)); + UT_ASSERT(pDialog); + if (!pDialog) + return false; + + if ( which != -1 ) + pDialog->setInitialPageNum(which); + else + pDialog->setInitialPageNum(0); + + // run the dialog + pDialog->runModal(pFrame); + + // get the dialog answer + AP_Dialog_Options::tAnswer answer = pDialog->getAnswer(); + + switch (answer) + { + case AP_Dialog_Options::a_OK: + + break; + + case AP_Dialog_Options::a_CANCEL: + // do nothing + break; + default: + UT_ASSERT(UT_SHOULD_NOT_HAPPEN); + } + + pDialogFactory->releaseDialog(pDialog); + + return true; +} + +/****************************************************************/ + +Defun1(dlgLanguage) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + return s_doLangDlg(pView); +} + +Defun(language) +{ + CHECK_FRAME; + ABIWORD_VIEW; + const XML_Char * properties[] = { "lang", NULL, 0}; + + char lang[10]; + UT_return_val_if_fail(pCallData->m_dataLength < sizeof(lang),false); + + UT_uint32 i = 0; + for(i = 0; i < pCallData->m_dataLength; i++) + lang[i] = static_cast(pCallData->m_pData[i]); + lang[i] = 0; + + properties[1] = static_cast(&lang[0]); + pView->setCharFormat(properties); + return true; +} + +/*****************************************************************/ + +Defun1(dlgFont) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + if (pView->getDocument()->areStylesLocked()) + return true; + + return s_doFontDlg(pView); +} + +Defun(fontFamily) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + const XML_Char * properties[] = { "font-family", NULL, 0}; + UT_UTF8String utf8(pCallData->m_pData, pCallData->m_dataLength); + properties[1] = reinterpret_cast(utf8.utf8_str()); + pView->setCharFormat(properties); + + return true; +} + +Defun(fontSize) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + const XML_Char * properties[] = { "font-size", NULL, 0}; + UT_UTF8String utf8(pCallData->m_pData, pCallData->m_dataLength); + const XML_Char * sz = reinterpret_cast(utf8.utf8_str()); + + if (sz && *sz) + { + UT_String buf (sz); + buf += "pt"; + + properties[1] = static_cast(buf.c_str()); + pView->setCharFormat(properties); + } + return true; +} + +static bool _fontSizeChange(FV_View * pView, bool bIncrease) +{ + const XML_Char ** span_props = NULL; + const XML_Char * properties[] = { "font-size", NULL, 0}; + + pView->getCharFormat(&span_props); + UT_return_val_if_fail(span_props, false); + + const XML_Char * s = UT_getAttribute("font-size", span_props); + + if(!s) + return false; + + double dPoints = UT_convertToPoints(s); + FREEP(span_props); + +#define PT_INC_SMALL 1.0 +#define PT_INC_MEDIUM 2.0 +#define PT_INC_LARGE 4.0 + + if(bIncrease) + { + if(dPoints >= 26.0) + dPoints += PT_INC_LARGE; + else if(dPoints >= 8.0) + dPoints += PT_INC_MEDIUM; + else + dPoints += PT_INC_SMALL; + } + else + { + if(dPoints > 26.0) + dPoints -= PT_INC_LARGE; + else if(dPoints > 8.0) + dPoints -= PT_INC_MEDIUM; + else + dPoints -= PT_INC_SMALL; + + } + +#undef PT_INC_SMALL +#undef PT_INC_MEDIUM +#undef PT_INC_LARGE + + // make sure that we do not decrease fonts too far ... + if(dPoints < 2.0) + return false; + + const XML_Char * sz = UT_formatDimensionString(DIM_PT, dPoints); + + if(!sz || !*sz) + return false; + + properties[1] = sz; + pView->setCharFormat(properties); + + return true; +} + +Defun1(fontSizeIncrease) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + return _fontSizeChange(pView, true); +} + +Defun1(fontSizeDecrease) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + return _fontSizeChange(pView, false); +} + +Defun(formatPainter) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + // prereqs: !pView->isSelectionEmpty() && XAP_App::getApp()->canPasteFromClipboard() + // taken care of in ap_Toolbar_Functions.cpp::ap_ToolbarGetState_Clipboard + + const XML_Char ** block_properties = 0; + const XML_Char ** span_properties = 0; + + // get the current document's selected range + PD_DocumentRange range; + pView->getDocumentRangeOfCurrentSelection (&range); + + // now create a new (invisible) view to paste our clipboard contents into + PD_Document * pNewDoc = new PD_Document(XAP_App::getApp()); + pNewDoc->newDocument(); + + FL_DocLayout *pDocLayout = new FL_DocLayout(pNewDoc, pView->getGraphics()); + FV_View pPasteView (XAP_App::getApp(), 0, pDocLayout); + pDocLayout->setView (&pPasteView); + pDocLayout->fillLayouts(); + pDocLayout->formatAll(); + + // paste contents + pPasteView.cmdPaste (true); + + // select all so that we can get the block & span properties + pPasteView.cmdSelect(0, 0, FV_DOCPOS_BOD, FV_DOCPOS_EOD); + + // get the paragraph and span/character formatting properties of + // the clipboard selection + if (!pPasteView.getBlockFormat(&block_properties)) + { + UT_DEBUGMSG(("DOM: No block attributes in the new paragraph!\n")); + } + + if (!pPasteView.getCharFormat(&span_properties)) + { + UT_DEBUGMSG(("DOM: No span attributes in the new paragraph!\n")); + } + + // reset what was selected before setting the block and char formatting + pView->cmdSelect (range.m_pos1, range.m_pos2) ; + + // set the current selection's properties to what's on the clipboard + if ( block_properties ) + pView->setBlockFormat (block_properties); + if ( span_properties ) + pView->setCharFormat (span_properties); + + FREEP(block_properties); + FREEP(span_properties); + DELETEP(pDocLayout); + UNREFP(pNewDoc); + + return true; +} + +/*****************************************************************/ + +static bool _toggleSpanOrBlock(FV_View * pView, + const XML_Char * prop, + const XML_Char * vOn, + const XML_Char * vOff, + bool bMultiple, + bool isSpan) +{ + if (pView->getDocument()->areStylesLocked()) + return true; + + const XML_Char * props_out[] = { NULL, NULL, 0}; + + // get current font info from pView + const XML_Char ** props_in = NULL; + const XML_Char * s; + + if (isSpan) + { + if (!pView->getCharFormat(&props_in)) + return false; + } + else // isBlock + { + if (!pView->getBlockFormat(&props_in)) + return false; + } + + props_out[0] = prop; + props_out[1] = vOn; // be optimistic + + XML_Char * buf = NULL; + + s = UT_getAttribute(prop, props_in); + if (s) + { + if (bMultiple) + { + // some properties have multiple values + const XML_Char* p = strstr(s, vOn); + + if (p) + { + // yep... + if (strstr(s, vOff)) + UT_ASSERT(UT_SHOULD_NOT_HAPPEN); + + // ... take it out + int len = strlen(s); + buf = static_cast(UT_calloc(len, sizeof(XML_Char))); + + strncpy(buf, s, p - s); + strcat(buf, s + (p - s) + strlen(vOn)); + + // now see if anything's left + XML_Char * q; + UT_cloneString((char *&)q, buf); + + if (q && strtok(q, " ")) + props_out[1] = buf; // yep, use it + else + props_out[1] = vOff; // nope, clear it + + free(q); + } + else + { + // nope... + if (UT_stricmp(s, vOff)) + { + // ...put it in by appending to current contents + int len = strlen(s) + strlen(vOn) + 2; + buf = static_cast(UT_calloc(len, sizeof(XML_Char))); + + strcpy(buf, s); + strcat(buf, " "); + strcat(buf, vOn); + props_out[1] = buf; + } + } + } + else + { + if (0 == UT_stricmp(s, vOn)) + props_out[1] = vOff; + } + } + FREEP(props_in); + + + // set it either way + + if (isSpan) + pView->setCharFormat(props_out); + else // isBlock + pView->setBlockFormat(props_out); + + FREEP(buf); + return true; +} + +static bool _toggleSpan(FV_View * pView, + const XML_Char * prop, + const XML_Char * vOn, + const XML_Char * vOff, + bool bMultiple=false) +{ + return _toggleSpanOrBlock (pView, prop, vOn, vOff, bMultiple, true); +} + + +/*****************************************************************/ +/*****************************************************************/ + + +bool s_actuallyPrint(PD_Document *doc, GR_Graphics *pGraphics, + FV_View * pPrintView, const char *pDocName, + UT_uint32 nCopies, bool bCollate, + UT_sint32 iWidth, UT_sint32 iHeight, + UT_uint32 nToPage, UT_uint32 nFromPage) +{ + UT_uint32 j,k; + + // + // Lock out operations on this document + // + s_pLoadingDoc = static_cast(doc); + + if(pGraphics->startPrint()) + { + fp_PageSize ps = pPrintView->getPageSize(); + bool orient = ps.isPortrait (); + pGraphics->setPortrait (orient); + + const XAP_StringSet *pSS = XAP_App::getApp()->getStringSet (); + const XML_Char * msgTmpl = pSS->getValue (AP_STRING_ID_MSG_PrintStatus); + + XML_Char msgBuf [1024]; + + dg_DrawArgs da; + memset(&da, 0, sizeof(da)); + da.pG = NULL; + + XAP_Frame * pFrame = XAP_App::getApp()->getLastFocussedFrame (); + + if (bCollate) + { + for (j=1; (j <= nCopies); j++) + for (k=nFromPage; (k <= nToPage); k++) + { + sprintf (msgBuf, msgTmpl, k, nToPage); + + if(pFrame) { + pFrame->setStatusMessage ( msgBuf ); + pFrame->nullUpdate(); + } + + // NB we will need a better way to calc + // pGraphics->m_iRasterPosition when + // iHeight is allowed to vary page to page + pGraphics->m_iRasterPosition = (k-1)*iHeight; + pGraphics->startPage(pDocName, k, orient, iWidth, iHeight); + pPrintView->draw(k-1, &da); + } + } + else + { + for (k=nFromPage; (k <= nToPage); k++) + for (j=1; (j <= nCopies); j++) + { + sprintf (msgBuf, msgTmpl, k, nToPage); + + if(pFrame) { + pFrame->setStatusMessage ( msgBuf ); + pFrame->nullUpdate(); + } + + // NB we will need a better way to calc + // pGraphics->m_iRasterPosition when + // iHeight is allowed to vary page to page + pGraphics->m_iRasterPosition = (k-1)*iHeight; + pGraphics->startPage(pDocName, k, orient, iWidth, iHeight); + pPrintView->draw(k-1, &da); + } + } + pGraphics->endPrint(); + + if(pFrame) + pFrame->setStatusMessage (""); // reset/0 out status bar + } + s_pLoadingDoc = NULL; + return true; +} + +#if defined(XP_TARGET_COCOA) +/* declare but possibly not implment them */ +bool s_doPrint(FV_View * pView, bool bTryToSuppressDialog, bool bPrintDirectly); +#else +static bool s_doPrint(FV_View * pView, bool bTryToSuppressDialog,bool bPrintDirectly) +{ + XAP_Frame * pFrame = static_cast ( pView->getParentData()); + UT_ASSERT(pFrame); + + pFrame->raise(); + + XAP_DialogFactory * pDialogFactory + = static_cast(pFrame->getDialogFactory()); + + XAP_Dialog_Print * pDialog + = static_cast(pDialogFactory->requestDialog(bPrintDirectly? XAP_DIALOG_ID_PRINT_DIRECTLY: XAP_DIALOG_ID_PRINT)); + UT_ASSERT(pDialog); + if (!pDialog) + return false; + + FL_DocLayout* pLayout = pView->getLayout(); + PD_Document * doc = pLayout->getDocument(); + + pDialog->setPaperSize (pView->getPageSize().getPredefinedName()); + pDialog->setDocumentTitle(pFrame->getNonDecoratedTitle()); + pDialog->setDocumentPathname((doc->getFilename()) + ? doc->getFilename() + : pFrame->getNonDecoratedTitle()); + pDialog->setEnablePageRangeButton(true,1,pLayout->countPages()); + pDialog->setEnablePrintSelection(false); // TODO change this when we know how to do it. + pDialog->setEnablePrintToFile(true); + pDialog->setTryToBypassActualDialog(bTryToSuppressDialog); + + pDialog->runModal(pFrame); + + XAP_Dialog_Print::tAnswer ans = pDialog->getAnswer(); + bool bOK = (ans == XAP_Dialog_Print::a_OK); + + if (bOK) + { + +// +// Turn on Wait cursor +// + pView->setCursorWait(); + s_pLoadingFrame = pFrame; + s_pLoadingDoc = static_cast(doc); + + const XAP_StringSet * pSS = pFrame->getApp()->getStringSet(); + UT_String msg (pSS->getValue(AP_STRING_ID_MSG_PrintingDoc)); + + pFrame->setStatusMessage ( static_cast(msg.c_str()) ); + + GR_Graphics * pGraphics = pDialog->getPrinterGraphicsContext(); + + if (!pGraphics) + { + pFrame->showMessageBox(AP_STRING_ID_PRINT_CANNOTSTARTPRINTJOB, + XAP_Dialog_MessageBox::b_O, + XAP_Dialog_MessageBox::a_OK); + + return false; + } + + UT_ASSERT(pGraphics->queryProperties(GR_Graphics::DGP_PAPER)); + + FL_DocLayout * pDocLayout = new FL_DocLayout(doc,pGraphics); + FV_View * pPrintView = new FV_View(pFrame->getApp(),0,pDocLayout); + pPrintView->getLayout()->fillLayouts(); + pPrintView->getLayout()->formatAll(); + + UT_uint32 nFromPage, nToPage; + static_cast(pDialog->getDoPrintRange(&nFromPage,&nToPage)); + + if (nToPage > pLayout->countPages()) + nToPage = pLayout->countPages(); + + // TODO add code to handle getDoPrintSelection() + + UT_uint32 nCopies = pDialog->getNrCopies(); + bool bCollate = pDialog->getCollate(); + + // TODO these are here temporarily to make printing work. We'll fix the hack later. + // BUGBUG assumes all pages are same size and orientation + UT_sint32 iWidth = pLayout->getWidth(); + UT_sint32 iHeight = pLayout->getHeight() / pLayout->countPages(); + + const char *pDocName = ((doc->getFilename()) ? doc->getFilename() : pFrame->getNonDecoratedTitle()); + + s_actuallyPrint(doc, pGraphics, pPrintView, pDocName, nCopies, bCollate, + iWidth, iHeight, nToPage, nFromPage); + + delete pDocLayout; + delete pPrintView; + + pDialog->releasePrinterGraphicsContext(pGraphics); + +// +// Turn off wait cursor +// + pView->clearCursorWait(); + s_pLoadingFrame = NULL; + } + + pDialogFactory->releaseDialog(pDialog); + + return bOK; +} +#endif + +static bool s_doPrintPreview(FV_View * pView) +{ + XAP_Frame * pFrame = static_cast ( pView->getParentData()); + UT_ASSERT(pFrame); + + pFrame->raise(); + + XAP_DialogFactory * pDialogFactory + = static_cast(pFrame->getDialogFactory()); + + XAP_Dialog_PrintPreview * pDialog + = static_cast(pDialogFactory->requestDialog(XAP_DIALOG_ID_PRINTPREVIEW)); + UT_ASSERT(pDialog); + if (!pDialog) + return false; + + FL_DocLayout* pLayout = pView->getLayout(); + PD_Document * doc = pLayout->getDocument(); + + // Turn on Wait cursor + pView->setCursorWait(); + s_pLoadingFrame = pFrame; + s_pLoadingDoc = static_cast(doc); + + pDialog->setPaperSize (pView->getPageSize().getPredefinedName()); + pDialog->setDocumentTitle(pFrame->getNonDecoratedTitle()); + pDialog->setDocumentPathname((doc->getFilename()) + ? doc->getFilename() + : pFrame->getNonDecoratedTitle()); + + pDialog->runModal(pFrame); + + GR_Graphics * pGraphics = pDialog->getPrinterGraphicsContext(); + UT_ASSERT(pGraphics->queryProperties(GR_Graphics::DGP_PAPER)); + + FL_DocLayout * pDocLayout = new FL_DocLayout(doc,pGraphics); + FV_View * pPrintView = new FV_View(pFrame->getApp(),pFrame,pDocLayout); + pPrintView->getLayout()->fillLayouts(); + pPrintView->getLayout()->formatAll(); + + UT_uint32 nFromPage = 1, nToPage = pLayout->countPages(), nCopies = 1; + bool bCollate = false; + + // TODO these are here temporarily to make printing work. We'll fix the hack later. + // BUGBUG assumes all pages are same size and orientation + UT_sint32 iWidth = pLayout->getWidth(); + UT_sint32 iHeight = pLayout->getHeight() / pLayout->countPages(); + + const char *pDocName = ((doc->getFilename()) ? doc->getFilename() : pFrame->getNonDecoratedTitle()); + + s_actuallyPrint(doc, pGraphics, pPrintView, pDocName, nCopies, bCollate, + iWidth, iHeight, nToPage, nFromPage); + + delete pDocLayout; + delete pPrintView; + + pDialog->releasePrinterGraphicsContext(pGraphics); + + pDialogFactory->releaseDialog(pDialog); + + // Turn off wait cursor + pView->clearCursorWait(); + s_pLoadingFrame = NULL; + + return true; +} + +static bool s_doZoomDlg(FV_View * pView) +{ + UT_String tmp; + XAP_Frame * pFrame = static_cast ( pView->getParentData()); + UT_ASSERT(pFrame); + XAP_App * pApp = pFrame->getApp(); + UT_ASSERT(pApp); + XAP_Prefs * pPrefs = pApp->getPrefs(); + UT_ASSERT(pPrefs); + XAP_PrefsScheme *pPrefsScheme = pPrefs->getCurrentScheme(); + UT_ASSERT(pPrefsScheme); + + bool bNewZoom = false; + pFrame->raise(); + + XAP_DialogFactory * pDialogFactory + = static_cast(pFrame->getDialogFactory()); + + XAP_Dialog_Zoom * pDialog + = static_cast(pDialogFactory->requestDialog(XAP_DIALOG_ID_ZOOM)); + UT_ASSERT(pDialog); + if (!pDialog) + return false; + + pDialog->setZoomPercent(pFrame->getZoomPercentage()); + pDialog->setZoomType(pFrame->getZoomType()); + + pDialog->runModal(pFrame); + + XAP_Dialog_Zoom::tAnswer ans = pDialog->getAnswer(); + bool bOK = (ans == XAP_Dialog_Zoom::a_OK); + + if (bOK) + { + UT_uint32 newZoom = pFrame->getZoomPercentage(); + pFrame->setZoomType(pDialog->getZoomType()); + switch(pDialog->getZoomType()) + { + // special cases + case XAP_Frame::z_PAGEWIDTH: + pPrefsScheme->setValue(static_cast(XAP_PREF_KEY_ZoomType), + static_cast("width")); + newZoom = pView->calculateZoomPercentForPageWidth(); + break; + case XAP_Frame::z_WHOLEPAGE: + pPrefsScheme->setValue(static_cast(XAP_PREF_KEY_ZoomType), + static_cast("width")); + newZoom = pView->calculateZoomPercentForWholePage(); + break; + default: + bNewZoom = true; + newZoom = pDialog->getZoomPercent(); + } + if(bNewZoom) + { + UT_String_sprintf(tmp,"%d",newZoom); + pPrefsScheme->setValue(static_cast(XAP_PREF_KEY_ZoomType), + static_cast(tmp.c_str())); + } + s_StartStopLoadingCursor(true, pFrame); + pFrame->setZoomPercentage(newZoom); + s_StartStopLoadingCursor(false, pFrame); + } + else + { + // force toolbar combo refresh + pFrame->setZoomPercentage(pFrame->getZoomPercentage()); + } + + pDialogFactory->releaseDialog(pDialog); + + return bOK; +} + +Defun1(zoom200) +{ + CHECK_FRAME; + ABIWORD_VIEW; + XAP_Frame * pFrame = static_cast ( pView->getParentData()); + UT_ASSERT(pFrame); + XAP_App * pApp = pFrame->getApp(); + UT_ASSERT(pApp); + XAP_Prefs * pPrefs = pApp->getPrefs(); + UT_ASSERT(pPrefs); + XAP_PrefsScheme *pPrefsScheme = pPrefs->getCurrentScheme(); + UT_ASSERT(pPrefsScheme); + pPrefsScheme->setValue(static_cast(XAP_PREF_KEY_ZoomType), + static_cast("200")); + + pFrame->raise(); + + UT_uint32 newZoom = 200; + pFrame->setZoomType( XAP_Frame::z_200 ); + + s_StartStopLoadingCursor(true, pFrame); + pFrame->setZoomPercentage(newZoom); + s_StartStopLoadingCursor(false, pFrame); + + return true; +} + +Defun1(zoom150) +{ + CHECK_FRAME; + ABIWORD_VIEW; + XAP_Frame * pFrame = static_cast ( pView->getParentData()); + UT_ASSERT(pFrame); + XAP_App * pApp = pFrame->getApp(); + UT_ASSERT(pApp); + XAP_Prefs * pPrefs = pApp->getPrefs(); + UT_ASSERT(pPrefs); + XAP_PrefsScheme *pPrefsScheme = pPrefs->getCurrentScheme(); + UT_ASSERT(pPrefsScheme); + pPrefsScheme->setValue(static_cast(XAP_PREF_KEY_ZoomType), + static_cast("150")); + + pFrame->raise(); + + UT_uint32 newZoom = 150; + pFrame->setZoomType( XAP_Frame::z_150 ); + + s_StartStopLoadingCursor(true, pFrame); + pFrame->setZoomPercentage(newZoom); + s_StartStopLoadingCursor(false, pFrame); + + return true; +} + +Defun1(zoom100) +{ + CHECK_FRAME; + ABIWORD_VIEW; + XAP_Frame * pFrame = static_cast ( pView->getParentData()); + UT_ASSERT(pFrame); + XAP_App * pApp = pFrame->getApp(); + UT_ASSERT(pApp); + XAP_Prefs * pPrefs = pApp->getPrefs(); + UT_ASSERT(pPrefs); + XAP_PrefsScheme *pPrefsScheme = pPrefs->getCurrentScheme(); + UT_ASSERT(pPrefsScheme); + pPrefsScheme->setValue(static_cast(XAP_PREF_KEY_ZoomType), + static_cast("100")); + + pFrame->raise(); + + UT_uint32 newZoom = 100; + pFrame->setZoomType( XAP_Frame::z_100 ); + + s_StartStopLoadingCursor(true, pFrame); + pFrame->setZoomPercentage(newZoom); + s_StartStopLoadingCursor(false, pFrame); + + return true; +} + +Defun1(zoom50) +{ + CHECK_FRAME; + ABIWORD_VIEW; + XAP_Frame * pFrame = static_cast ( pView->getParentData()); + UT_ASSERT(pFrame); + XAP_App * pApp = pFrame->getApp(); + UT_ASSERT(pApp); + XAP_Prefs * pPrefs = pApp->getPrefs(); + UT_ASSERT(pPrefs); + XAP_PrefsScheme *pPrefsScheme = pPrefs->getCurrentScheme(); + UT_ASSERT(pPrefsScheme); + pPrefsScheme->setValue(static_cast(XAP_PREF_KEY_ZoomType), + static_cast("50")); + + pFrame->raise(); + + UT_uint32 newZoom = 50; + pFrame->setZoomType( XAP_Frame::z_PERCENT ); + + s_StartStopLoadingCursor(true, pFrame); + pFrame->setZoomPercentage(newZoom); + s_StartStopLoadingCursor(false, pFrame); + + return true; +} + +Defun1(zoom75) +{ + CHECK_FRAME; + ABIWORD_VIEW; + XAP_Frame * pFrame = static_cast ( pView->getParentData()); + UT_ASSERT(pFrame); + XAP_App * pApp = pFrame->getApp(); + UT_ASSERT(pApp); + XAP_Prefs * pPrefs = pApp->getPrefs(); + UT_ASSERT(pPrefs); + XAP_PrefsScheme *pPrefsScheme = pPrefs->getCurrentScheme(); + UT_ASSERT(pPrefsScheme); + pPrefsScheme->setValue(static_cast(XAP_PREF_KEY_ZoomType), + static_cast("75")); + + pFrame->raise(); + + UT_uint32 newZoom = 75; + pFrame->setZoomType( XAP_Frame::z_75 ); + + s_StartStopLoadingCursor(true, pFrame); + pFrame->setZoomPercentage(newZoom); + s_StartStopLoadingCursor(false, pFrame); + + return true; +} + +Defun1(zoomWidth) +{ + CHECK_FRAME; + ABIWORD_VIEW; + XAP_Frame * pFrame = static_cast ( pView->getParentData()); + UT_ASSERT(pFrame); + XAP_App * pApp = pFrame->getApp(); + UT_ASSERT(pApp); + XAP_Prefs * pPrefs = pApp->getPrefs(); + UT_ASSERT(pPrefs); + XAP_PrefsScheme *pPrefsScheme = pPrefs->getCurrentScheme(); + UT_ASSERT(pPrefsScheme); + pPrefsScheme->setValue(static_cast(XAP_PREF_KEY_ZoomType), + static_cast("Width")); + + pFrame->raise(); + + pFrame->setZoomType( XAP_Frame::z_PAGEWIDTH ); + + UT_uint32 newZoom = pView->calculateZoomPercentForPageWidth(); + + s_StartStopLoadingCursor(true, pFrame); + pFrame->setZoomPercentage(newZoom); + s_StartStopLoadingCursor(false, pFrame); + + + return true; +} + +Defun1(zoomWhole) +{ + CHECK_FRAME; + ABIWORD_VIEW; + XAP_Frame * pFrame = static_cast ( pView->getParentData()); + UT_ASSERT(pFrame); + + XAP_App * pApp = pFrame->getApp(); + UT_ASSERT(pApp); + XAP_Prefs * pPrefs = pApp->getPrefs(); + UT_ASSERT(pPrefs); + XAP_PrefsScheme *pPrefsScheme = pPrefs->getCurrentScheme(); + UT_ASSERT(pPrefsScheme); + pPrefsScheme->setValue(static_cast(XAP_PREF_KEY_ZoomType), + static_cast("Page")); + + + pFrame->raise(); + + pFrame->setZoomType( XAP_Frame::z_WHOLEPAGE ); + + UT_uint32 newZoom = pView->calculateZoomPercentForWholePage(); + + s_StartStopLoadingCursor(true, pFrame); + pFrame->setZoomPercentage(newZoom); + s_StartStopLoadingCursor(false, pFrame); + + return true; +} + +Defun1(zoomIn) +{ + CHECK_FRAME; + ABIWORD_VIEW; + XAP_Frame * pFrame = static_cast ( pView->getParentData()); + UT_ASSERT(pFrame); + + pFrame->raise(); + UT_uint32 newZoom = UT_MIN(pFrame->getZoomPercentage() + 10, 500); + UT_String tmp (UT_String_sprintf("%d",newZoom)); + XAP_App * pApp = pFrame->getApp(); + UT_ASSERT(pApp); + XAP_Prefs * pPrefs = pApp->getPrefs(); + UT_ASSERT(pPrefs); + XAP_PrefsScheme *pPrefsScheme = pPrefs->getCurrentScheme(); + UT_ASSERT(pPrefsScheme); + pPrefsScheme->setValue(static_cast(XAP_PREF_KEY_ZoomType), + static_cast(tmp.c_str())); + + pFrame->setZoomType( XAP_Frame::z_PERCENT ); + + s_StartStopLoadingCursor(true, pFrame); + pFrame->setZoomPercentage(newZoom); + s_StartStopLoadingCursor(false, pFrame); + + return true; +} + +Defun1(zoomOut) +{ + CHECK_FRAME; + ABIWORD_VIEW; + XAP_Frame * pFrame = static_cast ( pView->getParentData()); + UT_ASSERT(pFrame); + + pFrame->raise(); + + UT_uint32 newZoom = UT_MAX(pFrame->getZoomPercentage() - 10, 10); + UT_String tmp (UT_String_sprintf("%d",newZoom)); + XAP_App * pApp = pFrame->getApp(); + UT_ASSERT(pApp); + XAP_Prefs * pPrefs = pApp->getPrefs(); + UT_ASSERT(pPrefs); + XAP_PrefsScheme *pPrefsScheme = pPrefs->getCurrentScheme(); + UT_ASSERT(pPrefsScheme); + pPrefsScheme->setValue(static_cast(XAP_PREF_KEY_ZoomType), + static_cast(tmp.c_str())); + pFrame->setZoomType( XAP_Frame::z_PERCENT ); + + s_StartStopLoadingCursor(true, pFrame); + pFrame->setZoomPercentage(newZoom); + s_StartStopLoadingCursor(false, pFrame); + + return true; +} + +static bool s_doBreakDlg(FV_View * pView) +{ + XAP_Frame * pFrame = static_cast ( pView->getParentData()); + UT_ASSERT(pFrame); + + pFrame->raise(); + + XAP_DialogFactory * pDialogFactory + = static_cast(pFrame->getDialogFactory()); + + AP_Dialog_Break * pDialog + = static_cast(pDialogFactory->requestDialog(AP_DIALOG_ID_BREAK)); + UT_ASSERT(pDialog); + if (!pDialog) + return false; + + pDialog->runModal(pFrame); + + AP_Dialog_Break::tAnswer ans = pDialog->getAnswer(); + bool bOK = (ans == AP_Dialog_Break::a_OK); + + if(pView->isHdrFtrEdit()) + return false; + + if (bOK) + { + UT_UCSChar c; + switch(pDialog->getBreakType()) + { + // special cases + case AP_Dialog_Break::b_PAGE: + c = UCS_FF; + pView->cmdCharInsert(&c,1); + break; + case AP_Dialog_Break::b_COLUMN: + c = UCS_VTAB; + pView->cmdCharInsert(&c,1); + break; + case AP_Dialog_Break::b_NEXTPAGE: + pView->insertSectionBreak(BreakSectionNextPage); + break; + case AP_Dialog_Break::b_CONTINUOUS: + pView->insertSectionBreak(BreakSectionContinuous); + break; + case AP_Dialog_Break::b_EVENPAGE: + pView->insertSectionBreak(BreakSectionEvenPage); + break; + case AP_Dialog_Break::b_ODDPAGE: + pView->insertSectionBreak(BreakSectionOddPage); + break; + default: + UT_ASSERT(UT_SHOULD_NOT_HAPPEN); + } + } + + pDialogFactory->releaseDialog(pDialog); + + return bOK; +} + +static bool s_doPageSetupDlg (FV_View * pView) +{ + XAP_Frame * pFrame = static_cast ( pView->getParentData()); + UT_ASSERT(pFrame); + + XAP_App * pApp = pFrame->getApp(); + UT_ASSERT(pApp); + + pFrame->raise(); + XAP_DialogFactory * pDialogFactory + = static_cast(pFrame->getDialogFactory()); + + AP_Dialog_PageSetup * pDialog = + static_cast(pDialogFactory->requestDialog(AP_DIALOG_ID_FILE_PAGESETUP)); + + UT_ASSERT(pDialog); + if (!pDialog) + return false; + + PD_Document * pDoc = pView->getLayout()->getDocument(); + // + // Need this for the conversion methods + // + fp_PageSize::Predefined orig_def,final_def; + double orig_wid = -1, orig_ht = -1, final_wid = -1, final_ht = -1; + UT_Dimension orig_ut = DIM_IN, final_ut = DIM_IN; + fp_PageSize pSize(pDoc->m_docPageSize.getPredefinedName()); + orig_def = pSize.NameToPredefined(pSize.getPredefinedName()); + // + // Set first page of the dialog properties. + // + if (orig_def == fp_PageSize::psCustom) + { + orig_ut = pDoc->m_docPageSize.getDims(); + orig_ht = pDoc->m_docPageSize.Width(orig_ut); + orig_wid = pDoc->m_docPageSize.Height(orig_ut); + pSize.Set(orig_ht, orig_wid, orig_ut); + } + pDialog->setPageSize(pSize); + AP_Dialog_PageSetup::Orientation orig_ori,final_ori; + orig_ori = AP_Dialog_PageSetup::PORTRAIT; + if(pDoc->m_docPageSize.isPortrait() == false) + orig_ori = AP_Dialog_PageSetup::LANDSCAPE; + pDialog->setPageOrientation(orig_ori); + UT_Dimension orig_unit,final_unit,orig_margu,final_margu; + double orig_scale,final_scale; + orig_unit = pDoc->m_docPageSize.getDims(); + orig_scale = pDoc->m_docPageSize.getScale(); + + pDialog->setPageUnits(orig_unit); + pDialog->setPageScale(static_cast(100.0*orig_scale)); + + // + // Set the second page of info + // All the page and header/footer margins + // + const XML_Char ** props_in = NULL; + const char* pszLeftMargin = NULL; + const char* pszTopMargin = NULL; + const char* pszRightMargin = NULL; + const char* pszBottomMargin = NULL; + const char* pszFooterMargin = NULL; + const char* pszHeaderMargin = NULL; + double dLeftMargin = 1.0; + double dRightMargin=1.0; + double dTopMargin = 1.0; + double dBottomMargin = 1.0; + double dFooterMargin= 0.0; + double dHeaderMargin = 0.0; + UT_Dimension docMargUnits = DIM_IN; + + bool bResult = pView->getSectionFormat(&props_in); + if (!bResult) + { + UT_ASSERT(UT_SHOULD_NOT_HAPPEN); + } + if(props_in && props_in[0]) + { + pszLeftMargin = UT_getAttribute("page-margin-left", props_in); + if(pszLeftMargin) + { + dLeftMargin = UT_convertToInches(pszLeftMargin); + docMargUnits = UT_determineDimension(pszLeftMargin); + } + + pszRightMargin = UT_getAttribute("page-margin-right", props_in); + if(pszRightMargin) + { + dRightMargin = UT_convertToInches(pszRightMargin); + docMargUnits = UT_determineDimension(pszRightMargin); + } + + pszTopMargin = UT_getAttribute("page-margin-top", props_in); + if(pszTopMargin) + { + dTopMargin = UT_convertToInches(pszTopMargin); + docMargUnits = UT_determineDimension(pszTopMargin); + } + + pszBottomMargin = UT_getAttribute("page-margin-bottom", props_in); + if(pszBottomMargin) + { + dBottomMargin = UT_convertToInches(pszBottomMargin); + docMargUnits = UT_determineDimension(pszBottomMargin); + } + + pszFooterMargin = UT_getAttribute("page-margin-footer", props_in); + if(pszFooterMargin) + dFooterMargin = UT_convertToInches(pszFooterMargin); + + pszHeaderMargin = UT_getAttribute("page-margin-header", props_in); + if(pszHeaderMargin) + dHeaderMargin = UT_convertToInches(pszHeaderMargin); + } + FREEP(props_in); + orig_margu = DIM_IN; + if(docMargUnits == DIM_MM) + { + dLeftMargin = dLeftMargin * 25.4; + dRightMargin = dRightMargin * 25.4; + dTopMargin = dTopMargin * 25.4; + dBottomMargin = dBottomMargin * 25.4; + dFooterMargin = dFooterMargin * 25.4; + dHeaderMargin = dHeaderMargin * 25.4; + orig_margu = DIM_MM; + } + else if(docMargUnits == DIM_CM) + { + dLeftMargin = dLeftMargin * 2.54; + dRightMargin = dRightMargin * 2.54; + dTopMargin = dTopMargin * 2.54; + dBottomMargin = dBottomMargin * 2.54; + dFooterMargin = dFooterMargin * 2.54; + dHeaderMargin = dHeaderMargin * 2.54; + orig_margu = DIM_CM; + } + + // + // OK set all page two stuff + // + pDialog->setMarginUnits(orig_margu); + pDialog->setMarginTop(static_cast(dTopMargin)); + pDialog->setMarginBottom(static_cast(dBottomMargin)); + pDialog->setMarginLeft(static_cast(dLeftMargin)); + pDialog->setMarginRight(static_cast(dRightMargin)); + pDialog->setMarginHeader(static_cast(dHeaderMargin)); + pDialog->setMarginFooter(static_cast(dFooterMargin)); + + pDialog->runModal (pFrame); + + AP_Dialog_PageSetup::tAnswer ans = pDialog->getAnswer(); + bool bOK = (ans == AP_Dialog_PageSetup::a_OK); + + if(bOK == false) + { + delete pDialog; + return true; + } + + final_def = pSize.NameToPredefined(pDialog->getPageSize().getPredefinedName()); + final_ori = pDialog->getPageOrientation(); + final_unit = pDialog->getPageUnits(); + final_scale = pDialog->getPageScale()/100.0; + + if (final_def == fp_PageSize::psCustom) + { + final_ut = pDialog->getPageSize().getDims(); + final_wid = pDialog->getPageSize().Width(final_ut); + final_ht = pDialog->getPageSize().Height(final_ut); + } + + if((final_def != orig_def) || (final_ori != orig_ori) || (final_unit != orig_unit) || ((final_scale-orig_scale) > 0.001) || ((final_scale-orig_scale) < -0.001) || (orig_ht != final_ht) || (orig_wid != final_wid) || (orig_ut != final_ut) ) + { + // + // Set the new Page Stuff + // + pDoc->m_docPageSize.Set(pSize.PredefinedToName(final_def)); + pDoc->m_docPageSize.Set(final_unit); + + if (final_def == fp_PageSize::psCustom) + { + pDoc->m_docPageSize.Set(final_wid, + final_ht, + final_ut); + } + + bool p = (final_ori == AP_Dialog_PageSetup::PORTRAIT); + if( p == true) + { + pDoc->m_docPageSize.setPortrait(); + } + else + { + pDoc->m_docPageSize.setLandscape(); + } + pDoc->m_docPageSize.setScale(final_scale); + + // + // Get all clones of this frame and set the new page dimensions + // + + UT_Vector vClones; + if(pFrame->getViewNumber() > 0) + { + pApp->getClones(&vClones,pFrame); + for (UT_uint32 i = 0; i < vClones.getItemCount(); i++) + { + XAP_Frame * f = static_cast(vClones.getNthItem(i)); + FV_View * pV = static_cast(f->getCurrentView()); + if(pV->isHdrFtrEdit()) + { + pV->clearHdrFtrEdit(); + pV->warpInsPtToXY(0,0,false); + } + UT_uint32 izoom = f->getZoomPercentage(); + f->setZoomPercentage(izoom); + } + } + else + { + FV_View * pV = static_cast(pFrame->getCurrentView()); + if(pV->isHdrFtrEdit()) + { + pV->clearHdrFtrEdit(); + pV->warpInsPtToXY(0,0,false); + } + UT_uint32 izoom = pFrame->getZoomPercentage(); + + s_StartStopLoadingCursor(true, pFrame); + pFrame->setZoomPercentage(izoom); + s_StartStopLoadingCursor(false, pFrame); + } + } + + XAP_Prefs * pPrefs = pApp->getPrefs(); + UT_ASSERT(pPrefs); + XAP_PrefsScheme *pPrefsScheme = pPrefs->getCurrentScheme(); + UT_ASSERT(pPrefsScheme); + + pPrefsScheme->setValue(static_cast(AP_PREF_KEY_RulerUnits), + static_cast(UT_dimensionName(final_unit))); + + // + // Recover ppView + // + FV_View * ppView = static_cast(pFrame->getCurrentView()); + // + // Now gather all the margin properties... + // + + UT_String szLeftMargin; + UT_String szTopMargin; + UT_String szRightMargin; + UT_String szBottomMargin; + UT_String szFooterMargin; + UT_String szHeaderMargin; + + final_margu = pDialog->getMarginUnits(); + dTopMargin = static_cast(pDialog->getMarginTop()); + dBottomMargin = static_cast(pDialog->getMarginBottom()); + dLeftMargin = static_cast(pDialog->getMarginLeft()); + dRightMargin = static_cast(pDialog->getMarginRight()); + dHeaderMargin = static_cast(pDialog->getMarginHeader()); + dFooterMargin = static_cast(pDialog->getMarginFooter()); + + docMargUnits = DIM_IN; + if(final_margu == DIM_CM) + { + docMargUnits = DIM_CM; + dLeftMargin = dLeftMargin / 2.54; + dRightMargin = dRightMargin / 2.54; + dTopMargin = dTopMargin / 2.54; + dBottomMargin = dBottomMargin / 2.54; + dFooterMargin = dFooterMargin / 2.54; + dHeaderMargin = dHeaderMargin / 2.54; + } + else if (final_margu == DIM_MM) + { + docMargUnits = DIM_MM; + dLeftMargin = dLeftMargin / 25.4; + dRightMargin = dRightMargin / 25.4; + dTopMargin = dTopMargin / 25.4; + dBottomMargin = dBottomMargin / 25.4; + dFooterMargin = dFooterMargin / 25.4; + dHeaderMargin = dHeaderMargin / 25.4; + } + // + // Convert them into const char strings and change the section format + // + UT_Vector v; + szLeftMargin = UT_convertInchesToDimensionString(docMargUnits,dLeftMargin); + v.addItem(static_cast("page-margin-left")); + v.addItem(static_cast(szLeftMargin.c_str())); + + szRightMargin = UT_convertInchesToDimensionString(docMargUnits,dRightMargin); + v.addItem(static_cast("page-margin-right")); + v.addItem(static_cast(szRightMargin.c_str())); + + szTopMargin = UT_convertInchesToDimensionString(docMargUnits,dTopMargin); + v.addItem(static_cast("page-margin-top")); + v.addItem(static_cast(szTopMargin.c_str())); + + szBottomMargin = UT_convertInchesToDimensionString(docMargUnits,dBottomMargin); + v.addItem(static_cast("page-margin-bottom")); + v.addItem(static_cast(szBottomMargin.c_str())); + + szFooterMargin = UT_convertInchesToDimensionString(docMargUnits,dFooterMargin); + v.addItem(static_cast("page-margin-footer")); + v.addItem(static_cast(szFooterMargin.c_str())); + + szHeaderMargin = UT_convertInchesToDimensionString(docMargUnits,dHeaderMargin); + v.addItem(static_cast("page-margin-header")); + v.addItem(static_cast(szHeaderMargin.c_str())); + + UT_uint32 countv = v.getItemCount() + 1; + const XML_Char ** props = static_cast(UT_calloc(countv, sizeof(XML_Char *))); + UT_uint32 i; + for(i=0; i(v.getNthItem(i)); + } + props[i] = static_cast(NULL); + if(ppView->isHdrFtrEdit()) + { + ppView->clearHdrFtrEdit(); + ppView->warpInsPtToXY(0,0,false); + } + + // + // Finally we've got it all in place, Make the change! + // + + ppView->setSectionFormat(props); + FREEP(props); + delete pDialog; + return true; +} + +class FV_View_Insert_symbol_listener : public XAP_Insert_symbol_listener + { + public: + + void setView( AV_View * pJustFocussedView) + { + p_view = static_cast(pJustFocussedView) ; + } + bool insertSymbol(UT_UCSChar Char, char *p_font_name) + { + UT_ASSERT(p_view != NULL); + + p_view->insertSymbol(Char, static_cast(p_font_name)); + + return true; + } + + private: + FV_View *p_view; + }; + + +static FV_View_Insert_symbol_listener symbol_Listener; + +static bool s_InsertSymbolDlg(FV_View * pView, XAP_Dialog_Id id ) +{ + XAP_Frame * pFrame = static_cast ( pView->getParentData()); + UT_ASSERT(pFrame); + + pFrame->raise(); + XAP_DialogFactory * pDialogFactory + = static_cast(pFrame->getDialogFactory()); + + XAP_Dialog_Insert_Symbol * pDialog + = static_cast(pDialogFactory->requestDialog(id)); + UT_ASSERT(pDialog); + if (!pDialog) + return false; + + if(pDialog->isRunning() == true) + { + pDialog->activate(); + } + else + { + pDialog->setListener(&symbol_Listener); + pDialog->runModeless(pFrame); + + } + return true; +} + +/*****************************************************************/ +/*****************************************************************/ + +Defun1(print) +{ + CHECK_FRAME; + ABIWORD_VIEW; + return s_doPrint(pView,false,false); +} + +Defun1(printDirectly) +{ + CHECK_FRAME; + ABIWORD_VIEW; + return s_doPrint(pView,false,true); +} + +Defun1(printTB) +{ + CHECK_FRAME; +// print (intended to be from the tool-bar (where we'd like to + // suppress the dialog if possible)) + + ABIWORD_VIEW; + return s_doPrint(pView,true,false); +} + +Defun1(printPreview) +{ + CHECK_FRAME; + ABIWORD_VIEW; + return s_doPrintPreview(pView); +} + +Defun1(pageSetup) +{ + CHECK_FRAME; + ABIWORD_VIEW; + return s_doPageSetupDlg(pView); +} + +Defun1(dlgPlugins) +{ + CHECK_FRAME; + XAP_Frame * pFrame = static_cast (pAV_View->getParentData()); + UT_ASSERT(pFrame); + + pFrame->raise(); + XAP_DialogFactory * pDialogFactory + = static_cast(pFrame->getDialogFactory()); + + XAP_Dialog_PluginManager * pDialog + = static_cast(pDialogFactory->requestDialog(XAP_DIALOG_ID_PLUGIN_MANAGER)); + UT_ASSERT(pDialog); + if (!pDialog) + return false; + + if (pDialog) + { + pDialog->runModal (pFrame); + // simple non-persisten dialogues have to be deleted after use! + delete pDialog; + return true; + } + + return false; +} + +Defun1(dlgOptions) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + return s_doOptionsDlg(pView); +} + +Defun1(dlgSpellPrefs) +{ + CHECK_FRAME; + ABIWORD_VIEW; + +#ifndef WIN32 + return s_doOptionsDlg(pView, 1); // spelling tab +#else + // spelling tab in Windows in the tab num 2 + // becuase 1, is language selection. We should use + // an enumerator instead of fixed values. Jordi, + return s_doOptionsDlg(pView, 2); + +#endif +} + +/*****************************************************************/ +/*****************************************************************/ + +/* the array below is a HACK. FIXME */ +static XML_Char* s_TBPrefsKeys [] = { + AP_PREF_KEY_StandardBarVisible, + AP_PREF_KEY_FormatBarVisible, + AP_PREF_KEY_TableBarVisible, + AP_PREF_KEY_ExtraBarVisible +}; + +static bool +_viewTBx(AV_View* pAV_View, int num) +{ + CHECK_FRAME; + XAP_Frame * pFrame = static_cast ( pAV_View->getParentData()); + UT_ASSERT(pFrame); + + AP_FrameData *pFrameData = static_cast (pFrame->getFrameData()); + UT_ASSERT(pFrameData); + + // don't do anything if fullscreen + if (pFrameData->m_bIsFullScreen) + return false; + + // toggle the ruler bit + pFrameData->m_bShowBar[num] = ! pFrameData->m_bShowBar[num]; + + // actually do the dirty work + pFrame->toggleBar(num, pFrameData->m_bShowBar[num] ); + + // POLICY: make this the default for new frames, too + XAP_App * pApp = pFrame->getApp(); + UT_ASSERT(pApp); + XAP_Prefs * pPrefs = pApp->getPrefs(); + UT_ASSERT(pPrefs); + XAP_PrefsScheme * pScheme = pPrefs->getCurrentScheme(true); + UT_ASSERT(pScheme); + + pScheme->setValueBool(static_cast(s_TBPrefsKeys[num]), pFrameData->m_bShowBar[num]); + + return true; +} + + +Defun1(viewTB1) +{ + return _viewTBx(pAV_View, 0); +} + +Defun1(viewTB2) +{ + return _viewTBx(pAV_View, 1); +} + +Defun1(viewTB3) +{ + return _viewTBx(pAV_View, 2); +} + +Defun1(viewTB4) +{ + return _viewTBx(pAV_View, 3); +} + + + +Defun1(viewStd) +{ + CHECK_FRAME; +// TODO: Share this function with viewFormat & viewExtra + XAP_Frame * pFrame = static_cast ( pAV_View->getParentData()); + UT_ASSERT(pFrame); + + AP_FrameData *pFrameData = static_cast(pFrame->getFrameData()); + UT_ASSERT(pFrameData); + + // don't do anything if fullscreen + if (pFrameData->m_bIsFullScreen) + return false; + + // toggle the ruler bit + pFrameData->m_bShowBar[0] = ! pFrameData->m_bShowBar[0]; + + // actually do the dirty work + pFrame->toggleBar( 0, pFrameData->m_bShowBar[0] ); + + // POLICY: make this the default for new frames, too + XAP_App * pApp = pFrame->getApp(); + UT_ASSERT(pApp); + XAP_Prefs * pPrefs = pApp->getPrefs(); + UT_ASSERT(pPrefs); + XAP_PrefsScheme * pScheme = pPrefs->getCurrentScheme(true); + UT_ASSERT(pScheme); + + pScheme->setValueBool(static_cast(AP_PREF_KEY_StandardBarVisible), pFrameData->m_bShowBar[0]); + + return true; +} + +Defun1(viewFormat) +{ + CHECK_FRAME; + XAP_Frame * pFrame = static_cast ( pAV_View->getParentData()); + UT_ASSERT(pFrame); + + AP_FrameData *pFrameData = static_cast(pFrame->getFrameData()); + UT_ASSERT(pFrameData); + + // don't do anything if fullscreen + if (pFrameData->m_bIsFullScreen) + return false; + + // toggle the ruler bit + pFrameData->m_bShowBar[1] = ! pFrameData->m_bShowBar[1]; + + // actually do the dirty work + pFrame->toggleBar( 1, pFrameData->m_bShowBar[1] ); + + // POLICY: make this the default for new frames, too + XAP_App * pApp = pFrame->getApp(); + UT_ASSERT(pApp); + XAP_Prefs * pPrefs = pApp->getPrefs(); + UT_ASSERT(pPrefs); + XAP_PrefsScheme * pScheme = pPrefs->getCurrentScheme(true); + UT_ASSERT(pScheme); + + pScheme->setValueBool(static_cast(AP_PREF_KEY_FormatBarVisible), pFrameData->m_bShowBar[1]); + + return true; +} + + +Defun1(viewTable) +{ + CHECK_FRAME; + XAP_Frame * pFrame = static_cast ( pAV_View->getParentData()); + UT_ASSERT(pFrame); + + AP_FrameData *pFrameData = static_cast (pFrame->getFrameData()); + UT_ASSERT(pFrameData); + + // don't do anything if fullscreen + if (pFrameData->m_bIsFullScreen) + return false; + + // toggle the ruler bit + pFrameData->m_bShowBar[2] = ! pFrameData->m_bShowBar[2]; + + // actually do the dirty work + pFrame->toggleBar( 2, pFrameData->m_bShowBar[2] ); + + // POLICY: make this the default for new frames, too + XAP_App * pApp = pFrame->getApp(); + UT_ASSERT(pApp); + XAP_Prefs * pPrefs = pApp->getPrefs(); + UT_ASSERT(pPrefs); + XAP_PrefsScheme * pScheme = pPrefs->getCurrentScheme(true); + UT_ASSERT(pScheme); + + pScheme->setValueBool(static_cast(AP_PREF_KEY_TableBarVisible), pFrameData->m_bShowBar[2]); + + return true; +} + +Defun1(viewExtra) +{ + CHECK_FRAME; + XAP_Frame * pFrame = static_cast ( pAV_View->getParentData()); + UT_ASSERT(pFrame); + + AP_FrameData *pFrameData = static_cast (pFrame->getFrameData()); + UT_ASSERT(pFrameData); + + // don't do anything if fullscreen + if (pFrameData->m_bIsFullScreen) + return false; + + // toggle the ruler bit + pFrameData->m_bShowBar[3] = ! pFrameData->m_bShowBar[3]; + + // actually do the dirty work + pFrame->toggleBar( 3, pFrameData->m_bShowBar[3] ); + + // POLICY: make this the default for new frames, too + XAP_App * pApp = pFrame->getApp(); + UT_ASSERT(pApp); + XAP_Prefs * pPrefs = pApp->getPrefs(); + UT_ASSERT(pPrefs); + XAP_PrefsScheme * pScheme = pPrefs->getCurrentScheme(true); + UT_ASSERT(pScheme); + + pScheme->setValueBool(static_cast(AP_PREF_KEY_ExtraBarVisible), pFrameData->m_bShowBar[3]); + + return true; +} + +Defun(lockToolbarLayout) +{ + CHECK_FRAME; + XAP_Frame * pFrame = static_cast(pAV_View->getParentData()); + UT_ASSERT(pFrame); + + XAP_App * pApp = pFrame->getApp(); + UT_ASSERT(pApp); + + XAP_Prefs * pPrefs = pApp->getPrefs(); + UT_ASSERT(pPrefs); + + XAP_PrefsScheme * pScheme = pPrefs->getCurrentScheme(true); + UT_ASSERT(pScheme); + + bool b; + + b = pApp->areToolbarsCustomizable(); + + pApp->setToolbarsCustomizable (!b); + + pScheme->setValueBool(static_cast(XAP_PREF_KEY_AllowCustomToolbars), !b); + + return true; +} + +Defun(defaultToolbarLayout) +{ + CHECK_FRAME; + XAP_Frame * pFrame = static_cast(pAV_View->getParentData()); + UT_ASSERT(pFrame); + + XAP_App * pApp = pFrame->getApp(); + UT_ASSERT(pApp); + + AP_FrameData *pFrameData = static_cast(pFrame->getFrameData()); + UT_ASSERT(pFrameData); + + // don't do anything if fullscreen + if (pFrameData->m_bIsFullScreen) + return false; + + pApp->resetToolbarsToDefault(); + pApp->setToolbarsCustomized(false); + + // we don't want to change their visibility, just the layout + pFrame->toggleBar(0, pFrameData->m_bShowBar[0]); + pFrame->toggleBar(1, pFrameData->m_bShowBar[1]); + pFrame->toggleBar(2, pFrameData->m_bShowBar[2]); + pFrame->toggleBar(3, pFrameData->m_bShowBar[3]); + + return true; +} + +Defun(viewNormalLayout) +{ + CHECK_FRAME; + XAP_Frame * pFrame = static_cast ( pAV_View->getParentData()); + UT_ASSERT(pFrame); + FV_View * pView = static_cast(pAV_View); + if(pView->isHdrFtrEdit()) + { + pView->clearHdrFtrEdit(); + pView->warpInsPtToXY(0,0,false); + } + + AP_FrameData *pFrameData = static_cast(pFrame->getFrameData()); + UT_ASSERT(pFrameData); + + pFrameData->m_pViewMode = VIEW_NORMAL; + pFrame->toggleLeftRuler (false); + + pView->setViewMode (VIEW_NORMAL); + + // POLICY: make this the default for new frames, too + XAP_App * pApp = pFrame->getApp(); + UT_ASSERT(pApp); + XAP_Prefs * pPrefs = pApp->getPrefs(); + UT_ASSERT(pPrefs); + XAP_PrefsScheme * pScheme = pPrefs->getCurrentScheme(true); + UT_ASSERT(pScheme); + + pScheme->setValue(AP_PREF_KEY_LayoutMode, "2"); + + pView->updateScreen(false); + //pView->notifyListeners(AV_CHG_ALL); + + if (pFrame->getZoomType() == pFrame->z_PAGEWIDTH || pFrame->getZoomType() == pFrame->z_WHOLEPAGE) + pFrame->updateZoom(); + + return true; +} + + +Defun(viewWebLayout) +{ + CHECK_FRAME; + XAP_Frame * pFrame = static_cast ( pAV_View->getParentData()); + UT_ASSERT(pFrame); + + AP_FrameData *pFrameData = static_cast(pFrame->getFrameData()); + UT_ASSERT(pFrameData); + + pFrameData->m_pViewMode = VIEW_WEB; + pFrame->toggleLeftRuler (false); + + FV_View * pView = static_cast(pAV_View); + pView->setViewMode (VIEW_WEB); + + // POLICY: make this the default for new frames, too + XAP_App * pApp = pFrame->getApp(); + UT_ASSERT(pApp); + XAP_Prefs * pPrefs = pApp->getPrefs(); + UT_ASSERT(pPrefs); + XAP_PrefsScheme * pScheme = pPrefs->getCurrentScheme(true); + UT_ASSERT(pScheme); + + pScheme->setValue(AP_PREF_KEY_LayoutMode, "3"); + + pView->updateScreen(false); + //pView->notifyListeners(AV_CHG_ALL); + + if (pFrame->getZoomType() == pFrame->z_PAGEWIDTH || pFrame->getZoomType() == pFrame->z_WHOLEPAGE) + pFrame->updateZoom(); + + return true; +} + +Defun(viewPrintLayout) +{ + CHECK_FRAME; + XAP_Frame * pFrame = static_cast ( pAV_View->getParentData()); + UT_ASSERT(pFrame); + + AP_FrameData *pFrameData = static_cast(pFrame->getFrameData()); + UT_ASSERT(pFrameData); + + pFrameData->m_pViewMode = VIEW_PRINT; + pFrame->toggleLeftRuler (true && (pFrameData->m_bShowRuler) && + (!pFrameData->m_bIsFullScreen)); + + FV_View * pView = static_cast(pAV_View); + pView->setViewMode (VIEW_PRINT); + + // POLICY: make this the default for new frames, too + XAP_App * pApp = pFrame->getApp(); + UT_ASSERT(pApp); + XAP_Prefs * pPrefs = pApp->getPrefs(); + UT_ASSERT(pPrefs); + XAP_PrefsScheme * pScheme = pPrefs->getCurrentScheme(true); + UT_ASSERT(pScheme); + + pScheme->setValue(AP_PREF_KEY_LayoutMode, "1"); + + pView->updateScreen(false); + //pView->notifyListeners(AV_CHG_ALL); + + if (pFrame->getZoomType() == pFrame->z_PAGEWIDTH || pFrame->getZoomType() == pFrame->z_WHOLEPAGE) + pFrame->updateZoom(); + + return true; +} + +Defun1(viewStatus) +{ + CHECK_FRAME; + XAP_Frame * pFrame = static_cast ( pAV_View->getParentData()); + UT_ASSERT(pFrame); + + AP_FrameData *pFrameData = static_cast (pFrame->getFrameData()); + UT_ASSERT(pFrameData); + // don't do anything if fullscreen + if (pFrameData->m_bIsFullScreen) + return false; + + + // toggle the view status bit + pFrameData->m_bShowStatusBar = ! pFrameData->m_bShowStatusBar; + + // actually do the dirty work + pFrame->toggleStatusBar(pFrameData->m_bShowStatusBar); + + // POLICY: make this the default for new frames, too + XAP_App * pApp = pFrame->getApp(); + UT_ASSERT(pApp); + XAP_Prefs * pPrefs = pApp->getPrefs(); + UT_ASSERT(pPrefs); + XAP_PrefsScheme * pScheme = pPrefs->getCurrentScheme(true); + UT_ASSERT(pScheme); + + pScheme->setValueBool(static_cast(AP_PREF_KEY_StatusBarVisible), pFrameData->m_bShowStatusBar); + return true; +} + +Defun1(viewRuler) +{ + CHECK_FRAME; + XAP_Frame * pFrame = static_cast ( pAV_View->getParentData()); + UT_ASSERT(pFrame); + + AP_FrameData *pFrameData = static_cast(pFrame->getFrameData()); + UT_ASSERT(pFrameData); + + // don't do anything if fullscreen + if (pFrameData->m_bIsFullScreen) + return false; + + // toggle the ruler bit + pFrameData->m_bShowRuler = ! pFrameData->m_bShowRuler; + + // actually do the dirty work + pFrame->toggleRuler(pFrameData->m_bShowRuler); + + // POLICY: make this the default for new frames, too + XAP_App * pApp = pFrame->getApp(); + UT_ASSERT(pApp); + XAP_Prefs * pPrefs = pApp->getPrefs(); + UT_ASSERT(pPrefs); + XAP_PrefsScheme * pScheme = pPrefs->getCurrentScheme(true); + UT_ASSERT(pScheme); + pScheme->setValueBool(static_cast(AP_PREF_KEY_RulerVisible), pFrameData->m_bShowRuler); + + return true; +} + +Defun1(viewFullScreen) +{ + CHECK_FRAME; + XAP_Frame * pFrame = static_cast ( pAV_View->getParentData()); + AP_FrameData *pFrameData = static_cast(pFrame->getFrameData()); + + if(!pFrameData->m_bIsFullScreen) // we're hiding stuff + { + pFrameData->m_bIsFullScreen = true; + for (UT_uint32 i = 0; i < 20; i++) // should never have more than 20 toolbars + { + if (!pFrame->getToolbar(i)) + break; + + if (pFrameData->m_bShowBar[i]) + pFrame->toggleBar(i, false); + } + if (pFrameData->m_bShowStatusBar) + pFrame->toggleStatusBar(false); + if (pFrameData->m_bShowRuler) + pFrame->toggleRuler(false); + pFrame->setFullScreen(true); + } + else // we're (possibly) unhiding stuff + { + if (pFrameData->m_bShowRuler) + pFrame->toggleRuler(pFrameData->m_bShowRuler); + if (pFrameData->m_bShowStatusBar) + pFrame->toggleStatusBar(pFrameData->m_bShowStatusBar); + for (UT_uint32 i = 0; i < 4; i++) + { + if (!pFrame->getToolbar(i)) + break; + + if (pFrameData->m_bShowBar[i]) + pFrame->toggleBar(i, true); + } + pFrameData->m_bIsFullScreen = false; + pFrame->setFullScreen(false); + } + + // Recalculate the layout after entering/leaving fullscreen + pFrame->queue_resize(); + return true; +} + +Defun1(viewPara) +{ + CHECK_FRAME; + XAP_Frame * pFrame = static_cast ( pAV_View->getParentData()); + UT_ASSERT(pFrame); + + AP_FrameData *pFrameData = static_cast(pFrame->getFrameData()); + UT_ASSERT(pFrameData); + + pFrameData->m_bShowPara = !pFrameData->m_bShowPara; + + ABIWORD_VIEW; + pView->setShowPara(pFrameData->m_bShowPara); + + // POLICY: make this the default for new frames, too + XAP_App * pApp = pFrame->getApp(); + UT_ASSERT(pApp); + XAP_Prefs * pPrefs = pApp->getPrefs(); + UT_ASSERT(pPrefs); + XAP_PrefsScheme * pScheme = pPrefs->getCurrentScheme(true); + UT_ASSERT(pScheme); + + pScheme->setValueBool(AP_PREF_KEY_ParaVisible, pFrameData->m_bShowPara); + pView->notifyListeners(AV_CHG_ALL); + + return true; +} + +Defun1(viewHeadFoot) +{ + CHECK_FRAME; + XAP_Frame * pFrame = static_cast ( pAV_View->getParentData()); + UT_ASSERT(pFrame); + + // TODO: synch this implementation with ap_GetState_View + s_TellNotImplemented(pFrame, "View Headers and Footers", __LINE__); + return true; +} + +Defun1(viewLockStyles) +{ + CHECK_FRAME; + ABIWORD_VIEW; + pView->getDocument()->lockStyles( !pView->getDocument()->areStylesLocked() ); + pView->notifyListeners(AV_CHG_ALL); + return true; +} + +Defun(zoom) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + XAP_Frame * pFrame = static_cast ( pAV_View->getParentData()); + UT_ASSERT(pFrame); + XAP_App * pApp = pFrame->getApp(); + UT_ASSERT(pApp); + XAP_Prefs * pPrefs = pApp->getPrefs(); + UT_ASSERT(pPrefs); + XAP_PrefsScheme *pPrefsScheme = pPrefs->getCurrentScheme(); + UT_ASSERT(pPrefsScheme); + + UT_uint32 iZoom = 0; + + UT_UTF8String utf8(pCallData->m_pData, pCallData->m_dataLength); + const XML_Char *p_zoom = reinterpret_cast(utf8.utf8_str()); + + const XAP_StringSet * pSS = XAP_App::getApp()->getStringSet(); + + UT_UTF8String sPageWidth (pSS->getValueUTF8(XAP_STRING_ID_TB_Zoom_PageWidth)); + UT_UTF8String sWholePage (pSS->getValueUTF8(XAP_STRING_ID_TB_Zoom_WholePage)); + UT_UTF8String sPercent (pSS->getValueUTF8(XAP_STRING_ID_TB_Zoom_Percent)); + + if(strcmp(p_zoom, sPageWidth.utf8_str()) == 0) + { + pPrefsScheme->setValue(static_cast(XAP_PREF_KEY_ZoomType), + static_cast("Width")); + pFrame->setZoomType(XAP_Frame::z_PAGEWIDTH); + iZoom = pView->calculateZoomPercentForPageWidth(); + } + else if(strcmp(p_zoom, sWholePage.utf8_str()) == 0) + { + pFrame->setZoomType(XAP_Frame::z_WHOLEPAGE); + pPrefsScheme->setValue(static_cast(XAP_PREF_KEY_ZoomType), + static_cast("Page")); + iZoom = pView->calculateZoomPercentForWholePage(); + } + else if(strcmp(p_zoom, sPercent.utf8_str()) == 0) + { + // invoke the zoom dialog instead for some custom value + return EX(dlgZoom); + } + else + { + // we've gotten back a number - turn it into a zoom percentage + //UT_UTF8String tmp (UT_UTF8String_sprintf("%d",p_zoom)) + pPrefsScheme->setValue(static_cast(XAP_PREF_KEY_ZoomType), + static_cast(utf8.utf8_str())); + pFrame->setZoomType(XAP_Frame::z_PERCENT); + iZoom = atoi(p_zoom); + } + + UT_ASSERT(iZoom > 0); + + s_StartStopLoadingCursor(true, pFrame); + pFrame->setZoomPercentage(iZoom); + s_StartStopLoadingCursor(false, pFrame); +// +// Make damn sure the cursor is ON!! +// + FV_View * pAbiView = static_cast(pFrame->getCurrentView()); + pAbiView->focusChange(AV_FOCUS_HERE); + + return true; +} + +Defun1(dlgZoom) +{ + CHECK_FRAME; + ABIWORD_VIEW; + return s_doZoomDlg(pView); +} + +static bool s_doInsertDateTime(FV_View * pView) +{ + XAP_Frame * pFrame = static_cast ( pView->getParentData()); + UT_ASSERT(pFrame); + + pFrame->raise(); + + XAP_DialogFactory * pDialogFactory + = static_cast(pFrame->getDialogFactory()); + + AP_Dialog_Insert_DateTime * pDialog + = static_cast(pDialogFactory->requestDialog(AP_DIALOG_ID_INSERT_DATETIME)); + UT_ASSERT(pDialog); + if (!pDialog) + return false; + + pDialog->runModal(pFrame); + + if (pDialog->getAnswer() == AP_Dialog_Insert_DateTime::a_OK) + { + time_t tim = time(NULL); + struct tm *pTime = localtime(&tim); + UT_UCSChar *CurrentDateTime = NULL; + char szCurrentDateTime[CURRENT_DATE_TIME_SIZE]; + + strftime(szCurrentDateTime,CURRENT_DATE_TIME_SIZE,pDialog->GetDateTimeFormat(),pTime); + UT_UCS4_cloneString_char(&CurrentDateTime,szCurrentDateTime); + pView->cmdCharInsert(CurrentDateTime,UT_UCS4_strlen(CurrentDateTime), true); + FREEP(CurrentDateTime); + } + + pDialogFactory->releaseDialog(pDialog); + + return true; +} + +Defun1(insDateTime) +{ + CHECK_FRAME; + ABIWORD_VIEW; + return s_doInsertDateTime(pView); +} + +/*****************************************************************/ +/*****************************************************************/ + +Defun1(insBreak) +{ + CHECK_FRAME; + ABIWORD_VIEW; + if(pView->isInTable()) + { + XAP_Frame * pFrame = static_cast (pAV_View->getParentData()); + pFrame->showMessageBox(AP_STRING_ID_MSG_NoBreakInsideTable, + XAP_Dialog_MessageBox::b_O, + XAP_Dialog_MessageBox::a_OK); + return true; + } + return s_doBreakDlg(pView); +} + +static bool s_doInsertPageNumbers(FV_View * pView) +{ + const XML_Char * right_attributes [] = { + "text-align", "right", NULL, NULL + }; + + const XML_Char * left_attributes [] = { + "text-align", "left", NULL, NULL + }; + + const XML_Char * center_attributes [] = { + "text-align", "center", NULL, NULL + }; + + const XML_Char ** atts = NULL; + + XAP_Frame * pFrame = static_cast ( pView->getParentData()); + UT_ASSERT(pFrame); + + pFrame->raise(); + + XAP_DialogFactory * pDialogFactory + = static_cast(pFrame->getDialogFactory()); + + AP_Dialog_PageNumbers * pDialog + = static_cast(pDialogFactory->requestDialog(AP_DIALOG_ID_PAGE_NUMBERS)); + UT_ASSERT(pDialog); + if (!pDialog) + return false; + + pDialog->runModal(pFrame); + + if (pDialog->getAnswer() != AP_Dialog_PageNumbers::a_OK) + { + pDialogFactory->releaseDialog(pDialog); + return true; + } + switch (pDialog->getAlignment()) + { + case AP_Dialog_PageNumbers::id_RALIGN : atts = right_attributes; break; + case AP_Dialog_PageNumbers::id_LALIGN : atts = left_attributes; break; + case AP_Dialog_PageNumbers::id_CALIGN : atts = center_attributes; break; + default: UT_ASSERT(UT_SHOULD_NOT_HAPPEN); break; + } + pView->processPageNumber(pDialog->isFooter() ? + FL_HDRFTR_FOOTER : FL_HDRFTR_HEADER, + atts); + pDialogFactory->releaseDialog(pDialog); + return true; +} + +Defun1(insPageNo) +{ + CHECK_FRAME; + ABIWORD_VIEW; + return s_doInsertPageNumbers(pView); +} + +static bool s_doField(FV_View * pView) +{ + XAP_Frame * pFrame = static_cast ( pView->getParentData()); + UT_ASSERT(pFrame); + + pFrame->raise(); + + XAP_DialogFactory * pDialogFactory + = static_cast(pFrame->getDialogFactory()); + + AP_Dialog_Field * pDialog + = static_cast(pDialogFactory->requestDialog(AP_DIALOG_ID_FIELD)); + UT_ASSERT(pDialog); + if (!pDialog) + return false; + + pDialog->runModal(pFrame); + + if (pDialog->getAnswer() == AP_Dialog_Field::a_OK) + { + const XML_Char * pParam = pDialog->getParameter(); + const XML_Char * pAttr[3]; + const XML_Char param_name[] = "param"; + pAttr[0] = static_cast(¶m_name[0]); + pAttr[1] = pParam; + pAttr[2] = 0; + + if(pParam) + pView->cmdInsertField(pDialog->GetFieldFormat(),static_cast(&pAttr[0])); + else + pView->cmdInsertField(pDialog->GetFieldFormat()); + } + + pDialogFactory->releaseDialog(pDialog); + + return true; +} + +Defun1(insField) +{ + CHECK_FRAME; + ABIWORD_VIEW; + return s_doField(pView); +} + +Defun1(insMailMerge) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + XAP_Frame * pFrame = static_cast ( pView->getParentData()); + UT_ASSERT(pFrame); + + pFrame->raise(); + + XAP_DialogFactory * pDialogFactory + = static_cast(pFrame->getDialogFactory()); + + AP_Dialog_MailMerge * pDialog + = static_cast(pDialogFactory->requestDialog(AP_DIALOG_ID_MAILMERGE)); + UT_ASSERT(pDialog); + if (!pDialog) + return false; + + if(pDialog->isRunning()) + { + pDialog->activate(); + } + else + { + pDialog->runModeless(pFrame); + } + bool bOK = true; + return bOK; +} + +Defun1(insFile) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + XAP_Frame * pFrame = static_cast(pAV_View->getParentData()); + UT_ASSERT(pFrame); + XAP_App * pApp = pFrame->getApp(); + + IEFileType fType = IEFT_Unknown; + char *pathName = NULL; + + // we'll share the same graphics context, which won't matter because + // we only use it to get font metrics and stuff and not actually draw + GR_Graphics *pGraphics = pView->getGraphics(); + + if (s_AskForPathname (pFrame, false, XAP_DIALOG_ID_INSERT_FILE, + NULL, &pathName, &fType)) + { + UT_DEBUGMSG(("DOM: insertFile %s\n", pathName)); + + PD_Document * newDoc = new PD_Document(pApp); + UT_Error err = newDoc->readFromFile(pathName, IEFT_Unknown); + + if ( err != UT_OK ) + { + UNREFP(newDoc); + s_TellOpenFailed(pFrame, pathName, err); + return false; + } + + // create a new layout and view object for the doc + FL_DocLayout *pDocLayout = new FL_DocLayout(newDoc,pGraphics); + FV_View copyView(pApp,0,pDocLayout); + + pDocLayout->setView (©View); + pDocLayout->fillLayouts(); + + copyView.cmdSelect(0, 0, FV_DOCPOS_BOD, FV_DOCPOS_EOD); // select all the contents of the new doc + copyView.cmdCopy(); // copy the contents of the new document + pView->cmdPaste ( true ); // paste the contents into the existing document honoring the formatting + + DELETEP(pDocLayout); + UNREFP(newDoc); + return true; + } + + return false; +} + +Defun1(insSymbol) +{ + CHECK_FRAME; + + ABIWORD_VIEW; + XAP_Dialog_Id id = XAP_DIALOG_ID_INSERT_SYMBOL; + + return s_InsertSymbolDlg(pView,id); +} + +Defun1(insFootnote) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + return pView->insertFootnote(true); +} + + +Defun1(insEndnote) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + return pView->insertFootnote(false); + return true; +} + + +/*****************************************************************/ +/*****************************************************************/ + +Defun1(dlgParagraph) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + if (pView->getDocument()->areStylesLocked()) + return true; + + return s_doParagraphDlg(pView); +} + +static bool s_doBullets(FV_View *pView) +{ + XAP_Frame * pFrame = static_cast ( pView->getParentData()); + UT_ASSERT(pFrame); + + pFrame->raise(); + + XAP_DialogFactory * pDialogFactory + = static_cast(pFrame->getDialogFactory()); + AP_Dialog_Lists * pDialog + = static_cast(pDialogFactory->requestDialog(AP_DIALOG_ID_LISTS)); + UT_ASSERT(pDialog); + if (!pDialog) + return false; + + if(pDialog->isRunning() == true) + { + pDialog->activate(); + } + else + { + pDialog->runModeless(pFrame); + } + return true; +} + + +Defun1(dlgBullets) +{ + CHECK_FRAME; +// + // Dialog for Bullets and Lists + // +#if defined(__QNXTO__) || defined(__BEOS__) || defined(TARGET_OS_MAC) + XAP_Frame * pFrame = static_cast ( pAV_View->getParentData()); + UT_ASSERT(pFrame); + + s_TellNotImplemented(pFrame, "Lists dialog", __LINE__); + return true; +#else // enable for GTK+ & Gnome builds only + ABIWORD_VIEW; + return s_doBullets(pView); +#endif +} + +Defun1(dlgBorders) +{ + CHECK_FRAME; + XAP_Frame * pFrame = static_cast ( pAV_View->getParentData()); + UT_ASSERT(pFrame); + + s_TellNotImplemented(pFrame, "Border and shading dialog", __LINE__); + return true; +} + +Defun(dlgFmtImage) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + XAP_Frame * pFrame = static_cast(pView->getParentData()); + UT_ASSERT(pFrame); + + pFrame->raise(); + + XAP_DialogFactory * pDialogFactory + = static_cast(pFrame->getDialogFactory()); + + XAP_Dialog_Image * pDialog + = static_cast(pDialogFactory->requestDialog(XAP_DIALOG_ID_IMAGE)); + UT_ASSERT(pDialog); + if (!pDialog) + return false; + + double width = 0., height = 0.; + double max_width = 0., max_height = 0.; + UT_sint32 x1,x2,y1,y2,iHeight,iWidth; + bool bEOL = false; + bool bDir = false; + + // set units in the dialog. + const char * pszRulerUnits = NULL; + UT_Dimension dim = DIM_IN; + if (XAP_App::getApp()->getPrefsValue(AP_PREF_KEY_RulerUnits, &pszRulerUnits)) + { + dim = UT_determineDimension(const_cast(pszRulerUnits)); + } + pDialog->setPreferedUnits(dim); + + const fp_PageSize & page = pView->getPageSize (); + + // an approximate... TODO: make me more accurate + max_width = page.Width (DIM_IN) * 72.0; + max_height = page.Height (DIM_IN) * 72.0; + + pDialog->setMaxWidth (max_width); + pDialog->setMaxHeight (max_height); + UT_DEBUGMSG(("formatting image: %d\n", pCallData->m_xPos)); + PT_DocPosition pos = pView->getDocPositionFromLastXY(); + + fl_BlockLayout * pBlock = pView->getBlockAtPosition(pos); + fp_Run * pRun = NULL; + if(pBlock) + { + pRun = pBlock->findPointCoords(pos,bEOL,x1,y1,x2,y2,iHeight,bDir); + while(pRun && pRun->getType() != FPRUN_IMAGE) + { + pRun = pRun->getNext(); + } + if(pRun && pRun->getType() == FPRUN_IMAGE) + { + UT_DEBUGMSG(("SEVIOR: Image run on pos \n")); + } + else + { + UT_ASSERT(UT_SHOULD_NOT_HAPPEN); + return false; + } + } + pView->cmdSelect(pos,pos+1); + const XML_Char ** props_in = NULL; + if (pView->getCharFormat(&props_in)) + { + // stuff properties into the dialog. + + const XML_Char* szWidth = UT_getAttribute("width", props_in); + const XML_Char* szHeight = UT_getAttribute("height", props_in); + + // 72.0 is pixels/inch + bool bDoWidth = false; + if(szWidth) + { + double dum = UT_convertToInches(szWidth); + if(dum > 0.0001) + { + bDoWidth = true; + } + } + bool bDoHeight = false; + if(szHeight) + { + double dum = UT_convertToInches(szHeight); + if(dum > 0.0001) + { + bDoHeight = true; + } + } + + if(bDoWidth) + { + double dum = UT_convertToInches(szWidth); + pDialog->setWidth( UT_convertInchesToDimensionString(dim,dum)); + } + else + { + iWidth = 0; + UT_ASSERT(pRun); + if(pRun && pRun->getType() == FPRUN_IMAGE) + { + iWidth = pRun->getWidth(); + } + else + { + UT_ASSERT(UT_SHOULD_NOT_HAPPEN); + FREEP(props_in); + return false; + } + pDialog->setWidth(iWidth); + } + if(bDoHeight) + { + double dum = UT_convertToInches(szHeight); + pDialog->setHeight( UT_convertInchesToDimensionString(dim,dum)); + } + else + { + iHeight = 0; + UT_ASSERT(pRun); + if(pRun && pRun->getType() == FPRUN_IMAGE) + { + iHeight = pRun->getHeight(); + } + else + { + UT_ASSERT(UT_SHOULD_NOT_HAPPEN); + FREEP(props_in); + return false; + } + pDialog->setHeight(iHeight); + } + FREEP(props_in); + + pDialog->runModal(pFrame); + + XAP_Dialog_Image::tAnswer ans = pDialog->getAnswer(); + bool bOK = (ans == XAP_Dialog_Image::a_OK); + + if (bOK) + { + // now get them back in inches + width = pDialog->getWidth () / 72.0; + height = pDialog->getHeight () / 72.0; + char widthBuf[32]; + char heightBuf[32]; + + // TODO: set format + const XML_Char * properties[] = {"width", NULL, "height", NULL, 0}; + char * old_locale = setlocale(LC_NUMERIC, "C"); + sprintf(widthBuf, "%fin", width); + sprintf(heightBuf, "%fin", height); + setlocale(LC_NUMERIC, old_locale); + + UT_DEBUGMSG(("DOM: nw:%s nh:%s\n", widthBuf, heightBuf)); + + properties[1] = widthBuf; + properties[3] = heightBuf; + pView->setCharFormat(properties); + pView->updateScreen(); + } + + pDialogFactory->releaseDialog(pDialog); + return true; + } + else + { + return false; + } +} + +Defun(dlgColumns) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + XAP_Frame * pFrame = static_cast(pView->getParentData()); + UT_ASSERT(pFrame); + + pFrame->raise(); + + XAP_DialogFactory * pDialogFactory + = static_cast(pFrame->getDialogFactory()); + + AP_Dialog_Columns * pDialog + = static_cast(pDialogFactory->requestDialog(AP_DIALOG_ID_COLUMNS)); + UT_ASSERT(pDialog); + if (!pDialog) + return false; + + UT_uint32 iColumns = 1; + bool bLineBetween = false; + bool bSpaceAfter = false; + bool bMaxHeight = false; + + const XML_Char ** props_in = NULL; + const XML_Char * sz = NULL; + + bool bResult = pView->getSectionFormat(&props_in); + + if (!bResult) + { + UT_ASSERT(UT_SHOULD_NOT_HAPPEN); + } + + // NB: maybe *no* properties are consistent across the selection + if (props_in && props_in[0]) + sz = UT_getAttribute("columns", props_in); + + if (sz) + { + iColumns = atoi(sz); + } + + if ( iColumns > 1 ) + { + EX(viewPrintLayout); + } + + if (props_in && props_in[0]) + sz = UT_getAttribute("column-line", props_in); + + if (sz) + { + if(strcmp(sz, "on") == 0) + { + bLineBetween = true; + } + } + + UT_uint32 iOrder = 0; + if (props_in && props_in[0]) + sz = UT_getAttribute("dom-dir", props_in); + if (sz) + iOrder = strcmp(sz, "ltr") ? 1 : 0; + + pDialog->setColumnOrder(iOrder); + + if(props_in && props_in[0]) + { + sz = UT_getAttribute("section-space-after",props_in); + if(sz && *sz) + { + bSpaceAfter = true; + } + sz = UT_getAttribute("section-max-column-height",props_in); + if(sz && *sz) + { + bMaxHeight = true; + } + } + pDialog->setColumns(iColumns); + pDialog->setLineBetween(bLineBetween); + pDialog->runModal(pFrame); + + AP_Dialog_Columns::tAnswer ans = pDialog->getAnswer(); + bool bOK = (ans == AP_Dialog_Columns::a_OK); + + if (bOK) + { + // Set the columns property. + + char buf[4]; + sprintf(buf, "%i", pDialog->getColumns()); + char buf2[4]; + if(pDialog->getLineBetween()) + { + strcpy(buf2, "on"); + } + else + { + strcpy(buf2, "off"); + } + bMaxHeight = bMaxHeight || pDialog->isMaxHeightChanged(); + bSpaceAfter = bSpaceAfter || pDialog->isSpaceAfterChanged(); + + char buf3[4]; + char buf4[6]; + if(pDialog->getColumnOrder()) + { + strcpy(buf3, "rtl"); + strcpy(buf4, "right"); + } + else + { + strcpy(buf3, "ltr"); + strcpy(buf4, "left"); + } +#ifndef __MRC__ /* column-order */ + const XML_Char * properties[] = { "columns", buf, "column-line", buf2, "dom-dir", buf3, "text-align", buf4, 0}; +#else + const XML_Char * properties[] = { "columns", NULL, "column-line", NULL, "dom-dir", NULL, "text-align", NULL, 0}; + properties [1] = buf; + properties [3] = buf2; + properties [5] = buf3; + properties [7] = buf4; +#endif + + UT_sint32 num_in_props = sizeof(properties)/sizeof(XML_Char *); + UT_sint32 num_out_props = num_in_props; + if(bMaxHeight) + { + num_out_props += 2; + } + if(bSpaceAfter) + { + num_out_props += 2; + } + const XML_Char ** props = static_cast(UT_calloc(num_out_props,sizeof(XML_Char *))); + UT_sint32 i = 0; + for(i = 0; i < num_in_props-1; i++) + { + props[i] = properties[i]; + } + if(bSpaceAfter) + { + props[i++] = "section-space-after"; + props[i++] = pDialog->getSpaceAfterString(); + } + if(bMaxHeight) + { + props[i++] = "section-max-column-height"; + props[i++] = pDialog->getHeightString(); + } + props[i] = NULL; + pView->setSectionFormat(props); + FREEP(props); + } + + FREEP(props_in); + pDialogFactory->releaseDialog(pDialog); + + return bOK; +} + +Defun(style) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + UT_UTF8String utf8(pCallData->m_pData, pCallData->m_dataLength); + const XML_Char * style = reinterpret_cast(utf8.utf8_str()); + pView->setStyle(style); + + return true; +} + +static bool s_doStylesDlg(FV_View * pView) +{ + XAP_Frame * pFrame = static_cast(pView->getParentData()); + UT_ASSERT(pFrame); + + pFrame->raise(); + + XAP_DialogFactory * pDialogFactory + = static_cast(pFrame->getDialogFactory()); + + AP_Dialog_Styles * pDialog + = static_cast(pDialogFactory->requestDialog(AP_DIALOG_ID_STYLES)); + UT_ASSERT(pDialog); + if (!pDialog) + return false; + if(pView->isHdrFtrEdit()) + { + pView->clearHdrFtrEdit(); + pView->warpInsPtToXY(0,0,false); + } + + pDialog->runModal(pFrame); + +// AP_Dialog_Styles::tAnswer ans = pDialog->getAnswer(); + bool bOK = true; +// +// update the combo box with the new styles. +// + XAP_App * pApp = pFrame->getApp(); + UT_ASSERT(pApp); + // + // Get all clones of this frame and set styles combo box + // + UT_Vector vClones; + if(pFrame->getViewNumber() > 0) + { + pApp->getClones(&vClones,pFrame); + for (UT_uint32 i = 0; i < vClones.getItemCount(); i++) + { + XAP_Frame * f = static_cast(vClones.getNthItem(i)); + f->repopulateCombos(); + } + } + else + { + pFrame->repopulateCombos(); + } +// +// Now update all views on the document. Do this always to be safe. +// + { + PD_Document * pDoc = pView->getLayout()->getDocument(); + pDoc->signalListeners(PD_SIGNAL_UPDATE_LAYOUT); + } + + pDialogFactory->releaseDialog(pDialog); + return bOK; +} + +static bool s_doStylesModifyDlg(FV_View * pView, SytleModType type) +{ + XAP_Frame * pFrame = static_cast(pView->getParentData()); + UT_ASSERT(pFrame); + + pFrame->raise(); + + XAP_DialogFactory * pDialogFactory + = static_cast(pFrame->getDialogFactory()); + + AP_Dialog_Styles * pDialog + = static_cast(pDialogFactory->requestDialog(AP_DIALOG_ID_STYLES)); + UT_ASSERT(pDialog); + if (!pDialog) + return false; + if(pView->isHdrFtrEdit()) + { + pView->clearHdrFtrEdit(); + pView->warpInsPtToXY(0,0,false); + } + + pDialog->SetModifyType(type); + pDialog->runModal(pFrame); + +// AP_Dialog_Styles::tAnswer ans = pDialog->getAnswer(); + bool bOK = true; +// +// update the combo box with the new styles. +// + XAP_App * pApp = pFrame->getApp(); + UT_ASSERT(pApp); + // + // Get all clones of this frame and set styles combo box + // + UT_Vector vClones; + if(pFrame->getViewNumber() > 0) + { + pApp->getClones(&vClones,pFrame); + for (UT_uint32 i = 0; i < vClones.getItemCount(); i++) + { + XAP_Frame * f = static_cast(vClones.getNthItem(i)); + f->repopulateCombos(); + } + } + else + { + pFrame->repopulateCombos(); + } +// +// Now update all views on the document. Do this always to be safe. +// + { + PD_Document * pDoc = pView->getLayout()->getDocument(); + pDoc->signalListeners(PD_SIGNAL_UPDATE_LAYOUT); + } + + pDialogFactory->releaseDialog(pDialog); + return bOK; +} + +Defun1(formatFootnotes) +{ + CHECK_FRAME; + XAP_Frame * pFrame = static_cast ( pAV_View->getParentData()); + UT_ASSERT(pFrame); + pFrame->raise(); + + XAP_DialogFactory * pDialogFactory + = static_cast(pFrame->getDialogFactory()); + + AP_Dialog_FormatFootnotes * pDialog + = static_cast(pDialogFactory->requestDialog(AP_DIALOG_ID_FORMAT_FOOTNOTES)); + UT_ASSERT(pDialog); + if (!pDialog) + return false; + pDialog->runModal(pFrame); +#if 0 + AP_Dialog_FormatFootnotes::tAnswer ans = pDialog->getAnswer(); + if(ans == b_OK) + { +// +// update all the layouts. +// + XAP_App * pApp = pFrame->getApp(); + UT_ASSERT(pApp); + // + // Get all clones of this frame and reset the layouts + // + UT_Vector vClones; + if(pFrame->getViewNumber() > 0) + { + pApp->getClones(&vClones,pFrame); + for (UT_uint32 i = 0; i < vClones.getItemCount(); i++) + { + XAP_Frame * f = static_cast(vClones.getNthItem(i)); + FV_View * pV = f->getCurrentView(); + pV->getLayout()->updatePropsNoRebuild(); + } + } + else + { + FV_View * pV = pFrame->getCurrentView(); + pV->getLayout()->updatePropsNoRebuild(); + pFrame->repopulateCombos(); + } + } +#endif + return true; +} + +Defun1(dlgStyle) +{ + CHECK_FRAME; + XAP_Frame * pFrame = static_cast ( pAV_View->getParentData()); + UT_ASSERT(pFrame); + ABIWORD_VIEW; + + return s_doStylesDlg(pView); +} + +Defun1(dlgStyleParagraph) +{ + CHECK_FRAME; + XAP_Frame * pFrame = static_cast ( pAV_View->getParentData()); + UT_ASSERT(pFrame); + ABIWORD_VIEW; + + return s_doStylesModifyDlg(pView, SMD_PARAGRAPH); +} + +Defun1(dlgStyleFont) +{ + CHECK_FRAME; + XAP_Frame * pFrame = static_cast ( pAV_View->getParentData()); + UT_ASSERT(pFrame); + ABIWORD_VIEW; + + return s_doStylesModifyDlg(pView, SMD_FONT); +} + +Defun1(dlgStyleTabs) +{ + CHECK_FRAME; + XAP_Frame * pFrame = static_cast ( pAV_View->getParentData()); + UT_ASSERT(pFrame); + ABIWORD_VIEW; + + return s_doStylesModifyDlg(pView, SMD_TABS); +} + +Defun1(dlgStyleNumbering) +{ + CHECK_FRAME; + XAP_Frame * pFrame = static_cast ( pAV_View->getParentData()); + UT_ASSERT(pFrame); + ABIWORD_VIEW; + + return s_doStylesModifyDlg(pView, SMD_NUMBERING); +} + +Defun1(dlgStyleLanguage) +{ + CHECK_FRAME; + XAP_Frame * pFrame = static_cast ( pAV_View->getParentData()); + UT_ASSERT(pFrame); + ABIWORD_VIEW; + + return s_doStylesModifyDlg(pView, SMD_LANGUAGE); +} + +Defun1(dlgTabs) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + return s_doTabDlg(pView); +} + +Defun0(noop) +{ + CHECK_FRAME; +// this is a no-op, so unbound menus don't assert at trade shows + return true; +} + +static bool s_doWordCountDlg(FV_View * pView) +{ + XAP_Frame * pFrame = static_cast ( pView->getParentData()); + UT_ASSERT(pFrame); + + pFrame->raise(); + + XAP_DialogFactory * pDialogFactory + = static_cast(pFrame->getDialogFactory()); + + AP_Dialog_WordCount * pDialog + = static_cast(pDialogFactory->requestDialog(AP_DIALOG_ID_WORDCOUNT)); + UT_ASSERT(pDialog); + if (!pDialog) + return false; + + if(pDialog->isRunning()) + { + pDialog->activate(); + } + else + { + pDialog->setCount(pView->countWords()); + pDialog->runModeless(pFrame); + } + bool bOK = true; + return bOK; +} + + +Defun1(dlgWordCount) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + return s_doWordCountDlg(pView); +} + +/****************************************************************/ +/****************************************************************/ + +static bool s_doInsertTableDlg(FV_View * pView) +{ + XAP_Frame * pFrame = static_cast ( pView->getParentData()); + UT_ASSERT(pFrame); + + pFrame->raise(); + + XAP_DialogFactory * pDialogFactory + = static_cast(pFrame->getDialogFactory()); + + AP_Dialog_InsertTable * pDialog + = static_cast(pDialogFactory->requestDialog(AP_DIALOG_ID_INSERT_TABLE)); + UT_ASSERT(pDialog); + if (!pDialog) + return false; + + pDialog->runModal(pFrame); + + AP_Dialog_InsertTable::tAnswer ans = pDialog->getAnswer(); + bool bOK = (ans == AP_Dialog_InsertTable::a_OK); +// +// Should be able to put a table in Headers/footers eventually +// +// if(pView->isHdrFtrEdit()) +// return false; +// + if (bOK) + { + if (pDialog->getColumnType() == AP_Dialog_InsertTable::b_FIXEDSIZE) + { + UT_String tmp; + UT_String propBuffer; + for (UT_uint32 i = 0; igetNumCols(); i++) + { + UT_String_sprintf(tmp, "%fin/", pDialog->getColumnWidth()); + propBuffer += tmp; + } + const XML_Char * propsArray[3]; + propsArray[0] = "table-column-props"; + propsArray[1] = propBuffer.c_str(); + propsArray[2] = NULL; + pView->cmdInsertTable(pDialog->getNumRows(),pDialog->getNumCols(),propsArray); + } else + { + pView->cmdInsertTable(pDialog->getNumRows(),pDialog->getNumCols(),NULL); + } + } + + pDialogFactory->releaseDialog(pDialog); + + return bOK; +} + +Defun1(insertTable) +{ + CHECK_FRAME; + ABIWORD_VIEW; + return s_doInsertTableDlg(pView); +} + + +/****************************************************************/ +/****************************************************************/ +Defun1(toggleHidden) +{ + CHECK_FRAME; + ABIWORD_VIEW; + return _toggleSpan(pView, "display", "none", ""); +} + +Defun1(toggleBold) +{ + CHECK_FRAME; + ABIWORD_VIEW; + return _toggleSpan(pView, "font-weight", "bold", "normal"); +} + +Defun1(toggleItalic) +{ + CHECK_FRAME; + ABIWORD_VIEW; + return _toggleSpan(pView, "font-style", "italic", "normal"); +} + +Defun1(toggleUline) +{ + CHECK_FRAME; + ABIWORD_VIEW; + return _toggleSpan(pView, "text-decoration", "underline", "none", true); +} +Defun1(toggleOline) +{ + CHECK_FRAME; + ABIWORD_VIEW; + return _toggleSpan(pView, "text-decoration", "overline", "none", true); +} + +Defun1(toggleStrike) +{ + CHECK_FRAME; + ABIWORD_VIEW; + return _toggleSpan(pView, "text-decoration", "line-through", "none", true); +} + + +Defun1(toggleTopline) +{ + CHECK_FRAME; + ABIWORD_VIEW; + return _toggleSpan(pView, "text-decoration", "topline", "none", true); +} + + +Defun1(toggleBottomline) +{ + CHECK_FRAME; + ABIWORD_VIEW; + return _toggleSpan(pView, "text-decoration", "bottomline", "none", true); +} + +// non-static so that ap_Toolbar_Functions.cpp can use it +void s_getPageMargins(FV_View * pView, + double &margin_left, + double &margin_right, + double &page_margin_left, + double &page_margin_right) +{ + // get current char properties from pView + const XML_Char * prop = NULL; + const XML_Char ** props_in = NULL; + const XML_Char * sz = NULL; + + { + pView->getBlockFormat(&props_in); + prop = "margin-left"; + sz = UT_getAttribute(prop, props_in); + margin_left = UT_convertToInches(sz); + FREEP(props_in); + } + + { + pView->getBlockFormat(&props_in); + prop = "margin-right"; + sz = UT_getAttribute(prop, props_in); + margin_right = UT_convertToInches(sz); + FREEP(props_in); + } + + { + prop = "page-margin-left"; + pView->getSectionFormat(&props_in); + sz = UT_getAttribute(prop, props_in); + page_margin_left = UT_convertToInches(sz); + FREEP(props_in); + } + + { + prop = "page-margin-right"; + pView->getSectionFormat(&props_in); + sz = UT_getAttribute(prop, props_in); + page_margin_right = UT_convertToInches(sz); + FREEP(props_in); + } +} + +// MSWord defines this to 1/2 an inch, so we do too +#define TOGGLE_INDENT_AMT 0.5 + +Defun1(toggleIndent) +{ + CHECK_FRAME; + ABIWORD_VIEW; + bool doLists = true; + double page_size = pView->getPageSize().Width (DIM_IN); + + double margin_left = 0., margin_right = 0., allowed = 0., + page_margin_left = 0., page_margin_right = 0.; + + s_getPageMargins (pView, margin_left, margin_right, + page_margin_left, page_margin_right); + + allowed = page_size - page_margin_left - page_margin_right; + if (margin_left >= allowed) + return true; + + if(!pView->getCurrentBlock()->isListItem() || !pView->isSelectionEmpty() ) + { + doLists = false; + } + return pView->setBlockIndents(doLists, static_cast(TOGGLE_INDENT_AMT) ,page_size); +} + +Defun1(toggleUnIndent) +{ + CHECK_FRAME; + ABIWORD_VIEW; + bool ret; + double page_size = pView->getPageSize().Width (DIM_IN); + bool doLists = true; + + double margin_left = 0., margin_right = 0., allowed = 0., + page_margin_left = 0., page_margin_right = 0.; + + s_getPageMargins (pView, margin_left, margin_right, + page_margin_left, page_margin_right); + + FriBidiCharType iBlockDir = pView->getCurrentBlock()->getDominantDirection(); + allowed = iBlockDir == FRIBIDI_TYPE_LTR ? margin_left : margin_right; + if ( allowed <= 0. ) + return true ; + + if(!pView->getCurrentBlock()->isListItem() || !pView->isSelectionEmpty() ) + { + doLists = false; + } + ret = pView->setBlockIndents(doLists, (double) -TOGGLE_INDENT_AMT ,page_size); + return ret; +} + +#undef TOGGLE_INDENT_AMT + +Defun1(toggleSuper) +{ + CHECK_FRAME; + ABIWORD_VIEW; + return _toggleSpan(pView, "text-position", "superscript", "normal"); +} + +Defun1(toggleSub) +{ + CHECK_FRAME; + ABIWORD_VIEW; + return _toggleSpan(pView, "text-position", "subscript", "normal"); +} + +Defun1(toggleDirOverrideLTR) +{ + CHECK_FRAME; + ABIWORD_VIEW; + return _toggleSpan(pView, "dir-override", "ltr", ""); +} + +Defun1(toggleDirOverrideRTL) +{ + CHECK_FRAME; + ABIWORD_VIEW; + return _toggleSpan(pView, "dir-override", "rtl", ""); +} + +Defun1(toggleDomDirection) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + const XML_Char * properties[] = { "dom-dir", NULL, "text-align", NULL, 0}; + const XML_Char drtl[] = "rtl"; + const XML_Char dltr[] = "ltr"; + const XML_Char aright[] = "right"; + const XML_Char aleft[] = "left"; + XML_Char cur_alignment[10]; + + fl_BlockLayout * pBl = pView->getCurrentBlock(); + + strcpy(cur_alignment,pBl->getProperty("text-align")); + properties[3] = static_cast(&cur_alignment[0]); + + + if(pBl->getDominantDirection()== FRIBIDI_TYPE_RTL) + { + properties[1] = static_cast(&dltr[0]); + /* + //the last run in the block is the FmtMark, and we need + //to reset its direction + static_cast(static_cast(pBl)->getLastContainer())->getLastRun()->setDirection(FRIBIDI_TYPE_LTR); + */ + } + else + { + properties[1] = static_cast(&drtl[0]); + /* + static_cast(static_cast(pBl)->getLastContainer())->getLastRun()->setDirection(FRIBIDI_TYPE_RTL); + */ + } + + // if the paragraph is was aligned either left or right, then + // toggle the alignment as well; if it was anything else + // i.e., justfied or centered, then leave it + if(!strcmp(properties[3],aleft)) + { + properties[3] = static_cast(&aright[0]); + } + else if(!strcmp(properties[3],aright)) + { + properties[3] = static_cast(&aleft[0]); + + } + + pView->setBlockFormat(properties); + + return true; +} + + +Defun1(doBullets) +{ + CHECK_FRAME; + ABIWORD_VIEW; + pView->processSelectedBlocks(BULLETED_LIST); + return true; +} + +Defun1(doNumbers) +{ + CHECK_FRAME; + ABIWORD_VIEW; + pView->processSelectedBlocks(NUMBERED_LIST); + return true; +} + +Defun(colorForeTB) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + const XML_Char * properties[] = { "color", NULL, 0}; + UT_UTF8String utf8(pCallData->m_pData, pCallData->m_dataLength); + properties[1] = reinterpret_cast(utf8.utf8_str()); + pView->setCharFormat(properties); + + return true; +} + +Defun(colorBackTB) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + const XML_Char * properties[] = { "bgcolor", NULL, 0}; + UT_UTF8String utf8(pCallData->m_pData, pCallData->m_dataLength); + properties[1] = reinterpret_cast(utf8.utf8_str()); + pView->setCharFormat(properties); + + return true; +} + +/*! removes the "props" attribute, i.e., all non-style based formatting + */ +Defun1(togglePlain) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + if (pView->getDocument()->areStylesLocked()) + return true; + + const XML_Char p[] = "props"; + const XML_Char v[] = ""; + const XML_Char * props_out[3] = {p,v,NULL}; + pView->setCharFormat(NULL,props_out); + + return true; +} + +Defun1(alignLeft) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + if (pView->getDocument()->areStylesLocked()) + return true; + + const XML_Char * properties[] = { "text-align", "left", 0}; + pView->setBlockFormat(properties); + return true; +} + +Defun1(alignCenter) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + if (pView->getDocument()->areStylesLocked()) + return true; + + const XML_Char * properties[] = { "text-align", "center", 0}; + pView->setBlockFormat(properties); + return true; +} + +Defun1(alignRight) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + if (pView->getDocument()->areStylesLocked()) + return true; + + const XML_Char * properties[] = { "text-align", "right", 0}; + pView->setBlockFormat(properties); + return true; +} + +Defun1(alignJustify) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + if (pView->getDocument()->areStylesLocked()) + return true; + + const XML_Char * properties[] = { "text-align", "justify", 0}; + pView->setBlockFormat(properties); + return true; +} + +Defun1(setStyleHeading1) +{ + CHECK_FRAME; + ABIWORD_VIEW; + const XML_Char * style = "Heading 1"; + pView->setStyle(style); + return true; +} + + +Defun1(setStyleHeading2) +{ + CHECK_FRAME; + ABIWORD_VIEW; + const XML_Char * style = "Heading 2"; + pView->setStyle(style); + return true; +} + +Defun1(setStyleHeading3) +{ + CHECK_FRAME; + ABIWORD_VIEW; + const XML_Char * style = "Heading 3"; + pView->setStyle(style); + return true; +} + +Defun1(sectColumns1) +{ + CHECK_FRAME; + ABIWORD_VIEW; + if(pView->isHdrFtrEdit()) + return false; + + const XML_Char * properties[] = { "columns", "1", 0}; + pView->setSectionFormat(properties); + return true; +} + +Defun1(sectColumns2) +{ + CHECK_FRAME; + ABIWORD_VIEW; + if(pView->isHdrFtrEdit()) + return false; + + const XML_Char * properties[] = { "columns", "2", 0}; + pView->setSectionFormat(properties); + return true; +} + +Defun(sectColumns3) +{ + CHECK_FRAME; + ABIWORD_VIEW; + if(pView->isHdrFtrEdit()) + return false; + const XML_Char * properties[] = { "columns", "3", 0}; + pView->setSectionFormat(properties); + return true; +} + +Defun1(paraBefore0) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + if (pView->getDocument()->areStylesLocked()) + return true; + + const XML_Char * properties[] = { "margin-top", "0pt", 0}; + pView->setBlockFormat(properties); + return true; +} + +Defun1(paraBefore12) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + if (pView->getDocument()->areStylesLocked()) + return true; + + const XML_Char * properties[] = { "margin-top", "12pt", 0}; + pView->setBlockFormat(properties); + return true; +} + +Defun1(singleSpace) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + if (pView->getDocument()->areStylesLocked()) + return true; + + const XML_Char * properties[] = { "line-height", "1.0", 0}; + pView->setBlockFormat(properties); + return true; +} + +Defun1(middleSpace) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + if (pView->getDocument()->areStylesLocked()) + return true; + + const XML_Char * properties[] = { "line-height", "1.5", 0}; + pView->setBlockFormat(properties); + return true; +} + +Defun1(doubleSpace) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + if (pView->getDocument()->areStylesLocked()) + return true; + + const XML_Char * properties[] = { "line-height", "2.0", 0}; + pView->setBlockFormat(properties); + return true; +} + +#if defined(PT_TEST) || defined(FMT_TEST) || defined(UT_TEST) +Defun1(Test_Dump) +{ +CHECK_FRAME; +// ABIWORD_VIEW; +// pView->Test_Dump(); + return true; +} + +Defun1(Test_Ftr) +{ + CHECK_FRAME; + ABIWORD_VIEW; + pView->insertPageNum(NULL, FL_HDRFTR_FOOTER); + return true; +} +#endif + +Defun1(setEditVI) +{ + CHECK_FRAME; + ABIWORD_VIEW; + // enter "VI Edit Mode" (only valid when VI keys are loaded) + + XAP_Frame * pFrame = static_cast ( pAV_View->getParentData()); + UT_ASSERT(pFrame); + + // When exiting input mode, vi goes to previous character + pView->cmdCharMotion(false,1); + + bool bResult = (pFrame->setInputMode("viEdit") != 0); + return bResult; +} + +Defun1(setInputVI) +{ + CHECK_FRAME; +// enter "VI Input Mode" (only valid when VI keys are loaded) + + XAP_Frame * pFrame = static_cast ( pAV_View->getParentData()); + UT_ASSERT(pFrame); + + bool bResult = (pFrame->setInputMode("viInput") != 0); + return bResult; +} + +Defun1(cycleInputMode) +{ + CHECK_FRAME; +// switch to the next input mode { default, emacs, vi, ... } + + XAP_Frame * pFrame = static_cast ( pAV_View->getParentData()); + UT_ASSERT(pFrame); + XAP_App * pApp = pFrame->getApp(); + UT_ASSERT(pApp); + XAP_Prefs * pPrefs = pApp->getPrefs(); + UT_ASSERT(pPrefs); + + // this edit method may get ignored entirely + bool b; + if (pPrefs->getPrefsValueBool(static_cast(AP_PREF_KEY_KeyBindingsCycle), &b) && !b) + return false; + + const char * szCurrentInputMode = pFrame->getInputMode(); + UT_ASSERT(szCurrentInputMode); + const char * szNextInputMode = AP_BindingSet::s_getNextInCycle(szCurrentInputMode); + if (!szNextInputMode) // probably an error.... + return false; + + bool bResult = (pFrame->setInputMode(szNextInputMode) != 0); + + // POLICY: make this the default for new frames, too + XAP_PrefsScheme * pScheme = pPrefs->getCurrentScheme(true); + UT_ASSERT(pScheme); + + pScheme->setValue(static_cast(AP_PREF_KEY_KeyBindings), + const_cast(szNextInputMode)); + + return bResult; +} + +Defun1(toggleInsertMode) +{ + CHECK_FRAME; + XAP_Frame * pFrame = static_cast ( pAV_View->getParentData()); + UT_ASSERT(pFrame); + XAP_App * pApp = pFrame->getApp(); + UT_ASSERT(pApp); + XAP_Prefs * pPrefs = pApp->getPrefs(); + UT_ASSERT(pPrefs); + + // this edit method may get ignored entirely + bool b; + if (pPrefs->getPrefsValueBool(static_cast(AP_PREF_KEY_InsertModeToggle), &b) && !b) + return false; + + // toggle the insert mode + AP_FrameData *pFrameData = static_cast(pFrame->getFrameData()); + UT_ASSERT(pFrameData); + + pFrameData->m_bInsertMode = ! pFrameData->m_bInsertMode; + + // the view actually does the dirty work + pAV_View->setInsertMode(pFrameData->m_bInsertMode); + + // POLICY: make this the default for new frames, too + XAP_PrefsScheme * pScheme = pPrefs->getCurrentScheme(true); + UT_ASSERT(pScheme); + + pScheme->setValueBool(static_cast(AP_PREF_KEY_InsertMode), pFrameData->m_bInsertMode); + + return true; +} + + +////////////////////////////////////////////////////////////////// +// The following commands are suggested for the various VI keybindings. +// It may be possible to use our exisiting methods for them, but I +// didn't know all of the little (subtle) side-effects that make VI +// special. +////////////////////////////////////////////////////////////////// + +Defun(viCmd_5e) +{ + CHECK_FRAME; + //Move to first non space char on current line + //TODO: BOL seems to count as a BOW, how to move to first non space? + return ( EX(warpInsPtBOL)); +} + +Defun(viCmd_A) +{ + CHECK_FRAME; +// insert after the end of the current line + return ( EX(warpInsPtEOL) && EX(setInputVI) ); +} + +Defun(viCmd_C) +{ + CHECK_FRAME; +// Select to the end of the line for modification + return ( EX(extSelEOL) && EX(setInputVI) ); +} + +Defun(viCmd_I) +{ + CHECK_FRAME; +// insert before the beginning of current line + return ( EX(warpInsPtBOL) && EX(setInputVI) ); +} + +Defun(viCmd_J) +{ + CHECK_FRAME; +// Join current and next line. + return ( EX(warpInsPtEOL) && EX(delRight) && EX(insertSpace) ); +} + +Defun(viCmd_O) +{ + CHECK_FRAME; +// insert new line before current line, go into input mode + return ( EX(warpInsPtBOL) && EX(insertLineBreak) && EX(warpInsPtLeft) \ + && EX(setInputVI) ); +} + +Defun(viCmd_P) +{ + CHECK_FRAME; +// paste text before cursor + return ( EX(warpInsPtLeft) && EX(paste) ); +} + +Defun(viCmd_a) +{ + CHECK_FRAME; +// insert after the current position + return ( EX(warpInsPtRight) && EX(setInputVI) ); +} + +Defun(viCmd_o) +{ + CHECK_FRAME; +// insert new line after current line, go into input mode + return ( EX(warpInsPtEOL) && EX(insertLineBreak) && EX(setInputVI) ); +} + +/* c$ */ +Defun(viCmd_c24) +{ + CHECK_FRAME; +//change to end of current line + return ( EX(delEOL) && EX(setInputVI) ); +} + +/* c( */ +Defun(viCmd_c28) +{ + CHECK_FRAME; +//change to start of current sentence + return ( EX(delBOS) && EX(setInputVI) ); +} + +/* c) */ +Defun(viCmd_c29) +{ + CHECK_FRAME; +//change to end of current sentence + return ( EX(delEOS) && EX(setInputVI) ); +} + +/* c[ */ +Defun(viCmd_c5b) +{ + CHECK_FRAME; +//change to beginning of current block + return ( EX(delBOB) && EX(setInputVI) ); +} + +/* c] */ +Defun(viCmd_c5d) +{ + CHECK_FRAME; +//change to end of current block + return ( EX(delEOB) && EX(setInputVI) ); +} + +/* c^ */ +Defun(viCmd_c5e) +{ + CHECK_FRAME; +//change to beginning of current line + return ( EX(delBOL) && EX(setInputVI) ); +} + +Defun(viCmd_cb) +{ + CHECK_FRAME; +//change to beginning of current word + return ( EX(delBOW) && EX(setInputVI) ); +} + +Defun(viCmd_cw) +{ + CHECK_FRAME; +// delete to the end of current word, start input mode + return ( EX(delEOW) && EX(setInputVI) ); +} + +/* d$ */ +Defun(viCmd_d24) +{ + CHECK_FRAME; +//delete to end of line + return ( EX(delEOL) ); +} + +/* d( */ +Defun(viCmd_d28) +{ + CHECK_FRAME; +//delete to start of sentence + return ( EX(delBOS) ); +} + +/* d) */ +Defun(viCmd_d29) +{ + CHECK_FRAME; +//delete to end of sentence + return ( EX(delEOS) ); +} + +/* d[ */ +Defun(viCmd_d5b) +{ + CHECK_FRAME; +//delete to beginning of block + return ( EX(delBOB) ); +} + +/* d] */ +Defun(viCmd_d5d) +{ + CHECK_FRAME; +//delete to end of block + return ( EX(delEOB) ); +} + +/* d^ */ +Defun(viCmd_d5e) +{ + CHECK_FRAME; +//delete to beginning of line + return ( EX(delBOL) ); +} + +Defun(viCmd_db) +{ + CHECK_FRAME; +//delete to beginning of word + return ( EX(delBOW) ); +} + +Defun(viCmd_dd) +{ + CHECK_FRAME; +// delete the current line + return ( EX(warpInsPtBOL) && EX(delEOL) && EX(delLeft) && EX(warpInsPtBOL) ); +} + +Defun(viCmd_dw) +{ + CHECK_FRAME; +//delete to end of word + return ( EX(delEOW) ); +} + +/* y$ */ +Defun(viCmd_y24) +{ + CHECK_FRAME; +//copy to end of current line + return ( EX(extSelEOL) && EX(copy) ); +} + +/* y( */ +Defun(viCmd_y28) +{ + CHECK_FRAME; +//copy to beginning of current sentence + return ( EX(extSelBOS) && EX(copy) ); +} + +/* y) */ +Defun(viCmd_y29) +{ + CHECK_FRAME; +//copy to end of current sentence + return ( EX(extSelEOS) && EX(copy) ); +} + +/* y[ */ +Defun(viCmd_y5b) +{ + CHECK_FRAME; +//copy to beginning of current block + return ( EX(extSelBOB) && EX(copy) ); +} + +/* y] */ +Defun(viCmd_y5d) +{ + CHECK_FRAME; +//copy to end of current block + return ( EX(extSelEOB) && EX(copy) ); +} + +/* y^ */ +Defun(viCmd_y5e) +{ + CHECK_FRAME; +//copy to beginning of current line + return ( EX(extSelBOL) && EX(copy) ); +} + +Defun(viCmd_yb) +{ + CHECK_FRAME; +//copy to beginning of current word + return ( EX(extSelBOW) && EX(copy) ); +} + +Defun(viCmd_yw) +{ + CHECK_FRAME; +//copy to end of current word + return ( EX(extSelEOW) && EX(copy) ); +} + +Defun(viCmd_yy) +{ + CHECK_FRAME; +//copy current line + return ( EX(warpInsPtBOL) && EX(extSelEOL) && EX(copy) ); +} + +static bool _insAutotext (FV_View *pView, int id) +{ + const XAP_StringSet * pSS = XAP_App::getApp()->getStringSet(); + if (!pSS) + return false; + + UT_UCS4String ucs4 (pSS->getValueUTF8(id).ucs4_str()); + pView->cmdCharInsert(ucs4.ucs4_str(), ucs4.size()); + + return true; +} + +Defun(insAutotext_attn_1) +{ + CHECK_FRAME; + return _insAutotext(static_cast(pAV_View), + AP_STRING_ID_AUTOTEXT_ATTN_1); +} + +Defun(insAutotext_attn_2) +{ + CHECK_FRAME; + return _insAutotext(static_cast(pAV_View), + AP_STRING_ID_AUTOTEXT_ATTN_2); +} + +Defun(insAutotext_closing_1) +{ + CHECK_FRAME; + return _insAutotext(static_cast(pAV_View), + AP_STRING_ID_AUTOTEXT_CLOSING_1); +} + +Defun(insAutotext_closing_2) +{ + CHECK_FRAME; + return _insAutotext(static_cast(pAV_View), + AP_STRING_ID_AUTOTEXT_CLOSING_2); +} + +Defun(insAutotext_closing_3) +{ + CHECK_FRAME; + return _insAutotext(static_cast(pAV_View), + AP_STRING_ID_AUTOTEXT_CLOSING_3); +} + +Defun(insAutotext_closing_4) +{ + CHECK_FRAME; + return _insAutotext(static_cast(pAV_View), + AP_STRING_ID_AUTOTEXT_CLOSING_4); +} + +Defun(insAutotext_closing_5) +{ + CHECK_FRAME; + return _insAutotext(static_cast(pAV_View), + AP_STRING_ID_AUTOTEXT_CLOSING_5); +} + +Defun(insAutotext_closing_6) +{ + CHECK_FRAME; + return _insAutotext(static_cast(pAV_View), + AP_STRING_ID_AUTOTEXT_CLOSING_6); +} + +Defun(insAutotext_closing_7) +{ + CHECK_FRAME; + return _insAutotext(static_cast(pAV_View), + AP_STRING_ID_AUTOTEXT_CLOSING_7); +} + +Defun(insAutotext_closing_8) +{ + CHECK_FRAME; + return _insAutotext(static_cast(pAV_View), + AP_STRING_ID_AUTOTEXT_CLOSING_8); +} + +Defun(insAutotext_closing_9) +{ + CHECK_FRAME; + return _insAutotext(static_cast(pAV_View), + AP_STRING_ID_AUTOTEXT_CLOSING_9); +} + +Defun(insAutotext_closing_10) +{ + CHECK_FRAME; + return _insAutotext(static_cast(pAV_View), + AP_STRING_ID_AUTOTEXT_CLOSING_10); +} + +Defun(insAutotext_closing_11) +{ + CHECK_FRAME; + return _insAutotext(static_cast(pAV_View), + AP_STRING_ID_AUTOTEXT_CLOSING_11); +} + +Defun(insAutotext_closing_12) +{ + CHECK_FRAME; + return _insAutotext(static_cast(pAV_View), + AP_STRING_ID_AUTOTEXT_CLOSING_12); +} + +Defun(insAutotext_email_1) +{ + CHECK_FRAME; + return _insAutotext(static_cast(pAV_View), + AP_STRING_ID_AUTOTEXT_EMAIL_1); +} + +Defun(insAutotext_email_2) +{ + CHECK_FRAME; + return _insAutotext(static_cast(pAV_View), + AP_STRING_ID_AUTOTEXT_EMAIL_2); +} + +Defun(insAutotext_email_3) +{ + CHECK_FRAME; + return _insAutotext(static_cast(pAV_View), + AP_STRING_ID_AUTOTEXT_EMAIL_3); +} + +Defun(insAutotext_email_4) +{ + CHECK_FRAME; + return _insAutotext(static_cast(pAV_View), + AP_STRING_ID_AUTOTEXT_EMAIL_4); +} + +Defun(insAutotext_email_5) +{ + CHECK_FRAME; + return _insAutotext(static_cast(pAV_View), + AP_STRING_ID_AUTOTEXT_EMAIL_5); +} + +Defun(insAutotext_email_6) +{ + CHECK_FRAME; + return _insAutotext(static_cast(pAV_View), + AP_STRING_ID_AUTOTEXT_EMAIL_6); +} + +Defun(insAutotext_mail_1) +{ + CHECK_FRAME; + return _insAutotext(static_cast(pAV_View), + AP_STRING_ID_AUTOTEXT_MAIL_1); +} + + +Defun(insAutotext_mail_2) +{ + CHECK_FRAME; + return _insAutotext(static_cast(pAV_View), + AP_STRING_ID_AUTOTEXT_MAIL_2); +} + +Defun(insAutotext_mail_3) +{ + CHECK_FRAME; + return _insAutotext(static_cast(pAV_View), + AP_STRING_ID_AUTOTEXT_MAIL_3); +} + +Defun(insAutotext_mail_4) +{ + CHECK_FRAME; + return _insAutotext(static_cast(pAV_View), + AP_STRING_ID_AUTOTEXT_MAIL_4); +} + +Defun(insAutotext_mail_5) +{ + CHECK_FRAME; + return _insAutotext(static_cast(pAV_View), + AP_STRING_ID_AUTOTEXT_MAIL_5); +} + +Defun(insAutotext_mail_6) +{ + CHECK_FRAME; + return _insAutotext(static_cast(pAV_View), + AP_STRING_ID_AUTOTEXT_MAIL_6); +} + +Defun(insAutotext_mail_7) +{ + CHECK_FRAME; + return _insAutotext(static_cast(pAV_View), + AP_STRING_ID_AUTOTEXT_MAIL_7); +} + +Defun(insAutotext_mail_8) +{ + CHECK_FRAME; + return _insAutotext(static_cast(pAV_View), + AP_STRING_ID_AUTOTEXT_MAIL_8); +} + +Defun(insAutotext_reference_1) +{ + CHECK_FRAME; + return _insAutotext(static_cast(pAV_View), + AP_STRING_ID_AUTOTEXT_REFERENCE_1); +} + +Defun(insAutotext_reference_2) +{ + CHECK_FRAME; + return _insAutotext(static_cast(pAV_View), + AP_STRING_ID_AUTOTEXT_REFERENCE_2); +} + +Defun(insAutotext_reference_3) +{ + CHECK_FRAME; + return _insAutotext(static_cast(pAV_View), + AP_STRING_ID_AUTOTEXT_REFERENCE_3); +} + +Defun(insAutotext_salutation_1) +{ + CHECK_FRAME; + return _insAutotext(static_cast(pAV_View), + AP_STRING_ID_AUTOTEXT_SALUTATION_1); +} + +Defun(insAutotext_salutation_2) +{ + CHECK_FRAME; + return _insAutotext(static_cast(pAV_View), + AP_STRING_ID_AUTOTEXT_SALUTATION_2); +} + +Defun(insAutotext_salutation_3) +{ + CHECK_FRAME; + return _insAutotext(static_cast(pAV_View), + AP_STRING_ID_AUTOTEXT_SALUTATION_3); +} + +Defun(insAutotext_salutation_4) +{ + CHECK_FRAME; + return _insAutotext(static_cast(pAV_View), + AP_STRING_ID_AUTOTEXT_SALUTATION_4); +} + +Defun(insAutotext_subject_1) +{ + CHECK_FRAME; + return _insAutotext(static_cast(pAV_View), + AP_STRING_ID_AUTOTEXT_SUBJECT_1); +} + +static bool s_AskForScriptName(XAP_Frame * pFrame, + UT_String& stPathname, + UT_ScriptIdType * ieft) +{ + UT_ASSERT(ieft); + + stPathname.clear(); + + pFrame->raise(); + + XAP_Dialog_Id id = XAP_DIALOG_ID_FILE_OPEN; + + XAP_DialogFactory * pDialogFactory + = static_cast(pFrame->getDialogFactory()); + + XAP_Dialog_FileOpenSaveAs * pDialog + = static_cast(pDialogFactory->requestDialog(id)); + UT_ASSERT(pDialog); + if (!pDialog) + return false; + + UT_ScriptLibrary& instance = UT_ScriptLibrary::instance (); + + UT_uint32 filterCount = instance.getNumScripts (); + + const char ** szDescList = static_cast(UT_calloc(filterCount + 1, sizeof(char *))); + const char ** szSuffixList = static_cast(UT_calloc(filterCount + 1, sizeof(char *))); + UT_ScriptIdType * nTypeList = static_cast(UT_calloc(filterCount + 1, sizeof(UT_ScriptIdType))); + UT_uint32 k = 0; + + while (instance.enumerateDlgLabels(k, &szDescList[k], + &szSuffixList[k], &nTypeList[k])) + k++; + + pDialog->setFileTypeList(szDescList, szSuffixList, + static_cast(nTypeList)); + + UT_ScriptIdType dflFileType = -1; + pDialog->setDefaultFileType(dflFileType); + + pDialog->runModal(pFrame); + + XAP_Dialog_FileOpenSaveAs::tAnswer ans = pDialog->getAnswer(); + bool bOK = (ans == XAP_Dialog_FileOpenSaveAs::a_OK); + + if (bOK) + { +#ifdef WIN32 + const char* szResultPathname = pDialog->getPathname(); + + if (szResultPathname && *szResultPathname) + { + stPathname = "\""; + stPathname += szResultPathname; + stPathname += "\""; + } +#else + const char* szResultPathname = pDialog->getPathname(); + + if (szResultPathname && *szResultPathname) + { + stPathname += szResultPathname; + } +#endif + + UT_sint32 type = pDialog->getFileType(); + dflFileType = type; + + // If the number is negative, it's a special type. + // Some operating systems which depend solely on filename + // suffixes to indentify type (like Windows) will always + // want auto-detection. + if (type < 0) + switch (type) + { + case XAP_DIALOG_FILEOPENSAVEAS_FILE_TYPE_AUTO: + // do some automagical detecting + *ieft = -1; + break; + default: + // it returned a type we don't know how to handle + UT_ASSERT(UT_SHOULD_NOT_HAPPEN); + } + else + *ieft = static_cast(pDialog->getFileType()); + } + + FREEP(szDescList); + FREEP(szSuffixList); + FREEP(nTypeList); + + pDialogFactory->releaseDialog(pDialog); + + return bOK; +} + +class OneShot_MailMerge_Listener : public IE_MailMerge::IE_MailMerge_Listener +{ +public: + + explicit OneShot_MailMerge_Listener (PD_Document * pd) + : IE_MailMerge::IE_MailMerge_Listener (), m_doc (pd) + { + + } + + virtual ~OneShot_MailMerge_Listener () + { + } + + virtual PD_Document* getMergeDocument () const + { + return m_doc; + } + + virtual bool fireUpdate () + { + // don't process any more data + return false; + } + +private: + PD_Document *m_doc; +}; + +Defun1(mailMerge) +{ + CHECK_FRAME; + XAP_Frame * pFrame = static_cast (pAV_View->getParentData()); + UT_return_val_if_fail(pFrame, false); + + PD_Document * pDoc = static_cast(pFrame->getCurrentDoc()); + UT_return_val_if_fail(pDoc, false); + + pFrame->raise(); + XAP_Dialog_Id id = XAP_DIALOG_ID_FILE_OPEN; + + XAP_DialogFactory * pDialogFactory + = static_cast(pFrame->getDialogFactory()); + + XAP_Dialog_FileOpenSaveAs * pDialog + = static_cast(pDialogFactory->requestDialog(id)); + UT_ASSERT(pDialog); + if (!pDialog) + return false; + + UT_uint32 filterCount = 0; + + filterCount = IE_MailMerge::getMergerCount(); + + const char ** szDescList = static_cast(UT_calloc(filterCount + 1, sizeof(char *))); + const char ** szSuffixList = static_cast(UT_calloc(filterCount + 1, sizeof(char *))); + IEMergeType * nTypeList = static_cast(UT_calloc(filterCount + 1, sizeof(IEMergeType))); + UT_uint32 k = 0; + + while (IE_MailMerge::enumerateDlgLabels(k, &szDescList[k], &szSuffixList[k], &nTypeList[k])) + k++; + + pDialog->setFileTypeList(szDescList, szSuffixList, static_cast(nTypeList)); + + pDialog->setDefaultFileType(IE_MailMerge::fileTypeForSuffix (".xml")); + + pDialog->runModal(pFrame); + + XAP_Dialog_FileOpenSaveAs::tAnswer ans = pDialog->getAnswer(); + bool bOK = (ans == XAP_Dialog_FileOpenSaveAs::a_OK); + + if (bOK) + { + UT_String filename (pDialog->getPathname()); + UT_sint32 type = pDialog->getFileType(); + + IE_MailMerge * pie = NULL; + UT_Error errorCode = IE_MailMerge::constructMerger(filename.c_str(), static_cast(type), &pie); + if (!errorCode) + { + OneShot_MailMerge_Listener listener (pDoc); + pie->setListener (&listener); + pie->mergeFile (filename.c_str()); + DELETEP(pie); + } + } + + pDialogFactory->releaseDialog(pDialog); + return true; +} + +Defun1(scriptPlay) +{ + CHECK_FRAME; + XAP_Frame * pFrame = static_cast (pAV_View->getParentData()); + UT_ASSERT(pFrame); + + UT_String pNewFile; + + UT_ScriptLibrary &instance = UT_ScriptLibrary::instance (); + + if (0 == instance.getNumScripts()) + { + pFrame->showMessageBox(AP_STRING_ID_SCRIPT_NOSCRIPTS, + XAP_Dialog_MessageBox::b_O, + XAP_Dialog_MessageBox::a_OK); + return true; + } + + UT_ScriptIdType ieft = -1; + + bool bOK = s_AskForScriptName(pFrame, pNewFile, &ieft); + + if (!bOK || pNewFile.empty()) + return false; + + UT_DEBUGMSG(("scriptPlay (trying to play [%s])\n", pNewFile.c_str())); + + if (UT_OK != instance.execute(pNewFile.c_str(), ieft)) + { + if (instance.errmsg().size() > 0) + { + pFrame->showMessageBox(instance.errmsg().c_str(), + XAP_Dialog_MessageBox::b_O, + XAP_Dialog_MessageBox::a_OK); + } + else + pFrame->showMessageBox(AP_STRING_ID_SCRIPT_CANTRUN, + XAP_Dialog_MessageBox::b_O, + XAP_Dialog_MessageBox::a_OK, + pNewFile.c_str()); + } + + return true; +} + +Defun(executeScript) +{ + CHECK_FRAME; + XAP_Frame* pFrame = static_cast (pAV_View->getParentData()); + UT_ASSERT(pFrame); + UT_DEBUGMSG(("executeScript (trying to execute [%s])\n", pCallData->getScriptName().c_str())); + + UT_ScriptLibrary &instance = UT_ScriptLibrary::instance (); + + if (UT_OK != instance.execute(pCallData->getScriptName().c_str())) + { + if (instance.errmsg().size() > 0) + pFrame->showMessageBox(instance.errmsg().c_str(), + XAP_Dialog_MessageBox::b_O, + XAP_Dialog_MessageBox::a_OK); + + else + pFrame->showMessageBox(AP_STRING_ID_SCRIPT_CANTRUN, + XAP_Dialog_MessageBox::b_O, + XAP_Dialog_MessageBox::a_OK, + pCallData->getScriptName().c_str()); + } + + return true; +} + + +Defun(dlgColorPickerFore) +{ + CHECK_FRAME; + FV_View * pView = static_cast(pAV_View); + + XAP_Frame * pFrame = static_cast(pView->getParentData()); + UT_ASSERT(pFrame); + + pFrame->raise(); + + XAP_DialogFactory * pDialogFactory + = static_cast(pFrame->getDialogFactory()); + + AP_Dialog_Background * pDialog + = static_cast(pDialogFactory->requestDialog(AP_DIALOG_ID_BACKGROUND)); + UT_ASSERT(pDialog); + if (!pDialog) + return false; +// +// Set the color in the dialog to the current Color +// + const XML_Char ** propsChar = NULL; + pView->getCharFormat(&propsChar); + const XML_Char * pszChar = UT_getAttribute("color",propsChar); + pDialog->setColor(pszChar); +// +// Set the dialog to Foreground Color Mode. +// + pDialog->setForeground(); + + pDialog->runModal (pFrame); + + AP_Dialog_Background::tAnswer ans = pDialog->getAnswer(); + bool bOK = (ans == AP_Dialog_Background::a_OK); + + if (bOK) + { + const XML_Char * clr = pDialog->getColor(); + const XML_Char * properties[] = { "color", NULL, 0}; + properties[1] = clr; + pView->setCharFormat(properties); + } + pDialogFactory->releaseDialog(pDialog); + FREEP(propsChar); + return bOK; +} + + +Defun(dlgColorPickerBack) +{ + CHECK_FRAME; + FV_View * pView = static_cast(pAV_View); + + XAP_Frame * pFrame = static_cast(pView->getParentData()); + UT_ASSERT(pFrame); + + pFrame->raise(); + + XAP_DialogFactory * pDialogFactory + = static_cast(pFrame->getDialogFactory()); + + AP_Dialog_Background * pDialog + = static_cast(pDialogFactory->requestDialog(AP_DIALOG_ID_BACKGROUND)); + UT_ASSERT(pDialog); + if (!pDialog) + return false; +// +// Set the color in the dialog to the current Color +// + const XML_Char ** propsChar = NULL; + pView->getCharFormat(&propsChar); + const XML_Char * pszChar = UT_getAttribute("bgcolor",propsChar); + pDialog->setColor(pszChar); +// +// Set the dialog to Highlight Color Mode. +// + pDialog->setHighlight(); + + pDialog->runModal (pFrame); + + AP_Dialog_Background::tAnswer ans = pDialog->getAnswer(); + bool bOK = (ans == AP_Dialog_Background::a_OK); + + if (bOK) + { + const XML_Char * clr = pDialog->getColor(); + const XML_Char * properties[] = { "bgcolor", NULL, 0}; + properties[1] = clr; + pView->setCharFormat(properties); + } + FREEP(propsChar); + pDialogFactory->releaseDialog(pDialog); + return bOK; +} + +Defun(dlgBackground) +{ + CHECK_FRAME; + FV_View * pView = static_cast(pAV_View); + + XAP_Frame * pFrame = static_cast(pView->getParentData()); + UT_ASSERT(pFrame); + + pFrame->raise(); + + XAP_DialogFactory * pDialogFactory + = static_cast(pFrame->getDialogFactory()); + + AP_Dialog_Background * pDialog + = static_cast(pDialogFactory->requestDialog(AP_DIALOG_ID_BACKGROUND)); + UT_ASSERT(pDialog); + if (!pDialog) + return false; + +// +// Get Current background color +// + const XML_Char ** propsSection = NULL; + pView->getSectionFormat(&propsSection); + const XML_Char * pszBackground = UT_getAttribute("background-color",propsSection); + pDialog->setColor(pszBackground); + + pDialog->runModal (pFrame); + + AP_Dialog_Background::tAnswer ans = pDialog->getAnswer(); + bool bOK = (ans == AP_Dialog_Background::a_OK); + + if (bOK) + { + // let the view set the proper value in the + // document and refresh/redraw itself + const XML_Char * clr = pDialog->getColor(); + pView->setPaperColor (clr); + } + + FREEP(propsSection); + pDialogFactory->releaseDialog(pDialog); + return bOK; +} + + +Defun(dlgHdrFtr) +{ + CHECK_FRAME; + FV_View * pView = static_cast(pAV_View); + + XAP_Frame * pFrame = static_cast(pView->getParentData()); + UT_ASSERT(pFrame); + + pFrame->raise(); + + XAP_DialogFactory * pDialogFactory + = static_cast(pFrame->getDialogFactory()); + + AP_Dialog_HdrFtr * pDialog = static_cast(pDialogFactory->requestDialog(AP_DIALOG_ID_HDRFTR)); + UT_ASSERT(pDialog); + if (!pDialog) + return false; +// +// Get stuff we need from the view +// + if(pView->isHdrFtrEdit()) + { + pView->clearHdrFtrEdit(); + pView->warpInsPtToXY(0,0,false); + } + fl_DocSectionLayout * pDSL = static_cast(pView->getCurrentBlock()->getSectionLayout()); + + bool bOldHdr = false; + bool bOldHdrEven = false; + bool bOldHdrFirst = false; + bool bOldHdrLast = false; + bool bOldFtr = false; + bool bOldFtrEven = false; + bool bOldFtrFirst = false; + bool bOldFtrLast = false; + bool bOldBools[6]; + UT_sint32 i = 0; + for(i=0; i<6; i++) + { + bOldBools[i] = false; + } + if(NULL != pDSL->getHeader()) + { + bOldHdr = true; + } + if(NULL != pDSL->getHeaderEven()) + { + bOldHdrEven = true; + bOldBools[AP_Dialog_HdrFtr::HdrEven] = true; + } + if(NULL != pDSL->getHeaderFirst()) + { + bOldHdrFirst = true; + bOldBools[AP_Dialog_HdrFtr::HdrFirst] = true; + } + if(NULL != pDSL->getHeaderLast()) + { + bOldHdrLast = true; + bOldBools[AP_Dialog_HdrFtr::HdrLast] = true; + } + if(NULL != pDSL->getFooter()) + { + bOldFtr = true; + } + if(NULL != pDSL->getFooterEven()) + { + bOldFtrEven = true; + bOldBools[AP_Dialog_HdrFtr::FtrEven] = true; + } + if(NULL != pDSL->getFooterFirst()) + { + bOldFtrFirst = true; + bOldBools[AP_Dialog_HdrFtr::FtrFirst] = true; + } + if(NULL != pDSL->getFooterLast()) + { + bOldFtrLast = true; + bOldBools[AP_Dialog_HdrFtr::FtrLast] = true; + } + for(i =0; i < 6; i++) + { + pDialog->setValue((AP_Dialog_HdrFtr::HdrFtr_Control) i, + bOldBools[i], false); + } + const XML_Char ** propsSectionIn = NULL; + pView->getSectionFormat(&propsSectionIn); + const char * szRestart = NULL; + szRestart = UT_getAttribute("section-restart",propsSectionIn); + const char * szRestartValue = NULL; + szRestartValue = UT_getAttribute("section-restart-value",propsSectionIn); + bool bRestart = false; + if(szRestart && *szRestart && (UT_strcmp(szRestart,"1") == 0)) + { + bRestart = true; + } + UT_sint32 restartValue = 1; + if(szRestartValue && *szRestartValue) + { + restartValue = atoi(szRestartValue); + } + pDialog->setRestart(bRestart, restartValue, false); + FREEP(propsSectionIn); + + pDialog->runModal (pFrame); + + AP_Dialog_HdrFtr::tAnswer ans = pDialog->getAnswer(); + bool bOK = (ans == AP_Dialog_HdrFtr::a_OK); + + if (bOK) + { + // let the view set the proper value in the + // document and refresh/redraw itself +// +// Read back hdr/ftr type changes +// + bool bNewHdrEven = pDialog->getValue(AP_Dialog_HdrFtr::HdrEven); + bool bNewHdrFirst = pDialog->getValue(AP_Dialog_HdrFtr::HdrFirst); + bool bNewHdrLast = pDialog->getValue(AP_Dialog_HdrFtr::HdrLast); + bool bNewFtrEven = pDialog->getValue(AP_Dialog_HdrFtr::FtrEven); + bool bNewFtrFirst = pDialog->getValue(AP_Dialog_HdrFtr::FtrFirst); + bool bNewFtrLast = pDialog->getValue(AP_Dialog_HdrFtr::FtrLast); +// +// Save everything from the PieceTable we need. +// + pView->SetupSavePieceTableState(); +// +// Now delete the header/footers that need to be deleted. +// + + if(bOldHdrEven && !bNewHdrEven) + { + pView->removeThisHdrFtr(FL_HDRFTR_HEADER_EVEN); + } + if(bOldHdrFirst && !bNewHdrFirst) + { + pView->removeThisHdrFtr(FL_HDRFTR_HEADER_FIRST); + } + if(bOldHdrLast && !bNewHdrLast) + { + pView->removeThisHdrFtr(FL_HDRFTR_HEADER_LAST); + } + if(bOldFtrEven && !bNewFtrEven) + { + pView->removeThisHdrFtr(FL_HDRFTR_FOOTER_EVEN); + } + if(bOldHdrFirst && !bNewHdrFirst) + { + pView->removeThisHdrFtr(FL_HDRFTR_FOOTER_FIRST); + } + if(bOldHdrLast && !bNewHdrLast) + { + pView->removeThisHdrFtr(FL_HDRFTR_FOOTER_LAST); + } +// +// Now create odd header/footers if there are none and any other Header/Footer +// types are asked for +// + if(!bOldHdr && (bNewHdrEven || bNewHdrFirst || bNewHdrLast)) + { + pView->createThisHdrFtr(FL_HDRFTR_HEADER); + } + if(!bOldFtr && (bNewFtrEven || bNewFtrFirst || bNewFtrLast)) + { + pView->createThisHdrFtr(FL_HDRFTR_FOOTER); + } +// +// OK now create and populate the requested header/footer types +// + if(bNewHdrEven && !bOldHdrEven) + { + pView->createThisHdrFtr(FL_HDRFTR_HEADER_EVEN); + pView->populateThisHdrFtr(FL_HDRFTR_HEADER_EVEN); + } + if(bNewHdrFirst && !bOldHdrFirst) + { + pView->createThisHdrFtr(FL_HDRFTR_HEADER_FIRST); + pView->populateThisHdrFtr(FL_HDRFTR_HEADER_FIRST); + } + if(bNewHdrLast && !bOldHdrLast) + { + pView->createThisHdrFtr(FL_HDRFTR_HEADER_LAST); + pView->populateThisHdrFtr(FL_HDRFTR_HEADER_LAST); + } + if(bNewFtrEven && !bOldFtrEven) + { + pView->createThisHdrFtr(FL_HDRFTR_FOOTER_EVEN); + pView->populateThisHdrFtr(FL_HDRFTR_FOOTER_EVEN); + } + if(bNewFtrFirst && !bOldFtrFirst) + { + pView->createThisHdrFtr(FL_HDRFTR_FOOTER_FIRST); + pView->populateThisHdrFtr(FL_HDRFTR_FOOTER_FIRST); + } + if(bNewFtrLast && !bOldFtrLast) + { + pView->createThisHdrFtr(FL_HDRFTR_FOOTER_LAST); + pView->populateThisHdrFtr(FL_HDRFTR_FOOTER_LAST); + } + + + pView->RestoreSavedPieceTableState(); + if(pDialog->isRestartChanged()) + { + const char * props_out[] = {"section-restart",NULL,"section-restart-value",NULL,NULL}; + static char szRestartValue[12]; + if(pDialog->isRestart()) + { + props_out[1] = "1"; + sprintf(static_cast(szRestartValue),"%i",pDialog->getRestartValue()); + props_out[3] = static_cast(szRestartValue); + } + else + { + props_out[1] = "0"; + props_out[2] = NULL; + } + pView->setSectionFormat(static_cast(&props_out[0])); + } + } + + pDialogFactory->releaseDialog(pDialog); + return bOK; +} + +Defun(hyperlinkJump) +{ + CHECK_FRAME; + ABIWORD_VIEW; + pView->cmdHyperlinkJump(pCallData->m_xPos, pCallData->m_yPos); + return true; +} + +Defun1(deleteHyperlink) +{ + CHECK_FRAME; + ABIWORD_VIEW; + pView->cmdDeleteHyperlink(); + return true; +} + +Defun(hyperlinkStatusBar) +{ + CHECK_FRAME; + ABIWORD_VIEW; + GR_Graphics * pG = pView->getGraphics(); + if (pG) + pG->setCursor(GR_Graphics::GR_CURSOR_LINK); + + pView->cmdHyperlinkStatusBar(pCallData->m_xPos, pCallData->m_yPos); + return true; +} + +static bool s_doMarkRevisions(XAP_Frame * pFrame, PD_Document * pDoc, FV_View * pView) +{ + UT_ASSERT(pFrame); + + pFrame->raise(); + + XAP_DialogFactory * pDialogFactory + = static_cast(pFrame->getDialogFactory()); + + AP_Dialog_MarkRevisions * pDialog + = static_cast(pDialogFactory->requestDialog(AP_DIALOG_ID_MARK_REVISIONS)); + UT_ASSERT(pDialog); + if (!pDialog) + return false; + + pDialog->setDocument(pDoc); + pDialog->runModal(pFrame); + bool bOK = (pDialog->getAnswer() == AP_Dialog_MarkRevisions::a_OK); + + if (!bOK) + { + // we have already turned this on, so turn it off again + pView->toggleMarkRevisions(); + } + else + { + pDialog->addRevision(); + // we also want to have paragraph marks and etc visible + AP_FrameData *pFrameData = static_cast(pFrame->getFrameData()); + UT_ASSERT(pFrameData); + + if(!pFrameData->m_bShowPara) + { + pFrameData->m_bShowPara = true; + pView->setShowPara(true); + pView->notifyListeners(AV_CHG_FRAMEDATA); // to update toolbar + } + } + + + pDialogFactory->releaseDialog(pDialog); + + return bOK; +} + +Defun1(toggleMarkRevisions) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + pView->toggleMarkRevisions(); + + if(pView->isMarkRevisions()) + { + PD_Document * pDoc = pView->getDocument(); + XAP_Frame * pFrame = static_cast ( pAV_View->getParentData()); + s_doMarkRevisions(pFrame, pDoc, pView); + } + + return true; +} + +Defun(revisionAccept) +{ + CHECK_FRAME; + ABIWORD_VIEW; + pView->cmdAcceptRejectRevision(false, pCallData->m_xPos, pCallData->m_yPos); + return true; +} + +Defun(revisionReject) +{ + CHECK_FRAME; + ABIWORD_VIEW; + pView->cmdAcceptRejectRevision(true, pCallData->m_xPos, pCallData->m_yPos); + return true; +} + +static bool s_doListRevisions(XAP_Frame * pFrame, PD_Document * pDoc, FV_View * pView) +{ + UT_ASSERT(pFrame); + + pFrame->raise(); + + XAP_DialogFactory * pDialogFactory + = static_cast(pFrame->getDialogFactory()); + + AP_Dialog_ListRevisions * pDialog + = static_cast(pDialogFactory->requestDialog(AP_DIALOG_ID_LIST_REVISIONS)); + UT_ASSERT(pDialog); + if (!pDialog) + return false; + + pDialog->setDocument(pDoc); + pDialog->runModal(pFrame); + bool bOK = (pDialog->getAnswer() == AP_Dialog_ListRevisions::a_OK); + + if (bOK) + { + pView->cmdSetRevisionLevel(pDialog->getSelectedId()); + } + + + pDialogFactory->releaseDialog(pDialog); + + return bOK; +} + +Defun1(revisionSetViewLevel) +{ + CHECK_FRAME; + ABIWORD_VIEW; + PD_Document * pDoc = pView->getDocument(); + UT_return_val_if_fail(pDoc,false); + + XAP_Frame * pFrame = static_cast ( pAV_View->getParentData()); + UT_return_val_if_fail(pFrame,false); + + s_doListRevisions(pFrame, pDoc, pView); + + return true; +} + +Defun(resizeImage) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + // clear status bar of any lingering messages + XAP_Frame * pFrame = static_cast (pView->getParentData()); + pFrame->setStatusMessage(NULL); + + GR_Graphics * pG = pView->getGraphics(); + if(pG) + { + bool bIsResizing = pView->isResizingImage(); + if (!bIsResizing) + pView->startImageResizing(pCallData->m_xPos, pCallData->m_yPos); + + UT_sint32 xOrigin; + UT_sint32 yOrigin; + UT_sint32 xDiff; + UT_sint32 yDiff; + + pView->getResizeOrigin(xOrigin, yOrigin); + UT_Rect orgImgRect = pView->getImageSelRect(); + + xDiff = pCallData->m_xPos - xOrigin; + yDiff = pCallData->m_yPos - yOrigin; + + UT_DEBUGMSG(("MARCM: ap_EditMethods::resizing image! Origin at pos: (x:%d,y:%d) - mouse at pos (x:%d,y:%d)\n", xOrigin, yOrigin, pCallData->m_xPos, pCallData->m_yPos)); + + UT_sint32 x1,x2,y1,y2,iHeight; + bool bEOL = false; + bool bDir = false; + + PT_DocPosition pos = pView->getDocPositionFromXY(xOrigin, yOrigin); + + fl_BlockLayout * pBlock = pView->getBlockAtPosition(pos); + fp_Run * pRun = NULL; + if(pBlock) + { + pRun = pBlock->findPointCoords(pos,bEOL,x1,y1,x2,y2,iHeight,bDir); + while(pRun && pRun->getType() != FPRUN_IMAGE) + { + pRun = pRun->getNext(); + } + if(pRun && pRun->getType() == FPRUN_IMAGE) + { + UT_DEBUGMSG(("MARCM: Image run on pos \n")); + } + else + { + //UT_ASSERT(UT_SHOULD_NOT_HAPPEN); + return false; + } + } + + UT_Rect r = orgImgRect; + double aRatio = static_cast(r.height)/(static_cast(r.width)); + + // we can savely use the cursor format to see what kind of dragging we are doing + GR_Graphics::Cursor cur = pView->getImageSelCursor(); + switch (cur) + { + case GR_Graphics::GR_CURSOR_IMAGESIZE_NW: + r.left += xDiff; + r.top += static_cast(xDiff * aRatio); + r.width -= xDiff; + r.height -= static_cast(xDiff * aRatio); + break; + case GR_Graphics::GR_CURSOR_IMAGESIZE_N: + r.top += yDiff; + r.height -= yDiff; + break; + case GR_Graphics::GR_CURSOR_IMAGESIZE_NE: + r.top -= static_cast(xDiff * aRatio); + r.width += xDiff; + r.height += static_cast(xDiff * aRatio); + break; + case GR_Graphics::GR_CURSOR_IMAGESIZE_E: + r.width += xDiff; + break; + case GR_Graphics::GR_CURSOR_IMAGESIZE_SE: + r.width += xDiff; + r.height += static_cast(xDiff * aRatio); + break; + case GR_Graphics::GR_CURSOR_IMAGESIZE_S: + r.height += yDiff; + break; + case GR_Graphics::GR_CURSOR_IMAGESIZE_SW: + r.left += xDiff; + r.width -= xDiff; + r.height -= static_cast(xDiff * aRatio); + break; + case GR_Graphics::GR_CURSOR_IMAGESIZE_W: + r.left += xDiff; + r.width -= xDiff; + break; + default: + UT_ASSERT(UT_SHOULD_NOT_HAPPEN); + } + + pG->setLineProperties(pView->getGraphics()->tlu(1), GR_Graphics::JOIN_MITER, GR_Graphics::CAP_BUTT, GR_Graphics::LINE_DOTTED); // MARCM: setting the line style to DOTTED doesn't seem to work with GTK2 + pG->setColor(UT_RGBColor(255,255,255)); + if (bIsResizing) + { + UT_DEBUGMSG(("MARCM: Clearing old line\n")); + xorRect(pG, pView->getCurImageSel()); + } + pView->setCurImageSel(r); + xorRect(pG, r); + pG->setLineProperties(pView->getGraphics()->tlu(1), GR_Graphics::JOIN_MITER, GR_Graphics::CAP_BUTT, GR_Graphics::LINE_SOLID); + + UT_DEBUGMSG(("MARCM: image display size: (w:%d,h:%d) - total change (w:%d,h:%d)\n",r.width,r.height,xDiff, yDiff)); + } + + return true; +} + +Defun(endResizeImage) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + // clear status bar of any lingering messages + XAP_Frame * pFrame = static_cast (pView->getParentData()); + pFrame->setStatusMessage(NULL); + + GR_Graphics * pG = pView->getGraphics(); + if(pG) + { + pView->stopImageResizing(); + + UT_sint32 xOrigin; + UT_sint32 yOrigin; + pView->getResizeOrigin(xOrigin, yOrigin); + UT_Rect newImgBounds = pView->getCurImageSel(); + + // an approximate... TODO: make me more accurate + const fp_PageSize & page = pView->getPageSize (); + double max_width = 0., max_height = 0.; + max_width = page.Width (DIM_PX); + max_height = page.Height (DIM_PX); + + // some range checking stuff + newImgBounds.width = abs(newImgBounds.width); + newImgBounds.height = abs(newImgBounds.height); + + if (newImgBounds.width > max_width) + newImgBounds.width = static_cast(max_width); + + if (newImgBounds.height > max_height) + newImgBounds.height = static_cast(max_height); + + if (newImgBounds.width == 0) + newImgBounds.width = pView->getGraphics()->tlu(1); + + if (newImgBounds.height == 0) + newImgBounds.height = pView->getGraphics()->tlu(1); + + // clear the resizing line + pG->setLineProperties(pView->getGraphics()->tlu(1), GR_Graphics::JOIN_MITER, GR_Graphics::CAP_BUTT, GR_Graphics::LINE_DOTTED); // MARCM: setting the line style to DOTTED doesn't seem to work with GTK2 + pG->setColor(UT_RGBColor(255,255,255)); + xorRect(pG, pView->getCurImageSel()); + pG->setLineProperties(pView->getGraphics()->tlu(1), GR_Graphics::JOIN_MITER, GR_Graphics::CAP_BUTT, GR_Graphics::LINE_SOLID); + + UT_DEBUGMSG(("MARCM: ap_EditMethods::done resizing image! new size in px (h:%d,w:%d)\n", newImgBounds.width, newImgBounds.height)); + + UT_sint32 x1,x2,y1,y2,iHeight; + bool bEOL = false; + bool bDir = false; + + PT_DocPosition pos = pView->getDocPositionFromXY(xOrigin, yOrigin); + + fl_BlockLayout * pBlock = pView->getBlockAtPosition(pos); + fp_Run * pRun = NULL; + if(pBlock) + { + pRun = pBlock->findPointCoords(pos,bEOL,x1,y1,x2,y2,iHeight,bDir); + while(pRun && pRun->getType() != FPRUN_IMAGE) + { + pRun = pRun->getNext(); + } + if(pRun && pRun->getType() == FPRUN_IMAGE) + { + UT_DEBUGMSG(("MARCM: Image run on pos \n")); + } + else + { + //UT_ASSERT(UT_SHOULD_NOT_HAPPEN); + return false; + } + } + pView->cmdSelect(pos,pos+1); + + char widthBuf[32]; + char heightBuf[32]; + + // TODO: set format + const XML_Char * properties[] = {"width", NULL, "height", NULL, 0}; + char * old_locale = setlocale(LC_NUMERIC, "C"); + sprintf(widthBuf, "%fin", UT_convertDimToInches(newImgBounds.width, DIM_PX)); + sprintf(heightBuf, "%fin", UT_convertDimToInches(newImgBounds.height, DIM_PX)); + setlocale(LC_NUMERIC, old_locale); + + UT_DEBUGMSG(("MARCM: nw:%s nh:%s\n", widthBuf, heightBuf)); + + properties[1] = widthBuf; + properties[3] = heightBuf; + pView->setCharFormat(properties); + pView->updateScreen(); + } + + return true; +} +static UT_sint32 sTopRulerHeight =0; +static UT_sint32 sLeftRulerPos =0; +static UT_sint32 siFixed =0; + +Defun(beginVDrag) +{ + CHECK_FRAME; + ABIWORD_VIEW; + AP_TopRuler * pTopRuler = pView->getTopRuler(); + if(pTopRuler == NULL) + { + XAP_Frame * pFrame = static_cast (pView->getParentData()); + pTopRuler = new AP_TopRuler(pFrame); + AP_FrameData *pFrameData = static_cast(pFrame->getFrameData()); + pFrameData->m_pTopRuler = pTopRuler; + pView->setTopRuler(pTopRuler); + pTopRuler->setViewHidden(pView); + } + if(pTopRuler->getView() == NULL) + { + return true; + } + pView->setDragTableLine(true); + UT_sint32 x = pCallData->m_xPos; + UT_sint32 y = pCallData->m_yPos; + PT_DocPosition pos = pView->getDocPositionFromXY(x, y); + xxx_UT_DEBUGMSG(("ap_EditMethods.cpp:: VDrag begin \n")); + sTopRulerHeight = pTopRuler->setTableLineDrag(pos,x,siFixed); + pView->getGraphics()->setCursor(GR_Graphics::GR_CURSOR_GRAB); + return true; +} + +Defun(beginHDrag) +{ + CHECK_FRAME; + ABIWORD_VIEW; + AP_LeftRuler * pLeftRuler = pView->getLeftRuler(); + if(pLeftRuler == NULL) + { + XAP_Frame * pFrame = static_cast (pView->getParentData()); + pLeftRuler = new AP_LeftRuler(pFrame); + AP_FrameData *pFrameData = static_cast(pFrame->getFrameData()); + pFrameData->m_pLeftRuler = pLeftRuler; + pView->setLeftRuler(pLeftRuler); + pLeftRuler->setViewHidden(pView); + } + pView->setDragTableLine(true); + UT_sint32 x = pCallData->m_xPos; + UT_sint32 y = pCallData->m_yPos; + PT_DocPosition pos = pView->getDocPositionFromXY(x, y); + sLeftRulerPos = pLeftRuler->setTableLineDrag(pos,siFixed,y); + pView->getGraphics()->setCursor(GR_Graphics::GR_CURSOR_GRAB); + + return true; +} + +Defun(clearSetCols) +{ + CHECK_FRAME; + ABIWORD_VIEW; + bool bres = pView->cmdAutoSizeCols(); + pView->setDragTableLine(false); + return bres; +} + +Defun(clearSetRows) +{ + CHECK_FRAME; + ABIWORD_VIEW; + bool bres = pView->cmdAutoSizeRows(); + pView->setDragTableLine(false); + return bres; +} + +Defun(dragVline) +{ + CHECK_FRAME; + ABIWORD_VIEW; + UT_DEBUGMSG(("Doing Vertical Line drag \n")); + + AP_TopRuler * pTopRuler = pView->getTopRuler(); + if(pTopRuler == NULL) + { + return true; + } + if(pTopRuler->getView() == NULL) + { + pTopRuler->setViewHidden(pView); + } + UT_sint32 x = pCallData->m_xPos + siFixed; + pView->getGraphics()->setCursor(GR_Graphics::GR_CURSOR_GRAB); + EV_EditModifierState ems = 0; + xxx_UT_DEBUGMSG(("ap_EditMethods.cpp:: DRagging VLine \n")); + pTopRuler->mouseMotion(ems, x, sTopRulerHeight); + return true; +} + +Defun(dragHline) +{ + CHECK_FRAME; + ABIWORD_VIEW; + UT_DEBUGMSG(("Doing Hline Line drag \n")); + AP_LeftRuler * pLeftRuler = pView->getLeftRuler(); + if(!pLeftRuler) + { + return true; + } + if(pLeftRuler->getView() == NULL) + { + pLeftRuler->setViewHidden(pView); + } + UT_sint32 y = pCallData->m_yPos; + pView->getGraphics()->setCursor(GR_Graphics::GR_CURSOR_GRAB); + EV_EditModifierState ems = 0; + pLeftRuler->mouseMotion(ems, sLeftRulerPos,y); + return true; +} + +Defun(endDragVline) +{ + CHECK_FRAME; + ABIWORD_VIEW; + AP_TopRuler * pTopRuler = pView->getTopRuler(); + if(!pTopRuler) + { + return true; + } + if(pTopRuler->getView() == NULL) + { + pTopRuler->setView(pView); + } + UT_sint32 x = pCallData->m_xPos; + EV_EditModifierState ems = 0; + EV_EditMouseButton emb = EV_EMB_BUTTON1; + pTopRuler->mouseRelease(ems,emb, x, sTopRulerHeight); + pView->setDragTableLine(false); + pView->setCursorToContext(); + return true; +} + +Defun(endDragHline) +{ + CHECK_FRAME; + ABIWORD_VIEW; + AP_LeftRuler * pLeftRuler = pView->getLeftRuler(); + if(!pLeftRuler) + { + return true; + } + UT_sint32 y = pCallData->m_yPos; + EV_EditModifierState ems = 0; + EV_EditMouseButton emb = EV_EMB_BUTTON1; + pLeftRuler->mouseRelease(ems,emb,sLeftRulerPos,y); + pView->setDragTableLine(false); + pView->setCursorToContext(); + return true; +} + +Defun(dragImage) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + // clear status bar of any lingering messages + XAP_Frame * pFrame = static_cast (pView->getParentData()); + pFrame->setStatusMessage(NULL); + + GR_Graphics * pG = pView->getGraphics(); + if(pG) + { + fp_Run * pRun = NULL; + + if (!pView->isDraggingImage()) + { + UT_sint32 x1,x2,y1,y2,iHeight; + bool bEOL = false; + bool bDir = false; + + PT_DocPosition pos = pView->getDocPositionFromXY(pCallData->m_xPos, pCallData->m_yPos); + + fl_BlockLayout * pBlock = pView->getBlockAtPosition(pos); + if(pBlock) + { + pRun = pBlock->findPointCoords(pos,bEOL,x1,y1,x2,y2,iHeight,bDir); + while(pRun && pRun->getType() != FPRUN_IMAGE) + { + pRun = pRun->getNext(); + } + if(pRun && pRun->getType() == FPRUN_IMAGE) + { + UT_DEBUGMSG(("MARCM: Image run on pos \n")); + } + else + { + //UT_ASSERT(UT_SHOULD_NOT_HAPPEN); + return false; + } + } + pView->cmdSelect(pos,pos+1); + pView->startImageDrag(pRun, pCallData->m_xPos, pCallData->m_yPos); + } + pView->drawDraggedImage(pCallData->m_xPos, pCallData->m_yPos); + } + + return true; +} + +Defun(dropImage) +{ + CHECK_FRAME; + ABIWORD_VIEW; + + // clear status bar of any lingering messages + XAP_Frame * pFrame = static_cast (pView->getParentData()); + pFrame->setStatusMessage(NULL); + + GR_Graphics * pG = pView->getGraphics(); + if(pG) + { + pView->stopImageDrag(pCallData->m_xPos, pCallData->m_yPos); + } + + return true; +} diff -ru ../../abiword-2.0.11.abicvs/abi/src/hello/ap/xp/ap_Menu_Functions.h ../abi/src/hello/ap/xp/ap_Menu_Functions.h --- ../../abiword-2.0.11.abicvs/abi/src/hello/ap/xp/ap_Menu_Functions.h 1999-04-08 22:07:05.000000000 +0100 +++ ../abi/src/hello/ap/xp/ap_Menu_Functions.h 2004-09-17 11:53:54.000000000 +0100 @@ -45,5 +45,6 @@ Defun_EV_GetMenuItemComputedLabel_Fn(ap_GetLabel_Window); Defun_EV_GetMenuItemComputedLabel_Fn(ap_GetLabel_WindowMore); Defun_EV_GetMenuItemComputedLabel_Fn(ap_GetLabel_About); +Defun_EV_GetMenuItemComputedLabel_Fn(ap_GetLabel_StyleModify); #endif /* AP_MENU_FUNCTIONS_H */ diff -ru ../../abiword-2.0.11.abicvs/abi/src/hello/ap/xp/ap_Prefs_SchemeIds.h ../abi/src/hello/ap/xp/ap_Prefs_SchemeIds.h --- ../../abiword-2.0.11.abicvs/abi/src/hello/ap/xp/ap_Prefs_SchemeIds.h 2002-10-29 19:45:54.000000000 +0000 +++ ../abi/src/hello/ap/xp/ap_Prefs_SchemeIds.h 2004-09-02 12:27:31.000000000 +0100 @@ -36,7 +36,7 @@ // // Note: These are in addition to the application-independent ones defined in // abi/src/xap/xp/xap_Prefs_SchemeIds.h. -////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////1///// #define AP_PREF_KEY_StringSet "StringSet" #define AP_PREF_DEFAULT_StringSet "EnUS" /* name of dialog/msgbox strings */ Only in ../abi/src/other: GNUmakefile Only in ../abi/src/other: GNUmakefile.in Only in ../abi/src/other/spell: GNUmakefile Only in ../abi/src/other/spell: GNUmakefile.in Only in ../abi/src/other/spell/xp: .deps Only in ../abi/src/other/spell/xp: GNUmakefile Only in ../abi/src/other/spell/xp: GNUmakefile.in Only in ../abi/src/other/spell/xp: barbarisms.o Only in ../abi/src/other/spell/xp: correct.o Only in ../abi/src/other/spell/xp: good.o Only in ../abi/src/other/spell/xp: hash.o Only in ../abi/src/other/spell/xp: ispell_checker.o Only in ../abi/src/other/spell/xp: libSpell.a Only in ../abi/src/other/spell/xp: lookup.o Only in ../abi/src/other/spell/xp: makedent.o Only in ../abi/src/other/spell/xp: spell_manager.o Only in ../abi/src/other/spell/xp: tgood.o Only in ../abi/src/other/ttftool: GNUmakefile Only in ../abi/src/other/ttftool: GNUmakefile.in Only in ../abi/src/other/ttftool/unix: .deps Only in ../abi/src/other/ttftool/unix: GNUmakefile Only in ../abi/src/other/ttftool/unix: GNUmakefile.in Only in ../abi/src/other/ttftool/unix: libTtfTool.a Only in ../abi/src/other/ttftool/unix: parse.o Only in ../abi/src/other/ttftool/unix: ps.o Only in ../abi/src/other/ttftool/unix: ttfutils.o Only in ../abi/src/text: GNUmakefile Only in ../abi/src/text: GNUmakefile.in Only in ../abi/src/text/fmt: GNUmakefile Only in ../abi/src/text/fmt: GNUmakefile.in Only in ../abi/src/text/fmt/xp: .deps Only in ../abi/src/text/fmt/xp: GNUmakefile Only in ../abi/src/text/fmt/xp: GNUmakefile.in Only in ../abi/src/text/fmt/xp: fb_Alignment.o Only in ../abi/src/text/fmt/xp: fb_ColumnBreaker.o Only in ../abi/src/text/fmt/xp: fb_LineBreaker.o Only in ../abi/src/text/fmt/xp: fg_Graphic.o Only in ../abi/src/text/fmt/xp: fg_GraphicRaster.o Only in ../abi/src/text/fmt/xp: fg_GraphicVector.o Only in ../abi/src/text/fmt/xp: fl_AutoLists.o Only in ../abi/src/text/fmt/xp: fl_AutoNum.o Only in ../abi/src/text/fmt/xp: fl_BlockLayout.o Only in ../abi/src/text/fmt/xp: fl_ContainerLayout.o Only in ../abi/src/text/fmt/xp: fl_DocLayout.o Only in ../abi/src/text/fmt/xp: fl_DocListener.o Only in ../abi/src/text/fmt/xp: fl_FootnoteLayout.o Only in ../abi/src/text/fmt/xp: fl_Layout.o Only in ../abi/src/text/fmt/xp: fl_SectionLayout.o Only in ../abi/src/text/fmt/xp: fl_SelectionPreserver.o Only in ../abi/src/text/fmt/xp: fl_Squiggles.o Only in ../abi/src/text/fmt/xp: fl_TableLayout.o Only in ../abi/src/text/fmt/xp: fl_TestRoutines.o Only in ../abi/src/text/fmt/xp: fp_Column.o Only in ../abi/src/text/fmt/xp: fp_ContainerObject.o Only in ../abi/src/text/fmt/xp: fp_DirectionMarkerRun.o Only in ../abi/src/text/fmt/xp: fp_FieldListLabelRun.o Only in ../abi/src/text/fmt/xp: fp_FmtMarkRun.o Only in ../abi/src/text/fmt/xp: fp_FootnoteContainer.o Only in ../abi/src/text/fmt/xp: fp_Line.o Only in ../abi/src/text/fmt/xp: fp_Page.o Only in ../abi/src/text/fmt/xp: fp_PageSize.o Only in ../abi/src/text/fmt/xp: fp_Run.o Only in ../abi/src/text/fmt/xp: fp_TableContainer.o Only in ../abi/src/text/fmt/xp: fp_TestRoutines.o Only in ../abi/src/text/fmt/xp: fp_TextRun.o diff -ru ../../abiword-2.0.11.abicvs/abi/src/text/fmt/xp/fv_View.cpp ../abi/src/text/fmt/xp/fv_View.cpp --- ../../abiword-2.0.11.abicvs/abi/src/text/fmt/xp/fv_View.cpp 2004-06-16 14:31:43.000000000 +0100 +++ ../abi/src/text/fmt/xp/fv_View.cpp 2004-09-21 10:17:07.000000000 +0100 @@ -6372,8 +6372,17 @@ pInfo->m_mode = AP_TopRulerInfo::TRI_MODE_COLUMNS; pInfo->m_xrPoint = xCaret - pContainer->getX(); - pInfo->m_xrLeftIndent = UT_convertToLogicalUnits(pBlock->getProperty("margin-left")); - pInfo->m_xrRightIndent = UT_convertToLogicalUnits(pBlock->getProperty("margin-right")); + if(getViewMode() == VIEW_NORMAL) + { + UT_DEBUGMSG(("FV_View::getTopRulerInfo-VIEW_NORMAL \n")); + pInfo->m_xrLeftIndent = 10;//UT_convertToLogicalUnits(pBlock->getProperty("margin-left")); + pInfo->m_xrRightIndent = 10;//UT_convertToLogicalUnits(pBlock->getProperty("margin-right")); + } + else + { + pInfo->m_xrLeftIndent = UT_convertToLogicalUnits(pBlock->getProperty("margin-left")); + pInfo->m_xrRightIndent = UT_convertToLogicalUnits(pBlock->getProperty("margin-right")); + } pInfo->m_xrFirstLineIndent = UT_convertToLogicalUnits(pBlock->getProperty("text-indent")); xxx_UT_DEBUGMSG(("ap_TopRuler: xrPoint %d LeftIndent %d RightIndent %d Firs %d \n",pInfo->m_xrPoint,pInfo->m_xrLeftIndent,pInfo->m_xrRightIndent, pInfo->m_xrFirstLineIndent)); } @@ -8849,6 +8858,7 @@ UT_sint32 iWindowWidth = getWindowWidth(); if(iWindowWidth == 0) { + UT_DEBUGMSG(("FV_View::calculateZoomPercentForPageWidth - iWindowWidth=0 \n")); // Get fall-back defaults for zoom from prefs const XML_Char * szZoom = NULL; m_pApp->getPrefsValue(XAP_PREF_KEY_ZoomPercentage, @@ -8865,12 +8875,29 @@ } return getGraphics()->getZoomPercentage(); } - if ( ( iWindowWidth - (2 * getPageViewLeftMargin()) ) <= 0 ) - return getGraphics()->getZoomPercentage(); + double scale; + // PSION-ABL PSIBUG #50 - Margins in 'Normal View' waste screen space. + if(getViewMode() == VIEW_NORMAL) + { + UT_DEBUGMSG(("FV_View::calculateZoomPercentForPageWidth - VIEW_NORMAL \n")); + if ( iWindowWidth <= 0 ) + //if ( ( iWindowWidth - (4 * getPageViewLeftMargin()) ) <= 0 ) + return getGraphics()->getZoomPercentage(); + + scale = (getWindowWidth()) / + //scale = (getWindowWidth() - (4 * getPageViewLeftMargin())) / + (((pageWidth/*+0.35*/) - (pageSize.MarginLeft(DIM_IN)+pageSize.MarginRight(DIM_IN)-0.5) ) * (static_cast(getGraphics()->getResolution()) / + static_cast(getGraphics()->getZoomPercentage()) * 100.0)); + } + else + { + if ( ( iWindowWidth - (2 * getPageViewLeftMargin()) ) <= 0 ) + return getGraphics()->getZoomPercentage(); - double scale = (getWindowWidth() - (2 * getPageViewLeftMargin())) / - (pageWidth * (static_cast(getGraphics()->getResolution()) / - static_cast(getGraphics()->getZoomPercentage()) * 100.0)); + scale = (getWindowWidth() - (2 * getPageViewLeftMargin())) / + (pageWidth * (static_cast(getGraphics()->getResolution()) / + static_cast(getGraphics()->getZoomPercentage()) * 100.0)); + } // Don't do the change if it's less than 3% from current percentage - PL if (abs(static_cast(scale * 100.0) - Only in ../abi/src/text/fmt/xp: fv_View.o Only in ../abi/src/text/fmt/xp: fv_View_TestRoutines.o Only in ../abi/src/text/fmt/xp: fv_View_cmd.o diff -ru ../../abiword-2.0.11.abicvs/abi/src/text/fmt/xp/fv_View_protected.cpp ../abi/src/text/fmt/xp/fv_View_protected.cpp --- ../../abiword-2.0.11.abicvs/abi/src/text/fmt/xp/fv_View_protected.cpp 2004-06-04 18:24:36.000000000 +0100 +++ ../abi/src/text/fmt/xp/fv_View_protected.cpp 2004-09-16 17:31:33.000000000 +0100 @@ -3588,9 +3588,19 @@ da.pG = m_pG; da.xoff = getPageViewLeftMargin() - m_xScrollOffset; da.yoff = adjustedTop; + + XAP_Frame * pFrame = static_cast(getParentData()); + UT_ASSERT((pFrame)); + + // PSION-ABL PSIBUG #50 - Margins in 'Normal View' waste screen space. + if((getViewMode() == VIEW_NORMAL) && (pFrame->getZoomType() == XAP_Frame::z_PAGEWIDTH)) + { + m_xScrollOffset = 1050; + } + UT_sint32 adjustedLeft = getPageViewLeftMargin() - m_xScrollOffset; UT_sint32 adjustedRight = adjustedLeft + iPageWidth; - + adjustedBottom -= getPageViewSep() - 1; if (!bDirtyRunsOnly || pPage->needsRedraw() && (getViewMode() == VIEW_PRINT)) Only in ../abi/src/text/fmt/xp: fv_View_protected.o Only in ../abi/src/text/fmt/xp: libFmt.a Only in ../abi/src/text/ptbl: GNUmakefile Only in ../abi/src/text/ptbl: GNUmakefile.in Only in ../abi/src/text/ptbl/xp: .deps Only in ../abi/src/text/ptbl/xp: GNUmakefile Only in ../abi/src/text/ptbl/xp: GNUmakefile.in Only in ../abi/src/text/ptbl/xp: fd_Field.o Only in ../abi/src/text/ptbl/xp: libPtbl.a Only in ../abi/src/text/ptbl/xp: pd_Document.o Only in ../abi/src/text/ptbl/xp: pd_Document_TestRoutines.o Only in ../abi/src/text/ptbl/xp: pd_Style.o Only in ../abi/src/text/ptbl/xp: pf_Frag.o Only in ../abi/src/text/ptbl/xp: pf_Frag_FmtMark.o Only in ../abi/src/text/ptbl/xp: pf_Frag_Object.o Only in ../abi/src/text/ptbl/xp: pf_Frag_Strux.o Only in ../abi/src/text/ptbl/xp: pf_Frag_Strux_Block.o Only in ../abi/src/text/ptbl/xp: pf_Frag_Strux_Section.o Only in ../abi/src/text/ptbl/xp: pf_Frag_TestRoutines.o Only in ../abi/src/text/ptbl/xp: pf_Frag_Text.o Only in ../abi/src/text/ptbl/xp: pf_Fragments.o Only in ../abi/src/text/ptbl/xp: pf_Frags_TestRoutines.o Only in ../abi/src/text/ptbl/xp: po_Bookmark.o Only in ../abi/src/text/ptbl/xp: pp_AttrProp.o diff -ru ../../abiword-2.0.11.abicvs/abi/src/text/ptbl/xp/pp_Property.cpp ../abi/src/text/ptbl/xp/pp_Property.cpp --- ../../abiword-2.0.11.abicvs/abi/src/text/ptbl/xp/pp_Property.cpp 2003-07-24 23:14:32.000000000 +0100 +++ ../abi/src/text/ptbl/xp/pp_Property.cpp 2004-09-02 12:27:32.000000000 +0100 @@ -84,7 +84,8 @@ { "field-color", "dcdcdc", true, NULL, PP_LEVEL_FIELD}, { "field-font", "NULL", true, NULL, PP_LEVEL_FIELD}, - { "font-family", "Times New Roman", true, NULL, PP_LEVEL_CHAR}, +// { "font-family", "Times New Roman", true, NULL, PP_LEVEL_CHAR}, + { "font-family", "Thorndale AMT", true, NULL, PP_LEVEL_CHAR}, { "font-size", "12pt", true, NULL, PP_LEVEL_CHAR}, // MS word defaults to 10pt, but it just seems too small { "font-stretch", "normal", true, NULL, PP_LEVEL_CHAR}, { "font-style", "normal", true, NULL, PP_LEVEL_CHAR}, Only in ../abi/src/text/ptbl/xp: pp_Property.o Only in ../abi/src/text/ptbl/xp: pp_PropertyMap.o Only in ../abi/src/text/ptbl/xp: pp_Revision.o Only in ../abi/src/text/ptbl/xp: pp_TableAttrProp.o Only in ../abi/src/text/ptbl/xp: pt_PT_Append.o Only in ../abi/src/text/ptbl/xp: pt_PT_ChangeObject.o Only in ../abi/src/text/ptbl/xp: pt_PT_ChangeSpan.o Only in ../abi/src/text/ptbl/xp: pt_PT_ChangeStrux.o Only in ../abi/src/text/ptbl/xp: pt_PT_DeleteObject.o Only in ../abi/src/text/ptbl/xp: pt_PT_DeleteSpan.o Only in ../abi/src/text/ptbl/xp: pt_PT_DeleteStrux.o Only in ../abi/src/text/ptbl/xp: pt_PT_FmtMark.o Only in ../abi/src/text/ptbl/xp: pt_PT_Glob.o Only in ../abi/src/text/ptbl/xp: pt_PT_InsertObject.o Only in ../abi/src/text/ptbl/xp: pt_PT_InsertSpan.o Only in ../abi/src/text/ptbl/xp: pt_PT_InsertStrux.o Only in ../abi/src/text/ptbl/xp: pt_PT_Listener.o diff -ru ../../abiword-2.0.11.abicvs/abi/src/text/ptbl/xp/pt_PT_Styles.cpp ../abi/src/text/ptbl/xp/pt_PT_Styles.cpp --- ../../abiword-2.0.11.abicvs/abi/src/text/ptbl/xp/pt_PT_Styles.cpp 2003-07-24 15:27:17.000000000 +0100 +++ ../abi/src/text/ptbl/xp/pt_PT_Styles.cpp 2004-09-21 14:32:17.000000000 +0100 @@ -68,7 +68,8 @@ { {"Numbered List", XAP_STRING_ID_STYLE_NUMBER_LIST}, - {"Plain Text", XAP_STRING_ID_STYLE_PLAIN_TEXT}, +// {"Plain Text", XAP_STRING_ID_STYLE_PLAIN_TEXT}, + {"Typewriter", XAP_STRING_ID_STYLE_PLAIN_TEXT}, {"Heading 1", XAP_STRING_ID_STYLE_HEADING1}, {"Heading 2", XAP_STRING_ID_STYLE_HEADING2}, {"Heading 3", XAP_STRING_ID_STYLE_HEADING3}, @@ -169,7 +170,8 @@ _s("Heading 2", "P", "Normal", "Normal", stTmp.c_str()); UT_String_sprintf(stTmp, szFmt, pszFamily, 12); _s("Heading 3", "P", "Normal", "Normal", stTmp.c_str()); - _s("Plain Text","P", "Normal", "Current Settings", "font-family:Courier New"); +// _s("Plain Text","P", "Normal", "Current Settings", "font-family:Courier New"); + _s("Typewriter","P", "Normal", "Current Settings", "font-family:Courier New"); _s("Block Text","P", "Normal", "Current Settings", "margin-left:1in; margin-right:1in; margin-bottom:6pt"); UT_String_sprintf(stTmp, list_fmt, "Numbered List", "1",LIST_DEFAULT_INDENT, LIST_DEFAULT_INDENT_LABEL, "transparent", "%L.", "NULL", "."); Only in ../abi/src/text/ptbl/xp: pt_PT_Styles.o Only in ../abi/src/text/ptbl/xp: pt_PT_TestRoutines.o Only in ../abi/src/text/ptbl/xp: pt_PT_Undo.o Only in ../abi/src/text/ptbl/xp: pt_PieceTable.o Only in ../abi/src/text/ptbl/xp: pt_VarSet.o Only in ../abi/src/text/ptbl/xp: px_CH_TestRoutines.o Only in ../abi/src/text/ptbl/xp: px_CR_FmtMark.o Only in ../abi/src/text/ptbl/xp: px_CR_FmtMarkChange.o Only in ../abi/src/text/ptbl/xp: px_CR_Glob.o Only in ../abi/src/text/ptbl/xp: px_CR_Object.o Only in ../abi/src/text/ptbl/xp: px_CR_ObjectChange.o Only in ../abi/src/text/ptbl/xp: px_CR_Span.o Only in ../abi/src/text/ptbl/xp: px_CR_SpanChange.o Only in ../abi/src/text/ptbl/xp: px_CR_Strux.o Only in ../abi/src/text/ptbl/xp: px_CR_StruxChange.o Only in ../abi/src/text/ptbl/xp: px_CR_TestRoutines.o Only in ../abi/src/text/ptbl/xp: px_ChangeHistory.o Only in ../abi/src/text/ptbl/xp: px_ChangeRecord.o Only in ../abi/src/tools: GNUmakefile Only in ../abi/src/tools: GNUmakefile.in Only in ../abi/src/tools/cdump: GNUmakefile Only in ../abi/src/tools/cdump: GNUmakefile.in Only in ../abi/src/tools/cdump/qnx: GNUmakefile Only in ../abi/src/tools/cdump/qnx: GNUmakefile.in Only in ../abi/src/tools/cdump/xp: .deps Only in ../abi/src/tools/cdump/xp: GNUmakefile Only in ../abi/src/tools/cdump/xp: GNUmakefile.in Only in ../abi/src/tools/cdump/xp: cdump Only in ../abi/src/tools/cdump/xp: cdump.o Only in ../abi/src/tools/pfa2afm: GNUmakefile Only in ../abi/src/tools/pfa2afm: GNUmakefile.in Only in ../abi/src/tools/pfa2afm/unix: .deps Only in ../abi/src/tools/pfa2afm/unix: GNUmakefile Only in ../abi/src/tools/pfa2afm/unix: GNUmakefile.in Only in ../abi/src/tools/pfa2afm/unix: parsepfa.o Only in ../abi/src/tools/pfa2afm/unix: pfa2afm Only in ../abi/src/tools/pfa2afm/unix: pfa2afm.o Only in ../abi/src/tools/pfa2afm/unix: pfautil.o Only in ../abi/src/tools/pfa2afm/unix: psisolatin1names.o Only in ../abi/src/tools/pfa2afm/unix: splinesaveafm.o Only in ../abi/src/tools/pfa2afm/unix: splineutil.o Only in ../abi/src/tools/scripts: GNUmakefile Only in ../abi/src/tools/scripts: GNUmakefile.in Only in ../abi/src/tools/scripts/unix: GNUmakefile Only in ../abi/src/tools/scripts/unix: GNUmakefile.in Only in ../abi/src/tools/ttftool: GNUmakefile Only in ../abi/src/tools/ttftool: GNUmakefile.in Only in ../abi/src/tools/ttftool/unix: .deps Only in ../abi/src/tools/ttftool/unix: GNUmakefile Only in ../abi/src/tools/ttftool/unix: GNUmakefile.in Only in ../abi/src/tools/ttftool/unix: parse.o Only in ../abi/src/tools/ttftool/unix: ps.o Only in ../abi/src/tools/ttftool/unix: ttftool Only in ../abi/src/tools/ttftool/unix: ttftool.o Only in ../abi/src/tools/ttftool/unix: ttfutils.o Only in ../abi/src/wp: GNUmakefile Only in ../abi/src/wp: GNUmakefile.in Only in ../abi/src/wp/ap: GNUmakefile Only in ../abi/src/wp/ap: GNUmakefile.in Only in ../abi/src/wp/ap/cocoa: GNUmakefile Only in ../abi/src/wp/ap/cocoa: GNUmakefile.in Only in ../abi/src/wp/ap: libAp.a Only in ../abi/src/wp/ap/qnx: GNUmakefile Only in ../abi/src/wp/ap/qnx: GNUmakefile.in Only in ../abi/src/wp/ap/unix: .deps Only in ../abi/src/wp/ap/unix: GNUmakefile Only in ../abi/src/wp/ap/unix: GNUmakefile.in diff -ru ../../abiword-2.0.11.abicvs/abi/src/wp/ap/unix/abiwidget.cpp ../abi/src/wp/ap/unix/abiwidget.cpp --- ../../abiword-2.0.11.abicvs/abi/src/wp/ap/unix/abiwidget.cpp 2004-05-21 22:42:37.000000000 +0100 +++ ../abi/src/wp/ap/unix/abiwidget.cpp 2004-09-17 16:34:22.000000000 +0100 @@ -1666,8 +1666,8 @@ abi_class->zoom_100 = EM_NAME(zoom100); abi_class->zoom_200 = EM_NAME(zoom200); - abi_class->zoom_50 = EM_NAME(zoom50); - abi_class->zoom_75 = EM_NAME(zoom75); +// abi_class->zoom_50 = EM_NAME(zoom50); +// abi_class->zoom_75 = EM_NAME(zoom75); abi_class->zoom_whole = EM_NAME(zoomWhole); abi_class->zoom_width = EM_NAME(zoomWidth); Only in ../abi/src/wp/ap/unix: abiwidget.o Only in ../abi/src/wp/ap/unix: ap_UnixApp.o Only in ../abi/src/wp/ap/unix: ap_UnixClipboard.o Only in ../abi/src/wp/ap/unix: ap_UnixDialogFactory.o Only in ../abi/src/wp/ap/unix: ap_UnixDialog_Background.o Only in ../abi/src/wp/ap/unix: ap_UnixDialog_Break.o Only in ../abi/src/wp/ap/unix: ap_UnixDialog_Columns.o Only in ../abi/src/wp/ap/unix: ap_UnixDialog_Field.o Only in ../abi/src/wp/ap/unix: ap_UnixDialog_FormatFootnotes.o Only in ../abi/src/wp/ap/unix: ap_UnixDialog_FormatTable.o Only in ../abi/src/wp/ap/unix: ap_UnixDialog_Goto.o Only in ../abi/src/wp/ap/unix: ap_UnixDialog_HdrFtr.o Only in ../abi/src/wp/ap/unix: ap_UnixDialog_InsertBookmark.o Only in ../abi/src/wp/ap/unix: ap_UnixDialog_InsertHyperlink.o Only in ../abi/src/wp/ap/unix: ap_UnixDialog_InsertTable.o diff -ru ../../abiword-2.0.11.abicvs/abi/src/wp/ap/unix/ap_UnixDialog_Insert_DateTime.glade ../abi/src/wp/ap/unix/ap_UnixDialog_Insert_DateTime.glade --- ../../abiword-2.0.11.abicvs/abi/src/wp/ap/unix/ap_UnixDialog_Insert_DateTime.glade 2003-06-01 00:18:33.000000000 +0100 +++ ../abi/src/wp/ap/unix/ap_UnixDialog_Insert_DateTime.glade 2004-09-02 12:27:32.000000000 +0100 @@ -10,10 +10,15 @@ True Insert Date and Time GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE + GTK_WIN_POS_CENTER_ON_PARENT True True False + True + False + False + GDK_WINDOW_TYPE_HINT_DIALOG + GDK_GRAVITY_NORTH_WEST False @@ -35,6 +40,7 @@ gtk-cancel True GTK_RELIEF_NORMAL + True -6 @@ -48,6 +54,7 @@ _Insert True GTK_RELIEF_NORMAL + True 1 Only in ../abi/src/wp/ap/unix: ap_UnixDialog_Insert_DateTime.o Only in ../abi/src/wp/ap/unix: ap_UnixDialog_ListRevisions.o Only in ../abi/src/wp/ap/unix: ap_UnixDialog_Lists.o Only in ../abi/src/wp/ap/unix: ap_UnixDialog_MailMerge.o Only in ../abi/src/wp/ap/unix: ap_UnixDialog_MarkRevisions.o Only in ../abi/src/wp/ap/unix: ap_UnixDialog_MergeCells.o Only in ../abi/src/wp/ap/unix: ap_UnixDialog_MetaData.o Only in ../abi/src/wp/ap/unix: ap_UnixDialog_New.o Only in ../abi/src/wp/ap/unix: ap_UnixDialog_Options.o Only in ../abi/src/wp/ap/unix: ap_UnixDialog_PageNumbers.o Only in ../abi/src/wp/ap/unix: ap_UnixDialog_PageSetup.o Only in ../abi/src/wp/ap/unix: ap_UnixDialog_Paragraph.o diff -ru ../../abiword-2.0.11.abicvs/abi/src/wp/ap/unix/ap_UnixDialog_Replace.cpp ../abi/src/wp/ap/unix/ap_UnixDialog_Replace.cpp --- ../../abiword-2.0.11.abicvs/abi/src/wp/ap/unix/ap_UnixDialog_Replace.cpp 2003-09-30 13:29:59.000000000 +0100 +++ ../abi/src/wp/ap/unix/ap_UnixDialog_Replace.cpp 2004-09-02 12:27:32.000000000 +0100 @@ -239,7 +239,11 @@ void AP_UnixDialog_Replace::event_MatchCaseToggled(void) { - setMatchCase(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(m_checkbuttonMatchCase))); + //ABL-PSION 16/08/2004 - PSIBUG# + bool caseSensitive = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(m_checkbuttonMatchCase)); + setMatchCase(caseSensitive); + gtk_combo_set_case_sensitive(GTK_COMBO(m_comboFind), caseSensitive); + gtk_combo_set_case_sensitive(GTK_COMBO(m_comboReplace), caseSensitive); } void AP_UnixDialog_Replace::event_WholeWordToggled(void) diff -ru ../../abiword-2.0.11.abicvs/abi/src/wp/ap/unix/ap_UnixDialog_Replace.glade ../abi/src/wp/ap/unix/ap_UnixDialog_Replace.glade --- ../../abiword-2.0.11.abicvs/abi/src/wp/ap/unix/ap_UnixDialog_Replace.glade 2003-05-26 22:59:08.000000000 +0100 +++ ../abi/src/wp/ap/unix/ap_UnixDialog_Replace.glade 2004-09-02 12:27:32.000000000 +0100 @@ -11,6 +11,11 @@ False True False + True + False + False + GDK_WINDOW_TYPE_HINT_DIALOG + GDK_GRAVITY_NORTH_WEST True @@ -32,6 +37,7 @@ gtk-close True GTK_RELIEF_NORMAL + True -7 @@ -215,6 +221,7 @@ Match case True GTK_RELIEF_NORMAL + True False False True @@ -229,10 +236,10 @@ True - True Whole word True GTK_RELIEF_NORMAL + False False False True @@ -247,10 +254,10 @@ True - True Reverse find True GTK_RELIEF_NORMAL + False False False True @@ -279,10 +286,12 @@ True True + True True gtk-find True GTK_RELIEF_NORMAL + True @@ -294,6 +303,7 @@ gtk-find-and-replace True GTK_RELIEF_NORMAL + True @@ -303,6 +313,7 @@ True True GTK_RELIEF_NORMAL + True @@ -311,6 +322,10 @@ 0.5 0 0 + 0 + 0 + 0 + 0 Only in ../abi/src/wp/ap/unix: ap_UnixDialog_Replace.o Only in ../abi/src/wp/ap/unix: ap_UnixDialog_Spell.o diff -ru ../../abiword-2.0.11.abicvs/abi/src/wp/ap/unix/ap_UnixDialog_Styles.cpp ../abi/src/wp/ap/unix/ap_UnixDialog_Styles.cpp --- ../../abiword-2.0.11.abicvs/abi/src/wp/ap/unix/ap_UnixDialog_Styles.cpp 2003-12-29 21:55:28.000000000 +0000 +++ ../abi/src/wp/ap/unix/ap_UnixDialog_Styles.cpp 2004-09-15 15:44:51.000000000 +0100 @@ -20,6 +20,11 @@ // for gtkclist and gtklist #undef GTK_DISABLE_DEPRECATED +// Preview in modify style dialog does not work so remove it. +// It is fixed in latest (10/08/04) unstable AbiWord Code but can not be easily +// back ported. - ABL +//#define ABL_ENABLE_MODIFYSTYLE_PREVIEW + #include #include "ut_string.h" @@ -40,6 +45,8 @@ #include "pd_Style.h" #include "ut_string_class.h" +#define STR_COMPARE UT_stricmp + // define to 0 to popup dialogs on top of each other, 1 to hide them #define HIDE_MAIN_DIALOG 0 @@ -294,6 +301,10 @@ static_cast(m_wCharPreviewArea->allocation.width), static_cast(m_wCharPreviewArea->allocation.height)); +// connect the select_row signal to the clist +// g_signal_connect (G_OBJECT (m_wclistStyles), "select_row", + // G_CALLBACK (s_clist_clicked), reinterpret_cast(this)); + // Populate the window's data items _populateWindowData(); @@ -312,21 +323,63 @@ g_signal_connect (G_OBJECT (m_wclistStyles), "select_row", G_CALLBACK (s_clist_clicked), reinterpret_cast(this)); - // main loop for the dialog - while(true) - { - if(abiRunModalDialog(GTK_DIALOG(m_windowMain), false) == BUTTON_APPLY) + if(m_ModType != SMD_ALL) + { +#if HIDE_MAIN_DIALOG +// +// Hide the old window +// + gtk_widget_hide(m_windowMain); +#endif + switch(m_ModType) { - event_Apply(); - } - else + case SMD_PARAGRAPH: + ModifyParagraph(); + break; + case SMD_FONT: + ModifyFont(); + break; + case SMD_TABS: + ModifyTabs(); + break; + case SMD_NUMBERING: + ModifyLists(); + break; + case SMD_LANGUAGE: + ModifyLang(); + break; + default: + UT_ASSERT(m_ModType); + }; + +#if HIDE_MAIN_DIALOG +// +// Show the old window +// + // gtk_widget_show(m_windowMain); +#endif + applyModifiedStyleToDoc(); + getDoc()->updateDocForStyleChange(getCurrentStyle(),true); + getDoc()->signalListeners(PD_SIGNAL_UPDATE_LAYOUT); + event_Apply(); + } + else + { + // main loop for the dialog + while(true) { - event_Close(); + if(abiRunModalDialog(GTK_DIALOG(m_windowMain), false) == BUTTON_APPLY) + { + event_Apply(); + } + else + { + event_Close(); + } + break ; // exit the loop } - break ; // exit the loop } - DELETEP (m_pParaPreviewWidget); DELETEP (m_pCharPreviewWidget); @@ -668,7 +721,7 @@ { } -void AP_UnixDialog_Styles::_populateCList(void) const +void AP_UnixDialog_Styles::_populateCList(void)// const { const PD_Style * pStyle; const char * name = NULL; @@ -679,6 +732,19 @@ gtk_clist_freeze (GTK_CLIST (m_wclistStyles)); gtk_clist_clear (GTK_CLIST (m_wclistStyles)); + UT_uint32 CurStyleIndex = 1; + /*UT_uint32*/ int StyleIndex=0; + const XML_Char *pCurStyle; + PD_Style * pSelStyle = NULL; + UT_DEBUGMSG(("about to get current style\n")); + getView()->getStyle(&pCurStyle); +// { + // PD_Style * pSelStyle = NULL; + // UT_DEBUGMSG(("about to get style name\n")); + //getLDoc()->getStyle(pCurStyle, &pSelStyle); + //} +// const char * szStyle = getCurrentStyle(); + for (UT_uint32 i = 0; i < nStyles; i++) { const char * data[1]; @@ -697,11 +763,27 @@ (m_whichType == USER_STYLES && pStyle->isUserDefined())) { gtk_clist_append (GTK_CLIST(m_wclistStyles), const_cast(reinterpret_cast(&data[0]))); + //UT_DEBUGMSG(("about to compare style [%s]=?[%s]\n",szStyle, name)); + // if(pStyle == pSelStyle) + UT_DEBUGMSG(("about to compare style [%s]=?[%s]\n",pCurStyle, name)); + if(STR_COMPARE(pCurStyle, name)==0) + //if(STR_COMPARE(szStyle, name)==0) + { + CurStyleIndex = StyleIndex; + + m_whichRow = StyleIndex; + UT_DEBUGMSG(("Style Match !\n")); + } + StyleIndex++; } } - +//UT_DEBUGMSG(("added font widths to cache for font with hashkey '%s'\n", pFont->hashKey().c_str())); +UT_DEBUGMSG(("about to select style\n")); gtk_clist_thaw (GTK_CLIST (m_wclistStyles)); - gtk_clist_select_row (GTK_CLIST (m_wclistStyles), 0, 0); + gtk_clist_select_row (GTK_CLIST (m_wclistStyles), CurStyleIndex, 0); + gtk_clist_moveto (GTK_CLIST (m_wclistStyles), CurStyleIndex, 0, 0, 0); +// event_ClistClicked((int)StyleIndex, 0); +// updateCurrentStyle(); } void AP_UnixDialog_Styles::_populateWindowData(void) @@ -900,7 +982,7 @@ (GtkAttachOptions) (0), 0, 0); gtk_widget_set_size_request (styleTypeEntry, 158, -1); } - +#ifdef ABL_DISABLE_MODIFYSTYLE_PREVIEW previewFrame = gtk_frame_new (pSS->getValueUTF8(AP_STRING_ID_DLG_Styles_ModifyPreview).utf8_str()); gtk_frame_set_shadow_type(GTK_FRAME(previewFrame), GTK_SHADOW_NONE); gtk_widget_show (previewFrame); @@ -911,7 +993,7 @@ gtk_widget_show (modifyDrawingArea); gtk_container_add (GTK_CONTAINER (previewFrame), modifyDrawingArea); gtk_widget_set_size_request (modifyDrawingArea, -1, 120); - +#endif GtkWidget * descriptionFrame = gtk_frame_new (pSS->getValueUTF8(AP_STRING_ID_DLG_Styles_ModifyDescription).utf8_str()); gtk_frame_set_shadow_type(GTK_FRAME(descriptionFrame), GTK_SHADOW_NONE); gtk_widget_show (descriptionFrame); @@ -1077,10 +1159,13 @@ G_CALLBACK(s_modify_language), reinterpret_cast(this)); - g_signal_connect(G_OBJECT(m_wModifyDrawingArea), - "expose_event", - G_CALLBACK(s_modifyPreview_exposed), - reinterpret_cast(this)); + if((m_wModifyDrawingArea != NULL)) + { + g_signal_connect(G_OBJECT(m_wModifyDrawingArea), + "expose_event", + G_CALLBACK(s_modifyPreview_exposed), + reinterpret_cast(this)); + } g_signal_connect(G_OBJECT(m_wDeletePropButton), "clicked", @@ -1261,6 +1346,7 @@ XAP_UnixApp * unixapp = static_cast (m_pApp); UT_ASSERT(unixapp); +#ifdef ABL_ENABLE_MODIFYSTYLE_PREVIEW DELETEP (m_pAbiPreviewWidget); m_pAbiPreviewWidget = new GR_UnixGraphics(m_wModifyDrawingArea->window, unixapp->getFontManager(), m_pApp); @@ -1271,7 +1357,8 @@ static_cast(m_wModifyDrawingArea->allocation.height)); _populateAbiPreview(isNew()); - +#endif + switch(abiRunModalDialog(GTK_DIALOG(m_wModifyDialog), false)) { case BUTTON_MODIFY_OK: @@ -1279,7 +1366,8 @@ default: event_Modify_Cancel(); break ; } - + + if(m_wModifyDialog && GTK_IS_WIDGET(m_wModifyDialog)) { // @@ -1304,6 +1392,7 @@ } gtk_widget_destroy(m_wModifyDialog); } + // // Have to delete this now since the destructor is not run till later // @@ -1358,6 +1447,14 @@ setIsNew(false); modifyRunModal(); + +#if HIDE_MAIN_DIALOG +// +// Reveal main window again +// + gtk_widget_show( m_windowMain); +#endif + if(m_answer == AP_Dialog_Styles::a_OK) { applyModifiedStyleToDoc(); @@ -1374,12 +1471,7 @@ // Restore the values in the main dialog // -#if HIDE_MAIN_DIALOG -// -// Reveal main window again -// - gtk_widget_show( m_windowMain); -#endif + } void AP_UnixDialog_Styles::setModifyDescription( const char * desc) diff -ru ../../abiword-2.0.11.abicvs/abi/src/wp/ap/unix/ap_UnixDialog_Styles.h ../abi/src/wp/ap/unix/ap_UnixDialog_Styles.h --- ../../abiword-2.0.11.abicvs/abi/src/wp/ap/unix/ap_UnixDialog_Styles.h 2002-08-01 21:19:06.000000000 +0100 +++ ../abi/src/wp/ap/unix/ap_UnixDialog_Styles.h 2004-09-02 12:27:32.000000000 +0100 @@ -103,7 +103,7 @@ virtual GtkWidget * _constructWindow(void); GtkWidget * _constructWindowContents(GtkWidget * parent); void _populateWindowData(void); - void _populateCList(void) const; + void _populateCList(void);// const; void _storeWindowData(void) const; void _connectsignals(void) const; virtual const char * getCurrentStyle (void) const; @@ -183,10 +183,3 @@ }; #endif /* AP_UnixDialog_Styles_H */ - - - - - - - Only in ../abi/src/wp/ap/unix: ap_UnixDialog_Styles.o Only in ../abi/src/wp/ap/unix: ap_UnixDialog_Tab.o Only in ../abi/src/wp/ap/unix: ap_UnixDialog_ToggleCase.o Only in ../abi/src/wp/ap/unix: ap_UnixDialog_WordCount.o Only in ../abi/src/wp/ap/unix: ap_UnixFrame.o Only in ../abi/src/wp/ap/unix: ap_UnixFrameImpl.o Only in ../abi/src/wp/ap/unix: ap_UnixLeftRuler.o Only in ../abi/src/wp/ap/unix: ap_UnixPrefs.o Only in ../abi/src/wp/ap/unix: ap_UnixStatusBar.o Only in ../abi/src/wp/ap/unix: ap_UnixToolbar_FontCombo.o Only in ../abi/src/wp/ap/unix: ap_UnixToolbar_SizeCombo.o diff -ru ../../abiword-2.0.11.abicvs/abi/src/wp/ap/unix/ap_UnixToolbar_StyleCombo.cpp ../abi/src/wp/ap/unix/ap_UnixToolbar_StyleCombo.cpp --- ../../abiword-2.0.11.abicvs/abi/src/wp/ap/unix/ap_UnixToolbar_StyleCombo.cpp 2003-03-05 16:20:12.000000000 +0000 +++ ../abi/src/wp/ap/unix/ap_UnixToolbar_StyleCombo.cpp 2004-09-21 14:32:17.000000000 +0100 @@ -69,7 +69,8 @@ m_vecContents.addItem(reinterpret_cast("Heading 1")); m_vecContents.addItem(reinterpret_cast("Heading 2")); m_vecContents.addItem(reinterpret_cast("Heading 3")); - m_vecContents.addItem(reinterpret_cast("Plain Text")); +// m_vecContents.addItem(reinterpret_cast("Plain Text")); + m_vecContents.addItem(reinterpret_cast("Typewriter")); m_vecContents.addItem(reinterpret_cast("Block Text")); #else // TODO: need a view/doc pointer to get this right @@ -112,6 +113,3 @@ } return true; } - - - Only in ../abi/src/wp/ap/unix: ap_UnixToolbar_StyleCombo.o diff -ru ../../abiword-2.0.11.abicvs/abi/src/wp/ap/unix/ap_UnixToolbar_ZoomCombo.cpp ../abi/src/wp/ap/unix/ap_UnixToolbar_ZoomCombo.cpp --- ../../abiword-2.0.11.abicvs/abi/src/wp/ap/unix/ap_UnixToolbar_ZoomCombo.cpp 2003-03-03 03:25:36.000000000 +0000 +++ ../abi/src/wp/ap/unix/ap_UnixToolbar_ZoomCombo.cpp 2004-09-20 13:52:57.000000000 +0100 @@ -60,9 +60,9 @@ m_vecContents.addItem((void *) "200%"); m_vecContents.addItem((void *) "150%"); m_vecContents.addItem((void *) "100%"); - m_vecContents.addItem((void *) "75%"); + /*m_vecContents.addItem((void *) "75%"); m_vecContents.addItem((void *) "50%"); - m_vecContents.addItem((void *) "25%"); + m_vecContents.addItem((void *) "25%");*/ const XAP_StringSet * pSS = XAP_App::getApp()->getStringSet(); @@ -72,4 +72,3 @@ return true; } - Only in ../abi/src/wp/ap/unix: ap_UnixToolbar_ZoomCombo.o Only in ../abi/src/wp/ap/unix: ap_UnixTopRuler.o Only in ../abi/src/wp/ap/unix: ap_UnixViewListener.o Only in ../abi/src/wp/ap/unix: ap_Unix_TB_CFactory.o Only in ../abi/src/wp/ap/unix/gnome: GNUmakefile Only in ../abi/src/wp/ap/unix/gnome: GNUmakefile.in Only in ../abi/src/wp/ap/unix: libWpAp_unix.a Only in ../abi/src/wp/ap/xp: .deps Only in ../abi/src/wp/ap/xp: GNUmakefile Only in ../abi/src/wp/ap/xp: GNUmakefile.in Only in ../abi/src/wp/ap/xp: ap_App.o Only in ../abi/src/wp/ap/xp: ap_Args.o Only in ../abi/src/wp/ap/xp: ap_Convert.o Only in ../abi/src/wp/ap/xp: ap_Dialog_Background.o Only in ../abi/src/wp/ap/xp: ap_Dialog_Break.o Only in ../abi/src/wp/ap/xp: ap_Dialog_Columns.o Only in ../abi/src/wp/ap/xp: ap_Dialog_Field.o Only in ../abi/src/wp/ap/xp: ap_Dialog_FormatFootnotes.o Only in ../abi/src/wp/ap/xp: ap_Dialog_FormatTable.o Only in ../abi/src/wp/ap/xp: ap_Dialog_Goto.o Only in ../abi/src/wp/ap/xp: ap_Dialog_HdrFtr.o Only in ../abi/src/wp/ap/xp: ap_Dialog_InsertBookmark.o Only in ../abi/src/wp/ap/xp: ap_Dialog_InsertHyperlink.o Only in ../abi/src/wp/ap/xp: ap_Dialog_InsertTable.o Only in ../abi/src/wp/ap/xp: ap_Dialog_Insert_DateTime.o Only in ../abi/src/wp/ap/xp: ap_Dialog_ListRevisions.o Only in ../abi/src/wp/ap/xp: ap_Dialog_Lists.o Only in ../abi/src/wp/ap/xp: ap_Dialog_MailMerge.o Only in ../abi/src/wp/ap/xp: ap_Dialog_MarkRevisions.o Only in ../abi/src/wp/ap/xp: ap_Dialog_MergeCells.o Only in ../abi/src/wp/ap/xp: ap_Dialog_New.o Only in ../abi/src/wp/ap/xp: ap_Dialog_Options.o Only in ../abi/src/wp/ap/xp: ap_Dialog_PageNumbers.o Only in ../abi/src/wp/ap/xp: ap_Dialog_PageSetup.o Only in ../abi/src/wp/ap/xp: ap_Dialog_Paragraph.o Only in ../abi/src/wp/ap/xp: ap_Dialog_Replace.o Only in ../abi/src/wp/ap/xp: ap_Dialog_Spell.o diff -ru ../../abiword-2.0.11.abicvs/abi/src/wp/ap/xp/ap_Dialog_Styles.cpp ../abi/src/wp/ap/xp/ap_Dialog_Styles.cpp --- ../../abiword-2.0.11.abicvs/abi/src/wp/ap/xp/ap_Dialog_Styles.cpp 2004-06-03 09:13:01.000000000 +0100 +++ ../abi/src/wp/ap/xp/ap_Dialog_Styles.cpp 2004-09-02 12:27:32.000000000 +0100 @@ -49,6 +49,7 @@ : XAP_Dialog_NonPersistent(pDlgFactory,id, "interface/dialogstyles") { + m_ModType = SMD_ALL; m_answer = a_OK; m_pParaPreview = NULL; m_pCharPreview = NULL; @@ -1228,6 +1229,7 @@ UT_ASSERT(m_pAbiPreview); } + /*! * This is the FV_View pointer for our mini-abi in the second pane preview. */ @@ -1698,3 +1700,8 @@ } } } + +void AP_Dialog_Styles::SetModifyType(SytleModType type) +{ + m_ModType = type; +} diff -ru ../../abiword-2.0.11.abicvs/abi/src/wp/ap/xp/ap_Dialog_Styles.h ../abi/src/wp/ap/xp/ap_Dialog_Styles.h --- ../../abiword-2.0.11.abicvs/abi/src/wp/ap/xp/ap_Dialog_Styles.h 2004-06-03 09:13:01.000000000 +0100 +++ ../abi/src/wp/ap/xp/ap_Dialog_Styles.h 2004-09-02 12:27:32.000000000 +0100 @@ -31,6 +31,8 @@ #include "xap_Preview.h" #include "ap_Preview_Paragraph.h" +typedef enum SytleModType {SMD_ALL, SMD_PARAGRAPH, SMD_FONT, SMD_TABS, SMD_NUMBERING, SMD_LANGUAGE}; + class AP_Dialog_Styles : public XAP_Dialog_NonPersistent { public: @@ -44,6 +46,7 @@ // wish that this could be protected void _tabCallback(const char *, const char *); + void SetModifyType(SytleModType); protected: void event_paraPreviewUpdated (const XML_Char * pageLeftMargin, @@ -78,7 +81,7 @@ void ModifyParagraph(void); void ModifyTabs(void); void ModifyLang(void); - + void updateCurrentStyle(void); bool createNewStyle(const XML_Char * szName); bool applyModifiedStyleToDoc(void); @@ -105,6 +108,7 @@ AP_Preview_Abi * m_pAbiPreview; UT_Vector m_vecAllProps; UT_Vector m_vecAllAttribs; + SytleModType m_ModType; private: XAP_Frame * m_pFrame; @@ -115,17 +119,7 @@ PT_DocPosition m_posAfter; UT_Vector m_vecCharProps; UT_String m_ListProps[8]; + }; #endif /* AP_Dialog_Styles_H */ - - - - - - - - - - - Only in ../abi/src/wp/ap/xp: ap_Dialog_Styles.o Only in ../abi/src/wp/ap/xp: ap_Dialog_Tab.o Only in ../abi/src/wp/ap/xp: ap_Dialog_ToggleCase.o Only in ../abi/src/wp/ap/xp: ap_Dialog_WordCount.o diff -ru ../../abiword-2.0.11.abicvs/abi/src/wp/ap/xp/ap_EditMethods.cpp ../abi/src/wp/ap/xp/ap_EditMethods.cpp --- ../../abiword-2.0.11.abicvs/abi/src/wp/ap/xp/ap_EditMethods.cpp 2004-09-14 14:33:00.000000000 +0100 +++ ../abi/src/wp/ap/xp/ap_EditMethods.cpp 2004-09-20 17:35:24.000000000 +0100 @@ -162,7 +162,8 @@ static EV_EditMethod_Fn warpInsPtBOB; static EV_EditMethod_Fn warpInsPtEOB; static EV_EditMethod_Fn warpInsPtBOD; - static EV_EditMethod_Fn warpInsPtEOD; + static EV_EditMethod_Fn warpInsPtEOD;; + static EV_EditMethod_Fn warpInsPtPrevPage; static EV_EditMethod_Fn warpInsPtNextPage; static EV_EditMethod_Fn warpInsPtPrevScreen; @@ -373,8 +374,9 @@ static EV_EditMethod_Fn dlgZoom; static EV_EditMethod_Fn viewFullScreen; - static EV_EditMethod_Fn zoom100; static EV_EditMethod_Fn zoom200; + static EV_EditMethod_Fn zoom100; + static EV_EditMethod_Fn zoom150; static EV_EditMethod_Fn zoom75; static EV_EditMethod_Fn zoom50; static EV_EditMethod_Fn zoomWidth; @@ -408,6 +410,11 @@ static EV_EditMethod_Fn style; static EV_EditMethod_Fn dlgBackground; static EV_EditMethod_Fn dlgStyle; + static EV_EditMethod_Fn dlgStyleParagraph; + static EV_EditMethod_Fn dlgStyleFont; + static EV_EditMethod_Fn dlgStyleTabs; + static EV_EditMethod_Fn dlgStyleNumbering; + static EV_EditMethod_Fn dlgStyleLanguage; static EV_EditMethod_Fn dlgTabs; static EV_EditMethod_Fn formatFootnotes; static EV_EditMethod_Fn dlgToggleCase; @@ -597,7 +604,7 @@ static EV_EditMethod_Fn scriptPlay; static EV_EditMethod_Fn executeScript; - static EV_EditMethod_Fn mailMerge; + static EV_EditMethod_Fn mailMerge; static EV_EditMethod_Fn hyperlinkJump; static EV_EditMethod_Fn hyperlinkStatusBar; @@ -732,6 +739,11 @@ EV_EditMethod(NF(dlgSpell), 0, ""), EV_EditMethod(NF(dlgSpellPrefs), 0, ""), EV_EditMethod(NF(dlgStyle), 0, ""), + EV_EditMethod(NF(dlgStyleFont), 0, ""), + EV_EditMethod(NF(dlgStyleLanguage), 0, ""), + EV_EditMethod(NF(dlgStyleNumbering), 0, ""), + EV_EditMethod(NF(dlgStyleParagraph), 0, ""), + EV_EditMethod(NF(dlgStyleTabs), 0, ""), EV_EditMethod(NF(dlgTabs), 0, ""), EV_EditMethod(NF(dlgToggleCase), 0, ""), EV_EditMethod(NF(dlgWordCount), 0, ""), @@ -1110,13 +1122,14 @@ // y // z - EV_EditMethod(NF(zoom), 0, ""), - EV_EditMethod(NF(zoom100), 0, ""), - EV_EditMethod(NF(zoom200), 0, ""), - EV_EditMethod(NF(zoom50), 0, ""), - EV_EditMethod(NF(zoom75), 0, ""), - EV_EditMethod(NF(zoomIn), 0, ""), - EV_EditMethod(NF(zoomOut), 0, ""), + EV_EditMethod(NF(zoom), 0, ""), + EV_EditMethod(NF(zoom100), 0, ""), + EV_EditMethod(NF(zoom150), 0, ""), + EV_EditMethod(NF(zoom200), 0, ""), + EV_EditMethod(NF(zoom50), 0, ""), + EV_EditMethod(NF(zoom75), 0, ""), + EV_EditMethod(NF(zoomIn), 0, ""), + EV_EditMethod(NF(zoomOut), 0, ""), EV_EditMethod(NF(zoomWhole), 0, ""), EV_EditMethod(NF(zoomWidth), 0, "") }; @@ -1149,10 +1162,24 @@ static bool _openURL(AV_View* pAV_View, const char* url); static UT_Timer * s_pToUpdateCursor = NULL; +static UT_Worker * s_pFrequentRepeat = NULL; static XAP_Frame * s_pLoadingFrame = NULL; static AD_Document * s_pLoadingDoc = NULL; static bool s_LockOutGUI = false; +class _Freq +{ +public: + _Freq(AV_View * pView,EV_EditMethodCallData * pData, void(* exe)(AV_View *pView,EV_EditMethodCallData * pData)): + m_pView (pView), + m_pData(pData), + m_pExe(exe) + {}; + AV_View * m_pView; + EV_EditMethodCallData * m_pData; + void(* m_pExe)(AV_View * ,EV_EditMethodCallData *) ; +}; + /*! This little macro locks out loading frames from any activity thus preventing segfaults. @@ -1165,6 +1192,10 @@ { return true; } + if(s_pFrequentRepeat != NULL) + { + return true; + } XAP_Frame * pFrame = XAP_App::getApp()->getLastFocussedFrame(); AV_View * pView = NULL; if(pFrame) @@ -1207,6 +1238,27 @@ #define CHECK_FRAME if(s_EditMethods_check_frame()) return true; + +/*! + * use this code to execute a one-off operation in an idle loop. + * This allows us to drop frequent events like those that come from arrow keys + * so we never get ahead of ourselves. + */ +static void _sFrequentRepeat(UT_Worker * pWorker) +{ + _Freq * pFreq = static_cast<_Freq *>(pWorker->getInstanceData()); + pFreq->m_pExe(pFreq->m_pView,pFreq->m_pData); +// +// Once then delete, stop and set to NULL +// + DELETEP(pFreq->m_pData); + delete pFreq; + s_pFrequentRepeat->stop(); + delete s_pFrequentRepeat; + s_pFrequentRepeat = NULL; +} + + Defun1(toggleAutoSpell) { CHECK_FRAME; @@ -3438,19 +3490,92 @@ return true; } +static void sActualMoveLeft(AV_View * pAV_View, EV_EditMethodCallData * pCallData) +{ + ABIWORD_VIEW; + pView->cmdCharMotion(false,1); + if(pView->getGraphics() && pView->getGraphics()->getCaret()) + { +// +// Draw fsking caret for sure!!! +// + pView->getGraphics()->getCaret()->forceDraw(); + } +} + Defun1(warpInsPtLeft) { CHECK_FRAME; ABIWORD_VIEW; pView->cmdCharMotion(pView->getCurrentBlock()->getDominantDirection() == FRIBIDI_TYPE_RTL,1); +// +// Do this operation in an idle loop so when can reject queued events +// +// +// This code sets things up to handle the warp right in an idle loop. +// + int inMode = UT_WorkerFactory::IDLE | UT_WorkerFactory::TIMER; + UT_WorkerFactory::ConstructMode outMode = UT_WorkerFactory::NONE; + GR_Graphics * pG = pView->getGraphics(); + _Freq * pFreq = new _Freq(pView,NULL,sActualMoveLeft); + s_pFrequentRepeat = UT_WorkerFactory::static_constructor (_sFrequentRepeat,pFreq, inMode, outMode, pG); + + UT_ASSERT(s_pFrequentRepeat); + UT_ASSERT(outMode != UT_WorkerFactory::NONE); + + // If the worker is working on a timer instead of in the idle + // time, set the frequency of the checks. + if ( UT_WorkerFactory::TIMER == outMode ) + { + // this is really a timer, so it's safe to static_cast it + static_cast(s_pFrequentRepeat)->set(1); + } + s_pFrequentRepeat->start(); return true; } +static void sActualMoveRight(AV_View * pAV_View, EV_EditMethodCallData * pCallData) +{ + ABIWORD_VIEW; + pView->cmdCharMotion(true,1); + if(pView->getGraphics() && pView->getGraphics()->getCaret()) + { +// +// Draw the fsking caret for sure!!! +// + pView->getGraphics()->getCaret()->forceDraw(); + } + return; +} + + Defun1(warpInsPtRight) { CHECK_FRAME; ABIWORD_VIEW; - pView->cmdCharMotion(pView->getCurrentBlock()->getDominantDirection() != FRIBIDI_TYPE_RTL,1); + // +// Do this operation in an idle loop so when can reject queued events +// +// +// This code sets things up to handle the warp right in an idle loop. +// + int inMode = UT_WorkerFactory::IDLE | UT_WorkerFactory::TIMER; + UT_WorkerFactory::ConstructMode outMode = UT_WorkerFactory::NONE; + GR_Graphics * pG = pView->getGraphics(); + _Freq * pFreq = new _Freq(pView,NULL,sActualMoveRight); + s_pFrequentRepeat = UT_WorkerFactory::static_constructor (_sFrequentRepeat,pFreq, inMode, outMode, pG); + + UT_ASSERT(s_pFrequentRepeat); + UT_ASSERT(outMode != UT_WorkerFactory::NONE); + + // If the worker is working on a timer instead of in the idle + // time, set the frequency of the checks. + if ( UT_WorkerFactory::TIMER == outMode ) + { + // this is really a timer, so it's safe to static_cast it + static_cast(s_pFrequentRepeat)->set(1); + } + s_pFrequentRepeat->start(); return true; } @@ -3611,7 +3736,22 @@ { CHECK_FRAME; ABIWORD_VIEW; - pView->warpInsPtNextPrevLine(false); +// +// Finish handling current expose before doing the next movement +// + GR_Graphics * pG = pView->getGraphics(); + if(pG && pG->isExposePending()) + { + return true; + } + pView->warpInsPtNextPrevLine(false); + if(pView->getGraphics() && pView->getGraphics()->getCaret()) + { +// +// Draw fsking caret for sure!!! +// + pView->getGraphics()->getCaret()->forceDraw(); + } return true; } @@ -3619,7 +3759,22 @@ { CHECK_FRAME; ABIWORD_VIEW; - pView->warpInsPtNextPrevLine(true); +// +// Finish handling current expose before doing the next movement +// + GR_Graphics * pG = pView->getGraphics(); + if(pG && pG->isExposePending()) + { + return true; + } + pView->warpInsPtNextPrevLine(true); + if(pView->getGraphics() && pView->getGraphics()->getCaret()) + { +// +// Draw fsking caret for sure!!! +// + pView->getGraphics()->getCaret()->forceDraw(); + } return true; } @@ -4286,20 +4441,75 @@ return true; } +static void sActualDelLeft(AV_View * pAV_View, EV_EditMethodCallData * pCallData) +{ + ABIWORD_VIEW; + pView->cmdCharDelete(false,1); +} Defun1(delLeft) { CHECK_FRAME; ABIWORD_VIEW; - pView->cmdCharDelete(false,1); +// +// Do this operation in an idle loop so when can reject queued events +// +// +// This code sets things up to handle the warp right in an idle loop. +// + int inMode = UT_WorkerFactory::IDLE | UT_WorkerFactory::TIMER; + UT_WorkerFactory::ConstructMode outMode = UT_WorkerFactory::NONE; + GR_Graphics * pG = pView->getGraphics(); + _Freq * pFreq = new _Freq(pView,NULL,sActualDelLeft); + s_pFrequentRepeat = UT_WorkerFactory::static_constructor (_sFrequentRepeat,pFreq, inMode, outMode, pG); + + UT_ASSERT(s_pFrequentRepeat); + UT_ASSERT(outMode != UT_WorkerFactory::NONE); + + // If the worker is working on a timer instead of in the idle + // time, set the frequency of the checks. + if ( UT_WorkerFactory::TIMER == outMode ) + { + // this is really a timer, so it's safe to static_cast it + static_cast(s_pFrequentRepeat)->set(1); + } + s_pFrequentRepeat->start(); return true; } +static void sActualDelRight(AV_View * pAV_View, EV_EditMethodCallData * pCallData) +{ + ABIWORD_VIEW; + pView->cmdCharDelete(true,1); +} + Defun1(delRight) { CHECK_FRAME; ABIWORD_VIEW; - pView->cmdCharDelete(true,1); +// +// Do this operation in an idle loop so when can reject queued events +// +// +// This code sets things up to handle the warp right in an idle loop. +// + int inMode = UT_WorkerFactory::IDLE | UT_WorkerFactory::TIMER; + UT_WorkerFactory::ConstructMode outMode = UT_WorkerFactory::NONE; + GR_Graphics * pG = pView->getGraphics(); + _Freq * pFreq = new _Freq(pView,NULL,sActualDelRight); + s_pFrequentRepeat = UT_WorkerFactory::static_constructor (_sFrequentRepeat,pFreq, inMode, outMode, pG); + + UT_ASSERT(s_pFrequentRepeat); + UT_ASSERT(outMode != UT_WorkerFactory::NONE); + + // If the worker is working on a timer instead of in the idle + // time, set the frequency of the checks. + if ( UT_WorkerFactory::TIMER == outMode ) + { + // this is really a timer, so it's safe to static_cast it + static_cast(s_pFrequentRepeat)->set(1); + } + s_pFrequentRepeat->start(); return true; } @@ -4379,11 +4589,41 @@ return true; } +static void sActualInsertData(AV_View * pAV_View, EV_EditMethodCallData * pCallData) +{ + ABIWORD_VIEW; + pView->cmdCharInsert(pCallData->m_pData, pCallData->m_dataLength); + return; +} + Defun(insertData) { CHECK_FRAME; ABIWORD_VIEW; - pView->cmdCharInsert(pCallData->m_pData, pCallData->m_dataLength); +// +// Do this operation in an idle loop so when can reject queued events +// +// +// This code sets things up to handle the warp right in an idle loop. +// + int inMode = UT_WorkerFactory::IDLE | UT_WorkerFactory::TIMER; + UT_WorkerFactory::ConstructMode outMode = UT_WorkerFactory::NONE; + GR_Graphics * pG = pView->getGraphics(); + EV_EditMethodCallData * pNewData = new EV_EditMethodCallData(pCallData->m_pData,pCallData->m_dataLength); + _Freq * pFreq = new _Freq(pView,pNewData,sActualInsertData); + s_pFrequentRepeat = UT_WorkerFactory::static_constructor (_sFrequentRepeat,pFreq, inMode, outMode, pG); + + UT_ASSERT(s_pFrequentRepeat); + UT_ASSERT(outMode != UT_WorkerFactory::NONE); + + // If the worker is working on a timer instead of in the idle + // time, set the frequency of the checks. + if ( UT_WorkerFactory::TIMER == outMode ) + { + // this is really a timer, so it's safe to static_cast it + static_cast(s_pFrequentRepeat)->set(1); + } + s_pFrequentRepeat->start(); return true; } @@ -5538,11 +5778,40 @@ return true; } +static void sActualPaste(AV_View * pAV_View, EV_EditMethodCallData * pCallData) +{ + ABIWORD_VIEW; + pView->cmdPaste(); + return; +} + Defun1(paste) { CHECK_FRAME; ABIWORD_VIEW; - pView->cmdPaste(); +// +// Do this operation in an idle loop so when can reject queued events +// +// +// This code sets things up to handle the warp right in an idle loop. +// + int inMode = UT_WorkerFactory::IDLE | UT_WorkerFactory::TIMER; + UT_WorkerFactory::ConstructMode outMode = UT_WorkerFactory::NONE; + GR_Graphics * pG = pView->getGraphics(); + _Freq * pFreq = new _Freq(pView,NULL,sActualPaste); + s_pFrequentRepeat = UT_WorkerFactory::static_constructor (_sFrequentRepeat,pFreq, inMode, outMode, pG); + + UT_ASSERT(s_pFrequentRepeat); + UT_ASSERT(outMode != UT_WorkerFactory::NONE); + + // If the worker is working on a timer instead of in the idle + // time, set the frequency of the checks. + if ( UT_WorkerFactory::TIMER == outMode ) + { + // this is really a timer, so it's safe to static_cast it + static_cast(s_pFrequentRepeat)->set(1); + } + s_pFrequentRepeat->start(); return true; } @@ -6997,7 +7266,34 @@ return bOK; } -Defun1(zoom100) +Defun1(zoom200) +{ + CHECK_FRAME; + ABIWORD_VIEW; + XAP_Frame * pFrame = static_cast ( pView->getParentData()); + UT_ASSERT(pFrame); + XAP_App * pApp = pFrame->getApp(); + UT_ASSERT(pApp); + XAP_Prefs * pPrefs = pApp->getPrefs(); + UT_ASSERT(pPrefs); + XAP_PrefsScheme *pPrefsScheme = pPrefs->getCurrentScheme(); + UT_ASSERT(pPrefsScheme); + pPrefsScheme->setValue(static_cast(XAP_PREF_KEY_ZoomType), + static_cast("200")); + + pFrame->raise(); + + UT_uint32 newZoom = 200; + pFrame->setZoomType( XAP_Frame::z_200 ); + + s_StartStopLoadingCursor(true, pFrame); + pFrame->setZoomPercentage(newZoom); + s_StartStopLoadingCursor(false, pFrame); + + return true; +} + +Defun1(zoom150) { CHECK_FRAME; ABIWORD_VIEW; @@ -7010,12 +7306,12 @@ XAP_PrefsScheme *pPrefsScheme = pPrefs->getCurrentScheme(); UT_ASSERT(pPrefsScheme); pPrefsScheme->setValue(static_cast(XAP_PREF_KEY_ZoomType), - static_cast("100")); + static_cast("150")); pFrame->raise(); - UT_uint32 newZoom = 100; - pFrame->setZoomType( XAP_Frame::z_100 ); + UT_uint32 newZoom = 150; + pFrame->setZoomType( XAP_Frame::z_150 ); s_StartStopLoadingCursor(true, pFrame); pFrame->setZoomPercentage(newZoom); @@ -7024,12 +7320,12 @@ return true; } -Defun1(zoom200) +Defun1(zoom100) { CHECK_FRAME; ABIWORD_VIEW; - XAP_Frame * pFrame = static_cast ( pView->getParentData()); - UT_ASSERT(pFrame); + XAP_Frame * pFrame = static_cast ( pView->getParentData()); + UT_ASSERT(pFrame); XAP_App * pApp = pFrame->getApp(); UT_ASSERT(pApp); XAP_Prefs * pPrefs = pApp->getPrefs(); @@ -7037,12 +7333,12 @@ XAP_PrefsScheme *pPrefsScheme = pPrefs->getCurrentScheme(); UT_ASSERT(pPrefsScheme); pPrefsScheme->setValue(static_cast(XAP_PREF_KEY_ZoomType), - static_cast("200")); + static_cast("100")); pFrame->raise(); - UT_uint32 newZoom = 200; - pFrame->setZoomType( XAP_Frame::z_200 ); + UT_uint32 newZoom = 100; + pFrame->setZoomType( XAP_Frame::z_100 ); s_StartStopLoadingCursor(true, pFrame); pFrame->setZoomPercentage(newZoom); @@ -7091,12 +7387,12 @@ XAP_PrefsScheme *pPrefsScheme = pPrefs->getCurrentScheme(); UT_ASSERT(pPrefsScheme); pPrefsScheme->setValue(static_cast(XAP_PREF_KEY_ZoomType), - static_cast("75")); + static_cast("150"/*"75"*/)); pFrame->raise(); - UT_uint32 newZoom = 75; - pFrame->setZoomType( XAP_Frame::z_75 ); + UT_uint32 newZoom = 150/*75*/; + pFrame->setZoomType( XAP_Frame::z_150/*75*/ ); s_StartStopLoadingCursor(true, pFrame); pFrame->setZoomPercentage(newZoom); @@ -7172,7 +7468,7 @@ UT_ASSERT(pFrame); pFrame->raise(); - UT_uint32 newZoom = UT_MIN(pFrame->getZoomPercentage() + 10, 500); + UT_uint32 newZoom = UT_MIN(pFrame->getZoomPercentage() + 25, 500); UT_String tmp (UT_String_sprintf("%d",newZoom)); XAP_App * pApp = pFrame->getApp(); UT_ASSERT(pApp); @@ -7201,7 +7497,7 @@ pFrame->raise(); - UT_uint32 newZoom = UT_MAX(pFrame->getZoomPercentage() - 10, 10); + UT_uint32 newZoom = UT_MAX(pFrame->getZoomPercentage() - 25, 10); UT_String tmp (UT_String_sprintf("%d",newZoom)); XAP_App * pApp = pFrame->getApp(); UT_ASSERT(pApp); @@ -9105,6 +9401,66 @@ return bOK; } +static bool s_doStylesModifyDlg(FV_View * pView, SytleModType type) +{ + XAP_Frame * pFrame = static_cast(pView->getParentData()); + UT_ASSERT(pFrame); + + pFrame->raise(); + + XAP_DialogFactory * pDialogFactory + = static_cast(pFrame->getDialogFactory()); + + AP_Dialog_Styles * pDialog + = static_cast(pDialogFactory->requestDialog(AP_DIALOG_ID_STYLES)); + UT_ASSERT(pDialog); + if (!pDialog) + return false; + if(pView->isHdrFtrEdit()) + { + pView->clearHdrFtrEdit(); + pView->warpInsPtToXY(0,0,false); + } + + pDialog->SetModifyType(type); + pDialog->runModal(pFrame); + +// AP_Dialog_Styles::tAnswer ans = pDialog->getAnswer(); + bool bOK = true; +// +// update the combo box with the new styles. +// + XAP_App * pApp = pFrame->getApp(); + UT_ASSERT(pApp); + // + // Get all clones of this frame and set styles combo box + // + UT_Vector vClones; + if(pFrame->getViewNumber() > 0) + { + pApp->getClones(&vClones,pFrame); + for (UT_uint32 i = 0; i < vClones.getItemCount(); i++) + { + XAP_Frame * f = static_cast(vClones.getNthItem(i)); + f->repopulateCombos(); + } + } + else + { + pFrame->repopulateCombos(); + } +// +// Now update all views on the document. Do this always to be safe. +// + { + PD_Document * pDoc = pView->getLayout()->getDocument(); + pDoc->signalListeners(PD_SIGNAL_UPDATE_LAYOUT); + } + + pDialogFactory->releaseDialog(pDialog); + return bOK; +} + Defun1(formatFootnotes) { CHECK_FRAME; @@ -9154,6 +9510,7 @@ #endif return true; } + Defun1(dlgStyle) { CHECK_FRAME; @@ -9164,6 +9521,56 @@ return s_doStylesDlg(pView); } +Defun1(dlgStyleParagraph) +{ + CHECK_FRAME; + XAP_Frame * pFrame = static_cast ( pAV_View->getParentData()); + UT_ASSERT(pFrame); + ABIWORD_VIEW; + + return s_doStylesModifyDlg(pView, SMD_PARAGRAPH); +} + +Defun1(dlgStyleFont) +{ + CHECK_FRAME; + XAP_Frame * pFrame = static_cast ( pAV_View->getParentData()); + UT_ASSERT(pFrame); + ABIWORD_VIEW; + + return s_doStylesModifyDlg(pView, SMD_FONT); +} + +Defun1(dlgStyleTabs) +{ + CHECK_FRAME; + XAP_Frame * pFrame = static_cast ( pAV_View->getParentData()); + UT_ASSERT(pFrame); + ABIWORD_VIEW; + + return s_doStylesModifyDlg(pView, SMD_TABS); +} + +Defun1(dlgStyleNumbering) +{ + CHECK_FRAME; + XAP_Frame * pFrame = static_cast ( pAV_View->getParentData()); + UT_ASSERT(pFrame); + ABIWORD_VIEW; + + return s_doStylesModifyDlg(pView, SMD_NUMBERING); +} + +Defun1(dlgStyleLanguage) +{ + CHECK_FRAME; + XAP_Frame * pFrame = static_cast ( pAV_View->getParentData()); + UT_ASSERT(pFrame); + ABIWORD_VIEW; + + return s_doStylesModifyDlg(pView, SMD_LANGUAGE); +} + Defun1(dlgTabs) { CHECK_FRAME; Only in ../abi/src/wp/ap/xp: ap_EditMethods.cpp.orig Only in ../abi/src/wp/ap/xp: ap_EditMethods.cpp.rej Only in ../abi/src/wp/ap/xp: ap_EditMethods.cpp~ diff -ru ../../abiword-2.0.11.abicvs/abi/src/wp/ap/xp/ap_EditMethods.h ../abi/src/wp/ap/xp/ap_EditMethods.h --- ../../abiword-2.0.11.abicvs/abi/src/wp/ap/xp/ap_EditMethods.h 2002-08-02 06:38:58.000000000 +0100 +++ ../abi/src/wp/ap/xp/ap_EditMethods.h 2004-09-02 12:27:32.000000000 +0100 @@ -22,6 +22,7 @@ #include "fv_View.h" + UT_Error fileOpen(XAP_Frame * pFrame, const char * pNewFile, IEFileType ieft); // defined in ap_editmethods.cpp Only in ../abi/src/wp/ap/xp: ap_EditMethods.o Only in ../abi/src/wp/ap/xp: ap_Frame.o Only in ../abi/src/wp/ap/xp: ap_FrameData.o Only in ../abi/src/wp/ap/xp: ap_LB_DeadAbovedot.o Only in ../abi/src/wp/ap/xp: ap_LB_DeadAcute.o Only in ../abi/src/wp/ap/xp: ap_LB_DeadBreve.o Only in ../abi/src/wp/ap/xp: ap_LB_DeadCaron.o Only in ../abi/src/wp/ap/xp: ap_LB_DeadCedilla.o Only in ../abi/src/wp/ap/xp: ap_LB_DeadCircumflex.o Only in ../abi/src/wp/ap/xp: ap_LB_DeadDiaeresis.o Only in ../abi/src/wp/ap/xp: ap_LB_DeadDoubleacute.o Only in ../abi/src/wp/ap/xp: ap_LB_DeadGrave.o Only in ../abi/src/wp/ap/xp: ap_LB_DeadMacron.o Only in ../abi/src/wp/ap/xp: ap_LB_DeadOgonek.o Only in ../abi/src/wp/ap/xp: ap_LB_DeadTilde.o diff -ru ../../abiword-2.0.11.abicvs/abi/src/wp/ap/xp/ap_LB_Default.cpp ../abi/src/wp/ap/xp/ap_LB_Default.cpp --- ../../abiword-2.0.11.abicvs/abi/src/wp/ap/xp/ap_LB_Default.cpp 2003-12-15 15:35:32.000000000 +0000 +++ ../abi/src/wp/ap/xp/ap_LB_Default.cpp 2004-09-14 17:46:51.000000000 +0100 @@ -245,7 +245,7 @@ { // {nvk, { none, _S, _C, _S_C, // _A, _A_S, _A_C, _A_C_S }}, - {EV_NVK_BACKSPACE, { "delLeft", "delLeft", "delBOW", "", + {EV_NVK_BACKSPACE, { "delLeft", "delRight", "delBOW", "", "", "", "", "" }}, {EV_NVK_SPACE, { "insertSpace", "insertSpace", "togglePlain", "insertNBSpace", "insertNBZWSpace", "insertZWJoiner", "", "" }}, @@ -275,34 +275,36 @@ "", "", "", "" }}, {EV_NVK_INSERT, { "toggleInsertMode", "paste", "copy", "", "", "", "", "" }}, - {EV_NVK_DELETE, { "delRight", "cut", "delEOW", "", - "", "", "", "" }}, -// {EV_NVK_HELP, { "", "", "", "", +// {EV_NVK_DELETE, { "delRight", "cut", "delEOW", "", // "", "", "", "" }}, - {EV_NVK_F1, { "helpContents", "", "", "", + {EV_NVK_DELETE, { "delRight", "delRight", "", "", + "", "", "", "" }}, + {EV_NVK_HELP, { "helpContents", "", "", "", "", "", "", "" }}, +// {EV_NVK_F1, { "helpContents", "", "", "", +// "", "", "", "" }}, // {EV_NVK_F2, { "", "", "", "", // "", "", "", "" }}, - {EV_NVK_F3, { "findAgain", "rotateCase", "", "", - "", "", "", "" }}, - {EV_NVK_F4, { "", "", "closeWindow", "", - "querySaveAndExit", "", "", "" }}, +// {EV_NVK_F3, { "findAgain", "rotateCase", "", "", +// "", "", "", "" }}, +// {EV_NVK_F4, { "", "", "closeWindow", "", +// "querySaveAndExit", "", "", "" }}, // {EV_NVK_F5, { "", "", "", "", // "", "", "", "" }}, // {EV_NVK_F6, { "", "", "", "", // "", "", "", "" }}, - {EV_NVK_F7, { "dlgSpell", "", "", "", - "", "", "", "" }}, +// {EV_NVK_F7, { "dlgSpell", "", "", "", +// "", "", "", "" }}, // {EV_NVK_F8, { "", "", "", "", // "", "", "", "" }}, // {EV_NVK_F9, { "", "", "", "", // "", "", "", "" }}, - {EV_NVK_F10, { "", "contextMenu", "", "", - "", "", "", "" }}, - {EV_NVK_F11, { "viewFullScreen", "", "", "", - "", "", "", "" }}, - {EV_NVK_F12, { "cycleInputMode", "", FN_TEST_FTR, "", - FN_TEST_DUMP, "", "", "" }}, +// {EV_NVK_F10, { "", "contextMenu", "", "", +// "", "", "", "" }}, +// {EV_NVK_F11, { "viewFullScreen", "", "", "", +// "", "", "", "" }}, +// {EV_NVK_F12, { "cycleInputMode", "", FN_TEST_FTR, "", +// FN_TEST_DUMP, "", "", "" }}, // {EV_NVK_F13, { // {EV_NVK_F14, { // {EV_NVK_F15, { @@ -381,9 +383,9 @@ {0x28, /* ( */ { "insertOpeningParenthesis","", "", "" }}, {0x29, /* ) */ { "insertClosingParenthesis","", "", "" }}, {0x2a, /* * */ { "insertData", "viewPara", "", "" }}, - {0x2b, /* + */ { "insertData", "", "", "" }}, + {0x2b, /* + */ { "insertData", "zoomIn", "", "" }}, {0x2c, /* , */ { "insertData", "", "", "" }}, - {0x2d, /* - */ { "insertData", "toggleSub", "zoomOut", "" }}, + {0x2d, /* - */ { "insertData", "zoomOut", "", "" }}, {0x2e, /* . */ { "insertData", "pasteSpecial", "", "" }}, {0x2f, /* / */ { "insertData", "", "", "" }}, {0x30, /* 0 */ { "insertData", "", DO_NOT_USE, "" }}, @@ -392,43 +394,43 @@ {0x33, /* 3 */ { "insertData", "", DO_NOT_USE, "setStyleHeading3" }}, {0x34, /* 4 */ { "insertData", "", DO_NOT_USE, "" }}, {0x35, /* 5 */ { "insertData", "middleSpace", DO_NOT_USE, "" }}, - {0x36, /* 6 */ { "insertData", "", DO_NOT_USE, "" }}, + {0x36, /* 6 */ { "insertData", "viewFullScreen", DO_NOT_USE, "" }}, {0x37, /* 7 */ { "insertData", "", DO_NOT_USE, "" }}, {0x38, /* 8 */ { "insertData", "", DO_NOT_USE, "" }}, {0x39, /* 9 */ { "insertData", "", DO_NOT_USE, "" }}, {0x3a, /* : */ { "insertData", "", "", "" }}, {0x3b, /* ; */ { "insertData", "", "", "" }}, {0x3c, /* < */ { "insertData", "fontSizeIncrease", "", "insertRLM" }}, - {0x3d, /* = */ { "insertData", "toggleSuper", "zoomIn", "" }}, + {0x3d, /* = */ { "insertData", "toggleSuper", "", "" }}, {0x3e, /* > */ { "insertData", "fontSizeDecrease", "", "insertLRM" }}, {0x3f, /* ? */ { "insertData", "", "", "" }}, {0x40, /* @ */ { "insertData", "", "", "" }}, - {0x41, /* A */ { "insertData", "selectAll", DO_NOT_USE, "" }}, - {0x42, /* B */ { "insertData", "toggleBold", DO_NOT_USE, "" }}, - {0x43, /* C */ { "insertData", "copy", DO_NOT_USE, "" }}, + {0x41, /* A */ { "insertData", "", DO_NOT_USE, "" }}, + {0x42, /* B */ { "insertData", "", DO_NOT_USE, "" }}, + {0x43, /* C */ { "insertData", "", DO_NOT_USE, "" }}, {0x44, /* D */ { "insertData", "dlgFont", DO_NOT_USE, "" }}, - {0x45, /* E */ { "insertData", "alignCenter", DO_NOT_USE, "" }}, - {0x46, /* F */ { "insertData", "find", DO_NOT_USE, "" }}, - {0x47, /* G */ { "insertData", "go", DO_NOT_USE, "" }}, - {0x48, /* H */ { "insertData", "replace", DO_NOT_USE, "" }}, + {0x45, /* E */ { "insertData", "", DO_NOT_USE, "" }}, + {0x46, /* F */ { "insertData", "", DO_NOT_USE, "" }}, + {0x47, /* G */ { "insertData", "", DO_NOT_USE, "" }}, + {0x48, /* H */ { "insertData", "", DO_NOT_USE, "" }}, {0x49, /* I */ { "insertData", "toggleItalic", DO_NOT_USE, "" }}, {0x4a, /* J */ { "insertData", "alignJustify", DO_NOT_USE, "" }}, {0x4b, /* K */ { "insertData", "toggleStrike", DO_NOT_USE, "" }}, {0x4c, /* L */ { "insertData", "alignLeft", DO_NOT_USE, "" }}, - {0x4d, /* M */ { "insertData", "insSymbol", DO_NOT_USE, "" }}, - {0x4e, /* N */ { "insertData", "toolbarNew", DO_NOT_USE, "" }}, - {0x4f, /* O */ { "insertData", "fileOpen", DO_NOT_USE, "" }}, - {0x50, /* P */ { "insertData", "print", DO_NOT_USE, "" }}, - {0x51, /* Q */ { "insertData", "querySaveAndExit", DO_NOT_USE, "" }}, + {0x4d, /* M */ { "insertData", "", DO_NOT_USE, "" }}, + {0x4e, /* N */ { "insertData", "", DO_NOT_USE, "" }}, + {0x4f, /* O */ { "insertData", "", DO_NOT_USE, "" }}, + {0x50, /* P */ { "insertData", "", DO_NOT_USE, "" }}, + {0x51, /* Q */ { "insertData", "", DO_NOT_USE, "" }}, {0x52, /* R */ { "insertData", "alignRight", DO_NOT_USE, "" }}, - {0x53, /* S */ { "insertData", "fileSave", DO_NOT_USE, "" }}, + {0x53, /* S */ { "insertData", "fileSaveAs", DO_NOT_USE, "" }}, {0x54, /* T */ { "insertData", "toggleOline", DO_NOT_USE, "" }}, {0x55, /* U */ { "insertData", "toggleUline", DO_NOT_USE, "" }}, - {0x56, /* V */ { "insertData", "paste", DO_NOT_USE, "" }}, - {0x57, /* W */ { "insertData", "closeWindow", DO_NOT_USE, "" }}, - {0x58, /* X */ { "insertData", "cut", DO_NOT_USE, "" }}, - {0x59, /* Y */ { "insertData", "redo", DO_NOT_USE, "" }}, - {0x5a, /* Z */ { "insertData", "undo", DO_NOT_USE, "" }}, + {0x56, /* V */ { "insertData", "", DO_NOT_USE, "" }}, + {0x57, /* W */ { "insertData", "", DO_NOT_USE, "" }}, + {0x58, /* X */ { "insertData", "", DO_NOT_USE, "" }}, + {0x59, /* Y */ { "insertData", "", DO_NOT_USE, "" }}, + {0x5a, /* Z */ { "insertData", "", DO_NOT_USE, "" }}, {0x5b, /* [ */ { "insertOpeningParenthesis","editHeader", "", "" }}, {0x5c, /* \ */ { "insertData", "removeHeader", "", "" }}, {0x5d, /* ] */ { "insertClosingParenthesis","editFooter", "", "" }}, @@ -439,7 +441,7 @@ {0x62, /* b */ { "insertData", "toggleBold", DO_NOT_USE, "" }}, {0x63, /* c */ { "insertData", "copy", DO_NOT_USE, "" }}, {0x64, /* d */ { "insertData", "dlgFont", DO_NOT_USE, "" }}, - {0x65, /* e */ { "insertData", "alignCenter", DO_NOT_USE, "" }}, + {0x65, /* e */ { "insertData", "closeWindow", DO_NOT_USE, "" }}, {0x66, /* f */ { "insertData", "find", DO_NOT_USE, "" }}, {0x67, /* g */ { "insertData", "go", DO_NOT_USE, "" }}, {0x68, /* h */ { "insertData", "replace", DO_NOT_USE, "" }}, @@ -447,8 +449,8 @@ {0x6a, /* j */ { "insertData", "alignJustify", DO_NOT_USE, "" }}, {0x6b, /* k */ { "insertData", "toggleStrike", DO_NOT_USE, "" }}, {0x6c, /* l */ { "insertData", "alignLeft", DO_NOT_USE, "" }}, - {0x6d, /* m */ { "insertData", "insSymbol", DO_NOT_USE, "" }}, - {0x6e, /* n */ { "insertData", "toolbarNew", DO_NOT_USE, "" }}, + {0x6d, /* m */ { "insertData", "zoomOut", DO_NOT_USE, "" }}, + {0x6e, /* n */ { "insertData", "fileNew", DO_NOT_USE, "" }}, {0x6f, /* o */ { "insertData", "fileOpen", DO_NOT_USE, "" }}, {0x70, /* p */ { "insertData", "print", DO_NOT_USE, "" }}, {0x71, /* q */ { "insertData", "querySaveAndExit", DO_NOT_USE, "" }}, Only in ../abi/src/wp/ap/xp: ap_LB_Default.o Only in ../abi/src/wp/ap/xp: ap_LB_Emacs.o Only in ../abi/src/wp/ap/xp: ap_LB_EmacsCtrlX.o Only in ../abi/src/wp/ap/xp: ap_LB_viEdit.o Only in ../abi/src/wp/ap/xp: ap_LB_viEdit_c.o Only in ../abi/src/wp/ap/xp: ap_LB_viEdit_colon.o Only in ../abi/src/wp/ap/xp: ap_LB_viEdit_d.o Only in ../abi/src/wp/ap/xp: ap_LB_viEdit_r.o Only in ../abi/src/wp/ap/xp: ap_LB_viEdit_y.o diff -ru ../../abiword-2.0.11.abicvs/abi/src/wp/ap/xp/ap_LB_viInput.cpp ../abi/src/wp/ap/xp/ap_LB_viInput.cpp --- ../../abiword-2.0.11.abicvs/abi/src/wp/ap/xp/ap_LB_viInput.cpp 2001-02-06 22:54:58.000000000 +0000 +++ ../abi/src/wp/ap/xp/ap_LB_viInput.cpp 2004-09-09 18:29:41.000000000 +0100 @@ -51,7 +51,7 @@ { // {nvk, { none, _S, _C, _S_C, // _A, _A_S, _A_C, _A_C_S }}, - {EV_NVK_BACKSPACE, { "delLeft", "delLeft", "delBOW", "", + {EV_NVK_BACKSPACE, { "delLeft", "delRight", "delBOW", "", "", "", "", "" }}, {EV_NVK_SPACE, { "insertSpace", "insertSpace", "togglePlain", "insertNBSpace", "", "", "", "" }}, @@ -81,7 +81,9 @@ "", "", "", "" }}, // {EV_NVK_INSERT, { "", "", "", "", // "", "", "", "" }}, - {EV_NVK_DELETE, { "delRight", "delRight", "delEOW", "", +// {EV_NVK_DELETE, { "delRight", "delRight", "delEOW", "", +// "", "", "", "" }}, + {EV_NVK_DELETE, { "delRight", "delRight", "", "", "", "", "", "" }}, // {EV_NVK_HELP, { "", "", "", "", // "", "", "", "" }}, Only in ../abi/src/wp/ap/xp: ap_LB_viInput.o Only in ../abi/src/wp/ap/xp: ap_LeftRuler.o Only in ../abi/src/wp/ap/xp: ap_LoadBindings.o diff -ru ../../abiword-2.0.11.abicvs/abi/src/wp/ap/xp/ap_ML_ContextHyperlink.h ../abi/src/wp/ap/xp/ap_ML_ContextHyperlink.h --- ../../abiword-2.0.11.abicvs/abi/src/wp/ap/xp/ap_ML_ContextHyperlink.h 2003-05-26 23:14:35.000000000 +0100 +++ ../abi/src/wp/ap/xp/ap_ML_ContextHyperlink.h 2004-09-17 15:54:41.000000000 +0100 @@ -44,6 +44,14 @@ MenuItem(AP_MENU_ID_TOOLS_SPELL) Separator() MenuItem(AP_MENU_ID_INSERT_DELETE_HYPERLINK) + Separator() + BeginSubMenu(AP_MENU_ID_FMT_STYLE_MODIFY) + MenuItem(AP_MENU_ID_FMT_STYLE_PARAGRAPH) + MenuItem(AP_MENU_ID_FMT_STYLE_FONT) + MenuItem(AP_MENU_ID_FMT_STYLE_TABS) + MenuItem(AP_MENU_ID_FMT_STYLE_NUMBERING) + MenuItem(AP_MENU_ID_FMT_STYLE_LANGUAGE) + EndSubMenu() EndPopupMenu() EndLayout() @@ -75,7 +83,14 @@ MenuItem(AP_MENU_ID_FMT_LANGUAGE) MenuItem(AP_MENU_ID_FMT_PARAGRAPH) MenuItem(AP_MENU_ID_FMT_BULLETS) + Separator() + BeginSubMenu(AP_MENU_ID_FMT_STYLE_MODIFY) + MenuItem(AP_MENU_ID_FMT_STYLE_PARAGRAPH) + MenuItem(AP_MENU_ID_FMT_STYLE_FONT) + MenuItem(AP_MENU_ID_FMT_STYLE_TABS) + MenuItem(AP_MENU_ID_FMT_STYLE_NUMBERING) + MenuItem(AP_MENU_ID_FMT_STYLE_LANGUAGE) + EndSubMenu() EndPopupMenu() EndLayout() - diff -ru ../../abiword-2.0.11.abicvs/abi/src/wp/ap/xp/ap_ML_ContextImage.h ../abi/src/wp/ap/xp/ap_ML_ContextImage.h --- ../../abiword-2.0.11.abicvs/abi/src/wp/ap/xp/ap_ML_ContextImage.h 2003-05-26 23:14:36.000000000 +0100 +++ ../abi/src/wp/ap/xp/ap_ML_ContextImage.h 2004-09-17 15:54:41.000000000 +0100 @@ -54,6 +54,14 @@ MenuItem(AP_MENU_ID_FMT_LANGUAGE) MenuItem(AP_MENU_ID_FMT_PARAGRAPH) MenuItem(AP_MENU_ID_FMT_BULLETS) + Separator() + BeginSubMenu(AP_MENU_ID_FMT_STYLE_MODIFY) + MenuItem(AP_MENU_ID_FMT_STYLE_PARAGRAPH) + MenuItem(AP_MENU_ID_FMT_STYLE_FONT) + MenuItem(AP_MENU_ID_FMT_STYLE_TABS) + MenuItem(AP_MENU_ID_FMT_STYLE_NUMBERING) + MenuItem(AP_MENU_ID_FMT_STYLE_LANGUAGE) + EndSubMenu() EndPopupMenu() EndLayout() diff -ru ../../abiword-2.0.11.abicvs/abi/src/wp/ap/xp/ap_ML_ContextRevision.h ../abi/src/wp/ap/xp/ap_ML_ContextRevision.h --- ../../abiword-2.0.11.abicvs/abi/src/wp/ap/xp/ap_ML_ContextRevision.h 2003-05-26 23:14:36.000000000 +0100 +++ ../abi/src/wp/ap/xp/ap_ML_ContextRevision.h 2004-09-17 15:54:41.000000000 +0100 @@ -52,7 +52,14 @@ MenuItem(AP_MENU_ID_FMT_LANGUAGE) MenuItem(AP_MENU_ID_FMT_PARAGRAPH) MenuItem(AP_MENU_ID_FMT_BULLETS) + Separator() + BeginSubMenu(AP_MENU_ID_FMT_STYLE_MODIFY) + MenuItem(AP_MENU_ID_FMT_STYLE_PARAGRAPH) + MenuItem(AP_MENU_ID_FMT_STYLE_FONT) + MenuItem(AP_MENU_ID_FMT_STYLE_TABS) + MenuItem(AP_MENU_ID_FMT_STYLE_NUMBERING) + MenuItem(AP_MENU_ID_FMT_STYLE_LANGUAGE) + EndSubMenu() EndPopupMenu() EndLayout() - diff -ru ../../abiword-2.0.11.abicvs/abi/src/wp/ap/xp/ap_ML_ContextSquiggle.h ../abi/src/wp/ap/xp/ap_ML_ContextSquiggle.h --- ../../abiword-2.0.11.abicvs/abi/src/wp/ap/xp/ap_ML_ContextSquiggle.h 2003-05-26 23:14:36.000000000 +0100 +++ ../abi/src/wp/ap/xp/ap_ML_ContextSquiggle.h 2004-09-17 15:11:13.000000000 +0100 @@ -55,6 +55,14 @@ MenuItem(AP_MENU_ID_SPELL_ADD) Separator() MenuItem(AP_MENU_ID_TOOLS_SPELL) + Separator() + BeginSubMenu(AP_MENU_ID_FMT_STYLE_MODIFY) + MenuItem(AP_MENU_ID_FMT_STYLE_PARAGRAPH) + MenuItem(AP_MENU_ID_FMT_STYLE_FONT) + MenuItem(AP_MENU_ID_FMT_STYLE_TABS) + MenuItem(AP_MENU_ID_FMT_STYLE_NUMBERING) + MenuItem(AP_MENU_ID_FMT_STYLE_LANGUAGE) + EndSubMenu() EndPopupMenu() EndLayout() diff -ru ../../abiword-2.0.11.abicvs/abi/src/wp/ap/xp/ap_ML_ContextText.h ../abi/src/wp/ap/xp/ap_ML_ContextText.h --- ../../abiword-2.0.11.abicvs/abi/src/wp/ap/xp/ap_ML_ContextText.h 2003-05-26 23:14:37.000000000 +0100 +++ ../abi/src/wp/ap/xp/ap_ML_ContextText.h 2004-09-17 15:54:41.000000000 +0100 @@ -51,6 +51,14 @@ MenuItem(AP_MENU_ID_FMT_LANGUAGE) MenuItem(AP_MENU_ID_FMT_PARAGRAPH) MenuItem(AP_MENU_ID_FMT_BULLETS) + Separator() + BeginSubMenu(AP_MENU_ID_FMT_STYLE_MODIFY) + MenuItem(AP_MENU_ID_FMT_STYLE_PARAGRAPH) + MenuItem(AP_MENU_ID_FMT_STYLE_FONT) + MenuItem(AP_MENU_ID_FMT_STYLE_TABS) + MenuItem(AP_MENU_ID_FMT_STYLE_NUMBERING) + MenuItem(AP_MENU_ID_FMT_STYLE_LANGUAGE) + EndSubMenu() EndPopupMenu() EndLayout() diff -ru ../../abiword-2.0.11.abicvs/abi/src/wp/ap/xp/ap_Menu_ActionSet.cpp ../abi/src/wp/ap/xp/ap_Menu_ActionSet.cpp --- ../../abiword-2.0.11.abicvs/abi/src/wp/ap/xp/ap_Menu_ActionSet.cpp 2004-06-08 15:54:54.000000000 +0100 +++ ../abi/src/wp/ap/xp/ap_Menu_ActionSet.cpp 2004-09-20 17:38:43.000000000 +0100 @@ -70,18 +70,18 @@ _s(AP_MENU_ID_FILE, 1,0,0,0, NULL, NULL, NULL); _s(AP_MENU_ID_FILE_NEW, 0,1,0,0, "fileNew", NULL, NULL); _s(AP_MENU_ID_FILE_OPEN, 0,1,0,0, "fileOpen", NULL, NULL); - _s(AP_MENU_ID_FILE_SAVE, 0,0,0,0, "fileSave", ap_GetState_Changes, NULL); + _s(AP_MENU_ID_FILE_SAVE, 0,0,0,0, "fileSave", ap_GetState_Changes, NULL); _s(AP_MENU_ID_FILE_SAVEAS, 0,1,0,0, "fileSaveAs", NULL, NULL); - _s(AP_MENU_ID_FILE_SAVEIMAGE, 0,1,0,0, "fileSaveImage", NULL, NULL); - _s(AP_MENU_ID_FILE_SAVE_TEMPLATE, 0,1,0,0, "fileSaveTemplate", NULL, NULL); - _s(AP_MENU_ID_FILE_IMPORT, 0,1,0,0, "fileImport", NULL, NULL); - _s(AP_MENU_ID_FILE_EXPORT, 0,1,0,0, "fileExport", NULL, NULL); - _s(AP_MENU_ID_FILE_PROPERTIES, 0,1,0,0, "dlgMetaData", NULL, NULL); + _s(AP_MENU_ID_FILE_SAVEIMAGE, 0,1,0,0, "fileSaveImage", NULL, NULL); + _s(AP_MENU_ID_FILE_SAVE_TEMPLATE, 0,1,0,0, "fileSaveTemplate", NULL, NULL); + _s(AP_MENU_ID_FILE_IMPORT, 0,1,0,0, "fileImport", NULL, NULL); + _s(AP_MENU_ID_FILE_EXPORT, 0,1,0,0, "fileExport", NULL, NULL); + _s(AP_MENU_ID_FILE_PROPERTIES, 0,1,0,0, "dlgMetaData", NULL, NULL); _s(AP_MENU_ID_FILE_CLOSE, 0,0,0,0, "closeWindow", NULL, NULL); _s(AP_MENU_ID_FILE_PAGESETUP, 0,1,0,0, "pageSetup", NULL, NULL); _s(AP_MENU_ID_FILE_PRINT, 0,1,0,0, "print", NULL, NULL); - _s(AP_MENU_ID_FILE_PRINT_PREVIEW, 0,1,0,0, "printPreview", NULL, NULL); - _s(AP_MENU_ID_FILE_RECENT, 1,0,0,0, NULL, ap_GetState_Recent,NULL); + _s(AP_MENU_ID_FILE_PRINT_PREVIEW, 0,1,0,0, "printPreview", NULL, NULL); + _s(AP_MENU_ID_FILE_RECENT, 1,0,0,0, NULL, ap_GetState_Recent, NULL); _s(AP_MENU_ID_FILE_RECENT_1, 0,0,0,0, "openRecent_1", NULL, ap_GetLabel_Recent); _s(AP_MENU_ID_FILE_RECENT_2, 0,0,0,0, "openRecent_2", NULL, ap_GetLabel_Recent); _s(AP_MENU_ID_FILE_RECENT_3, 0,0,0,0, "openRecent_3", NULL, ap_GetLabel_Recent); @@ -91,9 +91,11 @@ _s(AP_MENU_ID_FILE_RECENT_7, 0,0,0,0, "openRecent_7", NULL, ap_GetLabel_Recent); _s(AP_MENU_ID_FILE_RECENT_8, 0,0,0,0, "openRecent_8", NULL, ap_GetLabel_Recent); _s(AP_MENU_ID_FILE_RECENT_9, 0,0,0,0, "openRecent_9", NULL, ap_GetLabel_Recent); - _s(AP_MENU_ID_FILE_REVERT, 0,0,0,0, "fileRevert", ap_GetState_Changes, NULL); + _s(AP_MENU_ID_FILE_REVERT, 0,0,0,0, "fileRevert", ap_GetState_Changes, NULL); _s(AP_MENU_ID_FILE_EXIT, 0,0,0,0, "querySaveAndExit", NULL, NULL); - _s(AP_MENU_ID_OPEN_TEMPLATE, 0,1,0,0, "openTemplate", NULL, NULL); + _s(AP_MENU_ID_OPEN_TEMPLATE, 0,1,0,0, "openTemplate", NULL, NULL); + _s(AP_MENU_ID_FILE_MORE, 1,0,0,0, NULL, NULL, NULL); + _s(AP_MENU_ID_EDIT, 1,0,0,0, NULL, NULL, NULL); _s(AP_MENU_ID_EDIT_UNDO, 0,0,0,0, "undo", ap_GetState_Changes, NULL); @@ -101,101 +103,115 @@ _s(AP_MENU_ID_EDIT_CUT, 0,0,0,0, "cut", ap_GetState_Selection, NULL); _s(AP_MENU_ID_EDIT_COPY, 0,0,0,0, "copy", ap_GetState_Selection, NULL); _s(AP_MENU_ID_EDIT_PASTE, 0,0,0,0, "paste", ap_GetState_Clipboard, NULL); - _s(AP_MENU_ID_EDIT_PASTE_SPECIAL,0,0,0,0, "pasteSpecial", ap_GetState_Clipboard, NULL); + _s(AP_MENU_ID_EDIT_PASTE_SPECIAL,0,0,0,0, "pasteSpecial", ap_GetState_Clipboard, NULL); _s(AP_MENU_ID_EDIT_CLEAR, 0,0,0,0, "delRight", NULL, NULL); _s(AP_MENU_ID_EDIT_SELECTALL, 0,0,0,0, "selectAll", NULL, NULL); _s(AP_MENU_ID_EDIT_FIND, 0,1,0,0, "find", NULL, NULL); _s(AP_MENU_ID_EDIT_REPLACE, 0,1,0,0, "replace", NULL, NULL); _s(AP_MENU_ID_EDIT_GOTO, 0,1,0,0, "go", NULL, NULL); - _s(AP_MENU_ID_EDIT_EDITHEADER, 0,0,0,0, "editHeader", ap_GetState_Changes, NULL); - _s(AP_MENU_ID_EDIT_EDITFOOTER, 0,0,0,0, "editFooter", ap_GetState_Changes, NULL); - _s(AP_MENU_ID_EDIT_REMOVEHEADER, 0,0,0,0,"removeHeader",ap_GetState_Changes , NULL); - _s(AP_MENU_ID_EDIT_REMOVEFOOTER, 0,0,0,0, "removeFooter",ap_GetState_Changes, NULL); + _s(AP_MENU_ID_EDIT_EDITHEADER, 0,0,0,0, "editHeader", ap_GetState_Changes, NULL); + _s(AP_MENU_ID_EDIT_EDITFOOTER, 0,0,0,0, "editFooter", ap_GetState_Changes, NULL); + _s(AP_MENU_ID_EDIT_REMOVEHEADER,0,0,0,0, "removeHeader", ap_GetState_Changes , NULL); + _s(AP_MENU_ID_EDIT_REMOVEFOOTER,0,0,0,0, "removeFooter", ap_GetState_Changes, NULL); _s(AP_MENU_ID_VIEW, 1,0,0,0, NULL, NULL, NULL); - _s(AP_MENU_ID_VIEW_NORMAL, 0,0,0,1, "viewNormalLayout", ap_GetState_View, NULL); - _s(AP_MENU_ID_VIEW_WEB, 0,0,0,1, "viewWebLayout", ap_GetState_View, NULL); - _s(AP_MENU_ID_VIEW_PRINT, 0,0,0,1, "viewPrintLayout", ap_GetState_View, NULL); + _s(AP_MENU_ID_VIEW_NORMAL, 0,0,0,1, "viewNormalLayout", ap_GetState_View, NULL); + _s(AP_MENU_ID_VIEW_WEB, 0,0,0,1, "viewWebLayout", ap_GetState_View, NULL); + _s(AP_MENU_ID_VIEW_PRINT, 0,0,0,1, "viewPrintLayout", ap_GetState_View, NULL); _s(AP_MENU_ID_VIEW_TOOLBARS, 1,0,0,0, NULL, NULL, NULL); _s(AP_MENU_ID_VIEW_TB_1, 0,0,1,0, "viewTB1", ap_GetState_View, ap_GetLabel_Toolbar); _s(AP_MENU_ID_VIEW_TB_2, 0,0,1,0, "viewTB2", ap_GetState_View, ap_GetLabel_Toolbar); _s(AP_MENU_ID_VIEW_TB_3, 0,0,1,0, "viewTB3", ap_GetState_View, ap_GetLabel_Toolbar); _s(AP_MENU_ID_VIEW_TB_4, 0,0,1,0, "viewTB4", ap_GetState_View, ap_GetLabel_Toolbar); - _s(AP_MENU_ID_VIEW_LOCK_TB_LAYOUT, 0,0,1,0, "lockToolbarLayout", ap_GetState_View, NULL); + _s(AP_MENU_ID_VIEW_LOCK_TB_LAYOUT, 0,0,1,0, "lockToolbarLayout", ap_GetState_View, NULL); _s(AP_MENU_ID_VIEW_DEFAULT_TB_LAYOUT, 0,0,0,0, "defaultToolbarLayout", ap_GetState_View, NULL); - _s(AP_MENU_ID_VIEW_RULER, 0,0,1,0, "viewRuler", ap_GetState_View, NULL); - _s(AP_MENU_ID_VIEW_STATUSBAR, 0,0,1,0, "viewStatus", ap_GetState_View, NULL); - _s(AP_MENU_ID_VIEW_LOCKSTYLES, 0,0,1,0, "viewLockStyles", ap_GetState_View, NULL); - _s(AP_MENU_ID_VIEW_SHOWPARA, 0,0,1,0, "viewPara", ap_GetState_View, NULL); - _s(AP_MENU_ID_VIEW_FULLSCREEN, 0,0,1,0, "viewFullScreen", ap_GetState_View, NULL); - _s(AP_MENU_ID_VIEW_ZOOM_MENU, 1,0,0,0, NULL, NULL, NULL); - _s(AP_MENU_ID_VIEW_ZOOM, 0,1,0,0, "dlgZoom", NULL, NULL); - _s(AP_MENU_ID_VIEW_ZOOM_200, 0,0,0,1, "zoom200", ap_GetState_Zoom, NULL); - _s(AP_MENU_ID_VIEW_ZOOM_100, 0,0,0,1, "zoom100", ap_GetState_Zoom, NULL); - _s(AP_MENU_ID_VIEW_ZOOM_75, 0,0,0,1, "zoom75", ap_GetState_Zoom, NULL); - _s(AP_MENU_ID_VIEW_ZOOM_50, 0,0,0,1, "zoom50", ap_GetState_Zoom, NULL); - _s(AP_MENU_ID_VIEW_ZOOM_WHOLE, 0,0,0,1, "zoomWhole", ap_GetState_Zoom, NULL); - _s(AP_MENU_ID_VIEW_ZOOM_WIDTH, 0,0,0,1, "zoomWidth", ap_GetState_Zoom, NULL); + _s(AP_MENU_ID_VIEW_RULER, 0,0,1,0, "viewRuler", ap_GetState_View, NULL); + _s(AP_MENU_ID_VIEW_STATUSBAR, 0,0,1,0, "viewStatus", ap_GetState_View, NULL); + _s(AP_MENU_ID_VIEW_LOCKSTYLES, 0,0,1,0, "viewLockStyles", ap_GetState_View, NULL); + _s(AP_MENU_ID_VIEW_SHOWPARA, 0,0,1,0, "viewPara", ap_GetState_View, NULL); + _s(AP_MENU_ID_VIEW_FULLSCREEN, 0,0,1,0, "viewFullScreen", ap_GetState_View, NULL); + _s(AP_MENU_ID_VIEW_ZOOM_MENU, 1,0,0,0, NULL, NULL, NULL); + _s(AP_MENU_ID_VIEW_ZOOM, 0,1,0,0, "dlgZoom", NULL, NULL); + _s(AP_MENU_ID_VIEW_ZOOM_IN, 0,0,0,0, "zoomIn", NULL, NULL); + _s(AP_MENU_ID_VIEW_ZOOM_OUT, 0,0,0,0, "zoomOut", NULL, NULL); + _s(AP_MENU_ID_VIEW_ZOOM_200, 0,0,0,1, "zoom200", ap_GetState_Zoom, NULL); + _s(AP_MENU_ID_VIEW_ZOOM_150, 0,0,0,1, "zoom150", ap_GetState_Zoom, NULL); + _s(AP_MENU_ID_VIEW_ZOOM_100, 0,0,0,1, "zoom100", ap_GetState_Zoom, NULL); + _s(AP_MENU_ID_VIEW_ZOOM_75, 0,0,0,1, "zoom75", ap_GetState_Zoom, NULL); + _s(AP_MENU_ID_VIEW_ZOOM_50, 0,0,0,1, "zoom50", ap_GetState_Zoom, NULL); + _s(AP_MENU_ID_VIEW_ZOOM_WHOLE, 0,0,0,1, "zoomWhole", ap_GetState_Zoom, NULL); + _s(AP_MENU_ID_VIEW_ZOOM_WIDTH, 0,0,0,1, "zoomWidth", ap_GetState_Zoom, NULL); + _s(AP_MENU_ID_VIEW_MORE, 1,0,0,0, NULL, NULL, NULL); _s(AP_MENU_ID_INSERT, 1,0,0,0, NULL, NULL, NULL); - _s(AP_MENU_ID_INSERT_BREAK, 0,1,0,0, "insBreak", ap_GetState_BreakOK, NULL); + _s(AP_MENU_ID_INSERT_BREAK, 0,1,0,0, "insBreak", ap_GetState_BreakOK, NULL); _s(AP_MENU_ID_INSERT_BOOKMARK, 0,1,0,0, "insertBookmark", NULL, NULL); _s(AP_MENU_ID_INSERT_HYPERLINK, 0,1,0,0, "insertHyperlink", ap_GetState_SomethingSelected, NULL); - _s(AP_MENU_ID_INSERT_DELETE_HYPERLINK, 0,0,0,0, "deleteHyperlink", NULL, NULL); + _s(AP_MENU_ID_INSERT_DELETE_HYPERLINK, 0,0,0,0, "deleteHyperlink", NULL, NULL); _s(AP_MENU_ID_INSERT_PAGENO, 0,1,0,0, "insPageNo", NULL, NULL); _s(AP_MENU_ID_INSERT_DATETIME, 0,1,0,0, "insDateTime", NULL, NULL); _s(AP_MENU_ID_INSERT_FIELD, 0,1,0,0, "insField", NULL, NULL); - _s(AP_MENU_ID_INSERT_MAILMERGE, 0,1,0,0, "insMailMerge", NULL, NULL); - _s(AP_MENU_ID_INSERT_FILE, 0,1,0,0, "insFile", NULL, NULL); + _s(AP_MENU_ID_INSERT_MAILMERGE, 0,1,0,0, "insMailMerge", NULL, NULL); + _s(AP_MENU_ID_INSERT_FILE, 0,1,0,0, "insFile", NULL, NULL); _s(AP_MENU_ID_INSERT_SYMBOL, 0,1,0,0, "insSymbol", NULL, NULL); - _s(AP_MENU_ID_INSERT_FOOTNOTE, 0,0,0,0, "insFootnote", ap_GetState_InFootnote, NULL); - _s(AP_MENU_ID_INSERT_ENDNOTE, 0,0,0,0, "insEndnote", ap_GetState_InFootnote, NULL); + _s(AP_MENU_ID_INSERT_FOOTNOTE, 0,0,0,0, "insFootnote", ap_GetState_InFootnote, NULL); + _s(AP_MENU_ID_INSERT_ENDNOTE, 0,0,0,0, "insEndnote", ap_GetState_InFootnote, NULL); #ifdef HAVE_GNOME - _s(AP_MENU_ID_INSERT_PICTURE, 1,0,0,0, NULL, NULL, NULL); + _s(AP_MENU_ID_INSERT_PICTURE, 1,0,0,0, NULL, NULL, NULL); #else - _s(AP_MENU_ID_INSERT_PICTURE, 0,1,0,0, "fileInsertGraphic",NULL, NULL); + _s(AP_MENU_ID_INSERT_PICTURE, 0,1,0,0, "fileInsertGraphic", NULL, NULL); #endif - _s(AP_MENU_ID_INSERT_INSERTHEADER, 0,0,0,0, "editHeader", ap_GetState_Changes, NULL); - _s(AP_MENU_ID_INSERT_INSERTFOOTER, 0,0,0,0, "editFooter", ap_GetState_Changes, NULL); - _s(AP_MENU_ID_INSERT_CLIPART, 0,1,0,0, "insertClipart", NULL, NULL); + _s(AP_MENU_ID_INSERT_INSERTHEADER, 0,0,0,0, "editHeader", ap_GetState_Changes, NULL); + _s(AP_MENU_ID_INSERT_INSERTFOOTER, 0,0,0,0, "editFooter", ap_GetState_Changes, NULL); + _s(AP_MENU_ID_INSERT_CLIPART, 0,1,0,0, "insertClipart", NULL, NULL); _s(AP_MENU_ID_INSERT_GRAPHIC, 0,1,0,0, "fileInsertGraphic",NULL, NULL); - _s(AP_MENU_ID_INSERT_DIRECTIONMARKER, 1,0,0,0, NULL, NULL, NULL); - _s(AP_MENU_ID_INSERT_DIRECTIONMARKER_LRM,0,0,0,0, "insertLRM", NULL, NULL); - _s(AP_MENU_ID_INSERT_DIRECTIONMARKER_RLM,0,0,0,0, "insertRLM", NULL, NULL); + _s(AP_MENU_ID_INSERT_DIRECTIONMARKER, 1,0,0,0, NULL, NULL, NULL); + _s(AP_MENU_ID_INSERT_DIRECTIONMARKER_LRM,0,0,0,0, "insertLRM", NULL, NULL); + _s(AP_MENU_ID_INSERT_DIRECTIONMARKER_RLM,0,0,0,0, "insertRLM", NULL, NULL); + _s(AP_MENU_ID_INSERT_MORE, 1,0,0,0, NULL, NULL, NULL); _s(AP_MENU_ID_FORMAT, 1,0,0,0, NULL, NULL, NULL); - _s(AP_MENU_ID_FMT, 1,0,0,0, NULL, NULL, NULL); - _s(AP_MENU_ID_FMT_LANGUAGE, 0,1,0,0, "dlgLanguage", ap_GetState_StylesLocked, NULL); - _s(AP_MENU_ID_FMT_FONT, 0,1,0,0, "dlgFont", ap_GetState_StylesLocked, NULL); + _s(AP_MENU_ID_FMT, 1,0,0,0, NULL, NULL, NULL); + _s(AP_MENU_ID_FMT_LANGUAGE, 0,1,0,0, "dlgLanguage", ap_GetState_StylesLocked, NULL); + _s(AP_MENU_ID_FMT_FONT, 0,1,0,0, "dlgFont", ap_GetState_StylesLocked, NULL); _s(AP_MENU_ID_FMT_PARAGRAPH, 0,1,0,0, "dlgParagraph", ap_GetState_StylesLocked, NULL); - _s(AP_MENU_ID_FMT_BULLETS, 0,1,0,0, "dlgBullets", ap_GetState_Lists, NULL); - _s(AP_MENU_ID_FMT_DOCUMENT, 0,1,0,0, "pageSetup", NULL, NULL); + _s(AP_MENU_ID_FMT_BULLETS, 0,1,0,0, "dlgBullets", ap_GetState_Lists, NULL); + _s(AP_MENU_ID_FMT_DOCUMENT, 0,1,0,0, "pageSetup", NULL, NULL); _s(AP_MENU_ID_FMT_BORDERS, 0,1,0,0, "dlgBorders", NULL, NULL); - _s(AP_MENU_ID_FMT_COLUMNS, 0,1,0,0, "dlgColumns", ap_GetState_ColumnsActive, NULL); - _s(AP_MENU_ID_FMT_BACKGROUND, 0,1,0,0, "dlgBackground", NULL, NULL); - _s(AP_MENU_ID_FMT_HDRFTR, 0,1,0,0, "dlgHdrFtr", NULL, NULL); - _s(AP_MENU_ID_FMT_FOOTNOTES, 0,1,0,0, "formatFootnotes", NULL, NULL); - _s(AP_MENU_ID_FMT_IMAGE, 0,1,0,0, "dlgFmtImage", NULL, NULL); - _s(AP_MENU_ID_FMT_STYLE_DEFINE, 0,1,0,0, "dlgStyle", NULL, NULL); - _s(AP_MENU_ID_FMT_STYLE, 1,0,0,0, NULL, NULL, NULL); - _s(AP_MENU_ID_FMT_IMPORTSTYLES, 0,1,0,0, "importStyles", NULL, NULL); + _s(AP_MENU_ID_FMT_COLUMNS, 0,1,0,0, "dlgColumns", ap_GetState_ColumnsActive, NULL); + _s(AP_MENU_ID_FMT_BACKGROUND, 0,1,0,0, "dlgBackground", NULL, NULL); + _s(AP_MENU_ID_FMT_HDRFTR, 0,1,0,0, "dlgHdrFtr", NULL, NULL); + _s(AP_MENU_ID_FMT_FOOTNOTES, 0,1,0,0, "formatFootnotes", NULL, NULL); + _s(AP_MENU_ID_FMT_IMAGE, 0,1,0,0, "dlgFmtImage", NULL, NULL); + _s(AP_MENU_ID_FMT_STYLE_DEFINE, 0,1,0,0, "dlgStyle", NULL, NULL); + _s(AP_MENU_ID_FMT_STYLE, 1,0,0,0, NULL, NULL, NULL); + _s(AP_MENU_ID_FMT_STYLE_MODIFY, 1,0,0,0, NULL, NULL, ap_GetLabel_StyleModify); + _s(AP_MENU_ID_FMT_STYLE_PARAGRAPH, 0,1,0,0, "dlgStyleParagraph", NULL, NULL); + _s(AP_MENU_ID_FMT_STYLE_FONT, 0,1,0,0, "dlgStyleFont", NULL, NULL); + _s(AP_MENU_ID_FMT_STYLE_TABS, 0,1,0,0, "dlgStyleTabs", NULL, NULL); + _s(AP_MENU_ID_FMT_STYLE_NUMBERING, 0,1,0,0, "dlgStyleNumbering", NULL, NULL); + _s(AP_MENU_ID_FMT_STYLE_LANGUAGE, 0,1,0,0, "dlgStyleLanguage", NULL, NULL); + + _s(AP_MENU_ID_FMT_IMPORTSTYLES, 0,1,0,0, "importStyles", NULL, NULL); _s(AP_MENU_ID_FMT_TABS, 0,1,0,0, "dlgTabs", NULL, NULL); _s(AP_MENU_ID_FMT_BOLD, 0,0,1,0, "toggleBold", ap_GetState_CharFmt, NULL); _s(AP_MENU_ID_FMT_ITALIC, 0,0,1,0, "toggleItalic", ap_GetState_CharFmt, NULL); _s(AP_MENU_ID_FMT_UNDERLINE, 0,0,1,0, "toggleUline", ap_GetState_CharFmt, NULL); - _s(AP_MENU_ID_FMT_OVERLINE, 0,0,1,0, "toggleOline", ap_GetState_CharFmt, NULL); + _s(AP_MENU_ID_FMT_OVERLINE, 0,0,1,0, "toggleOline", ap_GetState_CharFmt, NULL); _s(AP_MENU_ID_FMT_STRIKE, 0,0,1,0, "toggleStrike", ap_GetState_CharFmt, NULL); - _s(AP_MENU_ID_FMT_TOPLINE, 0,0,1,0, "toggleTopline", ap_GetState_CharFmt, NULL); - _s(AP_MENU_ID_FMT_BOTTOMLINE, 0,0,1,0, "toggleBottomline", ap_GetState_CharFmt, NULL); - _s(AP_MENU_ID_FMT_SUPERSCRIPT, 0,0,1,0, "toggleSuper", ap_GetState_CharFmt, NULL); - _s(AP_MENU_ID_FMT_SUBSCRIPT, 0,0,1,0, "toggleSub", ap_GetState_CharFmt, NULL); - _s(AP_MENU_ID_FMT_TOGGLECASE, 0,1,0,0, "dlgToggleCase", ap_GetState_SomethingSelected, NULL); + _s(AP_MENU_ID_FMT_TOPLINE, 0,0,1,0, "toggleTopline", ap_GetState_CharFmt, NULL); + _s(AP_MENU_ID_FMT_BOTTOMLINE, 0,0,1,0, "toggleBottomline", ap_GetState_CharFmt, NULL); + _s(AP_MENU_ID_FMT_SUPERSCRIPT, 0,0,1,0, "toggleSuper", ap_GetState_CharFmt, NULL); + _s(AP_MENU_ID_FMT_SUBSCRIPT, 0,0,1,0, "toggleSub", ap_GetState_CharFmt, NULL); + _s(AP_MENU_ID_FMT_TOGGLECASE, 0,1,0,0, "dlgToggleCase", ap_GetState_SomethingSelected, NULL); - _s(AP_MENU_ID_FMT_DIRECTION, 1,0,0,0, NULL, NULL, NULL); + _s(AP_MENU_ID_FMT_DIRECTION, 1,0,0,0, NULL, NULL, NULL); _s(AP_MENU_ID_FMT_DIRECTION_DD_RTL,0,0,1,0, "toggleDomDirection", ap_GetState_BlockFmt, NULL); _s(AP_MENU_ID_FMT_DIRECTION_DO_LTR,0,0,1,0, "toggleDirOverrideLTR", ap_GetState_CharFmt, NULL); _s(AP_MENU_ID_FMT_DIRECTION_DO_RTL,0,0,1,0, "toggleDirOverrideRTL", ap_GetState_CharFmt, NULL); + + _s(AP_MENU_ID_FMT_MORE, 1,0,0,0, NULL, NULL, NULL); _s(AP_MENU_ID_ALIGN, 1,0,0,0, NULL, ap_GetState_StylesLocked, NULL); _s(AP_MENU_ID_ALIGN_LEFT, 0,0,0,1, "alignLeft", ap_GetState_BlockFmt, NULL); @@ -219,6 +235,8 @@ _s(AP_MENU_ID_TOOLS_REVISIONS_ACCEPT_REVISION, 0,0,0,0, "revisionAccept", ap_GetState_RevisionPresent,NULL); _s(AP_MENU_ID_TOOLS_REVISIONS_REJECT_REVISION, 0,0,0,0, "revisionReject", ap_GetState_RevisionPresent,NULL); + _s(AP_MENU_ID_TOOLS_MORE, 1,0,0,0, NULL, NULL, NULL); + _s(AP_MENU_ID_TABLE,1,0,0,0,NULL,NULL,NULL); _s(AP_MENU_ID_TABLE_INSERT,1,0,0,0, NULL, ap_GetState_Changes, NULL); _s(AP_MENU_ID_TABLE_INSERT_TABLE,0,1,0,0, "insertTable",ap_GetState_TableOK, NULL); @@ -283,6 +301,7 @@ _s(AP_MENU_ID_HELP_ABOUT_GNOMEOFFICE, 0,0,0,0, "helpAboutGnomeOffice", NULL, NULL); _s(AP_MENU_ID_HELP_CREDITS, 0,0,0,0, "helpCredits", NULL, NULL); _s(AP_MENU_ID_HELP_REPORT_BUG, 0,0,0,0, "helpReportBug", NULL, NULL); + _s(AP_MENU_ID_HELP_MORE, 1,0,0,0, NULL, NULL, NULL); _s(AP_MENU_ID_SPELL_SUGGEST_1, 0,0,0,0, "spellSuggest_1", ap_GetState_Suggest, ap_GetLabel_Suggest); _s(AP_MENU_ID_SPELL_SUGGEST_2, 0,0,0,0, "spellSuggest_2", ap_GetState_Suggest, ap_GetLabel_Suggest); Only in ../abi/src/wp/ap/xp: ap_Menu_ActionSet.o diff -ru ../../abiword-2.0.11.abicvs/abi/src/wp/ap/xp/ap_Menu_Functions.cpp ../abi/src/wp/ap/xp/ap_Menu_Functions.cpp --- ../../abiword-2.0.11.abicvs/abi/src/wp/ap/xp/ap_Menu_Functions.cpp 2004-06-08 15:54:54.000000000 +0100 +++ ../abi/src/wp/ap/xp/ap_Menu_Functions.cpp 2004-09-20 16:11:05.000000000 +0100 @@ -199,7 +199,7 @@ XAP_Prefs * pPrefs = pApp->getPrefs(); UT_ASSERT(pPrefs); - + if (ndx <= pPrefs->getRecentCount()) { const char * szFormat = pLabel->getMenuLabel(); @@ -561,6 +561,38 @@ return NULL; } +Defun_EV_GetMenuItemComputedLabel_Fn(ap_GetLabel_StyleModify) +{ + // PSION-ABL UI Customisation Aug 2004. + // Compute the menu label for the 'Format > All '' paragraphs' item. + UT_ASSERT(pFrame); + XAP_App * pApp = pFrame->getApp(); + UT_ASSERT(pApp); + UT_ASSERT(pLabel); + + AV_View * pAV_View = pFrame->getCurrentView(); + ABIWORD_VIEW; + + UT_ASSERT(id == AP_MENU_ID_FMT_STYLE_MODIFY); + + const char * szFormat = pLabel->getMenuLabel(); + static char buf[128]; + + if(!pView) + { + sprintf(buf,szFormat,""); + } + else + { + const XML_Char *pCurStyle; + pView->getStyle(&pCurStyle); + sprintf(buf,szFormat,pCurStyle); + } + + return buf; +} + + /****************************************************************/ /****************************************************************/ @@ -580,7 +612,7 @@ switch(id) { case AP_MENU_ID_FILE_SAVE: - if (!pView->getDocument()->isDirty() || !pView->canDo(true) || pView->getDocument()->getFileName() == NULL) + if (!pView->getDocument()->isDirty() || !pView->canDo(true))// # PSION-ABL PSIBUG #564 || pView->getDocument()->getFileName() == NULL) s = EV_MIS_Gray; break; case AP_MENU_ID_FILE_REVERT: @@ -641,6 +673,11 @@ if (pView->isHdrFtrEdit()) s = EV_MIS_Gray; break; + + case AP_MENU_ID_FMT_STYLE_MODIFY: + if (!pView->isDocumentPresent()) + s = EV_MIS_Gray; + break; default: UT_ASSERT(UT_SHOULD_NOT_HAPPEN); @@ -1186,6 +1223,10 @@ if (pFrame->getZoomPercentage() == 200 && (pFrame->getZoomType() == XAP_Frame::z_PERCENT || pFrame->getZoomType() == XAP_Frame::z_200)) s = EV_MIS_Toggled; break; + case AP_MENU_ID_VIEW_ZOOM_150: + if (pFrame->getZoomPercentage() == 150 && (pFrame->getZoomType() == XAP_Frame::z_PERCENT || pFrame->getZoomType() == XAP_Frame::z_150)) + s = EV_MIS_Toggled; + break; case AP_MENU_ID_VIEW_ZOOM_100: if (pFrame->getZoomPercentage() == 100 && (pFrame->getZoomType() == XAP_Frame::z_PERCENT || pFrame->getZoomType() == XAP_Frame::z_100)) s = EV_MIS_Toggled; diff -ru ../../abiword-2.0.11.abicvs/abi/src/wp/ap/xp/ap_Menu_Functions.h ../abi/src/wp/ap/xp/ap_Menu_Functions.h --- ../../abiword-2.0.11.abicvs/abi/src/wp/ap/xp/ap_Menu_Functions.h 2004-06-08 15:54:54.000000000 +0100 +++ ../abi/src/wp/ap/xp/ap_Menu_Functions.h 2004-09-02 12:27:33.000000000 +0100 @@ -70,5 +70,6 @@ Defun_EV_GetMenuItemComputedLabel_Fn(ap_GetLabel_Index); Defun_EV_GetMenuItemComputedLabel_Fn(ap_GetLabel_Suggest); Defun_EV_GetMenuItemComputedLabel_Fn(ap_GetLabel_Autotext); +Defun_EV_GetMenuItemComputedLabel_Fn(ap_GetLabel_StyleModify); #endif /* AP_MENU_FUNCTIONS_H */ Only in ../abi/src/wp/ap/xp: ap_Menu_Functions.o diff -ru ../../abiword-2.0.11.abicvs/abi/src/wp/ap/xp/ap_Menu_Id_List.h ../abi/src/wp/ap/xp/ap_Menu_Id_List.h --- ../../abiword-2.0.11.abicvs/abi/src/wp/ap/xp/ap_Menu_Id_List.h 2003-12-15 10:01:50.000000000 +0000 +++ ../abi/src/wp/ap/xp/ap_Menu_Id_List.h 2004-09-20 16:11:05.000000000 +0100 @@ -65,6 +65,7 @@ menuitem(FILE_RECENT_9) menuitem(FILE_REVERT) menuitem(FILE_EXIT) +menuitem(FILE_MORE) menuitem(OPEN_TEMPLATE) @@ -98,10 +99,14 @@ menuitem(VIEW_SHOWPARA) menuitem(VIEW_LOCKSTYLES) menuitem(VIEW_HEADFOOT) // This has been removed. +menuitem(VIEW_MORE) menuitem(VIEW_ZOOM_MENU) menuitem(VIEW_ZOOM) +menuitem(VIEW_ZOOM_IN) +menuitem(VIEW_ZOOM_OUT) menuitem(VIEW_ZOOM_200) +menuitem(VIEW_ZOOM_150) menuitem(VIEW_ZOOM_100) menuitem(VIEW_ZOOM_75) menuitem(VIEW_ZOOM_50) @@ -133,6 +138,7 @@ menuitem(INSERT_DIRECTIONMARKER) menuitem(INSERT_DIRECTIONMARKER_LRM) menuitem(INSERT_DIRECTIONMARKER_RLM) +menuitem(INSERT_MORE) menuitem(FORMAT) menuitem(FMT_FONT) @@ -149,6 +155,12 @@ menuitem(FMT_LANGUAGE) menuitem(FMT_IMAGE) menuitem(FMT_STYLE) +menuitem(FMT_STYLE_MODIFY) +menuitem(FMT_STYLE_PARAGRAPH) +menuitem(FMT_STYLE_FONT) +menuitem(FMT_STYLE_TABS) +menuitem(FMT_STYLE_NUMBERING) +menuitem(FMT_STYLE_LANGUAGE) menuitem(FMT_STYLE_DEFINE) menuitem(FMT_IMPORTSTYLES) @@ -166,6 +178,7 @@ menuitem(FMT_DIRECTION_DD_RTL) menuitem(FMT_DIRECTION_DO_LTR) menuitem(FMT_DIRECTION_DO_RTL) +menuitem(FMT_MORE) menuitem(TOOLS) menuitem(TOOLS_SPELLING) @@ -183,6 +196,7 @@ menuitem(TOOLS_REVISIONS_SET_VIEW_LEVEL) menuitem(TOOLS_REVISIONS_ACCEPT_REVISION) menuitem(TOOLS_REVISIONS_REJECT_REVISION) +menuitem(TOOLS_MORE) menuitem(CONTEXT_REVISIONS_ACCEPT_REVISION) menuitem(CONTEXT_REVISIONS_REJECT_REVISION) menuitem(ALIGN) @@ -254,6 +268,7 @@ menuitem(HELP_ABOUT_GNU) menuitem(HELP_ABOUT_GNOMEOFFICE) menuitem(HELP_REPORT_BUG) +menuitem(HELP_MORE) menuitem(SPELL_SUGGEST_1) // _suggest_1 thru _suggest_9 must be contiguous menuitem(SPELL_SUGGEST_2) @@ -321,5 +336,3 @@ menuitem(AUTOTEXT_EMAIL_6) /**** Add Menu Items here ****/ - - Only in ../abi/src/wp/ap/xp: ap_Menu_LabelSet.o Only in ../abi/src/wp/ap/xp: ap_Menu_Layouts.o diff -ru ../../abiword-2.0.11.abicvs/abi/src/wp/ap/xp/ap_Menu_Layouts_MainMenu.h ../abi/src/wp/ap/xp/ap_Menu_Layouts_MainMenu.h --- ../../abiword-2.0.11.abicvs/abi/src/wp/ap/xp/ap_Menu_Layouts_MainMenu.h 2003-12-15 10:01:51.000000000 +0000 +++ ../abi/src/wp/ap/xp/ap_Menu_Layouts_MainMenu.h 2004-09-20 17:02:15.000000000 +0100 @@ -25,18 +25,29 @@ ****************************************************************** *****************************************************************/ +/*#ifndef _ABL_LAYOUT_ +#define _ABL_LAYOUT_ +#endif*/ + + BeginLayout(Main,0) BeginSubMenu(AP_MENU_ID_FILE) - MenuItem(AP_MENU_ID_FILE_NEW) - MenuItem(AP_MENU_ID_FILE_OPEN) - MenuItem(AP_MENU_ID_FILE_SAVE) - MenuItem(AP_MENU_ID_FILE_SAVEAS) -// MenuItem(AP_MENU_ID_FILE_SAVE_TEMPLATE) - Separator() - MenuItem(AP_MENU_ID_FILE_IMPORT) - MenuItem(AP_MENU_ID_FILE_EXPORT) - MenuItem(AP_MENU_ID_FILE_REVERT) +#ifdef _ABL_LAYOUT_ + BeginSubMenu(AP_MENU_ID_WINDOW) + MenuItem(AP_MENU_ID_WINDOW_NEW) + Separator() + MenuItem(AP_MENU_ID_WINDOW_1) + MenuItem(AP_MENU_ID_WINDOW_2) + MenuItem(AP_MENU_ID_WINDOW_3) + MenuItem(AP_MENU_ID_WINDOW_4) + MenuItem(AP_MENU_ID_WINDOW_5) + MenuItem(AP_MENU_ID_WINDOW_6) + MenuItem(AP_MENU_ID_WINDOW_7) + MenuItem(AP_MENU_ID_WINDOW_8) + MenuItem(AP_MENU_ID_WINDOW_9) + MenuItem(AP_MENU_ID_WINDOW_MORE) + EndSubMenu() // WINDOW BeginSubMenu(AP_MENU_ID_FILE_RECENT) MenuItem(AP_MENU_ID_FILE_RECENT_1) @@ -48,17 +59,50 @@ MenuItem(AP_MENU_ID_FILE_RECENT_7) MenuItem(AP_MENU_ID_FILE_RECENT_8) MenuItem(AP_MENU_ID_FILE_RECENT_9) - EndSubMenu() + EndSubMenu() // RECENT +#endif + MenuItem(AP_MENU_ID_FILE_NEW) + MenuItem(AP_MENU_ID_FILE_OPEN) + // MenuItem(AP_MENU_ID_FILE_NEW) // Al: should be new from template + MenuItem(AP_MENU_ID_FILE_CLOSE) + Separator() + MenuItem(AP_MENU_ID_FILE_SAVE) + MenuItem(AP_MENU_ID_FILE_SAVEAS) +// MenuItem(AP_MENU_ID_FILE_SAVE_TEMPLATE) Separator() - MenuItem(AP_MENU_ID_FILE_PROPERTIES) MenuItem(AP_MENU_ID_FILE_PAGESETUP) #if defined(HAVE_GNOME) - MenuItem(AP_MENU_ID_FILE_PRINT_PREVIEW) +// MenuItem(AP_MENU_ID_FILE_PRINT_PREVIEW) #endif MenuItem(AP_MENU_ID_FILE_PRINT) Separator() - MenuItem(AP_MENU_ID_FILE_CLOSE) + BeginSubMenu(AP_MENU_ID_FILE_MORE) + MenuItem(AP_MENU_ID_FILE_IMPORT) + MenuItem(AP_MENU_ID_FILE_EXPORT) + MenuItem(AP_MENU_ID_FILE_REVERT) + MenuItem(AP_MENU_ID_FILE_PROPERTIES) + EndSubMenu() + + Separator() +#ifndef _ABL_LAYOUT_ + MenuItem(AP_MENU_ID_FILE_RECENT_1) + MenuItem(AP_MENU_ID_FILE_RECENT_2) + MenuItem(AP_MENU_ID_FILE_RECENT_3) + MenuItem(AP_MENU_ID_FILE_RECENT_4) + MenuItem(AP_MENU_ID_FILE_RECENT_5) + MenuItem(AP_MENU_ID_FILE_RECENT_6) + MenuItem(AP_MENU_ID_FILE_RECENT_7) + MenuItem(AP_MENU_ID_FILE_RECENT_8) + MenuItem(AP_MENU_ID_FILE_RECENT_9) +#endif + Separator() +// MenuItem(AP_MENU_ID_FILE_PROPERTIES) +// MenuItem(AP_MENU_ID_FILE_PAGESETUP) + +// MenuItem(AP_MENU_ID_FILE_PRINT) +// Separator() + //MenuItem(AP_MENU_ID_FILE_CLOSE) MenuItem(AP_MENU_ID_FILE_EXIT) EndSubMenu() @@ -71,7 +115,7 @@ MenuItem(AP_MENU_ID_EDIT_PASTE) MenuItem(AP_MENU_ID_EDIT_PASTE_SPECIAL) Separator() - MenuItem(AP_MENU_ID_EDIT_CLEAR) + // MenuItem(AP_MENU_ID_EDIT_CLEAR) MenuItem(AP_MENU_ID_EDIT_SELECTALL) Separator() MenuItem(AP_MENU_ID_EDIT_FIND) @@ -81,127 +125,61 @@ BeginSubMenu(AP_MENU_ID_VIEW) MenuItem(AP_MENU_ID_VIEW_NORMAL) - MenuItem(AP_MENU_ID_VIEW_WEB) MenuItem(AP_MENU_ID_VIEW_PRINT) - MenuItem(AP_MENU_ID_WEB_WEBPREVIEW) Separator() - + MenuItem(AP_MENU_ID_VIEW_ZOOM_IN) + MenuItem(AP_MENU_ID_VIEW_ZOOM_OUT) + BeginSubMenu(AP_MENU_ID_VIEW_ZOOM_MENU) + MenuItem(AP_MENU_ID_VIEW_ZOOM_WIDTH) + MenuItem(AP_MENU_ID_VIEW_ZOOM_WHOLE) + MenuItem(AP_MENU_ID_VIEW_ZOOM_200) + MenuItem(AP_MENU_ID_VIEW_ZOOM_150) + MenuItem(AP_MENU_ID_VIEW_ZOOM_100) +// MenuItem(AP_MENU_ID_VIEW_ZOOM_75) +// MenuItem(AP_MENU_ID_VIEW_ZOOM_50) + MenuItem(AP_MENU_ID_VIEW_ZOOM) + EndSubMenu() + MenuItem(AP_MENU_ID_VIEW_FULLSCREEN) + Separator() BeginSubMenu(AP_MENU_ID_VIEW_TOOLBARS) MenuItem(AP_MENU_ID_VIEW_TB_1) MenuItem(AP_MENU_ID_VIEW_TB_2) MenuItem(AP_MENU_ID_VIEW_TB_3) - MenuItem(AP_MENU_ID_VIEW_TB_4) + MenuItem(AP_MENU_ID_VIEW_TB_4) // Currently we only can change toolbars in UNIX builds #ifdef XP_UNIX_TARGET_GTK - Separator() +// Separator() MenuItem(AP_MENU_ID_VIEW_LOCK_TB_LAYOUT) MenuItem(AP_MENU_ID_VIEW_DEFAULT_TB_LAYOUT) #endif EndSubMenu() - - MenuItem(AP_MENU_ID_VIEW_RULER) - MenuItem(AP_MENU_ID_VIEW_STATUSBAR) - Separator() - MenuItem(AP_MENU_ID_VIEW_LOCKSTYLES) - MenuItem(AP_MENU_ID_VIEW_SHOWPARA) - Separator() - MenuItem(AP_MENU_ID_VIEW_FULLSCREEN) - - BeginSubMenu(AP_MENU_ID_VIEW_ZOOM_MENU) - MenuItem(AP_MENU_ID_VIEW_ZOOM) - MenuItem(AP_MENU_ID_VIEW_ZOOM_WIDTH) - MenuItem(AP_MENU_ID_VIEW_ZOOM_WHOLE) - MenuItem(AP_MENU_ID_VIEW_ZOOM_200) - MenuItem(AP_MENU_ID_VIEW_ZOOM_100) - MenuItem(AP_MENU_ID_VIEW_ZOOM_75) - MenuItem(AP_MENU_ID_VIEW_ZOOM_50) - EndSubMenu() - - EndSubMenu() +// Separator() +// MenuItem(AP_MENU_ID_VIEW_HEADFOOT) +// Separator() + BeginSubMenu(AP_MENU_ID_VIEW_MORE) + MenuItem(AP_MENU_ID_VIEW_WEB) + MenuItem(AP_MENU_ID_WEB_WEBPREVIEW) + Separator() + MenuItem(AP_MENU_ID_VIEW_RULER) + MenuItem(AP_MENU_ID_VIEW_STATUSBAR) + MenuItem(AP_MENU_ID_VIEW_LOCKSTYLES) + Separator() + MenuItem(AP_MENU_ID_VIEW_SHOWPARA) + EndSubMenu() // VIEW-MORE + EndSubMenu() // VIEW BeginSubMenu(AP_MENU_ID_INSERT) MenuItem(AP_MENU_ID_INSERT_BREAK) MenuItem(AP_MENU_ID_INSERT_PAGENO) MenuItem(AP_MENU_ID_INSERT_DATETIME) - MenuItem(AP_MENU_ID_INSERT_FIELD) - MenuItem(AP_MENU_ID_INSERT_MAILMERGE) MenuItem(AP_MENU_ID_INSERT_SYMBOL) - - /* the autotext submenus */ - - BeginSubMenu(AP_MENU_ID_INSERT_AUTOTEXT) - - BeginSubMenu(AP_MENU_ID_AUTOTEXT_ATTN) - MenuItem(AP_MENU_ID_AUTOTEXT_ATTN_1) - MenuItem(AP_MENU_ID_AUTOTEXT_ATTN_2) - EndSubMenu() - - BeginSubMenu(AP_MENU_ID_AUTOTEXT_CLOSING) - MenuItem(AP_MENU_ID_AUTOTEXT_CLOSING_1) - MenuItem(AP_MENU_ID_AUTOTEXT_CLOSING_2) - MenuItem(AP_MENU_ID_AUTOTEXT_CLOSING_3) - MenuItem(AP_MENU_ID_AUTOTEXT_CLOSING_4) - MenuItem(AP_MENU_ID_AUTOTEXT_CLOSING_5) - MenuItem(AP_MENU_ID_AUTOTEXT_CLOSING_6) - MenuItem(AP_MENU_ID_AUTOTEXT_CLOSING_7) - MenuItem(AP_MENU_ID_AUTOTEXT_CLOSING_8) - MenuItem(AP_MENU_ID_AUTOTEXT_CLOSING_9) - MenuItem(AP_MENU_ID_AUTOTEXT_CLOSING_10) - MenuItem(AP_MENU_ID_AUTOTEXT_CLOSING_11) - MenuItem(AP_MENU_ID_AUTOTEXT_CLOSING_12) - EndSubMenu() - - BeginSubMenu(AP_MENU_ID_AUTOTEXT_MAIL) - MenuItem(AP_MENU_ID_AUTOTEXT_MAIL_1) - MenuItem(AP_MENU_ID_AUTOTEXT_MAIL_2) - MenuItem(AP_MENU_ID_AUTOTEXT_MAIL_3) - MenuItem(AP_MENU_ID_AUTOTEXT_MAIL_4) - MenuItem(AP_MENU_ID_AUTOTEXT_MAIL_5) - MenuItem(AP_MENU_ID_AUTOTEXT_MAIL_6) - MenuItem(AP_MENU_ID_AUTOTEXT_MAIL_7) - MenuItem(AP_MENU_ID_AUTOTEXT_MAIL_8) - EndSubMenu() - - BeginSubMenu(AP_MENU_ID_AUTOTEXT_REFERENCE) - MenuItem(AP_MENU_ID_AUTOTEXT_REFERENCE_1) - MenuItem(AP_MENU_ID_AUTOTEXT_REFERENCE_2) - MenuItem(AP_MENU_ID_AUTOTEXT_REFERENCE_3) - EndSubMenu() - - BeginSubMenu(AP_MENU_ID_AUTOTEXT_SALUTATION) - MenuItem(AP_MENU_ID_AUTOTEXT_SALUTATION_1) - MenuItem(AP_MENU_ID_AUTOTEXT_SALUTATION_2) - MenuItem(AP_MENU_ID_AUTOTEXT_SALUTATION_3) - MenuItem(AP_MENU_ID_AUTOTEXT_SALUTATION_4) - EndSubMenu() - - BeginSubMenu(AP_MENU_ID_AUTOTEXT_EMAIL) - MenuItem(AP_MENU_ID_AUTOTEXT_EMAIL_1) - MenuItem(AP_MENU_ID_AUTOTEXT_EMAIL_2) - MenuItem(AP_MENU_ID_AUTOTEXT_EMAIL_3) - MenuItem(AP_MENU_ID_AUTOTEXT_EMAIL_4) - MenuItem(AP_MENU_ID_AUTOTEXT_EMAIL_5) - MenuItem(AP_MENU_ID_AUTOTEXT_EMAIL_6) - EndSubMenu() - - BeginSubMenu(AP_MENU_ID_AUTOTEXT_SUBJECT) - MenuItem(AP_MENU_ID_AUTOTEXT_SUBJECT_1) - EndSubMenu() - - EndSubMenu() - Separator() MenuItem(AP_MENU_ID_INSERT_INSERTHEADER) MenuItem(AP_MENU_ID_INSERT_INSERTFOOTER) - MenuItem(AP_MENU_ID_INSERT_FILE) - MenuItem(AP_MENU_ID_INSERT_BOOKMARK) - MenuItem(AP_MENU_ID_INSERT_HYPERLINK) MenuItem(AP_MENU_ID_INSERT_FOOTNOTE) - MenuItem(AP_MENU_ID_INSERT_ENDNOTE) - -#ifdef HAVE_GNOME Separator() - + +#ifdef HAVE_GNOME BeginSubMenu(AP_MENU_ID_INSERT_PICTURE) MenuItem(AP_MENU_ID_INSERT_CLIPART) MenuItem(AP_MENU_ID_INSERT_GRAPHIC) @@ -209,37 +187,118 @@ #else MenuItem(AP_MENU_ID_INSERT_PICTURE) #endif - BeginSubMenu(AP_MENU_ID_INSERT_DIRECTIONMARKER) - MenuItem(AP_MENU_ID_INSERT_DIRECTIONMARKER_LRM) - MenuItem(AP_MENU_ID_INSERT_DIRECTIONMARKER_RLM) - EndSubMenu() + MenuItem(AP_MENU_ID_INSERT_FILE) + MenuItem(AP_MENU_ID_INSERT_BOOKMARK) + MenuItem(AP_MENU_ID_INSERT_HYPERLINK) + Separator() + BeginSubMenu(AP_MENU_ID_INSERT_MORE) + /* the autotext submenus */ + BeginSubMenu(AP_MENU_ID_INSERT_AUTOTEXT) + BeginSubMenu(AP_MENU_ID_AUTOTEXT_ATTN) + MenuItem(AP_MENU_ID_AUTOTEXT_ATTN_1) + MenuItem(AP_MENU_ID_AUTOTEXT_ATTN_2) + EndSubMenu() + + BeginSubMenu(AP_MENU_ID_AUTOTEXT_CLOSING) + MenuItem(AP_MENU_ID_AUTOTEXT_CLOSING_1) + MenuItem(AP_MENU_ID_AUTOTEXT_CLOSING_2) + MenuItem(AP_MENU_ID_AUTOTEXT_CLOSING_3) + MenuItem(AP_MENU_ID_AUTOTEXT_CLOSING_4) + MenuItem(AP_MENU_ID_AUTOTEXT_CLOSING_5) + MenuItem(AP_MENU_ID_AUTOTEXT_CLOSING_6) + MenuItem(AP_MENU_ID_AUTOTEXT_CLOSING_7) + MenuItem(AP_MENU_ID_AUTOTEXT_CLOSING_8) + MenuItem(AP_MENU_ID_AUTOTEXT_CLOSING_9) + MenuItem(AP_MENU_ID_AUTOTEXT_CLOSING_10) + MenuItem(AP_MENU_ID_AUTOTEXT_CLOSING_11) + MenuItem(AP_MENU_ID_AUTOTEXT_CLOSING_12) + EndSubMenu() + + BeginSubMenu(AP_MENU_ID_AUTOTEXT_MAIL) + MenuItem(AP_MENU_ID_AUTOTEXT_MAIL_1) + MenuItem(AP_MENU_ID_AUTOTEXT_MAIL_2) + MenuItem(AP_MENU_ID_AUTOTEXT_MAIL_3) + MenuItem(AP_MENU_ID_AUTOTEXT_MAIL_4) + MenuItem(AP_MENU_ID_AUTOTEXT_MAIL_5) + MenuItem(AP_MENU_ID_AUTOTEXT_MAIL_6) + MenuItem(AP_MENU_ID_AUTOTEXT_MAIL_7) + MenuItem(AP_MENU_ID_AUTOTEXT_MAIL_8) + EndSubMenu() + + BeginSubMenu(AP_MENU_ID_AUTOTEXT_REFERENCE) + MenuItem(AP_MENU_ID_AUTOTEXT_REFERENCE_1) + MenuItem(AP_MENU_ID_AUTOTEXT_REFERENCE_2) + MenuItem(AP_MENU_ID_AUTOTEXT_REFERENCE_3) + EndSubMenu() + + BeginSubMenu(AP_MENU_ID_AUTOTEXT_SALUTATION) + MenuItem(AP_MENU_ID_AUTOTEXT_SALUTATION_1) + MenuItem(AP_MENU_ID_AUTOTEXT_SALUTATION_2) + MenuItem(AP_MENU_ID_AUTOTEXT_SALUTATION_3) + MenuItem(AP_MENU_ID_AUTOTEXT_SALUTATION_4) + EndSubMenu() + + BeginSubMenu(AP_MENU_ID_AUTOTEXT_EMAIL) + MenuItem(AP_MENU_ID_AUTOTEXT_EMAIL_1) + MenuItem(AP_MENU_ID_AUTOTEXT_EMAIL_2) + MenuItem(AP_MENU_ID_AUTOTEXT_EMAIL_3) + MenuItem(AP_MENU_ID_AUTOTEXT_EMAIL_4) + MenuItem(AP_MENU_ID_AUTOTEXT_EMAIL_5) + MenuItem(AP_MENU_ID_AUTOTEXT_EMAIL_6) + EndSubMenu() + + BeginSubMenu(AP_MENU_ID_AUTOTEXT_SUBJECT) + MenuItem(AP_MENU_ID_AUTOTEXT_SUBJECT_1) + EndSubMenu() + EndSubMenu() // AUTOTEXT + MenuItem(AP_MENU_ID_INSERT_FIELD) + MenuItem(AP_MENU_ID_INSERT_MAILMERGE) + + //Separator() + MenuItem(AP_MENU_ID_INSERT_ENDNOTE) + + + BeginSubMenu(AP_MENU_ID_INSERT_DIRECTIONMARKER) + MenuItem(AP_MENU_ID_INSERT_DIRECTIONMARKER_LRM) + MenuItem(AP_MENU_ID_INSERT_DIRECTIONMARKER_RLM) + EndSubMenu() + EndSubMenu() // MORE EndSubMenu() BeginSubMenu(AP_MENU_ID_FORMAT) - MenuItem(AP_MENU_ID_FMT_FONT) - MenuItem(AP_MENU_ID_FMT_PARAGRAPH) - MenuItem(AP_MENU_ID_FMT_BULLETS) - MenuItem(AP_MENU_ID_FMT_DOCUMENT) + MenuItem(AP_MENU_ID_FMT_FONT) + MenuItem(AP_MENU_ID_FMT_PARAGRAPH) + MenuItem(AP_MENU_ID_FMT_BULLETS) #if 0 // someone code and turn this back on - MenuItem(AP_MENU_ID_FMT_BORDERS) + MenuItem(AP_MENU_ID_FMT_BORDERS) #endif - Separator() - MenuItem(AP_MENU_ID_FMT_COLUMNS) - MenuItem(AP_MENU_ID_FMT_TABS) + MenuItem(AP_MENU_ID_FMT_TABS) + Separator() + + BeginSubMenu(AP_MENU_ID_FMT_STYLE_MODIFY) + MenuItem(AP_MENU_ID_FMT_STYLE_PARAGRAPH) + MenuItem(AP_MENU_ID_FMT_STYLE_FONT) + MenuItem(AP_MENU_ID_FMT_STYLE_TABS) + MenuItem(AP_MENU_ID_FMT_STYLE_NUMBERING) + MenuItem(AP_MENU_ID_FMT_STYLE_LANGUAGE) + EndSubMenu() + + Separator() + MenuItem(AP_MENU_ID_FMT_COLUMNS) + Separator() + MenuItem(AP_MENU_ID_FMT_TOGGLECASE) + BeginSubMenu(AP_MENU_ID_FMT_STYLE) + MenuItem(AP_MENU_ID_FMT_STYLE_DEFINE) + MenuItem(AP_MENU_ID_FMT_IMPORTSTYLES) + EndSubMenu() + MenuItem(AP_MENU_ID_FMT_BACKGROUND) + Separator() + + BeginSubMenu(AP_MENU_ID_FMT_MORE) MenuItem(AP_MENU_ID_FMT_HDRFTR) MenuItem(AP_MENU_ID_FMT_FOOTNOTES) - Separator() - MenuItem(AP_MENU_ID_FMT_TOGGLECASE) - Separator() - - BeginSubMenu(AP_MENU_ID_ALIGN) - MenuItem(AP_MENU_ID_ALIGN_LEFT) - MenuItem(AP_MENU_ID_ALIGN_CENTER) - MenuItem(AP_MENU_ID_ALIGN_RIGHT) - MenuItem(AP_MENU_ID_ALIGN_JUSTIFY) - EndSubMenu() - + /* BeginSubMenu(AP_MENU_ID_FMT) MenuItem(AP_MENU_ID_FMT_BOLD) MenuItem(AP_MENU_ID_FMT_ITALIC) @@ -251,21 +310,35 @@ MenuItem(AP_MENU_ID_FMT_SUPERSCRIPT) MenuItem(AP_MENU_ID_FMT_SUBSCRIPT) EndSubMenu() + MenuItem(AP_MENU_ID_FMT_DOCUMENT) + + + Separator() +// + + Separator() + + Separator() - BeginSubMenu(AP_MENU_ID_FMT_STYLE) - MenuItem(AP_MENU_ID_FMT_STYLE_DEFINE) - MenuItem(AP_MENU_ID_FMT_IMPORTSTYLES) + BeginSubMenu(AP_MENU_ID_ALIGN) + MenuItem(AP_MENU_ID_ALIGN_LEFT) + MenuItem(AP_MENU_ID_ALIGN_CENTER) + MenuItem(AP_MENU_ID_ALIGN_RIGHT) + MenuItem(AP_MENU_ID_ALIGN_JUSTIFY) EndSubMenu() + Separator() MenuItem(AP_MENU_ID_EDIT_REMOVEHEADER) MenuItem(AP_MENU_ID_EDIT_REMOVEFOOTER) - MenuItem(AP_MENU_ID_FMT_BACKGROUND) + BeginSubMenu(AP_MENU_ID_FMT_DIRECTION) MenuItem(AP_MENU_ID_FMT_DIRECTION_DD_RTL) MenuItem(AP_MENU_ID_FMT_DIRECTION_DO_LTR) MenuItem(AP_MENU_ID_FMT_DIRECTION_DO_RTL) EndSubMenu() + */ + EndSubMenu() // More EndSubMenu() BeginSubMenu(AP_MENU_ID_TOOLS) @@ -273,10 +346,10 @@ BeginSubMenu(AP_MENU_ID_TOOLS_SPELLING) MenuItem(AP_MENU_ID_TOOLS_SPELL) MenuItem(AP_MENU_ID_TOOLS_AUTOSPELL) + MenuItem(AP_MENU_ID_FMT_LANGUAGE) MenuItem(AP_MENU_ID_TOOLS_SPELLPREFS) EndSubMenu() - MenuItem(AP_MENU_ID_FMT_LANGUAGE) MenuItem(AP_MENU_ID_TOOLS_WORDCOUNT) BeginSubMenu(AP_MENU_ID_TOOLS_REVISIONS) @@ -285,12 +358,13 @@ MenuItem(AP_MENU_ID_TOOLS_REVISIONS_REJECT_REVISION) MenuItem(AP_MENU_ID_TOOLS_REVISIONS_SET_VIEW_LEVEL) EndSubMenu() - - MenuItem(AP_MENU_ID_TOOLS_PLUGINS) - MenuItem(AP_MENU_ID_TOOLS_SCRIPTS) - MenuItem(AP_MENU_ID_TOOLS_MAILMERGE) - Separator() MenuItem(AP_MENU_ID_TOOLS_OPTIONS) + BeginSubMenu(AP_MENU_ID_TOOLS_MORE) + MenuItem(AP_MENU_ID_TOOLS_PLUGINS) + MenuItem(AP_MENU_ID_TOOLS_SCRIPTS) + MenuItem(AP_MENU_ID_TOOLS_MAILMERGE) + EndSubMenu() + //Separator() EndSubMenu() BeginSubMenu(AP_MENU_ID_TABLE) @@ -343,25 +417,35 @@ #endif EndSubMenu() - BeginSubMenu(AP_MENU_ID_WINDOW) - MenuItem(AP_MENU_ID_WINDOW_NEW) - Separator() - MenuItem(AP_MENU_ID_WINDOW_1) - MenuItem(AP_MENU_ID_WINDOW_2) - MenuItem(AP_MENU_ID_WINDOW_3) - MenuItem(AP_MENU_ID_WINDOW_4) - MenuItem(AP_MENU_ID_WINDOW_5) - MenuItem(AP_MENU_ID_WINDOW_6) - MenuItem(AP_MENU_ID_WINDOW_7) - MenuItem(AP_MENU_ID_WINDOW_8) - MenuItem(AP_MENU_ID_WINDOW_9) - MenuItem(AP_MENU_ID_WINDOW_MORE) - EndSubMenu() +#ifndef _ABL_LAYOUT_ + BeginSubMenu(AP_MENU_ID_WINDOW) + // MenuItem(AP_MENU_ID_WINDOW_NEW) + // Separator() + MenuItem(AP_MENU_ID_WINDOW_1) + MenuItem(AP_MENU_ID_WINDOW_2) + MenuItem(AP_MENU_ID_WINDOW_3) + MenuItem(AP_MENU_ID_WINDOW_4) + MenuItem(AP_MENU_ID_WINDOW_5) + MenuItem(AP_MENU_ID_WINDOW_6) + MenuItem(AP_MENU_ID_WINDOW_7) + MenuItem(AP_MENU_ID_WINDOW_8) + MenuItem(AP_MENU_ID_WINDOW_9) + MenuItem(AP_MENU_ID_WINDOW_MORE) + EndSubMenu() // WINDOW +#endif + BeginSubMenu(AP_MENU_ID_HELP) MenuItem(AP_MENU_ID_HELP_CONTENTS) MenuItem(AP_MENU_ID_HELP_INDEX) - MenuItem(AP_MENU_ID_HELP_SEARCH) + Separator() + MenuItem(AP_MENU_ID_HELP_ABOUT) + Separator() + BeginSubMenu(AP_MENU_ID_HELP_MORE) + MenuItem(AP_MENU_ID_HELP_ABOUTOS) + MenuItem(AP_MENU_ID_HELP_CREDITS) + EndSubMenu() + /*MenuItem(AP_MENU_ID_HELP_SEARCH) MenuItem(AP_MENU_ID_HELP_CHECKVER) MenuItem(AP_MENU_ID_HELP_REPORT_BUG) Separator() @@ -374,8 +458,8 @@ #ifndef HAVE_GNOME MenuItem(AP_MENU_ID_HELP_CREDITS) Separator() -#endif - MenuItem(AP_MENU_ID_HELP_ABOUT) +#endif*/ + EndSubMenu() EndLayout() Only in ../abi/src/wp/ap/xp: ap_Prefs.o diff -ru ../../abiword-2.0.11.abicvs/abi/src/wp/ap/xp/ap_Prefs_SchemeIds.h ../abi/src/wp/ap/xp/ap_Prefs_SchemeIds.h --- ../../abiword-2.0.11.abicvs/abi/src/wp/ap/xp/ap_Prefs_SchemeIds.h 2003-07-24 23:14:48.000000000 +0100 +++ ../abi/src/wp/ap/xp/ap_Prefs_SchemeIds.h 2004-09-02 12:27:33.000000000 +0100 @@ -68,7 +68,7 @@ #define AP_PREF_DEFAULT_OptionsTabNumber "0" /* options dialog */ #define AP_PREF_KEY_RulerUnits "RulerUnits" /* value in UT_dimensionName() */ -#define AP_PREF_DEFAULT_RulerUnits "in" +#define AP_PREF_DEFAULT_RulerUnits "cm" //"in" #define AP_PREF_KEY_RulerVisible "RulerVisible" /* are the rulers visible? {0,1} */ #define AP_PREF_DEFAULT_RulerVisible "1" @@ -90,7 +90,7 @@ #define AP_PREF_KEY_StringSet "StringSet" /* name of dialog/msgbox strings */ -#define AP_PREF_DEFAULT_StringSet "en-US" +#define AP_PREF_DEFAULT_StringSet "en-GB" //"en-US" #define AP_PREF_KEY_KeyBindings "KeyBindings" #define AP_PREF_DEFAULT_KeyBindings "default" /* value in ap_LoadBindings.cpp */ @@ -118,7 +118,7 @@ #define AP_PREF_DEFAULT_StringSetDirectory "strings" /* if relative, use prefix "getAbiSuiteAppDir()" */ #define AP_PREF_KEY_LayoutMode "layoutMode" -#define AP_PREF_DEFAULT_LayoutMode "1" /* 1=print, 2=normal, 3=web */ +#define AP_PREF_DEFAULT_LayoutMode "2"//"1" /* 1=print, 2=normal, 3=web */ #define AP_PREF_KEY_AlwaysPromptEncoding "AlwaysPromptEncoding" /* if true, always show encoding dialog when importing/exporting text */ #define AP_PREF_DEFAULT_AlwaysPromptEncoding "0" @@ -131,10 +131,10 @@ #endif #define AP_PREF_KEY_ShowSplash "ShowSplash" -#define AP_PREF_DEFAULT_ShowSplash "1" +#define AP_PREF_DEFAULT_ShowSplash "0"//"1" #define AP_PREF_KEY_DefaultSaveFormat "DefaultSaveFormat" -#define AP_PREF_DEFAULT_DefaultSaveFormat ".abw" +#define AP_PREF_DEFAULT_DefaultSaveFormat ".doc"//".abw" #define AP_PREF_KEY_CloseOnLastDoc "CloseOnLastDoc" #define AP_PREF_DEFAULT_CloseOnLastDoc "0" Only in ../abi/src/wp/ap/xp: ap_Preview_Abi.o Only in ../abi/src/wp/ap/xp: ap_Preview_Paragraph.o Only in ../abi/src/wp/ap/xp: ap_Ruler.o Only in ../abi/src/wp/ap/xp: ap_StatusBar.o diff -ru ../../abiword-2.0.11.abicvs/abi/src/wp/ap/xp/ap_String_Id.h ../abi/src/wp/ap/xp/ap_String_Id.h --- ../../abiword-2.0.11.abicvs/abi/src/wp/ap/xp/ap_String_Id.h 2004-04-12 10:51:17.000000000 +0100 +++ ../abi/src/wp/ap/xp/ap_String_Id.h 2004-09-20 16:11:04.000000000 +0100 @@ -187,8 +187,8 @@ dcl(DLG_Styles_LBL_InUse, "In Use") dcl(DLG_Styles_LBL_All, "All") dcl(DLG_Styles_LBL_UserDefined, "User-defined styles") -dcl(DLG_Styles_LBL_TxtMsg, "What Hath God Wrought") -dcl(DLG_Styles_ModifyTitle, "Modify Styles") +dcl(DLG_Styles_LBL_TxtMsg, "Lorem ipsum dolor sit amet, consectetaur adipisicing...")//What Hath God Wrought") +dcl(DLG_Styles_ModifyTitle, "Modify Style") dcl(DLG_Styles_ModifyName, "Style Name:") dcl(DLG_Styles_ModifyBasedOn, "Based On:") dcl(DLG_Styles_ModifyFollowing, "Style for following paragraph") @@ -750,14 +750,14 @@ dcl(MENU_LABEL_FILE_SAVEAS,"Save &As") dcl(MENU_LABEL_FILE_SAVE_TEMPLATE, "Save &Template") dcl(MENU_LABEL_FILE_SAVEIMAGE,"&Save Image As") -dcl(MENU_LABEL_FILE_IMPORT,"Op&en Copy") -dcl(MENU_LABEL_FILE_EXPORT,"Sav&e Copy") +dcl(MENU_LABEL_FILE_IMPORT,"&Import") +dcl(MENU_LABEL_FILE_EXPORT,"&Export") dcl(MENU_LABEL_FILE_PROPERTIES, "P&roperties") dcl(MENU_LABEL_FILE_PAGESETUP,"Page Set&up") dcl(MENU_LABEL_FILE_PRINT,"&Print") dcl(MENU_LABEL_FILE_PRINT_DIRECTLY,"Print &directly") dcl(MENU_LABEL_FILE_PRINT_PREVIEW,"Print P&review") -dcl(MENU_LABEL_FILE_RECENT, "Recent &Files") +dcl(MENU_LABEL_FILE_RECENT, "&Recently Opened") dcl(MENU_LABEL_FILE_RECENT_1,"&1 %s") dcl(MENU_LABEL_FILE_RECENT_2,"&2 %s") dcl(MENU_LABEL_FILE_RECENT_3,"&3 %s") @@ -768,7 +768,8 @@ dcl(MENU_LABEL_FILE_RECENT_8,"&8 %s") dcl(MENU_LABEL_FILE_RECENT_9,"&9 %s") dcl(MENU_LABEL_FILE_REVERT,"Re&vert") -dcl(MENU_LABEL_FILE_EXIT,"&Quit") +dcl(MENU_LABEL_FILE_EXIT,"&Exit") +dcl(MENU_LABEL_FILE_MORE,"&More") dcl(MENU_LABEL_EDIT,"&Edit") dcl(MENU_LABEL_EDIT_UNDO,"&Undo") dcl(MENU_LABEL_EDIT_REDO,"&Redo") @@ -781,8 +782,8 @@ dcl(MENU_LABEL_EDIT_FIND,"&Find") dcl(MENU_LABEL_EDIT_REPLACE,"R&eplace") dcl(MENU_LABEL_EDIT_GOTO,"&Go To") -dcl(MENU_LABEL_INSERT_INSERTHEADER,"Insert Header") -dcl(MENU_LABEL_INSERT_INSERTFOOTER,"Insert Footer") +dcl(MENU_LABEL_INSERT_INSERTHEADER,"Header") +dcl(MENU_LABEL_INSERT_INSERTFOOTER,"Footer") dcl(MENU_LABEL_EDIT_EDITHEADER,"Edit Header") dcl(MENU_LABEL_EDIT_EDITFOOTER,"Edit Footer") dcl(MENU_LABEL_EDIT_REMOVEHEADER,"Remove Header") @@ -790,7 +791,7 @@ dcl(MENU_LABEL_VIEW,"&View") dcl(MENU_LABEL_VIEW_NORMAL,"&Normal Layout") dcl(MENU_LABEL_VIEW_WEB,"&Web Layout") -dcl(MENU_LABEL_VIEW_PRINT,"&Print Layout") +dcl(MENU_LABEL_VIEW_PRINT,"&Page Layout") dcl(MENU_LABEL_VIEW_TOOLBARS,"&Toolbars") dcl(MENU_LABEL_VIEW_TB_1,"&1 %s") dcl(MENU_LABEL_VIEW_TB_2,"&2 %s") @@ -805,20 +806,24 @@ dcl(MENU_LABEL_VIEW_HEADFOOT,"&Header and Footer") dcl(MENU_LABEL_VIEW_FULLSCREEN,"F&ull Screen") dcl(MENU_LABEL_VIEW_ZOOM_MENU,"&Zoom") -dcl(MENU_LABEL_VIEW_ZOOM,"&Zoom") +dcl(MENU_LABEL_VIEW_ZOOM,"&Zoom to") +dcl(MENU_LABEL_VIEW_ZOOM_IN,"Zoom &In") +dcl(MENU_LABEL_VIEW_ZOOM_OUT,"Zoom &Out") dcl(MENU_LABEL_VIEW_ZOOM_200,"Zoom to &200%") +dcl(MENU_LABEL_VIEW_ZOOM_150,"Zoom to &150%") dcl(MENU_LABEL_VIEW_ZOOM_100,"Zoom to &100%") dcl(MENU_LABEL_VIEW_ZOOM_75,"Zoom to &75%") dcl(MENU_LABEL_VIEW_ZOOM_50,"Zoom to &50%") dcl(MENU_LABEL_VIEW_ZOOM_WIDTH,"&Page Width") dcl(MENU_LABEL_VIEW_ZOOM_WHOLE,"&Whole Page") +dcl(MENU_LABEL_VIEW_MORE,"&More") dcl(MENU_LABEL_INSERT,"&Insert") dcl(MENU_LABEL_INSERT_BREAK,"&Break") dcl(MENU_LABEL_INSERT_PAGENO,"Page N&umbers") dcl(MENU_LABEL_INSERT_DATETIME,"Date and &Time") dcl(MENU_LABEL_INSERT_MAILMERGE, "&Mail Merge Field") dcl(MENU_LABEL_INSERT_FIELD,"&Field") -dcl(MENU_LABEL_INSERT_FILE,"&Insert File") +dcl(MENU_LABEL_INSERT_FILE,"&File") dcl(MENU_LABEL_INSERT_SYMBOL,"Sy&mbol") dcl(MENU_LABEL_INSERT_ENDNOTE,"&Endnote") dcl(MENU_LABEL_INSERT_FOOTNOTE,"Foot¬e") @@ -831,11 +836,12 @@ dcl(MENU_LABEL_INSERT_DIRECTIONMARKER, "&Direction Marker") dcl(MENU_LABEL_INSERT_DIRECTIONMARKER_LRM, "&LRM") dcl(MENU_LABEL_INSERT_DIRECTIONMARKER_RLM, "&RLM") +dcl(MENU_LABEL_INSERT_MORE, "More") dcl(MENU_LABEL_FORMAT,"F&ormat") dcl(MENU_LABEL_FMT, "Te&xt Formatting") dcl(MENU_LABEL_FMT_LANGUAGE,"Set &Language") dcl(MENU_LABEL_FMT_FONT,"&Font") -dcl(MENU_LABEL_FMT_PARAGRAPH,"&Paragraph") +dcl(MENU_LABEL_FMT_PARAGRAPH,"&Indents and Spacing") dcl(MENU_LABEL_FMT_BULLETS,"Bullets and &Numbering") dcl(MENU_LABEL_FMT_DOCUMENT,"&Document") dcl(MENU_LABEL_FMT_BORDERS,"Borders and Shading") @@ -843,8 +849,15 @@ dcl(MENU_LABEL_FMT_FOOTNOTES,"Footnotes and Endnotes") dcl(MENU_LABEL_FMT_COLUMNS,"&Columns") dcl(MENU_LABEL_FMT_TOGGLECASE,"C&hange Case") -dcl(MENU_LABEL_FMT_BACKGROUND,"Page C&olor") +dcl(MENU_LABEL_FMT_BACKGROUND,"&Background") dcl(MENU_LABEL_FMT_STYLE,"St&yle") +dcl(MENU_LABEL_FMT_STYLE_MODIFY,"&All '%s' paragraphs") +//dcl(MENU_LABEL_FMT_STYLE_MODIFY,"&All Paragraphs of Current Style") +dcl(MENU_LABEL_FMT_STYLE_PARAGRAPH,"&Indents and Spacing") +dcl(MENU_LABEL_FMT_STYLE_FONT,"&Font") +dcl(MENU_LABEL_FMT_STYLE_TABS,"&Tabs") +dcl(MENU_LABEL_FMT_STYLE_NUMBERING,"&Numbering") +dcl(MENU_LABEL_FMT_STYLE_LANGUAGE,"&Language") dcl(MENU_LABEL_FMT_STYLE_DEFINE, "&Create and Modify") dcl(MENU_LABEL_FMT_IMPORTSTYLES,"&Import Styles") dcl(MENU_LABEL_FMT_TABS,"&Tabs") @@ -861,6 +874,7 @@ dcl(MENU_LABEL_FMT_DIRECTION_DD_RTL, "RTL &Paragraph") dcl(MENU_LABEL_FMT_DIRECTION_DO_LTR, "&Left-to-right text") dcl(MENU_LABEL_FMT_DIRECTION_DO_RTL, "&Right-to-left text") +dcl(MENU_LABEL_FMT_MORE, "&More") dcl(MENU_LABEL_TOOLS,"&Tools") dcl(MENU_LABEL_TOOLS_SPELLING,"&Spelling") dcl(MENU_LABEL_TOOLS_SPELL,"Check &Spelling") @@ -877,6 +891,7 @@ dcl(MENU_LABEL_TOOLS_REVISIONS_SET_VIEW_LEVEL,"&Select revision") dcl(MENU_LABEL_TOOLS_REVISIONS_ACCEPT_REVISION,"&Accept revision") dcl(MENU_LABEL_TOOLS_REVISIONS_REJECT_REVISION,"&Reject revision") +dcl(MENU_LABEL_TOOLS_MORE, "&More") dcl(MENU_LABEL_TABLE, "T&able") dcl(MENU_LABEL_TABLE_INSERT, "&Insert") dcl(MENU_LABEL_TABLE_INSERT_TABLE, "&Table") @@ -918,9 +933,10 @@ dcl(MENU_LABEL_ALIGN_CENTER,"&Center") dcl(MENU_LABEL_ALIGN_RIGHT,"&Right") dcl(MENU_LABEL_ALIGN_JUSTIFY,"&Justify") -dcl(MENU_LABEL_WEB_WEBPREVIEW,"&As web page") +dcl(MENU_LABEL_WEB_WEBPREVIEW,"&Preview Web page") dcl(MENU_LABEL_WEB_SAVEASWEB,"&Save web page") -dcl(MENU_LABEL_WINDOW,"&Documents") +//dcl(MENU_LABEL_WINDOW,"&Currently Open") +dcl(MENU_LABEL_WINDOW,"&Window") dcl(MENU_LABEL_WINDOW_NEW,"&New Window") dcl(MENU_LABEL_WINDOW_1,"&1 %s") dcl(MENU_LABEL_WINDOW_2,"&2 %s") @@ -931,11 +947,11 @@ dcl(MENU_LABEL_WINDOW_7,"&7 %s") dcl(MENU_LABEL_WINDOW_8,"&8 %s") dcl(MENU_LABEL_WINDOW_9,"&9 %s") -dcl(MENU_LABEL_WINDOW_MORE,"&More Documents") +dcl(MENU_LABEL_WINDOW_MORE,"&More") dcl(MENU_LABEL_HELP,"&Help") dcl(MENU_LABEL_HELP_CREDITS,"C&redits") dcl(MENU_LABEL_HELP_CONTENTS,"Help &Contents") -dcl(MENU_LABEL_HELP_INDEX,"Help &Introduction") +dcl(MENU_LABEL_HELP_INDEX,"Help &Index") dcl(MENU_LABEL_HELP_CHECKVER,"Check &Version") dcl(MENU_LABEL_HELP_SEARCH,"&Search for Help") dcl(MENU_LABEL_HELP_ABOUT,"&About %s") @@ -943,6 +959,7 @@ dcl(MENU_LABEL_HELP_ABOUT_GNU,"About &GNU Free Software") dcl(MENU_LABEL_HELP_ABOUT_GNOMEOFFICE,"About G&NOME Office") dcl(MENU_LABEL_HELP_REPORT_BUG, "Report a &Bug") +dcl(MENU_LABEL_HELP_MORE, "&More") dcl(MENU_LABEL_SPELL_SUGGEST_1,"%s") dcl(MENU_LABEL_SPELL_SUGGEST_2,"%s") dcl(MENU_LABEL_SPELL_SUGGEST_3,"%s") @@ -999,6 +1016,7 @@ dcl(MENU_LABEL_AUTOTEXT_EMAIL_5,"%s") dcl(MENU_LABEL_AUTOTEXT_EMAIL_6,"%s") dcl(MENU_LABEL_FMT_IMAGE, "Resize &Image") +dcl(MENU_LABEL_MORE, "More") dcl(MENU_STATUSLINE__BOGUS1__," ") dcl(MENU_STATUSLINE__BOGUS2__," ") @@ -1030,6 +1048,7 @@ dcl(MENU_STATUSLINE_FILE_RECENT_9,"Open this document") dcl(MENU_STATUSLINE_FILE_REVERT,"Revert the document to the last saved state") dcl(MENU_STATUSLINE_FILE_EXIT,"Close all windows in the application and exit") +dcl(MENU_STATUSLINE_FILE_MORE,"Additional menu items") dcl(MENU_STATUSLINE_EDIT," ") dcl(MENU_STATUSLINE_EDIT_UNDO,"Undo editing") dcl(MENU_STATUSLINE_EDIT_REDO,"Redo previously undone editing") @@ -1065,12 +1084,16 @@ dcl(MENU_STATUSLINE_VIEW_FULLSCREEN,"View the document in full screen mode") dcl(MENU_STATUSLINE_VIEW_ZOOM_MENU,"Reduce or enlarge the document display") dcl(MENU_STATUSLINE_VIEW_ZOOM,"Reduce or enlarge the document display") +dcl(MENU_STATUSLINE_VIEW_ZOOM_IN,"Enlarge the document display") +dcl(MENU_STATUSLINE_VIEW_ZOOM_OUT,"Reduce the document display") dcl(MENU_STATUSLINE_VIEW_ZOOM_200,"Zoom to 200%") +dcl(MENU_STATUSLINE_VIEW_ZOOM_150,"Zoom to 150%") dcl(MENU_STATUSLINE_VIEW_ZOOM_100,"Zoom to 100%") dcl(MENU_STATUSLINE_VIEW_ZOOM_75,"Zoom to 75%") dcl(MENU_STATUSLINE_VIEW_ZOOM_50,"Zoom to 50%") dcl(MENU_STATUSLINE_VIEW_ZOOM_WIDTH,"Zoom to page width") dcl(MENU_STATUSLINE_VIEW_ZOOM_WHOLE,"Zoom to whole page") +dcl(MENU_STATUSLINE_VIEW_MORE,"Additional menu items") dcl(MENU_STATUSLINE_INSERT," ") dcl(MENU_STATUSLINE_INSERT_BREAK,"Insert a page, column, or section break") dcl(MENU_STATUSLINE_INSERT_PAGENO,"Insert an automatically-updated page number") @@ -1092,6 +1115,7 @@ dcl(MENU_STATUSLINE_INSERT_DIRECTIONMARKER, "Insert Unicode direction marker into the document") dcl(MENU_STATUSLINE_INSERT_DIRECTIONMARKER_LRM, "Insert left-to-right direction marker (LRM)") dcl(MENU_STATUSLINE_INSERT_DIRECTIONMARKER_RLM, "Insert right-to-left direction marker (RLM)") +dcl(MENU_STATUSLINE_INSERT_MORE, "Additional Menu Items") dcl(MENU_STATUSLINE_FORMAT," ") dcl(MENU_STATUSLINE_FMT, " ") @@ -1107,6 +1131,12 @@ dcl(MENU_STATUSLINE_FMT_TOGGLECASE,"Change the case of the selected text") dcl(MENU_STATUSLINE_FMT_BACKGROUND,"Change your document's page color") dcl(MENU_STATUSLINE_FMT_STYLE,"Define or apply style for the selection") +dcl(MENU_STATUSLINE_FMT_STYLE_MODIFY,"Modify style used in current selection") +dcl(MENU_STATUSLINE_FMT_STYLE_PARAGRAPH,"Modify paragraph settings used in current style") +dcl(MENU_STATUSLINE_FMT_STYLE_FONT,"Change font used in current style") +dcl(MENU_STATUSLINE_FMT_STYLE_TABS,"Modify tab settings used in current style") +dcl(MENU_STATUSLINE_FMT_STYLE_NUMBERING,"Modify numbering used in current style") +dcl(MENU_STATUSLINE_FMT_STYLE_LANGUAGE,"Change Language of current style") dcl(MENU_STATUSLINE_FMT_STYLE_DEFINE, "Define or apply style for the selection") dcl(MENU_STATUSLINE_FMT_IMPORTSTYLES,"Import style definitions from a document") dcl(MENU_STATUSLINE_FMT_TABS,"Set tab stops") @@ -1123,6 +1153,7 @@ dcl(MENU_STATUSLINE_FMT_DIRECTION_DD_RTL, "Set dominant direction of paragraph to RTL") dcl(MENU_STATUSLINE_FMT_DIRECTION_DO_LTR, "Force left-to-right direction of text") dcl(MENU_STATUSLINE_FMT_DIRECTION_DO_RTL, "Force right-to-left direction of text") +dcl(MENU_STATUSLINE_FMT_MORE, "More formatting options") dcl(MENU_STATUSLINE_TOOLS," " ) dcl(MENU_STATUSLINE_TOOLS_SPELLING," ") dcl(MENU_STATUSLINE_TOOLS_SPELL,"Check the document for incorrect spelling") @@ -1139,6 +1170,7 @@ dcl(MENU_STATUSLINE_TOOLS_REVISIONS_MARK,"Mark changes as you type") dcl(MENU_STATUSLINE_TOOLS_REVISIONS_ACCEPT_REVISION,"Accept the suggested change") dcl(MENU_STATUSLINE_TOOLS_REVISIONS_REJECT_REVISION,"Remove the suggested change") +dcl(MENU_STATUSLINE_TOOLS_MORE,"More tools") dcl(MENU_STATUSLINE_TABLE, "Table") dcl(MENU_STATUSLINE_TABLE_INSERT, "Insert") dcl(MENU_STATUSLINE_TABLE_INSERT_TABLE, "Insert Table") @@ -1203,6 +1235,7 @@ dcl(MENU_STATUSLINE_HELP_ABOUT_GNU,"About the GNU project") dcl(MENU_STATUSLINE_HELP_ABOUT_GNOMEOFFICE,"About the GNOME Office project") dcl(MENU_STATUSLINE_HELP_REPORT_BUG, "Report a bug and help AbiWord become a better product") +dcl(MENU_STATUSLINE_HELP_MORE, "More options") dcl(MENU_STATUSLINE_SPELL_SUGGEST_1,"Change to this suggested spelling") dcl(MENU_STATUSLINE_SPELL_SUGGEST_2,"Change to this suggested spelling") dcl(MENU_STATUSLINE_SPELL_SUGGEST_3,"Change to this suggested spelling") @@ -1313,6 +1346,8 @@ dcl(TOOLBAR_LABEL_3COLUMN,"3 Columns") dcl(TOOLBAR_LABEL_VIEW_SHOWPARA,"Show All") dcl(TOOLBAR_LABEL_ZOOM,"Zoom") +dcl(TOOLBAR_LABEL_ZOOM_IN,"Zoom In") +dcl(TOOLBAR_LABEL_ZOOM_OUT,"Zoom Out") dcl(TOOLBAR_LABEL_LISTS_BULLETS,"Bullets") dcl(TOOLBAR_LABEL_LISTS_NUMBERS,"Numbering") dcl(TOOLBAR_LABEL_COLOR_FORE,"Font color") @@ -1383,6 +1418,8 @@ dcl(TOOLBAR_STATUSLINE_3COLUMN,"3 Columns") dcl(TOOLBAR_STATUSLINE_VIEW_SHOWPARA,"Show/hide formatting marks") dcl(TOOLBAR_STATUSLINE_ZOOM,"Zoom") +dcl(TOOLBAR_STATUSLINE_ZOOM_IN,"Increase zoom level (Page appears larger)") +dcl(TOOLBAR_STATUSLINE_ZOOM_OUT,"Decrease Zoom level (Page appears smaller)") dcl(TOOLBAR_STATUSLINE_LISTS_BULLETS,"Bullets") dcl(TOOLBAR_STATUSLINE_LISTS_NUMBERS,"Numbering") dcl(TOOLBAR_STATUSLINE_COLOR_FORE,"Font color") @@ -1453,6 +1490,8 @@ dcl(TOOLBAR_TOOLTIP_3COLUMN,"3 Columns") dcl(TOOLBAR_TOOLTIP_VIEW_SHOWPARA,"Show/hide formatting marks") dcl(TOOLBAR_TOOLTIP_ZOOM,"Zoom") +dcl(TOOLBAR_TOOLTIP_ZOOM_IN,"Zoom In") +dcl(TOOLBAR_TOOLTIP_ZOOM_OUT,"Zoom Out") dcl(TOOLBAR_TOOLTIP_LISTS_BULLETS,"Bullets") dcl(TOOLBAR_TOOLTIP_LISTS_NUMBERS,"Numbering") dcl(TOOLBAR_TOOLTIP_COLOR_FORE,"Font color") Only in ../abi/src/wp/ap/xp: ap_Strings.o diff -ru ../../abiword-2.0.11.abicvs/abi/src/wp/ap/xp/ap_TB_Layouts_FileEditOps.h ../abi/src/wp/ap/xp/ap_TB_Layouts_FileEditOps.h --- ../../abiword-2.0.11.abicvs/abi/src/wp/ap/xp/ap_TB_Layouts_FileEditOps.h 2003-12-15 10:01:52.000000000 +0000 +++ ../abi/src/wp/ap/xp/ap_TB_Layouts_FileEditOps.h 2004-09-12 16:58:05.000000000 +0100 @@ -30,7 +30,7 @@ ToolbarItem(AP_TOOLBAR_ID_FILE_NEW) ToolbarItem(AP_TOOLBAR_ID_FILE_OPEN) ToolbarItem(AP_TOOLBAR_ID_FILE_SAVE) - ToolbarItem(AP_TOOLBAR_ID_FILE_SAVEAS) + //ToolbarItem(AP_TOOLBAR_ID_FILE_SAVEAS) Spacer() ToolbarItem(AP_TOOLBAR_ID_FILE_PRINT) @@ -38,25 +38,31 @@ ToolbarItem(AP_TOOLBAR_ID_FILE_PRINT_PREVIEW) #endif ToolbarItem(AP_TOOLBAR_ID_SPELLCHECK) - Spacer() + ToolbarItem(AP_TOOLBAR_ID_EDIT_CUT) ToolbarItem(AP_TOOLBAR_ID_EDIT_COPY) ToolbarItem(AP_TOOLBAR_ID_EDIT_PASTE) - ToolbarItem(AP_TOOLBAR_ID_FMTPAINTER) + + //ToolbarItem(AP_TOOLBAR_ID_FMTPAINTER) Spacer() ToolbarItem(AP_TOOLBAR_ID_EDIT_UNDO) ToolbarItem(AP_TOOLBAR_ID_EDIT_REDO) - Spacer() - ToolbarItem(AP_TOOLBAR_ID_1COLUMN) - ToolbarItem(AP_TOOLBAR_ID_2COLUMN) - ToolbarItem(AP_TOOLBAR_ID_3COLUMN) +// Spacer() +// ToolbarItem(AP_TOOLBAR_ID_1COLUMN) +// ToolbarItem(AP_TOOLBAR_ID_2COLUMN) +// ToolbarItem(AP_TOOLBAR_ID_3COLUMN) Spacer() ToolbarItem(AP_TOOLBAR_ID_IMG) - ToolbarItem(AP_TOOLBAR_ID_VIEW_SHOWPARA) + ToolbarItem(AP_TOOLBAR_ID_INSERT_TABLE) +// ToolbarItem(AP_TOOLBAR_ID_VIEW_SHOWPARA) + Spacer() + ToolbarItem(AP_TOOLBAR_ID_ZOOM_IN) ToolbarItem(AP_TOOLBAR_ID_ZOOM) - ToolbarItem(AP_TOOLBAR_ID_HELP) + ToolbarItem(AP_TOOLBAR_ID_ZOOM_OUT) +// Spacer() +// ToolbarItem(AP_TOOLBAR_ID_HELP) EndLayout() diff -ru ../../abiword-2.0.11.abicvs/abi/src/wp/ap/xp/ap_Toolbar_ActionSet.cpp ../abi/src/wp/ap/xp/ap_Toolbar_ActionSet.cpp --- ../../abiword-2.0.11.abicvs/abi/src/wp/ap/xp/ap_Toolbar_ActionSet.cpp 2004-06-08 15:54:54.000000000 +0100 +++ ../abi/src/wp/ap/xp/ap_Toolbar_ActionSet.cpp 2004-09-16 17:58:58.000000000 +0100 @@ -70,9 +70,9 @@ _s(AP_TOOLBAR_ID__BOGUS1__, EV_TBIT_BOGUS, NULL, 0, NULL); - _s(AP_TOOLBAR_ID_FILE_NEW, EV_TBIT_PushButton, "toolbarNew", AV_CHG_NONE, NULL); + _s(AP_TOOLBAR_ID_FILE_NEW, EV_TBIT_PushButton, "toolbarNew", AV_CHG_NONE, NULL); _s(AP_TOOLBAR_ID_FILE_OPEN, EV_TBIT_PushButton, "fileOpen", AV_CHG_NONE, NULL); - _s(AP_TOOLBAR_ID_FILE_SAVE, EV_TBIT_PushButton, "fileSave", AV_CHG_ALL, ap_ToolbarGetState_Changes); + _s(AP_TOOLBAR_ID_FILE_SAVE, EV_TBIT_PushButton, "fileSave", AV_CHG_SAVE /*AV_CHG_ALL*/, ap_ToolbarGetState_Changes); _s(AP_TOOLBAR_ID_FILE_SAVEAS, EV_TBIT_PushButton, "fileSaveAs", AV_CHG_NONE, NULL); _s(AP_TOOLBAR_ID_FILE_PRINT, EV_TBIT_PushButton, "printTB", AV_CHG_NONE, NULL); _s(AP_TOOLBAR_ID_FILE_PRINT_PREVIEW, EV_TBIT_PushButton, "printPreview", AV_CHG_NONE, NULL); @@ -133,6 +133,8 @@ // AV_CHG_WINDOWSIZE, below, doesn't seem right. TODO _s(AP_TOOLBAR_ID_ZOOM, EV_TBIT_ComboBox, "zoom", AV_CHG_WINDOWSIZE, ap_ToolbarGetState_Zoom); + _s(AP_TOOLBAR_ID_ZOOM_IN, EV_TBIT_PushButton, "zoomIn", AV_CHG_WINDOWSIZE, NULL); + _s(AP_TOOLBAR_ID_ZOOM_OUT, EV_TBIT_PushButton, "zoomOut", AV_CHG_WINDOWSIZE, NULL); // AV_CHG_ALL, below, doesn't seem right. TODO _s(AP_TOOLBAR_ID_LISTS_BULLETS, EV_TBIT_ToggleButton, "doBullets", AV_CHG_ALL, ap_ToolbarGetState_Bullets ); @@ -165,5 +167,3 @@ return pActionSet; } - - Only in ../abi/src/wp/ap/xp: ap_Toolbar_ActionSet.o diff -ru ../../abiword-2.0.11.abicvs/abi/src/wp/ap/xp/ap_Toolbar_Functions.cpp ../abi/src/wp/ap/xp/ap_Toolbar_Functions.cpp --- ../../abiword-2.0.11.abicvs/abi/src/wp/ap/xp/ap_Toolbar_Functions.cpp 2004-06-08 15:54:54.000000000 +0100 +++ ../abi/src/wp/ap/xp/ap_Toolbar_Functions.cpp 2004-09-16 18:03:29.000000000 +0100 @@ -124,7 +124,7 @@ switch (id) { case AP_TOOLBAR_ID_FILE_SAVE: - if (!pView->getDocument()->isDirty() || !pView->canDo(true) || pView->getDocument()->getFileName() == NULL) + if (!pView->getDocument()->isDirty() || !pView->canDo(true))// # PSION-ABL PSIBUG #564 || pView->getDocument()->getFileName() == NULL) s = EV_TIS_Gray; break; case AP_TOOLBAR_ID_EDIT_UNDO: Only in ../abi/src/wp/ap/xp: ap_Toolbar_Functions.o diff -ru ../../abiword-2.0.11.abicvs/abi/src/wp/ap/xp/ap_Toolbar_Iconmap.h ../abi/src/wp/ap/xp/ap_Toolbar_Iconmap.h --- ../../abiword-2.0.11.abicvs/abi/src/wp/ap/xp/ap_Toolbar_Iconmap.h 2003-12-29 21:28:19.000000000 +0000 +++ ../abi/src/wp/ap/xp/ap_Toolbar_Iconmap.h 2004-09-12 16:45:36.000000000 +0100 @@ -75,6 +75,8 @@ toolbariconmap(3COLUMN,tb_3column_xpm) toolbariconmap(VIEW_SHOWPARA,tb_view_showpara_xpm) toolbariconmap(ZOOM,NoIcon) +toolbariconmap(ZOOM,NoIcon) +toolbariconmap(ZOOM,NoIcon) toolbariconmap(LISTS_BULLETS,tb_lists_bullets_xpm) toolbariconmap(LISTS_NUMBERS,tb_lists_numbers_xpm) toolbariconmap(COLOR_FORE,tb_text_fgcolor_xpm) @@ -182,4 +184,4 @@ // // SAMPLE: toolbariconmap(LISTS_BULLETS_fi-FI,tb_lists_xpm) -// Add new overloaded icons here +// Add new overloaded icons here Only in ../abi/src/wp/ap/xp: ap_Toolbar_Icons.o diff -ru ../../abiword-2.0.11.abicvs/abi/src/wp/ap/xp/ap_Toolbar_Id_List.h ../abi/src/wp/ap/xp/ap_Toolbar_Id_List.h --- ../../abiword-2.0.11.abicvs/abi/src/wp/ap/xp/ap_Toolbar_Id_List.h 2002-11-22 04:19:38.000000000 +0000 +++ ../abi/src/wp/ap/xp/ap_Toolbar_Id_List.h 2004-09-12 16:45:36.000000000 +0100 @@ -91,6 +91,8 @@ toolbaritem(3COLUMN) toolbaritem(VIEW_SHOWPARA) toolbaritem(ZOOM) +toolbaritem(ZOOM_IN) +toolbaritem(ZOOM_OUT) toolbaritem(LISTS_BULLETS) toolbaritem(LISTS_NUMBERS) toolbaritem(COLOR_FORE) @@ -113,5 +115,3 @@ toolbaritem(MERGERIGHT) toolbaritem(MERGEABOVE) toolbaritem(MERGEBELOW) - - Only in ../abi/src/wp/ap/xp: ap_Toolbar_LabelSet.o Only in ../abi/src/wp/ap/xp: ap_Toolbar_Layouts.o diff -ru ../../abiword-2.0.11.abicvs/abi/src/wp/ap/xp/ap_Toolbar_Layouts_All.h ../abi/src/wp/ap/xp/ap_Toolbar_Layouts_All.h --- ../../abiword-2.0.11.abicvs/abi/src/wp/ap/xp/ap_Toolbar_Layouts_All.h 2002-09-21 03:53:38.000000000 +0100 +++ ../abi/src/wp/ap/xp/ap_Toolbar_Layouts_All.h 2004-09-02 12:27:33.000000000 +0100 @@ -31,7 +31,3 @@ #include "ap_TB_Layouts_FormatOps.h" #include "ap_TB_Layouts_TableOps.h" #include "ap_TB_Layouts_ExtraOps.h" - - - - Only in ../abi/src/wp/ap/xp: ap_TopRuler.o Only in ../abi/src/wp/ap/xp: ap_wp_sidebar.cpp Only in ../abi/src/wp/ap/xp: ap_wp_sidebar.o Only in ../abi/src/wp/ap/xp: ap_wp_splash.cpp Only in ../abi/src/wp/ap/xp: ap_wp_splash.o Only in ../abi/src/wp/ap/xp: libWpAp_xp.a Only in ../abi/src/wp/impexp: GNUmakefile Only in ../abi/src/wp/impexp: GNUmakefile.in Only in ../abi/src/wp/impexp/cocoa: GNUmakefile Only in ../abi/src/wp/impexp/cocoa: GNUmakefile.in Only in ../abi/src/wp/impexp: libImpExp.a Only in ../abi/src/wp/impexp/qnx: GNUmakefile Only in ../abi/src/wp/impexp/qnx: GNUmakefile.in Only in ../abi/src/wp/impexp/unix: .deps Only in ../abi/src/wp/impexp/unix: GNUmakefile Only in ../abi/src/wp/impexp/unix: GNUmakefile.in Only in ../abi/src/wp/impexp/unix: ie_impexp_RegisterUnix.o Only in ../abi/src/wp/impexp/unix: libImpExp_unix.a Only in ../abi/src/wp/impexp/xp: .deps Only in ../abi/src/wp/impexp/xp: GNUmakefile Only in ../abi/src/wp/impexp/xp: GNUmakefile.in Only in ../abi/src/wp/impexp/xp: ie_FileInfo.o Only in ../abi/src/wp/impexp/xp: ie_Table.o Only in ../abi/src/wp/impexp/xp: ie_exp.o Only in ../abi/src/wp/impexp/xp: ie_exp_AWT.o Only in ../abi/src/wp/impexp/xp: ie_exp_AbiWord_1.o Only in ../abi/src/wp/impexp/xp: ie_exp_GZipAbiWord.o Only in ../abi/src/wp/impexp/xp: ie_exp_HTML.o Only in ../abi/src/wp/impexp/xp: ie_exp_RTF.o Only in ../abi/src/wp/impexp/xp: ie_exp_RTF_AttrProp.o Only in ../abi/src/wp/impexp/xp: ie_exp_RTF_listenerGetProps.o Only in ../abi/src/wp/impexp/xp: ie_exp_RTF_listenerWriteDoc.o Only in ../abi/src/wp/impexp/xp: ie_exp_Text.o Only in ../abi/src/wp/impexp/xp: ie_imp.o Only in ../abi/src/wp/impexp/xp: ie_impGraphic.o Only in ../abi/src/wp/impexp/xp: ie_impGraphic_PNG.o Only in ../abi/src/wp/impexp/xp: ie_impGraphic_SVG.o Only in ../abi/src/wp/impexp/xp: ie_imp_AbiWord_1.o Only in ../abi/src/wp/impexp/xp: ie_imp_GZipAbiWord.o Only in ../abi/src/wp/impexp/xp: ie_imp_GraphicAsDocument.o diff -ru ../../abiword-2.0.11.abicvs/abi/src/wp/impexp/xp/ie_imp_MsWord_97.cpp ../abi/src/wp/impexp/xp/ie_imp_MsWord_97.cpp --- ../../abiword-2.0.11.abicvs/abi/src/wp/impexp/xp/ie_imp_MsWord_97.cpp 2004-08-07 23:44:01.000000000 +0100 +++ ../abi/src/wp/impexp/xp/ie_imp_MsWord_97.cpp 2004-09-12 15:37:36.000000000 +0100 @@ -4320,6 +4320,7 @@ if (apap->dyaAfter) { UT_String_sprintf(propBuffer, "margin-bottom:%dpt;", (apap->dyaAfter / 20)); + s += propBuffer; } // tab stops Only in ../abi/src/wp/impexp/xp: ie_imp_MsWord_97.o Only in ../abi/src/wp/impexp/xp: ie_imp_RTF.o Only in ../abi/src/wp/impexp/xp: ie_imp_Text.o Only in ../abi/src/wp/impexp/xp: ie_imp_XHTML.o Only in ../abi/src/wp/impexp/xp: ie_imp_XML.o Only in ../abi/src/wp/impexp/xp: ie_impexp_Register.o Only in ../abi/src/wp/impexp/xp: ie_mailmerge.o Only in ../abi/src/wp/impexp/xp: libImpExp_xp.a Only in ../abi/src/wp/main: GNUmakefile Only in ../abi/src/wp/main: GNUmakefile.in Only in ../abi/src/wp/main/cocoa/AbiWord.app/Contents/Frameworks: GNUmakefile Only in ../abi/src/wp/main/cocoa/AbiWord.app/Contents/Frameworks: GNUmakefile.in Only in ../abi/src/wp/main/cocoa/AbiWord.app/Contents: GNUmakefile Only in ../abi/src/wp/main/cocoa/AbiWord.app/Contents: GNUmakefile.in Only in ../abi/src/wp/main/cocoa/AbiWord.app/Contents/MacOS: GNUmakefile Only in ../abi/src/wp/main/cocoa/AbiWord.app/Contents/MacOS: GNUmakefile.in Only in ../abi/src/wp/main/cocoa/AbiWord.app/Contents/Resources/English.lproj: GNUmakefile Only in ../abi/src/wp/main/cocoa/AbiWord.app/Contents/Resources/English.lproj: GNUmakefile.in Only in ../abi/src/wp/main/cocoa/AbiWord.app/Contents/Resources: GNUmakefile Only in ../abi/src/wp/main/cocoa/AbiWord.app/Contents/Resources: GNUmakefile.in Only in ../abi/src/wp/main/cocoa/AbiWord.app: GNUmakefile Only in ../abi/src/wp/main/cocoa/AbiWord.app: GNUmakefile.in Only in ../abi/src/wp/main/cocoa: GNUmakefile Only in ../abi/src/wp/main/cocoa: GNUmakefile.in Only in ../abi/src/wp/main/cocoa/bundle: GNUmakefile Only in ../abi/src/wp/main/cocoa/bundle: GNUmakefile.in diff -ru ../../abiword-2.0.11.abicvs/abi/src/wp/main/cocoa/bundle/Info.plist ../abi/src/wp/main/cocoa/bundle/Info.plist --- ../../abiword-2.0.11.abicvs/abi/src/wp/main/cocoa/bundle/Info.plist 2003-07-20 13:22:50.000000000 +0100 +++ ../abi/src/wp/main/cocoa/bundle/Info.plist 2004-09-15 15:59:32.000000000 +0100 @@ -69,6 +69,6 @@ CFBundleSignature AbiW CFBundleVersion - 1.99.2 + 2.0.11 Only in ../abi/src/wp/main/cocoa/bundle: Info.plist.orig Only in ../abi/src/wp/main/cocoa/bundle: Info.plist.rej Only in ../abi/src/wp/main/qnx: GNUmakefile Only in ../abi/src/wp/main/qnx: GNUmakefile.in Only in ../abi/src/wp/main/unix: .deps Only in ../abi/src/wp/main/unix: AbiWord-2.0 Only in ../abi/src/wp/main/unix: GNUmakefile Only in ../abi/src/wp/main/unix: GNUmakefile.in Only in ../abi/src/wp/main/unix: UnixMain.o Only in ../abi/src/wp/main/unix: abi_ver.cpp Only in ../abi/src/wp/main/unix: abi_ver.o Only in ../abi/src/wp/main/xp: GNUmakefile Only in ../abi/src/wp/main/xp: GNUmakefile.in diff -ru ../../abiword-2.0.11.abicvs/abi/user/wp/strings/en-GB.strings ../abi/user/wp/strings/en-GB.strings --- ../../abiword-2.0.11.abicvs/abi/user/wp/strings/en-GB.strings 2003-06-07 04:12:59.000000000 +0100 +++ ../abi/user/wp/strings/en-GB.strings 2004-09-02 12:27:33.000000000 +0100 @@ -80,6 +80,7 @@ MENU_LABEL_FILE_RECENT_8="&8 %s" MENU_LABEL_FILE_RECENT_9="&9 %s" MENU_LABEL_FILE_EXIT="E&xit" +MENU_LABEL_FILE_MORE="&More" MENU_LABEL_EDIT="&Edit" MENU_LABEL_EDIT_UNDO="&Undo" MENU_LABEL_EDIT_REDO="&Redo" @@ -96,7 +97,7 @@ MENU_LABEL_VIEW="&View" MENU_LABEL_VIEW_NORMAL="&Normal" MENU_LABEL_VIEW_WEB="&Web Layout" -MENU_LABEL_VIEW_PRINT="&Print Layout" +MENU_LABEL_VIEW_PRINT="&Page Layout" MENU_LABEL_VIEW_TOOLBARS="&Toolbars" MENU_LABEL_VIEW_TB_STD="&Standard" MENU_LABEL_VIEW_TB_FORMAT="&Formatting" @@ -107,6 +108,7 @@ MENU_LABEL_VIEW_HEADFOOT="&Header and Footer" MENU_LABEL_VIEW_FULLSCREEN="F&ull Screen" MENU_LABEL_VIEW_ZOOM="&Zoom" +MENU_LABEL_VIEW_MORE="&More" MENU_LABEL_INSERT="&Insert" MENU_LABEL_INSERT_BREAK="&Break" MENU_LABEL_INSERT_PAGENO="Page N&umbers" @@ -115,6 +117,7 @@ MENU_LABEL_INSERT_SYMBOL="Sy&mbol" MENU_LABEL_INSERT_PICTURE="&Picture" MENU_LABEL_INSERT_GRAPHIC="&From File" +MENU_LABEL_INSERT_MORE="&More" MENU_LABEL_FORMAT="F&ormat" MENU_LABEL_FMT_LANGUAGE="&Language" MENU_LABEL_FMT_FONT="&Font" @@ -126,6 +129,11 @@ MENU_LABEL_FMT_TOGGLECASE="C&hange Case" MENU_LABEL_FMT_BACKGROUND="Back&ground" MENU_LABEL_FMT_STYLE="St&yle" +MENU_LABEL_FMT_STYLE_PARAGRAPH="Indents and Spacing" +MENU_LABEL_FMT_STYLE_FONT="Font" +MENU_LABEL_FMT_STYLE_TABS="Tabs" +MENU_LABEL_FMT_STYLE_NUMBERING="Numbering" +MENU_LABEL_FMT_STYLE_LANGUAGE="Language" MENU_LABEL_FMT_TABS="&Tabs" MENU_LABEL_FMT_BOLD="&Bold" MENU_LABEL_FMT_ITALIC="&Italic" @@ -136,6 +144,7 @@ MENU_LABEL_FMT_BOTTOMLINE="Bottomline" MENU_LABEL_FMT_SUPERSCRIPT="Supe&rscript" MENU_LABEL_FMT_SUBSCRIPT="&Subscript" +MENU_LABEL_FMT_MORE="&More" MENU_LABEL_TOOLS="&Tools" MENU_LABEL_TOOLS_SPELLING="&Spelling" MENU_LABEL_TOOLS_SPELL="Spe&lling" @@ -213,6 +222,7 @@ MENU_STATUSLINE_FILE_RECENT_8="Open this document" MENU_STATUSLINE_FILE_RECENT_9="Open this document" MENU_STATUSLINE_FILE_EXIT="Close all windows in the application and exit" +MENU_STATUSLINE_FILE_MORE="Additional menu items" MENU_STATUSLINE_EDIT=" " MENU_STATUSLINE_EDIT_UNDO="Undo editing" MENU_STATUSLINE_EDIT_REDO="Redo previously undone editing" @@ -240,6 +250,7 @@ MENU_STATUSLINE_VIEW_HEADFOOT="Edit text at the top or bottom of every page" MENU_STATUSLINE_VIEW_FULLSCREEN="View the document in full screen mode" MENU_STATUSLINE_VIEW_ZOOM="Reduce or enlarge the document display" +MENU_STATUSLINE_VIEW_MORE="Additional menu items" MENU_STATUSLINE_INSERT=" " MENU_STATUSLINE_INSERT_BREAK="Insert a page, column, or section break" MENU_STATUSLINE_INSERT_PAGENO="Insert an automatically-updated page number" @@ -248,6 +259,7 @@ MENU_STATUSLINE_INSERT_SYMBOL="Insert a symbol or other special character" MENU_STATUSLINE_INSERT_PICTURE="Insert a picture" MENU_STATUSLINE_INSERT_GRAPHIC="Insert an existing picture from another file" +MENU_STATUSLINE-INSERT_MORE="Additional Menu items" MENU_STATUSLINE_FORMAT=" " MENU_STATUSLINE_FMT_LANGUAGE="Change the language of the selected text" MENU_STATUSLINE_FMT_FONT="Change the font of the selected text" @@ -259,6 +271,11 @@ MENU_STATUSLINE_FMT_TOGGLECASE="Change the case of the selected text" MENU_STATUSLINE_FMT_BACKGROUND="Change your document's background colour" MENU_STATUSLINE_FMT_STYLE="Define or apply style for the selection" +MENU_STATUSLINE_FMT_STYLE_PARAGRAPH="Adjust indents and spacing for selected style" +MENU_STATUSLINE_FMT_STYLE_FONT="Adjust font used in selected style" +MENU_STATUSLINE_FMT_STYLE_TABS="Adjust Tab settings for selected style" +MENU_STATUSLINE_FMT_STYLE_NUMBERING="Adjust numbering used in selected style" +MENU_STATUSLINE_FMT_STYLE_LANGUAGE="Select the language of the selected style" MENU_STATUSLINE_FMT_TABS="Set tab stops" MENU_STATUSLINE_FMT_BOLD="Make the selection bold (toggle)" MENU_STATUSLINE_FMT_ITALIC="Make the selection italic (toggle)" @@ -269,6 +286,7 @@ MENU_STATUSLINE_FMT_BOTTOMLINE="Line below the selection (toggle)" MENU_STATUSLINE_FMT_SUPERSCRIPT="Make the selection superscript (toggle)" MENU_STATUSLINE_FMT_SUBSCRIPT="Make the selection subscript (toggle)" +MENU_STATUSLINE_FMT_MORE="More formatting options" MENU_STATUSLINE_TOOLS=" " MENU_STATUSLINE_TOOLS_SPELLING=" " MENU_STATUSLINE_TOOLS_SPELL="Check the document for incorrect spelling" @@ -478,4 +496,3 @@ /> - diff -ru ../../abiword-2.0.11.abicvs/abi/user/wp/strings/en-IE.strings ../abi/user/wp/strings/en-IE.strings --- ../../abiword-2.0.11.abicvs/abi/user/wp/strings/en-IE.strings 2003-06-07 04:13:00.000000000 +0100 +++ ../abi/user/wp/strings/en-IE.strings 2004-09-02 12:27:33.000000000 +0100 @@ -71,6 +71,7 @@ MENU_LABEL_FILE_RECENT_8="&8 %s" MENU_LABEL_FILE_RECENT_9="&9 %s" MENU_LABEL_FILE_EXIT="E&xit" +MENU_LABEL_FILE_MORE="&More" MENU_LABEL_EDIT="&Edit" MENU_LABEL_EDIT_UNDO="&Undo" MENU_LABEL_EDIT_REDO="&Redo" @@ -87,7 +88,7 @@ MENU_LABEL_VIEW="&View" MENU_LABEL_VIEW_NORMAL="&Normal" MENU_LABEL_VIEW_WEB="&Web Layout" -MENU_LABEL_VIEW_PRINT="&Print Layout" +MENU_LABEL_VIEW_PRINT="&Page Layout" MENU_LABEL_VIEW_TOOLBARS="&Toolbars" MENU_LABEL_VIEW_TB_STD="&Standard" MENU_LABEL_VIEW_TB_FORMAT="&Formatting" @@ -98,6 +99,7 @@ MENU_LABEL_VIEW_HEADFOOT="&Header and Footer" MENU_LABEL_VIEW_FULLSCREEN="F&ull Screen" MENU_LABEL_VIEW_ZOOM="&Zoom" +MENU_LABEL_VIEW_MORE="&More" MENU_LABEL_INSERT="&Insert" MENU_LABEL_INSERT_BREAK="&Break" MENU_LABEL_INSERT_PAGENO="Page N&umbers" @@ -106,6 +108,7 @@ MENU_LABEL_INSERT_SYMBOL="Sy&mbol" MENU_LABEL_INSERT_PICTURE="&Picture" MENU_LABEL_INSERT_GRAPHIC="&From File" +MENU_LABEL_INSERT_MORE="&More" MENU_LABEL_FORMAT="F&ormat" MENU_LABEL_FMT_LANGUAGE="&Language" MENU_LABEL_FMT_FONT="&Font" @@ -127,6 +130,7 @@ MENU_LABEL_FMT_BOTTOMLINE="Bottomline" MENU_LABEL_FMT_SUPERSCRIPT="Supe&rscript" MENU_LABEL_FMT_SUBSCRIPT="&Subscript" +MENU_LABEL_FMT_MORE="&More" MENU_LABEL_TOOLS="&Tools" MENU_LABEL_TOOLS_SPELLING="&Spelling" MENU_LABEL_TOOLS_SPELL="Spe&lling" @@ -204,6 +208,7 @@ MENU_STATUSLINE_FILE_RECENT_8="Open this document" MENU_STATUSLINE_FILE_RECENT_9="Open this document" MENU_STATUSLINE_FILE_EXIT="Close all windows in the application and exit" +MENU_STATUSLINE_FILE_MORE="Additional menu items" MENU_STATUSLINE_EDIT=" " MENU_STATUSLINE_EDIT_UNDO="Undo editing" MENU_STATUSLINE_EDIT_REDO="Redo previously undone editing" @@ -231,6 +236,7 @@ MENU_STATUSLINE_VIEW_HEADFOOT="Edit text at the top or bottom of every page" MENU_STATUSLINE_VIEW_FULLSCREEN="View the document in full screen mode" MENU_STATUSLINE_VIEW_ZOOM="Reduce or enlarge the document display" +MENU_STATUSLINE_VIEW_MORE="Additional menu items" MENU_STATUSLINE_INSERT=" " MENU_STATUSLINE_INSERT_BREAK="Insert a page, column, or section break" MENU_STATUSLINE_INSERT_PAGENO="Insert an automatically-updated page number" @@ -239,6 +245,7 @@ MENU_STATUSLINE_INSERT_SYMBOL="Insert a symbol or other special character" MENU_STATUSLINE_INSERT_PICTURE="Insert a picture" MENU_STATUSLINE_INSERT_GRAPHIC="Insert an existing picture from another file" +MENU_STATUSLINE_INSERT_MORE="Additional menu items" MENU_STATUSLINE_FORMAT=" " MENU_STATUSLINE_FMT_LANGUAGE="Change the language of the selected text" MENU_STATUSLINE_FMT_FONT="Change the font of the selected text" @@ -260,6 +267,7 @@ MENU_STATUSLINE_FMT_BOTTOMLINE="Line below the selection (toggle)" MENU_STATUSLINE_FMT_SUPERSCRIPT="Make the selection superscript (toggle)" MENU_STATUSLINE_FMT_SUBSCRIPT="Make the selection subscript (toggle)" +MENU_STATUSLINE_FMT_MORE="More Formatting options" MENU_STATUSLINE_TOOLS=" " MENU_STATUSLINE_TOOLS_SPELLING=" " MENU_STATUSLINE_TOOLS_SPELL="Check the document for incorrect spelling" @@ -469,4 +477,3 @@ /> - diff -ru ../../abiword-2.0.11.abicvs/abidistfiles/templates/A4.awt ../abidistfiles/templates/A4.awt --- ../../abiword-2.0.11.abicvs/abidistfiles/templates/A4.awt 2002-12-02 03:16:05.000000000 +0000 +++ ../abidistfiles/templates/A4.awt 2004-09-09 11:22:25.000000000 +0100 @@ -1,15 +1,23 @@ - + - - - - - - - + + + + + + + + +application/x-abiword +AbiWord +Thu Sep 9 11:12:55 2004 + + + + -
-

+

+

Only in ../abidistfiles/templates: A4.awt~ diff -ru ../../abiword-2.0.11.abicvs/abidistfiles/templates/Business-Report.awt ../abidistfiles/templates/Business-Report.awt --- ../../abiword-2.0.11.abicvs/abidistfiles/templates/Business-Report.awt 2002-12-02 03:16:06.000000000 +0000 +++ ../abidistfiles/templates/Business-Report.awt 2004-09-09 11:22:22.000000000 +0100 @@ -15,16 +15,16 @@
-

-

-

-

-

-

Title

-

Subtitle

-

-

Release 1.0

-

+

+

+

+

+

+

Title

+

Subtitle

+

+

Release 1.0

+

@@ -44,67 +44,67 @@

-

-

Author

-

-

-

-

-

-

-

-

-

-

-

-

-

-

-

-

-

-

-

-

-

-

-

-

-

-

-

-

-

-

-

-

-

-

-

-

-

-

-

-

-

-

Copyright (C) 2002 by My Company

-

-

Copyright notes

-

-

-

Table Of Contents

-

-

+

+

Author

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

Copyright (C) 2004 by My Company

+

+

Copyright notes

+

+

+

Table Of Contents

+

+

-

Heading 1

-

text

-

Heading 2

-

text

-

Heading 3

-

+

Heading 1

+

text

+

Heading 2

+

text

+

Heading 3

+

Author Page

Only in ../abidistfiles/templates: Business-Report.awt~ diff -ru ../../abiword-2.0.11.abicvs/abidistfiles/templates/Employee-Directory.awt ../abidistfiles/templates/Employee-Directory.awt --- ../../abiword-2.0.11.abicvs/abidistfiles/templates/Employee-Directory.awt 2002-12-02 03:16:06.000000000 +0000 +++ ../abidistfiles/templates/Employee-Directory.awt 2004-09-09 11:23:48.000000000 +0100 @@ -8,18 +8,18 @@ - +
-

Company Name

-

Directory of Employees

-

-

-

-

-

-

-

-

+

Company Name

+

Directory of Employees

+

+

+

+

+

+

+

+

@@ -36,59 +36,59 @@

Normal Style (123) 555-1212

-

Department Name

-

The big boss upstairs (123) 555-1212

-

Last Name, First Name (123) 555-1212

-

Last Name, First Name (123) 555-1212

-

Last Name, First Name (123) 555-1212

-

Last Name, First Name (123) 555-1212

-

Last Name, First Name (123) 555-1212

-

Last Name, First Name (123) 555-1212

-

Last Name, First Name (123) 555-1212

-

-

-

Department Name

-

The big boss upstairs (123) 555-1212

-

Last Name, First Name (123) 555-1212

-

Last Name, First Name (123) 555-1212

-

Last Name, First Name (123) 555-1212

-

Last Name, First Name (123) 555-1212

-

Last Name, First Name (123) 555-1212

-

Last Name, First Name (123) 555-1212

-

Last Name, First Name (123) 555-1212

-

-

-

Department Name

-

The big boss upstairs (123) 555-1212

-

Last Name, First Name (123) 555-1212

-

Last Name, First Name (123) 555-1212

-

Last Name, First Name (123) 555-1212

-

Last Name, First Name (123) 555-1212

-

Last Name, First Name (123) 555-1212

-

Last Name, First Name (123) 555-1212

-

Last Name, First Name (123) 555-1212

-

Last Name, First Name (123) 555-1212

-

Last Name, First Name (123) 555-1212

-

Last Name, First Name (123) 555-1212

-

-

-

Department Name

-

The big boss upstairs (123) 555-1212

-

Last Name, First Name (123) 555-1212

-

Last Name, First Name (123) 555-1212

-

Last Name, First Name (123) 555-1212

-

Last Name, First Name (123) 555-1212

-

Last Name, First Name (123) 555-1212

-

Last Name, First Name (123) 555-1212

-

Last Name, First Name (123) 555-1212

-

Last Name, First Name (123) 555-1212

-

-

-

General Numbers

-

Front Desk (123) 555-1212

-

Security (123) 555-1212

-

Building Management (123) 555-1212

-

Other General Numbers (123) 555-1212

+

Department Name

+

The big boss upstairs (123) 555-1212

+

Last Name, First Name (123) 555-1212

+

Last Name, First Name (123) 555-1212

+

Last Name, First Name (123) 555-1212

+

Last Name, First Name (123) 555-1212

+

Last Name, First Name (123) 555-1212

+

Last Name, First Name (123) 555-1212

+

Last Name, First Name (123) 555-1212

+

+

+

Department Name

+

The big boss upstairs (123) 555-1212

+

Last Name, First Name (123) 555-1212

+

Last Name, First Name (123) 555-1212

+

Last Name, First Name (123) 555-1212

+

Last Name, First Name (123) 555-1212

+

Last Name, First Name (123) 555-1212

+

Last Name, First Name (123) 555-1212

+

Last Name, First Name (123) 555-1212

+

+

+

Department Name

+

The big boss upstairs (123) 555-1212

+

Last Name, First Name (123) 555-1212

+

Last Name, First Name (123) 555-1212

+

Last Name, First Name (123) 555-1212

+

Last Name, First Name (123) 555-1212

+

Last Name, First Name (123) 555-1212

+

Last Name, First Name (123) 555-1212

+

Last Name, First Name (123) 555-1212

+

Last Name, First Name (123) 555-1212

+

Last Name, First Name (123) 555-1212

+

Last Name, First Name (123) 555-1212

+

+

+

Department Name

+

The big boss upstairs (123) 555-1212

+

Last Name, First Name (123) 555-1212

+

Last Name, First Name (123) 555-1212

+

Last Name, First Name (123) 555-1212

+

Last Name, First Name (123) 555-1212

+

Last Name, First Name (123) 555-1212

+

Last Name, First Name (123) 555-1212

+

Last Name, First Name (123) 555-1212

+

Last Name, First Name (123) 555-1212

+

+

+

General Numbers

+

Front Desk (123) 555-1212

+

Security (123) 555-1212

+

Building Management (123) 555-1212

+

Other General Numbers (123) 555-1212

Only in ../abidistfiles/templates: Employee-Directory.awt~ diff -ru ../../abiword-2.0.11.abicvs/abidistfiles/templates/Fax-Coversheet.awt ../abidistfiles/templates/Fax-Coversheet.awt --- ../../abiword-2.0.11.abicvs/abidistfiles/templates/Fax-Coversheet.awt 2002-12-02 03:16:07.000000000 +0000 +++ ../abidistfiles/templates/Fax-Coversheet.awt 2004-09-09 11:26:04.000000000 +0100 @@ -8,28 +8,28 @@ - +
-

Company Name

-

Company Address Line 1

-

Company Address Line 2

-

Company Address Line 3

-

-

FAX

-

TO: From:

-

Fax: Pages:

-

Phone: Date:

+

Company Name

+

Company Address Line 1

+

Company Address Line 2

+

Company Address Line 3

+

+

FAX

+

TO: From:

+

Fax: Pages:

+

Phone: Date:

Re: CC:

-

 Urgent  For Review  Please Comment  Please Reply  Please Recycle

-

+

 Urgent  For Review  Please Comment  Please Reply  Please Recycle

+

-

Comments

+

Comments

-

This text should the replaced with your comments about the fax and any additional comment to the receiver.

+

This text should the replaced with your comments about the fax and any additional comment to the receiver.

Only in ../abidistfiles/templates: Fax-Coversheet.awt~ diff -ru ../../abiword-2.0.11.abicvs/abidistfiles/templates/Memo.awt ../abidistfiles/templates/Memo.awt --- ../../abiword-2.0.11.abicvs/abidistfiles/templates/Memo.awt 2004-03-26 02:52:06.000000000 +0000 +++ ../abidistfiles/templates/Memo.awt 2004-09-09 11:27:26.000000000 +0100 @@ -1,6 +1,6 @@ - + @@ -14,15 +14,15 @@ Fri Mar 12 21:07:56 2004 - - - - + + + + - +

@@ -59,10 +59,10 @@

The box that this text is in uses AbiWord's table support to draw the border. You can either allow the border to fit to the size of the text as it is now, or press <ENTER> repeatedly at the end of your memo to expand the border to fill the rest of the page.

Don't forget to change the header and footer before printing! If you wish to save this memo for later and ensure that the date above is saved as today's (not automatically updating), select it and type the desired date text over it.

The styles used in this document for correct conversion, import, export, and HTML are:

-

Heading 1 for Company Name

-

Heading 2 for Slogan

-

Heading 3 for "Date:", "To:", etc.

-

Normal for body text

+

Heading 1 for Company Name

+

Heading 2 for Slogan

+

Heading 3 for "Date:", "To:", etc.

+

Normal for body text

Only in ../abidistfiles/templates: Memo.awt~ diff -ru ../../abiword-2.0.11.abicvs/abidistfiles/templates/Press-Release.awt ../abidistfiles/templates/Press-Release.awt --- ../../abiword-2.0.11.abicvs/abidistfiles/templates/Press-Release.awt 2004-03-26 02:51:37.000000000 +0000 +++ ../abidistfiles/templates/Press-Release.awt 2004-09-09 11:28:10.000000000 +0100 @@ -1,6 +1,6 @@ - + @@ -16,19 +16,19 @@ - - - - + + + + - + - + @@ -36,19 +36,19 @@ - - - + + + - - - + + + - + @@ -56,28 +56,28 @@ - +

-

COMPANY NAME HERE

-

Address Line 1

-

Address Line 2

-

Phone

-

Web

+

COMPANY NAME HERE

+

Address Line 1

+

Address Line 2

+

Phone

+

Web

-

Company Does Something With Another Company

-

-

Type your press release text here.

-

AbiWord Styles will automatically insert a double space between paragraphs. This grid will automatically expand to fit the amount of text in your press release.

-

About Company 1

-

About Company 2

-

+

Company Does Something With Another Company

+

+

Type your press release text here.

+

AbiWord Styles will automatically insert a double space between paragraphs. This grid will automatically expand to fit the amount of text in your press release.

+

About Company 1

+

About Company 2

+

-

FOR IMMEDIATE RELEASE

+

FOR IMMEDIATE RELEASE

Only in ../abidistfiles/templates: Press-Release.awt~ diff -ru ../../abiword-2.0.11.abicvs/abidistfiles/templates/Resume.awt ../abidistfiles/templates/Resume.awt --- ../../abiword-2.0.11.abicvs/abidistfiles/templates/Resume.awt 2004-03-26 02:52:07.000000000 +0000 +++ ../abidistfiles/templates/Resume.awt 2004-09-09 11:29:17.000000000 +0100 @@ -14,13 +14,13 @@ Fri Mar 12 22:08:25 2004 - - - - - + + + + + - +

Only in ../abidistfiles/templates: Resume.awt~ diff -ru ../../abiword-2.0.11.abicvs/abidistfiles/templates/Two-Columns.awt ../abidistfiles/templates/Two-Columns.awt --- ../../abiword-2.0.11.abicvs/abidistfiles/templates/Two-Columns.awt 2002-12-02 03:16:08.000000000 +0000 +++ ../abidistfiles/templates/Two-Columns.awt 2004-09-09 11:30:01.000000000 +0100 @@ -8,7 +8,7 @@ - +

Only in ../abidistfiles/templates: Two-Columns.awt~ diff -ru ../../abiword-2.0.11.abicvs/abidistfiles/templates/normal.awt-en_GB ../abidistfiles/templates/normal.awt-en_GB --- ../../abiword-2.0.11.abicvs/abidistfiles/templates/normal.awt-en_GB 2003-05-26 02:56:06.000000000 +0100 +++ ../abidistfiles/templates/normal.awt-en_GB 2004-09-09 11:09:53.000000000 +0100 @@ -1,18 +1,23 @@ - - - - - - - + + + + + + + + +application/x-abiword +AbiWord +Fri Aug 27 18:43:37 2004 + - + -
+

Only in ../: abiword-plugins Only in ../: patch_for_11.diff Only in ../wv: Makefile Only in ../wv: config.cache Only in ../wv: config.h Only in ../wv: config.log Only in ../wv: config.status Only in ../wv/expat: Makefile Only in ../wv/expat/xmlparse: Makefile Only in ../wv/expat/xmltok: Makefile Only in ../wv/exporter: Makefile Only in ../wv/glib-wv: Makefile Only in ../wv/iconv: Makefile Only in ../wv/libole2: Makefile Only in ../wv: libwv.a Only in ../wv/magick: Makefile Only in ../wv/oledecod: Makefile Only in ../wv: version.c Only in ../wv: wvAbw Only in ../wv: wvCleanLatex Only in ../wv: wvDVI Only in ../wv: wvDocBook Only in ../wv: wvHtml Only in ../wv: wvLatex Only in ../wv: wvPDF Only in ../wv: wvPS Only in ../wv: wvText Only in ../wv: wvWml