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] Using empty() instead of size() == 0 (broad fix for
 cppcheck's Possible inefficient checking for 'sth'
 emptiness)

---
 autodoc/inc/ary/info/ci_text.hxx   |2 +-
 autodoc/source/display/idl/hfi_module.cxx  |2 +-
 autodoc/source/display/idl/hfi_xrefpage.cxx|2 +-
 autodoc/source/display/idl/hi_factory.cxx  |2 +-
 autodoc/source/exes/adc_uni/adc_cl.cxx |2 +-
 chart2/source/controller/dialogs/DialogModel.cxx   |2 +-
 comphelper/source/container/container.cxx  |4 ++--
 connectivity/source/drivers/file/fanalyzer.cxx |2 +-
 connectivity/source/drivers/file/fcomp.cxx |4 ++--
 .../drivers/mozab/bootstrap/MNSProfileDiscover.cxx |2 +-
 .../source/drivers/postgresql/pq_tools.hxx |2 +-
 dbaccess/source/ui/misc/WColumnSelect.cxx  |4 ++--
 dbaccess/source/ui/querydesign/QueryTableView.cxx  |2 +-
 .../source/ui/querydesign/TableConnectionData.cxx  |2 +-
 .../source/deployment/registry/dp_backenddb.cxx|4 ++--
 desktop/source/pkgchk/unopkg/unopkg_misc.cxx   |2 +-
 editeng/source/editeng/impedit4.cxx|2 +-
 editeng/source/misc/txtrange.cxx   |2 +-
 editeng/source/outliner/outlobj.cxx|2 +-
 extensions/qa/update/test_update.cxx   |2 +-
 forms/source/component/EventThread.cxx |2 +-
 fpicker/source/unx/kde_unx/UnxCommandThread.cxx|2 +-
 .../win32/filepicker/VistaFilePickerImpl.cxx   |2 +-
 lotuswordpro/source/filter/xfilter/xfindex.cxx |2 +-
 registry/tools/regcompare.cxx  |4 ++--
 sc/source/core/data/dociter.cxx|6 +++---
 sc/source/core/data/dptablecache.cxx   |4 ++--
 sc/source/ui/view/viewdata.cxx |4 ++--
 sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx |2 +-
 .../controls/MasterPageContainerQueue.cxx  |2 +-
 sdext/source/presenter/PresenterTimer.cxx  |4 ++--
 sdext/source/presenter/PresenterToolBar.cxx|2 +-
 shell/source/win32/simplemail/senddoc.cxx  |4 ++--
 shell/source/win32/simplemail/smplmailclient.cxx   |2 +-
 starmath/source/cursor.cxx |8 
 starmath/source/dialog.cxx |2 +-
 starmath/source/parse.cxx  |2 +-
 .../registry_tdprovider/rdbtdp_tdenumeration.cxx   |2 +-
 stoc/source/tdmanager/tdmgr.cxx|2 +-
 svx/source/fmcomp/gridctrl.cxx |2 +-
 sw/source/core/SwNumberTree/SwNumberTree.cxx   |2 +-
 sw/source/core/edit/edlingu.cxx|2 +-
 sw/source/core/table/swnewtable.cxx|2 +-
 sw/source/filter/ww8/wrtw8nds.cxx  |4 ++--
 sw/source/ui/wrtsh/navmgr.cxx  |2 +-
 ucb/source/ucp/tdoc/tdoc_storage.cxx   |2 +-
 ucb/source/ucp/webdav/ContentProperties.cxx|2 +-
 ucb/source/ucp/webdav/NeonHeadRequest.cxx  |2 +-
 ucb/source/ucp/webdav/NeonLockStore.cxx|2 +-
 ucb/source/ucp/webdav/NeonSession.cxx  |2 +-
 vcl/generic/print/glyphset.cxx |4 ++--
 vcl/source/gdi/pdfwriter_impl.cxx  |2 +-
 writerfilter/source/doctok/WW8DocumentImpl.cxx |2 +-
 .../source/ooxml/OOXMLFastContextHandler.cxx   |2 +-
 writerfilter/source/ooxml/OOXMLFastHelper.hxx  |6 +++---
 writerperfect/source/filter/OdgGenerator.cxx   |2 +-
 xmloff/source/core/RDFaImportHelper.cxx|2 +-
 xmloff/source/style/xmlnumfi.cxx   |4 ++--
 xmloff/source/text/txtparae.cxx|2 +-
 59 files changed, 78 insertions(+), 78 deletions(-)

diff --git a/autodoc/inc/ary/info/ci_text.hxx b/autodoc/inc/ary/info/ci_text.hxx
index 4e8bf7a..a178ff7 100644
--- a/autodoc/inc/ary/info/ci_text.hxx
+++ b/autodoc/inc/ary/info/ci_text.hxx
@@ -62,7 +62,7 @@ class DocuText
 { aTokens.push_back(let_drToken); }
 const TokenListTokens() const  { return aTokens; }
 boolIsNoHtml() const{ return NOT bUsesHtml; }
-boolIsEmpty() const { return aTokens.size() == 0; }
+boolIsEmpty() const { return aTokens.empty(); }
 
   private:
 TokenList   aTokens;
