cui/source/options/optaboutconfig.cxx | 36 ++++++++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-)
New commits: commit 67e1d504e11611528d84fb1f592efd06b818fcb4 Author: Efe Gürkan YALAMAN <efeyala...@gmail.com> Date: Fri Jul 26 02:25:27 2013 +0300 initial implementation of mapping values Change-Id: I04aae2c6586967b8788e6b3fcd2752b893831937 diff --git a/cui/source/options/optaboutconfig.cxx b/cui/source/options/optaboutconfig.cxx index 3a04e39..ea66de6 100644 --- a/cui/source/options/optaboutconfig.cxx +++ b/cui/source/options/optaboutconfig.cxx @@ -123,10 +123,38 @@ void CuiAboutConfigTabPage::FillItems( Reference< XNameAccess >xNameAccess, OUSt if( bIsLeafNode ) { - Reference< beans::XProperty > xProperty ( xNameAccess, uno::UNO_QUERY_THROW ) ; - beans::Property aProp = xProperty->getAsProperty(); - OUString test = aProp.Type.getTypeName(); - InsertEntry( sPath, test, sPath, sPath );//for testing only will change + Any aProp = xHierarchicalNameAccess->getByHierarchicalName(seqItems[i]); //xProperty->getAsProperty(); + + OUString test; + if( aProp.hasValue() ) + { + switch( aProp.getValueType().getTypeClass() ) + { + case ::com::sun::star::uno::TypeClass_UNSIGNED_SHORT : + case ::com::sun::star::uno::TypeClass_SHORT : + case ::com::sun::star::uno::TypeClass_UNSIGNED_LONG : + case ::com::sun::star::uno::TypeClass_LONG : + //case ::com::sun::star::uno::TypeClass_INT : + { + sal_Int32 nVal = 0; + if(aProp >>= nVal) + { + OUString aNumber( OUString::valueOf( nVal ) ); + test = aNumber; + } + } + break; + + default: + { + test = OUString("test"); + } + } + } + + OUString sType = aProp.getValueTypeName();//.getTypeName() ;//Type.getTypeName(); + OUString sPrefName = sPath + OUString("-") + seqItems[i] ; + InsertEntry( sPrefName, test, sType , sPath );//for testing only will change } } }
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits