[Libreoffice-commits] core.git: rsc/source
rsc/source/rscpp/cpp2.c |8 rsc/source/rscpp/cpp3.c |2 +- rsc/source/rscpp/cpp4.c |4 ++-- rsc/source/rscpp/cpp5.c | 14 +++--- rsc/source/rscpp/cppdef.h |9 - 5 files changed, 14 insertions(+), 23 deletions(-) New commits: commit 7fb97f25d16bd65fe8d32ca12c8b7acc89500991 Author: erdemdemirkapi <erdemdemirkapi.1...@gmail.com> Date: Sun May 1 12:54:48 2016 +0300 rsc - remove obsolete FILE_LOCAL macros. Change-Id: I92c19459646eaceffe87ef0f002c988595f221c5 Reviewed-on: https://gerrit.libreoffice.org/24549 Reviewed-by: Michael Meeks <michael.me...@collabora.com> Tested-by: Michael Meeks <michael.me...@collabora.com> diff --git a/rsc/source/rscpp/cpp2.c b/rsc/source/rscpp/cpp2.c index 2108f09..833e687 100644 --- a/rsc/source/rscpp/cpp2.c +++ b/rsc/source/rscpp/cpp2.c @@ -305,7 +305,7 @@ int control(int counter) * is always suppressed, so we don't need to evaluate anything. This * suppresses unnecessary warnings. */ -FILE_LOCAL void doif(int hash) +void doif(int hash) { int c; int found; @@ -358,7 +358,7 @@ FILE_LOCAL void doif(int hash) * Note: the November 12 draft forbids '>' in the #include format. * This restriction is unnecessary and not implemented. */ -FILE_LOCAL void doinclude() +void doinclude() { int c; int delim; @@ -406,7 +406,7 @@ FILE_LOCAL void doinclude() * active files. Returns TRUE if the file was opened, FALSE * if openinclude() fails. No error message is printed. */ -FILE_LOCAL int openinclude(char* filename, int searchlocal) +int openinclude(char* filename, int searchlocal) { char** incptr; char tmpname[NFWORK]; /* Filename work area */ @@ -500,7 +500,7 @@ FILE_LOCAL int openinclude(char* filename, int searchlocal) * node/device/directory part of the string is copied to result and * hasdirectory returns TRUE. Else, nothing is copied and it returns FALSE. */ -FILE_LOCAL int hasdirectory(char* source, char* result, int max) +int hasdirectory(char* source, char* result, int max) { #if HOST == SYS_UNIX char* tp; diff --git a/rsc/source/rscpp/cpp3.c b/rsc/source/rscpp/cpp3.c index e836b3d..71c40fe 100644 --- a/rsc/source/rscpp/cpp3.c +++ b/rsc/source/rscpp/cpp3.c @@ -369,7 +369,7 @@ int readoptions(char* filename, char*** pfargv) * This routine forces the -D and -U arguments to uppercase. * It is called only on cpp startup by dooptions(). */ -FILE_LOCAL void zap_uc(char* ap) +void zap_uc(char* ap) { while (*ap != EOS) { diff --git a/rsc/source/rscpp/cpp4.c b/rsc/source/rscpp/cpp4.c index eab7b15..6071076 100644 --- a/rsc/source/rscpp/cpp4.c +++ b/rsc/source/rscpp/cpp4.c @@ -465,7 +465,7 @@ void expand(DEFBUF* tokenp) /* * Collect the actual parameters for this macro. TRUE if ok. */ -FILE_LOCAL int expcollect() +int expcollect() { int c; int paren; /* For embedded ()'s*/ @@ -533,7 +533,7 @@ FILE_LOCAL int expcollect() /* * Stuff the macro body, replacing formal parameters by actual parameters. */ -FILE_LOCAL void expstuff(DEFBUF* tokenp) +void expstuff(DEFBUF* tokenp) { int c; /* Current character*/ char* inp; /* -> repl string */ diff --git a/rsc/source/rscpp/cpp5.c b/rsc/source/rscpp/cpp5.c index f383ab8..950830f 100644 --- a/rsc/source/rscpp/cpp5.c +++ b/rsc/source/rscpp/cpp5.c @@ -370,7 +370,7 @@ again: * evalchar called to evaluate 'x' * evalnum called to evaluate numbers. */ -FILE_LOCAL int evallex(int skip) +int evallex(int skip) { int c; int c1; @@ -505,7 +505,7 @@ again: * DIG success * OP_FAIL bad parse or something. */ -FILE_LOCAL int dosizeof() +int dosizeof() { int c; TYPES* tp; @@ -621,7 +621,7 @@ FILE_LOCAL int dosizeof() /* * TRUE if value is zero or exactly one bit is set in value. */ -FILE_LOCAL int bittest(int value) +int bittest(int value) { /* whoaa!! really worried about non 2's complement machines... * but not at all about cross-compiling ? @@ -640,7 +640,7 @@ FILE_LOCAL int bittest(int value) * Expand number for #if lexical analysis. Note: evalnum recognizes * the unsigned suffix, but only returns a signed int value. */ -FILE_LOCAL int evalnum(int c) +int evalnum(int c) { int value; int base; @@ -670,7 +670,7 @@ FILE_LOCAL int evalnum(int c) value += c1; c = cget(); } -if (c == 'u' || c == 'U') /* Unsigned nonsense*/ +if (c == 'u' || c == 'U')/* Unsigned nonsense */ cget(); unget(); return value; @@ -679,7 +679,7 @@ FILE_LOCAL int evalnum(int c) /* * Get a character constant */ -FILE_LOCAL int evalchar(int skip) +int evalchar(int skip) { int c; int value; @@ -785,7 +785,7 @@ FILE_LOCAL int evalchar(int skip) * * evaleval() returns the new pointer to the top of the value stack. */ -FILE_LOCAL int * evaleval(int* valp
[Libreoffice-commits] core.git: vcl/source
vcl/source/app/svmain.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 3f8a2f6bfb1fba694b833fe6fa67b2651a579fda Author: erdemdemirkapi <erdemdemirkapi.1...@gmail.com> Date: Sat Apr 30 14:27:11 2016 +0300 tdf93563 volatile signal re-enterancy guards Change-Id: Ic3e8b78d204145e94f7bc56aab60914f4f64f6e9 Reviewed-on: https://gerrit.libreoffice.org/24515 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Michael Meeks <michael.me...@collabora.com> diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx index 8e0d1ec..39e62315 100644 --- a/vcl/source/app/svmain.cxx +++ b/vcl/source/app/svmain.cxx @@ -99,7 +99,7 @@ static bool isInitVCL(); oslSignalAction SAL_CALL VCLExceptionSignal_impl( void* /*pData*/, oslSignalInfo* pInfo) { -static bool bIn = false; +static volatile bool bIn = false; // if we crash again, bail out immediately if ( !bIn ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: svx/source
svx/source/svdraw/svdoedge.cxx | 36 ++-- 1 file changed, 18 insertions(+), 18 deletions(-) New commits: commit e070fa3eab9cef868aab38643060e20ae0c77b26 Author: erdemdemirkapi <erdemdemirkapi.1...@gmail.com> Date: Sat Apr 30 14:45:04 2016 +0300 tdf#96505 Get rid of cargo cult long integer literals Change-Id: Idf21193d31b1e8ea73a5a0754f5cf3e5c030c061 Reviewed-on: https://gerrit.libreoffice.org/24516 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrh...@googlemail.com> diff --git a/svx/source/svdraw/svdoedge.cxx b/svx/source/svdraw/svdoedge.cxx index 0eb55d6..2630f75 100644 --- a/svx/source/svdraw/svdoedge.cxx +++ b/svx/source/svdraw/svdoedge.cxx @@ -1715,21 +1715,21 @@ basegfx::B2DPolyPolygon SdrEdgeObj::GetEdgeTrackPath() const sal_uInt32 SdrEdgeObj::GetHdlCount() const { SdrEdgeKind eKind=static_cast(GetObjectItem(SDRATTR_EDGEKIND)).GetValue(); -sal_uInt32 nHdlAnz(0L); +sal_uInt32 nHdlAnz(0); sal_uInt32 nPointCount(pEdgeTrack->GetPointCount()); if(nPointCount) { -nHdlAnz = 2L; +nHdlAnz = 2; -if ((eKind==SDREDGE_ORTHOLINES || eKind==SDREDGE_BEZIER) && nPointCount >= 4L) +if ((eKind==SDREDGE_ORTHOLINES || eKind==SDREDGE_BEZIER) && nPointCount >= 4) { -sal_uInt32 nO1(aEdgeInfo.nObj1Lines > 0L ? aEdgeInfo.nObj1Lines - 1L : 0L); -sal_uInt32 nO2(aEdgeInfo.nObj2Lines > 0L ? aEdgeInfo.nObj2Lines - 1L : 0L); -sal_uInt32 nM(aEdgeInfo.nMiddleLine != 0x ? 1L : 0L); +sal_uInt32 nO1(aEdgeInfo.nObj1Lines > 0 ? aEdgeInfo.nObj1Lines - 1 : 0); +sal_uInt32 nO2(aEdgeInfo.nObj2Lines > 0 ? aEdgeInfo.nObj2Lines - 1 : 0); +sal_uInt32 nM(aEdgeInfo.nMiddleLine != 0x ? 1 : 0); nHdlAnz += nO1 + nO2 + nM; } -else if (eKind==SDREDGE_THREELINES && nPointCount == 4L) +else if (eKind==SDREDGE_THREELINES && nPointCount == 4) { if(GetConnectedNode(true)) nHdlAnz++; @@ -1756,14 +1756,14 @@ SdrHdl* SdrEdgeObj::GetHdl(sal_uInt32 nHdlNum) const } else { SdrEdgeKind eKind=static_cast(GetObjectItem(SDRATTR_EDGEKIND)).GetValue(); if (eKind==SDREDGE_ORTHOLINES || eKind==SDREDGE_BEZIER) { -sal_uInt32 nO1(aEdgeInfo.nObj1Lines > 0L ? aEdgeInfo.nObj1Lines - 1L : 0L); -sal_uInt32 nO2(aEdgeInfo.nObj2Lines > 0L ? aEdgeInfo.nObj2Lines - 1L : 0L); -sal_uInt32 nM(aEdgeInfo.nMiddleLine != 0x ? 1L : 0L); -sal_uInt32 nNum(nHdlNum - 2L); -sal_Int32 nPt(0L); +sal_uInt32 nO1(aEdgeInfo.nObj1Lines > 0 ? aEdgeInfo.nObj1Lines - 1 : 0); +sal_uInt32 nO2(aEdgeInfo.nObj2Lines > 0 ? aEdgeInfo.nObj2Lines - 1 : 0); +sal_uInt32 nM(aEdgeInfo.nMiddleLine != 0x ? 1 : 0); +sal_uInt32 nNum(nHdlNum - 2); +sal_Int32 nPt(0); pHdl=new ImpEdgeHdl(Point(),HDL_POLY); if (nNum<nO1) { -nPt=nNum+1L; +nPt=nNum+1; if (nNum==0) static_cast<ImpEdgeHdl*>(pHdl)->SetLineCode(OBJ1LINE2); if (nNum==1) static_cast<ImpEdgeHdl*>(pHdl)->SetLineCode(OBJ1LINE3); } else { @@ -2378,7 +2378,7 @@ SdrObject* SdrEdgeObj::DoConvertToPolyObj(bool bBezier, bool bAddText) const sal_uInt32 SdrEdgeObj::GetSnapPointCount() const { -return 2L; +return 2; } Point SdrEdgeObj::GetSnapPoint(sal_uInt32 i) const @@ -2396,14 +2396,14 @@ bool SdrEdgeObj::IsPolyObj() const sal_uInt32 SdrEdgeObj::GetPointCount() const { -return 0L; +return 0; } Point SdrEdgeObj::GetPoint(sal_uInt32 i) const { const_cast<SdrEdgeObj*>(this)->ImpUndirtyEdgeTrack(); sal_uInt16 nCount=pEdgeTrack->GetPointCount(); -if (0L == i) +if (0 == i) return (*pEdgeTrack)[0]; else return (*pEdgeTrack)[nCount-1]; @@ -2414,9 +2414,9 @@ void SdrEdgeObj::NbcSetPoint(const Point& rPnt, sal_uInt32 i) // TODO: Need an implementation to connect differently. ImpUndirtyEdgeTrack(); sal_uInt16 nCount=pEdgeTrack->GetPointCount(); -if (0L == i) +if (0 == i) (*pEdgeTrack)[0]=rPnt; -if (1L == i) +if (1 == i) (*pEdgeTrack)[nCount-1]=rPnt; SetEdgeTrackDirty(); SetRectsDirty(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/source
vcl/source/control/field2.cxx | 58 +- 1 file changed, 29 insertions(+), 29 deletions(-) New commits: commit 3294af80ab39488188ffe6c762bf1a0aaf84a201 Author: erdemdemirkapi <erdemdemirkapi.1...@gmail.com> Date: Sat Jan 30 15:50:47 2016 +0200 tdf#89756 swich postfix to prefix operators Change-Id: Id9a618994396d958dc7c7bf2acf9656e76d199e3 Reviewed-on: https://gerrit.libreoffice.org/21925 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: jan iversen <j...@documentfoundation.org> diff --git a/vcl/source/control/field2.cxx b/vcl/source/control/field2.cxx index b08bd788..c84fab1 100644 --- a/vcl/source/control/field2.cxx +++ b/vcl/source/control/field2.cxx @@ -69,7 +69,7 @@ uno::Reference< i18n::XCharacterClassification > ImplGetCharClass() static sal_Unicode* ImplAddString( sal_Unicode* pBuf, const OUString& rStr ) { if ( rStr.getLength() == 1 ) -*pBuf++ = rStr[0]; +*++pBuf = rStr[0]; else if ( rStr.isEmpty() ) ; else @@ -88,10 +88,10 @@ static sal_Unicode* ImplAddNum( sal_Unicode* pBuf, sal_uLong nNumber, int nMinLe do { *pTempBuf = (sal_Unicode)(nNumber % 10) + '0'; -pTempBuf++; + ++pTempBuf; nNumber /= 10; if ( nMinLen ) -nMinLen--; +--nMinLen; } while ( nNumber ); @@ -99,16 +99,16 @@ static sal_Unicode* ImplAddNum( sal_Unicode* pBuf, sal_uLong nNumber, int nMinLe while ( nMinLen > 0 ) { *pBuf = '0'; -pBuf++; -nMinLen--; +++pBuf; +--nMinLen; } // copy temp buffer to real buffer do { -pTempBuf--; +--pTempBuf; *pBuf = *pTempBuf; -pBuf++; +++pBuf; } while ( pTempBuf != aTempBuf ); @@ -128,7 +128,7 @@ static sal_uInt16 ImplGetNum( const sal_Unicode*& rpBuf, bool& rbError ) { nNumber *= 10; nNumber += *rpBuf - '0'; -rpBuf++; +++rpBuf; } return nNumber; @@ -252,7 +252,7 @@ static OUString ImplPatternReformat( const OUString& rStr, // if it is a literal copy otherwise ignore because it might be the next valid // character of the string if ( ImplCommaPointCharEqual( cChar, cLiteral ) ) -nStrIndex++; +++nStrIndex; else { // Otherwise we check if it is a invalid character. This is the case if it does not @@ -263,11 +263,11 @@ static OUString ImplPatternReformat( const OUString& rStr, if ( rEditMask[n] != EDITMASK_LITERAL ) { if ( !ImplIsPatternChar( cChar, rEditMask[n] ) ) -nStrIndex++; +++nStrIndex; break; } -n++; +++n; } } } @@ -279,7 +279,7 @@ static OUString ImplPatternReformat( const OUString& rStr, { // use this character aOutStr[i] = cTempChar; -nStrIndex++; +++nStrIndex; } else { @@ -303,17 +303,17 @@ static OUString ImplPatternReformat( const OUString& rStr, break; } -n++; +++n; } } -nStrIndex++; +++nStrIndex; continue; } } } -i++; +++i; } return aOutStr.makeStringAndClear(); @@ -335,7 +335,7 @@ static void ImplPatternMaxPos( const OUString& rStr, const OString& rEditMask, if ( (rEditMask[nMaxPos-1] != EDITMASK_LITERAL) && (rStr[nMaxPos-1] != ' ') ) break; -nMaxPos--; +--nMaxPos; } // if we are in front of a literal, continue search until first character after the literal @@ -347,7 +347,7 @@ static void ImplPatternMaxPos( const OUString& rStr, const OString& rEditMask, nMaxPos = nTempPos; break; } -nTempPos++; +++nTempPos; } } @@ -377,11 +377,11 @@ static void ImplPatternProcessStrictModify( Edit* pEdit, (aText[i] != ' ') ) break; -i++; +++i; } // keep all literal characters while ( i && (rEditMask[i] == EDITMASK_LITERAL) ) -i--; +--i; aText = aText.copy( i ); } @@ -421,7 +421,7 @@ static sal_Int32 ImplPatternLeftPos(const OString& rEditMask, sal_Int32 n