Commit 23ee128d authored by David Faure's avatar David Faure
Browse files

Forwardport r547520

Save language codes internally, not translated language names.
This makes hyphenation work again, when the user selected a language in the character-properties-dialog.

svn path=/trunk/koffice/; revision=547522
parent fe95d283
......@@ -101,7 +101,7 @@ KoFontDia::KoFontDia( const KoTextFormat& initialFormat,
//Language tab
languageTab = new KoLanguageTab( broker, this );
fontTabWidget->addTab( languageTab, i18n( "Language" ) );
connect( languageTab, SIGNAL( languageChanged( int ) ), this, SLOT( slotLanguageChanged( int ) ) );
connect( languageTab, SIGNAL( languageChanged() ), this, SLOT( slotLanguageChanged() ) );
//Related properties List View
//relatedPropertiesListView = new K3ListView( mainHBox );
......@@ -297,7 +297,7 @@ void KoFontDia::slotHyphenationChanged( bool )
m_changedFlags |= KoTextFormat::Hyphenation;
}
void KoFontDia::slotLanguageChanged( int )
void KoFontDia::slotLanguageChanged()
{
m_changedFlags |= KoTextFormat::Language;
}
......
......@@ -78,7 +78,7 @@ protected slots:
void slotOffsetChanged( int offset );
void slotRelativeSizeChanged( double relativeSize );
void slotHyphenationChanged( bool state );
void slotLanguageChanged( int );
void slotLanguageChanged();
signals:
void applyFont();
......
......@@ -47,7 +47,7 @@ KoLanguageTab::KoLanguageTab( KSpell2::Broker::Ptr broker, QWidget* parent, cons
else
languageKComboBox->insertItem( *itName );
}
connect( languageKComboBox, SIGNAL( activated( int ) ), this, SIGNAL( languageChanged( int ) ) );
connect( languageKComboBox, SIGNAL( activated( int ) ), this, SIGNAL( languageChanged() ) );
}
KoLanguageTab::~KoLanguageTab()
......@@ -56,10 +56,10 @@ KoLanguageTab::~KoLanguageTab()
QString KoLanguageTab::getLanguage() const
{
return languageKComboBox->currentText();
return KoGlobal::tagOfLanguage( languageKComboBox->currentText() );
}
void KoLanguageTab::setLanguage( const QString &item )
{
languageKComboBox->setCurrentText( item );
languageKComboBox->setCurrentText( KoGlobal::languageFromTag( item ) );
}
......@@ -36,7 +36,7 @@ public:
void setLanguage( const QString &item );
signals:
void languageChanged( int item );
void languageChanged();
};
#endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment