[Libreoffice-commits] core.git: sw/inc sw/source

Miklos Vajna vmiklos at collabora.co.uk
Mon Jul 18 10:37:58 UTC 2016


 sw/inc/unosrch.hxx                 |   34 +++++-----
 sw/source/core/unocore/unosrch.cxx |  124 ++++++++++++++++++-------------------
 sw/source/uibase/uno/unotxdoc.cxx  |   26 +++----
 3 files changed, 92 insertions(+), 92 deletions(-)

New commits:
commit 66e8e2488bb777e04cf403b588e5ff05db07fffe
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Mon Jul 18 09:44:13 2016 +0200

    sw: prefix members of SwXTextSearch
    
    Change-Id: I3231605c0468462a36d75318d0070e5e3c36f4d6
    Reviewed-on: https://gerrit.libreoffice.org/27276
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Jenkins <ci at libreoffice.org>

diff --git a/sw/inc/unosrch.hxx b/sw/inc/unosrch.hxx
index 0fec59d..f2cd2c6 100644
--- a/sw/inc/unosrch.hxx
+++ b/sw/inc/unosrch.hxx
@@ -43,26 +43,26 @@ class SwXTextSearch : public cppu::WeakImplHelper
 {
     friend class SwXTextDocument;
 
-    OUString                sSearchText;
-    OUString                sReplaceText;
+    OUString                m_sSearchText;
+    OUString                m_sReplaceText;
 
-    SwSearchProperties_Impl*    pSearchProperties;
-    SwSearchProperties_Impl*    pReplaceProperties;
+    SwSearchProperties_Impl*    m_pSearchProperties;
+    SwSearchProperties_Impl*    m_pReplaceProperties;
 
     const SfxItemPropertySet*   m_pPropSet;
-    bool                    bAll  : 1;
-    bool                    bWord : 1;
-    bool                    bBack : 1;
-    bool                    bExpr : 1;
-    bool                    bCase : 1;
-    bool                    bStyles:1;
-    bool                    bSimilarity : 1;
-    bool                    bLevRelax       :1;
-    sal_Int16                   nLevExchange;
-    sal_Int16                   nLevAdd;
-    sal_Int16                   nLevRemove;
-
-    bool                    bIsValueSearch :1;
+    bool                    m_bAll  : 1;
+    bool                    m_bWord : 1;
+    bool                    m_bBack : 1;
+    bool                    m_bExpr : 1;
+    bool                    m_bCase : 1;
+    bool                    m_bStyles:1;
+    bool                    m_bSimilarity : 1;
+    bool                    m_bLevRelax       :1;
+    sal_Int16                   m_nLevExchange;
+    sal_Int16                   m_nLevAdd;
+    sal_Int16                   m_nLevRemove;
+
+    bool                    m_bIsValueSearch :1;
 protected:
     virtual ~SwXTextSearch();
 public:
diff --git a/sw/source/core/unocore/unosrch.cxx b/sw/source/core/unocore/unosrch.cxx
index 338309a..6a6d10f 100644
--- a/sw/source/core/unocore/unosrch.cxx
+++ b/sw/source/core/unocore/unosrch.cxx
@@ -476,28 +476,28 @@ bool    SwSearchProperties_Impl::HasAttributes() const
 }
 
 SwXTextSearch::SwXTextSearch() :
-    pSearchProperties( new SwSearchProperties_Impl),
-    pReplaceProperties( new SwSearchProperties_Impl),
+    m_pSearchProperties( new SwSearchProperties_Impl),
+    m_pReplaceProperties( new SwSearchProperties_Impl),
     m_pPropSet(aSwMapProvider.GetPropertySet(PROPERTY_MAP_TEXT_SEARCH)),
