Bug 93592 - Cant' add localized strings to Basic dialog.
Summary: Cant' add localized strings to Basic dialog.
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
4.2.8.2 release
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:5.4.0 target:5.3.0.1 target:5.2.5
Keywords: difficultyInteresting, easyHack, skillCpp, topicCleanup
Depends on:
Blocks:
 
Reported: 2015-08-22 16:28 UTC by Michael Meeks
Modified: 2017-02-14 08:57 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Meeks 2015-08-22 16:28:57 UTC
Start writer:

1. Tools / Macros / Organize Dialogs
1.5 select "Untitled 1", the brand new file
2. New Dialog
3. Edit dialog
4. Press 'Manage Language' toolbar (may need to enable Language toolbar in Views)
5. Add a language

No language is added.

This is because there is no localization for this dialog, and we get to:

basctl/source/dlged/managelang.cxx:

IMPL_LINK_NOARG(ManageLanguageDialog, AddHdl)
{
    ScopedVclPtrInstance< SetDefaultLanguageDialog > aDlg( this, m_xLocalizationMgr );
    if ( RET_OK == aDlg->Execute() )
    {
        if (!m_xLocalizationMgr->isLibraryLocalized())
        {
            SAL_WARN("basctl.basicide", "Adding langs to non-localized library tdf#93077");

This code-path =)

We need to have enough information at this point to do something intelligent like:

// XStringResourceSupplier
Reference< resource::XStringResourceResolver >
    SAL_CALL SfxDialogLibrary::getStringResource(  ) throw (RuntimeException, std::exception)
{
    if( !m_xStringResourcePersistence.is() )
        m_xStringResourcePersistence = m_pParent->implCreateStringResource( this );

    Reference< resource::XStringResourceResolver > xRet( m_xStringResourcePersistence, UNO_QUERY );
    return xRet;
}

Which creates the thing if it is not there =) cf. the related UNO API for that. But this will need more information passing into the dialog from the IDE code - in order to manage that; it'll ultimately be something like:

                Reference< XStringResourceWithLocation > xStringResourceWithLocation =
                    StringResourceWithLocation::create( xContext, aURL, bReadOnly,
                        xStringResourceResolver->getDefaultLocale(), aDialogName, aComment, xDummyHandler );


Thanks ! =)
Comment 1 Robinson Tryon (qubit) 2015-12-14 05:01:16 UTC Comment hidden (obsolete)
Comment 2 Robinson Tryon (qubit) 2016-02-18 14:52:04 UTC Comment hidden (obsolete)
Comment 3 Commit Notification 2016-12-02 09:08:37 UTC
Niklas Johansson committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=1453bc4ab3d42c34c32a7da63ed6f7bdbe513c2d

tdf#93592 Make it possible to add default language resource to dialogeditor

It will be available in 5.4.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 4 Commit Notification 2016-12-02 09:10:01 UTC
Niklas Johansson committed a patch related to this issue.
It has been pushed to "libreoffice-5-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=fd292de8250d54fbf8035d252f1b25a4ca4500aa&h=libreoffice-5-3

tdf#93592 Make it possible to add default language resource to dialogeditor

It will be available in 5.3.0.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 5 Commit Notification 2016-12-05 09:19:53 UTC
Niklas Johansson committed a patch related to this issue.
It has been pushed to "libreoffice-5-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=f4cdf96b43db7c39ae8f23896d44368807f5f500&h=libreoffice-5-2

tdf#93592 Make it possible to add default language resource to dialogeditor

It will be available in 5.2.5.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.