[Libreoffice-commits] core.git: 3 commits - cui/source editeng/source include/editeng sw/source
Matteo Casalin
matteo.casalin at yahoo.com
Mon Jun 1 04:05:03 PDT 2015
cui/source/dialogs/hyphen.cxx | 23 +++++++++++------------
cui/source/inc/hyphen.hxx | 4 ++--
editeng/source/misc/splwrap.cxx | 2 +-
include/editeng/splwrap.hxx | 2 +-
sw/source/filter/html/htmlftn.cxx | 2 +-
sw/source/uibase/inc/hyp.hxx | 2 +-
sw/source/uibase/lingu/hyp.cxx | 4 ++--
7 files changed, 19 insertions(+), 20 deletions(-)
New commits:
commit 89fbad85dc98d67f5d3a7794c41e573613f5428f
Author: Matteo Casalin <matteo.casalin at yahoo.com>
Date: Mon Jun 1 11:11:31 2015 +0200
Fix typos in comments
Change-Id: I2b8c08ee1a1e45347158f77ff25bee6adbaace94
diff --git a/cui/source/dialogs/hyphen.cxx b/cui/source/dialogs/hyphen.cxx
index 6030089..c725f7d 100644
--- a/cui/source/dialogs/hyphen.cxx
+++ b/cui/source/dialogs/hyphen.cxx
@@ -105,7 +105,7 @@ OUString SvxHyphenWordDialog::EraseUnusableHyphens_Impl(
{
// returns a String showing only those hyphen positions which will result
// in a line break if hyphenation is done there
- // 1) we will need to discard all hyphenation positions at th end that
+ // 1) we will need to discard all hyphenation positions at the end that
// will not result in a line break where the text to the left still fits
// on the line.
// 2) since as from OOo 3.2 '-' are part of a word an thus text like
@@ -115,11 +115,11 @@ OUString SvxHyphenWordDialog::EraseUnusableHyphens_Impl(
// Example:
// If the possible hyphenation position in 'multi-line-editor' are to be marked
- // by '=' then the text will look like this 'mul=ti-line-ed=it=or'.
+ // by '=' then the text will look like this: 'mul=ti-line-ed=it=or'.
// If now the first line is only large enough for 'multi-line-edi' we need to discard
- // the last possible hyphnation point because of 1). The right most valid
+ // the last possible hyphenation point because of 1). The right most valid
// hyphenation position is "ed=itor". The first '-' left of this position is
- // "line-ed", thus because of 2) we now need to discard all possible hyphneation
+ // "line-ed", thus because of 2) we now need to discard all possible hyphenation
// positions to the left of that as well. Thus in the end leaving us with just
// 'multi-line-ed=itor' as return value for this function. (Just one valid hyphenation
// position for the user too choose from. However ALL the '-' characters in the word
@@ -156,7 +156,7 @@ OUString SvxHyphenWordDialog::EraseUnusableHyphens_Impl(
break;
else
{
- // find corresponding hyphen pos in string
+ // find corresponding hyphen positions in string
nPos = aTxt.indexOf( sal_Unicode( HYPH_POS_CHAR ), nStart );
if (nPos == -1)
@@ -238,7 +238,7 @@ void SvxHyphenWordDialog::ContinueHyph_Impl( sal_Int32 nInsPos )
nIdxPos++;
}
// take the possible hyphenation positions that got removed from the
- // start of the wor dinot account:
+ // start of the word into account:
nIdxPos += nHyphenationPositionsOffset;
uno::Sequence< sal_Int16 > aSeq = xPossHyph->getHyphenationPositions();
commit 69a8d81b488aaf3014a508cb518f2de3a32076f6
Author: Matteo Casalin <matteo.casalin at yahoo.com>
Date: Mon Jun 1 01:24:23 2015 +0200
sal_uInt16 to sal_Int32, and use -1 as a special case
Change-Id: Iaf90f96665781d3aa43f1f71802538f54409bd4a
diff --git a/cui/source/dialogs/hyphen.cxx b/cui/source/dialogs/hyphen.cxx
index a4e08f8..6030089 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 3bf9767..115c315 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 *);
diff --git a/editeng/source/misc/splwrap.cxx b/editeng/source/misc/splwrap.cxx
index c5a8195..fe5fb57 100644
--- a/editeng/source/misc/splwrap.cxx
+++ b/editeng/source/misc/splwrap.cxx
@@ -298,7 +298,7 @@ void SvxSpellWrapper::ReplaceAll( const OUString &, sal_Int16 )
{ // Replace Word from the Replace list
}
-void SvxSpellWrapper::InsertHyphen( const sal_uInt16 )
+void SvxSpellWrapper::InsertHyphen( const sal_Int32 )
{ // inserting and deleting Hyphae
}
diff --git a/include/editeng/splwrap.hxx b/include/editeng/splwrap.hxx
index 5e879f4..e9de2f7 100644
--- a/include/editeng/splwrap.hxx
+++ b/include/editeng/splwrap.hxx
@@ -136,7 +136,7 @@ protected:
// Wort via Thesaurus ersetzen
virtual void ChangeThesWord( const OUString& rNewWord );
virtual void AutoCorrect( const OUString& rAktStr, const OUString& rNewStr );
- virtual void InsertHyphen( const sal_uInt16 nPos ); // Insert hyphen
+ virtual void InsertHyphen( const sal_Int32 nPos ); // Insert hyphen
void SetCurTextObj( SdrObject* pObj ) { mpTextObj = pObj; }
SdrObject* GetCurTextObj() { return mpTextObj; }
diff --git a/sw/source/uibase/inc/hyp.hxx b/sw/source/uibase/inc/hyp.hxx
index f1f1440..4226ed8 100644
--- a/sw/source/uibase/inc/hyp.hxx
+++ b/sw/source/uibase/inc/hyp.hxx
@@ -42,7 +42,7 @@ protected:
virtual bool SpellContinue() SAL_OVERRIDE;
virtual void SpellEnd( ) SAL_OVERRIDE;
virtual bool SpellMore() SAL_OVERRIDE;
- virtual void InsertHyphen( const sal_uInt16 nPos ) SAL_OVERRIDE; // insert hyphen
+ virtual void InsertHyphen( const sal_Int32 nPos ) SAL_OVERRIDE; // insert hyphen
public:
SwHyphWrapper( SwView* pVw,
diff --git a/sw/source/uibase/lingu/hyp.cxx b/sw/source/uibase/lingu/hyp.cxx
index 057bd69..98dccf7 100644
--- a/sw/source/uibase/lingu/hyp.cxx
+++ b/sw/source/uibase/lingu/hyp.cxx
@@ -108,10 +108,10 @@ bool SwHyphWrapper::SpellMore()
return false;
}
-void SwHyphWrapper::InsertHyphen( const sal_uInt16 nPos )
+void SwHyphWrapper::InsertHyphen( const sal_Int32 nPos )
{
if( nPos)
- SwEditShell::InsertSoftHyph( nPos + 1); // does nPos == 1 really mean
+ SwEditShell::InsertSoftHyph(nPos + 1); // does nPos == 1 really mean
// insert hyphen after first char?
// (instead of nPos == 0)
else
commit 151363ed2e0209e0cb6d78d8e821d23080f2e74b
Author: Matteo Casalin <matteo.casalin at yahoo.com>
Date: Mon Jun 1 01:20:17 2015 +0200
Translate German message
Change-Id: Idbb72bc894cb8053e329a2713916cf896337351f
diff --git a/sw/source/filter/html/htmlftn.cxx b/sw/source/filter/html/htmlftn.cxx
index b8eaa26..8caf83d 100644
--- a/sw/source/filter/html/htmlftn.cxx
+++ b/sw/source/filter/html/htmlftn.cxx
@@ -276,7 +276,7 @@ Writer& OutHTML_SwFormatFootnote( Writer& rWrt, const SfxPoolItem& rHt )
{
nPos = rHTMLWrt.pFootEndNotes ? rHTMLWrt.pFootEndNotes->size() : 0;
OSL_ENSURE( nPos == static_cast<size_t>(rHTMLWrt.nFootNote + rHTMLWrt.nEndNote),
- "OutHTML_SwFormatFootnote: Position falsch" );
+ "OutHTML_SwFormatFootnote: wrong position" );
sClass = OOO_STRING_SVTOOLS_HTML_sdendnote_anc;
sFootnoteName = OOO_STRING_SVTOOLS_HTML_sdendnote + OUString::number( (sal_Int32)(++rHTMLWrt.nEndNote) );
}
More information about the Libreoffice-commits
mailing list