-    bAll(false),
-    bWord(false),
-    bBack(false),
-    bExpr(false),
-    bCase(false),
-    bStyles(false),
-    bSimilarity(false),
-    bLevRelax(false),
-    nLevExchange(2),
-    nLevAdd(2),
-    nLevRemove(2),
-    bIsValueSearch(true)
+    m_bAll(false),
+    m_bWord(false),
+    m_bBack(false),
+    m_bExpr(false),
+    m_bCase(false),
+    m_bStyles(false),
+    m_bSimilarity(false),
+    m_bLevRelax(false),
+    m_nLevExchange(2),
+    m_nLevAdd(2),
+    m_nLevRemove(2),
+    m_bIsValueSearch(true)
 {
 }
 
 SwXTextSearch::~SwXTextSearch()
 {
-    delete pSearchProperties;
-    delete pReplaceProperties;
+    delete m_pSearchProperties;
+    delete m_pReplaceProperties;
 }
 
 namespace
@@ -525,26 +525,26 @@ sal_Int64 SAL_CALL SwXTextSearch::getSomething( const uno::Sequence< sal_Int8 >&
 OUString SwXTextSearch::getSearchString() throw( uno::RuntimeException, std::exception )
 {
     SolarMutexGuard aGuard;
-    return sSearchText;
+    return m_sSearchText;
 }
 
 void SwXTextSearch::setSearchString(const OUString& rString)
                                         throw( uno::RuntimeException, std::exception )
 {
     SolarMutexGuard aGuard;
-    sSearchText = rString;
+    m_sSearchText = rString;
 }
 
 OUString SwXTextSearch::getReplaceString() throw( uno::RuntimeException, std::exception )
 {
     SolarMutexGuard aGuard;
-    return sReplaceText;
+    return m_sReplaceText;
 }
 
 void SwXTextSearch::setReplaceString(const OUString& rReplaceString) throw( uno::RuntimeException, std::exception )
 {
     SolarMutexGuard aGuard;
-    sReplaceText = rReplaceString;
+    m_sReplaceText = rReplaceString;
 }
 
 uno::Reference< beans::XPropertySetInfo >  SwXTextSearch::getPropertySetInfo() throw( uno::RuntimeException, std::exception )
@@ -568,18 +568,18 @@ void SwXTextSearch::setPropertyValue(const OUString& rPropertyName, const uno::A
             bVal = *b;
         switch(pEntry->nWID)
         {
-            case WID_SEARCH_ALL :           bAll        = bVal; break;
-            case WID_WORDS:                 bWord       = bVal; break;
-            case WID_BACKWARDS :            bBack       = bVal; break;
-            case WID_REGULAR_EXPRESSION :   bExpr       = bVal; break;
-            case WID_CASE_SENSITIVE  :      bCase       = bVal; break;
+            case WID_SEARCH_ALL :           m_bAll        = bVal; break;
+            case WID_WORDS:                 m_bWord       = bVal; break;
+            case WID_BACKWARDS :            m_bBack       = bVal; break;
+            case WID_REGULAR_EXPRESSION :   m_bExpr       = bVal; break;
+            case WID_CASE_SENSITIVE  :      m_bCase       = bVal; break;
             //case WID_IN_SELECTION  :      bInSel      = bVal; break;
-            case WID_STYLES          :      bStyles     = bVal; break;
-            case WID_SIMILARITY      :      bSimilarity = bVal; break;
-            case WID_SIMILARITY_RELAX:      bLevRelax   = bVal; break;
-            case WID_SIMILARITY_EXCHANGE:   aValue >>= nLevExchange; break;
-            case WID_SIMILARITY_ADD:        aValue >>= nLevAdd; break;
-            case WID_SIMILARITY_REMOVE :    aValue >>= nLevRemove;break;
+            case WID_STYLES          :      m_bStyles     = bVal; break;
+            case WID_SIMILARITY      :      m_bSimilarity = bVal; break;
+            case WID_SIMILARITY_RELAX:      m_bLevRelax   = bVal; break;
+            case WID_SIMILARITY_EXCHANGE:   aValue >>= m_nLevExchange; break;
+            case WID_SIMILARITY_ADD:        aValue >>= m_nLevAdd; break;
+            case WID_SIMILARITY_REMOVE :    aValue >>= m_nLevRemove;break;
         };
     }
     else
@@ -598,21 +598,21 @@ uno::Any SwXTextSearch::getPropertyValue(const OUString& rPropertyName) throw( b
         sal_Int16 nSet = 0;
         switch(pEntry->nWID)
         {
-            case WID_SEARCH_ALL :           bSet = bAll; goto SET_BOOL;
-            case WID_WORDS:                 bSet = bWord; goto SET_BOOL;
-            case WID_BACKWARDS :            bSet = bBack; goto SET_BOOL;
-            case WID_REGULAR_EXPRESSION :   bSet = bExpr; goto SET_BOOL;
-            case WID_CASE_SENSITIVE  :      bSet = bCase; goto SET_BOOL;
+            case WID_SEARCH_ALL :           bSet = m_bAll; goto SET_BOOL;
+            case WID_WORDS:                 bSet = m_bWord; goto SET_BOOL;
+            case WID_BACKWARDS :            bSet = m_bBack; goto SET_BOOL;
+            case WID_REGULAR_EXPRESSION :   bSet = m_bExpr; goto SET_BOOL;
+            case WID_CASE_SENSITIVE  :      bSet = m_bCase; goto SET_BOOL;
             //case WID_IN_SELECTION  :      bSet = bInSel; goto SET_BOOL;
-            case WID_STYLES          :      bSet = bStyles; goto SET_BOOL;
-            case WID_SIMILARITY      :      bSet = bSimilarity; goto SET_BOOL;
-            case WID_SIMILARITY_RELAX:      bSet = bLevRelax;
+            case WID_STYLES          :      bSet = m_bStyles; goto SET_BOOL;
+            case WID_SIMILARITY      :      bSet = m_bSimilarity; goto SET_BOOL;
+            case WID_SIMILARITY_RELAX:      bSet = m_bLevRelax;
 SET_BOOL:
             aRet <<= bSet;
             break;
-            case WID_SIMILARITY_EXCHANGE:   nSet = nLevExchange; goto SET_UINT16;
-            case WID_SIMILARITY_ADD:        nSet = nLevAdd; goto SET_UINT16;
-            case WID_SIMILARITY_REMOVE :    nSet = nLevRemove;
+            case WID_SIMILARITY_EXCHANGE:   nSet = m_nLevExchange; goto SET_UINT16;
+            case WID_SIMILARITY_ADD:        nSet = m_nLevAdd; goto SET_UINT16;
+            case WID_SIMILARITY_REMOVE :    nSet = m_nLevRemove;
 SET_UINT16:
             aRet <<= nSet;
             break;
@@ -646,56 +646,56 @@ void SwXTextSearch::removeVetoableChangeListener(const OUString& /*rPropertyName
 sal_Bool SwXTextSearch::getValueSearch() throw( uno::RuntimeException, std::exception )
 {
     SolarMutexGuard aGuard;
-    return bIsValueSearch;
+    return m_bIsValueSearch;
 }
 
 void SwXTextSearch::setValueSearch(sal_Bool ValueSearch_) throw( uno::RuntimeException, std::exception )
 {
     SolarMutexGuard aGuard;
-    bIsValueSearch = ValueSearch_;
+    m_bIsValueSearch = ValueSearch_;
 }
 
 uno::Sequence< beans::PropertyValue > SwXTextSearch::getSearchAttributes() throw( uno::RuntimeException, std::exception )
 {
-    return  pSearchProperties->GetProperties();
+    return  m_pSearchProperties->GetProperties();
 }
 
 void SwXTextSearch::setSearchAttributes(const uno::Sequence< beans::PropertyValue >& rSearchAttribs)
     throw( beans::UnknownPropertyException, lang::IllegalArgumentException, uno::RuntimeException, std::exception )
 {
-    pSearchProperties->SetProperties(rSearchAttribs);
+    m_pSearchProperties->SetProperties(rSearchAttribs);
 }
 
 uno::Sequence< beans::PropertyValue > SwXTextSearch::getReplaceAttributes()
     throw( uno::RuntimeException, std::exception )
 {
-    return pReplaceProperties->GetProperties();
+    return m_pReplaceProperties->GetProperties();
 }
 
 void SwXTextSearch::setReplaceAttributes(const uno::Sequence< beans::PropertyValue >& rReplaceAttribs)
     throw( beans::UnknownPropertyException, lang::IllegalArgumentException, uno::RuntimeException, std::exception )
 {
-    pReplaceProperties->SetProperties(rReplaceAttribs);
+    m_pReplaceProperties->SetProperties(rReplaceAttribs);
 }
 
 void    SwXTextSearch::FillSearchItemSet(SfxItemSet& rSet) const
 {
-    pSearchProperties->FillItemSet(rSet, bIsValueSearch);
+    m_pSearchProperties->FillItemSet(rSet, m_bIsValueSearch);
 }
 
 void    SwXTextSearch::FillReplaceItemSet(SfxItemSet& rSet) const
 {
-    pReplaceProperties->FillItemSet(rSet, bIsValueSearch);
+    m_pReplaceProperties->FillItemSet(rSet, m_bIsValueSearch);
 }
 
 bool    SwXTextSearch::HasSearchAttributes() const
 {
-    return pSearchProperties->HasAttributes();
+    return m_pSearchProperties->HasAttributes();
 }
 
 bool    SwXTextSearch::HasReplaceAttributes() const
 {
-    return pReplaceProperties->HasAttributes();
+    return m_pReplaceProperties->HasAttributes();
 }
 
 OUString SwXTextSearch::getImplementationName() throw( uno::RuntimeException, std::exception )
@@ -719,17 +719,17 @@ uno::Sequence< OUString > SwXTextSearch::getSupportedServiceNames() throw( uno::
 
 void SwXTextSearch::FillSearchOptions( util::SearchOptions2& rSearchOpt ) const
 {
-    if( bSimilarity )
+    if( m_bSimilarity )
     {
         rSearchOpt.algorithmType = util::SearchAlgorithms_APPROXIMATE;
         rSearchOpt.AlgorithmType2 = util::SearchAlgorithms2::APPROXIMATE;
-        rSearchOpt.changedChars = nLevExchange;
-        rSearchOpt.deletedChars = nLevRemove;
-        rSearchOpt.insertedChars = nLevAdd;
-        if( bLevRelax )
+        rSearchOpt.changedChars = m_nLevExchange;
+        rSearchOpt.deletedChars = m_nLevRemove;
+        rSearchOpt.insertedChars = m_nLevAdd;
+        if( m_bLevRelax )
             rSearchOpt.searchFlag |= util::SearchFlags::LEV_RELAXED;
     }
-    else if( bExpr )
+    else if( m_bExpr )
     {
         rSearchOpt.algorithmType = util::SearchAlgorithms_REGEXP;
         rSearchOpt.AlgorithmType2 = util::SearchAlgorithms2::REGEXP;
@@ -741,12 +741,12 @@ void SwXTextSearch::FillSearchOptions( util::SearchOptions2& rSearchOpt ) const
     }
 
     rSearchOpt.Locale = GetAppLanguageTag().getLocale();
-    rSearchOpt.searchString = sSearchText;
-    rSearchOpt.replaceString = sReplaceText;
+    rSearchOpt.searchString = m_sSearchText;
+    rSearchOpt.replaceString = m_sReplaceText;
 
-    if( !bCase )
+    if( !m_bCase )
         rSearchOpt.transliterateFlags |= i18n::TransliterationModules_IGNORE_CASE;
-    if( bWord )
+    if( m_bWord )
         rSearchOpt.searchFlag |= util::SearchFlags::NORM_WORD_ONLY;
 
 //  bInSel: 1;  // wie geht das?
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx
index 9093b7d..a4290b8 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -761,8 +761,8 @@ sal_Int32 SwXTextDocument::replaceAll(const Reference< util::XSearchDescriptor >
     util::SearchOptions2 aSearchOpt;
     pSearch->FillSearchOptions( aSearchOpt );
 
-    SwDocPositions eStart = pSearch->bBack ? DOCPOS_END : DOCPOS_START;
-    SwDocPositions eEnd = pSearch->bBack ? DOCPOS_START : DOCPOS_END;
+    SwDocPositions eStart = pSearch->m_bBack ? DOCPOS_END : DOCPOS_START;
+    SwDocPositions eEnd = pSearch->m_bBack ? DOCPOS_START : DOCPOS_END;
 
     // Search should take place anywhere
     pUnoCursor->SetRemainInSection(false);
@@ -784,16 +784,16 @@ sal_Int32 SwXTextDocument::replaceAll(const Reference< util::XSearchDescriptor >
         pSearch->FillSearchItemSet(aSearch);
         pSearch->FillReplaceItemSet(aReplace);
         bool bCancel;
-        nResult = (sal_Int32)pUnoCursor->Find( aSearch, !pSearch->bStyles,
+        nResult = (sal_Int32)pUnoCursor->Find( aSearch, !pSearch->m_bStyles,
                     eStart, eEnd, bCancel,
                     (FindRanges)eRanges,
-                    !pSearch->sSearchText.isEmpty() ? &aSearchOpt : nullptr,
+                    !pSearch->m_sSearchText.isEmpty() ? &aSearchOpt : nullptr,
                     &aReplace );
     }
-    else if(pSearch->bStyles)
+    else if(pSearch->m_bStyles)
     {
-        SwTextFormatColl *pSearchColl = lcl_GetParaStyle(pSearch->sSearchText, pUnoCursor->GetDoc());
-        SwTextFormatColl *pReplaceColl = lcl_GetParaStyle(pSearch->sReplaceText, pUnoCursor->GetDoc());
+        SwTextFormatColl *pSearchColl = lcl_GetParaStyle(pSearch->m_sSearchText, pUnoCursor->GetDoc());
+        SwTextFormatColl *pReplaceColl = lcl_GetParaStyle(pSearch->m_sReplaceText, pUnoCursor->GetDoc());
 
         bool bCancel;
         nResult = pUnoCursor->Find( *pSearchColl,
@@ -897,8 +897,8 @@ SwUnoCursor* SwXTextDocument::FindAny(const Reference< util::XSearchDescriptor >
         eRanges = FND_IN_OTHER;
     if(bAll) //always - everywhere?
         eRanges = FND_IN_SELALL;
-    SwDocPositions eStart = !bAll ? DOCPOS_CURR : pSearch->bBack ? DOCPOS_END : DOCPOS_START;
-    SwDocPositions eEnd = pSearch->bBack ? DOCPOS_START : DOCPOS_END;
+    SwDocPositions eStart = !bAll ? DOCPOS_CURR : pSearch->m_bBack ? DOCPOS_END : DOCPOS_START;
+    SwDocPositions eEnd = pSearch->m_bBack ? DOCPOS_START : DOCPOS_END;
 
     nResult = 0;
     for (int nSearchProc = 0; nSearchProc < 2; ++nSearchProc)
@@ -914,14 +914,14 @@ SwUnoCursor* SwXTextDocument::FindAny(const Reference< util::XSearchDescriptor >
                                 0);
             pSearch->FillSearchItemSet(aSearch);
             bool bCancel;
-            nResult = (sal_Int32)pUnoCursor->Find( aSearch, !pSearch->bStyles,
+            nResult = (sal_Int32)pUnoCursor->Find( aSearch, !pSearch->m_bStyles,
                         eStart, eEnd, bCancel,
                         (FindRanges)eRanges,
-                        !pSearch->sSearchText.isEmpty() ? &aSearchOpt : nullptr );
+                        !pSearch->m_sSearchText.isEmpty() ? &aSearchOpt : nullptr );
         }
-        else if(pSearch->bStyles)
+        else if(pSearch->m_bStyles)
         {
-            SwTextFormatColl *pSearchColl = lcl_GetParaStyle(pSearch->sSearchText, pUnoCursor->GetDoc());
+            SwTextFormatColl *pSearchColl = lcl_GetParaStyle(pSearch->m_sSearchText, pUnoCursor->GetDoc());
             //pSearch->sReplaceText
             SwTextFormatColl *pReplaceColl = nullptr;
             bool bCancel;


More information about the Libreoffice-commits mailing list