sw/inc/ccoll.hxx                          |    4 
 sw/source/uibase/chrdlg/ccoll.cxx         |    2 
 sw/source/uibase/dbui/maildispatcher.cxx  |   14 +--
 sw/source/uibase/dbui/mailmergehelper.cxx |  128 +++++++++++++++---------------
 sw/source/uibase/inc/mailmergehelper.hxx  |    8 -
 5 files changed, 78 insertions(+), 78 deletions(-)

New commits:
commit 5eb9ad92ac6169d7aab92452ce9e1219441f4e52
Author:     Miklos Vajna <vmik...@collabora.com>
AuthorDate: Mon Oct 18 08:03:17 2021 +0200
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Mon Oct 18 08:52:59 2021 +0200

    sw: prefix members of MailDeliveryErrorNotifier, SwAddressIterator, ...
    
    ... SwAddressPreview and SwCondCollItem
    
    See tdf#94879 for motivation.
    
    Change-Id: I6702b3d2287aa3c9df1bac8520746901ae2e2f25
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123729
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>
    Tested-by: Jenkins

diff --git a/sw/inc/ccoll.hxx b/sw/inc/ccoll.hxx
index 29eafc11240c..dffe09b4eb60 100644
--- a/sw/inc/ccoll.hxx
+++ b/sw/inc/ccoll.hxx
@@ -39,7 +39,7 @@ OUString   GetCommandContextByIndex( sal_Int16 nIndex );
 
 class SW_DLLPUBLIC SwCondCollItem final : public SfxPoolItem
 {
-    static const CommandStruct  aCmds[COND_COMMAND_COUNT];
+    static const CommandStruct  s_aCmds[COND_COMMAND_COUNT];
 
     OUString                    m_sStyles[COND_COMMAND_COUNT];
 
@@ -55,7 +55,7 @@ public:
     virtual SwCondCollItem*     Clone( SfxItemPool *pPool = nullptr ) const 
override;
     virtual bool                operator==( const SfxPoolItem& ) const 
override;
 
-    static const CommandStruct* GetCmds() { return aCmds; }
+    static const CommandStruct* GetCmds() { return s_aCmds; }
 
     OUString            GetStyle(sal_uInt16 nPos) const;
     void                SetStyle(const OUString* pStyle, sal_uInt16 nPos);
diff --git a/sw/source/uibase/chrdlg/ccoll.cxx 
b/sw/source/uibase/chrdlg/ccoll.cxx
index 1183c4542d7b..6285ac52789a 100644
--- a/sw/source/uibase/chrdlg/ccoll.cxx
+++ b/sw/source/uibase/chrdlg/ccoll.cxx
@@ -82,7 +82,7 @@ OUString GetCommandContextByIndex( sal_Int16 nIndex )
 
 // Globals
 
-const CommandStruct SwCondCollItem::aCmds[] =
+const CommandStruct SwCondCollItem::s_aCmds[] =
 {
     { Master_CollCondition::PARA_IN_TABLEHEAD,    0 },
     { Master_CollCondition::PARA_IN_TABLEBODY,    0 },
diff --git a/sw/source/uibase/dbui/maildispatcher.cxx 
b/sw/source/uibase/dbui/maildispatcher.cxx
index 10d8ea748e6a..4bde20e97965 100644
--- a/sw/source/uibase/dbui/maildispatcher.cxx
+++ b/sw/source/uibase/dbui/maildispatcher.cxx
@@ -52,18 +52,18 @@ namespace /* private */
             ::rtl::Reference<MailDispatcher> const & xMailDispatcher,
             uno::Reference<mail::XMailMessage> const & message,
             const OUString& error_message) :
-            mail_dispatcher_(xMailDispatcher),
-            message_(message),
-            error_message_(error_message)
+            m_mail_dispatcher(xMailDispatcher),
+            m_message(message),
+            m_error_message(error_message)
         {}
 
         void operator() (::rtl::Reference<IMailDispatcherListener> const & 
listener) const
-        { listener->mailDeliveryError(mail_dispatcher_, message_, 
error_message_); }
+        { listener->mailDeliveryError(m_mail_dispatcher, m_message, 
m_error_message); }
 
     private:
-        ::rtl::Reference<MailDispatcher> mail_dispatcher_;
-        uno::Reference<mail::XMailMessage> message_;
-        OUString error_message_;
+        ::rtl::Reference<MailDispatcher> m_mail_dispatcher;
+        uno::Reference<mail::XMailMessage> m_message;
+        OUString m_error_message;
     };
 
 } // namespace private
