diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2015-06-01 01:24:23 +0200 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2015-06-01 13:04:13 +0200 |
commit | 69a8d81b488aaf3014a508cb518f2de3a32076f6 (patch) | |
tree | 943de6055bd242b26390e1cd7cc9342506f50dbc /cui | |
parent | 151363ed2e0209e0cb6d78d8e821d23080f2e74b (diff) |
sal_uInt16 to sal_Int32, and use -1 as a special case
Change-Id: Iaf90f96665781d3aa43f1f71802538f54409bd4a
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/dialogs/hyphen.cxx | 11 | ||||
-rw-r--r-- | cui/source/inc/hyphen.hxx | 4 |
2 files changed, 7 insertions, 8 deletions
diff --git a/cui/source/dialogs/hyphen.cxx b/cui/source/dialogs/hyphen.cxx index a4e08f8d52b1..60300896b733 100644 --- a/cui/source/dialogs/hyphen.cxx +++ b/cui/source/dialogs/hyphen.cxx @@ -31,7 +31,6 @@ #include <vcl/builderfactory.hxx> #define HYPH_POS_CHAR '=' -#define CONTINUE_HYPH USHRT_MAX #define CUR_HYPH_POS_CHAR '-' @@ -223,16 +222,16 @@ void SvxHyphenWordDialog::InitControls_Impl() } -void SvxHyphenWordDialog::ContinueHyph_Impl( sal_uInt16 nInsPos ) +void SvxHyphenWordDialog::ContinueHyph_Impl( sal_Int32 nInsPos ) { - if ( nInsPos != CONTINUE_HYPH && xPossHyph.is()) + if ( nInsPos >= 0 && xPossHyph.is() ) { if (nInsPos) { OUString aTmp( aEditWord ); DBG_ASSERT(nInsPos <= aTmp.getLength() - 2, "wrong hyphen position"); - sal_Int16 nIdxPos = -1; + sal_Int32 nIdxPos = -1; for (sal_Int32 i = 0; i <= nInsPos; ++i) { if (HYPH_POS_CHAR == aTmp[ i ]) @@ -385,7 +384,7 @@ IMPL_LINK_NOARG(SvxHyphenWordDialog, DeleteHdl_Impl) if( !bBusy ) { bBusy = true; - ContinueHyph_Impl(); + ContinueHyph_Impl( 0 ); bBusy = false; } return 0; @@ -397,7 +396,7 @@ IMPL_LINK_NOARG(SvxHyphenWordDialog, ContinueHdl_Impl) if( !bBusy ) { bBusy = true; - ContinueHyph_Impl( CONTINUE_HYPH ); + ContinueHyph_Impl(); bBusy = false; } return 0; diff --git a/cui/source/inc/hyphen.hxx b/cui/source/inc/hyphen.hxx index 3bf97672b99b..115c31543245 100644 --- a/cui/source/inc/hyphen.hxx +++ b/cui/source/inc/hyphen.hxx @@ -59,7 +59,7 @@ class SvxHyphenWordDialog : public SfxModalDialog LanguageType nActLanguage; // and its language sal_uInt16 nMaxHyphenationPos; // right most valid hyphenation pos sal_uInt16 nHyphPos; - sal_uInt16 nOldPos; + sal_Int32 nOldPos; sal_Int32 nHyphenationPositionsOffset; bool bBusy; @@ -68,7 +68,7 @@ class SvxHyphenWordDialog : public SfxModalDialog OUString EraseUnusableHyphens_Impl( css::uno::Reference< css::linguistic2::XPossibleHyphens > &rxPossHyph, sal_uInt16 nMaxHyphenationPos ); void InitControls_Impl(); - void ContinueHyph_Impl( sal_uInt16 nInsPos = 0 ); + void ContinueHyph_Impl( sal_Int32 nInsPos = -1 ); // continue by default sal_uInt16 GetHyphIndex_Impl(); DECL_LINK(Left_Impl, void *); |