https://bugs.documentfoundation.org/show_bug.cgi?id=93592

            Bug ID: 93592
           Summary: Cant' add localized strings to Basic dialog.
           Product: LibreOffice
           Version: 4.2.8.2 release
          Hardware: Other
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: BASIC
          Assignee: [email protected]
          Reporter: [email protected]

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 ! =)

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to