Re: [Libreoffice] warnig and coding, need a little help on C++

2010-11-25 Thread Pierre-André Jacquod
Thanks for helping.

> Heh, this also confuses cppcheck as well. 
cough... cough... ! I am not smarter than a machine... ! A professor I
had told: this not a good point being too smart... I understand what he
meant.

For stepping in, not the easiest way. Once there is no waring any more
when compiling, let start hacking to remove the overloaded operator and
replace it through more instinctive function call ::--)) 


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


Re: [Libreoffice] [PATCH 3/9] warnings in binfilters sc_interpr4.cxx

2010-11-25 Thread Pierre-André Jacquod
> Quick question wouldn't it be better to have the comments in English
> instead of German?
Sorry, !! I translate then when I can, but I did not the job to the
end for this one.
Not_appropriate_handling_for_me++
regards
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice] [PATCH 9/9] binfilter sw3io warning fixes

2010-11-25 Thread Pierre-André Jacquod
regards

>From d8ca0db19fdc508ebc0bf0ee42107fdea2f498b1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pierre-Andr=C3=A9=20Jacquod?= 
Date: Thu, 25 Nov 2010 21:10:27 +0100
Subject: [PATCH 9/9] binfilter sw3io  warning fixes

use of not initialized variables
---
 binfilter/bf_sw/source/core/sw3io/sw_sw3fmts.cxx |   20 ++--
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/binfilter/bf_sw/source/core/sw3io/sw_sw3fmts.cxx b/binfilter/bf_sw/source/core/sw3io/sw_sw3fmts.cxx
index 16c641a..3606f9b 100644
--- a/binfilter/bf_sw/source/core/sw3io/sw_sw3fmts.cxx
+++ b/binfilter/bf_sw/source/core/sw3io/sw_sw3fmts.cxx
@@ -310,7 +310,7 @@ sal_Bool lcl_sw3io_insFtn( const SwTxtNode *pTxtNd )
 /*N*/ 	if( rSet.Count() )
 /*N*/ 	{
 /*N*/ 		// Beim 3.1 Export den aktuellen Attrset merken
-/*N*/ 		const SfxItemSet *pOldExportItemSet;
+/*N*/ 		const SfxItemSet *pOldExportItemSet = NULL;
 /*N*/ 		if( pExportInfo )
 /*N*/ 		{
 /*N*/ 			pOldExportItemSet = pExportInfo->pItemSet;
@@ -938,21 +938,21 @@ sal_Bool lcl_sw3io_insFtn( const SwTxtNode *pTxtNd )
 /*N*/ 	if( bWriteName )
 /*N*/ 		OutString( *pStrm, rFmt.GetName() );
 /*N*/ 
-/*N*/ 	BOOL bOldExportFlyFrmFmt;
-/*N*/ 	const SwFlyFrm* pOldExportFlyFrm;
 /*N*/ 	if( pExportInfo )
 /*N*/ 	{
-/*N*/ 		bOldExportFlyFrmFmt = pExportInfo->bFlyFrmFmt;
-/*N*/ 		pOldExportFlyFrm = pExportInfo->pFlyFrm;
+/*N*/ 		BOOL bOldExportFlyFrmFmt = pExportInfo->bFlyFrmFmt;
+/*N*/ 		const SwFlyFrm* pOldExportFlyFrm = pExportInfo->pFlyFrm;
 /*N*/ 		pExportInfo->bFlyFrmFmt = (cType == SWG_FLYFMT);
 /*N*/ 		pExportInfo->pFlyFrm = pExportFlyFrm;
-/*N*/ 	}
-/*N*/ 	OutAttrSet( rFmt.GetAttrSet(), SWG_SECTFMT == cType );
-/*N*/ 	if( pExportInfo )
-/*N*/ 	{
+OutAttrSet( rFmt.GetAttrSet(), SWG_SECTFMT == cType );
 /*N*/ 		pExportInfo->bFlyFrmFmt = bOldExportFlyFrmFmt;
 /*N*/ 		pExportInfo->pFlyFrm = pOldExportFlyFrm;
+
 /*N*/ 	}
+else
+{
+/*N*/ 	OutAttrSet( rFmt.GetAttrSet(), SWG_SECTFMT == cType );
+}
 /*N*/ 	CloseRec( cType );
 /*N*/ 	if( cType != SWG_FREEFMT && cType != SWG_SECTFMT )
 /*N*/ 		((SwFmt&)rFmt).SetWritten();
@@ -1103,7 +1103,7 @@ sal_Bool lcl_sw3io_insFtn( const SwTxtNode *pTxtNd )
 
 extern BOOL TstFlyRange( const SwPaM* pPam, const SwIndex& rFlyPos );
 
-/*N*/ void Sw3IoImp::CollectFlyFrms( const SwPaM* pPaM )
+/*N*/ void Sw3IoImp::CollectFlyFrms( const SwPaM* /*pPaM*/ )
 /*N*/ {
 /*N*/ 	if( !pFlyFrms )
 /*N*/ 	{
-- 
1.7.1

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


[Libreoffice] [PATCH 8/9] waring cleaning in binfilter sw3io

2010-11-25 Thread Pierre-André Jacquod
regards

>From a3757de1170fca97638be7e455b6602b9de228e1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pierre-Andr=C3=A9=20Jacquod?= 
Date: Thu, 25 Nov 2010 20:57:45 +0100
Subject: [PATCH 8/9] waring cleaning in binfilter sw3io

code removed due to compiler warning: (for both if, that is not an error)
sw_sw3fmts.cxx:255:41: warning: comparison is always false due to limited range of data type
---
 binfilter/bf_sw/source/core/sw3io/sw_sw3fmts.cxx |4 
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/binfilter/bf_sw/source/core/sw3io/sw_sw3fmts.cxx b/binfilter/bf_sw/source/core/sw3io/sw_sw3fmts.cxx
index a61a027..16c641a 100644
--- a/binfilter/bf_sw/source/core/sw3io/sw_sw3fmts.cxx
+++ b/binfilter/bf_sw/source/core/sw3io/sw_sw3fmts.cxx
@@ -252,10 +252,6 @@ sal_Bool lcl_sw3io_insFtn( const SwTxtNode *pTxtNd )
 /*N*/ 
 /*N*/ 	// Hints that start behind the maximum string length of version 5.2
 /*N*/ 	// don't have to be exported.
-/*N*/ 	if( nBgn != STRING_LEN && nBgn > STRING_MAXLEN52 )
-/*N*/ 		return;
-/*N*/ 	if( nEnd != STRING_LEN && nEnd > STRING_MAXLEN52 )
-/*N*/ 		nEnd = STRING_MAXLEN52;
 /*N*/ 
 /*N*/ 	if( nWhich != RES_TXTATR_FTN || nFlyLevel == 0 )
 /*N*/ 	{
-- 
1.7.1

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


Re: [Libreoffice] [PATCH 3/9] warnings in binfilters sc_interpr4.cxx

2010-11-25 Thread Jonathan Aquilina
Quick question wouldn't it be better to have the comments in English 
instead of German?

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


[Libreoffice] [PATCH 7/9] warnings removal in binfilter sw_sw3redln.cxx

2010-11-25 Thread Pierre-André Jacquod
regards
>From 13a33d71df128454159d0e911f55179cddac2d72 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pierre-Andr=C3=A9=20Jacquod?= 
Date: Thu, 25 Nov 2010 20:52:47 +0100
Subject: [PATCH 7/9] warnings removal in binfilter sw_sw3redln.cxx

all code deletion due to compiler warning with message:

sw_sw3redln.cxx:255:25:
warning: comparison is always false due to limited range of data type
---
 binfilter/bf_sw/source/core/sw3io/sw_sw3redln.cxx |   21 ++---
 1 files changed, 2 insertions(+), 19 deletions(-)

diff --git a/binfilter/bf_sw/source/core/sw3io/sw_sw3redln.cxx b/binfilter/bf_sw/source/core/sw3io/sw_sw3redln.cxx
index e2453f4..2a3f9ef 100644
--- a/binfilter/bf_sw/source/core/sw3io/sw_sw3redln.cxx
+++ b/binfilter/bf_sw/source/core/sw3io/sw_sw3redln.cxx
@@ -251,12 +251,7 @@ xub_StrLen lcl_sw3io_getNodeOff( const SwNodeIndex& rNdIdx, xub_StrLen nCntntIdx
 // unbenutzte Content-Position.
 const SwNode& rNode = rNdIdx.GetNode();
 if( rNode.IsCntntNode() )
-{
-if( nCntntIdx > STRING_MAXLEN52 )
-return STRING_MAXLEN52;
-else
-return nCntntIdx;
-}
+return nCntntIdx;
 
 if( rNode.IsStartNode() )
 return 0;
@@ -294,10 +289,6 @@ xub_StrLen lcl_sw3io_getNodeOff( const SwNodeIndex& rNdIdx, xub_StrLen nCntntIdx
 /*?*/ 		// If the redline is within one node and starts behind the
 /*?*/ 		// last position that is possible within the 5.2 version,
 /*?*/ 		// it will be ignored.
-/*?*/ 		if( pPos->nContent.GetIndex() > STRING_MAXLEN52 &&
-/*?*/ 			pPos->nNode.GetIndex() == pEndPos->nNode.GetIndex() &&
-/*?*/ 			pEndPos->nContent.GetIndex() > STRING_MAXLEN52 )
-/*?*/ 			continue;
 /*?*/ 
 /*?*/ 		if( pDoc->IsInHeaderFooter( pPos->nNode ) )
 /*?*/ 		{
@@ -457,7 +448,7 @@ xub_StrLen lcl_sw3io_getNodeOff( const SwNodeIndex& rNdIdx, xub_StrLen nCntntIdx
 /*N*/ 		xub_StrLen nLen = rNode.GetCntntNode()->Len();
 /*N*/ 		xub_StrLen nIdx = static_cast< xub_StrLen >( nNodeOff+nCntntOff );
 /*N*/ 		ASSERT( nIdx>=0 && nIdx<=nLen, "ungueltiger Cntnt-Offset" );
-/*N*/ 		if( nIdx<0 || nIdx > nLen )
+/*N*/ 		if( nIdx > nLen )
 /*N*/ 		{
 /*N*/ 			bInvalid = sal_True;
 /*N*/ 		}
@@ -635,14 +626,6 @@ xub_StrLen lcl_sw3io_getNodeOff( const SwNodeIndex& rNdIdx, xub_StrLen nCntntIdx
 /*?*/ else if( pContentIdx )
 /*?*/ 	cFlags |= 0x20;
 /*?*/ 
-/*?*/ xub_StrLen nOffs = pMark->GetNodeOff();
-/*?*/ if( pDoc->GetNodes()[nIdx]->IsCntntNode() &&
-/*?*/ 	nOffs > STRING_MAXLEN52 )
-/*?*/ 	nOffs = STRING_MAXLEN52;
-/*?*/ *pStrm  << (BYTE)  cFlags
-/*?*/ 		<< (UINT16)pMark->GetId()
-/*?*/ 		<< (UINT16)nOffs;
-/*?*/ 
 /*?*/ if( pContentIdx )
 /*?*/ {
 /*?*/ 	ASSERT( pContentIdx->GetNode().EndOfSectionIndex() -
-- 
1.7.1

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


[Libreoffice] [PATCH 6/9] waring cleaning in sw_sw3redln.cxx

2010-11-25 Thread Pierre-André Jacquod
regards

>From 84e58630f70dc34f71ee34419d9843980b14b723 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pierre-Andr=C3=A9=20Jacquod?= 
Date: Thu, 25 Nov 2010 20:18:10 +0100
Subject: [PATCH 6/9] waring cleaning in sw_sw3redln.cxx

shadowing warning and unused parameters
---
 binfilter/bf_sw/source/core/sw3io/sw_sw3redln.cxx |   11 ---
 1 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/binfilter/bf_sw/source/core/sw3io/sw_sw3redln.cxx b/binfilter/bf_sw/source/core/sw3io/sw_sw3redln.cxx
index b0a286b..e2453f4 100644
--- a/binfilter/bf_sw/source/core/sw3io/sw_sw3redln.cxx
+++ b/binfilter/bf_sw/source/core/sw3io/sw_sw3redln.cxx
@@ -97,8 +97,6 @@ namespace binfilter {
 /*N*/ 	{
 /*N*/ 		OpenRec( SWG_REDLINEDATA_LCL );
 /*N*/ 
-/*N*/ 		BYTE cDFlags = OpenFlagRec();
-/*N*/ 
 /*N*/ 		BYTE cType;
 /*N*/ 		UINT16 nStrIdx;
 /*N*/ 
@@ -106,10 +104,10 @@ namespace binfilter {
 /*N*/ >> nStrIdx;
 /*N*/ 		CloseFlagRec();
 /*N*/ 
-/*N*/ 		UINT32 nDate, nTime;
+/*N*/ 		UINT32 nDate2, nTime2;
 /*N*/ 		String aComment;
-/*N*/ 		*pStrm 	>> nDate
-/*N*/ >> nTime;
+/*N*/ 		*pStrm 	>> nDate2
+/*N*/ >> nTime2;
 /*N*/ 		InString( *pStrm, aComment );
 /*N*/ 
 /*N*/ 		// Das oberste Element des Stack wurde als letztes geschrieben.
@@ -120,7 +118,7 @@ namespace binfilter {
 /*N*/ 			nAuthorIdx = pDoc->GetRedlineAuthor();
 /*N*/ 
 /*N*/ 		pData =	new SwRedlineData( (SwRedlineType)cType, nAuthorIdx,
-/*N*/    DateTime( nDate, nTime ), aComment,
+/*N*/    DateTime( nDate2, nTime2 ), aComment,
 /*N*/    pData );
 /*N*/ 
 /*N*/ 		CloseRec( SWG_REDLINEDATA_LCL );
@@ -128,7 +126,6 @@ namespace binfilter {
 /*N*/ 
 /*N*/ 	// Der PaM ist erstmal egal und wird erst spaeter gesetzt
 /*N*/ 	SwPosition aDummyPos( pDoc->GetNodes().GetEndOfExtras() );
-/*N*/ 	BOOL bVisible = (cFlags & 0x10) != 0;
 /*N*/ 	SwRedline *pRedline =
 /*N*/ 		new SwRedline( pData, aDummyPos, (cFlags & 0x10) != 0,
 /*N*/ 	   (cFlags & 0x20) != 0, (cFlags & 0x40) != 0 );
-- 
1.7.1

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


[Libreoffice] [PATCH 5/9] waring removal in binfilter core/para

2010-11-25 Thread Pierre-André Jacquod
regards
>From 01e9e819f9dd8f1726ddff7672f27cfcbd44760c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pierre-Andr=C3=A9=20Jacquod?= 
Date: Thu, 25 Nov 2010 20:09:15 +0100
Subject: [PATCH 5/9] waring removal in binfilter core/para

---
 binfilter/bf_sw/source/core/para/sw_paratr.cxx |   16 
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/binfilter/bf_sw/source/core/para/sw_paratr.cxx b/binfilter/bf_sw/source/core/para/sw_paratr.cxx
index cb4dd70..646bb4b 100644
--- a/binfilter/bf_sw/source/core/para/sw_paratr.cxx
+++ b/binfilter/bf_sw/source/core/para/sw_paratr.cxx
@@ -104,7 +104,7 @@ using namespace ::com::sun::star;
 
 
 
-/*N*/ void SwFmtDrop::Modify( SfxPoolItem *pA, SfxPoolItem *pB )
+/*N*/ void SwFmtDrop::Modify( SfxPoolItem * /*pA*/, SfxPoolItem * /*pB*/ )
 /*N*/ {
 /*N*/ 	if( pDefinedIn )
 /*N*/ 	{
@@ -130,7 +130,7 @@ using namespace ::com::sun::star;
 
 
 
-/*N*/ sal_Bool SwFmtDrop::GetInfo( SfxPoolItem& rInfo ) const
+/*N*/ sal_Bool SwFmtDrop::GetInfo( SfxPoolItem& /*rInfo*/ ) const
 /*N*/ {
 /*N*/ 	// fuers UNDO: pruefe ob das Attribut wirklich in diesem Format steht
 /*N*/ #ifdef USED_30
@@ -180,7 +180,7 @@ using namespace ::com::sun::star;
 /*N*/ case MID_DROPCAP_LINES : rVal <<= (sal_Int16)nLines; break;
 /*N*/ case MID_DROPCAP_COUNT : rVal <<= (sal_Int16)nChars; break;
 /*N*/ case MID_DROPCAP_DISTANCE : rVal <<= (sal_Int16) TWIP_TO_MM100(nDistance); break;
-/*N*/ 		case MID_DROPCAP_FORMAT:
+/*N*/ case MID_DROPCAP_FORMAT:
 /*N*/ 		{
 /*N*/ 		 	style::DropCapFormat aDrop;
 /*N*/ 			aDrop.Lines	= nLines   ;
@@ -244,8 +244,8 @@ using namespace ::com::sun::star;
 /*N*/ nDistance 	= MM100_TO_TWIP(pDrop->Distance);
 /*N*/ 			}
 /*N*/ 			else
-/*N*/ //exception( wrong_type)
-/*N*/ ;
+/*N*/ 			{	//exception( wrong_type)
+/*N*/ 			}
 /*N*/ 		}
 /*N*/ 		break;
 /*N*/ 		case MID_DROPCAP_WHOLE_WORD:
@@ -267,14 +267,14 @@ using namespace ::com::sun::star;
 /*N*/ }
 
 // class SwNumRuleItem -
-/*N*/ SfxPoolItem* SwNumRuleItem::Clone( SfxItemPool *pPool  ) const
+/*N*/ SfxPoolItem* SwNumRuleItem::Clone( SfxItemPool * /*pPool*/  ) const
 /*N*/ {
 /*N*/ 	return new SwNumRuleItem( *this );
 /*N*/ }
 /* -27.06.00 11:05
 
  ---*/
-/*N*/ bool SwNumRuleItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) const
+/*N*/ bool SwNumRuleItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) const
 /*N*/ {
 /*N*/ 	::rtl::OUString sRet = SwStyleNameMapper::GetProgName(GetValue(), GET_POOLID_NUMRULE );
 /*N*/ 	rVal <<= sRet;
@@ -283,7 +283,7 @@ using namespace ::com::sun::star;
 /* -27.06.00 11:05
 
  ---*/
-/*N*/ bool SwNumRuleItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE nMemberId )
+/*N*/ bool SwNumRuleItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ )
 /*N*/ {
 /*N*/ 	::rtl::OUString uName;
 /*N*/ 	rVal >>= uName;
-- 
1.7.1

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


[Libreoffice] [PATCH 4/9] binfilter sc_interpr4.cxx further warnings removal

2010-11-25 Thread Pierre-André Jacquod
regards
>From f6202b304ca7f0ffdd16cbd2886872465273852a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pierre-Andr=C3=A9=20Jacquod?= 
Date: Tue, 23 Nov 2010 21:58:53 +0100
Subject: [PATCH 4/9] binfilter sc_interpr4.cxx further warnings removal

---
 binfilter/bf_sc/source/core/tool/sc_interpr4.cxx |   17 -
 1 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/binfilter/bf_sc/source/core/tool/sc_interpr4.cxx b/binfilter/bf_sc/source/core/tool/sc_interpr4.cxx
index 31201a3..547d168 100644
--- a/binfilter/bf_sc/source/core/tool/sc_interpr4.cxx
+++ b/binfilter/bf_sc/source/core/tool/sc_interpr4.cxx
@@ -1358,7 +1358,7 @@ BOOL ScInterpreter::DoubleRefToPosSingleRef( const ScRange& rRange, ScAddress& r
 /*N*/  	{
 /*N*/  		ScBaseCell* pCell;
 /*N*/  		ScQueryCellIterator aCellIter(pDok, nTab, aQueryParam);
-/*N*/  		if (pCell = aCellIter.GetFirst())
+/*N*/  		if ( (pCell = aCellIter.GetFirst() ) )
 /*N*/  		{
 /*N*/  			if (aCellIter.GetNext())
 /*N*/  SetIllegalArgument();
@@ -1458,7 +1458,6 @@ BOOL ScInterpreter::DoubleRefToPosSingleRef( const ScRange& rRange, ScAddress& r
 /*?*/ 
 /*?*/ 			for (i = nParamCount; (i > 0) && (nGlobalError == 0); i--)
 /*?*/ 			{
-/*?*/ BYTE nStackType = GetStackType();
 /*?*/ switch (eParamType[i])
 /*?*/ {
 /*?*/ 	case PTR_DOUBLE :
@@ -2098,14 +2097,14 @@ void ScInterpreter::ScMissing()
 /*?*/ 	{
 /*?*/ 		short nIdx[ 2 ];
 /*?*/ 		nIdx[ 0 ] = j+1;
-/*?*/ 		for( USHORT i = 0; i < nC; i++ )
+/*?*/ 		for( USHORT k = 0; k < nC; i++ )
 /*?*/ 		{
-/*?*/ 			nIdx[ 1 ] = i+1;
+/*?*/ 			nIdx[ 1 ] = k+1;
 /*?*/ 			SbxVariable* p = refArray->Get( nIdx );
-/*?*/ 			if (pMat->IsString(i, j))
-/*?*/ p->PutString( pMat->GetString(i, j) );
+/*?*/ 			if (pMat->IsString(k, j))
+/*?*/ p->PutString( pMat->GetString(k, j) );
 /*?*/ 			else
-/*?*/ p->PutDouble( pMat->GetDouble(i, j) );
+/*?*/ p->PutDouble( pMat->GetDouble(k, j) );
 /*?*/ 		}
 /*?*/ 	}
 /*?*/ 	pPar->PutObject( refArray );
@@ -3041,10 +3040,10 @@ void ScInterpreter::ScTTT()
 /*?*/ {	// Stack abraeumen, geht davon aus, dass jede Funktion
 /*?*/ 	// prinzipiell ein Ergebnis pusht, im Fehlerfall kann dies
 /*?*/ 	// ein zufaelliger Wert sein
-/*?*/ 	const ScToken* pResult = pStack[ sp - 1 ];
+/*?*/ 	const ScToken* pResult2 = pStack[ sp - 1 ];
 /*?*/ 	while ( sp > nStackBase )
 /*?*/ 		Pop();
-/*?*/ 	PushTempToken( *pResult );
+/*?*/ 	PushTempToken( *pResult2 );
 /*?*/ }
 /*N*/ 			}
 /*N*/ 		}
-- 
1.7.1

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


[Libreoffice] [PATCH 3/9] warnings in binfilters sc_interpr4.cxx

2010-11-25 Thread Pierre-André Jacquod
regards

>From 80d6aecfb78de0da70107bd87c4d101942b79d78 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pierre-Andr=C3=A9=20Jacquod?= 
Date: Tue, 23 Nov 2010 21:48:11 +0100
Subject: [PATCH 3/9] warnings in binfilters sc_interpr4.cxx

all changes based on debugger waring:
sc_interpr4.cxx: warning: comparison is always false due to limited range of data type
---
 binfilter/bf_sc/source/core/tool/sc_interpr4.cxx |   20 ++--
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/binfilter/bf_sc/source/core/tool/sc_interpr4.cxx b/binfilter/bf_sc/source/core/tool/sc_interpr4.cxx
index 1a64001..31201a3 100644
--- a/binfilter/bf_sc/source/core/tool/sc_interpr4.cxx
+++ b/binfilter/bf_sc/source/core/tool/sc_interpr4.cxx
@@ -99,7 +99,7 @@ ScSpew ScInterpreter::theSpew;
 #endif
 
 //-
-// Funktionen für den Zugriff auf das Document
+// Funktionen f? den Zugriff auf das Document
 //-
 
 
@@ -785,11 +785,11 @@ void ScInterpreter::PopSingleRef(USHORT& rCol, USHORT &rRow, USHORT& rTab)
 rTab = aPos.Tab() + rRef.nRelTab;
 else
 rTab = rRef.nTab;
-if( rCol < 0 || rCol > MAXCOL || rRef.IsColDeleted() )
+if( rCol > MAXCOL || rRef.IsColDeleted() )
 SetError( errNoRef ), rCol = 0;
-if( rRow < 0 || rRow > MAXROW || rRef.IsRowDeleted() )
+if( rRow > MAXROW || rRef.IsRowDeleted() )
 SetError( errNoRef ), rRow = 0;
-if( rTab < 0 || rTab >= pDok->GetTableCount() || rRef.IsTabDeleted() )
+if( rTab >= pDok->GetTableCount() || rRef.IsTabDeleted() )
 SetError( errNoRef ), rTab = 0;
 if ( pDok->aTableOpList.Count() > 0 )
 ReplaceCell( rCol, rRow, rTab );
@@ -872,11 +872,11 @@ void ScInterpreter::PopSingleRef(USHORT& rCol, USHORT &rRow, USHORT& rTab)
 /*N*/ 	rTab1 = aPos.Tab() + rRef.nRelTab;
 /*N*/ else
 /*N*/ 	rTab1 = rRef.nTab;
-/*N*/ if( rCol1 < 0 || rCol1 > MAXCOL || rRef.IsColDeleted() )
+/*N*/ if( rCol1 > MAXCOL || rRef.IsColDeleted() )
 /*N*/ 	SetError( errNoRef ), rCol1 = 0;
-/*N*/ if( rRow1 < 0 || rRow1 > MAXROW || rRef.IsRowDeleted() )
+/*N*/ if( rRow1 > MAXROW || rRef.IsRowDeleted() )
 /*N*/ 	SetError( errNoRef ), rRow1 = 0;
-/*N*/ if( rTab1 < 0 || rTab1 >= nMaxTab || rRef.IsTabDeleted() )
+/*N*/ if( rTab1 >= nMaxTab || rRef.IsTabDeleted() )
 /*N*/ 	SetError( errNoRef ), rTab1 = 0;
 /*N*/ 			}
 /*N*/ 			{
@@ -893,11 +893,11 @@ void ScInterpreter::PopSingleRef(USHORT& rCol, USHORT &rRow, USHORT& rTab)
 /*N*/ 	rTab2 = aPos.Tab() + rRef.nRelTab;
 /*N*/ else
 /*N*/ 	rTab2 = rRef.nTab;
-/*N*/ if( rCol2 < 0 || rCol2 > MAXCOL || rRef.IsColDeleted() )
+/*N*/ if( rCol2 > MAXCOL || rRef.IsColDeleted() )
 /*N*/ 	SetError( errNoRef ), rCol2 = 0;
-/*N*/ if( rRow2 < 0 || rRow2 > MAXROW || rRef.IsRowDeleted() )
+/*N*/ if( rRow2 > MAXROW || rRef.IsRowDeleted() )
 /*N*/ 	SetError( errNoRef ), rRow2 = 0;
-/*N*/ if( rTab2 < 0 || rTab2 >= nMaxTab || rRef.IsTabDeleted() )
+/*N*/ if( rTab2 >= nMaxTab || rRef.IsTabDeleted() )
 /*N*/ 	SetError( errNoRef ), rTab2 = 0;
 /*N*/ 			}
 /*N*/ 			if ( pDok->aTableOpList.Count() > 0 && !bDontCheckForTableOp )
-- 
1.7.1

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


[Libreoffice] [PATCH 2/9] remove warnings in binfilter - sc_interpr2.cxx

2010-11-25 Thread Pierre-André Jacquod
regards

>From 32814375a2999afaf0582a682975ae6ec769f6f5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pierre-Andr=C3=A9=20Jacquod?= 
Date: Tue, 23 Nov 2010 21:06:58 +0100
Subject: [PATCH 2/9] remove warnings in binfilter - sc_interpr2.cxx

based on the following compiler warnings:

sc_interpr2.cxx:1729:22: warning: comparison is always false due to limited range of data type

sc_interpr2.cxx:893:12: warning: unused variable 'fRestwert1'
sc_interpr2.cxx:895:10: warning: unused variable 'bFirstFlag'
sc_interpr2.cxx:896:10: warning: unused variable 'b2Flag'
sc_interpr2.cxx:897:12: warning: unused variable 'fAbschlag'
sc_interpr2.cxx:1423:54: warning: suggest parentheses around assignment used as truth value
sc_interpr2.cxx:1484:32: warning: suggest explicit braces to avoid ambiguous 'else'
sc_interpr2.cxx:863:12: warning: 'nGda2' may be used uninitialized in this function
sc_interpr2.cxx:1420:22: warning: 'bHasNote' may be used uninitialized in this function
---
 binfilter/bf_sc/source/core/tool/sc_interpr2.cxx |   18 +++---
 1 files changed, 7 insertions(+), 11 deletions(-)

diff --git a/binfilter/bf_sc/source/core/tool/sc_interpr2.cxx b/binfilter/bf_sc/source/core/tool/sc_interpr2.cxx
index 52bdf1d..71b27da 100644
--- a/binfilter/bf_sc/source/core/tool/sc_interpr2.cxx
+++ b/binfilter/bf_sc/source/core/tool/sc_interpr2.cxx
@@ -860,10 +860,8 @@ void ScInterpreter::ScGDA2()
 double nAbRate = 1.0 - pow(nRest / nWert, 1.0 / nDauer);
 nAbRate = ::rtl::math::approxFloor((nAbRate * 1000.0) + 0.5) / 1000.0;
 double nErsteAbRate = nWert * nAbRate * nMonate / 12.0;
-double nGda2;
-if (::rtl::math::approxFloor(nPeriode) == 1)
-nGda2 = nErsteAbRate;
-else
+double nGda2  = nErsteAbRate;
+if (::rtl::math::approxFloor(nPeriode) != 1)
 {
 double nSummAbRate = nErsteAbRate;
 double nMin = nDauer;
@@ -890,11 +888,7 @@ double ScInterpreter::ScInterVDB(double fWert,double fRest,double fDauer,
 
 double fTerm, fLia;
 double fRestwert = fWert - fRest;
-double fRestwert1 = fRestwert;
 BOOL bNowLia = FALSE;
-BOOL bFirstFlag=TRUE;
-BOOL b2Flag=TRUE;
-double fAbschlag=0;
 
 double fGda;
 ULONG i;
@@ -1417,10 +1411,10 @@ void ScInterpreter::ScBackSolver()
 ScRange aVRange( aVAdr, aVAdr );	// fuer SetDirty
 double nSaveVal;
 ScPostIt aNote;
-BOOL bHasNote;
+BOOL bHasNote = 0;
 if ( bTempCell )
 {
-if ( bHasNote = (pVCell != NULL) )
+if ( ( bHasNote = (pVCell != NULL) ) )
 bHasNote = pVCell->GetNote( aNote );
 nSaveVal = 0.0;
 pVCell = new ScValueCell( nSaveVal );
@@ -1482,10 +1476,12 @@ void ScInterpreter::ScBackSolver()
 {
 fs = (fn1 - fn) / (xn1 - xn);
 if (fabs(fs) < nEps)
+{
 if (fs < 0.0)
 fs = -nEps;
 else
 fs = nEps;
+}
 }
 else
 fs = nEps;
@@ -1726,7 +1722,7 @@ ScDdeLink* lcl_GetDdeLink( SvxLinkManager* pLinkMgr,
 /*N*/  		String aTopic = GetString();
 /*N*/  		String aAppl  = GetString();
 /*N*/  
-/*N*/  		if (nMode < SC_DDE_DEFAULT || nMode > SC_DDE_TEXT)
+/*N*/  		if (nMode > SC_DDE_TEXT)
 /*N*/  			nMode = SC_DDE_DEFAULT;
 /*N*/  
 /*N*/  		//	temporary documents (ScFunctionAccess) have no DocShell
-- 
1.7.1

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


[Libreoffice] [PATCH 1/9] suppress warning in binfilters sc_token

2010-11-25 Thread Pierre-André Jacquod
Hello,
here some patches in binfilter to remove warnings by compiling...
Since some changes could (will) look strange, I submit it in little
chunks, often with compiler warning in comment. This may help the reviewer.

Hope I did no mistake
regards
Pierre-André
>From c747a9dcc4af190aac1f216a93f7abd4b39fec85 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pierre-Andr=C3=A9=20Jacquod?= 
Date: Tue, 23 Nov 2010 07:46:54 +0100
Subject: [PATCH 1/9] suppress warning in binfilters sc_token

changes based on following warnings:

sc_token.cxx:1573:28: warning: comparison is always false due to limited range of data type
sc_token.cxx:452:12: warning: unused parameter 'n'
sc_token.cxx:452:12: warning: unused parameter 'rPos'
sc_token.cxx:452:12: warning: unused parameter 'rPos'
sc_token.cxx:452:12: warning: unused parameter 'n'
sc_token.cxx:1613:26: warning: declaration of 'r' shadows a previous local
sc_token.cxx:1593:25: warning: shadowed declaration is here
---
 binfilter/bf_sc/source/core/tool/sc_token.cxx |   45 ++---
 1 files changed, 18 insertions(+), 27 deletions(-)

diff --git a/binfilter/bf_sc/source/core/tool/sc_token.cxx b/binfilter/bf_sc/source/core/tool/sc_token.cxx
index fe98c35..0bfad52 100644
--- a/binfilter/bf_sc/source/core/tool/sc_token.cxx
+++ b/binfilter/bf_sc/source/core/tool/sc_token.cxx
@@ -449,7 +449,7 @@ namespace binfilter {
 /*N*/ 	return 0;
 /*N*/ }
 
-/*N*/ void ScToken::SetByte( BYTE n )
+/*N*/ void ScToken::SetByte( BYTE /*n*/ )
 /*N*/ {
 /*N*/  DBG_ERRORFILE( "ScToken::SetByte: virtual dummy called" );
 /*N*/ }
@@ -502,12 +502,12 @@ namespace binfilter {
 /*N*/  	return aDummySingleRef;
 /*N*/  }
 
-/*N*/ void ScToken::CalcAbsIfRel( const ScAddress& rPos )
+/*N*/ void ScToken::CalcAbsIfRel( const ScAddress& /*rPos*/ )
 /*N*/ {
 /*N*/ 	DBG_ERRORFILE( "ScToken::CalcAbsIfRel: virtual dummy called" );
 /*N*/ }
 
-/*N*/ void ScToken::CalcRelFromAbs( const ScAddress& rPos )
+/*N*/ void ScToken::CalcRelFromAbs( const ScAddress& /*rPos*/ )
 /*N*/ {
 /*N*/ 	DBG_ERRORFILE( "ScToken::CalcRelFromAbs: virtual dummy called" );
 /*N*/ }
@@ -524,7 +524,7 @@ namespace binfilter {
 /*N*/ 	return 0;
 /*N*/ }
 
-/*N*/  void ScToken::SetIndex( USHORT n )
+/*N*/  void ScToken::SetIndex( USHORT /*n*/ )
 /*N*/  {
 /*N*/  	DBG_ERRORFILE( "ScToken::SetIndex: virtual dummy called" );
 /*N*/  }
@@ -1570,16 +1570,7 @@ namespace binfilter {
 /*N*/ 		{
 /*N*/ 			sal_Char c[ MAXSTRLEN+1 ];
 /*N*/ 			rStream >> n;
-/*N*/ 			if( n > MAXSTRLEN-1 )
-/*N*/ 			{
-/*?*/ DBG_ERRORFILE( "bad string array boundary" );
-/*?*/ USHORT nDiff = n - (MAXSTRLEN-1);
-/*?*/ n = MAXSTRLEN-1;
-/*?*/ rStream.Read( c, n );
-/*?*/ rStream.SeekRel( nDiff );
-/*N*/ 			}
-/*N*/ 			else
-/*N*/ rStream.Read( c, n );
+/*N*/ 			rStream.Read( c, n );
 /*N*/ 			cStr[ n ] = 0;
 /*N*/ 			CharSet eSrc = rStream.GetStreamCharSet();
 /*N*/ 			for ( BYTE j=0; j> r.nCol
-/*N*/ 	>> r.nRow
-/*N*/ 	>> r.nTab
+/*N*/ 			SingleRefData& r1 = aRef.Ref1;
+/*N*/ 			rStream >> r1.nCol
+/*N*/ 	>> r1.nRow
+/*N*/ 	>> r1.nTab
 /*N*/ 	>> n;
 /*N*/ 			if ( nVer < SC_RELATIVE_REFS )
 /*N*/ 			{
@@ -1602,18 +1593,18 @@ namespace binfilter {
 /*N*/ aBools.bRelRow = ( ( n >> 2 ) & 0x03 );
 /*N*/ aBools.bRelTab = ( ( n >> 4 ) & 0x03 );
 /*N*/ aBools.bOldFlag3D = ( ( n >> 6 ) & 0x03 );
-/*N*/ r.OldBoolsToNewFlags( aBools );
+/*N*/ r1.OldBoolsToNewFlags( aBools );
 /*N*/ 			}
 /*N*/ 			else
-/*N*/ r.CreateFlagsFromLoadByte( n );
+/*N*/ r1.CreateFlagsFromLoadByte( n );
 /*N*/ 			if( eType == svSingleRef )
-/*N*/ aRef.Ref2 = r;
+/*N*/ aRef.Ref2 = r1;
 /*N*/ 			else
 /*N*/ 			{
-/*N*/ SingleRefData& r = aRef.Ref2;
-/*N*/ rStream >> r.nCol
-/*N*/ 		>> r.nRow
-/*N*/ 		>> r.nTab
+/*N*/ SingleRefData& r2 = aRef.Ref2;
+/*N*/ rStream >> r2.nCol
+/*N*/ 		>> r2.nRow
+/*N*/ 		>> r2.nTab
 /*N*/ 		>> n;
 /*N*/ if ( nVer < SC_RELATIVE_REFS )
 /*N*/ {
@@ -1622,10 +1613,10 @@ namespace binfilter {
 /*N*/ 	aBools.bRelRow = ( ( n >> 2 ) & 0x03 );
 /*N*/ 	aBools.bRelTab = ( ( n >> 4 ) & 0x03 );
 /*N*/ 	aBools.bOldFlag3D = ( ( n >> 6 ) & 0x03 );
-/*N*/ 	r.OldBoolsToNewFlags( aBools );
+/*N*/ 	r2.OldBoolsToNewFlags( aBools );
 /*N*/ }
 /*N*/ else
-/*N*/ 	r.CreateFlagsFromLoadByte( n );
+/*N*/ 	r2.CreateFlagsFromLoadByte( n );
 /*N*/ 			}
 /*N*/ 			break;
 /*N*/ 		}
-- 
1.7.1

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


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

2010-11-25 Thread David Tardon
... add PUSHED to subject...

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


Re: [Libreoffice] [PUSHED] cppcheck, Memory leak: fallback in shell/source/unix/misc/gnome-open-url.c

2010-11-25 Thread David Tardon
On Thu, Nov 25, 2010 at 11:30:20PM +0100, Julien Nabet wrote:
> Hello,
> 
> Here's a small patch for shell/source/unix/misc/gnome-open-url.c
> 
> Julien.
> (LGPLv3+ / MPL)

> commit 6b768a031280d0c3ad23624dd3a6470c57395a56
> Author: serval 
> Date:   Thu Nov 25 23:26:39 2010 +0100
> 
> correct cppcheck, Memory leak: fallback
> 
> diff --git a/shell/source/unix/misc/gnome-open-url.c 
> b/shell/source/unix/misc/gnome-open-url.c
> index 69cd837..9ee106b 100644
> --- a/shell/source/unix/misc/gnome-open-url.c
> +++ b/shell/source/unix/misc/gnome-open-url.c
> @@ -139,6 +139,7 @@ int main(int argc, char *argv[] )
>  args[2] = NULL;
>  return execv(fallback, args);
>  }
> +free(fallback);
>  
>  return -1;  
>  }

I changed the code a bit so fallback is freed even if the "if" path is
taken.

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


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


Re: [Libreoffice] [PUSHED] Clean code at writer [source/ui]

2010-11-25 Thread David Tardon
On Thu, Nov 25, 2010 at 01:16:42PM -0800, Kayo Hamid wrote:
> I can't see the commit at cgit, where is? I want to see the changes to 
> improve my skills, see the changes. What wrong I'm doing? Better, what are 
> wrong remove?
> revol_

Sorry. Should be better now :)

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


Re: [Libreoffice] C++0x and LibreOffice

2010-11-25 Thread René Kjellerup
Well, the version 4.4.3 of gcc on my system seems to support it.

One way to see when it's available would be to look up gcc's documentation
in the changelog for the 4.4.x series

I took a quick look at gnu's web site and found this:
http://gcc.gnu.org/projects/cxx0x.html

(looks like a little of the C++0x is available as early as 4.3)

kr
René

sent from my phone
On Nov 25, 2010 9:26 PM, "Caolán McNamara"  wrote:
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice] [PATCH] run-libreoffice-ciabot: avoid flood on merges

2010-11-25 Thread Miklos Vajna
Hi Kendy,

I'm attaching a patch that updates the cia bot so that you don't need to
manually disable it on each merge. ;)

OK to push? (More importantly, if I push it, it would be nice if you
could restart the bot, as I guess that's not automatic. :) )

Thanks.
From 53a5563a0b4df6a45d73bc80be6927b06556e573 Mon Sep 17 00:00:00 2001
From: Miklos Vajna 
Date: Fri, 26 Nov 2010 01:27:46 +0100
Subject: [PATCH] run-libreoffice-ciabot: avoid flood on merges

Check if the last hash is a merge commit: if yes, then just announce the
last one, otherwise do the usual "announce any commit since the last
one" dance.
---
 scratch/cia/run-libreoffice-ciabot.pl |   26 +-
 1 files changed, 17 insertions(+), 9 deletions(-)

diff --git a/scratch/cia/run-libreoffice-ciabot.pl 
b/scratch/cia/run-libreoffice-ciabot.pl
index bc8c0aa..0c6f892 100644
--- a/scratch/cia/run-libreoffice-ciabot.pl
+++ b/scratch/cia/run-libreoffice-ciabot.pl
@@ -44,16 +44,24 @@ sub report($$$) {
 
 if ( defined( $old_head ) ) {
 if ( $old_head ne $new_head ) {
-if ( open COMMITS, "git rev-list $new_head ^$old_head | tac |" 
) {
-while (  ) {
-chomp;
-print "Sending report about $_ in $key\n";
-qx(libreoffice-ciabot.pl $repo $_ $branch_name)
+my $ret = system("git rev-parse -q --verify $new_head^2 
>/dev/null");
+if ($ret != 0) {
+# not a merge commit, announce every commit
+if ( open COMMITS, "git rev-list $new_head ^$old_head | 
tac |" ) {
+while (  ) {
+chomp;
+print "Sending report about $_ in $key\n";
+qx(libreoffice-ciabot.pl $repo $_ $branch_name)
+}
+close COMMITS;
 }
-close COMMITS;
-}
-else {
-error( "Cannot call git rev-list." );
+else {
+error( "Cannot call git rev-list." );
+}
+} else {
+# just process the merge commit itself
+print "Sending report about $new_head in $key\n";
+qx(libreoffice-ciabot.pl $repo $new_head $branch_name)
 }
 }
 }
-- 
1.7.3.2



pgpLxiTAJhV9T.pgp
Description: PGP signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] Are ISC/BSD-licensed contributions acceptable?

2010-11-25 Thread Wols Lists
On 25/11/10 16:44, Michael Meeks wrote:
> Hi Wols,
>
> On Thu, 2010-11-25 at 16:31 +, Wols Lists wrote:
>> Have we got a standard LibreOffice header to go into new files ?
>   Yes COPYING.NEWFILES in the toplevel has the stock header.

With no place for people who make MAJOR alterations to the file to add
their own copyright ... :-)

That just doesn't feel quite right to me. Oh well.
>>  If not, I'm quite happy to craft one, along with a policy that tells people 
>> what
>> to do and how we expect them to claim any relevant copyrights. And yes,
>> I would very much take into considerations concerns about keeping the
>> list of people low, we don't want too many names in the files or too
>> many licences in the licence file. Basically, minor changes you have to
>> look at git, licences mustn't explicitly name a copyright holder.
>   Really; not mixing licenses within the same file is much to be
> preferred; and if people insist on XYZ crazy-license, to have LGPLv3
> +/MPL/ as a triple would be best.
>   
:-)

Couple of other points - reading COPYING.NEWFILES it comes over as the
main licence is MPL1.1, yet there's no COPYING.MPL file. Should that be
added? Plus I get the impression the main licence is meant to be LGPL :-)

Personally, I also find putting the licence in the COPYING file a bit
weird, but lilypond does exactly the same, so I guess that's normal
practice :-)

Lilypond also has a LICENCE file which actually grants the licence
(without it saying somewhere that it actually applies to the code,
there's no point having a COPYING file containing the GPL or whatever -
yes I know it's in the individual files :-) - shouldn't we also have a
LICENCE file saying that those three licences apply to the entire project?



And I didn't know about COPYING.NEWFILES until you pointed me at it
(yes, I know, I should have done a top level ls and investigated :-) but
there's nothing I can see to say that it's meant to be used for new
files ... given that COPYING files contain licence text, it doesn't
compute that COPYING.NEWFILES contains a template licence grant :-)

I know that in the "old days" all this stuff didn't matter, because
Sun/Oracle required a copyright assignment, but I would have thought
having some form of written policy in place as soon as possible makes
sense. Should I try and codify it as a copyright section on
http://www.documentfoundation.org/develop/ and in a HACKING file, or
would you rather I just went away and left this topic alone? (I don't
want to dive into something that is bound to be contentious without some
backing by others, but this is an itch I'd happily scratch :-).

My ideas basically are:
(a) is the main licence LGPL or MPL - that needs to be made clear -
Oracle's code is LGPL so are we trying to move to MPL or just adding it
as an option?
(b) clarify that only major contributions should merit a copyright
mention in the source files
(c) clarify that git is the primary/definitive source of copyright info
(d) provide guidelines on how to edit the copyright header - for example
what happens if you're doing a major refactor of Oracle and new source ...

Cheers,
Wol
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice] [Patch] cppcheck, Memory leak: fallback in shell/source/unix/misc/gnome-open-url.c

2010-11-25 Thread Julien Nabet

Hello,

Here's a small patch for shell/source/unix/misc/gnome-open-url.c

Julien.
(LGPLv3+ / MPL)
commit 6b768a031280d0c3ad23624dd3a6470c57395a56
Author: serval 
Date:   Thu Nov 25 23:26:39 2010 +0100

correct cppcheck, Memory leak: fallback

diff --git a/shell/source/unix/misc/gnome-open-url.c 
b/shell/source/unix/misc/gnome-open-url.c
index 69cd837..9ee106b 100644
--- a/shell/source/unix/misc/gnome-open-url.c
+++ b/shell/source/unix/misc/gnome-open-url.c
@@ -139,6 +139,7 @@ int main(int argc, char *argv[] )
 args[2] = NULL;
 return execv(fallback, args);
 }
+free(fallback);
 
 return -1;  
 }
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice] [Patch] unused variables in ./sal/osl/unx/util.c

2010-11-25 Thread Julien Nabet

Hello,

Here is a small patch for ./sal/osl/unx/util.c

Julien.
commit 9b18a955cd7ac4462c68b8113f73cd4dca2ccbbb
Author: serval 
Date:   Thu Nov 25 23:03:04 2010 +0100

ure : remove unused variables

diff --git a/sal/osl/unx/util.c b/sal/osl/unx/util.c
index dad9934..91b7b0d 100644
--- a/sal/osl/unx/util.c
+++ b/sal/osl/unx/util.c
@@ -57,12 +57,7 @@ static int   osl_checkAddr(const char* addr);
 
 sal_Bool SAL_CALL osl_getEthernetAddress( sal_uInt8 * pAddr )
 {
-char buff[1024];
-char hard_addr[64];
 struct ifconf ifc;
-struct ifreq *ifr;
-int i;
-int so;
 
 #ifdef SOLARIS
 /** algorithm doesn't work on solaris */
@@ -92,7 +87,6 @@ sal_Bool SAL_CALL osl_getEthernetAddress( sal_uInt8 * pAddr )
 ifc.ifc_buf = buff;
 if ( ioctl(so, SIOCGIFCONF, &ifc) < 0 )
 {
-/* fprintf(stderr, "SIOCGIFCONF: %s\n", strerror(errno));*/
 close(so);
 return sal_False;
 }
@@ -141,7 +135,6 @@ static int osl_getHWAddr(const char *ifname, char* 
hard_addr)
 
 if ( ret < 0 )
 { 
-/* fprintf(stderr, "SIOCGIFFLAGS: %s\n", strerror(errno)); */
 close(so);
 return ret;
 } 
@@ -153,7 +146,6 @@ static int osl_getHWAddr(const char *ifname, char* 
hard_addr)
 
 if (ifr.ifr_flags & IFF_LOOPBACK)
 {
-/* fprintf(stderr, "SIOCGIFFLAGS : is LOOPBACK : %s\n", 
strerror(errno));*/
 close(so);
 return 0;
 }
@@ -170,7 +162,6 @@ static int osl_getHWAddr(const char *ifname, char* 
hard_addr)
 #endif
 
 if (ret < 0) { 
-/* fprintf(stderr, "SIOCGIFADDR: %s\n", strerror(errno));*/
 memset(hard_addr, 0, 32);
 close(so);
 return ret;
@@ -193,13 +184,9 @@ static int osl_getHWAddr(const char *ifname, char* 
hard_addr)
 ret=osl_checkAddr(hard_addr);
 
 if (ret < 0) {
-/* fprintf(stderr, "SIOCGIFADDR got '00:00:00:00:00:00'\n"); */
 return ret;  
 }
 
-/* fprintf(stderr,"interface : %s -- ",ifname);*/
-/* fprintf(stderr,"HWaddr : %s\n", print_ether(hard_addr));*/
-
 return 1;
 }
 
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] [PUSHED] Clean code at writer [source/ui]

2010-11-25 Thread Kayo Hamid
I can't see the commit at cgit, where is? I want to see the changes to improve 
my skills, see the changes. What wrong I'm doing? Better, what are wrong remove?
revol_


Pushed with some changes.

D.



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


Re: [Libreoffice] warnig and coding, need a little help on C++

2010-11-25 Thread Caolán McNamara
On Thu, 2010-11-25 at 19:41 +0100, Pierre-André Jacquod wrote:
> {
>  sal_Int8 nTemp;
>  rVal >>= nTemp;
>  if(nTemp >=1 && nTemp < 0x7f
>  nLines = (BYTE)nTemp;
> }
> 
> Well, that's fine for me, nTemp is effectively not initialized. And the
> second line is then the same as: rVal = rVal >> nTemp
> 
> In my understanding, since nTemps is not initialized, if the compiler is
> nice, nTemp is then defaulted to 0 (or NULL). Then rVal = rVal >> 0 make
> not a lot of sense

> OK, now the question: what did I missed ?

Heh, this also confuses cppcheck as well. rVal is an "Any" and there is
an overloaded "operator >>=" which operates on that "Any" and nTemp. So
its not anything to do with bit shifting. Read it like...

rVal.ExtractTo(nTemp)

Now, if >>= fails it leaves nTemp untouched. So the general fix is
indeed to initialize nTemp to 0 to clear the warning.

C.

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


[Libreoffice] main.xdg 2 largest sections not needed on startup?

2010-11-25 Thread Sebastian Spaeth
Hi all, after looking at kcachegrind for a while, I found that a
significant amount of our startuptime comes from allocating string
memory and comparing strings 400k times, much of it reading the
configuration files. I just looked at the .xcd files now and of that I
focused on main.xcd because this is likely to be read in on every app
start and is by far the biggest .xcd file.

Here is a breakdown of all xml sections with their LOC count (as
determined by xmllint --format). Each name has a component-data and a
component-scheme section it seems, I have not merged them. Anyway, the 2
biggest contenders are perhaps not even needed there.

File basis3.3/share/registry/main.xcd: total 63014 lines:

The 2 biggest sections are:
"Labels" 14345 + 11 lines (defining label sizes for printing envelope labels)
"TableWizard" 8666 + 26 lines

These make 1/3 of main.xdg, are both needed on startup or can those be
put into a different file that is only read when it is really needed?

Sebastian

Breakdown follows:

14345 http://openoffice.org/2004/installation"; oor:name="Labels" 
oor:package="org.openoffice.Office">
8666 http://openoffice.org/2004/installation"; oor:name="TableWizard" 
oor:package="org.openoffice.Office">
8539 http://openoffice.org/2004/installation"; oor:name="VCL" 
oor:package="org.openoffice">
5414 http://openoffice.org/2004/installation"; 
oor:name="GenericCommands" oor:package="org.openoffice.Office.UI">
5305 http://openoffice.org/2004/installation"; oor:name="Accelerators" 
oor:package="org.openoffice.Office">
1854 http://openoffice.org/2004/installation"; 
oor:name="DrawImpressCommands" oor:package="org.openoffice.Office.UI">
1618 
1478 
1447 http://openoffice.org/2004/installation"; oor:name="WebWizard" 
oor:package="org.openoffice.Office">
969 http://openoffice.org/2004/installation"; 
oor:name="Math" oor:package="org.openoffice.Office">
785 
659 http://openoffice.org/2004/installation"; 
oor:name="Writer" oor:package="org.openoffice.Office">
653 http://openoffice.org/2004/installation"; 
oor:name="DataAccess" oor:package="org.openoffice.Office">
609 http://openoffice.org/2004/installation"; 
oor:name="ChartCommands" oor:package="org.openoffice.Office.UI">
595 
522 http://openoffice.org/2004/installation"; 
oor:name="DbuCommands" oor:package="org.openoffice.Office.UI">
471 http://openoffice.org/2004/installation"; 
oor:name="Controller" oor:package="org.openoffice.Office.UI">
448 http://openoffice.org/2004/installation"; 
oor:name="Security" oor:package="org.openoffice.Office">
389 
372 
323 
320 http://openoffice.org/2004/installation"; 
oor:name="Setup" oor:package="org.openoffice">
316 http://openoffice.org/2004/installation"; 
oor:name="Inet" oor:package="org.openoffice">
274 
245 
238 http://openoffice.org/2004/installation"; 
oor:name="Accelerators" oor:package="org.openoffice.Office">
230 
227 http://openoffice.org/2004/installation"; 
oor:name="UI" oor:package="org.openoffice.Office">
216 
194 http://openoffice.org/2004/installation"; 
oor:name="Calc" oor:package="org.openoffice.Office">
191 http://openoffice.org/2004/installation"; 
oor:name="StartModuleCommands" oor:package="org.openoffice.Office.UI">
186 
186 
176 http://openoffice.org/2004/installation"; 
oor:name="Configuration" oor:package="org.openoffice.ucb">
168 http://openoffice.org/2004/installation"; 
oor:name="Paths" oor:package="org.openoffice.Office">
163 http://openoffice.org/2004/installation"; 
oor:name="Common" oor:package="org.openoffice.Office">
159 http://openoffice.org/2004/installation"; 
oor:package="org.openoffice.Office" oor:name="Embedding">
147 
146 
135 http://openoffice.org/2004/installation"; 
oor:name="GenericCategories" oor:package="org.openoffice.Office.UI">
132 http://openoffice.org/2004/installation"; 
oor:name="Impress" oor:package="org.openoffice.Office">
124 
122 http://openoffice.org/2004/installation"; 
oor:name="ChartWindowState" oor:package="org.openoffice.Office.UI">
119 
115 http://openoffice.org/2004/installation"; 
oor:name="FormWizard" oor:package="org.openoffice.Office">
102 
101 http://openoffice.org/2004/installation"; 
oor:name="BasicIDEWindowState" oor:package="org.openoffice.Office.UI">
91 
90 http://openoffice.org/2004/installation"; 
oor:name="BaseWindowState" oor:package="org.openoffice.Office.UI">
82 
75 http://openoffice.org/2004/installation"; 
oor:name="Factories" oor:package="org.openoffice.Office.UI">
73 
72 
70 
68 http://openoffice.org/2004/installation"; 
oor:name="Canvas" oor:package="org.openoffice.Office">
59 
56 
56 http://openoffice.org/2004/installation"; 
oor:name="DbQueryWindowState" oor:package="org.openoffice.Office.UI">
53 
51 
50 http://openoffice.org/2004/installation"; 
oor:name="BibliographyCommands" oor:package="org.openoffice.Office.UI">
50 
49 
47 
47 
44 
43 
43 http://openoffice.org/2004/installation"; 
oor:name="ProtocolHandler" oor:package="org.openoffice.Office">
41 
36 
34 
33 
31 
27 
27 
2

Re: [Libreoffice] [PUSHED] Re: [PATCH 02/12] RTL_CONSTASCII_USTRINGPARAM in components cui options

2010-11-25 Thread Jan Holesovsky
Hi Wol,

On 2010-11-23 at 20:49 +, Wols Lists wrote:

> >  String aFoo = String::createFromAscii( "Something" )
> >
> > should be replaced, with
> >
> >  String aFoo( RTL_CONSTASCII_USTRINGPARAM( "Something" ) )
>
> Fine. Fixes in base will appear as I spot them :-) Just one important
> little point - the reason I asked is that I think the strings might
> actually be being passed to a non-OOo library - will this break a
> third-party library? (My C++-foo isn't good enough to answer this
> question for myself :-)

This 'String' is an LibO internal class too (usually called "tools
string"), so should be no problem.  Or do you mean something different?

Regards,
Kendy

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


Re: [Libreoffice] C++0x and LibreOffice

2010-11-25 Thread Caolán McNamara
On Thu, 2010-11-25 at 19:53 +0100, Pierre-André Jacquod wrote:
> Hello,
> thanks, will avoid some errors..
> 
> I guess this is not (yet ?) enabled per default / per configure choices?

Not yet.

> Since I am very weak with make and such tools: any possibility to enable
> it per option when running ./autogen.sh ? Activated if possible during
> the configure run?  Or an other way to let it run?

I intend to add a configure test to see if, when using gcc, the 
-std=c++0x option is accepted and if it is default to using it. The only
open question is, seeing as c++0x isn't finalized yet, what version of 
g++ is the earliest where -std=c++0x supports what we need. I'll
probably just toggle it on for gcc 4.5.1 and let people with earlier
versions experiment and see if tweaking the number lower works too.

C.

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


Re: [Libreoffice] installation on mac doesnt require read me or licenses

2010-11-25 Thread Christian Lohmaier
Hi Jonathan, *,

On Thu, Nov 25, 2010 at 1:50 PM, Jonathan Aquilina
 wrote:
> im happy with the way things are done on mac, but the folder that has the
> licenses i didnt even bother looking at that folder hence the suggestion for
> a mac package that would install LO in the app folder.

I agree with Thorsten - the way it is now is a feature - and also what
apple recommends regarding how to distribute your software. Unless you
need to check for existance of other stuff or rely on stuf being
installed to specific paths, then don't use an installer, but the
drag'n'drop installation method.

Switching to an installer will have many, many drawbacks, as even
packaging it would require a privileged user account (i.e. you would
have to build as root) and similar "nice" sideeffects. Not to mention
the loss of flexibility/the added complexity for the user.

With the drag'n'drop installer, the user is free to install test
versions side-by-side, without affecting another version (apart from
the user-config directory), can simply remove it or update it (i.e.
replace the old version)

While you could force the user to accept a licence with the
installer-method, I'd not want to switch to an installer package just
because of this.

If you want to force users to read/accept the licence, then change the
firststart-wizard accordingly. But I don't see the need for this
either. For a regular user is its almost impossible to not comply with
the licence anyway :-)
And those who want to do hacky stuff with it will look for the licence
in any case.

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


[Libreoffice] Fwd: Extensions code cleanup with patch

2010-11-25 Thread Roth Robert
-- Forwarded message --
From: Roth Robert 
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 
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
 {
 
 Reference xHdl = xMgr->createInstance(C2U("com.sun.star.task.InteractionHandler"));
 Reference 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 - 30.01.2002 - f...@openoffice.org
   

[Libreoffice] Extensions code cleanup

2010-11-25 Thread Roth Robert
Some more dead code and bogus comments removed from extensions. The license,
as always is LGPLv3+ / MPL.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] C++0x and LibreOffice

2010-11-25 Thread Pierre-André Jacquod
Hello,
thanks, will avoid some errors..

I guess this is not (yet ?) enabled per default / per configure choices?

Since I am very weak with make and such tools: any possibility to enable
it per option when running ./autogen.sh ? Activated if possible during
the configure run?  Or an other way to let it run?
Thanks for you help
Regards

On 11/24/2010 09:21 PM, Caolán McNamara wrote:
> LibreOffice should now be buildable with a C++0x compiler. Well at least
> g++ -std=c++0x on x86_64 Linux anyway.
> 
> Which may then allow the possibility to do some potentially interesting
> things with string literals and templates with anonymous classes etc.
> e.g. see sal/workben/measure_oustrings.cxx and the SAL_N_ELEMENTS
> template I mentioned earlier which could at compile-time detect misuse
> of SAL_N_ELEMENTS and RTL_CONSTASCII_USTRINGPARAM. 
> 
> C.
> 
> ___
> LibreOffice mailing list
> LibreOffice@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/libreoffice
> 

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


[Libreoffice] warnig and coding, need a little help on C++

2010-11-25 Thread Pierre-André Jacquod
Hello,
as I said, still in warm up phase and getting back familiar with C++..
So cleaning is a good exercise.

I got a compiler warning:

filters/binfilter/bf_sw/source/core/para/sw_paratr.cxx:214:26: warning:
'nTemp' may be used uninitialized in this function

for this:

case MID_DROPCAP_LINES :
{
 sal_Int8 nTemp;
 rVal >>= nTemp;
 if(nTemp >=1 && nTemp < 0x7f
 nLines = (BYTE)nTemp;
}

Well, that's fine for me, nTemp is effectively not initialized. And the
second line is then the same as: rVal = rVal >> nTemp

In my understanding, since nTemps is not initialized, if the compiler is
nice, nTemp is then defaulted to 0 (or NULL). Then rVal = rVal >> 0 make
not a lot of sense and is a true nop (no operation). And if the compiler
is not nice, I do not know which value has nTemp, i could almost use
random... So for me it seems the two first lines are not needed and even
dangerous.

OK, now the question: what did I missed ?

Thank for your help
regards
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] [PUSHED] Re: SmNodeToTextVisitor Fixes

2010-11-25 Thread Luke Dixon
Hello Caolán,

> I suggest you cut and paste the header from
> http://www.freedesktop.org/wiki/Software/LibreOffice/LicenseHeader
> into the top of that new file and stick your name in there as the
> original contributor as it is new code.

Thanks, that means a lot to me. I've attached a patch which does this.
Though I must mention that I had copied the test you had added and just
changed some bits.

> As an aside, in the test_starmath.cxx I hope to make it a cppunit
> build-time test equivalent testautomation/math/required/ and enable it
> to be built and executed on all platforms. I've been struggling a little
> bit with converting tests from
> testautomation/math/required/includes/m_002_.inc e.g. tmEditMarker into
> a build-time cppunit test given the dependencies that SmEditWindow has
> on basically a fully functioning Office environment, which I want to
> avoid. Easiest thing I'm now thinking is to tweak SmEditWindow itself to
> make it standlone testable.

Unfortunately I think I've jumped in a bit too deep here.
Looking at SmEditWindow it seems to depend on quite a bit of stuff that
I don't understand. I think that you are right about tweaking it so it
doesn't depend on these though, trying to fake the other parts would be
a nightmare.
I would offer to help, but I don't think I would know where to begin.
I'm very sorry.

Regards,
Luke
>From 79c433a9735346329c5cd812ce63cb2a5d8d3707 Mon Sep 17 00:00:00 2001
From: Luke Dixon <6b8b4...@gmail.com>
Date: Thu, 25 Nov 2010 14:26:18 +
Subject: [PATCH] Add license header to test_nodetotextvisitors.cxx

---
 starmath/qa/cppunit/test_nodetotextvisitors.cxx |   26 +++
 1 files changed, 26 insertions(+), 0 deletions(-)

diff --git a/starmath/qa/cppunit/test_nodetotextvisitors.cxx b/starmath/qa/cppunit/test_nodetotextvisitors.cxx
index cd8aee0..45386d1 100644
--- a/starmath/qa/cppunit/test_nodetotextvisitors.cxx
+++ b/starmath/qa/cppunit/test_nodetotextvisitors.cxx
@@ -1,4 +1,30 @@
 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Initial Developer of the Original Code is
+ *   Luke Dixon <6b8b4...@gmail.com>
+ * Portions created by the Initial Developer are Copyright (C) 2010 the
+ * Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
 
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_starmath.hxx"
-- 
1.7.3.2

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


Re: [Libreoffice] LibreOffice config migration

2010-11-25 Thread Michael Meeks

On Fri, 2010-10-15 at 19:23 +0200, André Schnabel wrote:
> Am 15.10.2010 17:21, schrieb Michael Meeks:
> > So - here is my suggestion ;-) hopefully it annoys everybody, and it is
> > two-fold.
..
> (no question on 1. - harden the code for migration)

> ...
> > 2. we continue to do automatic config migration since this is
> >a commonly desired use-case
> > *but*
> >as we migrate the settings the first time, we write into the
> >(original - ie. the old version)'s directory a stamp file
> >that says "these have been imported"
> > *and*
> >if the same version is run again with the new settings
> >directory removed (ie. someting went wrong); we prompt the
> >user on the second time:
> > "do you want to (re-)import settings from ABC install"
>
> Sounds like a reasonable compromise to me. Mechtilde?

Ok - so, I just pushed this to master, and will cherry-pick to 3.3 in a
bit; I didn't add the prompting piece - so, we essentially do a one-shot
migration from the old settings; and if people want to re-do that they
need to remove the 'MIGRATED' file from their old settings directory
(hopefully that is somewhat possible).

For post 3.3 - hopefully, we can have the dialog pop up - and it would
also be nice to have some graphical warning that we are about to restart
having done a settings migration, instead of the silent exit we have
now. I can't make myself use the non-layout dialog code though ;-) so -
must review Ricardo's new layout work next.

HTH,

Michael.

-- 
 michael.me...@novell.com  <><, Pseudo Engineer, itinerant idiot


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


[Libreoffice] [PATCH] Remove dead codes and undesired comments with fixed typo

2010-11-25 Thread Takeshi Abe
Hi,

yet another cleanup on base.

Cheers,
-- Takeshi Abe
>From dff2f8d6d37863a5517a412ea4f92ebdbee536ff Mon Sep 17 00:00:00 2001
From: Takeshi Abe 
Date: Fri, 26 Nov 2010 01:45:21 +0900
Subject: [PATCH] Remove dead codes and undesired comments with fixed typo

---
 dbaccess/source/ui/browser/sbagrid.cxx |3 -
 dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx  |1 -
 dbaccess/source/ui/dlg/ExtensionNotPresent.hrc |1 -
 dbaccess/source/ui/dlg/dbwizsetup.cxx  |1 -
 dbaccess/source/ui/inc/RefFunctor.hxx  |4 -
 dbaccess/source/ui/inc/TableRow.hxx|3 -
 dbaccess/source/ui/inc/sbagrid.hxx |2 -
 dbaccess/source/ui/misc/RowSetDrop.cxx |7 +-
 dbaccess/source/ui/misc/WCPage.cxx |5 +-
 dbaccess/source/ui/misc/WCopyTable.cxx |1 -
 dbaccess/source/ui/misc/WTypeSelect.cxx|1 -
 .../ui/relationdesign/RelationController.cxx   |2 -
 dbaccess/source/ui/tabledesign/TEditControl.cxx|   28 +
 .../source/ui/tabledesign/TableDesignControl.cxx   |3 -
 dbaccess/source/ui/tabledesign/TableDesignView.cxx |1 -
 reportdesign/inc/RptPage.hxx   |1 -
 reportdesign/inc/RptResId.hrc  |1 -
 reportdesign/qa/complex/ReportDesignerTest.java|   63 
 reportdesign/source/core/api/ReportDefinition.cxx  |   46 ++-
 reportdesign/source/core/inc/Tools.hxx |6 +-
 reportdesign/source/core/sdr/RptPage.cxx   |   29 +
 reportdesign/source/ui/dlg/AddField.cxx|8 +--
 reportdesign/source/ui/dlg/GroupsSorting.hrc   |   10 ---
 .../source/ui/inspection/GeometryHandler.cxx   |   15 +
 24 files changed, 22 insertions(+), 220 deletions(-)

diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx
index 23c7e24..e8d4459 100644
--- a/dbaccess/source/ui/browser/sbagrid.cxx
+++ b/dbaccess/source/ui/browser/sbagrid.cxx
@@ -257,8 +257,6 @@ void SAL_CALL SbaXGridControl::createPeer(const Reference< ::com::sun::star::awt
 
 // TODO: why the hell this whole class does not use any mutex?
 
-//	if (0 == m_nPeerCreationLevel)
-{
 Reference< ::com::sun::star::frame::XDispatch >  xDisp(getPeer(), UNO_QUERY);
 for (	StatusMultiplexerArray::iterator aIter = m_aStatusMultiplexer.begin();
 aIter != m_aStatusMultiplexer.end();
@@ -267,7 +265,6 @@ void SAL_CALL SbaXGridControl::createPeer(const Reference< ::com::sun::star::awt
 if ((*aIter).second && (*aIter).second->getLength())
 xDisp->addStatusListener((*aIter).second, (*aIter).first);
 }
-}
 }
 
 //---
diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx b/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx
index fe236af..d2efae3 100644
--- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx
+++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx
@@ -48,7 +48,6 @@ namespace dbaui
 //.
 
 class IDatabaseSettingsDialog;
-//		static	OGenericAdministrationPage*	CreateDbaseTabPage( Window* pParent, const SfxItemSet& _rAttrSet );
 
 
//
diff --git a/dbaccess/source/ui/dlg/ExtensionNotPresent.hrc b/dbaccess/source/ui/dlg/ExtensionNotPresent.hrc
index cb314b9..17b4d14 100644
--- a/dbaccess/source/ui/dlg/ExtensionNotPresent.hrc
+++ b/dbaccess/source/ui/dlg/ExtensionNotPresent.hrc
@@ -37,7 +37,6 @@
 #define BUTTON_HEIGHT		14
 #define BUTTON_WIDTH		55
 #define BROWSER_HEIGHT		75
-// #define PAGE_WIDTH			( CELL_PADDING + BUTTON_WIDTH + CELL_PADDING + BUTTON_WIDTH + CELL_PADDING)
 #define LEFT_PADDING32 /* size for the icon */
 #define RIGHT_PADDING   16
 #define DLG_WIDTH			( 250 )
diff --git a/dbaccess/source/ui/dlg/dbwizsetup.cxx b/dbaccess/source/ui/dlg/dbwizsetup.cxx
index 5c2d19a..3e64f82 100644
--- a/dbaccess/source/ui/dlg/dbwizsetup.cxx
+++ b/dbaccess/source/ui/dlg/dbwizsetup.cxx
@@ -181,7 +181,6 @@ ODbTypeWizDialogSetup::ODbTypeWizDialogSetup(Window* _pParent
 m_pOutSet = new SfxItemSet( *_pItems->GetPool(), _pItems->GetRanges() );
 
 m_pImpl->translateProperties(xDatasource, *m_pOutSet);
-//	eType = m_pImpl->getDatasourceType(*m_pOutSet);
 
 SetPageSizePixel(LogicToPixel(::Size(WIZARD_PAGE_X, WIZARD_PAGE_Y), MAP_APPFONT));
 ShowButtonFixedLine(sal_True);
diff --git a/dbaccess/source/ui/inc/RefFunctor.hxx b/dbaccess/source/ui/inc/RefFunctor.hxx
index 6e33ef2..7782fec 100644
--- a/dbaccess/source/ui/inc/RefFunctor.hxx
+++ b/dbaccess/source/ui/inc/RefFunctor.hxx
@@ -47,10 +47,6 @@ namespace dbaui
 {
 m_aFunction(_aType.get());
 }
-//		inline void operator()(const ::rtl::Reference& _aType)
-//	

Re: [Libreoffice] Are ISC/BSD-licensed contributions acceptable?

2010-11-25 Thread Michael Meeks
Hi Wols,

On Thu, 2010-11-25 at 16:31 +, Wols Lists wrote:
> Have we got a standard LibreOffice header to go into new files ?

Yes COPYING.NEWFILES in the toplevel has the stock header.

>  If not, I'm quite happy to craft one, along with a policy that tells people 
> what
> to do and how we expect them to claim any relevant copyrights. And yes,
> I would very much take into considerations concerns about keeping the
> list of people low, we don't want too many names in the files or too
> many licences in the licence file. Basically, minor changes you have to
> look at git, licences mustn't explicitly name a copyright holder.

Really; not mixing licenses within the same file is much to be
preferred; and if people insist on XYZ crazy-license, to have LGPLv3
+/MPL/ as a triple would be best.

HTH,

Michael.

-- 
 michael.me...@novell.com  <><, Pseudo Engineer, itinerant idiot


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


Re: [Libreoffice] Are ISC/BSD-licensed contributions acceptable?

2010-11-25 Thread Wols Lists
On 25/11/10 14:47, Sebastian Spaeth wrote:
> Because it makes lifes more complex, see above? Do you really want
> file.cxx to start like this? 
>
> /** 45 lines of this code come from Wol, who licensed them under the
>  * BSD. But when you are reading this, it has been merged with 10 lines
>  * contributed under the Apache license, which is probably be moot 
>  * because 5 lines of those had their variables renamed by a guy who 
>  * happened to like the WTFPL. 
>  * Parts of these things were perhaps copied into file2.cxx during 
>  * refactoring by someone contributing under the lzlib
>  * artistic license/CC-0 dual licensing. Have a nice day.  **/
>
I hadn't thought of refactoring ... :-)

But I think the basics should be that (a) it has to be LGPL-compatible,
and (b) unless it is a major alteration/addition you don't get to monkey
with the licence on the file.

I like playing with legalese, although we'd need a proper lawyer to go
over it. That said, I've found plenty mistakes checking a lawyer's work :-)

Have we got a standard LibreOffice header to go into new files? If not,
I'm quite happy to craft one, along with a policy that tells people what
to do and how we expect them to claim any relevant copyrights. And yes,
I would very much take into considerations concerns about keeping the
list of people low, we don't want too many names in the files or too
many licences in the licence file. Basically, minor changes you have to
look at git, licences mustn't explicitly name a copyright holder.

Would you like me to have a go?

Cheers,
Wol

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


Re: [Libreoffice] Are ISC/BSD-licensed contributions acceptable?

2010-11-25 Thread Sebastian Spaeth
On Thu, 25 Nov 2010 13:21:33 +, Wols Lists wrote:
> > and edited. Tracking which line of code is licensed under which license
> > combo is a job for lawyer detectives that nobody wants to pay in the
> > end. And most probably they could not give you definitive answers anyway
> > as that case has never been tested in court in $LEGAL_DISTRICT. Pfeew.
> 
> But that's the point of using something like git :-)

Right, so examine every bit of history of every line? What if I modify
your BSD licensed code but only do so under the LGPL/MPL? Tracking that
is horrific even with nice tools such as git. And answers as to what
kind of modification is necessary to count as derived is probably legal
gray area: removing whitespaces, renaming all variable names?
 
> Provided we have a policy that says "the project licence is X, all
> contributions must be compatible" I don't see that it matters WHAT
> licence contributors use. If the project policy is LGPL3+, then I don't
> think it actually makes a blind bit of difference what other licences
> people use.

Right, this policy enables us to integrate BSD-licensed 3rd party code
and I have no problem with it. But by saying, it's ok to write a patch
especially for LO and put it under any license, complicates matters and
bloats our file headers. How many copies of the "Do What The Fuck You
Want To Public License " (http://sam.zoy.org/wtfpl/) do you want in our
source files just because someone happens to like that one? (I know I
do). It brings no effecive benefit and bloats and complicates
matters. And that is against the spirit of said liberal licenses.

> It's tricky, but imho the rule should be if you make a major
> contribution to a file then you add your copyright notice. In general,
> patches, fixes, etc shouldn't. And possibly we add a line that says
> "copyright assorted contributors - see git history for details".

Sure, I agree, that copyright should be made explicit. (although git
helps a lot with finding that out)
 
[snip more copyright stuff]

This is not about copyright at all, I agree with you. It should be and
remains yours, no doubt.

> We want to get it right. If not, we could be storing up legal trouble
> down the line. But at the end of the day, if the consensus is that we
> want to be an LGPL project, then simply saying "all contributions must
> be LGPL3+ compatible" keeps us out of trouble. If contributors want to
> use BSD etc why should we care? 

Because it makes lifes more complex, see above? Do you really want
file.cxx to start like this? 

/** 45 lines of this code come from Wol, who licensed them under the
 * BSD. But when you are reading this, it has been merged with 10 lines
 * contributed under the Apache license, which is probably be moot 
 * because 5 lines of those had their variables renamed by a guy who 
 * happened to like the WTFPL. 
 * Parts of these things were perhaps copied into file2.cxx during 
 * refactoring by someone contributing under the lzlib
 * artistic license/CC-0 dual licensing. Have a nice day.  **/

:-)

But I won't argue any further, I just want an easy life, and consistent
licensing makes my life easier. I'll shut up now.

Sebastian


pgpc6utsmS2VK.pgp
Description: PGP signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] quick starter applet/systray defaults and various confusion

2010-11-25 Thread Michael Meeks
Hi Caolan,

On Thu, 2010-11-25 at 09:42 +, Caolán McNamara wrote:
> On Fri, 2010-11-19 at 15:37 +, Caolán McNamara wrote:
> > 3) We should probably instead modify InitializeQuickStartMode to
> > effectively || Sfx::ShutdownIcon::GetAutostart() with the IsQuickStart
> > command line argument.
> > 
> > If we were to do all through, the first thing people would notice is
> > that the quickstart applet/systray would appear to change from defaulted
> > on to defaulted off. 
> 
> I've pushed this change to master. If there is no complaints or horrific
> fallout I propose to cherrypick it for 3.3 in a few days.

That would be brilliant - I'm testing migration, and it's certainly an
underwhelming mis-feature that pops up and part-mangles that.

Thanks !

Michael.

-- 
 michael.me...@novell.com  <><, Pseudo Engineer, itinerant idiot


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


Re: [Libreoffice] quick starter applet/systray defaults and various confusion

2010-11-25 Thread Michael Meeks

On Thu, 2010-11-25 at 13:14 +, Caolán McNamara wrote:
> This seems to work, e.g. the attached.

Looks great to me :-) [ still puzzling over the migration swamp
though ].

Regards,

Michael.

-- 
 michael.me...@novell.com  <><, Pseudo Engineer, itinerant idiot


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


Re: [Libreoffice] Are ISC/BSD-licensed contributions acceptable?

2010-11-25 Thread Gioele Barabucci

Wols Lists 25/11/2010 14:21:

It's tricky, but imho the rule should be if you make a major
contribution to a file then you add your copyright notice. In general,
patches, fixes, etc shouldn't. And possibly we add a line that says
"copyright assorted contributors - see git history for details".


"Major" is quite hard to define, I'd say impossible, given that almost 
every contry has its own threshold for what is and what isn't a "major 
change".


My take is: whoever made a commit to a file should be in the list of the 
authors for a file. There can be problems with people trying to "sneak 
in the authors' list", as Michael Meeks pointed out. But that is just 
unavoidable, just be careful with what patches you accept.


Git can help you track down the authors (and there should be automated 
tools to do that; in my spare time I'm working on one) but there should 
also be external bookkeepers for pre-git commits and for commits not 
made by the original author.



BUT. As far as my contributions so far are concerned I don't even know
if they are significant enough to be worthy of copyright! If I was asked
to assign a licence I would say BSD but even that's overkill for what I
think they're worth :-)


That is the exact reason I wanted to use the ISC license. But if somehow 
that makes things harder to integrate and maintain...



We want to get it right. If not, we could be storing up legal trouble
down the line. But at the end of the day, if the consensus is that we
want to be an LGPL project, then simply saying "all contributions must
be LGPL3+ compatible" keeps us out of trouble.  If contributors want to
use BSD etc why should we care?


The problems usually arise with the contribution of non-BSD patches on 
top of BSD patches that are on top of other non-BSD patches. Go figure 
it out what are you contributing to.



And if third parties want to extract
said BSD code, why should we make their life easy (or hard :-) ? If they
want the code, it's their problem :-)


I could not agree more ;)

--
Gioele Barabucci 

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


Re: [Libreoffice] Are ISC/BSD-licensed contributions acceptable?

2010-11-25 Thread Michael Meeks
Hi Wols,

On Thu, 2010-11-25 at 13:21 +, Wols Lists wrote:
> But that's the point of using something like git :-)

True.

> Provided we have a policy that says "the project licence is X, all
> contributions must be compatible" I don't see that it matters WHAT
> licence contributors use. If the project policy is LGPL3+

We are trying to be LGPLv3+/MPL dual at a minimum; being more liberally
licensed is (for me) no real problem license-wise.

> It's tricky, but imho the rule should be if you make a major
> contribution to a file then you add your copyright notice. In general,
> patches, fixes, etc shouldn't. And possibly we add a line that says
> "copyright assorted contributors - see git history for details".

Right.

> BUT. As far as my contributions so far are concerned I don't even know
> if they are significant enough to be worthy of copyright! If I was asked
> to assign a licence I would say BSD but even that's overkill for what I
> think they're worth :-)

Ah - well, we value them - for sure !

> If contributors want to use BSD etc why should we care? And if third
> parties want to extract said BSD code, why should we make their life
> easy (or hard :-) ? If they want the code, it's their problem :-)

Sure - but the problem is - foreach (license-used) - which in the BSD
case tends to include the (C) and author line - we need to whack that
block of text into the license file / documentation. Check the number of
duplicate BSD license statements in the iPhone help/documentation as an
example.

That is a royal PITA to maintain; and it gives undue credit to whomever
writes a two line changes under a bespoke BSD license, where
little-to-none is given to those doing thousands of changes under the
project license :-)

Of course, perhaps I mis-understood something; but at least for a small
chunk of file, I'd really like to keep our licensing situation simple
(if possible).

Regards,

Michael.

-- 
 michael.me...@novell.com  <><, Pseudo Engineer, itinerant idiot

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


[Libreoffice] [Pushed] Another Base cleanup

2010-11-25 Thread Michael Meeks

Nice, thanks !

Michael.

-- 
 michael.me...@novell.com  <><, Pseudo Engineer, itinerant idiot


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


Re: [Libreoffice] ucb/source/ucb compilation error

2010-11-25 Thread Michael Meeks
Hi Miklos,

On Thu, 2010-11-25 at 11:17 +0100, Miklos Vajna wrote:
> OK - I'm attaching an updated patch, containing the license.

Looks great to me; lets get it in ! :-)

Thanks,

Michael.

-- 
 michael.me...@novell.com  <><, Pseudo Engineer, itinerant idiot


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


[Libreoffice] [PATCH] Another Base cleanup

2010-11-25 Thread Wols Lists
Cheers,
Wol
>From 6642a11fbcfa7f2f4f35f5535ffe8c33fa856309 Mon Sep 17 00:00:00 2001
From: Wol 
Date: Thu, 25 Nov 2010 13:04:08 +
Subject: [PATCH 4/4] Dead code deletion

---
 dbaccess/source/ui/querydesign/JoinDesignView.cxx  |1 -
 dbaccess/source/ui/querydesign/QueryDesignView.cxx |1 -
 dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx |9 -
 .../source/ui/tabledesign/TableFieldControl.cxx|3 ---
 .../source/ui/tabledesign/TableFieldDescWin.cxx|1 -
 dbaccess/source/ui/tabledesign/TableRow.cxx|4 +---
 .../source/ui/tabledesign/TableRowExchange.cxx |7 ---
 dbaccess/source/ui/tabledesign/TableUndo.cxx   |3 ---
 8 files changed, 1 insertions(+), 28 deletions(-)

diff --git a/dbaccess/source/ui/querydesign/JoinDesignView.cxx 
b/dbaccess/source/ui/querydesign/JoinDesignView.cxx
index 86545a6..f917f00 100644
--- a/dbaccess/source/ui/querydesign/JoinDesignView.cxx
+++ b/dbaccess/source/ui/querydesign/JoinDesignView.cxx
@@ -49,7 +49,6 @@
 #include 
 #include "UITools.hxx"
 #include "JoinTableView.hxx"
-// #include 
 
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::lang;
diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx 
b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
index 920fb54..1e1aa76 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
@@ -375,7 +375,6 @@ namespace
 {
 ::rtl::OUString aDBName(pEntryTab->GetComposedName());
 
-// Reference< XConnection> xConnection = 
static_cast(_pView->getController()).getConnection();
 if( _xConnection.is() )
 {
 try
diff --git a/dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx 
b/dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx
index 05384fd..b0fc9c5 100644
--- a/dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx
+++ b/dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx
@@ -110,11 +110,6 @@ OTableEditorCtrl* OFieldDescGenWin::GetEditorCtrl()
 }
 #endif
 
//--
-//short OFieldDescGenWin::GetFormatCategory(OFieldDescription* pFieldDescr)
-//{
-// return m_pFieldControl->GetFormatCategory(pFieldDescr);
-//}
-//--
 void OFieldDescGenWin::SaveData( OFieldDescription* pFieldDescr )
 {
 DBG_CHKTHIS(OFieldDescGenWin,NULL);
@@ -184,8 +179,4 @@ void OFieldDescGenWin::paste()
 }
 // 
-
 
-
-
-
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/tabledesign/TableFieldControl.cxx 
b/dbaccess/source/ui/tabledesign/TableFieldControl.cxx
index 60cc7ea..65b0dfc 100644
--- a/dbaccess/source/ui/tabledesign/TableFieldControl.cxx
+++ b/dbaccess/source/ui/tabledesign/TableFieldControl.cxx
@@ -153,7 +153,4 @@ sal_Bool OTableFieldControl::isAutoIncrementValueEnabled() 
const
 }
 // 
-
 
-
-
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx 
b/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx
index d5dab97..bf506d1 100644
--- a/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx
+++ b/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx
@@ -317,5 +317,4 @@ long OTableFieldDescWin::PreNotify( NotifyEvent& rNEvt )
 return bHandled ? 1L : TabPage::PreNotify(rNEvt);
 }
 
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/tabledesign/TableRow.cxx 
b/dbaccess/source/ui/tabledesign/TableRow.cxx
index 568e7c3..1ca7d53 100644
--- a/dbaccess/source/ui/tabledesign/TableRow.cxx
+++ b/dbaccess/source/ui/tabledesign/TableRow.cxx
@@ -156,7 +156,7 @@ namespace dbaui
 _rStr << sal_Int32(pFieldDesc->IsAutoIncrement() ? 1 : 0);
 _rStr << sal_Int32(pFieldDesc->IsPrimaryKey() ? 1 : 0);
 _rStr << sal_Int32(pFieldDesc->IsCurrency() ? 1 : 0);
-} // if(pFieldDesc)
+}
 else
 _rStr << (sal_Int32)0;
 return _rStr;
@@ -226,6 +226,4 @@ namespace dbaui
 // 
-
 }
 
-
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/tabledesign/TableRowExchange.cxx 
b/dbaccess/source/ui/tabledesign/TableRowExchange.cxx
index 6eabff9..249698c 100644
--- a/dbaccess/source/ui/tabledesign/TableRowExchange.cxx
+++ b/dbaccess/source/ui/tabledesign/TableRowExchange.cxx
@@ -81,11 +81,4 @@ namespace dbaui
 // 
-
 }
 
-
-
-
-
-
-
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/tabledesign/TableUndo.cxx 
b/dbaccess/source/ui/tabledesign/TableUndo.cxx
ind

Re: [Libreoffice] Are ISC/BSD-licensed contributions acceptable?

2010-11-25 Thread Wols Lists
On 23/11/10 15:15, Sebastian Spaeth wrote:
> While I personally don't mind BSD licenses, I don't think this helps
> your goal. The code is bound to be merged, overwritten, copied, moved
> and edited. Tracking which line of code is licensed under which license
> combo is a job for lawyer detectives that nobody wants to pay in the
> end. And most probably they could not give you definitive answers anyway
> as that case has never been tested in court in $LEGAL_DISTRICT. Pfeew.

But that's the point of using something like git :-)

> Can't we just bite our tongues and stick to as simple (ie dual license
> although I still don't see the use case for the MPL here) licensing
> scheme? For historical reasons we cannot go BSD, so we should go for the
> next best thing and use the very liberal LGPL consistently IMHO. Adding
> in bits of even more liberal license pieces isn't going to help the
> whole legal clarity and ease of sharing argument here.

Provided we have a policy that says "the project licence is X, all
contributions must be compatible" I don't see that it matters WHAT
licence contributors use. If the project policy is LGPL3+, then I don't
think it actually makes a blind bit of difference what other licences
people use.

It's tricky, but imho the rule should be if you make a major
contribution to a file then you add your copyright notice. In general,
patches, fixes, etc shouldn't. And possibly we add a line that says
"copyright assorted contributors - see git history for details".

BUT. As far as my contributions so far are concerned I don't even know
if they are significant enough to be worthy of copyright! If I was asked
to assign a licence I would say BSD but even that's overkill for what I
think they're worth :-)

> Sorry, could not resist
> Sebastian
We want to get it right. If not, we could be storing up legal trouble
down the line. But at the end of the day, if the consensus is that we
want to be an LGPL project, then simply saying "all contributions must
be LGPL3+ compatible" keeps us out of trouble. If contributors want to
use BSD etc why should we care? And if third parties want to extract
said BSD code, why should we make their life easy (or hard :-) ? If they
want the code, it's their problem :-)

Cheers,
Wol
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] quick starter applet/systray defaults and various confusion

2010-11-25 Thread Caolán McNamara
On Wed, 2010-11-24 at 20:50 +, Caolán McNamara wrote:
> On Wed, 2010-11-24 at 12:04 +0100, David Tardon wrote:
> > Does anyone have any clever idea how to prevent that?
> 
> How about we over-engineer and..
> 
> a) use osl_getModuleURLFromFunctionAddress or something of that nature
> to get the filename of the physical .so that we were originally dlopened
> on
> b) Get a GFileMonitor from gio via g_file_monitor for that .so and
> attach to its "changed" signal to get notified when that .so has been
> deleted, and turn off the quickstarter (or get it to disable its menus
> and sommat like "LibreOffice upgraded restart needed!" :-0) when that
> happens.

This seems to work, e.g. the attached.

C.
diff --git a/sfx2/source/appl/makefile.mk b/sfx2/source/appl/makefile.mk
index 72ac94a..a583102 100644
--- a/sfx2/source/appl/makefile.mk
+++ b/sfx2/source/appl/makefile.mk
@@ -53,6 +53,10 @@ CFLAGS+=-DENABLE_QUICKSTART_APPLET
 CDEFS+=-DDLL_NAME=libsfx$(DLLPOSTFIX)$(DLLPOST)
 .IF "$(ENABLE_SYSTRAY_GTK)"=="TRUE"
 PKGCONFIG_MODULES=gtk+-2.0
+.IF "$(ENABLE_GIO)"!=""
+PKGCONFIG_MODULES+=gio-2.0
+CDEFS+=-DENABLE_GIO
+.ENDIF
 .INCLUDE: pkg_config.mk
 CFLAGS+=$(PKGCONFIG_CFLAGS)
 CFLAGS+=-DENABLE_QUICKSTART_APPLET
diff --git a/sfx2/source/appl/shutdowniconunx.cxx b/sfx2/source/appl/shutdowniconunx.cxx
index e31c32f..1b78f9b 100644
--- a/sfx2/source/appl/shutdowniconunx.cxx
+++ b/sfx2/source/appl/shutdowniconunx.cxx
@@ -19,6 +19,10 @@
 #include "shutdownicon.hxx"
 #endif
 
+#ifdef ENABLE_GIO
+#include 
+#endif
+
 // Cut/paste from vcl/inc/svids.hrc
 #define SV_ICON_SMALL_START 25000
 
@@ -39,6 +43,9 @@ static EggTrayIcon *pTrayIcon;
 static GtkWidget *pExitMenuItem = NULL;
 static GtkWidget *pOpenMenuItem = NULL;
 static GtkWidget *pDisableMenuItem = NULL;
+#ifdef ENABLE_GIO
+GFileMonitor* pMonitor = NULL;
+#endif
 
 static void open_url_cb( GtkWidget *, gpointer data )
 {
@@ -358,6 +365,22 @@ extern "C" {
 }
 }
 
+#ifdef ENABLE_GIO
+/*
+ * See rhbz#610103. If the quickstarter is running, then LibreOffice is
+ * upgraded, then the old quickstarter is still running, but is now unreliable
+ * as the old install has been deleted. A fairly intractable problem but we
+ * can avoid much of the pain if we turn off the quickstarter if we detect
+ * that it has been physically deleted.
+*/
+static void notify_file_changed(GFileMonitor * /*gfilemonitor*/, GFile * /*arg1*/,
+GFile * /*arg2*/, GFileMonitorEvent event_type, gpointer /*user_data*/)
+{
+if (event_type == G_FILE_MONITOR_EVENT_DELETED)
+exit_quickstarter_cb(GTK_WIDGET(pTrayIcon));
+}
+#endif
+
 void SAL_DLLPUBLIC_EXPORT plugin_init_sys_tray()
 {
 ::SolarMutexGuard aGuard;
@@ -403,6 +426,20 @@ void SAL_DLLPUBLIC_EXPORT plugin_init_sys_tray()
 
 g_signal_connect(GTK_WIDGET(pTrayIcon), "destroy",
 G_CALLBACK(exit_quickstarter_cb), NULL);
+
+#ifdef ENABLE_GIO
+GFile* pFile = NULL;
+rtl::OUString sLibraryFileUrl;
+if (osl::Module::getUrlFromAddress(plugin_init_sys_tray, sLibraryFileUrl))
+pFile = g_file_new_for_uri(rtl::OUStringToOString(sLibraryFileUrl, RTL_TEXTENCODING_UTF8).getStr());
+
+if (pFile)
+{
+if ((pMonitor = g_file_monitor_file(pFile, G_FILE_MONITOR_NONE, NULL, NULL)))
+g_signal_connect(pMonitor, "changed", (GCallback)notify_file_changed, NULL); 
+g_object_unref(pFile);
+}
+#endif
 }
 
 void SAL_DLLPUBLIC_EXPORT plugin_shutdown_sys_tray()
@@ -411,6 +448,17 @@ void SAL_DLLPUBLIC_EXPORT plugin_shutdown_sys_tray()
 if( !pTrayIcon )
 return;
 
+#ifdef ENABLE_GIO
+if (pMonitor)
+{
+g_signal_handlers_disconnect_by_func(pMonitor,
+(void*)notify_file_changed, pMonitor);
+g_file_monitor_cancel(pMonitor);
+g_object_unref(pMonitor);
+pMonitor = NULL;
+}
+#endif
+
 /* we have to set pTrayIcon to NULL now, because gtk_widget_destroy
  * causes calling exit_quickstarter_cb (which then calls this func.)
  * again -> crash.
@@ -419,7 +467,7 @@ void SAL_DLLPUBLIC_EXPORT plugin_shutdown_sys_tray()
  */
 GtkWidget* const pIcon = GTK_WIDGET( pTrayIcon );
 pTrayIcon = NULL;
-	gtk_widget_destroy( pIcon );
+gtk_widget_destroy( pIcon );
 
 pExitMenuItem = NULL;
 pOpenMenuItem = NULL;
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] Are ISC/BSD-licensed contributions acceptable?

2010-11-25 Thread Michael Meeks

On Mon, 2010-11-22 at 09:47 +0100, Gioele Barabucci wrote:
> in bug #31633 I proposed a patch to one of the export filters.

I've just committed it; sorry for delay.

It's great to have you prodding at this piece of the code. One of the
sad things about the XSLT filters is that they require Java - yielding
not only a performance problem, but a nightmare for those without Java
installed. Perhaps this underlies some reluctance here too:

https://bugs.freedesktop.org/show_bug.cgi?id=31624

around associating with this file type by default (in case you have no
working Java).

It would be simply wonderful to re-use the libxslt code (that we
already ship) for the XSLT filter. I wonder if you might be interested
in that ? if not - adding an easy hack to the wiki would be good [ and
pointing me at it so we can add some code pointers as to how to do
that ].

Thanks !

Michael.

-- 
 michael.me...@novell.com  <><, Pseudo Engineer, itinerant idiot


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


Re: [Libreoffice] installation on mac doesnt require read me or licenses

2010-11-25 Thread Jonathan Aquilina
im happy with the way things are done on mac, but the folder that has the
licenses i didnt even bother looking at that folder hence the suggestion for
a mac package that would install LO in the app folder.

On Thu, Nov 25, 2010 at 1:11 PM, Thorsten Behrens <
t...@documentfoundation.org> wrote:

> Jonathan Aquilina wrote:
> > hey guys i'm noticing something interesting. wouldn't it be better
> > to use an installer to make sure the read me's as well as the
> > licenses get installed in the LO directory. currently the way it is
> > i don't have to drag either of them into the application directory.
> >
> Hi Jonathan,
>
> well - I consider that a feature? As it is now, chances are probably
> higher that a user notices the licenses in the first place. ;)
>
> Cheers,
>
> -- Thorsten, who doesn't really like installers on Mac
>



-- 
Jonathan Aquilina
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] Crash after Preference selection on Mac

2010-11-25 Thread Thorsten Behrens
Chris Makepeace wrote:
> Libre Office (current) and OOo (3.2.1) is repeatedly crashing as I go into
> Preferences (Mac language for 'Options').
> 
> The system console reports that the crash is related to JavaNativeFoundation
> and the crash log makes no mention of Java but does spend 771 lines
> reporting a lot else.
> 
> iMac running OS X 10.6.5
> 
Hi Chris,

hmmm - never seen this, could you please file a bug at
bugs.freedesktop.org and especially attach the console log there?

Thanks,

-- Thorsten


pgp14LeE2BtBd.pgp
Description: PGP signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] installation on mac doesnt require read me or licenses

2010-11-25 Thread Thorsten Behrens
Jonathan Aquilina wrote:
> hey guys i'm noticing something interesting. wouldn't it be better
> to use an installer to make sure the read me's as well as the
> licenses get installed in the LO directory. currently the way it is
> i don't have to drag either of them into the application directory.
>
Hi Jonathan,

well - I consider that a feature? As it is now, chances are probably
higher that a user notices the licenses in the first place. ;)

