[Libreoffice-commits] core.git: 4 commits - cui/source
Matteo Casalin
matteo.casalin at yahoo.com
Mon Jun 1 06:51:53 PDT 2015
cui/source/dialogs/hyphen.cxx | 183 +++++++++++++++++++-----------------------
cui/source/inc/hyphen.hxx | 25 ++---
2 files changed, 99 insertions(+), 109 deletions(-)
New commits:
commit b265ddb9232f1c76e8c0aa5db9f117525bd4d4a7
Author: Matteo Casalin <matteo.casalin at yahoo.com>
Date: Mon Jun 1 15:48:07 2015 +0200
Avoid temporary OUStrings
Change-Id: If82d849f15e4218d8848a6fcdd507f0ef50d3edc
diff --git a/cui/source/dialogs/hyphen.cxx b/cui/source/dialogs/hyphen.cxx
index edb9513..2634fcb 100644
--- a/cui/source/dialogs/hyphen.cxx
+++ b/cui/source/dialogs/hyphen.cxx
@@ -71,26 +71,25 @@ void HyphenEdit::KeyInput( const KeyEvent& rKEvt )
void SvxHyphenWordDialog::EnableLRBtn_Impl()
{
- OUString aTxt( m_aEditWord );
- sal_Int32 nLen = aTxt.getLength();
+ const sal_Int32 nLen = m_aEditWord.getLength();
m_pRightBtn->Disable();
for ( sal_Int32 i = m_nOldPos + 2; i < nLen; ++i )
{
- if ( aTxt[ i ] == sal_Unicode( HYPH_POS_CHAR ) )
+ if ( m_aEditWord[ i ] == sal_Unicode( HYPH_POS_CHAR ) )
{
m_pRightBtn->Enable();
break;
}
}
- DBG_ASSERT(m_nOldPos < aTxt.getLength(), "nOldPos out of range");
- if (m_nOldPos >= aTxt.getLength())
- m_nOldPos = aTxt.getLength() - 1;
+ DBG_ASSERT(m_nOldPos < nLen, "nOldPos out of range");
+ if (m_nOldPos >= nLen)
+ m_nOldPos = nLen - 1;
m_pLeftBtn->Disable();
for ( sal_Int32 i = m_nOldPos; i-- > 0; )
{
- if ( aTxt[ i ] == sal_Unicode( HYPH_POS_CHAR ) )
+ if ( m_aEditWord[ i ] == sal_Unicode( HYPH_POS_CHAR ) )
{
m_pLeftBtn->Enable();
break;
@@ -228,13 +227,12 @@ void SvxHyphenWordDialog::ContinueHyph_Impl( sal_Int32 nInsPos )
{
if (nInsPos)
{
- OUString aTmp( m_aEditWord );
- DBG_ASSERT(nInsPos <= aTmp.getLength() - 2, "wrong hyphen position");
+ DBG_ASSERT(nInsPos <= m_aEditWord.getLength() - 2, "wrong hyphen position");
sal_Int32 nIdxPos = -1;
for (sal_Int32 i = 0; i <= nInsPos; ++i)
{
- if (HYPH_POS_CHAR == aTmp[ i ])
+ if (HYPH_POS_CHAR == m_aEditWord[ i ])
nIdxPos++;
}
// take the possible hyphenation positions that got removed from the
@@ -280,7 +278,7 @@ void SvxHyphenWordDialog::ContinueHyph_Impl( sal_Int32 nInsPos )
sal_uInt16 SvxHyphenWordDialog::GetHyphIndex_Impl()
{
sal_uInt16 nPos = 0;
- OUString aTxt( m_pWordEdit->GetText() );
+ const OUString aTxt( m_pWordEdit->GetText() );
for ( sal_Int32 i=0; i < aTxt.getLength(); ++i )
{
@@ -528,12 +526,7 @@ void SvxHyphenWordDialog::dispose()
void SvxHyphenWordDialog::SetWindowTitle( LanguageType nLang )
{
- OUString aLangStr( SvtLanguageTable::GetLanguageString( nLang ) );
- OUString aTmp( m_aLabel );
- aTmp += " (";
- aTmp += aLangStr;
- aTmp += ")";
- SetText( aTmp );
+ SetText( m_aLabel + " (" + SvtLanguageTable::GetLanguageString( nLang ) + ")" );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 43e8a85e36a731bb46e7d9a9e7663f287f3ad330
Author: Matteo Casalin <matteo.casalin at yahoo.com>
Date: Mon Jun 1 15:23:37 2015 +0200
Prefix data members
Change-Id: I8b0fa3e95a5e3ed357bd5daa290e2309e86272e6
diff --git a/cui/source/dialogs/hyphen.cxx b/cui/source/dialogs/hyphen.cxx
index 1febb60..edb9513 100644
--- a/cui/source/dialogs/hyphen.cxx
+++ b/cui/source/dialogs/hyphen.cxx
@@ -71,11 +71,11 @@ void HyphenEdit::KeyInput( const KeyEvent& rKEvt )
void SvxHyphenWordDialog::EnableLRBtn_Impl()
{
- OUString aTxt( aEditWord );
+ OUString aTxt( m_aEditWord );
sal_Int32 nLen = aTxt.getLength();
m_pRightBtn->Disable();
- for ( sal_Int32 i = nOldPos + 2; i < nLen; ++i )
+ for ( sal_Int32 i = m_nOldPos + 2; i < nLen; ++i )
{
if ( aTxt[ i ] == sal_Unicode( HYPH_POS_CHAR ) )
{
@@ -84,11 +84,11 @@ void SvxHyphenWordDialog::EnableLRBtn_Impl()
}
}
- DBG_ASSERT(nOldPos < aTxt.getLength(), "nOldPos out of range");
- if (nOldPos >= aTxt.getLength())
- nOldPos = aTxt.getLength() - 1;
+ DBG_ASSERT(m_nOldPos < aTxt.getLength(), "nOldPos out of range");
+ if (m_nOldPos >= aTxt.getLength())
+ m_nOldPos = aTxt.getLength() - 1;
m_pLeftBtn->Disable();
- for ( sal_Int32 i = nOldPos; i-- > 0; )
+ for ( sal_Int32 i = m_nOldPos; i-- > 0; )
{
if ( aTxt[ i ] == sal_Unicode( HYPH_POS_CHAR ) )
{
@@ -134,11 +134,11 @@ OUString SvxHyphenWordDialog::EraseUnusableHyphens_Impl(
DBG_ASSERT(rxPossHyph.is(), "missing possible hyphens");
if (rxPossHyph.is())
{
- DBG_ASSERT( aActWord == rxPossHyph->getWord(), "word mismatch" );
+ DBG_ASSERT( m_aActWord == rxPossHyph->getWord(), "word mismatch" );
aTxt = rxPossHyph->getPossibleHyphens();
- nHyphenationPositionsOffset = 0;
+ m_nHyphenationPositionsOffset = 0;
uno::Sequence< sal_Int16 > aHyphenationPositions(
rxPossHyph->getHyphenationPositions() );
sal_Int32 nLen = aHyphenationPositions.getLength();
@@ -194,7 +194,7 @@ OUString SvxHyphenWordDialog::EraseUnusableHyphens_Impl(
nPos++;
aLeft = aLeft.replaceFirst( aTmp, aEmpty, &nPos );
if (nPos != -1)
- ++nHyphenationPositionsOffset;
+ ++m_nHyphenationPositionsOffset;
}
aTxt = aTxt.replaceAt( 0, nPos2, aLeft );
}
@@ -205,18 +205,18 @@ OUString SvxHyphenWordDialog::EraseUnusableHyphens_Impl(
void SvxHyphenWordDialog::InitControls_Impl()
{
- xPossHyph = NULL;
- if (xHyphenator.is())
+ m_xPossHyph = NULL;
+ if (m_xHyphenator.is())
{
- lang::Locale aLocale( LanguageTag::convertToLocale(nActLanguage) );
- xPossHyph = xHyphenator->createPossibleHyphens( aActWord, aLocale,
+ lang::Locale aLocale( LanguageTag::convertToLocale(m_nActLanguage) );
+ m_xPossHyph = m_xHyphenator->createPossibleHyphens( m_aActWord, aLocale,
uno::Sequence< beans::PropertyValue >() );
- if (xPossHyph.is())
- aEditWord = EraseUnusableHyphens_Impl( xPossHyph, nMaxHyphenationPos );
+ if (m_xPossHyph.is())
+ m_aEditWord = EraseUnusableHyphens_Impl( m_xPossHyph, m_nMaxHyphenationPos );
}
- m_pWordEdit->SetText( aEditWord );
+ m_pWordEdit->SetText( m_aEditWord );
- nOldPos = aEditWord.getLength();
+ m_nOldPos = m_aEditWord.getLength();
SelLeft();
EnableLRBtn_Impl();
}
@@ -224,11 +224,11 @@ void SvxHyphenWordDialog::InitControls_Impl()
void SvxHyphenWordDialog::ContinueHyph_Impl( sal_Int32 nInsPos )
{
- if ( nInsPos >= 0 && xPossHyph.is() )
+ if ( nInsPos >= 0 && m_xPossHyph.is() )
{
if (nInsPos)
{
- OUString aTmp( aEditWord );
+ OUString aTmp( m_aEditWord );
DBG_ASSERT(nInsPos <= aTmp.getLength() - 2, "wrong hyphen position");
sal_Int32 nIdxPos = -1;
@@ -239,37 +239,37 @@ void SvxHyphenWordDialog::ContinueHyph_Impl( sal_Int32 nInsPos )
}
// take the possible hyphenation positions that got removed from the
// start of the word into account:
- nIdxPos += nHyphenationPositionsOffset;
+ nIdxPos += m_nHyphenationPositionsOffset;
- uno::Sequence< sal_Int16 > aSeq = xPossHyph->getHyphenationPositions();
+ uno::Sequence< sal_Int16 > aSeq = m_xPossHyph->getHyphenationPositions();
sal_Int32 nLen = aSeq.getLength();
DBG_ASSERT(nLen, "empty sequence");
DBG_ASSERT(0 <= nIdxPos && nIdxPos < nLen, "index out of range");
if (nLen && 0 <= nIdxPos && nIdxPos < nLen)
{
nInsPos = aSeq.getConstArray()[ nIdxPos ];
- pHyphWrapper->InsertHyphen( nInsPos );
+ m_pHyphWrapper->InsertHyphen( nInsPos );
}
}
else
{
//! calling with 0 as argument will remove hyphens!
- pHyphWrapper->InsertHyphen( nInsPos );
+ m_pHyphWrapper->InsertHyphen( nInsPos );
}
}
- if ( pHyphWrapper->FindSpellError() )
+ if ( m_pHyphWrapper->FindSpellError() )
{
- uno::Reference< linguistic2::XHyphenatedWord > xHyphWord( pHyphWrapper->GetLast(), uno::UNO_QUERY );
+ uno::Reference< linguistic2::XHyphenatedWord > xHyphWord( m_pHyphWrapper->GetLast(), uno::UNO_QUERY );
// adapt actual word and language to new found hyphenation result
if(xHyphWord.is())
{
- aActWord = xHyphWord->getWord();
- nActLanguage = LanguageTag( xHyphWord->getLocale() ).getLanguageType();
- nMaxHyphenationPos = xHyphWord->getHyphenationPos();
+ m_aActWord = xHyphWord->getWord();
+ m_nActLanguage = LanguageTag( xHyphWord->getLocale() ).getLanguageType();
+ m_nMaxHyphenationPos = xHyphWord->getHyphenationPos();
InitControls_Impl();
- SetWindowTitle( nActLanguage );
+ SetWindowTitle( m_nActLanguage );
}
}
else
@@ -296,25 +296,25 @@ sal_uInt16 SvxHyphenWordDialog::GetHyphIndex_Impl()
void SvxHyphenWordDialog::SelLeft()
{
- DBG_ASSERT( nOldPos > 0, "invalid hyphenation position" );
- if (nOldPos > 0)
+ DBG_ASSERT( m_nOldPos > 0, "invalid hyphenation position" );
+ if (m_nOldPos > 0)
{
- OUString aTxt( aEditWord );
- for( sal_Int32 i = nOldPos - 1; i > 0; --i )
+ OUString aTxt( m_aEditWord );
+ for( sal_Int32 i = m_nOldPos - 1; i > 0; --i )
{
DBG_ASSERT(i <= aTxt.getLength(), "index out of range");
if (aTxt[ i ] == sal_Unicode( HYPH_POS_CHAR ))
{
aTxt = aTxt.replaceAt( i, 1, OUString( CUR_HYPH_POS_CHAR ) );
- nOldPos = i;
+ m_nOldPos = i;
m_pWordEdit->SetText( aTxt );
m_pWordEdit->GrabFocus();
m_pWordEdit->SetSelection( Selection( i, i + 1 ) );
break;
}
}
- nHyphPos = GetHyphIndex_Impl();
+ m_nHyphPos = GetHyphIndex_Impl();
EnableLRBtn_Impl();
}
}
@@ -322,32 +322,32 @@ void SvxHyphenWordDialog::SelLeft()
void SvxHyphenWordDialog::SelRight()
{
- OUString aTxt( aEditWord );
- for ( sal_Int32 i = nOldPos + 1; i < aTxt.getLength(); ++i )
+ OUString aTxt( m_aEditWord );
+ for ( sal_Int32 i = m_nOldPos + 1; i < aTxt.getLength(); ++i )
{
if (aTxt[ i ] == sal_Unicode( HYPH_POS_CHAR ))
{
aTxt = aTxt.replaceAt( i, 1, OUString( CUR_HYPH_POS_CHAR ) );
- nOldPos = i;
+ m_nOldPos = i;
m_pWordEdit->SetText( aTxt );
m_pWordEdit->GrabFocus();
m_pWordEdit->SetSelection( Selection( i, i + 1 ) );
break;
}
}
- nHyphPos = GetHyphIndex_Impl();
+ m_nHyphPos = GetHyphIndex_Impl();
EnableLRBtn_Impl();
}
IMPL_LINK_NOARG(SvxHyphenWordDialog, CutHdl_Impl)
{
- if( !bBusy )
+ if( !m_bBusy )
{
- bBusy = true;
- ContinueHyph_Impl( /*nHyphPos*/nOldPos );
- bBusy = false;
+ m_bBusy = true;
+ ContinueHyph_Impl( /*m_nHyphPos*/m_nOldPos );
+ m_bBusy = false;
}
return 0;
}
@@ -355,7 +355,7 @@ IMPL_LINK_NOARG(SvxHyphenWordDialog, CutHdl_Impl)
IMPL_LINK( SvxHyphenWordDialog, HyphenateAllHdl_Impl, Button *, /*pButton*/ )
{
- if( !bBusy )
+ if( !m_bBusy )
{
try
{
@@ -363,9 +363,9 @@ IMPL_LINK( SvxHyphenWordDialog, HyphenateAllHdl_Impl, Button *, /*pButton*/ )
xProp->setIsHyphAuto( sal_True );
- bBusy = true;
- ContinueHyph_Impl( /*nHyphPos*/nOldPos );
- bBusy = false;
+ m_bBusy = true;
+ ContinueHyph_Impl( /*m_nHyphPos*/m_nOldPos );
+ m_bBusy = false;
xProp->setIsHyphAuto( sal_False );
}
@@ -381,11 +381,11 @@ IMPL_LINK( SvxHyphenWordDialog, HyphenateAllHdl_Impl, Button *, /*pButton*/ )
IMPL_LINK_NOARG(SvxHyphenWordDialog, DeleteHdl_Impl)
{
- if( !bBusy )
+ if( !m_bBusy )
{
- bBusy = true;
+ m_bBusy = true;
ContinueHyph_Impl( 0 );
- bBusy = false;
+ m_bBusy = false;
}
return 0;
}
@@ -393,11 +393,11 @@ IMPL_LINK_NOARG(SvxHyphenWordDialog, DeleteHdl_Impl)
IMPL_LINK_NOARG(SvxHyphenWordDialog, ContinueHdl_Impl)
{
- if( !bBusy )
+ if( !m_bBusy )
{
- bBusy = true;
+ m_bBusy = true;
ContinueHyph_Impl();
- bBusy = false;
+ m_bBusy = false;
}
return 0;
}
@@ -405,12 +405,12 @@ IMPL_LINK_NOARG(SvxHyphenWordDialog, ContinueHdl_Impl)
IMPL_LINK_NOARG(SvxHyphenWordDialog, CancelHdl_Impl)
{
- if( !bBusy )
+ if( !m_bBusy )
{
- bBusy = true;
- pHyphWrapper->SpellEnd();
+ m_bBusy = true;
+ m_pHyphWrapper->SpellEnd();
EndDialog( RET_CANCEL );
- bBusy = false;
+ m_bBusy = false;
}
return 0;
}
@@ -418,11 +418,11 @@ IMPL_LINK_NOARG(SvxHyphenWordDialog, CancelHdl_Impl)
IMPL_LINK_NOARG(SvxHyphenWordDialog, Left_Impl)
{
- if( !bBusy )
+ if( !m_bBusy )
{
- bBusy = true;
+ m_bBusy = true;
SelLeft();
- bBusy = false;
+ m_bBusy = false;
}
return 0;
}
@@ -430,11 +430,11 @@ IMPL_LINK_NOARG(SvxHyphenWordDialog, Left_Impl)
IMPL_LINK_NOARG(SvxHyphenWordDialog, Right_Impl)
{
- if( !bBusy )
+ if( !m_bBusy )
{
- bBusy = true;
+ m_bBusy = true;
SelRight();
- bBusy = false;
+ m_bBusy = false;
}
return 0;
}
@@ -442,7 +442,7 @@ IMPL_LINK_NOARG(SvxHyphenWordDialog, Right_Impl)
IMPL_LINK_NOARG(SvxHyphenWordDialog, GetFocusHdl_Impl)
{
- m_pWordEdit->SetSelection( Selection( nOldPos, nOldPos + 1 ) );
+ m_pWordEdit->SetSelection( Selection( m_nOldPos, m_nOldPos + 1 ) );
return 0;
}
@@ -455,16 +455,16 @@ SvxHyphenWordDialog::SvxHyphenWordDialog(
uno::Reference< linguistic2::XHyphenator > &xHyphen,
SvxSpellWrapper* pWrapper)
: SfxModalDialog(pParent, "HyphenateDialog", "cui/ui/hyphenate.ui")
- , pHyphWrapper(pWrapper)
- , xHyphenator(NULL)
- , xPossHyph(NULL)
- , aActWord(rWord)
- , nActLanguage(nLang)
- , nMaxHyphenationPos(0)
- , nHyphPos(0)
- , nOldPos(0)
- , nHyphenationPositionsOffset(0)
- , bBusy(false)
+ , m_pHyphWrapper(pWrapper)
+ , m_xHyphenator(NULL)
+ , m_xPossHyph(NULL)
+ , m_aActWord(rWord)
+ , m_nActLanguage(nLang)
+ , m_nMaxHyphenationPos(0)
+ , m_nHyphPos(0)
+ , m_nOldPos(0)
+ , m_nHyphenationPositionsOffset(0)
+ , m_bBusy(false)
{
get(m_pWordEdit, "worded");
get(m_pLeftBtn, "left");
@@ -475,17 +475,17 @@ SvxHyphenWordDialog::SvxHyphenWordDialog(
get(m_pHyphAll, "hyphall");
get(m_pCloseBtn, "close");
- aLabel = GetText();
- xHyphenator = xHyphen;
+ m_aLabel = GetText();
+ m_xHyphenator = xHyphen;
- uno::Reference< linguistic2::XHyphenatedWord > xHyphWord( pHyphWrapper ?
- pHyphWrapper->GetLast() : NULL, uno::UNO_QUERY );
+ uno::Reference< linguistic2::XHyphenatedWord > xHyphWord( m_pHyphWrapper ?
+ m_pHyphWrapper->GetLast() : NULL, uno::UNO_QUERY );
DBG_ASSERT( xHyphWord.is(), "hyphenation result missing" );
if (xHyphWord.is())
{
- DBG_ASSERT( aActWord == xHyphWord->getWord(), "word mismatch" );
- DBG_ASSERT( nActLanguage == LanguageTag( xHyphWord->getLocale() ).getLanguageType(), "language mismatch" );
- nMaxHyphenationPos = xHyphWord->getHyphenationPos();
+ DBG_ASSERT( m_aActWord == xHyphWord->getWord(), "word mismatch" );
+ DBG_ASSERT( m_nActLanguage == LanguageTag( xHyphWord->getLocale() ).getLanguageType(), "language mismatch" );
+ m_nMaxHyphenationPos = xHyphWord->getHyphenationPos();
}
InitControls_Impl();
@@ -503,7 +503,7 @@ SvxHyphenWordDialog::SvxHyphenWordDialog(
SetWindowTitle( nLang );
// disable controls if service is not available
- if (!xHyphenator.is())
+ if (!m_xHyphenator.is())
Enable( false );
}
@@ -529,7 +529,7 @@ void SvxHyphenWordDialog::dispose()
void SvxHyphenWordDialog::SetWindowTitle( LanguageType nLang )
{
OUString aLangStr( SvtLanguageTable::GetLanguageString( nLang ) );
- OUString aTmp( aLabel );
+ OUString aTmp( m_aLabel );
aTmp += " (";
aTmp += aLangStr;
aTmp += ")";
diff --git a/cui/source/inc/hyphen.hxx b/cui/source/inc/hyphen.hxx
index a092182..5a589af 100644
--- a/cui/source/inc/hyphen.hxx
+++ b/cui/source/inc/hyphen.hxx
@@ -50,19 +50,18 @@ class SvxHyphenWordDialog : public SfxModalDialog
VclPtr<PushButton> m_pDelBtn;
VclPtr<PushButton> m_pHyphAll;
VclPtr<CloseButton> m_pCloseBtn;
- OUString aLabel;
- SvxSpellWrapper *const pHyphWrapper;
- css::uno::Reference< css::linguistic2::XHyphenator > xHyphenator;
- css::uno::Reference< css::linguistic2::XPossibleHyphens > xPossHyph;
- OUString aEditWord; // aEditWord and aWordEdit.GetText() differ only by the character for the current selected hyphenation position
- OUString aActWord; // actual word to be hyphenated
- LanguageType nActLanguage; // and its language
- sal_uInt16 nMaxHyphenationPos; // right most valid hyphenation pos
- sal_uInt16 nHyphPos;
- sal_Int32 nOldPos;
- sal_Int32 nHyphenationPositionsOffset;
- bool bBusy;
-
+ OUString m_aLabel;
+ SvxSpellWrapper *const m_pHyphWrapper;
+ css::uno::Reference< css::linguistic2::XHyphenator > m_xHyphenator;
+ css::uno::Reference< css::linguistic2::XPossibleHyphens > m_xPossHyph;
+ OUString m_aEditWord; // aEditWord and aWordEdit.GetText() differ only by the character for the current selected hyphenation position
+ OUString m_aActWord; // actual word to be hyphenated
+ LanguageType m_nActLanguage; // and its language
+ sal_uInt16 m_nMaxHyphenationPos; // right most valid hyphenation pos
+ sal_uInt16 m_nHyphPos;
+ sal_Int32 m_nOldPos;
+ sal_Int32 m_nHyphenationPositionsOffset;
+ bool m_bBusy;
void EnableLRBtn_Impl();
OUString EraseUnusableHyphens_Impl( css::uno::Reference< css::linguistic2::XPossibleHyphens > &rxPossHyph, sal_uInt16 nMaxHyphenationPos );
commit 38e2c36f5de41267a323e9be57ef3316e978e6b8
Author: Matteo Casalin <matteo.casalin at yahoo.com>
Date: Mon Jun 1 15:06:09 2015 +0200
This member can be const
Change-Id: I53c63bd5734635540ff9c4edfb698c16ac4fca17
diff --git a/cui/source/inc/hyphen.hxx b/cui/source/inc/hyphen.hxx
index 115c315..a092182 100644
--- a/cui/source/inc/hyphen.hxx
+++ b/cui/source/inc/hyphen.hxx
@@ -51,7 +51,7 @@ class SvxHyphenWordDialog : public SfxModalDialog
VclPtr<PushButton> m_pHyphAll;
VclPtr<CloseButton> m_pCloseBtn;
OUString aLabel;
- SvxSpellWrapper* pHyphWrapper;
+ SvxSpellWrapper *const pHyphWrapper;
css::uno::Reference< css::linguistic2::XHyphenator > xHyphenator;
css::uno::Reference< css::linguistic2::XPossibleHyphens > xPossHyph;
OUString aEditWord; // aEditWord and aWordEdit.GetText() differ only by the character for the current selected hyphenation position
commit 92bab25a7da0cba47bb98bf1a65a64cc24192079
Author: Matteo Casalin <matteo.casalin at yahoo.com>
Date: Mon Jun 1 15:00:09 2015 +0200
Use initialization list
Change-Id: Ibaddbd1dfc11382ead2f5ad4ed369bb0cc750fd7
diff --git a/cui/source/dialogs/hyphen.cxx b/cui/source/dialogs/hyphen.cxx
index c725f7d..1febb60 100644
--- a/cui/source/dialogs/hyphen.cxx
+++ b/cui/source/dialogs/hyphen.cxx
@@ -455,10 +455,11 @@ SvxHyphenWordDialog::SvxHyphenWordDialog(
uno::Reference< linguistic2::XHyphenator > &xHyphen,
SvxSpellWrapper* pWrapper)
: SfxModalDialog(pParent, "HyphenateDialog", "cui/ui/hyphenate.ui")
- , pHyphWrapper(NULL)
+ , pHyphWrapper(pWrapper)
, xHyphenator(NULL)
, xPossHyph(NULL)
- , nActLanguage(LANGUAGE_NONE)
+ , aActWord(rWord)
+ , nActLanguage(nLang)
, nMaxHyphenationPos(0)
, nHyphPos(0)
, nOldPos(0)
@@ -475,10 +476,7 @@ SvxHyphenWordDialog::SvxHyphenWordDialog(
get(m_pCloseBtn, "close");
aLabel = GetText();
- aActWord = rWord;
- nActLanguage = nLang;
xHyphenator = xHyphen;
- pHyphWrapper = pWrapper;
uno::Reference< linguistic2::XHyphenatedWord > xHyphWord( pHyphWrapper ?
pHyphWrapper->GetLast() : NULL, uno::UNO_QUERY );
More information about the Libreoffice-commits
mailing list