Re: vincent - r31463 - in abiword/branches/gsoc2012dialogs/src/wp/ap: win xp
Vincent Kang <[email protected]>
| Newsgroups | gmane.editors.abiword.devel |
|---|---|
| Message-ID | <CAKhPGz=JdLD1yHHoxg_TYUW2y5k2W+87q42CUSr-ob1kwHLc2w@mail.gmail.com> |
Hi, all About the Following issue, - UT_String_sprintf(buf, "%.2fpt", height_width); + sprintf(buf, "%.2fpt", height_width); I will fix it when find a better way to keep the function working well. Vincent 2012/7/4 <[email protected]>: > > Author: vincent > Date: 2012-07-04 16:48:54 +0200 (Wed, 04 Jul 2012) > New Revision: 31463 > > Modified: > abiword/branches/gsoc2012dialogs/src/wp/ap/win/ap_Win32Dialog_FormatFrame.cpp > abiword/branches/gsoc2012dialogs/src/wp/ap/xp/ap_Dialog_FormatFrame.cpp > Log: > Finish Code refactor for ap_Win32Dialog_FormatFrame > 1. Comment un-used code > 2. Update height & width when user change them in UI in time. > 3. using sprintf instead of UT_String_sprintf (I don't know why UT_String_vprintf can't convert correctly) > > Modified: abiword/branches/gsoc2012dialogs/src/wp/ap/win/ap_Win32Dialog_FormatFrame.cpp > =================================================================== > --- abiword/branches/gsoc2012dialogs/src/wp/ap/win/ap_Win32Dialog_FormatFrame.cpp 2012-07-03 23:37:22 UTC (rev 31462) > +++ abiword/branches/gsoc2012dialogs/src/wp/ap/win/ap_Win32Dialog_FormatFrame.cpp 2012-07-04 14:48:54 UTC (rev 31463) > @@ -197,11 +197,11 @@ > /* Set the value of TEXT BOX */ > wchar_t szValue[BUFSIZE]; > //init value is current Frame width and height > - FV_View * pView = static_cast<FV_View *>(m_pApp->getLastFocussedFrame()->getCurrentView()); > + /*FV_View * pView = static_cast<FV_View *>(m_pApp->getLastFocussedFrame()->getCurrentView()); > if (!pView) > return 1; > fl_FrameLayout * pFL = pView->getFrameLayout(); > - > + */ > setCurFrameProps(); > swprintf(szValue, L"%02.2f", getFrameWidth()); > SetDlgItemTextW(m_hDlg, AP_RID_DIALOG_FORMATFRAME_VAL_WIDTH, szValue); > @@ -375,8 +375,8 @@ > { > UT_LocaleTransactor t(LC_NUMERIC, "C"); > UT_Win32LocaleString thickness; > + getComboTextItem(AP_RID_DIALOG_FORMATFRAME_COMBO_THICKNESS, nSelected, thickness); > UT_UTF8String thickness_utf8 = thickness.utf8_str (); > - getComboTextItem(AP_RID_DIALOG_FORMATFRAME_COMBO_THICKNESS, nSelected, thickness); > setBorderThicknessAll(thickness_utf8); > event_previewExposed(); > } > @@ -462,16 +462,16 @@ > CheckDlgButton(m_hDlg, AP_RID_DIALOG_FORMATFRAME_CHK_TEXTWRAP, getWrapping()? BST_CHECKED: BST_UNCHECKED); > //update height and width > /* FIXME: if update in the way, will cause the users can't input because it update all the time > - if((HWND)GetWindowLongPtrW(m_hDlg, GWLP_HWNDPARENT) == static_cast<XAP_Win32FrameImpl*>(getActiveFrame()->getFrameImpl())->getTopLevelWindow()) > - { > - wchar_t szValue[BUFSIZE]; > - swprintf(szValue, L"%02.2f", getFrameWidth()); > - SetDlgItemTextW(m_hDlg, AP_RID_DIALOG_FORMATFRAME_VAL_WIDTH, szValue); > + */ > + // Reset the value using the value from Prop vectot > + initFrameWidthStr(); > + initFrameHeightStr(); > + wchar_t szValue[BUFSIZE]; > + swprintf(szValue, L"%02.2f", getFrameWidth()); > + SetDlgItemTextW(m_hDlg, AP_RID_DIALOG_FORMATFRAME_VAL_WIDTH, szValue); > > - swprintf(szValue, L"%02.2f", getFrameHeight()); > - SetDlgItemTextW(m_hDlg, AP_RID_DIALOG_FORMATFRAME_VAL_HEIGHT, szValue); > - } > - */ > + swprintf(szValue, L"%02.2f", getFrameHeight()); > + SetDlgItemTextW(m_hDlg, AP_RID_DIALOG_FORMATFRAME_VAL_HEIGHT, szValue); > } > > void AP_Win32Dialog_FormatFrame::destroy(void) > > Modified: abiword/branches/gsoc2012dialogs/src/wp/ap/xp/ap_Dialog_FormatFrame.cpp > =================================================================== > --- abiword/branches/gsoc2012dialogs/src/wp/ap/xp/ap_Dialog_FormatFrame.cpp 2012-07-03 23:37:22 UTC (rev 31462) > +++ abiword/branches/gsoc2012dialogs/src/wp/ap/xp/ap_Dialog_FormatFrame.cpp 2012-07-04 14:48:54 UTC (rev 31463) > @@ -946,7 +946,7 @@ > else { > char buf[16]; > UT_LocaleTransactor t(LC_NUMERIC, "C"); > - UT_String_sprintf(buf, "%.2fpt", thickness); > + sprintf(buf, "%.2fpt", thickness); > sThick = buf; > } > return sThick; > @@ -969,7 +969,7 @@ > else { > char buf[16]; > UT_LocaleTransactor t(LC_NUMERIC, "C"); > - UT_String_sprintf(buf, "%.2fpt", thickness); > + sprintf(buf, "%.2fpt", thickness); > sThick = buf; > } > return sThick; > @@ -988,7 +988,7 @@ > else { > char buf[16]; > UT_LocaleTransactor t(LC_NUMERIC, "C"); > - UT_String_sprintf(buf, "%.2fpt", height_width); > + sprintf(buf, "%.2fpt", height_width); > sHeight_width = buf; > } > return sHeight_width; > @@ -1011,7 +1011,7 @@ > else { > char buf[16]; > UT_LocaleTransactor t(LC_NUMERIC, "C"); > - UT_String_sprintf(buf, "%.2fpt", height_width); > + sprintf(buf, "%.2fpt", height_width); > sHeight_width_new = buf; > } > return sHeight_width_new; > > ----------------------------------------------- > To unsubscribe from this list, send a message to > [email protected] with the word > unsubscribe in the message body.