Cheers,

-- Thorsten, who doesn't really like installers on Mac


pgpP2wQQP32hH.pgp
Description: PGP signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] compilation of LO on mac

2010-11-25 Thread Thorsten Behrens
Jonathan Aquilina wrote:
> hey guys is it possible to compile LO on mac osx? if so what
> dependencies does one need to satisfy before compiling it.
>
Hi Jonathan,

sure - please read up here for details:

http://wiki.documentfoundation.org/Development/How_to_build#Mac_OS_X

Don't hesitate to ask, either here or on #libreoffice - I think I've
seen you there already. ;)

Cheers,

-- Thorsten


pgpdtChX3e9CL.pgp
Description: PGP signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] Auto-detection of toolbar icon size (well, kinda)

2010-11-25 Thread Tor Lillqvist
>>> On 2010-11-25 at 12:47,  wrote:
> On Thu. 25.11.2010 10:19, Michael Meeks wrote:
>>> prompted by some complaints on too large icons on Mac, switched the
>>> icon size from 'large' to 'auto' for 3.3.
>>
>>  Did we ever get some screenshots of the perceived problem ? I asked in
>> some bug, but never got that back AFAIR.
>>
>>> this was already in place for windows
>>
>>  I really think the small icons are a usability, and legibility disaster
>> when used on large screens - and there is a real risk of selecting them;
>>
>>  My concern is for Windows really - I'd want the vast majority of users
>> on>  1024x768 to have large icons.
> 
> That's fine, but the large Icons are (about 50%) *too* large. I'm on 
> Windows 7, have a 19" monitor, ratio: 4:5, resolution: 1280x1024 and I 
> cannot fit the icons I want into the Toolbar.
> 
> See screen-shot: 
> http://picasaweb.google.com/lh/photo/akH_sf-pDibweqBLML-dcQ?feat=directlink 
> 
> The situation is made worse by the very poor quality of the icon images. 
> For instance:
> 
> 1. The "New document" icon looks more like a fireplace than the standard 
> (a blank white rectangle).
> 
> 2. the "Open Document" icon doesn't look like most open icons (yellow 
> folder) and looks worse (so deviating from the standard was not an 
> improvement).
> 
> 3. The "Close Document" icon is a black X. That symbol almost always 
> means *delete*.
> 
> 4. The "Print" icon is too blurry. Even at the too large size it is less 
> recognizable than the much smaller Print icons of most other applications.
> 
> 5. There is no "Page Settings " icon.
> 
> 6. The "Zoom" icon looks too much like a find icon. Pot. solution: add a 
> "+" inside the magnifier.
> 
> 7. The "Review Changes" Toolbar icons don't have icons (only text).
> 
> 8. The "Styles and Formatting" icon looks like a 
> Even users in non-localized countries will recognize the B 
> I U better than A A A, even if they don't know what the letters stand 
> for. Even Windows Live Writer uses B I U.

