[Libreoffice-commits] core.git: 2 commits - framework/source sw/source
Julien Nabet
serval2412 at yahoo.fr
Fri Sep 13 16:23:38 PDT 2013
framework/source/xml/imagesdocumenthandler.cxx | 7 ++++---
sw/source/core/txtnode/fntcache.cxx | 2 +-
sw/source/ui/wrtsh/move.cxx | 3 +--
3 files changed, 6 insertions(+), 6 deletions(-)
New commits:
commit c4f5b1745c8317148752d47c0c5e90b216bb2832
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Sat Sep 14 01:22:55 2013 +0200
Replace char[] by OUStringBuffer/OUString
Change-Id: I233d067b3fcb93c80ab3c458b19b4f60680fe84b
diff --git a/framework/source/xml/imagesdocumenthandler.cxx b/framework/source/xml/imagesdocumenthandler.cxx
index 58c33bd..aae448f 100644
--- a/framework/source/xml/imagesdocumenthandler.cxx
+++ b/framework/source/xml/imagesdocumenthandler.cxx
@@ -587,12 +587,13 @@ OUString OReadImagesDocumentHandler::getErrorLineString()
{
ResetableGuard aGuard( m_aLock );
- char buffer[32];
if ( m_xLocator.is() )
{
- snprintf( buffer, sizeof(buffer), "Line: %ld - ", static_cast<long>( m_xLocator->getLineNumber() ));
- return OUString::createFromAscii( buffer );
+ OUStringBuffer buffer("Line: ");
+ buffer.append(m_xLocator->getLineNumber());
+ buffer.append(" - ");
+ return buffer.makeStringAndClear();
}
else
return OUString();
commit 83ea64d4cf6603366cf4ff83c4cb37e2352cd589
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Sat Sep 14 01:21:10 2013 +0200
cppcheck: reduce scope
Change-Id: I4d74c6444e3816306cba8b731280bb90899f4ea7
diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx
index 2372ea7..125e4b7 100644
--- a/sw/source/core/txtnode/fntcache.cxx
+++ b/sw/source/core/txtnode/fntcache.cxx
@@ -1097,9 +1097,9 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
if ( rInf.GetSpace() || rInf.GetKanaComp())
{
long nSpaceAdd = rInf.GetSpace() / SPACING_PRECISION_FACTOR;
- bool bSpecialJust = false;
if ( rInf.GetFont() && rInf.GetLen() )
{
+ bool bSpecialJust = false;
const SwScriptInfo* pSI = rInf.GetScriptInfo();
const sal_uInt8 nActual = rInf.GetFont()->GetActual();
///Kana Compression
diff --git a/sw/source/ui/wrtsh/move.cxx b/sw/source/ui/wrtsh/move.cxx
index 26125c5..1c7f03b 100644
--- a/sw/source/ui/wrtsh/move.cxx
+++ b/sw/source/ui/wrtsh/move.cxx
@@ -421,7 +421,6 @@ sal_Bool SwWrtShell::PushCrsr(SwTwips lOffset, sal_Bool bSelect)
// and we have to remember the position on the stack to return to it later.
sal_Bool bIsFrmSel = sal_False;
- bool bIsObjSel = false;
//Target position is now within the viewable region -->
//Place the cursor at the target position; remember that no target
@@ -436,7 +435,7 @@ sal_Bool SwWrtShell::PushCrsr(SwTwips lOffset, sal_Bool bSelect)
EndSelect();
bIsFrmSel = IsFrmSelected();
- bIsObjSel = 0 != IsObjSelected();
+ bool bIsObjSel = 0 != IsObjSelected();
// unselect frame
if( bIsFrmSel || bIsObjSel )
More information about the Libreoffice-commits
mailing list