From 621ea5f0e56231a7d5063e6d12cce8aab55af37c Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Fri, 19 Jun 2009 02:29:09 +0000 Subject: #i22029# #i81335# applied & adjusted the patch from ooo-build. This enables changing the names of fields, field members and grand total names. --- sc/source/ui/unoobj/dapiuno.cxx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'sc/source/ui/unoobj/dapiuno.cxx') diff --git a/sc/source/ui/unoobj/dapiuno.cxx b/sc/source/ui/unoobj/dapiuno.cxx index c68baf36ba2b..c52921f7c5de 100644 --- a/sc/source/ui/unoobj/dapiuno.cxx +++ b/sc/source/ui/unoobj/dapiuno.cxx @@ -1626,8 +1626,13 @@ OUString SAL_CALL ScDataPilotFieldObj::getName() throw(RuntimeException) if( pDim->IsDataLayout() ) aName = OUString( RTL_CONSTASCII_USTRINGPARAM( SC_DATALAYOUT_NAME ) ); else - aName = pDim->GetLayoutName(); - } + { + const rtl::OUString* pLayoutName = pDim->GetLayoutName(); + if (pLayoutName) + aName = *pLayoutName; + else + aName = pDim->GetName(); + } } return aName; } @@ -1639,7 +1644,7 @@ void SAL_CALL ScDataPilotFieldObj::setName( const OUString& rName ) throw(Runtim if( pDim && !pDim->IsDataLayout() ) { String aName( rName ); - pDim->SetLayoutName( &aName ); + pDim->SetLayoutName(aName); SetDPObject( pDPObj ); } } -- cgit From e862adfa2e024d63ad86c6ad043b7d073598bf69 Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Wed, 2 Sep 2009 03:53:11 +0000 Subject: Initial work toward showing the display names (aka layout names) for field and field members when appropriate. Refactored ScDPLabelData quite a bit. I'm not entirely done with this yet. --- sc/source/ui/unoobj/dapiuno.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sc/source/ui/unoobj/dapiuno.cxx') diff --git a/sc/source/ui/unoobj/dapiuno.cxx b/sc/source/ui/unoobj/dapiuno.cxx index c52921f7c5de..efc498517f1b 100644 --- a/sc/source/ui/unoobj/dapiuno.cxx +++ b/sc/source/ui/unoobj/dapiuno.cxx @@ -3074,7 +3074,7 @@ Sequence SAL_CALL ScDataPilotItemsObj::getElementNames() ScUnoGuard aGuard; Sequence< OUString > aSeq; if( ScDPObject* pDPObj = GetDPObject() ) - pDPObj->GetMembers( lcl_GetObjectIndex( pDPObj, maFieldId ), aSeq ); + pDPObj->GetMemberNames( lcl_GetObjectIndex( pDPObj, maFieldId ), aSeq ); return aSeq; } -- cgit