[Libreoffice-commits] .: 2 commits - sw/source
Caolán McNamara
caolan at kemper.freedesktop.org
Sun Dec 5 05:03:39 PST 2010
sw/source/filter/basflt/iodetect.cxx | 2 +-
sw/source/ui/uiview/viewling.cxx | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 2dffafd565376bc0374ee4265daed4855b5a943f
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Dec 5 13:02:59 2010 +0000
cppcheck: scope of this variable can be reduced
diff --git a/sw/source/ui/uiview/viewling.cxx b/sw/source/ui/uiview/viewling.cxx
index 1cfe892..94433f0 100644
--- a/sw/source/ui/uiview/viewling.cxx
+++ b/sw/source/ui/uiview/viewling.cxx
@@ -686,12 +686,12 @@ sal_Bool SwView::ExecSpellPopup(const Point& rPt)
bool bUseGrammarContext = false;
Reference< XSpellAlternatives > xAlt( pWrtShell->GetCorrection(&rPt, aToFill) );
/*linguistic2::*/ProofreadingResult aGrammarCheckRes;
- sal_Int32 nErrorPosInText = -1;
sal_Int32 nErrorInResult = -1;
uno::Sequence< rtl::OUString > aSuggestions;
bool bCorrectionRes = false;
if (!xAlt.is() || xAlt->getAlternatives().getLength() == 0)
{
+ sal_Int32 nErrorPosInText = -1;
bCorrectionRes = pWrtShell->GetGrammarCorrection( aGrammarCheckRes, nErrorPosInText, nErrorInResult, aSuggestions, &rPt, aToFill );
::rtl::OUString aMessageText;
if (nErrorInResult >= 0)
commit 4435214100d5fce3461468cd176e64c0ae56cd65
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Dec 5 13:02:04 2010 +0000
cppcheck: scope of this variable can be reduced
diff --git a/sw/source/filter/basflt/iodetect.cxx b/sw/source/filter/basflt/iodetect.cxx
index 4bb6a97..6ea629a 100644
--- a/sw/source/filter/basflt/iodetect.cxx
+++ b/sw/source/filter/basflt/iodetect.cxx
@@ -432,10 +432,10 @@ bool SwIoSystem::IsDetectableText(const sal_Char* pBuf, ULONG &rLen,
bool bSwap = false;
CharSet eCharSet = RTL_TEXTENCODING_DONTKNOW;
bool bLE = true;
- ULONG nHead=0;
/*See if its a known unicode type*/
if (rLen >= 2)
{
+ ULONG nHead=0;
if (rLen > 2 && BYTE(pBuf[0]) == 0xEF && BYTE(pBuf[1]) == 0xBB &&
BYTE(pBuf[2]) == 0xBF)
{
More information about the Libreoffice-commits
mailing list