These icons *are* localised, as far as I can see. At least in beta3 on Windows, 
in Swedish, they show up as

   F K U

I guess I don't need to spell it out what English phrase those big ugly letters 
always make me think of.

--tml


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


Re: [Libreoffice] Auto-detection of toolbar icon size (well, kinda)

2010-11-25 Thread Michael Meeks
Hi Peter,

On Thu, 2010-11-25 at 11:47 +0100, Peter Lairo wrote:
> That's fine, but the large Icons are (about 50%) *too* large. I'm on 
> Windows 7, have a 19" monitor, ratio: 4:5, resolution: 1280x1024 and I 
> cannot fit the icons I want into the Toolbar.

From your screenshot: you are using Beta2 (or Kendy didn't fix the
fallback to Industrial) - one or the other; can you try again with
Beta3 ?

> The situation is made worse by the very poor quality of the icon images. 
> For instance:

This should be rather better in Beta3, particularly wrt. consistent
sizing and colouring; there are also some rather nasty bugs in B2, now
fixed in B3 :-)

> 1. The "New document" icon looks more like a fireplace than the standard 
> (a blank white rectangle).

And that is odd.

> 5. There is no "Page Settings " icon.

Odd; it is unclear to me how we can not have an icon that is included
in the base icon set: that sounds like deep brokenness; we should fall
back to the original icons - Kendy - again ? or is this not a regression
- perhaps there never was an icon for that ?

