Adding/modifying UI strings

Lubos Lunak l.lunak at suse.cz
Tue Feb 5 09:58:02 PST 2013


 Hello,

 do we have somewhere documentation on how UI strings are handled?

 Specifically, I'd like to do something like in the attachment, adjusting the 
tooltip for the font combo in the toolbar. Its tooltip text is hardcoded in 
officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu . How do 
I get the UI strings for the usage in the code (i.e. including l10n) and, 
since I assume that includes removing it from the .xcu file, will something 
else be affected by that?

-- 
 Lubos Lunak
 l.lunak at suse.cz
-------------- next part --------------
void SvxFontNameBox_Impl::CheckAndMarkUnknownFont( const OUString& fontname )
{
    if( fontname == GetText())
        return;
    GetDocFontList_Impl( &pFontList, this );
    // If the font is unknown, show it in italic.
    Font font = GetControlFont();
    if( pFontList != NULL && pFontList->IsAvailable( fontname ))
    {
        if( font.GetItalic() != ITALIC_NONE )
        {
            font.SetItalic( ITALIC_NONE );
            SetControlFont( font );
            SetQuickHelpText( OUString( "Font Name" ));
        }
    }
    else
    {
        if( font.GetItalic() != ITALIC_NORMAL )
        {
            font.SetItalic( ITALIC_NORMAL );
            SetControlFont( font );
            SetQuickHelpText( OUString( "Font Name. Current font is not available and will be substituted." ));
        }
    }
}


More information about the LibreOffice mailing list