[Libreoffice-commits] core.git: Branch 'feature/aboutconfig' - cui/source

Efe Gürkan YALAMAN efeyalaman at gmail.com
Wed Jul 24 12:18:14 PDT 2013


 cui/source/options/optaboutconfig.cxx |    9 +++++----
 cui/source/options/optaboutconfig.hxx |    2 +-
 2 files changed, 6 insertions(+), 5 deletions(-)

New commits:
commit 6f4bff0e8acd7b05dbebcaeb26f679d7ec97f32d
Author: Efe Gürkan YALAMAN <efeyalaman at gmail.com>
Date:   Wed Jul 24 22:13:31 2013 +0300

    configaccess and FillItems can take '/' as nodepath
    
    The problem about taking '/' as nodepath solved.
    
    Change-Id: I9590a7bec95c8d90d18bfe55fdb7ab19043ccb55

diff --git a/cui/source/options/optaboutconfig.cxx b/cui/source/options/optaboutconfig.cxx
index 0b9eb61..af4501f 100644
--- a/cui/source/options/optaboutconfig.cxx
+++ b/cui/source/options/optaboutconfig.cxx
@@ -85,11 +85,12 @@ void CuiAboutConfigTabPage::InsertEntry( OUString& rProp, OUString&  rStatus, OU
 
 void CuiAboutConfigTabPage::Reset( const SfxItemSet& )
 {
+   OUString sRootNodePath = "/";
    pPrefBox->Clear();
 
-   Reference< XNameAccess > xConfigAccess = getConfigAccess();
+   Reference< XNameAccess > xConfigAccess = getConfigAccess( sRootNodePath );
 
-   FillItems( xConfigAccess, OUString("org.openoffice.Office.Canvas") );
+   FillItems( xConfigAccess, sRootNodePath );
 }
 
 void CuiAboutConfigTabPage::FillItems( Reference< XNameAccess >xNameAccess, OUString sPath)
@@ -127,7 +128,7 @@ void CuiAboutConfigTabPage::FillItems( Reference< XNameAccess >xNameAccess, OUSt
     }
 }
 
-Reference< XNameAccess > CuiAboutConfigTabPage::getConfigAccess()
+Reference< XNameAccess > CuiAboutConfigTabPage::getConfigAccess( OUString sNodePath )
 {
     uno::Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
 
@@ -136,7 +137,7 @@ Reference< XNameAccess > CuiAboutConfigTabPage::getConfigAccess()
 
     beans::NamedValue aProperty;
     aProperty.Name = "nodepath";
-    aProperty.Value = uno::makeAny( OUString("org.openoffice.Office.Canvas") );
+    aProperty.Value = uno::makeAny( sNodePath );
 
     uno::Sequence< uno::Any > aArgumentList( 1 );
     aArgumentList[0] = uno::makeAny( aProperty );
diff --git a/cui/source/options/optaboutconfig.hxx b/cui/source/options/optaboutconfig.hxx
index 343f0c9..9421328 100644
--- a/cui/source/options/optaboutconfig.hxx
+++ b/cui/source/options/optaboutconfig.hxx
@@ -37,7 +37,7 @@ public:
    void     InsertEntry(OUString& rProp, OUString&  rStatus, OUString& rType, OUString& rValue);
    void     Reset( const SfxItemSet& );
    void     FillItems( com::sun::star::uno::Reference < com::sun::star::container::XNameAccess > xNameAccess, OUString sPath);
-   com::sun::star::uno::Reference< com::sun::star::container::XNameAccess > getConfigAccess();
+   com::sun::star::uno::Reference< com::sun::star::container::XNameAccess > getConfigAccess( OUString sNodePath );
 
 };
 


More information about the Libreoffice-commits mailing list