include/svx/tbcontrl.hxx         |   55 +++++++++++++++++++++++++++++++++++----
 svx/source/tbxctrls/tbcontrl.cxx |    1 
 2 files changed, 51 insertions(+), 5 deletions(-)

New commits:
commit 1bc6d8f811e0941d1a8046c9ba725d0f38223143
Author:     Luigi Iucci <luigi.iu...@collabora.com>
AuthorDate: Thu May 18 18:10:06 2023 +0200
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Wed May 31 15:30:57 2023 +0200

    Added doxygen to calc currency combo
    
    Change-Id: If6a70f38007c385c28f9136e48635e91b9ec93e0
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151968
    Tested-by: Jenkins
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>

diff --git a/include/svx/tbcontrl.hxx b/include/svx/tbcontrl.hxx
index 34e65d99492a..a8022bec29f8 100644
--- a/include/svx/tbcontrl.hxx
+++ b/include/svx/tbcontrl.hxx
@@ -247,60 +247,105 @@ public:
     void EnsurePaletteManager();
 };
 
+/** Poup controller for currency combo widget **/
 class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) SvxCurrencyToolBoxControl final : 
public svt::PopupWindowController
 {
 public:
-    // struct containing currency data
+    /**
+    * Struct containing currency data<p>
+    * an instance corresponds to a line in the combo
+    **/
     struct SvxCurrencyData {
+        /** position of the currency in 
SvxCurrencyToolBoxControl::CurrencySymbols vector **/
         sal_uInt16 m_currencyIdx;
+
+        /**
+        * False if the instance corresponds to a line of the combo that shows 
only the ISO code<p>
+        * True otherwise
+        **/
         bool m_onlyIsoCode;
         OUString m_label;
 
+        /** Constant for invalid currency **/
         static const sal_uInt16 InvalidCurrency;
 
+        /**
+        * Constructor
+        *
+        * @param currencyIdx Position of the currency in 
SvxCurrencyToolBoxControl::CurrencySymbols vector
+        * @param onlyIsoCode False if the instance corresponds to a line of 
the combo that shows
+        * only the ISO code<p> True otherwise
+        **/
         SvxCurrencyData(
             sal_uInt16 currencyIdx = InvalidCurrency,
             bool onlyIsoCode = false
         );
 
+        /** Needed by std::find **/
         bool operator == (const SvxCurrencyData& other) const;
     };
 
+    /** vector of combo box currencies **/
     typedef std::vector<SvxCurrencyData> SvxCurrencyVect_t;
 
 private:
     OUString     m_aFormatString;
     LanguageType m_eLanguage;
     sal_uInt32   m_nFormatKey;
+
+    /** Currencies in the combo **/
     SvxCurrencyVect_t  m_currencies;
+
+
+    /** Most recently used currencies **/
     SvxCurrencyVect_t  m_mru_currencies;
 
+    /** Adds a currency to the the most recently used list **/
     void addMruCurrency(sal_Int16 currencyPosition);
 
-    // inner static method for backward compatibility
+    /**
+    * Inner static method that polialtes the currency list and the most 
recently used
+    * currency list.<p>
+    * The method is static for backward compatibility: it is used by the two
+    * homonymous public methods, one of which is static while the other is 
instance
+    *
+    * @param bFlag used by SvxNumberFormatShell::GetCurrencySymbols
+    * @param p_mru_currencies output: most recently used currencies
+    * @param pCurrencies output: most recently used currencies
+    * @see SvxNumberFormatShell::GetCurrencySymbols
+    **/
     static void inner_GetCurrencySymbols( bool bFlag, SvxCurrencyVect_t 
&p_mru_currencies,
                                     SvxCurrencyVect_t &pCurrencies);
 
 public:
+    /**
+    * Static method used by SvxNumberFormatShell::GetCurrencySymbols<p>
+    *
+    * @param rList output: labels in the combo box
+    * @param bFlag input: true means that we add the default currency in the 
combox
+    * @param rCurrencyList output: list of the currency positions in 
SvxCurrencyToolBoxControl::CurrencySymbols vector
+    * @see SvxNumberFormatShell::GetCurrencySymbols
+    **/
     static void GetCurrencySymbols( std::vector<OUString>& rList, bool bFlag,
                                     std::vector<sal_uInt16>& rCurrencyList );
 
+    /** Instance method used by SvxCurrencyList_Impl constructor **/
     const SvxCurrencyVect_t& GetCurrencySymbols();
 
     explicit SvxCurrencyToolBoxControl( const 
css::uno::Reference<css::uno::XComponentContext>& rContext );
     virtual ~SvxCurrencyToolBoxControl() override;
 
-    // XToolbarController
+    /** XToolbarController **/
     virtual void SAL_CALL execute( sal_Int16 nSelectModifier ) override;
 
     virtual VclPtr<vcl::Window> createVclPopupWindow( vcl::Window* pParent ) 
override;
     virtual std::unique_ptr<WeldToolbarPopup> weldPopupWindow() override;
 
-    // XServiceInfo
+    /** XServiceInfo **/
     virtual OUString SAL_CALL getImplementationName() override;
     virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() 
override;
 
-    // XInitialization
+    /** XInitialization **/
     virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any 
>& rArguments ) override;
 };
 
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 96ee682fa460..c27216cdedd5 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -3879,6 +3879,7 @@ SvxCurrencyToolBoxControl::~SvxCurrencyToolBoxControl() {}
 
 namespace
 {
+    /** Implementation of the currency combo widget **/
     class SvxCurrencyList_Impl : public WeldToolbarPopup
     {
     private:

Reply via email to