diff --git a/sw/source/uibase/dbui/mailmergehelper.cxx 
b/sw/source/uibase/dbui/mailmergehelper.cxx
index 4f420bb83079..508b675b3ae9 100644
--- a/sw/source/uibase/dbui/mailmergehelper.cxx
+++ b/sw/source/uibase/dbui/mailmergehelper.cxx
@@ -277,7 +277,7 @@ OUString SwAddressPreview::FillData(
 }
 
 SwAddressPreview::SwAddressPreview(std::unique_ptr<weld::ScrolledWindow> 
xWindow)
-    : pImpl(new SwAddressPreview_Impl())
+    : m_pImpl(new SwAddressPreview_Impl())
     , m_xVScrollBar(std::move(xWindow))
 {
     m_xVScrollBar->connect_vadjustment_changed(LINK(this, SwAddressPreview, 
ScrollHdl));
@@ -294,80 +294,80 @@ IMPL_LINK_NOARG(SwAddressPreview, ScrollHdl, 
weld::ScrolledWindow&, void)
 
 void SwAddressPreview::AddAddress(const OUString& rAddress)
 {
-    pImpl->aAddresses.push_back(rAddress);
+    m_pImpl->aAddresses.push_back(rAddress);
     UpdateScrollBar();
 }
 
 void SwAddressPreview::SetAddress(const OUString& rAddress)
 {
-    pImpl->aAddresses.clear();
-    pImpl->aAddresses.push_back(rAddress);
+    m_pImpl->aAddresses.clear();
+    m_pImpl->aAddresses.push_back(rAddress);
     m_xVScrollBar->set_vpolicy(VclPolicyType::NEVER);
     Invalidate();
 }
 
 sal_uInt16 SwAddressPreview::GetSelectedAddress()const
 {
-    OSL_ENSURE(pImpl->nSelectedAddress < pImpl->aAddresses.size(), "selection 
invalid");
-    return pImpl->nSelectedAddress;
+    OSL_ENSURE(m_pImpl->nSelectedAddress < m_pImpl->aAddresses.size(), 
"selection invalid");
+    return m_pImpl->nSelectedAddress;
 }
 
 void SwAddressPreview::SelectAddress(sal_uInt16 nSelect)
 {
-    OSL_ENSURE(pImpl->nSelectedAddress < pImpl->aAddresses.size(), "selection 
invalid");
-    pImpl->nSelectedAddress = nSelect;
+    OSL_ENSURE(m_pImpl->nSelectedAddress < m_pImpl->aAddresses.size(), 
"selection invalid");
+    m_pImpl->nSelectedAddress = nSelect;
     // now make it visible...
-    sal_uInt16 nSelectRow = nSelect / pImpl->nColumns;
+    sal_uInt16 nSelectRow = nSelect / m_pImpl->nColumns;
     sal_uInt16 nStartRow = m_xVScrollBar->vadjustment_get_value();
-    if( (nSelectRow < nStartRow) || (nSelectRow >= (nStartRow + pImpl->nRows) 
))
+    if( (nSelectRow < nStartRow) || (nSelectRow >= (nStartRow + 
m_pImpl->nRows) ))
         m_xVScrollBar->vadjustment_set_value(nSelectRow);
 }
 
 void SwAddressPreview::Clear()
 {
-    pImpl->aAddresses.clear();
-    pImpl->nSelectedAddress = 0;
+    m_pImpl->aAddresses.clear();
+    m_pImpl->nSelectedAddress = 0;
     UpdateScrollBar();
 }
 
 void SwAddressPreview::ReplaceSelectedAddress(const OUString& rNew)
 {
-    pImpl->aAddresses[pImpl->nSelectedAddress] = rNew;
+    m_pImpl->aAddresses[m_pImpl->nSelectedAddress] = rNew;
     Invalidate();
 }
 
 void SwAddressPreview::RemoveSelectedAddress()
 {
-    pImpl->aAddresses.erase(pImpl->aAddresses.begin() + 
pImpl->nSelectedAddress);
-    if(pImpl->nSelectedAddress)
-        --pImpl->nSelectedAddress;
+    m_pImpl->aAddresses.erase(m_pImpl->aAddresses.begin() + 
m_pImpl->nSelectedAddress);
+    if(m_pImpl->nSelectedAddress)
+        --m_pImpl->nSelectedAddress;
     UpdateScrollBar();
     Invalidate();
 }
 
 void SwAddressPreview::SetLayout(sal_uInt16 nRows, sal_uInt16 nColumns)
 {
-    pImpl->nRows = nRows;
-    pImpl->nColumns = nColumns;
+    m_pImpl->nRows = nRows;
+    m_pImpl->nColumns = nColumns;
     UpdateScrollBar();
 }
 
 void SwAddressPreview::EnableScrollBar()
 {
-    pImpl->bEnableScrollBar = true;
+    m_pImpl->bEnableScrollBar = true;
 }
 
 void SwAddressPreview::UpdateScrollBar()
 {
-    if (pImpl->nColumns)
+    if (m_pImpl->nColumns)
     {
-        sal_uInt16 nResultingRows = 
o3tl::narrowing<sal_uInt16>(pImpl->aAddresses.size() + pImpl->nColumns - 1) / 
pImpl->nColumns;
+        sal_uInt16 nResultingRows = 
o3tl::narrowing<sal_uInt16>(m_pImpl->aAddresses.size() + m_pImpl->nColumns - 1) 
/ m_pImpl->nColumns;
         ++nResultingRows;
         auto nValue = m_xVScrollBar->vadjustment_get_value();
         if (nValue > nResultingRows)
             nValue = nResultingRows;
-        m_xVScrollBar->set_vpolicy(pImpl->bEnableScrollBar && nResultingRows > 
pImpl->nRows ? VclPolicyType::ALWAYS : VclPolicyType::NEVER);
-        m_xVScrollBar->vadjustment_configure(nValue, 0, nResultingRows, 1, 10, 
pImpl->nRows);
+        m_xVScrollBar->set_vpolicy(m_pImpl->bEnableScrollBar && nResultingRows 
> m_pImpl->nRows ? VclPolicyType::ALWAYS : VclPolicyType::NEVER);
+        m_xVScrollBar->vadjustment_configure(nValue, 0, nResultingRows, 1, 10, 
m_pImpl->nRows);
     }
 }
 
@@ -392,26 +392,26 @@ void SwAddressPreview::Paint(vcl::RenderContext& 
rRenderContext, const tools::Re
         aSize.AdjustWidth(-m_xVScrollBar->get_scroll_thickness());
         nStartRow = m_xVScrollBar->vadjustment_get_value();
     }
-    Size aPartSize(aSize.Width() / pImpl->nColumns,
-                   aSize.Height() / pImpl->nRows);
+    Size aPartSize(aSize.Width() / m_pImpl->nColumns,
+                   aSize.Height() / m_pImpl->nRows);
     aPartSize.AdjustWidth( -2 );
     aPartSize.AdjustHeight( -2 );
 
-    sal_uInt16 nAddress = nStartRow * pImpl->nColumns;
-    const sal_uInt16 nNumAddresses = 
o3tl::narrowing<sal_uInt16>(pImpl->aAddresses.size());
-    for (sal_uInt16 nRow = 0; nRow < pImpl->nRows ; ++nRow)
+    sal_uInt16 nAddress = nStartRow * m_pImpl->nColumns;
+    const sal_uInt16 nNumAddresses = 
o3tl::narrowing<sal_uInt16>(m_pImpl->aAddresses.size());
+    for (sal_uInt16 nRow = 0; nRow < m_pImpl->nRows ; ++nRow)
     {
-        for (sal_uInt16 nCol = 0; nCol < pImpl->nColumns; ++nCol)
+        for (sal_uInt16 nCol = 0; nCol < m_pImpl->nColumns; ++nCol)
         {
             if (nAddress >= nNumAddresses)
                 break;
             Point aPos(nCol * aPartSize.Width(),
                        nRow * aPartSize.Height());
             aPos.Move(1, 1);
-            bool bIsSelected = nAddress == pImpl->nSelectedAddress;
-            if ((pImpl->nColumns * pImpl->nRows) == 1)
+            bool bIsSelected = nAddress == m_pImpl->nSelectedAddress;
+            if ((m_pImpl->nColumns * m_pImpl->nRows) == 1)
                 bIsSelected = false;
-            OUString adr(pImpl->aAddresses[nAddress]);
+            OUString adr(m_pImpl->aAddresses[nAddress]);
             DrawText_Impl(rRenderContext, adr, aPos, aPartSize, bIsSelected);
             ++nAddress;
         }
@@ -421,24 +421,24 @@ void SwAddressPreview::Paint(vcl::RenderContext& 
rRenderContext, const tools::Re
 
 bool SwAddressPreview::MouseButtonDown( const MouseEvent& rMEvt )
 {
-    if (rMEvt.IsLeft() && pImpl->nRows && pImpl->nColumns)
+    if (rMEvt.IsLeft() && m_pImpl->nRows && m_pImpl->nColumns)
     {
         //determine the selected address
         const Point& rMousePos = rMEvt.GetPosPixel();
         Size aSize(GetOutputSizePixel());
-        Size aPartSize( aSize.Width()/pImpl->nColumns, 
aSize.Height()/pImpl->nRows );
+        Size aPartSize( aSize.Width()/m_pImpl->nColumns, 
aSize.Height()/m_pImpl->nRows );
         sal_uInt32 nRow = rMousePos.Y() / aPartSize.Height() ;
         if (m_xVScrollBar->get_vpolicy() != VclPolicyType::NEVER)
         {
             nRow += m_xVScrollBar->vadjustment_get_value();
         }
         sal_uInt32 nCol = rMousePos.X() / aPartSize.Width();
-        sal_uInt32 nSelect = nRow * pImpl->nColumns + nCol;
+        sal_uInt32 nSelect = nRow * m_pImpl->nColumns + nCol;
 
-        if( nSelect < pImpl->aAddresses.size() &&
-                pImpl->nSelectedAddress != 
o3tl::narrowing<sal_uInt16>(nSelect))
+        if( nSelect < m_pImpl->aAddresses.size() &&
+                m_pImpl->nSelectedAddress != 
o3tl::narrowing<sal_uInt16>(nSelect))
         {
-            pImpl->nSelectedAddress = o3tl::narrowing<sal_uInt16>(nSelect);
+            m_pImpl->nSelectedAddress = o3tl::narrowing<sal_uInt16>(nSelect);
             m_aSelectHdl.Call(nullptr);
         }
         Invalidate();
@@ -450,10 +450,10 @@ bool SwAddressPreview::KeyInput( const KeyEvent& rKEvt )
 {
     sal_uInt16 nKey = rKEvt.GetKeyCode().GetCode();
     bool bHandled = false;
-    if (pImpl->nRows && pImpl->nColumns)
+    if (m_pImpl->nRows && m_pImpl->nColumns)
     {
-        sal_uInt32 nSelectedRow = pImpl->nSelectedAddress / pImpl->nColumns;
-        sal_uInt32 nSelectedColumn = pImpl->nSelectedAddress - (nSelectedRow * 
pImpl->nColumns);
+        sal_uInt32 nSelectedRow = m_pImpl->nSelectedAddress / 
m_pImpl->nColumns;
+        sal_uInt32 nSelectedColumn = m_pImpl->nSelectedAddress - (nSelectedRow 
* m_pImpl->nColumns);
         switch(nKey)
         {
             case KEY_UP:
@@ -462,7 +462,7 @@ bool SwAddressPreview::KeyInput( const KeyEvent& rKEvt )
                 bHandled = true;
             break;
             case KEY_DOWN:
-                if(pImpl->aAddresses.size() > 
o3tl::make_unsigned(pImpl->nSelectedAddress + pImpl->nColumns))
+                if(m_pImpl->aAddresses.size() > 
o3tl::make_unsigned(m_pImpl->nSelectedAddress + m_pImpl->nColumns))
                     ++nSelectedRow;
                 bHandled = true;
             break;
@@ -472,17 +472,17 @@ bool SwAddressPreview::KeyInput( const KeyEvent& rKEvt )
                 bHandled = true;
             break;
             case KEY_RIGHT:
-                if(nSelectedColumn < o3tl::make_unsigned(pImpl->nColumns - 1) 
&&
-                       pImpl->aAddresses.size() - 1 > pImpl->nSelectedAddress )
+                if(nSelectedColumn < o3tl::make_unsigned(m_pImpl->nColumns - 
1) &&
+                       m_pImpl->aAddresses.size() - 1 > 
m_pImpl->nSelectedAddress )
                     ++nSelectedColumn;
                 bHandled = true;
             break;
         }
-        sal_uInt32 nSelect = nSelectedRow * pImpl->nColumns + nSelectedColumn;
-        if( nSelect < pImpl->aAddresses.size() &&
-                pImpl->nSelectedAddress != 
o3tl::narrowing<sal_uInt16>(nSelect))
+        sal_uInt32 nSelect = nSelectedRow * m_pImpl->nColumns + 
nSelectedColumn;
+        if( nSelect < m_pImpl->aAddresses.size() &&
+                m_pImpl->nSelectedAddress != 
o3tl::narrowing<sal_uInt16>(nSelect))
         {
-            pImpl->nSelectedAddress = o3tl::narrowing<sal_uInt16>(nSelect);
+            m_pImpl->nSelectedAddress = o3tl::narrowing<sal_uInt16>(nSelect);
             m_aSelectHdl.Call(nullptr);
             Invalidate();
         }
@@ -518,48 +518,48 @@ SwMergeAddressItem   SwAddressIterator::Next()
     //currently the string may either start with a '<' then it's a column
     //otherwise it's simple text maybe containing a return
     SwMergeAddressItem   aRet;
-    if(!sAddress.isEmpty())
+    if(!m_sAddress.isEmpty())
     {
-        if(sAddress[0] == '<')
+        if(m_sAddress[0] == '<')
         {
             aRet.bIsColumn = true;
-            sal_Int32 nClose = sAddress.indexOf('>');
+            sal_Int32 nClose = m_sAddress.indexOf('>');
             OSL_ENSURE(nClose != -1, "closing '>' not found");
             if( nClose != -1 )
             {
-                aRet.sText = sAddress.copy(1, nClose - 1);
-                sAddress = sAddress.copy(nClose + 1);
+                aRet.sText = m_sAddress.copy(1, nClose - 1);
+                m_sAddress = m_sAddress.copy(nClose + 1);
             }
             else
             {
-                aRet.sText = sAddress.copy(1, 1);
-                sAddress = sAddress.copy(1);
+                aRet.sText = m_sAddress.copy(1, 1);
+                m_sAddress = m_sAddress.copy(1);
             }
         }
         else
         {
-            sal_Int32 nOpen = sAddress.indexOf('<');
-            sal_Int32 nReturn = sAddress.indexOf('\n');
+            sal_Int32 nOpen = m_sAddress.indexOf('<');
+            sal_Int32 nReturn = m_sAddress.indexOf('\n');
             if(nReturn == 0)
             {
                 aRet.bIsReturn = true;
                 aRet.sText = "\n";
-                sAddress = sAddress.copy(1);
+                m_sAddress = m_sAddress.copy(1);
             }
             else if(-1 == nOpen && -1 == nReturn)
             {
-                aRet.sText = sAddress;
-                sAddress.clear();
+                aRet.sText = m_sAddress;
+                m_sAddress.clear();
             }
             else
             {
                 if (nOpen == -1)
-                    nOpen = sAddress.getLength();
+                    nOpen = m_sAddress.getLength();
                 if (nReturn == -1)
-                    nReturn = sAddress.getLength();
+                    nReturn = m_sAddress.getLength();
                 sal_Int32 nTarget = std::min(nOpen, nReturn);
-                aRet.sText = sAddress.copy(0, nTarget);
-                sAddress = sAddress.copy(nTarget);
+                aRet.sText = m_sAddress.copy(0, nTarget);
+                m_sAddress = m_sAddress.copy(nTarget);
             }
         }
     }
diff --git a/sw/source/uibase/inc/mailmergehelper.hxx 
b/sw/source/uibase/inc/mailmergehelper.hxx
index 60882df8aba5..664786d5b64c 100644
--- a/sw/source/uibase/inc/mailmergehelper.hxx
+++ b/sw/source/uibase/inc/mailmergehelper.hxx
@@ -58,7 +58,7 @@ struct SwAddressPreview_Impl;
 // and also the resulting address filled with database data
 class SW_DLLPUBLIC SwAddressPreview final : public weld::CustomWidgetController
 {
-    std::unique_ptr<SwAddressPreview_Impl> pImpl;
+    std::unique_ptr<SwAddressPreview_Impl> m_pImpl;
     std::unique_ptr<weld::ScrolledWindow> m_xVScrollBar;
     Link<LinkParamNone*,void> m_aSelectHdl;
 
@@ -123,14 +123,14 @@ struct SwMergeAddressItem
 
 class SW_DLLPUBLIC SwAddressIterator
 {
-    OUString sAddress;
+    OUString m_sAddress;
 public:
     SwAddressIterator(const OUString& rAddress) :
-        sAddress(rAddress)
+        m_sAddress(rAddress)
     {}
 
     SwMergeAddressItem  Next();
-    bool HasMore() const { return !sAddress.isEmpty(); }
+    bool HasMore() const { return !m_sAddress.isEmpty(); }
 };
 
 class SW_DLLPUBLIC SwAuthenticator final :

Reply via email to