[Libreoffice-commits] core.git: 2 commits - cui/source editeng/source include/editeng sw/source writerfilter/source

Miklos Vajna vmiklos at collabora.co.uk
Tue May 26 00:08:34 PDT 2015


 cui/source/tabpages/autocdlg.cxx                |    6 -
 editeng/source/misc/acorrcfg.cxx                |    4 -
 editeng/source/misc/swafopt.cxx                 |    4 -
 include/editeng/swafopt.hxx                     |    2 
 sw/source/core/edit/autofmt.cxx                 |   10 +--
 writerfilter/source/ooxml/OOXMLDocumentImpl.cxx |   76 +++++++++++-------------
 6 files changed, 49 insertions(+), 53 deletions(-)

New commits:
commit c642425fd372ef219a683b5198600746fb7f0c3c
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Tue May 26 09:07:26 2015 +0200

    writerfilter: remove misleading prefix of non-member variables
    
    Change-Id: I8c1883de9acf1d66f4fc5cb994a3cb97103789a6

diff --git a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
index d15d59e..ca94b05 100644
--- a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
+++ b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
@@ -547,19 +547,18 @@ void OOXMLDocumentImpl::incrementProgress()
 void OOXMLDocumentImpl::resolveCustomXmlStream(Stream & rStream)
 {
     // Resolving all item[n].xml files from CustomXml folder.
-    uno::Reference<embed::XRelationshipAccess> mxRelationshipAccess;
-    mxRelationshipAccess.set((dynamic_cast<OOXMLStreamImpl&>(*mpStream.get())).accessDocumentStream(), uno::UNO_QUERY_THROW);
-    if (mxRelationshipAccess.is())
+    uno::Reference<embed::XRelationshipAccess> xRelationshipAccess;
+    xRelationshipAccess.set((dynamic_cast<OOXMLStreamImpl&>(*mpStream.get())).accessDocumentStream(), uno::UNO_QUERY_THROW);
+    if (xRelationshipAccess.is())
     {
         static const char sCustomType[] = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml";
         static const char sCustomTypeStrict[] = "http://purl.oclc.org/ooxml/officeDocument/relationships/customXml";
         OUString sTarget("Target");
         bool bFound = false;
         sal_Int32 counter = 0;
-        uno::Sequence< uno::Sequence< beans::StringPair > >aSeqs =
-                mxRelationshipAccess->getAllRelationships();
-        uno::Sequence<uno::Reference<xml::dom::XDocument> > mxCustomXmlDomListTemp(aSeqs.getLength());
-        uno::Sequence<uno::Reference<xml::dom::XDocument> > mxCustomXmlDomPropsListTemp(aSeqs.getLength());
+        uno::Sequence< uno::Sequence< beans::StringPair > >aSeqs = xRelationshipAccess->getAllRelationships();
+        uno::Sequence<uno::Reference<xml::dom::XDocument> > xCustomXmlDomListTemp(aSeqs.getLength());
+        uno::Sequence<uno::Reference<xml::dom::XDocument> > xCustomXmlDomPropsListTemp(aSeqs.getLength());
         for (sal_Int32 j = 0; j < aSeqs.getLength(); j++)
         {
             uno::Sequence< beans::StringPair > aSeq = aSeqs[j];
@@ -585,8 +584,8 @@ void OOXMLDocumentImpl::resolveCustomXmlStream(Stream & rStream)
                 // grabbag list.
                 if(mxCustomXmlProsDom.is() && customXmlTemp.is())
                 {
-                    mxCustomXmlDomListTemp[counter] = customXmlTemp;
-                    mxCustomXmlDomPropsListTemp[counter] = mxCustomXmlProsDom;
+                    xCustomXmlDomListTemp[counter] = customXmlTemp;
+                    xCustomXmlDomPropsListTemp[counter] = mxCustomXmlProsDom;
                     counter++;
                     resolveFastSubStream(rStream, OOXMLStream::CUSTOMXML);
                 }
@@ -594,10 +593,10 @@ void OOXMLDocumentImpl::resolveCustomXmlStream(Stream & rStream)
             }
         }
 
-        mxCustomXmlDomListTemp.realloc(counter);
-        mxCustomXmlDomPropsListTemp.realloc(counter);
-        mxCustomXmlDomList = mxCustomXmlDomListTemp;
-        mxCustomXmlDomPropsList = mxCustomXmlDomPropsListTemp;
+        xCustomXmlDomListTemp.realloc(counter);
+        xCustomXmlDomPropsListTemp.realloc(counter);
+        mxCustomXmlDomList = xCustomXmlDomListTemp;
+        mxCustomXmlDomPropsList = xCustomXmlDomPropsListTemp;
     }
 }
 
@@ -623,14 +622,13 @@ void OOXMLDocumentImpl::resolveGlossaryStream(Stream & /*rStream*/)
                  "createStream for glossary" << OOXMLStream::GLOSSARY << " : " << e.Message);
         return;
     }
-    uno::Reference<embed::XRelationshipAccess> mxRelationshipAccess;
-    mxRelationshipAccess.set((dynamic_cast<OOXMLStreamImpl&>(*pStream.get())).accessDocumentStream(), uno::UNO_QUERY_THROW);
-    if (mxRelationshipAccess.is())
+    uno::Reference<embed::XRelationshipAccess> xRelationshipAccess;
+    xRelationshipAccess.set((dynamic_cast<OOXMLStreamImpl&>(*pStream.get())).accessDocumentStream(), uno::UNO_QUERY_THROW);
+    if (xRelationshipAccess.is())
     {
 
-        uno::Sequence< uno::Sequence< beans::StringPair > >aSeqs =
-                mxRelationshipAccess->getAllRelationships();
-        uno::Sequence<uno::Sequence< uno::Any> > mxGlossaryDomListTemp(aSeqs.getLength());
+        uno::Sequence< uno::Sequence< beans::StringPair > >aSeqs = xRelationshipAccess->getAllRelationships();
+        uno::Sequence<uno::Sequence< uno::Any> > xGlossaryDomListTemp(aSeqs.getLength());
          sal_Int32 counter = 0;
          for (sal_Int32 j = 0; j < aSeqs.getLength(); j++)
          {
@@ -700,21 +698,21 @@ void OOXMLDocumentImpl::resolveGlossaryStream(Stream & /*rStream*/)
                       glossaryTuple[2] = uno::makeAny(gType);
                       glossaryTuple[3] = uno::makeAny(gTarget);
                       glossaryTuple[4] = uno::makeAny(contentType);
-                      mxGlossaryDomListTemp[counter] = glossaryTuple;
+                      xGlossaryDomListTemp[counter] = glossaryTuple;
                       counter++;
                   }
               }
           }
-          mxGlossaryDomListTemp.realloc(counter);
-          mxGlossaryDomList = mxGlossaryDomListTemp;
+          xGlossaryDomListTemp.realloc(counter);
+          mxGlossaryDomList = xGlossaryDomListTemp;
       }
 }
 
 void OOXMLDocumentImpl::resolveEmbeddingsStream(OOXMLStream::Pointer_t pStream)
 {
-    uno::Reference<embed::XRelationshipAccess> mxRelationshipAccess;
-    mxRelationshipAccess.set((dynamic_cast<OOXMLStreamImpl&>(*pStream.get())).accessDocumentStream(), uno::UNO_QUERY_THROW);
-    if (mxRelationshipAccess.is())
+    uno::Reference<embed::XRelationshipAccess> xRelationshipAccess;
+    xRelationshipAccess.set((dynamic_cast<OOXMLStreamImpl&>(*pStream.get())).accessDocumentStream(), uno::UNO_QUERY_THROW);
+    if (xRelationshipAccess.is())
     {
         OUString sChartType("http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart");
         OUString sChartTypeStrict("http://purl.oclc.org/ooxml/officeDocument/relationships/chart");
@@ -727,8 +725,7 @@ void OOXMLDocumentImpl::resolveEmbeddingsStream(OOXMLStream::Pointer_t pStream)
         bool bFound = false;
         bool bHeaderFooterFound = false;
         OOXMLStream::StreamType_t streamType = OOXMLStream::UNKNOWN;
-        uno::Sequence< uno::Sequence< beans::StringPair > >aSeqs =
-                mxRelationshipAccess->getAllRelationships();
+        uno::Sequence< uno::Sequence< beans::StringPair > >aSeqs = xRelationshipAccess->getAllRelationships();
         for (sal_Int32 j = 0; j < aSeqs.getLength(); j++)
         {
             uno::Sequence< beans::StringPair > aSeq = aSeqs[j];
@@ -802,19 +799,18 @@ void OOXMLDocumentImpl::resolveEmbeddingsStream(OOXMLStream::Pointer_t pStream)
 void OOXMLDocumentImpl::resolveActiveXStream(Stream & rStream)
 {
     // Resolving all ActiveX[n].xml files from ActiveX folder.
-    uno::Reference<embed::XRelationshipAccess> mxRelationshipAccess;
-    mxRelationshipAccess.set((dynamic_cast<OOXMLStreamImpl&>(*mpStream.get())).accessDocumentStream(), uno::UNO_QUERY_THROW);
-    if (mxRelationshipAccess.is())
+    uno::Reference<embed::XRelationshipAccess> xRelationshipAccess;
+    xRelationshipAccess.set((dynamic_cast<OOXMLStreamImpl&>(*mpStream.get())).accessDocumentStream(), uno::UNO_QUERY_THROW);
+    if (xRelationshipAccess.is())
     {
         static const char sCustomType[] = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/control";
         static const char sCustomTypeStrict[] = "http://purl.oclc.org/ooxml/officeDocument/relationships/control";
         OUString sTarget("Target");
         bool bFound = false;
         sal_Int32 counter = 0;
-        uno::Sequence< uno::Sequence< beans::StringPair > >aSeqs =
-                mxRelationshipAccess->getAllRelationships();
-        uno::Sequence<uno::Reference<xml::dom::XDocument> > mxActiveXDomListTemp(aSeqs.getLength());
-        uno::Sequence<uno::Reference<io::XInputStream> > mxActiveXBinListTemp(aSeqs.getLength());
+        uno::Sequence< uno::Sequence< beans::StringPair > > aSeqs = xRelationshipAccess->getAllRelationships();
+        uno::Sequence<uno::Reference<xml::dom::XDocument> > xActiveXDomListTemp(aSeqs.getLength());
+        uno::Sequence<uno::Reference<io::XInputStream> > xActiveXBinListTemp(aSeqs.getLength());
         for (sal_Int32 j = 0; j < aSeqs.getLength(); j++)
         {
             uno::Sequence< beans::StringPair > aSeq = aSeqs[j];
@@ -839,10 +835,10 @@ void OOXMLDocumentImpl::resolveActiveXStream(Stream & rStream)
                 // This will add all ActiveX[n].xml to grabbag list.
                 if(activeXTemp.is())
                 {
-                    mxActiveXDomListTemp[counter] = activeXTemp;
+                    xActiveXDomListTemp[counter] = activeXTemp;
                     if(mxActiveXBin.is())
                     {
-                        mxActiveXBinListTemp[counter] = mxActiveXBin;
+                        xActiveXBinListTemp[counter] = mxActiveXBin;
                     }
                     counter++;
                     resolveFastSubStream(rStream, OOXMLStream::ACTIVEX);
@@ -850,10 +846,10 @@ void OOXMLDocumentImpl::resolveActiveXStream(Stream & rStream)
                 bFound = false;
             }
         }
-        mxActiveXDomListTemp.realloc(counter);
-        mxActiveXBinListTemp.realloc(counter);
-        mxActiveXDomList = mxActiveXDomListTemp;
-        mxActiveXBinList = mxActiveXBinListTemp;
+        xActiveXDomListTemp.realloc(counter);
+        xActiveXBinListTemp.realloc(counter);
+        mxActiveXDomList = xActiveXDomListTemp;
+        mxActiveXBinList = xActiveXBinListTemp;
     }
 }
 
commit 63654692728aa4ce44c57412eccc7a252f8b3e26
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Tue May 26 09:06:10 2015 +0200

    bCptlSttSntnc -> bCapitalStartSentence
    
    Change-Id: Ie22198837257163fd7211e93d97d97be2bca4b64

diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index c4a9177..21678fd 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -537,8 +537,8 @@ bool OfaSwAutoFmtOptionsPage::FillItemSet( SfxItemSet*  )
                         m_pCheckLB->IsChecked(CORR_UPPER, CBCOL_SECOND));
 
     bCheck = m_pCheckLB->IsChecked(BEGIN_UPPER, CBCOL_FIRST);
-    bModified |= pOpt->bCptlSttSntnc != bCheck;
-    pOpt->bCptlSttSntnc = bCheck;
+    bModified |= pOpt->bCapitalStartSentence != bCheck;
+    pOpt->bCapitalStartSentence = bCheck;
     pAutoCorrect->SetAutoCorrFlag(CptlSttSntnc,
                         m_pCheckLB->IsChecked(BEGIN_UPPER, CBCOL_SECOND));
 
@@ -673,7 +673,7 @@ void OfaSwAutoFmtOptionsPage::Reset( const SfxItemSet* )
     m_pCheckLB->CheckEntryPos( USE_REPLACE_TABLE,  CBCOL_SECOND,   0 != (nFlags & Autocorrect));
     m_pCheckLB->CheckEntryPos( CORR_UPPER,         CBCOL_FIRST,    pOpt->bCptlSttWrd );
     m_pCheckLB->CheckEntryPos( CORR_UPPER,         CBCOL_SECOND,   0 != (nFlags & CptlSttWrd) );
-    m_pCheckLB->CheckEntryPos( BEGIN_UPPER,        CBCOL_FIRST,    pOpt->bCptlSttSntnc );
+    m_pCheckLB->CheckEntryPos( BEGIN_UPPER,        CBCOL_FIRST,    pOpt->bCapitalStartSentence );
     m_pCheckLB->CheckEntryPos( BEGIN_UPPER,        CBCOL_SECOND,   0 != (nFlags & CptlSttSntnc) );
     m_pCheckLB->CheckEntryPos( BOLD_UNDERLINE,     CBCOL_FIRST,    pOpt->bChgWeightUnderl );
     m_pCheckLB->CheckEntryPos( BOLD_UNDERLINE,     CBCOL_SECOND,   0 != (nFlags & ChgWeightUnderl) );
diff --git a/editeng/source/misc/acorrcfg.cxx b/editeng/source/misc/acorrcfg.cxx
index 325e787..31e4fec 100644
--- a/editeng/source/misc/acorrcfg.cxx
+++ b/editeng/source/misc/acorrcfg.cxx
@@ -411,7 +411,7 @@ void SvxSwAutoCorrCfg::Load(bool bInit)
                     case   3: rParent.bAutoTextTip = *static_cast<sal_Bool const *>(pValues[nProp].getValue());  break; // "Text/ShowToolTip",
                     case   4: rParent.bSearchInAllCategories = *static_cast<sal_Bool const *>(pValues[nProp].getValue());  break; //"Text/SearchInAllCategories"
                     case   5: rSwFlags.bAutoCorrect = *static_cast<sal_Bool const *>(pValues[nProp].getValue()); break; // "Format/Option/UseReplacementTable",
-                    case   6: rSwFlags.bCptlSttSntnc = *static_cast<sal_Bool const *>(pValues[nProp].getValue()); break; // "Format/Option/TwoCapitalsAtStart",
+                    case   6: rSwFlags.bCapitalStartSentence = *static_cast<sal_Bool const *>(pValues[nProp].getValue()); break; // "Format/Option/TwoCapitalsAtStart",
                     case   7: rSwFlags.bCptlSttWrd = *static_cast<sal_Bool const *>(pValues[nProp].getValue()); break; // "Format/Option/CapitalAtStartSentence",
                     case   8: rSwFlags.bChgWeightUnderl = *static_cast<sal_Bool const *>(pValues[nProp].getValue()); break; // "Format/Option/ChangeUnderlineWeight",
                     case   9: rSwFlags.bSetINetAttr = *static_cast<sal_Bool const *>(pValues[nProp].getValue()); break; // "Format/Option/SetInetAttribute",
@@ -565,7 +565,7 @@ void SvxSwAutoCorrCfg::ImplCommit()
             case   3: pValues[nProp].setValue(&rParent.bAutoTextTip, rType); break; // "Text/ShowToolTip",
             case   4: pValues[nProp].setValue(&rParent.bSearchInAllCategories, rType );break; //"Text/SearchInAllCategories"
             case   5: bVal = rSwFlags.bAutoCorrect; pValues[nProp].setValue(&bVal, rType); break; // "Format/Option/UseReplacementTable",
-            case   6: bVal = rSwFlags.bCptlSttSntnc; pValues[nProp].setValue(&bVal, rType); break; // "Format/Option/TwoCapitalsAtStart",
+            case   6: bVal = rSwFlags.bCapitalStartSentence; pValues[nProp].setValue(&bVal, rType); break; // "Format/Option/TwoCapitalsAtStart",
             case   7: bVal = rSwFlags.bCptlSttWrd; pValues[nProp].setValue(&bVal, rType); break; // "Format/Option/CapitalAtStartSentence",
             case   8: bVal = rSwFlags.bChgWeightUnderl; pValues[nProp].setValue(&bVal, rType); break; // "Format/Option/ChangeUnderlineWeight",
             case   9: bVal = rSwFlags.bSetINetAttr; pValues[nProp].setValue(&bVal, rType); break; // "Format/Option/SetInetAttribute",
diff --git a/editeng/source/misc/swafopt.cxx b/editeng/source/misc/swafopt.cxx
index 31f085c..22910b7 100644
--- a/editeng/source/misc/swafopt.cxx
+++ b/editeng/source/misc/swafopt.cxx
@@ -26,7 +26,7 @@ SvxSwAutoFormatFlags::SvxSwAutoFormatFlags()
                     Size( 0, 14 ) )
 {
     bAutoCorrect =
-    bCptlSttSntnc =
+    bCapitalStartSentence =
     bCptlSttWrd =
     bChkFontAttr =
     bChgUserColl =
@@ -84,7 +84,7 @@ SvxSwAutoFormatFlags::SvxSwAutoFormatFlags()
 SvxSwAutoFormatFlags& SvxSwAutoFormatFlags::operator=( const SvxSwAutoFormatFlags& rAFFlags )
 {
     bAutoCorrect = rAFFlags.bAutoCorrect;
-    bCptlSttSntnc = rAFFlags.bCptlSttSntnc;
+    bCapitalStartSentence = rAFFlags.bCapitalStartSentence;
     bCptlSttWrd = rAFFlags.bCptlSttWrd;
     bChkFontAttr = rAFFlags.bChkFontAttr;
 
diff --git a/include/editeng/swafopt.hxx b/include/editeng/swafopt.hxx
index 5cf829d..6929228 100644
--- a/include/editeng/swafopt.hxx
+++ b/include/editeng/swafopt.hxx
@@ -76,7 +76,7 @@ struct EDITENG_DLLPUBLIC SvxSwAutoFormatFlags
     sal_uInt8 nRightMargin;
 
     bool bAutoCorrect : 1;
-    bool bCptlSttSntnc : 1;
+    bool bCapitalStartSentence : 1;
     bool bCptlSttWrd : 1;
     bool bChkFontAttr : 1;
 
diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx
index af48083..75cb288 100644
--- a/sw/source/core/edit/autofmt.cxx
+++ b/sw/source/core/edit/autofmt.cxx
@@ -1785,7 +1785,7 @@ void SwAutoFormat::AutoCorrect( sal_Int32 nPos )
 
     if( m_aFlags.bAFormatByInput ||
         (!m_aFlags.bAutoCorrect && !bReplaceQuote && !bReplaceSglQuote &&
-        !m_aFlags.bCptlSttSntnc && !m_aFlags.bCptlSttWrd &&
+        !m_aFlags.bCapitalStartSentence && !m_aFlags.bCptlSttWrd &&
         !m_aFlags.bChgOrdinalNumber &&
         !m_aFlags.bChgToEnEmDash && !m_aFlags.bSetINetAttr &&
         !m_aFlags.bChgWeightUnderl && !m_aFlags.bAddNonBrkSpace) )
@@ -1797,7 +1797,7 @@ void SwAutoFormat::AutoCorrect( sal_Int32 nPos )
 
     bool bGetLanguage = m_aFlags.bChgOrdinalNumber ||
                         m_aFlags.bChgToEnEmDash || m_aFlags.bSetINetAttr ||
-                        m_aFlags.bCptlSttWrd || m_aFlags.bCptlSttSntnc ||
+                        m_aFlags.bCptlSttWrd || m_aFlags.bCapitalStartSentence ||
                         m_aFlags.bAddNonBrkSpace;
 
     m_aDelPam.DeleteMark();
@@ -1809,7 +1809,7 @@ void SwAutoFormat::AutoCorrect( sal_Int32 nPos )
     SwTextFrmInfo aFInfo( 0 );
 
     sal_Int32 nSttPos, nLastBlank = nPos;
-    bool bFirst = m_aFlags.bCptlSttSntnc, bFirstSent = bFirst;
+    bool bFirst = m_aFlags.bCapitalStartSentence, bFirstSent = bFirst;
     sal_Unicode cChar = 0;
 
     CharClass& rAppCC = GetAppCharClass();
@@ -1973,7 +1973,7 @@ void SwAutoFormat::AutoCorrect( sal_Int32 nPos )
             case '.':
             case '!':
             case '?':
-                if( m_aFlags.bCptlSttSntnc )
+                if( m_aFlags.bCapitalStartSentence )
                     bFirstSent = true;
                 /* fallthrough */
             default:
@@ -2046,7 +2046,7 @@ void SwAutoFormat::AutoCorrect( sal_Int32 nPos )
                     pATst->FnCptlSttWrd( aACorrDoc, *pText, nSttPos, nPos, eLang );
                 }
                 // capital letter at the beginning of a sentence?
-                if( m_aFlags.bCptlSttSntnc && bFirst )
+                if( m_aFlags.bCapitalStartSentence && bFirst )
                 {
                     SetRedlineText( STR_AUTOFMTREDL_CPTL_STT_SENT );
                     pATst->FnCptlSttSntnc( aACorrDoc, *pText, true, nSttPos, nPos, eLang);


More information about the Libreoffice-commits mailing list