diff --git a/autodoc/source/display/idl/hfi_module.cxx b/autodoc/source/display/idl/hfi_module.cxx
index eb65a14..85be9cb 100644
--- a/autodoc/source/display/idl

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
I have a 'replacement' patch that actually replaces most of if...else if...else 
chains with
switches.
They are more legible and seem natural when choosing branches depending on the 
same variable.
The performance of a switch should  also be better, but turbo boost should not 
be expected ;).
Two 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
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


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 variable.

 On the other hand, the evaluated expression is not visible at the 
 first-look... A lot of
 people - a lot of opinions :)

 Question I have, is how do I submit the patch:
   - as a reply to this thread, or
   - a new patch in a new thread?

 I think, if a patch extends or replaces a current one - submit as a reply, 
 otherwise - start a
 new thread.

 Cheers,
 Ivan

Attached is the new patch that replaces and extends the previous one in this 
thread.
Regards,
Mariusz
From 66820932b045797e12bd49996fe5f60d5c4ef280 Mon Sep 17 00:00:00 2001
From: Mariusz Dykierek mariuszdykie...@gmail.com
Date: Sat, 18 Feb 2012 14:18:19 +0100
Subject: [PATCH] Replaced 'if-elseif-else' chains with 'switches' where they
 seem natural

---
 vcl/source/window/splitwin.cxx |  218 
 1 files changed, 109 insertions(+), 109 deletions(-)

diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx
index f5da206..dfe66d1 100644
--- a/vcl/source/window/splitwin.cxx
+++ b/vcl/source/window/splitwin.cxx
@@ -135,33 +135,32 @@ static void ImplCalcBorder( WindowAlign eAlign, sal_Bool bNoAlign,
 }
 else
 {
-if ( eAlign == WINDOWALIGN_TOP )
+switch ( eAlign )
 {
+case WINDOWALIGN_TOP:
 rLeft   = 2;
 rTop= 2;
 rRight  = 2;
 rBottom = 0;
-}
-else if ( eAlign == WINDOWALIGN_LEFT )
-{
+break;
+case WINDOWALIGN_LEFT:
 rLeft   = 2;
 rTop= 2;
 rRight  = 0;
 rBottom = 2;
-}
-else if ( eAlign == WINDOWALIGN_BOTTOM )
-{
+break;
+case WINDOWALIGN_BOTTOM:
 rLeft   = 2;
 rTop= 0;
 rRight  = 2;
 rBottom = 2;
-}
-else
-{
+break;
+default:
 rLeft   = 0;
 rTop= 2;
 rRight  = 2;
 rBottom = 2;
+break;
 }
 }
 }
@@ -183,8 +182,9 @@ void SplitWindow::ImplDrawBorder( SplitWindow* pWin )
 }
 else
 {
-if ( pWin-meAlign == WINDOWALIGN_BOTTOM )
+switch ( pWin-meAlign )
 {
+case WINDOWALIGN_BOTTOM:
 pWin-SetLineColor( rStyleSettings.GetShadowColor() );
 pWin-DrawLine( Point( 0, nDY-2 ), Point( nDX-1, nDY-2 ) );
 pWin-DrawLine( Point( 0, 0 ), Point( 0, nDY-1 ) );
@@ -194,9 +194,8 @@ void SplitWindow::ImplDrawBorder( SplitWindow* pWin )
 pWin-DrawLine( Point( 0, nDY-1 ), Point( nDX-1, nDY-1 ) );
 pWin-DrawLine( Point( 1, 1 ), Point( 1, nDY-3 ) );
 pWin-DrawLine( Point( nDX-1, 0 ), Point( nDX-1, nDY-1 ) );
-}
-else if ( pWin-meAlign == WINDOWALIGN_TOP )
-{
+break;
+case WINDOWALIGN_TOP:
 pWin-SetLineColor( rStyleSettings.GetShadowColor() );
 pWin-DrawLine( Point( 0, 0 ), Point( nDX-1, 0 ) );
 pWin-DrawLine( Point( 0, 0 ), Point( 0, nDY-1 ) );
@@ -206,9 +205,8 @@ void SplitWindow::ImplDrawBorder( SplitWindow* pWin )
 pWin-DrawLine( Point( 1, 1 ), Point( nDX-3, 1 ) );
 pWin-DrawLine( Point( 1, 1 ), Point( 1, nDY-1 ) );
 pWin-DrawLine( Point( nDX-1, 1 ), Point( nDX-1, nDY-1 ) );
-}
-else if ( pWin-meAlign == WINDOWALIGN_LEFT )
-{
+break;
+case WINDOWALIGN_LEFT:
 pWin-SetLineColor( rStyleSettings.GetShadowColor() );
 pWin-DrawLine( Point( 0, 0 ), Point( nDX-1, 0 ) );
 pWin-DrawLine( Point( 0, 0 ), Point( 0, nDY-1 ) );
@@ -218,9 +216,8 @@ void SplitWindow::ImplDrawBorder( SplitWindow* pWin )
 pWin-DrawLine( Point( 1, 1 ), Point( nDX-1, 1 ) );
 pWin-DrawLine( Point( 1, 1 ), Point( 1, nDY-3 ) );
 pWin-DrawLine( Point( 1, nDY-1 ), Point( nDX-1, nDY-1 ) );
-}
-else
-{
+break;
+default:
 pWin-SetLineColor( rStyleSettings.GetShadowColor() );
 pWin-DrawLine( Point( 0, 0 ), Point( nDX-2, 0 ) );
 pWin-DrawLine( Point( nDX-2, 0 ), Point( nDX-2, nDY-3 ) );
@@ -230,6 +227,7 @@ void SplitWindow::ImplDrawBorder( SplitWindow* pWin )
 pWin-DrawLine( Point( 0, 1 ), Point( nDX-3, 1 ) );
 pWin-DrawLine( Point( nDX-1, 0 ), Point( nDX-1, nDY-1 ) );
 pWin-DrawLine( Point( 0, nDY-1 ), Point( nDX-1, nDY-1 ) );
+break;
 }
 }
 }
