[Libreoffice-commits] core.git: include/xmloff xmloff/source

Michael Stahl mstahl at redhat.com
Tue Jul 4 11:16:26 UTC 2017


 include/xmloff/txtstyli.hxx     |   38 +++++++++---------
 xmloff/source/text/txtstyli.cxx |   84 ++++++++++++++++++++--------------------
 2 files changed, 62 insertions(+), 60 deletions(-)

New commits:
commit f99ff13fd10fe0dfd0875a725264b0e685c42326
Author: Michael Stahl <mstahl at redhat.com>
Date:   Mon Jul 3 15:16:46 2017 +0200

    xmloff: prefix members of XMLTextStyleContext
    
    Change-Id: I9db514a20aad0e82a99a02334dfd5910b66e3a01

diff --git a/include/xmloff/txtstyli.hxx b/include/xmloff/txtstyli.hxx
index 7015a616ea3c..0588e52aa004 100644
--- a/include/xmloff/txtstyli.hxx
+++ b/include/xmloff/txtstyli.hxx
@@ -28,11 +28,11 @@ class XMLEventsImportContext;
 
 class XMLOFF_DLLPUBLIC XMLTextStyleContext : public XMLPropStyleContext
 {
-    OUString             sListStyleName;
-    OUString             sCategoryVal;
-    OUString             sDropCapTextStyleName;
-    OUString             sMasterPageName;
-    OUString             sDataStyleName; // for grid columns only
+    OUString             m_sListStyleName;
+    OUString             m_sCategoryVal;
+    OUString             m_sDropCapTextStyleName;
+    OUString             m_sMasterPageName;
+    OUString             m_sDataStyleName; // for grid columns only
     const OUString       sIsAutoUpdate;
     const OUString       sCategory;
     const OUString       sNumberingStyleName;
@@ -43,17 +43,17 @@ public:
 private:
     const OUString       sPageDescName;
 
-    sal_Int8    nOutlineLevel;
+    sal_Int8    m_nOutlineLevel;
 
-    bool        bAutoUpdate : 1;
-    bool        bHasMasterPageName : 1;
+    bool        m_isAutoUpdate : 1;
+    bool        m_bHasMasterPageName : 1;
 
-    bool        bHasCombinedCharactersLetter : 1;
+    bool        m_bHasCombinedCharactersLetter : 1;
 
     // Introduce import of empty list style (#i69523#)
-    bool        mbListStyleSet : 1;
+    bool        m_bListStyleSet : 1;
 
-    rtl::Reference<XMLEventsImportContext> mxEventContext;
+    rtl::Reference<XMLEventsImportContext> m_xEventContext;
 
 protected:
 
@@ -79,17 +79,17 @@ public:
             const OUString& rLocalName,
             const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) override;
 
-    const OUString& GetListStyle() const { return sListStyleName; }
-    // XML import: reconstrution of assignment of paragraph style to outline levels (#i69629#)
+    const OUString& GetListStyle() const { return m_sListStyleName; }
+    // XML import: reconstruction of assignment of paragraph style to outline levels (#i69629#)
     bool IsListStyleSet() const
     {
-        return mbListStyleSet;
+        return m_bListStyleSet;
     }
 
-    const OUString& GetMasterPageName() const { return sMasterPageName; }
-    bool HasMasterPageName() const { return bHasMasterPageName; }
-    const OUString& GetDropCapStyleName() const { return sDropCapTextStyleName; }
-    const OUString& GetDataStyleName() const { return sDataStyleName; }
+    const OUString& GetMasterPageName() const { return m_sMasterPageName; }
+    bool HasMasterPageName() const { return m_bHasMasterPageName; }
+    const OUString& GetDropCapStyleName() const { return m_sDropCapTextStyleName; }
+    const OUString& GetDataStyleName() const { return m_sDataStyleName; }
 
     virtual void CreateAndInsert( bool bOverwrite ) override;
     virtual void Finish( bool bOverwrite ) override;
@@ -100,7 +100,7 @@ public:
             const css::uno::Reference< css::beans::XPropertySet > & rPropSet ) override;
 
     bool HasCombinedCharactersLetter()
-        { return bHasCombinedCharactersLetter; }
+        { return m_bHasCombinedCharactersLetter; }
 
     const ::std::vector< XMLPropertyState > & GetProperties_() { return GetProperties(); }
 };
diff --git a/xmloff/source/text/txtstyli.cxx b/xmloff/source/text/txtstyli.cxx
index be36e6cfc75a..345bd60c0889 100644
--- a/xmloff/source/text/txtstyli.cxx
+++ b/xmloff/source/text/txtstyli.cxx
@@ -85,33 +85,35 @@ void XMLTextStyleContext::SetAttribute( sal_uInt16 nPrefixKey,
         if( IsXMLToken( rLocalName, XML_AUTO_UPDATE ) )
         {
             if( IsXMLToken( rValue, XML_TRUE ) )
-                bAutoUpdate = true;
+                m_isAutoUpdate = true;
         }
         else if( IsXMLToken( rLocalName, XML_LIST_STYLE_NAME ) )
         {
-            sListStyleName = rValue;
+            m_sListStyleName = rValue;
             // Inherited paragraph style lost information about unset numbering (#i69523#)
-            mbListStyleSet = true;
+            m_bListStyleSet = true;
         }
         else if( IsXMLToken( rLocalName, XML_MASTER_PAGE_NAME ) )
         {
-            sMasterPageName = rValue;
-            bHasMasterPageName = true;
+            m_sMasterPageName = rValue;
+            m_bHasMasterPageName = true;
         }
         else if( IsXMLToken( rLocalName, XML_DATA_STYLE_NAME ) )
         {
-            sDataStyleName = rValue;
+            m_sDataStyleName = rValue;
         }
         else if( IsXMLToken( rLocalName, XML_CLASS ) )
         {
-            sCategoryVal = rValue;
+            m_sCategoryVal = rValue;
         }
         else if( IsXMLToken( rLocalName, XML_DEFAULT_OUTLINE_LEVEL ) )
         {
             sal_Int32 nTmp;
             if (::sax::Converter::convertNumber( nTmp, rValue ) &&
                 0 <= nTmp && nTmp <= 10 )
-                nOutlineLevel = static_cast< sal_Int8 >( nTmp );
+            {
+                m_nOutlineLevel = static_cast<sal_Int8>(nTmp);
+            }
         }
         else
         {
@@ -137,12 +139,12 @@ XMLTextStyleContext::XMLTextStyleContext( SvXMLImport& rImport,
 ,       sOutlineLevel("OutlineLevel" )
 ,   sDropCapCharStyleName( "DropCapCharStyleName" )
 ,   sPageDescName( "PageDescName" )
-,   nOutlineLevel( -1 )
-,   bAutoUpdate( false )
-,   bHasMasterPageName( false )
-,   bHasCombinedCharactersLetter( false )
+,   m_nOutlineLevel( -1 )
+,   m_isAutoUpdate( false )
+,   m_bHasMasterPageName( false )
+,   m_bHasCombinedCharactersLetter( false )
 // Inherited paragraph style lost information about unset numbering (#i69523#)
-,   mbListStyleSet( false )
+,   m_bListStyleSet( false )
 {
 }
 
@@ -179,7 +181,7 @@ SvXMLImportContext *XMLTextStyleContext::CreateChildContext(
                                                         nFamily,
                                                         GetProperties(),
                                                         xImpPrMap,
-                                                        sDropCapTextStyleName );
+                                                        m_sDropCapTextStyleName);
         }
     }
     else if ( (XML_NAMESPACE_OFFICE == nPrefix) &&
@@ -187,9 +189,9 @@ SvXMLImportContext *XMLTextStyleContext::CreateChildContext(
     {
         // create and remember events import context
         // (for delayed processing of events)
-        mxEventContext.set(new XMLEventsImportContext( GetImport(), nPrefix,
+        m_xEventContext.set(new XMLEventsImportContext( GetImport(), nPrefix,
                                                    rLocalName));
-        pContext = mxEventContext.get();
+        pContext = m_xEventContext.get();
     }
 
     if( !pContext )
@@ -211,31 +213,31 @@ void XMLTextStyleContext::CreateAndInsert( bool bOverwrite )
                 xPropSet->getPropertySetInfo();
     if( xPropSetInfo->hasPropertyByName( sIsAutoUpdate ) )
     {
-        xPropSet->setPropertyValue( sIsAutoUpdate, Any(bAutoUpdate) );
+        xPropSet->setPropertyValue( sIsAutoUpdate, Any(m_isAutoUpdate) );
     }
 
     sal_uInt16 nCategory = ParagraphStyleCategory::TEXT;
     if(  XML_STYLE_FAMILY_TEXT_PARAGRAPH == GetFamily() &&
-         !sCategoryVal.isEmpty() && xStyle->isUserDefined() &&
+         !m_sCategoryVal.isEmpty() && xStyle->isUserDefined() &&
          xPropSetInfo->hasPropertyByName( sCategory ) &&
-          SvXMLUnitConverter::convertEnum( nCategory, sCategoryVal, aCategoryMap ) )
+        SvXMLUnitConverter::convertEnum( nCategory, m_sCategoryVal, aCategoryMap))
     {
         xPropSet->setPropertyValue( sCategory, Any((sal_Int16)nCategory) );
     }
 
     // tell the style about it's events (if applicable)
-    if (mxEventContext.is())
+    if (m_xEventContext.is())
     {
         // pass events into event suppplier
         Reference<document::XEventsSupplier> xEventsSupplier(xStyle,UNO_QUERY);
-        mxEventContext->SetEvents(xEventsSupplier);
-        mxEventContext.clear();
+        m_xEventContext->SetEvents(xEventsSupplier);
+        m_xEventContext.clear();
     }
 
     // XML import: reconstrution of assignment of paragraph style to outline levels (#i69629#)
-    if ( nOutlineLevel > 0 )
+    if (m_nOutlineLevel > 0)
     {
-        GetImport().GetTextImport()->AddOutlineStyleCandidate( nOutlineLevel,
+        GetImport().GetTextImport()->AddOutlineStyleCandidate(m_nOutlineLevel,
                                                       GetDisplayName() );
     }
 }
@@ -263,10 +265,10 @@ void XMLTextStyleContext::Finish( bool bOverwrite )
 
     Reference < XStyle > xStyle = GetStyle();
     // Consider set empty list style (#i69523#)
-    if ( !( mbListStyleSet ||
-            nOutlineLevel >= 0 ||
-            !sDropCapTextStyleName.isEmpty() ||
-            bHasMasterPageName ) ||
+    if ( !( m_bListStyleSet ||
+            m_nOutlineLevel >= 0 ||
+            !m_sDropCapTextStyleName.isEmpty() ||
+            m_bHasMasterPageName ) ||
          !xStyle.is() ||
          !( bOverwrite || IsNew() ) )
         return;
@@ -277,14 +279,14 @@ void XMLTextStyleContext::Finish( bool bOverwrite )
 
     if( xPropSetInfo->hasPropertyByName( sOutlineLevel ))
     {
-        if( nOutlineLevel >= 0 )
+        if (m_nOutlineLevel >= 0)
         {
-            xPropSet->setPropertyValue( sOutlineLevel, Any(nOutlineLevel) );
+            xPropSet->setPropertyValue( sOutlineLevel, Any(m_nOutlineLevel) );
         }
     }
 
     // Consider set empty list style (#i69523#)
-    if ( mbListStyleSet &&
+    if (m_bListStyleSet &&
          xPropSetInfo->hasPropertyByName( sNumberingStyleName ) )
     {
         /* Only for text document from version prior OOo 2.1 resp. SO 8 PU5:
@@ -293,7 +295,7 @@ void XMLTextStyleContext::Finish( bool bOverwrite )
              level of the outline style. (#i70223#)
         */
         bool bApplyListStyle( true );
-        if ( nOutlineLevel > 0 )
+        if (m_nOutlineLevel > 0)
         {
             if ( GetImport().IsTextDocInOOoFileFormat() )
             {
@@ -315,16 +317,16 @@ void XMLTextStyleContext::Finish( bool bOverwrite )
 
         if ( bApplyListStyle )
         {
-            if ( sListStyleName.isEmpty() )
+            if (m_sListStyleName.isEmpty())
             {
-                xPropSet->setPropertyValue( sNumberingStyleName, Any(sListStyleName) ); /* empty string */;
+                xPropSet->setPropertyValue(sNumberingStyleName, Any(m_sListStyleName)); /* empty string */
             }
             else
             {
                 // change list style name to display name
                 OUString sDisplayListStyleName(
-                    GetImport().GetStyleDisplayName( XML_STYLE_FAMILY_TEXT_LIST,
-                                                  sListStyleName ) );
+                    GetImport().GetStyleDisplayName(XML_STYLE_FAMILY_TEXT_LIST,
+                                                  m_sListStyleName));
                 // The families container must exist
                 const Reference < XNameContainer >& rNumStyles =
                     GetImport().GetTextImport()->GetNumberingStyles();
@@ -339,12 +341,12 @@ void XMLTextStyleContext::Finish( bool bOverwrite )
         }
     }
 
-    if( !sDropCapTextStyleName.isEmpty() )
+    if (!m_sDropCapTextStyleName.isEmpty())
     {
         // change list style name to display name
         OUString sDisplayDropCapTextStyleName(
             GetImport().GetStyleDisplayName( XML_STYLE_FAMILY_TEXT_TEXT,
-                                          sDropCapTextStyleName ) );
+                                          m_sDropCapTextStyleName));
         // The families container must exist
         const Reference < XNameContainer >& rTextStyles =
             GetImport().GetTextImport()->GetTextStyles();
@@ -356,11 +358,11 @@ void XMLTextStyleContext::Finish( bool bOverwrite )
         }
     }
 
-    if( bHasMasterPageName )
+    if (m_bHasMasterPageName)
     {
         OUString sDisplayName(
             GetImport().GetStyleDisplayName(
-                            XML_STYLE_FAMILY_MASTER_PAGE, sMasterPageName ) );
+                            XML_STYLE_FAMILY_MASTER_PAGE, m_sMasterPageName));
         // The families container must exist
         const Reference < XNameContainer >& rPageStyles =
             GetImport().GetTextImport()->GetPageStyles();
@@ -479,7 +481,7 @@ void XMLTextStyleContext::FillPropertySet(
         {
             Any& rAny = GetProperties()[nIndex].maValue;
             bool bVal = *o3tl::doAccess<bool>(rAny);
-            bHasCombinedCharactersLetter = bVal;
+            m_bHasCombinedCharactersLetter = bVal;
         }
 
         // keep-together: the application default is different from


More information about the Libreoffice-commits mailing list