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

Takeshi Abe tabe at fixedpoint.jp
Thu Sep 12 02:02:10 PDT 2013


 xmloff/source/transform/OOo2Oasis.cxx             |   20 +++++++-------
 xmloff/source/transform/StyleOASISTContext.cxx    |   30 +++++++++++-----------
 xmloff/source/transform/StyleOASISTContext.hxx    |    2 -
 xmloff/source/transform/StyleOOoTContext.cxx      |   12 ++++----
 xmloff/source/xforms/SchemaContext.cxx            |    4 +-
 xmloff/source/xforms/SchemaRestrictionContext.cxx |    4 +-
 xmloff/source/xforms/SchemaSimpleTypeContext.cxx  |    4 +-
 xmloff/source/xforms/XFormsBindContext.cxx        |    2 -
 xmloff/source/xforms/XFormsInstanceContext.cxx    |    2 -
 xmloff/source/xforms/XFormsModelContext.cxx       |    4 +-
 xmloff/source/xforms/XFormsSubmissionContext.cxx  |    2 -
 xmloff/source/xforms/xformsapi.cxx                |    2 -
 12 files changed, 44 insertions(+), 44 deletions(-)

New commits:
commit 3bba060388fde3272c93f96050a56f62d364256c
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Thu Sep 12 17:57:44 2013 +0900

    sal_Bool to bool
    
    Change-Id: I826911bdf06b8047ca8e3bd256687e10fb51962d

diff --git a/xmloff/source/transform/OOo2Oasis.cxx b/xmloff/source/transform/OOo2Oasis.cxx
index 45f9323..20dcd99 100644
--- a/xmloff/source/transform/OOo2Oasis.cxx
+++ b/xmloff/source/transform/OOo2Oasis.cxx
@@ -1134,8 +1134,8 @@ void XMLDocumentTransformerContext_Impl::StartElement(
     m_aOldClass = GetTransformer().GetClass();
 
     XMLMutableAttributeList *pMutableAttrList = 0;
-    sal_Bool bOOo = sal_False, bOOoW = sal_False, bOOoC = sal_False,
-             bDOM=sal_False, bDC = sal_False, bSVG = sal_False;
+    bool bOOo = false, bOOoW = false, bOOoC = false,
+        bDOM=false, bDC = false, bSVG = false;
     sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
     for( sal_Int16 i=0; i < nAttrCount; i++ )
     {
@@ -1163,17 +1163,17 @@ void XMLDocumentTransformerContext_Impl::StartElement(
         {
             const OUString& rAttrValue = xAttrList->getValueByIndex( i );
             if( IsXMLToken( rAttrValue, XML_N_OOO ) )
-                bOOo = sal_True;
+                bOOo = true;
             else if( IsXMLToken( rAttrValue, XML_N_OOOW ) )
-                bOOoW = sal_True;
+                bOOoW = true;
             else if( IsXMLToken( rAttrValue, XML_N_OOOC ) )
-                bOOoC = sal_True;
+                bOOoC = true;
             else if( IsXMLToken( rAttrValue, XML_N_DOM ) )
-                bDOM = sal_True;
+                bDOM = true;
             else if( IsXMLToken( rAttrValue, XML_N_DC ) )
-                bDC = sal_True;
+                bDC = true;
             else if( IsXMLToken( rAttrValue, XML_N_SVG ) )
-                bSVG = sal_True;
+                bSVG = true;
         }
     }
     if( !(bOOo && bOOoW && bOOoC && bDOM && bDC && bSVG) )
@@ -1509,7 +1509,7 @@ void XMLTableOOoTransformerContext_Impl::StartElement(
         GetTransformer().ProcessAttrList( xAttrList, OOO_STYLE_REF_ACTIONS, sal_False );
     if( rAttrList->getLength() && IsXMLToken( GetTransformer().GetClass(), XML_SPREADSHEET  ) )
     {
-        sal_Bool bPrintRanges(sal_False);
+        bool bPrintRanges(false);
 
         sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
         for( sal_Int16 i=0; i < nAttrCount; i++ )
@@ -1522,7 +1522,7 @@ void XMLTableOOoTransformerContext_Impl::StartElement(
             if( XML_NAMESPACE_TABLE == nPrefix &&
                 IsXMLToken( aLocalName, XML_PRINT_RANGES ) )
             {
-                bPrintRanges = sal_True;
+                bPrintRanges = true;
             }
         }
         if (!bPrintRanges && pMutableAttrList)
diff --git a/xmloff/source/transform/StyleOASISTContext.cxx b/xmloff/source/transform/StyleOASISTContext.cxx
index 9099d0b..f5ef3fe 100644
--- a/xmloff/source/transform/StyleOASISTContext.cxx
+++ b/xmloff/source/transform/StyleOASISTContext.cxx
@@ -65,7 +65,7 @@ class XMLPropertiesTContext_Impl : public XMLPersElemContentTContext
         ::com::sun::star::xml::sax::XAttributeList > m_xAttrList;
 
     XMLPropType m_ePropType;
-    sal_Bool    m_bControlStyle;
+    bool        m_bControlStyle;
     OUString m_aStyleFamily;
 
 public:
@@ -83,7 +83,7 @@ public:
                            const OUString& rQName,
                            XMLPropType eP,
                            const OUString& rStyleFamily,
-                           sal_Bool _bControlStyle = sal_False );
+                           bool _bControlStyle = false );
 
     virtual ~XMLPropertiesTContext_Impl();
 
@@ -94,9 +94,9 @@ public:
     static XMLPropType GetPropType( const OUString& rLocalName );
 
     static OUString MergeUnderline( XMLTokenEnum eUnderline,
-                                           sal_Bool bBold, sal_Bool bDouble );
+                                           bool bBold, bool bDouble );
     static OUString MergeLineThrough( XMLTokenEnum eLineThrough,
-                                        sal_Bool bBold, sal_Bool bDouble,
+                                        bool bBold, bool bDouble,
                                            sal_Unicode c );
 };
 
@@ -104,7 +104,7 @@ TYPEINIT1( XMLPropertiesTContext_Impl, XMLPersElemContentTContext );
 
 XMLPropertiesTContext_Impl::XMLPropertiesTContext_Impl(
     XMLTransformerBase& rImp, const OUString& rQName, XMLPropType eP,
-        const OUString& rStyleFamily, sal_Bool _bControlStyle ) :
+        const OUString& rStyleFamily, bool _bControlStyle ) :
     XMLPersElemContentTContext( rImp, rQName, XML_NAMESPACE_STYLE,
                                 XML_PROPERTIES),
     m_ePropType( eP ),
@@ -143,9 +143,9 @@ void XMLPropertiesTContext_Impl::StartElement(
         }
 
         XMLTokenEnum eUnderline = XML_TOKEN_END;
-        sal_Bool bBoldUnderline = sal_False, bDoubleUnderline = sal_False;
+        bool bBoldUnderline = false, bDoubleUnderline = false;
         XMLTokenEnum eLineThrough = XML_TOKEN_END;
-        sal_Bool bBoldLineThrough = sal_False, bDoubleLineThrough = sal_False;
+        bool bBoldLineThrough = false, bDoubleLineThrough = false;
         sal_Unicode cLineThroughChar = 0;
 
         bool bIntervalMinorFound = false;
