summaryrefslogtreecommitdiff
path: root/cui/source/options
diff options
context:
space:
mode:
authorEfe Gürkan YALAMAN <efeyalaman@gmail.com>2013-07-29 02:21:50 +0300
committerThorsten Behrens <tbehrens@suse.com>2013-08-01 02:19:40 +0200
commit39b31a28ced6d8bcb631921193d382322eb73ef7 (patch)
treef5066a53367c847817af858746a2fdda7cdcd1cc /cui/source/options
parenta018f321c5adbd139882adeaa37a195396db83b6 (diff)
getConfigAccess Re-arranged for getting update access
getConfigAccess now has a second argument which allows getting update access when needed. If second argument is sal_False gets ReadOnly access, otherwise takes update access. Change-Id: I53731e6cb8c586f59aec81abc1f12bcb60fd5481
Diffstat (limited to 'cui/source/options')
-rw-r--r--cui/source/options/optaboutconfig.cxx20
-rw-r--r--cui/source/options/optaboutconfig.hxx3
2 files changed, 19 insertions, 4 deletions
diff --git a/cui/source/options/optaboutconfig.cxx b/cui/source/options/optaboutconfig.cxx
index c36a19552c5e..8434aa048e58 100644
--- a/cui/source/options/optaboutconfig.cxx
+++ b/cui/source/options/optaboutconfig.cxx
@@ -90,7 +90,7 @@ void CuiAboutConfigTabPage::Reset( const SfxItemSet& )
OUString sRootNodePath = "/";
pPrefBox->Clear();
- Reference< XNameAccess > xConfigAccess = getConfigAccess( sRootNodePath );
+ Reference< XNameAccess > xConfigAccess = getConfigAccess( sRootNodePath, sal_False );
FillItems( xConfigAccess, sRootNodePath );
}
@@ -214,7 +214,7 @@ void CuiAboutConfigTabPage::FillItems( Reference< XNameAccess >xNameAccess, OUSt
}
}
-Reference< XNameAccess > CuiAboutConfigTabPage::getConfigAccess( OUString sNodePath )
+Reference< XNameAccess > CuiAboutConfigTabPage::getConfigAccess( OUString sNodePath, sal_Bool bUpdate )
{
uno::Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
@@ -228,9 +228,16 @@ Reference< XNameAccess > CuiAboutConfigTabPage::getConfigAccess( OUString sNodeP
uno::Sequence< uno::Any > aArgumentList( 1 );
aArgumentList[0] = uno::makeAny( aProperty );
+ OUString sAccessString;
+
+ if( bUpdate )
+ sAccessString = "com.sun.star.configuration.ConfigurationUpdateAccess";
+ else
+ sAccessString = "com.sun.star.configuration.ConfigurationAccess";
+
uno::Reference< container::XNameAccess > xNameAccess(
xConfigProvider->createInstanceWithArguments(
- "com.sun.star.configuration.ConfigurationAccess", aArgumentList ),
+ sAccessString, aArgumentList ),
uno::UNO_QUERY_THROW );
return xNameAccess;
@@ -263,4 +270,11 @@ IMPL_LINK( CuiAboutConfigTabPage, HeaderSelect_Impl, HeaderBar*, pBar )
return 1;
}
+IMPL_LINK_NOARG( CuiAboutConfigTabPage, StandardHdl_Impl )
+{
+ SvTreeListEntry* pEntry = pPrefBox->FirstSelected();
+ return 0;
+
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/options/optaboutconfig.hxx b/cui/source/options/optaboutconfig.hxx
index 6217f8547308..10b4ec6f92f0 100644
--- a/cui/source/options/optaboutconfig.hxx
+++ b/cui/source/options/optaboutconfig.hxx
@@ -33,13 +33,14 @@ private:
~CuiAboutConfigTabPage();
DECL_LINK( HeaderSelect_Impl, HeaderBar * );
+ DECL_LINK( StandardHdl_Impl, void * );
public:
static SfxTabPage* Create( Window* pParent, const SfxItemSet& rItemset );
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( OUString sNodePath );
+ com::sun::star::uno::Reference< com::sun::star::container::XNameAccess > getConfigAccess( OUString sNodePath, sal_Bool bUpdate );
};