Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


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.

-- 
michael.meeks@suse.com  <><, Pseudo Engineer, itinerant idiot


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.