[Libreoffice] Fwd: Extensions code cleanup with patch

2010-11-25 Thread Roth Robert
-- Forwarded message --
From: Roth Robert robert.roth@gmail.com
Date: Thu, Nov 25, 2010 at 9:27 PM
Subject: Extensions code cleanup
To: libreoffice@lists.freedesktop.org


Some more dead code and bogus comments removed from extensions. The license,
as always is LGPLv3+ / MPL.
From 550313e5020f855fd1a733f8ac9aed269bd00de3 Mon Sep 17 00:00:00 2001
From: Robert Roth robert.roth@gmail.com
Date: Thu, 25 Nov 2010 21:22:04 +0200
Subject: [PATCH] Some more dead code removed from the extensions.

---
 extensions/source/bibliography/datman.cxx|   30 --
 extensions/source/bibliography/toolbar.cxx   |7 +
 extensions/source/bibliography/toolbar.hxx   |1 -
 extensions/source/dbpilots/controlwizard.cxx |   25 --
 extensions/source/dbpilots/groupboxwiz.cxx   |6 
 extensions/source/ole/ole2uno.cxx|   16 ---
 extensions/source/ole/unoconversionutilities.hxx |7 -
 extensions/source/ole/unotypewrapper.hxx |2 +-
 extensions/source/oooimprovement/invite_job.cxx  |9 --
 extensions/source/propctrlr/browserview.hxx  |2 -
 extensions/source/propctrlr/taborder.cxx |2 -
 extensions/source/scanner/sane.cxx   |1 -
 extensions/source/scanner/scanwin.cxx|   14 +-
 extensions/source/svg/svgwriter.cxx  |4 ---
 14 files changed, 9 insertions(+), 117 deletions(-)

diff --git a/extensions/source/bibliography/datman.cxx b/extensions/source/bibliography/datman.cxx
index 85fb0f9..3ad77ed 100644
--- a/extensions/source/bibliography/datman.cxx
+++ b/extensions/source/bibliography/datman.cxx
@@ -134,19 +134,12 @@ Reference XConnection  getConnection(const ::rtl::OUString _rURL)
 ::rtl::OUString sUser, sPwd;
 Reference XPropertySet   xDataSourceProps(xDataSource, UNO_QUERY);
 Reference XCompletedConnection  xComplConn(xDataSource, UNO_QUERY);
-/*		Reference XPropertySetInfo   xInfo = xDataSourceProps.is() ? xDataSourceProps-getPropertySetInfo() : Reference XPropertySetInfo  ();
-if (xInfo.is()  xInfo-hasPropertyByName(C2U(User)))
-xDataSourceProps-getPropertyValue(C2U(User)) = sUser;
-if (xInfo.is()  xInfo-hasPropertyByName(C2U(Password)))
-xDataSourceProps-getPropertyValue(C2U(Password))= sPwd;
-*/
 try
 {
 
 ReferenceXInterface xHdl = xMgr-createInstance(C2U(com.sun.star.task.InteractionHandler));
 Referencetask::XInteractionHandler xIHdl(xHdl, UNO_QUERY);
 xConn = xComplConn-connectWithCompletion(xIHdl);
-//			xConn = xDataSource-getConnection(sUser, sPwd);
 }
 catch(SQLException)
 {
@@ -582,7 +575,6 @@ class DBChangeDialog_Impl : public ModalDialog
 
 BibDataManager* pDatMan;
 
-//	DECL_LINK(EndDragHdl, HeaderBar*);
 DECL_LINK(DoubleClickHdl, SvTabListBox*);
 public:
 DBChangeDialog_Impl(Window* pParent, BibDataManager* pMan );
@@ -651,16 +643,6 @@ IMPL_LINK(DBChangeDialog_Impl, DoubleClickHdl, SvTabListBox*, /*pLB*/)
 return 0;
 }
 
-/*IMPL_LINK(DBChangeDialog_Impl, EndDragHdl, HeaderBar*, pHB)
-{
-long nTabs[3];
-nTabs[0] = 2;// Number of Tabs
-nTabs[1] = 0;
-nTabs[2] = pHB-GetItemSize( 1 );
-aSelectionLB.SetTabs( nTabs[0], MAP_PIXEL );
-return 0;
-};*/
-
 DBChangeDialog_Impl::~DBChangeDialog_Impl()
 {
 }
@@ -676,7 +658,6 @@ String	DBChangeDialog_Impl::GetCurrentURL()const
 return sRet;
 }
 
-// #100312# 
 // XDispatchProvider
 BibInterceptorHelper::BibInterceptorHelper( ::bib::BibBeamer* pBibBeamer, ::com::sun::star::uno::Reference ::com::sun::star::frame::XDispatch  xDispatch)
 {
@@ -762,7 +743,6 @@ void SAL_CALL BibInterceptorHelper::setMasterDispatchProvider( const ::com::sun:
 
 BibDataManager::BibDataManager()
 :BibDataManager_Base( GetMutex() )
-// #100312# --
 ,m_pInterceptorHelper( NULL )
 ,m_aLoadListeners(m_aMutex)
 ,pBibView( NULL )
@@ -791,7 +771,6 @@ BibDataManager::~BibDataManager()
 xConnection-dispose();
 m_xForm = NULL;
 }
-// #100312# 
 if( m_pInterceptorHelper )
 {
 m_pInterceptorHelper-ReleaseInterceptor();
@@ -910,9 +889,6 @@ Reference awt::XControlModel 	BibDataManager::updateGridModel(const Reference
 m_xGridModel = createGridModel( gGridName );
 
 Reference XNameContainer   xNameCont(xDbForm, UNO_QUERY);
-//			if (xNameCont-hasByName(sName))
-//xNameCont-removeByName(sName);
-//
 xNameCont-insertByName( sName, makeAny( m_xGridModel ) );
 }
 
@@ -1513,7 +1489,6 @@ Reference awt::XControlModel 	BibDataManager::loadControlModel(
 // (as an anologon to the XStatusListener semantics).
 //
 // But this would be way too risky for this last-day fix here.
-// 97140 - 

Re: [Libreoffice] Fwd: Extensions code cleanup with patch

2010-11-25 Thread David Tardon
On Thu, Nov 25, 2010 at 10:15:52PM +0200, Roth Robert wrote:
 -- Forwarded message --
 From: Roth Robert robert.roth@gmail.com
 Date: Thu, Nov 25, 2010 at 9:27 PM
 Subject: Extensions code cleanup
 To: libreoffice@lists.freedesktop.org
 
 
 Some more dead code and bogus comments removed from extensions. The license,
 as always is LGPLv3+ / MPL.

 --- a/extensions/source/ole/unotypewrapper.hxx
 +++ b/extensions/source/ole/unotypewrapper.hxx
 @@ -36,7 +36,7 @@
  #define _WIN32_WINNT 0x0403
  #define _WIN32_DCOM
  #if OSL_DEBUG_LEVEL  0
 -//#define _ATL_DEBUG_INTERFACES
 +
  #endif
  #include atlbase.h
  extern CComModule _Module;

I've done

-#if OSL_DEBUG_LEVEL  0
-//#define _ATL_DEBUG_INTERFACES
+#if OSL_DEBUG_LEVEL  2
+#define _ATL_DEBUG_INTERFACES

instead. No reason the debugging shouldn't be available when someone
needs it.

D.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice