[Libreoffice-commits] core.git: 2 commits - cui/source include/svtools svtools/source

Jan Holesovsky kendy at collabora.com
Thu Dec 5 22:21:48 PST 2013


 cui/source/options/optaboutconfig.cxx   |    5 ++---
 cui/source/options/optaboutconfig.hxx   |    4 ++--
 include/svtools/treelistentry.hxx       |    2 +-
 svtools/source/contnr/treelistentry.cxx |    2 --
 4 files changed, 5 insertions(+), 8 deletions(-)

New commits:
commit 0b5e5783d8b15b0415c9fd5043932882904aece8
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Thu Dec 5 19:26:56 2013 +0100

    A bit of constness.
    
    Change-Id: If7681341c7d5d88286f36f943708f99b3c5700e0

diff --git a/cui/source/options/optaboutconfig.cxx b/cui/source/options/optaboutconfig.cxx
index 742b649..6f8a757 100644
--- a/cui/source/options/optaboutconfig.cxx
+++ b/cui/source/options/optaboutconfig.cxx
@@ -159,7 +159,7 @@ CuiAboutConfigTabPage::CuiAboutConfigTabPage( Window* pParent/*, const SfxItemSe
     m_pPrefBox->SetTabs(aTabs, MAP_PIXEL);
 }
 
-void CuiAboutConfigTabPage::InsertEntry( OUString& rProp, OUString&  rStatus, OUString& rType, OUString& rValue)
+void CuiAboutConfigTabPage::InsertEntry(const OUString& rProp, const OUString& rStatus, const OUString& rType, const OUString& rValue)
 {
     SvTreeListEntry* pEntry = new SvTreeListEntry;
 
@@ -207,13 +207,12 @@ sal_Bool CuiAboutConfigTabPage::FillItemSet(/* SfxItemSet&*/ )
     return bModified;
 }
 
-void CuiAboutConfigTabPage::FillItems( Reference< XNameAccess >xNameAccess, OUString sPath)
+void CuiAboutConfigTabPage::FillItems(const Reference< XNameAccess >& xNameAccess, const OUString& sPath)
 {
     sal_Bool bIsLeafNode;
 
     Reference< XHierarchicalNameAccess > xHierarchicalNameAccess( xNameAccess, uno::UNO_QUERY_THROW );
 
-
     uno::Sequence< OUString > seqItems = xNameAccess->getElementNames();
     for( sal_Int16 i = 0; i < seqItems.getLength(); ++i )
     {
diff --git a/cui/source/options/optaboutconfig.hxx b/cui/source/options/optaboutconfig.hxx
index 55ba3e2..9ad78a6 100644
--- a/cui/source/options/optaboutconfig.hxx
+++ b/cui/source/options/optaboutconfig.hxx
@@ -60,9 +60,9 @@ private:
 public:
    //static ModalDialog* Create( Window* pParent, const SfxItemSet& rItemset );
    CuiAboutConfigTabPage( Window* pParent/*, const SfxItemSet& rItemSet*/ );
-   void     InsertEntry(OUString& rProp, OUString&  rStatus, OUString& rType, OUString& rValue);
+   void     InsertEntry(const OUString& rProp, const OUString& rStatus, const OUString& rType, const OUString& rValue);
    void     Reset(/* const SfxItemSet&*/ );
-   void     FillItems( com::sun::star::uno::Reference < com::sun::star::container::XNameAccess > xNameAccess, OUString sPath);
+   void     FillItems(const com::sun::star::uno::Reference<com::sun::star::container::XNameAccess>& xNameAccess, const OUString& sPath);
    com::sun::star::uno::Reference< com::sun::star::container::XNameAccess > getConfigAccess( OUString sNodePath, sal_Bool bUpdate );
    virtual sal_Bool FillItemSet( /* SfxItemSet& rSet*/ );
 
commit 4ec8c63b5d41ca9ad7dd9ed10dda6b40927d859c
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Thu Dec 5 18:30:37 2013 +0100

    I guess const was what was wanted here.
    
    Change-Id: I5789b18f47d954761a06ccdc4568bc1f74258089

diff --git a/include/svtools/treelistentry.hxx b/include/svtools/treelistentry.hxx
index 812fd05..4d651ab 100644
--- a/include/svtools/treelistentry.hxx
+++ b/include/svtools/treelistentry.hxx
@@ -63,7 +63,7 @@ private:
     void InvalidateChildrensListPositions();
 
 public:
-    static size_t ITEM_NOT_FOUND;
+    const size_t ITEM_NOT_FOUND = std::numeric_limits<size_t>::max();
 
     SvTreeListEntry();
     SvTreeListEntry(const SvTreeListEntry& r);
diff --git a/svtools/source/contnr/treelistentry.cxx b/svtools/source/contnr/treelistentry.cxx
index 5a97b09..bf04b1e 100644
--- a/svtools/source/contnr/treelistentry.cxx
+++ b/svtools/source/contnr/treelistentry.cxx
@@ -22,8 +22,6 @@
 
 #include <limits>
 
-size_t SvTreeListEntry::ITEM_NOT_FOUND = std::numeric_limits<size_t>::max();
-
 void SvTreeListEntry::ClearChildren()
 {
     maChildren.clear();


More information about the Libreoffice-commits mailing list