From 5c1d9086db52d31f9242c93a9304d90bf56b4219 Mon Sep 17 00:00:00 2001 From: Cao Cuong Ngo Date: Fri, 23 Aug 2013 15:43:03 +0200 Subject: CMIS properties dialog: get multiple values Change-Id: Ife7562d52cc3070c8d409f2da68d4e2aa5faea69 --- sfx2/source/dialog/dinfdlg.cxx | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) (limited to 'sfx2') diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index ef7bdbca2531..6b1f06ba6177 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -2220,43 +2220,42 @@ void CmisPropertiesWindow::AddLine( const OUString& sId, const OUString& sName, pNewLine->m_aName->SetText( sName ); - SvtSysLocale aSysLocale; - const LocaleDataWrapper& rLocaleWrapper = aSysLocale.GetLocaleData(); OUString sValue; if ( sType == CMIS_TYPE_INTEGER ) { - sal_Int64 nTmpValue = 0; + Sequence< sal_Int64 > nTmpValue; rAny >>= nTmpValue; sal_uInt32 nIndex = m_aNumberFormatter.GetFormatIndex( NF_NUMBER_SYSTEM ); - m_aNumberFormatter.GetInputLineString( nTmpValue, nIndex, sValue ); + m_aNumberFormatter.GetInputLineString( nTmpValue[0], nIndex, sValue ); } else if ( sType == CMIS_TYPE_DECIMAL ) { - double dTmpValue = 0.0; + Sequence< double > dTmpValue; rAny >>= dTmpValue; sal_uInt32 nIndex = m_aNumberFormatter.GetFormatIndex( NF_NUMBER_SYSTEM ); - m_aNumberFormatter.GetInputLineString( dTmpValue, nIndex, sValue ); + m_aNumberFormatter.GetInputLineString( dTmpValue[0], nIndex, sValue ); } else if ( sType == CMIS_TYPE_BOOL ) { - bool bTmpValue = false; + Sequence< bool > bTmpValue; rAny >>= bTmpValue; - sValue = ( bTmpValue ? rLocaleWrapper.getTrueWord() : rLocaleWrapper.getFalseWord() ); - if ( bTmpValue ) + if ( bTmpValue[0] ) pNewLine->m_aYesButton->Check(); else pNewLine->m_aNoButton->Check(); } else if ( sType == CMIS_TYPE_STRING ) { - rAny >>= sValue; + Sequence< OUString > seqValue; + rAny >>= seqValue; + sValue = seqValue[0]; } else if ( sType == CMIS_TYPE_DATETIME ) { - util::DateTime aTmpDateTime; + Sequence< util::DateTime > aTmpDateTime; rAny >>= aTmpDateTime; - pNewLine->m_aDateField->SetDate( Date( aTmpDateTime.Day, aTmpDateTime.Month, aTmpDateTime.Year ) ); - pNewLine->m_aTimeField->SetTime( Time( aTmpDateTime.Hours, aTmpDateTime.Minutes, aTmpDateTime.Seconds, aTmpDateTime.NanoSeconds ) ); + pNewLine->m_aDateField->SetDate( Date( aTmpDateTime[0].Day, aTmpDateTime[0].Month, aTmpDateTime[0].Year ) ); + pNewLine->m_aTimeField->SetTime( Time( aTmpDateTime[0].Hours, aTmpDateTime[0].Minutes, aTmpDateTime[0].Seconds, aTmpDateTime[0].NanoSeconds ) ); } -- cgit