@@ -244,33 +242,32 @@ void SplitWindow::ImplDrawBorderLine( SplitWindow* pWin )
 longnDX = pWin-mnDX;
 long

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 = !(meAlign == WINDOWALIGN_TOP || meAlign == WINDOWALIGN_LEFT);

 or

 bool bLeft = meAlign == WINDOWALIGN_RIGHT || meAlign == WINDOWALIGN_BOTTOM

 given that WindowAlign has exactly those four members (and it makes the name 
 bLeft look
 odd...).

I personally find 'if' more legible than ?: and definitely expressions like b = 
x==y || x==z;
I am not sure if WindowAlign will always have only these 4 members and possibly 
the author of
the original version wasn't either (thus final else).

Since I am a newbie here, I would vote for a simple 'if' or a 'switch'.
Let me know what is the decision and I will change the code accordingly or... 
feel free to
change the code and provide an alternative patch.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[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
+++ b/fpicker/source/win32/filepicker/asynceventnotifier.cxx
@@ -240,7 +240,7 @@ size_t SAL_CALL CAsyncEventNotifier::getEventListSize()
 void SAL_CALL CAsyncEventNotifier::resetNotifyEvent()
 {
 osl::MutexGuard aGuard(m_Mutex);
-if (0 == m_EventList.size())
+if ( m_EventList.empty() )
 ResetEvent(m_NotifyEvent);
 }
 
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[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 CFormatEtcContainer::hasFormatEtc( const CFormatEtc fetc ) const
 
 sal_Bool CFormatEtcContainer::hasElements( ) const
 {
-return ( m_FormatMap.size( )  0 );
+return !m_FormatMap.empty();
 }
 
 //
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[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 ByteSequence_t;
a double '\0' terminated string buffer */
 size_t CalcSizeForStringListBuffer(const FileList_t fileList)
 {
-if (fileList.size() == 0)
+if ( fileList.empty() )
 return 0;
 
 size_t size = 1; // one for the very final '\0'
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[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( aEvtObj );
 
 //! avoid creation of dictionaries if not already done
-if (aDicList.size()  0)
+if ( !aDicList.empty() )
 {
 DictionaryVec_t rDicList = GetOrCreateDicList();
 size_t nCount = rDicList.size();
@@ -720,7 +720,7 @@ void DicList::SaveDics()
 {
 // save dics only if they have already been used/created.
 //! don't create them just for the purpose of saving them !
-if (aDicList.size()  0)
+if ( !aDicList.empty() )
 {
 // save (modified) dictionaries
 DictionaryVec_t rDicList = GetOrCreateDicList();
diff --git a/linguistic/source/dlistimp.hxx b/linguistic/source/dlistimp.hxx
index 4eb9a1a..b4de818 100644
--- a/linguistic/source/dlistimp.hxx
+++ b/linguistic/source/dlistimp.hxx
@@ -89,7 +89,7 @@ class DicList :
 void_CreateDicList();
 DictionaryVec_tGetOrCreateDicList()
 {
-if (!bInCreation  aDicList.size() == 0)
+if ( !bInCreation  aDicList.empty() )
 _CreateDicList();
 return aDicList;
 }
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[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( sal_Bool bInPaint )
 Image   aImage;
 ImplGetFadeInRect( aTempRect );
 
-sal_Bool bLeft;
-if ( meAlign == WINDOWALIGN_TOP )
-bLeft   = sal_False;
-else if ( meAlign == WINDOWALIGN_BOTTOM )
-bLeft   = sal_True;
-else if ( meAlign == WINDOWALIGN_LEFT )
-bLeft   = sal_False;
-else if ( meAlign == WINDOWALIGN_RIGHT )
-bLeft   = sal_True;
-else
-bLeft   = sal_True;
+sal_Bool bLeft = sal_True;
+if ( ( meAlign == WINDOWALIGN_TOP ) || ( meAlign == WINDOWALIGN_LEFT ) )
+bLeft = sal_False;
 
 if ( !bInPaint )
 Erase( aTempRect );
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[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* map_uno2cli(uno_Interface * pUnoI, typelib_InterfaceTypeDescription* pTD) const;
 
-System::Object* Bridge::call_uno(uno_Interface * pUnoI,
+System::Object* call_uno(uno_Interface * pUnoI,
   typelib_TypeDescription* member_td,
   typelib_TypeDescriptionReference * return_type,
   sal_Int32 nParams, typelib_MethodParameter const * pParams,
diff --git a/extensions/test/ole/cpnt/cpnt.cxx b/extensions/test/ole/cpnt/cpnt.cxx
index 0435ced..b20795e 100644
--- a/extensions/test/ole/cpnt/cpnt.cxx
+++ b/extensions/test/ole/cpnt/cpnt.cxx
@@ -315,7 +315,7 @@ public: // XTestSequence
 class EventListener: public WeakImplHelper1XEventListener
 {
 public:
-EventListener::EventListener(): bCalled( sal_False)
+EventListener(): bCalled( sal_False)
 {}
 virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject Source ) throw (RuntimeException);
 
diff --git a/extensions/test/stm/datatest.cxx b/extensions/test/stm/datatest.cxx
index b084ac2..2bdc349 100644
--- a/extensions/test/stm/datatest.cxx
+++ b/extensions/test/stm/datatest.cxx
@@ -662,8 +662,8 @@ public:
 
 
 private:
-void OObjectStreamTest::testObject( const XObjectOutputStreamRef rOut,
-const XObjectInputStreamRef rIn );
+void testObject( const XObjectOutputStreamRef rOut,
+ const XObjectInputStreamRef rIn );
 
 private:
 };
diff --git a/io/test/stm/datatest.cxx b/io/test/stm/datatest.cxx
index 47b7769..4504403 100644
--- a/io/test/stm/datatest.cxx
+++ b/io/test/stm/datatest.cxx
@@ -668,8 +668,8 @@ public:
 
 
 private:
-void OObjectStreamTest::testObject( const Reference XObjectOutputStream  rOut,
-const Reference XObjectInputStream rIn );
+void testObject( const Reference XObjectOutputStream  rOut,
+ const Reference XObjectInputStream rIn );
 
 private:
 };
diff --git a/sfx2/source/doc/printhelper.cxx b/sfx2/source/doc/printhelper.cxx
index 9206d3a..33b33a6 100644
--- a/sfx2/source/doc/printhelper.cxx
+++ b/sfx2/source/doc/printhelper.cxx
@@ -511,7 +511,7 @@ class ImplUCBPrintWatcher : public ::osl::Thread
 
 // lock for further using of our member isn't neccessary - because
 // we truns alone by defenition. Nobody join for us nor use us ...
-ImplUCBPrintWatcher::moveAndDeleteTemp(m_pTempFile,m_sTargetURL);
+moveAndDeleteTemp(m_pTempFile,m_sTargetURL);
 
 // finishing of this run() method will call onTerminate() automaticly
 // kill this thread there!
diff --git a/writerperfect/source/filter/FontStyle.hxx b/writerperfect/source/filter/FontStyle.hxx
index 82efa74..a27c723 100644
--- a/writerperfect/source/filter/FontStyle.hxx
+++ b/writerperfect/source/filter/FontStyle.hxx
@@ -57,7 +57,7 @@ public:
 FontStyleManager() : mStyleHash() {}
 virtual ~FontStyleManager()
 {
-FontStyleManager::clean();
+clean();
 }
 
 /* create a new font if the font does not exists and returns a font name
diff --git a/writerperfect/source/filter/TextRunStyle.hxx b/writerperfect/source/filter/TextRunStyle.hxx
index 98fc6b4..0771912 100644
--- a/writerperfect/source/filter/TextRunStyle.hxx
+++ b/writerperfect/source/filter/TextRunStyle.hxx
@@ -76,7 +76,7 @@ public:
 ParagraphStyleManager() : mNameHash(), mStyleHash() {}
 virtual ~ParagraphStyleManager()
 {
-ParagraphStyleManager::clean();
+clean();
 }
 
 /* create a new style if it does not exists. In all case, returns the name of the style
@@ -107,7 +107,7 @@ public:
 SpanStyleManager() : mNameHash(), mStyleHash() {}
 virtual ~SpanStyleManager()
 {
-SpanStyleManager::clean();
+clean();
 }
 
 /* create a new style if it does not exists. In all case, returns the name of the style
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[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 SvxBorderLine rOtherLine ) const
 const sal_uInt16 nThisSize = GetOutWidth() + GetDistance() + GetInWidth();
 const sal_uInt16 nOtherSize = rOtherLine.GetOutWidth() + rOtherLine.GetDistance() + rOtherLine.GetInWidth();
 
-if (nThisSize  nOtherSize)
+if ( nThisSize  nOtherSize )
 {
 return true;
 }
-else if (nThisSize  nOtherSize)
+else if ( nThisSize  nOtherSize )
 {
 return false;
 }
-else
+else if ( rOtherLine.GetInWidth()  !GetInWidth() )
 {
-if ( rOtherLine.GetInWidth()  !GetInWidth() )
-{
-return true;
-}
-else if ( GetInWidth()  !rOtherLine.GetInWidth() )
-{
-return false;
-}
-else
-{
-return false;
-}
+return true;
 }
+
+return false;
 }
 
 } // namespace editeng
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[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?

-- 
Mariusz Dykerek

diff --git a/unusedcode.easy b/unusedcode.easy
index f3f518b..758f268 100644
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -1,52 +1,20 @@
-AtomDocument::AtomDocument(AtomPubSession*, std::basic_stringchar, std::char_traitschar, std::allocatorchar )
-AtomFolder::AtomFolder(AtomPubSession*, std::basic_stringchar, std::char_traitschar, std::allocatorchar )
-AtomPubSession::getCollectionUrl(Collection::Type)
 ByteString::Assign(char const*, unsigned short)
 ByteString::Assign(char)
 ByteString::ByteString(char const*, unsigned short)
 ByteString::SetToken(unsigned short, char, ByteString const, unsigned short)
-CIccCLUT::Interp3dTetra(float*, float const*)
 CIccCLUT::Iterate(IIccCLUTExec*)
 CIccFormulaCurveSegment::SetFunction(unsigned short, unsigned char, float*)
 CIccIO::ReadLine(void*, int)
-CIccInfo::GetSpotShapeName(icSpotShape)
 CIccMBB::Init(unsigned char, unsigned char)
-CIccMBB::NewCLUT(unsigned char*, unsigned char)
-CIccMBB::NewCLUT(unsigned char, unsigned char)
 CIccMemIO::Alloc(unsigned int, bool)
-CIccMpeCLUT::SetCLUT(CIccCLUT*)
-CIccMpeCreator::DoGetElementSigName(std::basic_stringchar, std::char_traitschar, std::allocatorchar , icElemTypeSignature)
-CIccMpeCurveSet::SetCurve(int, CIccCurveSetCurve*)
-CIccProfile::DeleteTag(unsigned int)
 CIccProfile::Detach()
-CIccProfile::GetSpaceSamples() const
-CIccProfileIdDesc::CIccProfileIdDesc(CIccProfile)
-CIccProfileIdDesc::CIccProfileIdDesc(icProfileID, CIccTagMultiLocalizedUnicode)
 CIccSegmentedCurve::Insert(CIccCurveSegment*)
 CIccTagCurve::SetGamma(float)
-CIccTagFixedNumint, (icTagTypeSignature)1936077618::GetSize() const
-CIccTagFixedNumunsigned int, (icTagTypeSignature)1969632050::GetSize() const
 CIccTagMultiLocalizedUnicode::SetText(unsigned short const*, unsigned short, unsigned short)
 CIccTagMultiProcessElement::GetElement(int)
-CIccTagNamedColor2::FindColor(char const*)
-CIccTagNamedColor2::FindDeviceColor(float*)
-CIccTagNamedColor2::FindPCSColor(float*, float)
-CIccTagNamedColor2::FindRootColor(char const*)
 CIccTagNamedColor2::GetColorName(std::basic_stringchar, std::char_traitschar, std::allocatorchar , int)
-CIccTagNamedColor2::Lab4ToLab2(float*, float const*)
-CIccTagNamedColor2::NegClip(float)
-CIccTagNumunsigned char, (icTagTypeSignature)1969827896::GetSize() const
-CIccTagNumunsigned int, (icTagTypeSignature)1969828658::GetSize() const
-CIccTagNumunsigned long, (icTagTypeSignature)1969829428::GetSize() const
-CIccTagNumunsigned short, (icTagTypeSignature)1969828150::GetSize() const
-CIccTagProfileSequenceId::AddProfileDescription(CIccProfileIdDesc const)
 CIccTagProfileSequenceId::GetFirst()
 CIccTagProfileSequenceId::GetLast()
-CIccTagProfileSequenceId::ParseMem(unsigned char*, unsigned int)
-CIccTagResponseCurveSet16::GetFirstCurves()
-CIccTagResponseCurveSet16::GetNextCurves()
-CIccTagResponseCurveSet16::NewResponseCurves(icMeasurementUnitSig)
-CIccTagResponseCurveSet16::SetNumChannels(unsigned short)
 CalendarWrapper::setFirstDayOfWeek(short)
 CalendarWrapper::setMinimumNumberOfDaysForFirstWeek(short)
 CertificateContainer::impl_createFactory(com::sun::star::uno::Referencecom::sun::star::lang::XMultiServiceFactory const)
@@ -130,8 +98,6 @@ MSFilterTracer::SetProperty(rtl::OUString const, com::sun::star::uno::Any const
 MSFilterTracer::StartElement(rtl::OUString const, com::sun::star::uno::Referencecom::sun::star::xml::sax::XAttributeList)
 MachineSettings::CopyData()
 MailDispatcher::removeListener(rtl::ReferenceIMailDispatcherListener)
-Matrix3d::Inverse() const
-Matrix3d::Matrix3d()
 MenuBar::MenuBar(ResId const)
 MergeData::~MergeData()
 MergeDataFile::Dump()
@@ -254,7 +220,6 @@ ScLeftHeaderEditPage::GetRanges()
 ScMyCellInfo::ScMyCellInfo()
 ScMyStyleRanges::SetStylesToRanges(ScRangeList*, rtl::OUString const*, short, rtl::OUString const*, ScXMLImport)
 ScMyStyleRanges::SetStylesToRanges(ScRangeListRef, rtl::OUString const*, short, rtl::OUString const*, ScXMLImport)
-ScNameDefDlg::LinkStubEdModifyHdl(void*, void*)
 ScNamedRangeObj::SetContentWithGrammar(rtl::OUString const, formula::FormulaGrammar::Grammar)
 ScNamedRangeObj::getImplementation(com::sun::star::uno::Referencecom::sun::star::uno::XInterface)
 ScOutputData::DrawEditParam::getEngineWidth(ScFieldEditEngine*) const
@@ -360,7 +325,6 @@ SfxOleString16Property::SfxOleString16Property(int, String const)
 SfxOrganizeDlg_Impl::OkHdl(Button*)
 SfxPartChildWnd_Impl::GetChildWindowId()
 SfxPasswordDialog::SetMaxLen(unsigned short)
-SfxPopupWindow::LinkStubDelete(void*, void*)
 SfxPopupWindow::RemoveStatusListener(rtl::OUString const)
 SfxProgress::Lock()
 SfxRangeItem::SfxRangeItem(unsigned short, SvStream)
@@ -485,15 +449,8 @@ 

[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,
Mariusz Dykerek

diff --git a/svtools/inc/svtools/ctrlbox.hxx b/svtools/inc/svtools/ctrlbox.hxx
index 5815719..a4d9eff 100644
--- a/svtools/inc/svtools/ctrlbox.hxx
+++ b/svtools/inc/svtools/ctrlbox.hxx
@@ -352,16 +352,10 @@ public:
 
 using ListBox::GetEntryPos;
 virtual sal_uInt16  GetEntryPos( sal_uInt16 nStyle = STYLE_SOLID ) const;
-longGetEntryLine1( sal_uInt16 nPos ) const;
-longGetEntryLine2( sal_uInt16 nPos ) const;
-longGetEntryDistance( sal_uInt16 nPos ) const;
 sal_uInt16  GetEntryStyle( sal_uInt16 nPos ) const;
 
 voidSelectEntry( const XubString rStr, sal_Bool bSelect = sal_True ) { ListBox::SelectEntry( rStr, bSelect ); }
 voidSelectEntry( sal_uInt16 nStyle = STYLE_SOLID, sal_Bool bSelect = sal_True );
-longGetSelectEntryLine1( sal_uInt16 nSelIndex = 0 ) const;
-longGetSelectEntryLine2( sal_uInt16 nSelIndex = 0 ) const;
-longGetSelectEntryDistance( sal_uInt16 nSelIndex = 0 ) const;
 sal_uInt16  GetSelectEntryStyle( sal_uInt16 nSelIndex = 0 ) const;
 inline sal_Bool IsEntrySelected( const XubString rStr ) const { return ListBox::IsEntrySelected( rStr ); }
 sal_BoolIsEntrySelected( sal_uInt16 nStyle1 = STYLE_SOLID ) const;
@@ -389,33 +383,6 @@ private:
 void*   GetEntryData( sal_uInt16 nPos ) const;
 };
 
-inline long LineListBox::GetSelectEntryLine1( sal_uInt16 nSelIndex ) const
-{
-sal_uInt16 nPos = GetSelectEntryPos( nSelIndex );
-if ( nPos != LISTBOX_ENTRY_NOTFOUND )
-return GetEntryLine1( nPos );
-else
-return 0;
-}
-
-inline long LineListBox::GetSelectEntryLine2( sal_uInt16 nSelIndex ) const
-{
-sal_uInt16 nPos = GetSelectEntryPos( nSelIndex );
-if ( nPos != LISTBOX_ENTRY_NOTFOUND )
-return GetEntryLine2( nPos );
-else
-return 0;
-}
-
-inline long LineListBox::GetSelectEntryDistance( sal_uInt16 nSelIndex ) const
-{
-sal_uInt16 nPos = GetSelectEntryPos( nSelIndex );
-if ( nPos != LISTBOX_ENTRY_NOTFOUND )
-return GetEntryDistance( nPos );
-else
-return 0;
-}
-
 inline sal_Bool LineListBox::IsEntrySelected( sal_uInt16 nStyle ) const
 {
 sal_uInt16 nPos = GetEntryPos( nStyle );
diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx
index d4959ec..ce72cdc 100644
--- a/svtools/source/control/ctrlbox.cxx
+++ b/svtools/source/control/ctrlbox.cxx
@@ -851,30 +851,6 @@ sal_uInt16 LineListBox::GetEntryPos( sal_uInt16 nStyle ) const
 
 // ---
 
-long LineListBox::GetEntryLine1( sal_uInt16 nPos ) const
-{
-ImpLineListData* pData = (nPos  pLineList-size()) ? (*pLineList)[ nPos ] : NULL;
-return ( pData ) ? pData-GetLine1ForWidth( m_nWidth ) : 0;
-}
-
-// ---
-
-long LineListBox::GetEntryLine2( sal_uInt16 nPos ) const
-{
-ImpLineListData* pData = (nPos  pLineList-size()) ? (*pLineList)[ nPos ] : NULL;
-return ( pData ) ? pData-GetLine2ForWidth( m_nWidth ) : 0;
-}
-
-// ---
-
-long LineListBox::GetEntryDistance( sal_uInt16 nPos ) const
-{
-ImpLineListData* pData = (nPos  pLineList-size()) ? (*pLineList)[ nPos ] : NULL;
-return ( pData ) ? pData-GetDistForWidth( m_nWidth ) : 0;
-}
-
-// ---
-
 sal_uInt16 LineListBox::GetEntryStyle( sal_uInt16 nPos ) const
 {
 ImpLineListData* pData = (nPos  pLineList-size()) ? (*pLineList)[ nPos ] : NULL;
diff --git a/unusedcode.easy b/unusedcode.easy
index f613cb4..b427d5b 100644
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -80,9 +80,6 @@ InsCapOptArr::Remove(InsCaptionOpt* const, unsigned short)
 InsCapOptArr::Remove(unsigned short, unsigned short)
 ItemList::FindAttrib(unsigned short)
 KeyboardSettings::CopyData()
-LineListBox::GetEntryDistance(unsigned short) const
-LineListBox::GetEntryLine1(unsigned short) const
-LineListBox::GetEntryLine2(unsigned short) const
 LinkStructArr::DeleteAndDestroy(unsigned short, unsigned short)
 LngSvcMgr::RemoveLngSvcEvtBroadcaster(com::sun::star::uno::Referencecom::sun::star::linguistic2::XLinguServiceEventBroadcaster const)
 LocaleDataWrapper::getCollatorImplementations() const
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[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
@@ -260,10 +260,6 @@ public:
 /// Symbols and language identical
 booloperator==( const NfCurrencyEntry r ) const;
 
-/** Apply format information (nPositiveFormat,
- nNegativeFormat, nDigits, cZeroChar) of another format. */
-voidApplyVariableInformation( const NfCurrencyEntry );
-
 const String   GetSymbol() const   { return aSymbol; }
 const String   GetBankSymbol() const   { return aBankSymbol; }
 LanguageTypeGetLanguage() const { return eLanguage; }
diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index eecd743..1f5085d 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -3852,14 +3852,6 @@ bool NfCurrencyEntry::operator==( const NfCurrencyEntry r ) const
 ;
 }
 
-void NfCurrencyEntry::ApplyVariableInformation( const NfCurrencyEntry r )
-{
-nPositiveFormat = r.nPositiveFormat;
-nNegativeFormat = r.nNegativeFormat;
-cZeroChar   = r.cZeroChar;
-}
-
-
 void NfCurrencyEntry::BuildSymbolString( String rStr, bool bBank,
 bool bWithoutExtension ) const
 {
diff --git a/unusedcode.easy b/unusedcode.easy
index b427d5b..4c9c46d7 100644
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -113,7 +113,6 @@ MultiLineEdit::IsFocusSelectionHideEnabled() const
 MultiSelection::Append(long)
 MultiSelection::PrevSelected()
 NativeNumberWrapper::isValidNatNum(com::sun::star::lang::Locale const, short) const
-NfCurrencyEntry::ApplyVariableInformation(NfCurrencyEntry const)
 NfCurrencyEntry::NfCurrencyEntry()
 NotificationSettings::CopyData()
 NumberFormatCodeWrapper::getDefault(short, short) const
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[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
--- a/sdext/source/presenter/PresenterTimer.cxx
+++ b/sdext/source/presenter/PresenterTimer.cxx
@@ -511,7 +511,7 @@ void PresenterClockTimer::CheckCurrentTime (const TimeValue rCurrentTime)
 {
 if (aDateTime.Seconds != maDateTime.Seconds
 || aDateTime.Minutes != maDateTime.Minutes
-|| aDateTime.Seconds != maDateTime.Seconds)
+|| aDateTime.Hours != maDateTime.Hours)
 {
 // The displayed part of the current time has changed.
 // Prepare to call the listeners.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[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 Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab)
 sal_uInt16 nValue1;
 Sc10ColData *pColData;
 
-// Font (Name, Groesse)
+// Font (Name, Size)
 nStart = 0;
 nEnd = 0;
 nLimit = aFont.Count;
@@ -1739,7 +1739,7 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab)
 nStart = nEnd + 1;
 }
 
-// Fontfarbe
+// Font color
 nStart = 0;
 nEnd = 0;
 nLimit = aColor.Count;
@@ -1758,7 +1758,7 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab)
 nStart = nEnd + 1;
 }
 
-// Fontattribute (Fett, Kursiv...)
+// Font attributes (Bold, Italic...)
 nStart = 0;
 nEnd = 0;
 nLimit = aAttr.Count;
@@ -1783,7 +1783,7 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab)
 nStart = nEnd + 1;
 }
 
-// Zellausrichtung
+// Cell alignment
 nStart = 0;
 nEnd = 0;
 nLimit = aJustify.Count;
@@ -1834,15 +1834,15 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab)
 aScPattern.GetItemSet().Put(SfxInt32Item(ATTR_ROTATE_VALUE,27000));
 
 sal_Int16 Margin = Max((sal_uInt16)20, (sal_uInt16)(EJustify * 20));
-if (((OJustify  ojBottomTop) == ojBottomTop) || ((OJustify  ojBottomTop) == ojBottomTop))
+if ( (OJustify  ojBottomTop) == ojBottomTop )
 aScPattern.GetItemSet().Put(SvxMarginItem(20, Margin, 20, Margin, ATTR_MARGIN));
 else
 aScPattern.GetItemSet().Put(SvxMarginItem(Margin, 20, Margin, 20, ATTR_MARGIN));
 pDoc-ApplyPatternAreaTab(Col, nStart, Col, nEnd, Tab, aScPattern);
 }
-nStart = nEnd + 1;
+nStart = nEnd + 1;
 }
-// Umrandung
+// Border
 sal_BoolbEnd = false;
 sal_uInt16  nColorIndex = 0;
 sal_uInt16  nFrameIndex = 0;
@@ -1966,9 +1966,9 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab)
 pColData++;
 }
 
-// ACHTUNG: Code bis hier ueberarbeitet ... jetzt hab' ich keinen Bock mehr! (GT)
+// ATTENTION: Code up to here works more or less ... from here I've had enough ! (GT)
 
-// Hintergrund (Farbe, Raster)
+// Background (Color, Raster)
 sal_uInt16  nRasterIndex = 0;
 bEnd= false;
 nColorIndex = 0;
@@ -2056,7 +2056,7 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab)
 nHelpMe--;
 }
 
-// Zahlenformate
+// Number format
 nStart = 0;
 nEnd = 0;
 nLimit = aValue.Count;
@@ -2078,7 +2078,7 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab)
 nStart = nEnd + 1;
 }
 
-// Zellattribute (Schutz, Versteckt...)
+// Cell attributes (Protected, hidden...)
 nStart = 0;
 nEnd = 0;
 for (i=0; iaFlag.Count; i++)
@@ -2097,7 +2097,7 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab)
 nStart = nEnd + 1;
 }
 
-// ZellVorlagen
+// Cell style
 nStart = 0;
 nEnd = 0;
 ScStyleSheetPool* pStylePool = pDoc-GetStyleSheetPool();
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[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
+++ b/svtools/source/misc/filechangedchecker.cxx
@@ -83,7 +83,7 @@ bool FileChangedChecker::hasFileChanged()
 // Check if the seconds time stamp has any difference
 // If so, then our file has changed meanwhile
 if( newTime.Seconds != mLastModTime.Seconds ||
-newTime.Seconds != mLastModTime.Seconds )
+newTime.Minutes != mLastModTime.Minutes )
 {
 // Since the file has changed, set the new status as the file status and
 // return True
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[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
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[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 )
+### AtomDocument::AtomDocument(AtomPubSession*, std::basic_stringchar, std::char_traitschar, std::allocatorchar )
 AtomFolder::AtomFolder(AtomPubSession*, std::basic_stringchar, std::char_traitschar, std::allocatorchar )
 AtomPubSession::getCollectionUrl(Collection::Type)
 ByteString::Assign(char const*, unsigned short)
@@ -15,7 +15,7 @@ CIccMBB::NewCLUT(unsigned char*, unsigned char)
 CIccMBB::NewCLUT(unsigned char, unsigned char)
 CIccMemIO::Alloc(unsigned int, bool)
 CIccMpeCLUT::SetCLUT(CIccCLUT*)
-CIccMpeCreator::DoGetElementSigName(std::basic_stringchar, std::char_traitschar, std::allocatorchar , icElemTypeSignature)
+### CIccMpeCreator::DoGetElementSigName(std::basic_stringchar, std::char_traitschar, std::allocatorchar , icElemTypeSignature)
 CIccMpeCurveSet::SetCurve(int, CIccCurveSetCurve*)
 CIccProfile::DeleteTag(unsigned int)
 CIccProfile::Detach()
diff --git a/vcl/inc/vcl/window.hxx b/vcl/inc/vcl/window.hxx
index 3354499..a2a139a 100644
--- a/vcl/inc/vcl/window.hxx
+++ b/vcl/inc/vcl/window.hxx
@@ -1029,20 +1029,17 @@ public:
 /// request XSpriteCanvas render interface for this window
 ::com::sun::star::uno::Reference
 ::com::sun::star::rendering::XSpriteCanvas  GetSpriteCanvas() const;
-/// request fullscreen XSpriteCanvas render interface for this window
-::com::sun::star::uno::Reference
-::com::sun::star::rendering::XSpriteCanvas  GetFullscreenSpriteCanvas( const Size rFullscreenSize ) const;
 
 /*  records all DrawText operations within the passed rectangle;
  *  a synchronous paint is sent to achieve this
  */
 voidRecordLayoutData( vcl::ControlLayoutData* pLayout, const Rectangle rRect );
 
-// Setzen und Abfragen fuer das Toolkit
+// Set and query for the toolkit
 VCLXWindow* GetWindowPeer() const;
 voidSetWindowPeer( ::com::sun::star::uno::Reference ::com::sun::star::awt::XWindowPeer  xPeer, VCLXWindow* pVCLXWindow );
 
-// Merken, ob vom Toolkit erzeugt
+// Mark and check if created with Toolkit
 sal_BoolIsCreatedWithToolkit() const;
 voidSetCreatedWithToolkit( sal_Bool b );
 
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 54ac8b2..06f1efc 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -9441,13 +9441,6 @@ uno::Reference rendering::XSpriteCanvas  Window::GetSpriteCanvas() const
 return xSpriteCanvas;
 }
 
-uno::Reference ::com::sun::star::rendering::XSpriteCanvas  Window::GetFullscreenSpriteCanvas( const Size rFullscreenSize ) const
-{
-uno::Reference rendering::XSpriteCanvas  xSpriteCanvas(
-ImplGetCanvas( rFullscreenSize, true, true ), uno::UNO_QUERY );
-return xSpriteCanvas;
-}
-
 void Window::ImplPaintToDevice( OutputDevice* i_pTargetOutDev, const Point i_rPos )
 {
 sal_Bool bRVisible = mpWindowImpl-mbReallyVisible;
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[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  voidDelete(){ delete this; }
 inline  StackVarGetType() const { return eType; }
 boolIsFunction() const; // pure functions, no operators
-boolIsMatrixFunction() const;   // if a function _always_ returns a Matrix
 boolIsExternalRef() const;
 sal_uInt8   GetParamCount() const;
 inline  voidIncRef() const  { nRefCnt++; }
diff --git a/formula/source/core/api/token.cxx b/formula/source/core/api/token.cxx
index d0e8bb8..8052ee4 100644
--- a/formula/source/core/api/token.cxx
+++ b/formula/source/core/api/token.cxx
@@ -125,12 +125,6 @@ sal_uInt8 FormulaToken::GetParamCount() const
 // if so then it should be in cByte
 }
 
-
-bool FormulaToken::IsMatrixFunction() const
-{
-return formula::FormulaCompiler::IsMatrixFunction(GetOpCode());
-}
-
 bool FormulaToken::IsExternalRef() const
 {
 bool bRet = false;
diff --git a/unusedcode.easy b/unusedcode.easy
index b906bb9..3ef5bd9 100644
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -1576,7 +1576,6 @@ formula::FormulaDlg_Impl::EditFuncParas(unsigned short)
 formula::FormulaDlg_Impl::UpdateFunctionDesc()
 formula::FormulaListBox::FormulaListBox(Window*, long)
 formula::FormulaSubroutineToken::GetTokenArray() const
-formula::FormulaToken::IsMatrixFunction() const
 formula::FormulaTokenArray::AddName(unsigned short)
 formula::FormulaTokenArray::GetNextDBArea()
 formula::FormulaTokenIterator::First()
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[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 FormatterBase::GetFieldSettings() const
 
 // ---
 
-void FormatterBase::SetFieldText( const XubString rText, sal_Bool bKeepSelection )
-{
-if ( mpField )
-{
-Selection aNewSelection( 0x, 0x );
-if ( bKeepSelection )
-aNewSelection = mpField-GetSelection();
-
-ImplSetText( rText, aNewSelection );
-}
-}
-
-// ---
-
 void FormatterBase::ImplSetText( const XubString rText, Selection* pNewSelection )
 {
 if ( mpField )
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice