Hi Toygun,

On Mon, 2012-03-05 at 08:46 +0100, Toygun wrote:
> I have a odt document where I inserted 2 sections from other documents.
> Changing these sections requires an update in the enclosing document
> when using Libre Office or OpenOffice (popup is asking me).

        OK; if you mean the right click 'update index / table' then I would
grep for the UI string in the code, eg.

        git grep -i8 'pdate Index/Table'

        find the id:

        git grep -8  FN_UPDATE_CUR_TOX

        find what method is being called to do the update, presumably this
code:

        case FN_UPDATE_CUR_TOX:
        {
            const SwTOXBase* pBase = pWrtShell->GetCurTOX();
            if(pBase)
            {
                pWrtShell->StartAction();
                if(TOX_INDEX == pBase->GetType())
                    pWrtShell->ApplyAutoMark();
                pWrtShell->UpdateTableOf( *pBase );
                pWrtShell->EndAction();
            }
        }

        Then grep for this UpdateTableOf method, to see if there is some UNO
implementation that goes near there. From a quick grep, it looks like:

void SAL_CALL SwXDocumentIndex::update() throw (uno::RuntimeException)
{
    SolarMutexGuard aGuard;

    SwSectionFmt *const pFmt = m_pImpl->GetSectionFmt();
    SwTOXBaseSection *const pTOXBase = (pFmt) ?
        static_cast<SwTOXBaseSection*>(pFmt->GetSection()) : 0;
    if(!pTOXBase)
    {
        throw uno::RuntimeException();
    }
    pTOXBase->Update();
    // page numbers
    pTOXBase->UpdatePageNum();
}

        Might be what you want. 

        Then again, your question was rather vague as to what you wanted to
update - sections ? and really this list is for hacking on the core
libreoffice code, not for questions around scripting it :-)

        HTH,

                Michael.

-- 
[email protected]  <><, Pseudo Engineer, itinerant idiot

_______________________________________________
LibreOffice mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to