> 7. The "Review Changes" Toolbar icons don't have icons (only text).

So - any artist that wants to jump on that is much appreciated.

> 9. The *Bold* /Italics/ and _Underline_ icons should be the letters *B* 
> /I/ and _U_ (and localized where possible). Using only "A"s is much less 
> recognizable. Even users in non-localized countries will recognize the B 
> I U better than A A A, even if they don't know what the letters stand 
> for. Even Windows Live Writer uses B I U. Using only A A A shows a lack 
> of understanding of basic usability principles. (This is also a pet 
> peeve of mine with the current crop of Thunderbird developers.)

So - provide the (consistent) artwork, and we'll ship it; what I
suggest is that we leave A,A,A as the fallback for all locales, and add
locale specific versions for en_US etc. [ the code is there for this, we
just need the artwork lovingly creating ] - go for it.

> Icons need to be *quickly* recognized. That should be the #1 priority. 
> *Every* other factor (e.g. aesthetics) is a *distant* second to 
> recognizability.

Of course; no one is suggesting otherwise.

However, tiny icons are -far- harder to make distinct, and recognisable
[ 'printer settings' in 16x16 pixels eg. ;-], and the fact that your
(rather customised) toolbar does not fit on the screen - does not really
affect the decision to change the defaults IMHO.

If you want to add lots of new icons, and toolbars, then you can also
set the size to small manually :-) I think the main concern is to make
sure the defaults are visible, clear and usable for beginners.

Having said that - the best way to improve the icons, is to work on
them yourself - or find someone that can for you.

Thanks,

Michael.

-- 
 michael.me...@novell.com  <><, Pseudo Engineer, itinerant idiot

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


Re: [Libreoffice] ucb/source/ucb compilation error

2010-11-25 Thread Miklos Vajna
On Thu, Nov 25, 2010 at 03:33:08AM -0700, Tor Lillqvist  
wrote:
> Sure, although I think I would prefer to keep OSL_THIS_FUNC as ""
> instead of "(unknown)" in the fallback case.

OK, I just changed that and pushed it.

> So, you think the i#114290 argument that neither __PRETTY_FUNCTION__
> nor __func__ can be used because neither is a string literal and thus
> can't be compile-time concatenated with other string literals is
> bogus?

Yes, to my understanding.

> As such, it is true of course that they can't be used like that. But
> is the proper solution then just to not try to use OSL_THIS_FUNC in
> that way? Instead just pass it as a separate argument to printf (yeah,
> my C background shows through) or whatever?

I think, so. At least my use-case is like this:

OSL_TRACE("%s: unhandled segment '%x' in the path", OSL_THIS_FUNC, nSeg);


pgppjBFQvIrgz.pgp
Description: PGP signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] Auto-detection of toolbar icon size (well, kinda)

2010-11-25 Thread Peter Lairo

On Thu. 25.11.2010 10:19, Michael Meeks wrote:

prompted by some complaints on too large icons on Mac, switched the
icon size from 'large' to 'auto' for 3.3.


Did we ever get some screenshots of the perceived problem ? I asked in
some bug, but never got that back AFAIR.


this was already in place for windows


I really think the small icons are a usability, and legibility disaster
when used on large screens - and there is a real risk of selecting them;

My concern is for Windows really - I'd want the vast majority of users
on>  1024x768 to have large icons.


That's fine, but the large Icons are (about 50%) *too* large. I'm on 
Windows 7, have a 19" monitor, ratio: 4:5, resolution: 1280x1024 and I 
cannot fit the icons I want into the Toolbar.


See screen-shot: 
http://picasaweb.google.com/lh/photo/akH_sf-pDibweqBLML-dcQ?feat=directlink


The situation is made worse by the very poor quality of the icon images. 
For instance:


1. The "New document" icon looks more like a fireplace than the standard 
(a blank white rectangle).


2. the "Open Document" icon doesn't look like most open icons (yellow 
folder) and looks worse (so deviating from the standard was not an 
improvement).


3. The "Close Document" icon is a black X. That symbol almost always 
means *delete*.


4. The "Print" icon is too blurry. Even at the too large size it is less 
recognizable than the much smaller Print icons of most other applications.


5. There is no "Page Settings " icon.

6. The "Zoom" icon looks too much like a find icon. Pot. solution: add a 
"+" inside the magnifier.


7. The "Review Changes" Toolbar icons don't have icons (only text).

8. The "Styles and Formatting" icon looks like a 
spreadsheet-cell-selection icon and not anything like a "Styles and 
Formatting" icon.


9. The *Bold* /Italics/ and _Underline_ icons should be the letters *B* 
/I/ and _U_ (and localized where possible). Using only "A"s is much less 
recognizable. Even users in non-localized countries will recognize the B 
I U better than A A A, even if they don't know what the letters stand 
for. Even Windows Live Writer uses B I U. Using only A A A shows a lack 
of understanding of basic usability principles. (This is also a pet 
peeve of mine with the current crop of Thunderbird developers.)


10. The "Character" and "Paragraph" icons should use a pencil instead of 
a meaningless pointing hand. Also, the paragraph symbol should be larger 
and more recognizable.


11. The "Page Settings" icon is only text. It is an important icon and 
needs an icon image.


12. The lines in the "Alignment" icons (Left, Centered, Right, Full) are 
much to thin - and thus needlessly hard to identify.


13. The "Numbering" and "Bullets" icons have the most relevant 
information (the numbers and bullets) much too small.


14. Was the "Font Color" icon made by a three-year old? I had to look 
for way too long before I even vaguelly saw a letter "a" buried behind 
the dark red rectangle.


Icons need to be *quickly* recognized. That should be the #1 priority. 
*Every* other factor (e.g. aesthetics) is a *distant* second to 
recognizability.


BTW: IMO, usability is a *huge* deficiency of Open/LibreOffice. It's not 
just the icons; it's largely also the dialog boxes. I've used (and 
loved) WordPerfect, Microsoft Word, and OpenOffice. WP (v6.1 to v12) had 
the UI nailed. Word caught up and is now pretty good. OO/LO's UI is 
still too sucky - even for a very experienced user (since 20 years) like me.

--
Regards,

Peter Lairo

The browser you can trust:  www.Firefox.com
Reclaim Your Inbox: www.GetThunderbird.com

Islam:  http://www.jihadwatch.org/islam101/
Israel: http://www.jewishvirtuallibrary.org/jsource/myths2/
Church of the Flying Spaghetti Monster:  http://www.venganza.org/
Anthropogenic Global Warming skepsis:http://tinyurl.com/AGW-Skepsis

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


Re: [Libreoffice] Auto-detection of toolbar icon size (well, kinda)

2010-11-25 Thread Thorsten Behrens
Michael Meeks wrote:
> > prompted by some complaints on too large icons on Mac, switched the
> > icon size from 'large' to 'auto' for 3.3.
> 
>   Did we ever get some screenshots of the perceived problem ? I asked in
> some bug, but never got that back AFAIR.
> 
Hi Michael,

take my word for it, it looks out-of-place on Mac.

>   My concern is for Windows really - I'd want the vast majority of users
> on > 1024x768 to have large icons.
> 
>   Have we tested it there ?
> 
Code on Win32 is currently:

long nHeightPx = aMenuFont.GetHeight() * nDPIY / 72;
aStyleSettings.SetToolbarIconSize( (((nHeightPx-1)*2) >= 28) ? 
STYLE_TOOLBAR_ICONSIZE_LARGE : STYLE_TOOLBAR_ICONSIZE_SMALL );

If that does not suffice, surely we can do a hard pick for _LARGE
here, just the same as for Gnome/KDE. It's the sole discretion of 
the native widget layer now - that's were it belongs to.

Cheers,

-- Thorsten


pgpcnoQ0Xjxcy.pgp
Description: PGP signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] More links inherited from OOo

2010-11-25 Thread Florian Effenberger

Hi,

Christian Lohmaier wrote on 2010-11-16 16.22:

Do we want to have a support.libreoffice.org subsite, or do we want to
havewww.libreoffice.org/support?


for now, I'd go with the latter one, but that's just my feeling...

Florian

--
Florian Effenberger 
Steering Committee and Founding Member of The Document Foundation
Tel: +49 8341 99660880 | Mobile: +49 151 14424108
Skype: floeff | Twitter/Identi.ca: @floeff
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] ucb/source/ucb compilation error

2010-11-25 Thread Tor Lillqvist
> Tor was exercised about this at one stage IIRC, does the above work for you ?

Sure, although I think I would prefer to keep OSL_THIS_FUNC as "" instead of 
"(unknown)" in the fallback case. Also, we need to find out if there really is 
no __func__ or similar even in MSVC2010.

So, you think the i#114290 argument that neither __PRETTY_FUNCTION__ nor 
__func__ can be used because neither is a string literal and thus can't be 
compile-time concatenated with other string literals is bogus?

As such, it is true of course that they can't be used like that. But is the 
proper solution then just to not try to use OSL_THIS_FUNC in that way? Instead 
just pass it as a separate argument to printf (yeah, my C background shows 
through) or whatever?

--tml


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


Re: [Libreoffice] Styles and Formatting

2010-11-25 Thread Michael Meeks
Hi Gert,

On Wed, 2010-11-03 at 18:28 +0100, Gert Faller wrote:
> I have erased the line :
> "m_aActionTbL.SetHelpId( HID_TEMPLDLG_TOOLBOX_LEFT );"
> in the patch file 2.
> A paste© error...

So - I notice this is still not merged; which is bad. Sorry for the
delay - clearly this got killed by some big waffly thread with no
apparent conclusion: which is annoying.

Can you send a patch with your best effort & we'll just merge it to
master :-) any complaints can be fixed later [ or did I just mis-read
and it did get merged ? ].

Sorry,

Michael.

-- 
 michael.me...@novell.com  <><, Pseudo Engineer, itinerant idiot


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


Re: [Libreoffice] ucb/source/ucb compilation error

2010-11-25 Thread Miklos Vajna
On Thu, Nov 25, 2010 at 10:11:40AM +, Michael Meeks 
 wrote:
>   Looks great to me; if we took this chunk of code from boost though - we
> should include the relevant boost license header and copyright statement
> at the end of that file, and separate out the section it applies to
> IMHO.

OK - I'm attaching an updated patch, containing the license.
From 60f7f1fa481f9aeb7c96d4fddbe0757a53df88d0 Mon Sep 17 00:00:00 2001
From: Miklos Vajna 
Date: Wed, 24 Nov 2010 12:28:07 +0100
Subject: [PATCH] OSL_THIS_FUNC: use logic from boot/current_function.hpp

Don't use it directly, as OSL_THIS_FUNC is used in C-only sources as
well. Also, remove OSL_THIS_FUNC from OSL_LOG_PREFIX as concatenation
does not work non-macros like __PRETTY_FUNCTION__. (The code actually
worked there only because it was defined to be " ", so we are not
removing any valuable information.)
---
 sal/inc/osl/diagnose.h |   44 ++--
 1 files changed, 26 insertions(+), 18 deletions(-)

diff --git a/sal/inc/osl/diagnose.h b/sal/inc/osl/diagnose.h
index 59f921c..35def37 100644
--- a/sal/inc/osl/diagnose.h
+++ b/sal/inc/osl/diagnose.h
@@ -78,23 +78,6 @@ pfunc_osl_printDetailedDebugMessage SAL_CALL 
osl_setDetailedDebugMessageFunc( pf
 
 #define OSL_THIS_FILE   __FILE__
 
-/* the macro OSL_THIS_FUNC is intended to be an office internal macro for now 
*/
-/* as documented in http://www.openoffice.org/issues/show_bug.cgi?id=114290 ,
-   this cannot work, so disable it for now */
-#if 1
-#define OSL_THIS_FUNC " "
-#else
-#ifdef __func__
-#define OSL_THIS_FUNC __func__
-#elif defined (__PRETTY_FUNCTION__)
-#define OSL_THIS_FUNC __PRETTY_FUNCTION__
-#elif defined (__FUNCTION__)
-#define OSL_THIS_FUNC __FUNCTION__
-#else
-#define OSL_THIS_FUNC " "
-#endif
-#endif /* 1 */
-
 /* the macro OSL_TO_STRING is intended to be an office internal macro for now 
*/
 #define OSL_TO_STRING( x ) #x
 
@@ -102,7 +85,7 @@ pfunc_osl_printDetailedDebugMessage SAL_CALL 
osl_setDetailedDebugMessageFunc( pf
 #define OSL_MACRO_VALUE_TO_STRING( x ) OSL_TO_STRING( x )
 
 /* the macro OSL_LOG_PREFIX is intended to be an office internal macro for now 
*/
-#define OSL_LOG_PREFIX OSL_THIS_FILE ":" OSL_THIS_FUNC ":" 
OSL_MACRO_VALUE_TO_STRING( __LINE__ ) "; "
+#define OSL_LOG_PREFIX OSL_THIS_FILE ":" OSL_MACRO_VALUE_TO_STRING( __LINE__ ) 
"; "
 
 #define OSL_DEBUG_ONLY(s)  _OSL_DEBUG_ONLY(s)
 #define OSL_TRACE   _OSL_TRACE
@@ -164,6 +147,31 @@ pfunc_osl_printDetailedDebugMessage SAL_CALL 
osl_setDetailedDebugMessageFunc( pf
 
 #endif /* OSL_DEBUG_LEVEL */
 
+/* the macro OSL_THIS_FUNC is intended to be an office internal macro for now 
*/
+/* copied from boost/current_function.hpp to make it usable from C
+ * sources as well
+ *
+ * Copyright (c) 2002 Peter Dimov and Multi Media Ltd.
+ *
+ * Distributed under the Boost Software License, Version 1.0. (See
+ * accompanying file LICENSE_1_0.txt or copy at
+ * http://www.boost.org/LICENSE_1_0.txt) */
+#if defined(__GNUC__) || (defined(__MWERKS__) && (__MWERKS__ >= 0x3000)) || 
(defined(__ICC) && (__ICC >= 600))
+#define OSL_THIS_FUNC __PRETTY_FUNCTION__
+#elif defined(__DMC__) && (__DMC__ >= 0x810)
+#define OSL_THIS_FUNC __PRETTY_FUNCTION__
+#elif defined(__FUNCSIG__)
+#define OSL_THIS_FUNC __FUNCSIG__
+#elif (defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 600)) || 
(defined(__IBMCPP__) && (__IBMCPP__ >= 500))
+#define OSL_THIS_FUNC __FUNCTION__
+#elif defined(__BORLANDC__) && (__BORLANDC__ >= 0x550)
+#define OSL_THIS_FUNC __FUNC__
+#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901)
+#define OSL_THIS_FUNC __func__
+#else
+#define OSL_THIS_FUNC "(unknown)"
+#endif
+
 #endif /* _OSL_DIAGNOSE_H_ */
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
-- 
1.7.3.2



pgpdwLnYVWq1o.pgp
Description: PGP signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] ucb/source/ucb compilation error

2010-11-25 Thread Michael Meeks
Hi Miklos,

On Wed, 2010-11-24 at 16:08 +0100, Miklos Vajna wrote:
> Both are just removing the __PRETTY_FUNCTION__ / etc expressions, which
> is not that good, I think.

:-)

> The attached patch tries to solve both problems, and of course
> build-tested.
> Does it look sane - may i push it?

Looks great to me; if we took this chunk of code from boost though - we
should include the relevant boost license header and copyright statement
at the end of that file, and separate out the section it applies to
IMHO.

Thanks,

Michael.

-- 
 michael.me...@novell.com  <><, Pseudo Engineer, itinerant idiot


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


Re: [Libreoffice] ucb/source/ucb compilation error

2010-11-25 Thread Miklos Vajna
On Thu, Nov 25, 2010 at 10:51:05AM +0100, Sebastian Spaeth 
 wrote:
> On Thu, 25 Nov 2010 10:47:22 +0100, Sebastian Spaeth wrote:
> > > +#define OSL_LOG_PREFIX (OSL_THIS_FILE, ":", OSL_THIS_FUNC, ":", 
> > > OSL_MACRO_VALUE_TO_STRING( __LINE__ ), "; ")
> > 
> > On OOo there is a bug open to remove OSL_THIS_FUNC (or was it an Easy
> > Hack) as it is not doing anyway what it is suposed to do.

That's my patch is intended to fix the issue properly. Just removing it
is not a solution, or you'll have to paste the function name in several
debug messages - and we don't like copy&paste in source code, right? :)

> 
> This is the bug I thought of, but it is closed as fixed on 09-28:
> http://www.openoffice.org/issues/show_bug.cgi?id=114290

Please see my earlier mail in this thread:

http://article.gmane.org/gmane.comp.documentfoundation.libreoffice.devel/2615

It's not fixed, they just removed it.


pgp2E9gOLzdVD.pgp
Description: PGP signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] ucb/source/ucb compilation error

2010-11-25 Thread Sebastian Spaeth
On Thu, 25 Nov 2010 10:47:22 +0100, Sebastian Spaeth wrote:
> > +#define OSL_LOG_PREFIX (OSL_THIS_FILE, ":", OSL_THIS_FUNC, ":", 
> > OSL_MACRO_VALUE_TO_STRING( __LINE__ ), "; ")
> 
> On OOo there is a bug open to remove OSL_THIS_FUNC (or was it an Easy
> Hack) as it is not doing anyway what it is suposed to do.

This is the bug I thought of, but it is closed as fixed on 09-28:
http://www.openoffice.org/issues/show_bug.cgi?id=114290

Sebastian


pgp41hXjt5e90.pgp
Description: PGP signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] ucb/source/ucb compilation error

2010-11-25 Thread Sebastian Spaeth
On Thu, 21 Oct 2010 09:40:53 +0200, Thomas Klausner  wrote:
> -#define OSL_LOG_PREFIX OSL_THIS_FILE ":" OSL_THIS_FUNC ":" 
> OSL_MACRO_VALUE_TO_STRING( __LINE__ ) "; "
> +#define OSL_LOG_PREFIX (OSL_THIS_FILE, ":", OSL_THIS_FUNC, ":", 
> OSL_MACRO_VALUE_TO_STRING( __LINE__ ), "; ")

On OOo there is a bug open to remove OSL_THIS_FUNC (or was it an Easy
Hack) as it is not doing anyway what it is suposed to do.

I propose to check that up and rip it out completely.

Sebastian


pgpteDtzGGbip.pgp
Description: PGP signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] quick starter applet/systray defaults and various confusion

2010-11-25 Thread Caolán McNamara
On Fri, 2010-11-19 at 15:37 +, Caolán McNamara wrote:
> 3) We should probably instead modify InitializeQuickStartMode to
> effectively || Sfx::ShutdownIcon::GetAutostart() with the IsQuickStart
> command line argument.
> 
> If we were to do all through, the first thing people would notice is
> that the quickstart applet/systray would appear to change from defaulted
> on to defaulted off. 

I've pushed this change to master. If there is no complaints or horrific
fallout I propose to cherrypick it for 3.3 in a few days.

C.



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


Re: [Libreoffice] Auto-detection of toolbar icon size (well, kinda)

2010-11-25 Thread Cor Nouws

Hi Michael,

Michael Meeks wrote (25-11-10 10:19)


I really think the small icons are a usability, and legibility disaster
when used on large screens - and there is a real risk of selecting them;
if the Mac people get their DPI settings together that's great, Linux
doesn't (of course).
[...]
My concern is for Windows really - I'd want the vast majority of users
on>  1024x768 to have large icons.


  You are not going to propose to dump the small icons, are you :-)

Cor

--
 - giving openoffice.org its foundation :: The Document Foundation -

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


Re: [Libreoffice] ucb/source/ucb compilation error

2010-11-25 Thread Caolán McNamara
On Wed, 2010-11-24 at 16:08 +0100, Miklos Vajna wrote:
> 1) Need to use different exrepssions based on compiler. This is what
> boost/current_function.hpp does, but it's C++ and diagnose.h is used in
> C code as well.

Pity that boost stuffed it in under the c++ namespace directives,
otherwise could just directly include it.

> Does it look sane

Definitely looks sane anyway, does it work :-)

Tor was exercised about this at one stage IIRC, does the above work for
you ?

C.

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


Re: [Libreoffice] Auto-detection of toolbar icon size (well, kinda)

2010-11-25 Thread Michael Meeks
Hi there,

On Thu, 2010-11-25 at 00:36 +0100, Thorsten Behrens wrote:
> prompted by some complaints on too large icons on Mac, switched the
> icon size from 'large' to 'auto' for 3.3.

Did we ever get some screenshots of the perceived problem ? I asked in
some bug, but never got that back AFAIR.

> this was already in place for windows

I really think the small icons are a usability, and legibility disaster
when used on large screens - and there is a real risk of selecting them;
if the Mac people get their DPI settings together that's great, Linux
doesn't (of course).

> added similar code for Mac). Gnome/KDE pick large icons unconditionally
> currently - but maybe someone wants to add nice auto-sizing code
> there?

Can't be based on DPI; that is mostly fixed.

My concern is for Windows really - I'd want the vast majority of users
on > 1024x768 to have large icons.

Have we tested it there ?

Thanks,

Michael.

-- 
 michael.me...@novell.com  <><, Pseudo Engineer, itinerant idiot


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


Re: [Libreoffice] Auto-detection of toolbar icon size (well, kinda)

2010-11-25 Thread Caolán McNamara
On Thu, 2010-11-25 at 00:36 +0100, Thorsten Behrens wrote:
> Hi,
> 
> prompted by some complaints on too large icons on Mac, switched the
> icon size from 'large' to 'auto' for 3.3.

Oh good. I don't have any particular feeling for large vs small icons,
but I did want the default to be "auto" and to tweak auto if it wasn't
sufficient. Thanks.

> Gnome/KDE pick large icons unconditionally currently - but maybe
> someone wants to add nice auto-sizing code there?

Hmm, I wonder if "gtk-toolbar-icon-size" is the right property to toggle
this off ?

C.



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


[Libreoffice] Crash after Preference selection on Mac

2010-11-25 Thread Chris Makepeace
Libre Office (current) and OOo (3.2.1) is repeatedly crashing as I go into
Preferences (Mac language for 'Options').

The system console reports that the crash is related to JavaNativeFoundation
and the crash log makes no mention of Java but does spend 771 lines
reporting a lot else.

iMac running OS X 10.6.5

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