Index: abi/src/af/xap/beos/xap_BeOSDlg_Zoom.cpp =================================================================== RCS file: /cvsroot/abi/src/af/xap/beos/xap_BeOSDlg_Zoom.cpp,v retrieving revision 1.11 diff -u -r1.11 xap_BeOSDlg_Zoom.cpp --- abi/src/af/xap/beos/xap_BeOSDlg_Zoom.cpp 2000/09/30 20:16:05 1.11 +++ abi/src/af/xap/beos/xap_BeOSDlg_Zoom.cpp 2000/10/30 08:10:11 @@ -125,7 +125,7 @@ m_CustomText->SetEnabled(false); m_DlgZoom->_updatePreviewZoomPercent(200); m_CurrentPercent=200; - m_CurrentType=XAP_BeOSDialog_Zoom::z_200; + m_CurrentType=XAP_Frame::z_200; } break; case '100p': @@ -133,14 +133,14 @@ m_CustomText->SetEnabled(false); m_DlgZoom->_updatePreviewZoomPercent(100); m_CurrentPercent=100; - m_CurrentType=XAP_BeOSDialog_Zoom::z_100; + m_CurrentType=XAP_Frame::z_100; } break; case '075p': { m_CustomText->SetEnabled(false); m_DlgZoom->_updatePreviewZoomPercent(75); - m_CurrentType=XAP_BeOSDialog_Zoom::z_75; + m_CurrentType=XAP_Frame::z_75; m_CurrentPercent=75; } break; @@ -153,21 +153,21 @@ { m_CustomText->SetEnabled(false); //Might want to figure out the page width - m_CurrentType=XAP_BeOSDialog_Zoom::z_PAGEWIDTH; + m_CurrentType=XAP_Frame::z_PAGEWIDTH; m_CurrentPercent=100; } break; case 'whpg': { m_CustomText->SetEnabled(false); - m_CurrentType=XAP_BeOSDialog_Zoom::z_WHOLEPAGE; + m_CurrentType=XAP_Frame::z_WHOLEPAGE; m_CurrentPercent=100; } break; case 'perc': { m_DlgZoom->_updatePreviewZoomPercent(atoi(m_CustomText->Text())); - m_CurrentType=XAP_BeOSDialog_Zoom::z_PERCENT; + m_CurrentType=XAP_Frame::z_PERCENT; m_CurrentPercent=atoi(m_CustomText->Text()); } case 'appl': Index: abi/src/af/xap/qnx/xap_QNXDlg_Zoom.cpp =================================================================== RCS file: /cvsroot/abi/src/af/xap/qnx/xap_QNXDlg_Zoom.cpp,v retrieving revision 1.10 diff -u -r1.10 xap_QNXDlg_Zoom.cpp --- abi/src/af/xap/qnx/xap_QNXDlg_Zoom.cpp 2000/07/25 20:40:05 1.10 +++ abi/src/af/xap/qnx/xap_QNXDlg_Zoom.cpp 2000/10/30 08:10:19 @@ -240,7 +240,7 @@ void XAP_QNXDialog_Zoom::event_Radio200Clicked(void) { //m_zoomType = XAP_Dialog_Zoom::zoomType::z_200; - m_zoomType = z_200; + m_zoomType = XAP_Frame::z_200; _enablePercentSpin(UT_FALSE); _updatePreviewZoomPercent(200); PtDamageWidget(m_previewArea); @@ -249,7 +249,7 @@ void XAP_QNXDialog_Zoom::event_Radio100Clicked(void) { //m_zoomType = XAP_Dialog_Zoom::zoomType::z_100; - m_zoomType = z_100; + m_zoomType = XAP_Frame::z_100; _enablePercentSpin(UT_FALSE); _updatePreviewZoomPercent(100); PtDamageWidget(m_previewArea); @@ -257,7 +257,7 @@ void XAP_QNXDialog_Zoom::event_Radio75Clicked(void) { - m_zoomType = z_75; + m_zoomType = XAP_Frame::z_75; _enablePercentSpin(UT_FALSE); _updatePreviewZoomPercent(75); PtDamageWidget(m_previewArea); @@ -265,7 +265,7 @@ void XAP_QNXDialog_Zoom::event_RadioPageWidthClicked(void) { - m_zoomType = z_PAGEWIDTH; + m_zoomType = XAP_Frame::z_PAGEWIDTH; _enablePercentSpin(UT_FALSE); // TODO : figure out the dimensions PtDamageWidget(m_previewArea); @@ -273,7 +273,7 @@ void XAP_QNXDialog_Zoom::event_RadioWholePageClicked(void) { - m_zoomType = z_WHOLEPAGE; + m_zoomType = XAP_Frame::z_WHOLEPAGE; _enablePercentSpin(UT_FALSE); // TODO : figure out the dimensions PtDamageWidget(m_previewArea); @@ -281,7 +281,7 @@ void XAP_QNXDialog_Zoom::event_RadioPercentClicked(void) { - m_zoomType = z_PERCENT; + m_zoomType = XAP_Frame::z_PERCENT; _enablePercentSpin(UT_TRUE); // call event_SpinPercentChanged() to do the fetch and update work event_SpinPercentChanged(); @@ -549,25 +549,25 @@ _enablePercentSpin(UT_FALSE); // default switch(getZoomType()) { - case XAP_QNXDialog_Zoom::z_200: + case XAP_Frame::z_200: set_toggle_button(m_radio200, UT_TRUE); _updatePreviewZoomPercent(200); break; - case XAP_QNXDialog_Zoom::z_100: + case XAP_Frame::z_100: set_toggle_button(m_radio100, UT_TRUE); _updatePreviewZoomPercent(100); break; - case XAP_QNXDialog_Zoom::z_75: + case XAP_Frame::z_75: set_toggle_button(m_radio75, UT_TRUE); _updatePreviewZoomPercent(75); break; - case XAP_QNXDialog_Zoom::z_PAGEWIDTH: + case XAP_Frame::z_PAGEWIDTH: set_toggle_button(m_radioPageWidth, UT_TRUE); break; - case XAP_QNXDialog_Zoom::z_WHOLEPAGE: + case XAP_Frame::z_WHOLEPAGE: set_toggle_button(m_radioWholePage, UT_TRUE); break; - case XAP_QNXDialog_Zoom::z_PERCENT: + case XAP_Frame::z_PERCENT: set_toggle_button(m_radioPercent, UT_TRUE); _enablePercentSpin(UT_TRUE); // override _updatePreviewZoomPercent(getZoomPercent()); @@ -587,7 +587,7 @@ { if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(item->data))) { - m_zoomType = (XAP_Dialog_Zoom::zoomType) + m_zoomType = (XAP_Frame::tZoomType) GPOINTER_TO_INT(gtk_object_get_data(GTK_OBJECT(item->data), WIDGET_ID_TAG_KEY)); break; } Index: abi/src/af/xap/unix/xap_UnixDlg_Zoom.cpp =================================================================== RCS file: /cvsroot/abi/src/af/xap/unix/xap_UnixDlg_Zoom.cpp,v retrieving revision 1.10 diff -u -r1.10 xap_UnixDlg_Zoom.cpp --- abi/src/af/xap/unix/xap_UnixDlg_Zoom.cpp 2000/10/20 22:35:30 1.10 +++ abi/src/af/xap/unix/xap_UnixDlg_Zoom.cpp 2000/10/30 08:10:25 @@ -342,7 +342,7 @@ FREEP(tmp); vboxZoomTo_group = gtk_radio_button_group (GTK_RADIO_BUTTON (radiobutton200)); gtk_object_set_data (GTK_OBJECT (windowZoom), "radiobutton200", radiobutton200); - gtk_object_set_data (GTK_OBJECT (radiobutton200), WIDGET_ID_TAG_KEY, GINT_TO_POINTER(z_200)); + gtk_object_set_data (GTK_OBJECT (radiobutton200), WIDGET_ID_TAG_KEY, GINT_TO_POINTER(XAP_Frame::z_200)); gtk_widget_show (radiobutton200); gtk_box_pack_start (GTK_BOX (vboxZoomTo), radiobutton200, FALSE, TRUE, 0); @@ -351,7 +351,7 @@ FREEP(tmp); vboxZoomTo_group = gtk_radio_button_group (GTK_RADIO_BUTTON (radiobutton100)); gtk_object_set_data (GTK_OBJECT (windowZoom), "radiobutton100", radiobutton100); - gtk_object_set_data (GTK_OBJECT (radiobutton100), WIDGET_ID_TAG_KEY, GINT_TO_POINTER(z_100)); + gtk_object_set_data (GTK_OBJECT (radiobutton100), WIDGET_ID_TAG_KEY, GINT_TO_POINTER(XAP_Frame::z_100)); gtk_widget_show (radiobutton100); gtk_box_pack_start (GTK_BOX (vboxZoomTo), radiobutton100, FALSE, TRUE, 0); @@ -360,7 +360,7 @@ FREEP(tmp); vboxZoomTo_group = gtk_radio_button_group (GTK_RADIO_BUTTON (radiobutton75)); gtk_object_set_data (GTK_OBJECT (windowZoom), "radiobutton75", radiobutton75); - gtk_object_set_data (GTK_OBJECT (radiobutton75), WIDGET_ID_TAG_KEY, GINT_TO_POINTER(z_75)); + gtk_object_set_data (GTK_OBJECT (radiobutton75), WIDGET_ID_TAG_KEY, GINT_TO_POINTER(XAP_Frame::z_75)); gtk_widget_show (radiobutton75); gtk_box_pack_start (GTK_BOX (vboxZoomTo), radiobutton75, TRUE, TRUE, 0); @@ -369,7 +369,7 @@ FREEP(tmp); vboxZoomTo_group = gtk_radio_button_group (GTK_RADIO_BUTTON (radiobuttonPageWidth)); gtk_object_set_data (GTK_OBJECT (windowZoom), "radiobuttonPageWidth", radiobuttonPageWidth); - gtk_object_set_data (GTK_OBJECT (radiobuttonPageWidth), WIDGET_ID_TAG_KEY, GINT_TO_POINTER(z_PAGEWIDTH)); + gtk_object_set_data (GTK_OBJECT (radiobuttonPageWidth), WIDGET_ID_TAG_KEY, GINT_TO_POINTER(XAP_Frame::z_PAGEWIDTH)); gtk_widget_show (radiobuttonPageWidth); gtk_box_pack_start (GTK_BOX (vboxZoomTo), radiobuttonPageWidth, TRUE, TRUE, 0); @@ -378,7 +378,7 @@ FREEP(tmp); vboxZoomTo_group = gtk_radio_button_group (GTK_RADIO_BUTTON (radiobuttonWholePage)); gtk_object_set_data (GTK_OBJECT (windowZoom), "radiobuttonWholePage", radiobuttonWholePage); - gtk_object_set_data (GTK_OBJECT (radiobuttonWholePage), WIDGET_ID_TAG_KEY, GINT_TO_POINTER(z_WHOLEPAGE)); + gtk_object_set_data (GTK_OBJECT (radiobuttonWholePage), WIDGET_ID_TAG_KEY, GINT_TO_POINTER(XAP_Frame::z_WHOLEPAGE)); gtk_widget_show (radiobuttonWholePage); gtk_box_pack_start (GTK_BOX (vboxZoomTo), radiobuttonWholePage, TRUE, TRUE, 0); @@ -387,7 +387,7 @@ FREEP(tmp); vboxZoomTo_group = gtk_radio_button_group (GTK_RADIO_BUTTON (radiobuttonPercent)); gtk_object_set_data (GTK_OBJECT (windowZoom), "radiobuttonPercent", radiobuttonPercent); - gtk_object_set_data (GTK_OBJECT (radiobuttonPercent), WIDGET_ID_TAG_KEY, GINT_TO_POINTER(z_PERCENT)); + gtk_object_set_data (GTK_OBJECT (radiobuttonPercent), WIDGET_ID_TAG_KEY, GINT_TO_POINTER(XAP_Frame::z_PERCENT)); gtk_widget_show (radiobuttonPercent); gtk_box_pack_start (GTK_BOX (vboxZoomTo), radiobuttonPercent, TRUE, TRUE, 0); @@ -540,25 +540,25 @@ _enablePercentSpin(UT_FALSE); // default switch(getZoomType()) { - case XAP_UnixDialog_Zoom::z_200: + case XAP_Frame::z_200: gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(m_radio200), TRUE); _updatePreviewZoomPercent(200); break; - case XAP_UnixDialog_Zoom::z_100: + case XAP_Frame::z_100: gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(m_radio100), TRUE); _updatePreviewZoomPercent(100); break; - case XAP_UnixDialog_Zoom::z_75: + case XAP_Frame::z_75: gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(m_radio75), TRUE); _updatePreviewZoomPercent(75); break; - case XAP_UnixDialog_Zoom::z_PAGEWIDTH: + case XAP_Frame::z_PAGEWIDTH: gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(m_radioPageWidth), TRUE); break; - case XAP_UnixDialog_Zoom::z_WHOLEPAGE: + case XAP_Frame::z_WHOLEPAGE: gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(m_radioWholePage), TRUE); break; - case XAP_UnixDialog_Zoom::z_PERCENT: + case XAP_Frame::z_PERCENT: gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(m_radioPercent), TRUE); _enablePercentSpin(UT_TRUE); // override _updatePreviewZoomPercent(getZoomPercent()); @@ -577,7 +577,7 @@ { if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(item->data))) { - m_zoomType = (XAP_Dialog_Zoom::zoomType) + m_zoomType = (XAP_Frame::tZoomType) GPOINTER_TO_INT(gtk_object_get_data(GTK_OBJECT(item->data), WIDGET_ID_TAG_KEY)); break; } Index: abi/src/af/xap/win/xap_Win32Dlg_Zoom.cpp =================================================================== RCS file: /cvsroot/abi/src/af/xap/win/xap_Win32Dlg_Zoom.cpp,v retrieving revision 1.6 diff -u -r1.6 xap_Win32Dlg_Zoom.cpp --- abi/src/af/xap/win/xap_Win32Dlg_Zoom.cpp 1999/10/12 00:43:57 1.6 +++ abi/src/af/xap/win/xap_Win32Dlg_Zoom.cpp 2000/10/30 08:10:28 @@ -277,7 +277,7 @@ n = _getRBOffset(hWnd, XAP_RID_DIALOG_ZOOM_RADIO_200, XAP_RID_DIALOG_ZOOM_RADIO_PCT); UT_ASSERT(n >= 0); - m_zoomType = (XAP_Dialog_Zoom::zoomType) n; + m_zoomType = (XAP_Frame::tZoomType) n; if (_getValueFromEditPct(hWnd,&newValue)) m_zoomPercent = newValue; Index: abi/src/af/xap/win/xap_Win32Frame.cpp =================================================================== RCS file: /cvsroot/abi/src/af/xap/win/xap_Win32Frame.cpp,v retrieving revision 1.63 diff -u -r1.63 xap_Win32Frame.cpp --- abi/src/af/xap/win/xap_Win32Frame.cpp 2000/09/25 22:17:47 1.63 +++ abi/src/af/xap/win/xap_Win32Frame.cpp 2000/10/30 08:10:33 @@ -36,6 +36,8 @@ #include "xav_View.h" #include "xad_Document.h" +#include "fv_View.h" + #pragma warning(disable:4355) /*****************************************************************/ @@ -351,6 +353,8 @@ pView = f->m_pView; + FV_View* pfView = static_cast(pView); + if(iMsg == f->m_mouseWheelMessage) { wParam = MAKEWPARAM(0, (short)(int)wParam); @@ -541,6 +545,25 @@ f->m_iSizeWidth = nWidth; f->m_iSizeHeight = nHeight; + + + UT_uint32 newZoom = 0; + + switch(f->getZoomType()) + { +// // special cases + case XAP_Frame::z_PAGEWIDTH: + newZoom = pfView->calculateZoomPercentForPageWidth(); + f->setZoomPercentage(newZoom); + + break; + case XAP_Frame::z_WHOLEPAGE: + newZoom = pfView->calculateZoomPercentForWholePage(); + f->setZoomPercentage(newZoom); + break; + default: + ; + } return 0; } Index: abi/src/af/xap/xp/xap_Dlg_Zoom.cpp =================================================================== RCS file: /cvsroot/abi/src/af/xap/xp/xap_Dlg_Zoom.cpp,v retrieving revision 1.4 diff -u -r1.4 xap_Dlg_Zoom.cpp --- abi/src/af/xap/xp/xap_Dlg_Zoom.cpp 1999/10/07 08:29:14 1.4 +++ abi/src/af/xap/xp/xap_Dlg_Zoom.cpp 2000/10/30 08:10:35 @@ -63,24 +63,24 @@ switch(zoom) { case 200: - m_zoomType = XAP_Dialog_Zoom::z_200; + m_zoomType = XAP_Frame::z_200; break; case 100: - m_zoomType = XAP_Dialog_Zoom::z_100; + m_zoomType = XAP_Frame::z_100; break; case 75: - m_zoomType = XAP_Dialog_Zoom::z_75; + m_zoomType = XAP_Frame::z_75; break; // can't detect PageWidth and WholePage default: - m_zoomType = XAP_Dialog_Zoom::z_PERCENT; + m_zoomType = XAP_Frame::z_PERCENT; } // store the percentage m_zoomPercent = zoom; } -XAP_Dialog_Zoom::zoomType XAP_Dialog_Zoom::getZoomType(void) +XAP_Frame::tZoomType XAP_Dialog_Zoom::getZoomType(void) { return m_zoomType; } @@ -90,20 +90,18 @@ // we deliver based on special cases first, then the custom percentage switch(m_zoomType) { - case XAP_Dialog_Zoom::z_200: + case XAP_Frame::z_200: return 200; - case XAP_Dialog_Zoom::z_100: + case XAP_Frame::z_100: return 100; - case XAP_Dialog_Zoom::z_75: + case XAP_Frame::z_75: return 75; // we can't really do anything with these, // since it's up to the application to query for these two // types and do something special with them - case XAP_Dialog_Zoom::z_PAGEWIDTH: - return 0; - case XAP_Dialog_Zoom::z_WHOLEPAGE: - return 0; - case XAP_Dialog_Zoom::z_PERCENT: + case XAP_Frame::z_PAGEWIDTH: + case XAP_Frame::z_WHOLEPAGE: + case XAP_Frame::z_PERCENT: // fall through default: if (m_zoomPercent > 1) Index: abi/src/af/xap/xp/xap_Dlg_Zoom.h =================================================================== RCS file: /cvsroot/abi/src/af/xap/xp/xap_Dlg_Zoom.h,v retrieving revision 1.4 diff -u -r1.4 xap_Dlg_Zoom.h --- abi/src/af/xap/xp/xap_Dlg_Zoom.h 1999/10/10 04:23:24 1.4 +++ abi/src/af/xap/xp/xap_Dlg_Zoom.h 2000/10/30 08:10:35 @@ -40,15 +40,16 @@ virtual void runModal(XAP_Frame * pFrame) = 0; typedef enum { a_OK, a_CANCEL } tAnswer; - typedef enum { z_200, z_100, z_75, z_PAGEWIDTH, z_WHOLEPAGE, z_PERCENT } zoomType; +// typedef enum { z_200, z_100, z_75, z_PAGEWIDTH, z_WHOLEPAGE, z_PERCENT } zoomType; XAP_Dialog_Zoom::tAnswer getAnswer(void) const; // supply this on run void setZoomPercent(UT_uint32 zoom); + void setZoomType(XAP_Frame::tZoomType zoomType) { m_zoomType = zoomType; } // read these back - XAP_Dialog_Zoom::zoomType getZoomType(void); + XAP_Frame::tZoomType getZoomType(void); UT_uint32 getZoomPercent(void); protected: @@ -63,7 +64,7 @@ XAP_Preview_Zoom * m_zoomPreview; - XAP_Dialog_Zoom::zoomType m_zoomType; + XAP_Frame::tZoomType m_zoomType; UT_uint32 m_zoomPercent; XAP_Dialog_Zoom::tAnswer m_answer; Index: abi/src/af/xap/xp/xap_Frame.h =================================================================== RCS file: /cvsroot/abi/src/af/xap/xp/xap_Frame.h,v retrieving revision 1.42 diff -u -r1.42 xap_Frame.h --- abi/src/af/xap/xp/xap_Frame.h 2000/07/25 21:10:50 1.42 +++ abi/src/af/xap/xp/xap_Frame.h 2000/10/30 08:10:37 @@ -18,8 +18,8 @@ */ -#ifndef XAP_FRAME_H -#define XAP_FRAME_H +#ifndef XAP_Frame_H +#define XAP_Frame_H #include "ut_types.h" #include "ut_vector.h" @@ -122,9 +122,14 @@ virtual UT_Bool runModalContextMenu(AV_View * pView, const char * szMenuName, UT_sint32 x, UT_sint32 y) = 0; + typedef enum { z_200, z_100, z_75, z_PAGEWIDTH, z_WHOLEPAGE, z_PERCENT } tZoomType; virtual void setZoomPercentage(UT_uint32 iZoom); virtual UT_uint32 getZoomPercentage(void); + void setZoomType(XAP_Frame::tZoomType z_Type){ m_zoomType = z_Type; } + XAP_Frame::tZoomType getZoomType(void) { return m_zoomType; } + + virtual void setStatusMessage(const char * szMsg) = 0; virtual void toggleRuler(UT_Bool /*bRulerOn*/) { } // @@ -173,6 +178,7 @@ EV_Keyboard * m_pKeyboard; ap_Scrollbar_ViewListener * m_pScrollbarViewListener; AV_ListenerId m_lidScrollbarViewListener; + XAP_Frame::tZoomType m_zoomType; void * m_pData; /* app-specific frame data */ @@ -187,4 +193,4 @@ static int s_iUntitled; }; -#endif /* XAP_FRAME_H */ +#endif /* XAP_Frame_H */ Index: abi/src/wp/ap/xp/ap_EditMethods.cpp =================================================================== RCS file: /cvsroot/abi/src/wp/ap/xp/ap_EditMethods.cpp,v retrieving revision 1.244 diff -u -r1.244 ap_EditMethods.cpp --- abi/src/wp/ap/xp/ap_EditMethods.cpp 2000/10/27 09:25:24 1.244 +++ abi/src/wp/ap/xp/ap_EditMethods.cpp 2000/10/30 08:11:10 @@ -3751,6 +3751,7 @@ UT_ASSERT(pDialog); pDialog->setZoomPercent(pFrame->getZoomPercentage()); + pDialog->setZoomType(pFrame->getZoomType()); pDialog->runModal(pFrame); @@ -3760,13 +3761,14 @@ if (bOK) { UT_uint32 newZoom = pFrame->getZoomPercentage(); + pFrame->setZoomType(pDialog->getZoomType()); switch(pDialog->getZoomType()) { // special cases - case XAP_Dialog_Zoom::z_PAGEWIDTH: + case XAP_Frame::z_PAGEWIDTH: newZoom = pView->calculateZoomPercentForPageWidth(); break; - case XAP_Dialog_Zoom::z_WHOLEPAGE: + case XAP_Frame::z_WHOLEPAGE: newZoom = pView->calculateZoomPercentForWholePage(); break; default: @@ -4116,14 +4118,17 @@ if(strcmp(p_zoom, pSS->getValue(XAP_STRING_ID_TB_Zoom_PageWidth)) == 0) { + pFrame->setZoomType(XAP_Frame::z_PAGEWIDTH); iZoom = pView->calculateZoomPercentForPageWidth(); } else if(strcmp(p_zoom, pSS->getValue(XAP_STRING_ID_TB_Zoom_WholePage)) == 0) { + pFrame->setZoomType(XAP_Frame::z_WHOLEPAGE); iZoom = pView->calculateZoomPercentForWholePage(); } else { + pFrame->setZoomType(XAP_Frame::z_PERCENT); iZoom = atoi(p_zoom); } Index: abi/src/wp/ap/xp/ap_Toolbar_Functions.cpp =================================================================== RCS file: /cvsroot/abi/src/wp/ap/xp/ap_Toolbar_Functions.cpp,v retrieving revision 1.21 diff -u -r1.21 ap_Toolbar_Functions.cpp --- abi/src/wp/ap/xp/ap_Toolbar_Functions.cpp 2000/08/11 04:01:07 1.21 +++ abi/src/wp/ap/xp/ap_Toolbar_Functions.cpp 2000/10/30 08:11:14 @@ -479,6 +479,9 @@ ABIWORD_VIEW; UT_ASSERT(pView); + XAP_Frame * pFrame = static_cast ( pView->getParentData()); + const XAP_StringSet * pSS = XAP_App::getApp()->getStringSet(); + EV_Toolbar_ItemState s = EV_TIS_UseString; static char buf[10]; @@ -486,6 +489,19 @@ UT_uint32 iZoom = pView->getGraphics()->getZoomPercentage(); sprintf(buf, "%d%%", iZoom); + switch(pFrame->getZoomType()) + { + // special cases + case XAP_Frame::z_PAGEWIDTH: + sprintf(buf, "%s", pSS->getValue(XAP_STRING_ID_TB_Zoom_PageWidth)); + break; + case XAP_Frame::z_WHOLEPAGE: + sprintf(buf, "%s", pSS->getValue(XAP_STRING_ID_TB_Zoom_WholePage)); + break; + default: + ; + } + *pszState = buf; return s;