ooo-build r14828 - in trunk: . patches/dev300



Author: kyoshida
Date: Fri Dec 12 06:34:48 2008
New Revision: 14828
URL: http://svn.gnome.org/viewvc/ooo-build?rev=14828&view=rev

Log:
2008-12-12  Kohei Yoshida  <kyoshida novell com>

	* patches/dev300/calc-dp-page-field-list-fix.diff: include in the page
	field list box only visible field members. (i#96591)

	* patches/dev300/apply: apply this new patch.


Added:
   trunk/patches/dev300/calc-dp-page-field-list-fix.diff
Modified:
   trunk/ChangeLog
   trunk/patches/dev300/apply

Modified: trunk/patches/dev300/apply
==============================================================================
--- trunk/patches/dev300/apply	(original)
+++ trunk/patches/dev300/apply	Fri Dec 12 06:34:48 2008
@@ -848,6 +848,9 @@
 # always use OOo address convention when parsing address in DDE function.
 calc-dde-always-ooo-conv.diff, n#442143, kohei
 
+# include only visible members in the page field list box.
+calc-dp-page-field-list-fix.diff, i#96591, kohei
+
 [ CalcFixes ]
 
 # make biffdumper build

Added: trunk/patches/dev300/calc-dp-page-field-list-fix.diff
==============================================================================
--- (empty file)
+++ trunk/patches/dev300/calc-dp-page-field-list-fix.diff	Fri Dec 12 06:34:48 2008
@@ -0,0 +1,55 @@
+diff --git sc/source/core/data/dpobject.cxx sc/source/core/data/dpobject.cxx
+index c0ff01a..e20a6ba 100644
+--- sc/source/core/data/dpobject.cxx
++++ sc/source/core/data/dpobject.cxx
+@@ -56,6 +56,7 @@
+ #include "scitems.hxx"
+ #include "unonames.hxx"
+ 
++#include <com/sun/star/beans/XPropertySet.hpp>
+ #include <com/sun/star/sheet/GeneralFunction.hpp>
+ #include <com/sun/star/sheet/DataPilotFieldFilter.hpp>
+ #include <com/sun/star/sheet/DataPilotFieldOrientation.hpp>
+@@ -84,6 +85,7 @@ using ::com::sun::star::uno::Any;
+ using ::com::sun::star::sheet::DataPilotTableHeaderData;
+ using ::com::sun::star::sheet::DataPilotTablePositionData;
+ using ::rtl::OUString;
++using ::com::sun::star::beans::XPropertySet;
+ 
+ // -----------------------------------------------------------------------
+ 
+@@ -887,17 +889,25 @@ void ScDPObject::FillPageList( TypedStrCollection& rStrings, long nField )
+ 	uno::Sequence<rtl::OUString> aNames = xMembers->getElementNames();
+ 	long nNameCount = aNames.getLength();
+ 	const rtl::OUString* pNameArr = aNames.getConstArray();
+-	for (long nPos=0; nPos<nNameCount; nPos++)
++	for (long nPos = 0; nPos < nNameCount; ++nPos)
+ 	{
+-		TypedStrData* pData = new TypedStrData( pNameArr[nPos] );
+-
+-//		if ( !rStrings.Insert( pData ) )
+-//			delete pData;								// duplicate
++        // Make sure to insert only visible members.
++        Reference<XPropertySet> xPropSet(xMembers->getByName(pNameArr[nPos]), UNO_QUERY);
++        sal_Bool bVisible = false;
++        if (xPropSet.is())
++        {
++            Any any = xPropSet->getPropertyValue(OUString::createFromAscii(SC_UNO_ISVISIBL));
++            any >>= bVisible;
++        }
+ 
+-		// use the order from getElementNames
+-		if ( !rStrings.AtInsert( rStrings.GetCount(), pData ) )
+-			delete pData;
+-	}
++        if (bVisible)
++        {
++            // use the order from getElementNames
++            TypedStrData* pData = new TypedStrData( pNameArr[nPos] );
++            if ( !rStrings.AtInsert( rStrings.GetCount(), pData ) )
++                delete pData;
++        }
++    }
+ 
+ 	//	add "-all-" entry to the top (unsorted)
+ 	TypedStrData* pAllData = new TypedStrData( String( ScResId( SCSTR_ALL ) ) );	//! separate string? (also output)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]