[Libreoffice-commits] .: 2 commits - desktop/win32 sw/source writerfilter/source

2012-10-08 Thread Libreoffice Gerrit user
 desktop/win32/source/guistdio/guistdio.inc|2 +-
 sw/source/core/layout/flowfrm.cxx |4 ++--
 writerfilter/source/ooxml/OOXMLFastHelper.hxx |9 -
 3 files changed, 7 insertions(+), 8 deletions(-)

New commits:
commit e55414dfc4899b67b8bec82885dde22ddb72faec
Author: jailletc36 
Date:   Sun Oct 7 12:32:00 2012 +0200

cppcheck: clarifyCalculation

Use () to clarify the order of the operator + minor formatting

Change-Id: I3dfa6566758d30bd76bed478089a0937ade24f89

diff --git a/desktop/win32/source/guistdio/guistdio.inc 
b/desktop/win32/source/guistdio/guistdio.inc
index 25586f0..0c2f097 100644
--- a/desktop/win32/source/guistdio/guistdio.inc
+++ b/desktop/win32/source/guistdio/guistdio.inc
@@ -75,7 +75,7 @@ DWORD passOutputToConsole(HANDLE readPipe, HANDLE console)
 dwRead++;
 //We must make sure that only complete wchar_t|s are written. 
WriteConsolse takes
 //the number of wchar_t|s as argument. ReadFile, however, reads bytes.
-bIncompleteWchar = dwRead % 2 ? true : false;
+bIncompleteWchar = (dwRead % 2) ? true : false;
 if (bIncompleteWchar)
 {
 //To test this case, give aBuffer a small odd size, e.g. aBuffer[3]
diff --git a/sw/source/core/layout/flowfrm.cxx 
b/sw/source/core/layout/flowfrm.cxx
index 7281703..a5baf31 100644
--- a/sw/source/core/layout/flowfrm.cxx
+++ b/sw/source/core/layout/flowfrm.cxx
@@ -920,7 +920,7 @@ sal_Bool SwFrm::WrongPageDesc( SwPageFrm* pNew )
 // Does the Cntnt bring a Pagedesc or do we need the
 // virtual page number of the new layout leaf?
 // PageDesc isn't allowed with Follows
-const sal_Bool bOdd = nTmp ? ( nTmp % 2 ? sal_True : sal_False )
+const sal_Bool bOdd = nTmp ? ( (nTmp % 2) ? sal_True : sal_False )
: pNew->OnRightPage();
 if ( !pDesc )
 pDesc = pNew->FindPageDesc();
@@ -934,7 +934,7 @@ sal_Bool SwFrm::WrongPageDesc( SwPageFrm* pNew )
 if ( pNewFlow && pNewFlow->GetFrm()->IsInTab() )
 pNewFlow = pNewFlow->GetFrm()->FindTabFrm();
 const SwPageDesc *pNewDesc= ( pNewFlow && !pNewFlow->IsFollow() )
-? pNewFlow->GetFrm()->GetAttrSet()->GetPageDesc().GetPageDesc():0;
+? pNewFlow->GetFrm()->GetAttrSet()->GetPageDesc().GetPageDesc() : 
0;
 
 return ( pNew->GetPageDesc() != pDesc ||   //  own desc ?
 pNew->GetFmt() != (bFirst ? pDesc->GetFirstFmt() : (bOdd ? 
pDesc->GetRightFmt() : pDesc->GetLeftFmt())) ||
commit 1fb40dafbefccf906108efb19f28696cd03d6aed
Author: jailletc36 
Date:   Sun Oct 7 12:28:47 2012 +0200

cppcheck: unreadVariable

Defined the aStr within the #ifdef block where it is used.

Change-Id: I2878d2db002411783e814b0ecf02e2a030d2d6d4

diff --git a/writerfilter/source/ooxml/OOXMLFastHelper.hxx 
b/writerfilter/source/ooxml/OOXMLFastHelper.hxx
index cfc21dc..8863bde 100644
--- a/writerfilter/source/ooxml/OOXMLFastHelper.hxx
+++ b/writerfilter/source/ooxml/OOXMLFastHelper.hxx
@@ -224,15 +224,14 @@ void OOXMLFastHelper::mark(OOXMLFastContextHandler * 
pHandler,
 {
 OOXMLValue::Pointer_t pVal(new T(rValue));
 
+#ifdef DEBUG_HELPER
 string aStr = (*QNameToString::Instance())(nId);
 
-#ifdef DEBUG_HELPER
 debug_logger->startElement("helper.mark");
 debug_logger->attribute("name", aStr);
-debug_logger->attribute
-("value",
- OUStringToOString
- (rValue, RTL_TEXTENCODING_ASCII_US).getStr());
+debug_logger->attribute("value",
+OUStringToOString
+(rValue, RTL_TEXTENCODING_ASCII_US).getStr());
 
 if (aStr.empty())
 debug_logger->element("unknown-qname");
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 2 commits - desktop/win32

2012-05-24 Thread Jesús Corrius
 desktop/win32/source/applauncher/appusermodelid.cxx |2 +-
 desktop/win32/source/applauncher/launcher.hxx   |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 8fd58d062786a44572a087f16476cd5fc01c0408
Author: Jesús Corrius 
Date:   Thu May 24 10:12:39 2012 +0200

replace wcscat_s -> wcscat to please minGW

diff --git a/desktop/win32/source/applauncher/appusermodelid.cxx 
b/desktop/win32/source/applauncher/appusermodelid.cxx
index 721fefa..2095817 100644
--- a/desktop/win32/source/applauncher/appusermodelid.cxx
+++ b/desktop/win32/source/applauncher/appusermodelid.cxx
@@ -37,7 +37,7 @@ void SetExplicitAppUserModelID(PCWSTR AppID)
 {
WCHAR szShell32[MAX_PATH];
GetSystemDirectoryW(szShell32, MAX_PATH);
-   wcscat_s(szShell32, MAX_PATH, L"\\Shell32.dll");
+   wcscat(szShell32, L"\\Shell32.dll");
 
HINSTANCE hinstDll = LoadLibraryW(szShell32);
 
commit dbbda42a4373dcd28c9f3b11a9d66fa1f69bbb85
Author: Jesús Corrius 
Date:   Thu May 24 10:10:28 2012 +0200

include files always in lowercase

diff --git a/desktop/win32/source/applauncher/launcher.hxx 
b/desktop/win32/source/applauncher/launcher.hxx
index 0dcf720..e602bfe 100644
--- a/desktop/win32/source/applauncher/launcher.hxx
+++ b/desktop/win32/source/applauncher/launcher.hxx
@@ -4,7 +4,7 @@
 #error Need C++ to compile
 #endif
 
-#include 
+#include 
 
 #ifndef _INC_TCHAR
 #   ifdef UNICODE
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits