A nasty bug in 3.5 - Writer corrupts document that worked fine in 3.4

2012-02-21 Thread Mariusz Dykierek
How do I report? -- Regards, Mariusz Dykerek ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice

[PATCH] Using empty() instead of size() == 0 (broad fix for, cppcheck's Possible inefficient checking for 'sth', emptiness)

2012-02-19 Thread Mariusz Dykierek
Performance improvement unlikely yet readability/intent clearer + cppcheck satisfied. -- Regards, Mariusz Dykerek From 3fa7c19cfa1a844a926221d2d0235e4c9737c86c Mon Sep 17 00:00:00 2001 From: Mariusz Dykierek mariuszdykie...@gmail.com Date: Sun, 19 Feb 2012 17:21:55 +0100 Subject: [PATCH 1/2

Re: [PATCH] [core/vcl/source/window/splitwin.cxx:2047] -[core/vcl/source/window/splitwin.cxx:2045]:(style) Found duplicate branches for if and else.

2012-02-18 Thread Mariusz Dykierek
declarations of unused variable removed by-the-way. Anyway, all started with cppcheck warning about duplicate branches for if-else. Question I have, is how do I submit the patch: - as a reply to this thread, or - a new patch in a new thread? Regards, Mariusz Dykierek

Re: [PATCH] [core/vcl/source/window/splitwin.cxx:2047] -[core/vcl/source/window/splitwin.cxx:2045]:(style) Found duplicate branches for if and else.

2012-02-18 Thread Mariusz Dykierek
On 2012-02-18 14:41, Ivan Timofeev wrote: On 18.02.2012 17:29, Mariusz Dykierek wrote: I have a 'replacement' patch that actually replaces most of if...else if...else chains with switches. Great! They are more legible and seem natural when choosing branches depending on the same

Re: [PATCH] [core/vcl/source/window/splitwin.cxx:2047] - [core/vcl/source/window/splitwin.cxx:2045]: (style) Found duplicate branches for if and else.

2012-02-16 Thread Mariusz Dykierek
On 2012-02-16 10:02, Stephan Bergmann wrote: On 02/16/2012 09:35 AM, Riccardo Magliocchetti wrote: Otherwise you can simplify it even more: sal_Bool bLeft = (meAlign == WINDOWALIGN_TOP || meAlign == WINDOWALIGN_LEFT) ? sal_False : sal_True; ... which of course reduces to bool bLeft =

[PATCH] [core/fpicker/source/win32/filepicker/asynceventnotifier.cxx:243]: (performance) Possible inefficient checking for 'm_EventList' emptiness.

2012-02-15 Thread Mariusz Dykierek
-- Pozdrawiam, Mariusz Dykerek diff --git a/fpicker/source/win32/filepicker/asynceventnotifier.cxx b/fpicker/source/win32/filepicker/asynceventnotifier.cxx index a155f8b..748e5ac 100644 --- a/fpicker/source/win32/filepicker/asynceventnotifier.cxx +++

[PATCH] [core/dtrans/source/win32/dtobj/FetcList.cxx:123]: (performance) Possible inefficient checking for 'm_FormatMap' emptiness.

2012-02-15 Thread Mariusz Dykierek
-- Pozdrawiam, Mariusz Dykerek diff --git a/dtrans/source/win32/dtobj/FetcList.cxx b/dtrans/source/win32/dtobj/FetcList.cxx index 3bb3beb..3599da8 100644 --- a/dtrans/source/win32/dtobj/FetcList.cxx +++ b/dtrans/source/win32/dtobj/FetcList.cxx @@ -120,7 +120,7 @@ sal_Bool

[PATCH] [core/dtrans/source/win32/dtobj/FmtFilter.cxx:485]: (performance) Possible inefficient checking for 'fileList' emptiness.

2012-02-15 Thread Mariusz Dykierek
-- Regards, Mariusz Dykerek diff --git a/dtrans/source/win32/dtobj/FmtFilter.cxx b/dtrans/source/win32/dtobj/FmtFilter.cxx index c012115..4093e92 100644 --- a/dtrans/source/win32/dtobj/FmtFilter.cxx +++ b/dtrans/source/win32/dtobj/FmtFilter.cxx @@ -482,7 +482,7 @@ typedef Sequencesal_Int8

[PATCH] [core/linguistic/source/dlistimp.*:*]: (performance) Possible inefficient checking for 'aDicList' emptiness.

2012-02-15 Thread Mariusz Dykierek
-- Pozdrawiam, Mariusz Dykerek diff --git a/linguistic/source/dlistimp.cxx b/linguistic/source/dlistimp.cxx index e824888..316d86d 100644 --- a/linguistic/source/dlistimp.cxx +++ b/linguistic/source/dlistimp.cxx @@ -608,7 +608,7 @@ void SAL_CALL pDicEvtLstnrHelper-DisposeAndClear(

[PATCH] [core/vcl/source/window/splitwin.cxx:2047] - [core/vcl/source/window/splitwin.cxx:2045]: (style) Found duplicate branches for if and else.

2012-02-15 Thread Mariusz Dykierek
+ some simplification -- Regards, Mariusz Dykerek diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx index f5da206..09ad468 100644 --- a/vcl/source/window/splitwin.cxx +++ b/vcl/source/window/splitwin.cxx @@ -2035,17 +2035,9 @@ void SplitWindow::ImplDrawFadeIn(

[PATCH] cppcheck's (portability) Extra qualification 'class_name::' unnecessary and considered an error by many compilers.

2012-02-15 Thread Mariusz Dykierek
-- Regards, Mariusz Dykerek diff --git a/cli_ure/source/uno_bridge/cli_bridge.h b/cli_ure/source/uno_bridge/cli_bridge.h index 0306e4d..b9297d0 100644 --- a/cli_ure/source/uno_bridge/cli_bridge.h +++ b/cli_ure/source/uno_bridge/cli_bridge.h @@ -96,7 +96,7 @@ struct Bridge System::Object*

[PATCH] [core/editeng/source/items/borderline.cxx:514] - [core/editeng/source/items/borderline.cxx:509]: (style) Found duplicate branches for if and else.

2012-02-15 Thread Mariusz Dykierek
-- Regards, Mariusz Dykerek diff --git a/editeng/source/items/borderline.cxx b/editeng/source/items/borderline.cxx index b617ff4..1677141 100644 --- a/editeng/source/items/borderline.cxx +++ b/editeng/source/items/borderline.cxx @@ -492,29 +492,20 @@ bool SvxBorderLine::HasPriority( const

[Libreoffice] [PATCH] Removed nonexistent items from unusedcode.easy

2012-01-22 Thread Mariusz Dykierek
Hi, Attached patch removes from unusedcode.easy a number of methods that cannot be found in the sources within the core directory. Can someone more experienced than I am confirm that items: - CIcc*::* - boost::gregorian::* are really supposed to be enumerated in the unusedcode.easy? --

[Libreoffice] [PATCH] Removed LineListBox methods listed in unusedcode.easy

2012-01-22 Thread Mariusz Dykierek
Hi, Attached patch removes: - LineListBox::GetEntryLine1 - LineListBox::GetEntryLine2 - LineListBox::GetEntryDistance - LineListBox::GetSelectEntryLine1 - LineListBox::GetSelectEntryLine2 - LineListBox::GetSelectEntryDistance and corresponding entries in unusedcode.easy. -- Pozdrawiam,

[Libreoffice] [PATCH] Removed unused NfCurrencyEntry::ApplyVariableInformation(NfCurrencyEntry const)

2012-01-22 Thread Mariusz Dykierek
Attached patch removes NfCurrencyEntry::ApplyVariableInformation(NfCurrencyEntry const) as listed in unusedcode.easy. -- Mariusz Dykerek diff --git a/svl/inc/svl/zforlist.hxx b/svl/inc/svl/zforlist.hxx index aa68fc1..ac387d4 100644 --- a/svl/inc/svl/zforlist.hxx +++ b/svl/inc/svl/zforlist.hxx

[Libreoffice] [PATCH] A copy-paste bug detected by cppcheck at sdext/source/presenter/PresenterTimer.cxx:512

2012-01-22 Thread Mariusz Dykierek
Attached patch fixes a copy-paste error in the condition. Seconds used twice instead of Hours. -- Pozdrawiam, Mariusz Dykerek diff --git a/sdext/source/presenter/PresenterTimer.cxx b/sdext/source/presenter/PresenterTimer.cxx index 6c5f8d9..3757bd0 100644 ---

[Libreoffice] [PATCH] Redundant condition at sc/source/filter/starcalc/scflt.cxx:1837 detected by cppcheck + comment translation

2012-01-22 Thread Mariusz Dykierek
Subject explains almost everything. -- Mariusz Dykerek diff --git a/sc/source/filter/starcalc/scflt.cxx b/sc/source/filter/starcalc/scflt.cxx index 1d30ea2..2086bf5 100644 --- a/sc/source/filter/starcalc/scflt.cxx +++ b/sc/source/filter/starcalc/scflt.cxx @@ -1708,7 +1708,7 @@ void

[Libreoffice] [PATCH] Same expression on both sides of || in if condition at libreoffice@lists.freedesktop.org (cppcheck)

2012-01-22 Thread Mariusz Dykierek
I guess this is what author intended. The other solution is to remove the copy. -- Mariusz Dykerek diff --git a/svtools/source/misc/filechangedchecker.cxx b/svtools/source/misc/filechangedchecker.cxx index 514841f..7a99f15 100644 --- a/svtools/source/misc/filechangedchecker.cxx +++

[Libreoffice] Blanket license for contributions to LibreOffice project

2012-01-20 Thread Mariusz Dykierek
Hi All, All my previous and future contributions to the LibreOffice project are licensed under the terms of the LGPLv3+ / MPL. -- Best regards, Mariusz Dykerek ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org

[Libreoffice] Removed Window::GetFullscreenSpriteCanvas listed in unusedcode.easy

2012-01-18 Thread Mariusz Dykierek
Code is contributed under the LGPLv3+ / MPL diff --git a/unusedcode.easy b/unusedcode.easy index b906bb9..bc78775 100644 --- a/unusedcode.easy +++ b/unusedcode.easy @@ -1,4 +1,4 @@ -AtomDocument::AtomDocument(AtomPubSession*, std::basic_stringchar, std::char_traitschar, std::allocatorchar ) +###

[Libreoffice] Removed formula::FormulaCompiler::IsMatrixFunction() const listed in unusedcode.easy

2012-01-18 Thread Mariusz Dykierek
Code is contributed under the LGPLv3+ / MPL Regards, Mariusz Dykierek diff --git a/formula/inc/formula/token.hxx b/formula/inc/formula/token.hxx index 738caa1..2beed8d 100644 --- a/formula/inc/formula/token.hxx +++ b/formula/inc/formula/token.hxx @@ -114,7 +114,6 @@ public: inline void

[Libreoffice] Correction Removed formula::****::IsMatrixFunction() const listed in unusedcode.easy

2012-01-18 Thread Mariusz Dykierek
Was to read: FormulaToken::IsMatrixFunction() const On 2012-01-19 00:15, Mariusz Dykierek wrote: ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice

[Libreoffice] Removed FormatterBase::SetFieldText(String const, unsigned char) listed in unusedcode.easy

2012-01-14 Thread Mariusz Dykierek
Code is contributed under the LGPLv3+ / MPL -- Regards, Mariusz Dykerek diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx index 1538287..51c4ee2 100644 --- a/vcl/source/control/field.cxx +++ b/vcl/source/control/field.cxx @@ -387,20 +387,6 @@ const AllSettings