@@ -285,22 +285,22 @@ void XMLPropertiesTContext_Impl::StartElement(
                     break;
                 case XML_OPTACTION_UNDERLINE_WIDTH:
                     if( IsXMLToken( rAttrValue, XML_BOLD ) )
-                        bBoldUnderline = sal_True;
+                        bBoldUnderline = true;
                     break;
                 case XML_OPTACTION_UNDERLINE_TYPE:
                     if( IsXMLToken( rAttrValue, XML_DOUBLE ) )
-                        bDoubleUnderline = sal_True;
+                        bDoubleUnderline = true;
                     break;
                 case XML_OPTACTION_UNDERLINE_STYLE:
                     eUnderline = GetTransformer().GetToken( rAttrValue );
                     break;
                 case XML_OPTACTION_LINETHROUGH_WIDTH:
                     if( IsXMLToken( rAttrValue, XML_BOLD ) )
-                        bBoldLineThrough = sal_True;
+                        bBoldLineThrough = true;
                     break;
                 case XML_OPTACTION_LINETHROUGH_TYPE:
                     if( IsXMLToken( rAttrValue, XML_DOUBLE ) )
-                        bDoubleLineThrough = sal_True;
+                        bDoubleLineThrough = true;
                     break;
                 case XML_OPTACTION_LINETHROUGH_STYLE:
                     eLineThrough = GetTransformer().GetToken( rAttrValue );
@@ -661,7 +661,7 @@ XMLPropType XMLPropertiesTContext_Impl::GetPropType( const OUString& rLocalName
 }
 
 OUString XMLPropertiesTContext_Impl::MergeUnderline(
-            XMLTokenEnum eUnderline, sal_Bool bBold, sal_Bool bDouble )
+            XMLTokenEnum eUnderline, bool bBold, bool bDouble )
 {
     if( bDouble )
     {
@@ -726,7 +726,7 @@ OUString XMLPropertiesTContext_Impl::MergeUnderline(
 }
 
 OUString XMLPropertiesTContext_Impl::MergeLineThrough(
-            XMLTokenEnum eLineThrough, sal_Bool bBold, sal_Bool bDouble,
+            XMLTokenEnum eLineThrough, bool bBold, bool bDouble,
                sal_Unicode c )
 {
     if( c )
@@ -820,7 +820,7 @@ void XMLStyleOASISTContext::StartElement(
     XMLMutableAttributeList *pMutableAttrList = 0;
     sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
     sal_Int16 nFamilyAttr = -1;
-    m_bControlStyle = sal_False;
+    m_bControlStyle = false;
 
     for( sal_Int16 i=0; i < nAttrCount; i++ )
     {
diff --git a/xmloff/source/transform/StyleOASISTContext.hxx b/xmloff/source/transform/StyleOASISTContext.hxx
index a037c58..fd5464f 100644
--- a/xmloff/source/transform/StyleOASISTContext.hxx
+++ b/xmloff/source/transform/StyleOASISTContext.hxx
@@ -31,7 +31,7 @@ class XMLStyleOASISTContext : public XMLPersElemContentTContext
     ::rtl::Reference< XMLPropertiesTContext_Impl > m_xPropContext;
 
     sal_Bool m_bPersistent;
-    sal_Bool m_bControlStyle;
+    bool m_bControlStyle;
 
     OUString m_aStyleFamily;
 public:
commit 9ab5bb0cc20cbc56657b77419fb47fdfb8752e7b
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Thu Sep 12 17:57:16 2013 +0900

    Mark as const
    
    Change-Id: I1d62c66bd89ec5a813eb7b211042e392903c8baf

diff --git a/xmloff/source/transform/StyleOASISTContext.cxx b/xmloff/source/transform/StyleOASISTContext.cxx
index a8d817f..9099d0b 100644
--- a/xmloff/source/transform/StyleOASISTContext.cxx
+++ b/xmloff/source/transform/StyleOASISTContext.cxx
@@ -41,7 +41,7 @@ using namespace ::xmloff::token;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::xml::sax;
 
-static sal_uInt16 aAttrActionMaps[XML_PROP_TYPE_END] =
+static const sal_uInt16 aAttrActionMaps[XML_PROP_TYPE_END] =
 {
     PROP_OASIS_GRAPHIC_ATTR_ACTIONS,
     PROP_OASIS_DRAWING_PAGE_ATTR_ACTIONS,               // DRAWING_PAGE
diff --git a/xmloff/source/transform/StyleOOoTContext.cxx b/xmloff/source/transform/StyleOOoTContext.cxx
index 4f39cc3..7543c10 100644
--- a/xmloff/source/transform/StyleOOoTContext.cxx
+++ b/xmloff/source/transform/StyleOOoTContext.cxx
@@ -60,7 +60,7 @@ const sal_uInt16 MAX_PROP_TYPES = 4;
     { XML_PROP_TYPE_##a, XML_PROP_TYPE_##END, \
         XML_PROP_TYPE_END, XML_PROP_TYPE_END }
 
-static XMLPropType aPropTypes[XML_FAMILY_TYPE_END][MAX_PROP_TYPES] =
+static const XMLPropType aPropTypes[XML_FAMILY_TYPE_END][MAX_PROP_TYPES] =
 {
     ENTRY3( GRAPHIC, PARAGRAPH, TEXT ),         // XML_FAMILY_TYPE_GRAPHIC,
     ENTRY3( GRAPHIC, PARAGRAPH, TEXT ),         // XML_FAMILY_TYPE_PRESENTATION,
@@ -87,7 +87,7 @@ static XMLPropType aPropTypes[XML_FAMILY_TYPE_END][MAX_PROP_TYPES] =
     ENTRY1( END )                               // XML_FAMILY_TYPE_PRESENTATION_PAGE_LAYOUT,
 };
 
-static XMLTokenEnum aPropTokens[XML_PROP_TYPE_END] =
+static const XMLTokenEnum aPropTokens[XML_PROP_TYPE_END] =
 {
     XML_GRAPHIC_PROPERTIES,
     XML_DRAWING_PAGE_PROPERTIES,
@@ -105,7 +105,7 @@ static XMLTokenEnum aPropTokens[XML_PROP_TYPE_END] =
     XML_CHART_PROPERTIES
 };
 
-static sal_uInt16 aAttrActionMaps[XML_PROP_TYPE_END] =
+static const sal_uInt16 aAttrActionMaps[XML_PROP_TYPE_END] =
 {
     PROP_OOO_GRAPHIC_ATTR_ACTIONS,
     PROP_OOO_DRAWING_PAGE_ATTR_ACTIONS,     // DRAWING_PAGE
@@ -123,7 +123,7 @@ static sal_uInt16 aAttrActionMaps[XML_PROP_TYPE_END] =
     PROP_OOO_CHART_ATTR_ACTIONS
 };
 
-static sal_uInt16 aElemActionMaps[XML_PROP_TYPE_END] =
+static const sal_uInt16 aElemActionMaps[XML_PROP_TYPE_END] =
 {
     PROP_OOO_GRAPHIC_ELEM_ACTIONS,
     MAX_OOO_PROP_ACTIONS,
@@ -240,7 +240,7 @@ public:
 
     XMLPropertiesOOoTContext_Impl( XMLTransformerBase& rTransformer,
                            const OUString& rQName,
-                               XMLPropTypes& rTypes,
+                               const XMLPropTypes& rTypes,
                                sal_Bool bPersistent );
 
     virtual ~XMLPropertiesOOoTContext_Impl();
@@ -372,7 +372,7 @@ XMLTypedPropertiesOOoTContext_Impl
 XMLPropertiesOOoTContext_Impl::XMLPropertiesOOoTContext_Impl(
     XMLTransformerBase& rImp,
     const OUString& rQName,
-    XMLPropTypes& rTypes,
+    const XMLPropTypes& rTypes,
     sal_Bool bPersistent    ) :
     XMLTransformerContext( rImp, rQName ),
     m_bPersistent( bPersistent )
diff --git a/xmloff/source/xforms/SchemaContext.cxx b/xmloff/source/xforms/SchemaContext.cxx
index 393b3e6..0d827e5 100644
--- a/xmloff/source/xforms/SchemaContext.cxx
+++ b/xmloff/source/xforms/SchemaContext.cxx
@@ -41,12 +41,12 @@ using namespace xmloff::token;
 
 
 
-static SvXMLTokenMapEntry aAttributes[] =
+static const SvXMLTokenMapEntry aAttributes[] =
 {
     XML_TOKEN_MAP_END
 };
 
-static SvXMLTokenMapEntry aChildren[] =
+static const SvXMLTokenMapEntry aChildren[] =
 {
     TOKEN_MAP_ENTRY( XSD, SIMPLETYPE ),
     XML_TOKEN_MAP_END
diff --git a/xmloff/source/xforms/SchemaRestrictionContext.cxx b/xmloff/source/xforms/SchemaRestrictionContext.cxx
index ad3b9a4..c7c200b 100644
--- a/xmloff/source/xforms/SchemaRestrictionContext.cxx
+++ b/xmloff/source/xforms/SchemaRestrictionContext.cxx
@@ -58,13 +58,13 @@ using namespace xmloff::token;
 
 
 
-static SvXMLTokenMapEntry aAttributes[] =
+static const SvXMLTokenMapEntry aAttributes[] =
 {
     TOKEN_MAP_ENTRY( NONE, BASE ),
     XML_TOKEN_MAP_END
 };
 
-static SvXMLTokenMapEntry aChildren[] =
+static const SvXMLTokenMapEntry aChildren[] =
 {
     TOKEN_MAP_ENTRY( XSD, LENGTH         ),
     TOKEN_MAP_ENTRY( XSD, MINLENGTH      ),
diff --git a/xmloff/source/xforms/SchemaSimpleTypeContext.cxx b/xmloff/source/xforms/SchemaSimpleTypeContext.cxx
index 747dd22..3e0a93d 100644
--- a/xmloff/source/xforms/SchemaSimpleTypeContext.cxx
+++ b/xmloff/source/xforms/SchemaSimpleTypeContext.cxx
@@ -40,13 +40,13 @@ using namespace xmloff::token;
 
 
 
-static SvXMLTokenMapEntry aAttributes[] =
+static const SvXMLTokenMapEntry aAttributes[] =
 {
     TOKEN_MAP_ENTRY( NONE, NAME ),
     XML_TOKEN_MAP_END
 };
 
-static SvXMLTokenMapEntry aChildren[] =
+static const SvXMLTokenMapEntry aChildren[] =
 {
     TOKEN_MAP_ENTRY( XSD, RESTRICTION ),
     XML_TOKEN_MAP_END
diff --git a/xmloff/source/xforms/XFormsBindContext.cxx b/xmloff/source/xforms/XFormsBindContext.cxx
index 4358dd7..1236cad 100644
--- a/xmloff/source/xforms/XFormsBindContext.cxx
+++ b/xmloff/source/xforms/XFormsBindContext.cxx
@@ -47,7 +47,7 @@ using namespace xmloff::token;
 
 
 
-static struct SvXMLTokenMapEntry aAttributeMap[] =
+static const struct SvXMLTokenMapEntry aAttributeMap[] =
 {
     TOKEN_MAP_ENTRY( NONE, NODESET ),
     TOKEN_MAP_ENTRY( NONE, ID ),
diff --git a/xmloff/source/xforms/XFormsInstanceContext.cxx b/xmloff/source/xforms/XFormsInstanceContext.cxx
index fbc2185..93107f2 100644
--- a/xmloff/source/xforms/XFormsInstanceContext.cxx
+++ b/xmloff/source/xforms/XFormsInstanceContext.cxx
@@ -52,7 +52,7 @@ using xmloff::token::XML_INSTANCE;
 using xmloff::token::XML_SRC;
 using xmloff::token::XML_ID;
 
-static SvXMLTokenMapEntry aAttributes[] =
+static const SvXMLTokenMapEntry aAttributes[] =
 {
     TOKEN_MAP_ENTRY( NONE, SRC ),
     TOKEN_MAP_ENTRY( NONE, ID ),
diff --git a/xmloff/source/xforms/XFormsModelContext.cxx b/xmloff/source/xforms/XFormsModelContext.cxx
index 947981d..6aef658 100644
--- a/xmloff/source/xforms/XFormsModelContext.cxx
+++ b/xmloff/source/xforms/XFormsModelContext.cxx
@@ -47,14 +47,14 @@ using namespace xmloff::token;
 
 
 
-static SvXMLTokenMapEntry aAttributes[] =
+static const SvXMLTokenMapEntry aAttributes[] =
 {
     TOKEN_MAP_ENTRY( NONE, ID ),
     TOKEN_MAP_ENTRY( NONE, SCHEMA ),
     XML_TOKEN_MAP_END
 };
 
-static SvXMLTokenMapEntry aChildren[] =
+static const SvXMLTokenMapEntry aChildren[] =
 {
     TOKEN_MAP_ENTRY( XFORMS, INSTANCE ),
     TOKEN_MAP_ENTRY( XFORMS, BIND ),
diff --git a/xmloff/source/xforms/XFormsSubmissionContext.cxx b/xmloff/source/xforms/XFormsSubmissionContext.cxx
index fb0bdbb..18a36bc 100644
--- a/xmloff/source/xforms/XFormsSubmissionContext.cxx
+++ b/xmloff/source/xforms/XFormsSubmissionContext.cxx
@@ -47,7 +47,7 @@ using namespace xmloff::token;
 
 
 
-static struct SvXMLTokenMapEntry aAttributeMap[] =
+static const struct SvXMLTokenMapEntry aAttributeMap[] =
 {
     TOKEN_MAP_ENTRY( NONE, ID ),
     TOKEN_MAP_ENTRY( NONE, BIND ),
diff --git a/xmloff/source/xforms/xformsapi.cxx b/xmloff/source/xforms/xformsapi.cxx
index 9f1b32c..b2150eb 100644
--- a/xmloff/source/xforms/xformsapi.cxx
+++ b/xmloff/source/xforms/xformsapi.cxx
@@ -172,7 +172,7 @@ void xforms_setValue( Reference<XPropertySet>& xPropertySet,
 }
 
 #define TOKEN_MAP_ENTRY(NAMESPACE,TOKEN) { XML_NAMESPACE_##NAMESPACE, xmloff::token::XML_##TOKEN, xmloff::token::XML_##TOKEN }
-static SvXMLTokenMapEntry aTypes[] =
+static const SvXMLTokenMapEntry aTypes[] =
 {
     TOKEN_MAP_ENTRY( XSD, STRING  ),
     TOKEN_MAP_ENTRY( XSD, DECIMAL ),


More information about the Libreoffice-commits mailing list