Re: [Libreoffice] Doubt about bogus and commented code
Hi Xisco, On 2011-03-12 at 02:25 +0100, Xisco Faulí wrote: I've seen quite often something like this: -/* - #i2345# - if ( nSlotId = SID_SFX_START ! SfxMenuManager::IsPopupFunction(nSlotId) ) - { - // Echte Popups sollen keine SlotIds haben; leider sind - // da noch Altlasten mit herumzuschleppen ... - String aTitle = pSVMenu-GetItemText( nSlotId ); - pSVMenu-SetPopupMenu( nSlotId, NULL ); - USHORT nPos = pSVMenu-GetItemPos( nSlotId ); - pSVMenu-RemoveItem( nPos ); - nSlotId = 1;- while ( pSVMenu-GetItemPos(nSlotId) != MENU_ITEM_NOTFOUND ) - nSlotId++; - pSVMenu-InsertItem( nSlotId, aTitle, 0, nPos ); - pSVMenu-SetPopupMenu( nSlotId, pPopup ); - } -*/ What should I do with it ? leave it like that ? delete it completery ? or delete the code and leave the bogus ? Delete entirely :-) Btw, what about the peaces which say, FIXME ? Do you have an example, please? Regards, Kendy ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] Doubt about bogus and commented code
// #FIXME this *MUST* be wrong documents::close surely closes ALL documents // in the collection, use of getCurrentDocument here is totally wrong -/* - uno::Reference lang::XMultiComponentFactory xSMgr( - mxContext-getServiceManager(), uno::UNO_QUERY_THROW ); - uno::Reference frame::XModel xModel( getCurrentDocument(), uno::UNO_QUERY_THROW ); - rtl::OUString url = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( .uno:CloseDoc)); - dispatchRequests(xModel,url); -*/ 2011/3/17 Jan Holesovsky ke...@suse.cz Hi Xisco, On 2011-03-12 at 02:25 +0100, Xisco Faulí wrote: I've seen quite often something like this: -/* - #i2345# - if ( nSlotId = SID_SFX_START ! SfxMenuManager::IsPopupFunction(nSlotId) ) - { - // Echte Popups sollen keine SlotIds haben; leider sind - // da noch Altlasten mit herumzuschleppen ... - String aTitle = pSVMenu-GetItemText( nSlotId ); - pSVMenu-SetPopupMenu( nSlotId, NULL ); - USHORT nPos = pSVMenu-GetItemPos( nSlotId ); - pSVMenu-RemoveItem( nPos ); - nSlotId = 1;- while ( pSVMenu-GetItemPos(nSlotId) != MENU_ITEM_NOTFOUND ) - nSlotId++; - pSVMenu-InsertItem( nSlotId, aTitle, 0, nPos ); - pSVMenu-SetPopupMenu( nSlotId, pPopup ); - } -*/ What should I do with it ? leave it like that ? delete it completery ? or delete the code and leave the bogus ? Delete entirely :-) Btw, what about the peaces which say, FIXME ? Do you have an example, please? Regards, Kendy ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] Doubt about bogus and commented code
Hi Xisco, On 2011-03-17 at 13:52 +0100, Xisco Faulí wrote: // #FIXME this *MUST* be wrong documents::close surely closes ALL documents // in the collection, use of getCurrentDocument here is totally wrong -/* - uno::Reference lang::XMultiComponentFactory xSMgr( - mxContext-getServiceManager(), uno::UNO_QUERY_THROW ); - uno::Reference frame::XModel xModel( getCurrentDocument(), uno::UNO_QUERY_THROW ); - rtl::OUString url = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( .uno:CloseDoc)); - dispatchRequests(xModel,url); -*/ In this case it seems that even the FIXME should be removed - it references the code that is commented out. Regards, Kendy ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice