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

Takeshi Abe tabe at fixedpoint.jp
Tue Sep 17 07:37:52 PDT 2013


 sw/source/filter/xml/xmlexp.cxx                |    2 -
 xmloff/source/chart/PropertyMaps.cxx           |   26 +++++++-------
 xmloff/source/chart/SchXMLChartContext.cxx     |    6 +--
 xmloff/source/chart/SchXMLChartContext.hxx     |    2 -
 xmloff/source/core/DocumentSettingsContext.cxx |   46 ++++++++++++-------------
 xmloff/source/core/RDFaImportHelper.cxx        |    4 +-
 xmloff/source/core/xmlexp.cxx                  |    4 +-
 xmloff/source/core/xmltkmap.cxx                |    4 +-
 xmloff/source/core/xmluconv.cxx                |   18 ++++-----
 9 files changed, 56 insertions(+), 56 deletions(-)

New commits:
commit 2ef38f3739aff407f6cdfe4ea9c46591c18dd2f8
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Tue Sep 17 23:22:55 2013 +0900

    sal_Bool to bool
    
    Change-Id: I81767fda35b52e73bc78c07b660244a6808a0409

diff --git a/sw/source/filter/xml/xmlexp.cxx b/sw/source/filter/xml/xmlexp.cxx
index 84ab097..d26eb60 100644
--- a/sw/source/filter/xml/xmlexp.cxx
+++ b/sw/source/filter/xml/xmlexp.cxx
@@ -444,7 +444,7 @@ void SwXMLExport::SetBodyAttributes()
     if( pDoc->GetCurrentViewShell() &&
         pDoc->GetCurrentViewShell()->GetPageCount() > 1 )
     {
-        sal_Bool bValue = sal_True;
+        bool bValue = true;
         OUStringBuffer sBuffer;
         ::sax::Converter::convertBool(sBuffer, bValue);
         AddAttribute(XML_NAMESPACE_TEXT, XML_USE_SOFT_PAGE_BREAKS,
diff --git a/xmloff/source/chart/PropertyMaps.cxx b/xmloff/source/chart/PropertyMaps.cxx
index 6970d59..f712aeb 100644
--- a/xmloff/source/chart/PropertyMaps.cxx
+++ b/xmloff/source/chart/PropertyMaps.cxx
@@ -195,7 +195,7 @@ void XMLChartExportPropertyMapper::ContextFilter(
     uno::Reference< beans::XPropertySet > rPropSet ) const
 {
     OUString aAutoPropName;
-    sal_Bool bCheckAuto = sal_False;
+    bool bCheckAuto = false;
 
     // filter properties
     for( std::vector< XMLPropertyState >::iterator property = rProperties.begin();
@@ -208,24 +208,24 @@ void XMLChartExportPropertyMapper::ContextFilter(
         {
             // if Auto... is set the corresponding properties mustn't be exported
             case XML_SCH_CONTEXT_MIN:
-                bCheckAuto = sal_True;
+                bCheckAuto = true;
                 aAutoPropName = "AutoMin";
                 break;
             case XML_SCH_CONTEXT_MAX:
-                bCheckAuto = sal_True;
+                bCheckAuto = true;
                 aAutoPropName = "AutoMax";
                 break;
             case XML_SCH_CONTEXT_STEP_MAIN:
-                bCheckAuto = sal_True;
+                bCheckAuto = true;
                 aAutoPropName = "AutoStepMain";
                 break;
             case XML_SCH_CONTEXT_STEP_HELP_COUNT:
-                bCheckAuto = sal_True;
+                bCheckAuto = true;
                 aAutoPropName = "AutoStepHelp";
                 break;
 
             case XML_SCH_CONTEXT_ORIGIN:
-                bCheckAuto = sal_True;
+                bCheckAuto = true;
                 aAutoPropName = "AutoOrigin";
                 break;
 
@@ -262,7 +262,7 @@ void XMLChartExportPropertyMapper::ContextFilter(
                 {
                 }
             }
-            bCheckAuto = sal_False;
+            bCheckAuto = false;
         }
     }
 
@@ -359,13 +359,13 @@ void XMLChartExportPropertyMapper::handleSpecialItem(
     const ::std::vector< XMLPropertyState > *pProperties,
     sal_uInt32 nIdx ) const
 {
-    sal_Bool bHandled = sal_False;
+    bool bHandled = false;
 
     sal_Int32 nContextId = getPropertySetMapper()->GetEntryContextId( rProperty.mnIndex );
 
     if( nContextId )
     {
-        bHandled = sal_True;
+        bHandled = true;
 
         OUString sAttrName = getPropertySetMapper()->GetEntryXMLName( rProperty.mnIndex );
         sal_uInt16 nNameSpace = getPropertySetMapper()->GetEntryNameSpace( rProperty.mnIndex );
@@ -373,7 +373,7 @@ void XMLChartExportPropertyMapper::handleSpecialItem(
         OUString sValue;
 
         sal_Int32 nValue = 0;
-        sal_Bool bValue = sal_False;
+        bool bValue = false;
 
         switch( nContextId )
         {
@@ -475,7 +475,7 @@ void XMLChartExportPropertyMapper::handleSpecialItem(
                 break;
 
             default:
-                bHandled = sal_False;
+                bHandled = false;
                 break;
         }
 
@@ -532,7 +532,7 @@ bool XMLChartImportPropertyMapper::handleSpecialItem(
     const SvXMLNamespaceMap& rNamespaceMap ) const
 {
     sal_Int32 nContextId = maPropMapper->GetEntryContextId( rProperty.mnIndex );
-    sal_Bool bRet = (nContextId != 0);
+    bool bRet = (nContextId != 0);
 
     if( nContextId )
     {
@@ -648,7 +648,7 @@ bool XMLChartImportPropertyMapper::handleSpecialItem(
             break;
 
             default:
-                bRet = sal_False;
+                bRet = false;
                 break;
         }
     }
diff --git a/xmloff/source/chart/SchXMLChartContext.cxx b/xmloff/source/chart/SchXMLChartContext.cxx
index 04291e1..02fea26 100644
--- a/xmloff/source/chart/SchXMLChartContext.cxx
+++ b/xmloff/source/chart/SchXMLChartContext.cxx
@@ -248,7 +248,7 @@ void SchXMLChartContext::StartElement( const uno::Reference< xml::sax::XAttribut
         maChartSize = xVisualObject->getVisualAreaSize( embed::Aspects::MSOLE_CONTENT ); //#i103460# take the size given from the parent frame as default
 
     // this flag is necessarry for pie charts in the core
-    sal_Bool bSetSwitchData = sal_False;
+    bool bSetSwitchData = false;
 
     OUString sAutoStyleName;
     OUString aOldChartTypeName;
@@ -283,7 +283,7 @@ void SchXMLChartContext::StartElement( const uno::Reference< xml::sax::XAttribut
                             switch( eChartTypeEnum )
                             {
                             case XML_CHART_CLASS_CIRCLE:
-                                bSetSwitchData = sal_True;
+                                bSetSwitchData = true;
                                 break;
                             case XML_CHART_CLASS_STOCK:
                                 mbIsStockChart = true;
@@ -1107,7 +1107,7 @@ SvXMLImportContext* SchXMLChartContext::CreateChildContext(
 */
 void SchXMLChartContext::InitChart(
     const OUString & rChartTypeServiceName, // currently the old service name
-    sal_Bool /* bSetSwitchData */ )
+    bool /* bSetSwitchData */ )
 {
     uno::Reference< chart::XChartDocument > xDoc = mrImportHelper.GetChartDocument();
     SAL_WARN_IF( !xDoc.is(), "xmloff.chart", "No valid document!" );
diff --git a/xmloff/source/chart/SchXMLChartContext.hxx b/xmloff/source/chart/SchXMLChartContext.hxx
index 124ddc8..d16f42a 100644
--- a/xmloff/source/chart/SchXMLChartContext.hxx
+++ b/xmloff/source/chart/SchXMLChartContext.hxx
@@ -126,7 +126,7 @@ private:
             rows or from columns.
     */
     void    InitChart   (const OUString & rChartTypeServiceName,
-                        sal_Bool bSetSwitchData);
+                        bool bSetSwitchData);
 
     void MergeSeriesForStockChart();
 };
diff --git a/xmloff/source/core/DocumentSettingsContext.cxx b/xmloff/source/core/DocumentSettingsContext.cxx
index 72b7bef..c676bc9 100644
--- a/xmloff/source/core/DocumentSettingsContext.cxx
+++ b/xmloff/source/core/DocumentSettingsContext.cxx
@@ -378,12 +378,12 @@ void XMLDocumentSettingsContext::EndElement()
     {
         GetImport().SetViewSettings(aSeqViewProps);
         sal_Int32 i(aSeqViewProps.getLength() - 1);
-        sal_Bool bFound(sal_False);
+        bool bFound(false);
         while((i >= 0) && !bFound)
         {
             if (aSeqViewProps[i].Name.compareToAscii("Views") == 0)
             {
-                bFound = sal_True;
+                bFound = true;
                 uno::Reference<container::XIndexAccess> xIndexAccess;
                 if (aSeqViewProps[i].Value >>= xIndexAccess)
                 {
@@ -772,35 +772,35 @@ void XMLConfigItemMapIndexedContext::EndElement()
                         const OUString sVariant   ( "Variant" );
                         const OUString sBeginLine ( "BeginLine" );
                         const OUString sEndLine   ( "EndLine" );
-                        sal_Bool bHaveLanguage = sal_False, bHaveCountry = sal_False, bHaveVariant = sal_False,
-                                 bHaveBegin = sal_False, bHaveEnd = sal_False;
+                        bool bHaveLanguage = false, bHaveCountry = false, bHaveVariant = false,
+                             bHaveBegin = false, bHaveEnd = false;
 
                         for ( sal_Int32 j = 0 ; j < XML_FORBIDDEN_CHARACTER_MAX ; j++ )
                         {
                             if (pForChar->Name.equals (sLanguage ) )
                             {
                                 pForChar->Value >>= aLocale.Language;
-                                bHaveLanguage = sal_True;
+                                bHaveLanguage = true;
                             }
                             else if (pForChar->Name.equals (sCountry ) )
                             {
                                 pForChar->Value >>= aLocale.Country;
-                                bHaveCountry = sal_True;
+                                bHaveCountry = true;
                             }
                             else if (pForChar->Name.equals (sVariant ) )
                             {
                                 pForChar->Value >>= aLocale.Variant;
-                                bHaveVariant = sal_True;
+                                bHaveVariant = true;
                             }
                             else if (pForChar->Name.equals (sBeginLine ) )
                             {
                                 pForChar->Value >>= aForbid.beginLine;
-                                bHaveBegin = sal_True;
+                                bHaveBegin = true;
                             }
                             else if (pForChar->Name.equals (sEndLine ) )
                             {
                                 pForChar->Value >>= aForbid.endLine;
-                                bHaveEnd = sal_True;
+                                bHaveEnd = true;
                             }
                             pForChar++;
                         }
@@ -851,10 +851,10 @@ void XMLConfigItemMapIndexedContext::EndElement()
             {
                 if ((xIndex->getByIndex( i ) >>= aProps) && (aProps.getLength() == XML_SYMBOL_DESCRIPTOR_MAX ) )
                 {
-                    sal_Bool bHaveName = sal_False, bHaveExportName = sal_False, bHaveCharSet = sal_False,
-                              bHaveFontName = sal_False, bHaveFamily = sal_False, bHavePitch = sal_False,
-                              bHaveWeight = sal_False, bHaveItalic = sal_False, bHaveSymbolSet = sal_False,
-                             bHaveCharacter = sal_False;
+                    bool bHaveName = false, bHaveExportName = false, bHaveCharSet = false,
+                         bHaveFontName = false, bHaveFamily = false, bHavePitch = false,
+                         bHaveWeight = false, bHaveItalic = false, bHaveSymbolSet = false,
+                         bHaveCharacter = false;
                     beans::PropertyValue *pSymbol = aProps.getArray();
 
                     for ( sal_Int32 j = 0 ; j < XML_SYMBOL_DESCRIPTOR_MAX ; j++ )
@@ -862,52 +862,52 @@ void XMLConfigItemMapIndexedContext::EndElement()
                         if (pSymbol->Name.equals ( sName ) )
                         {
                             pSymbol->Value >>= pDescriptor[nNumFullEntries].sName;
-                            bHaveName = sal_True;
+                            bHaveName = true;
                         }
                         else if (pSymbol->Name.equals (sExportName ) )
                         {
                             pSymbol->Value >>= pDescriptor[nNumFullEntries].sExportName;
-                            bHaveExportName = sal_True;
+                            bHaveExportName = true;
                         }
                         else if (pSymbol->Name.equals (sFontName ) )
                         {
                             pSymbol->Value >>= pDescriptor[nNumFullEntries].sFontName;
-                            bHaveFontName = sal_True;
+                            bHaveFontName = true;
                         }
                         else if (pSymbol->Name.equals (sCharSet ) )
                         {
                             pSymbol->Value >>= pDescriptor[nNumFullEntries].nCharSet;
-                            bHaveCharSet = sal_True;
+                            bHaveCharSet = true;
                         }
                         else if (pSymbol->Name.equals (sFamily ) )
                         {
                             pSymbol->Value >>= pDescriptor[nNumFullEntries].nFamily;
-                            bHaveFamily = sal_True;
+                            bHaveFamily = true;
                         }
                         else if (pSymbol->Name.equals (sPitch ) )
                         {
                             pSymbol->Value >>= pDescriptor[nNumFullEntries].nPitch;
-                            bHavePitch = sal_True;
+                            bHavePitch = true;
                         }
                         else if (pSymbol->Name.equals (sWeight ) )
                         {
                             pSymbol->Value >>= pDescriptor[nNumFullEntries].nWeight;
-                            bHaveWeight = sal_True;
+                            bHaveWeight = true;
                         }
                         else if (pSymbol->Name.equals (sItalic ) )
                         {
                             pSymbol->Value >>= pDescriptor[nNumFullEntries].nItalic;
-                            bHaveItalic = sal_True;
+                            bHaveItalic = true;
                         }
                         else if (pSymbol->Name.equals (sSymbolSet ) )
                         {
                             pSymbol->Value >>= pDescriptor[nNumFullEntries].sSymbolSet;
-                            bHaveSymbolSet = sal_True;
+                            bHaveSymbolSet = true;
                         }
                         else if (pSymbol->Name.equals (sCharacter ) )
                         {
                             pSymbol->Value >>= pDescriptor[nNumFullEntries].nCharacter;
-                            bHaveCharacter = sal_True;
+                            bHaveCharacter = true;
                         }
                         pSymbol++;
                     }
diff --git a/xmloff/source/core/RDFaImportHelper.cxx b/xmloff/source/core/RDFaImportHelper.cxx
index 1e8aea4..55372d4 100644
--- a/xmloff/source/core/RDFaImportHelper.cxx
+++ b/xmloff/source/core/RDFaImportHelper.cxx
@@ -315,10 +315,10 @@ RDFaInserter::MakeResource( OUString const & i_rResource)
 /** i wrote this because c++ implementations cannot agree on which variant
     of boost::bind and std::mem_fun_ref applied to Reference::is compiles */
 class ref_is_null :
-    public ::std::unary_function<sal_Bool, const uno::Reference<rdf::XURI> & >
+    public ::std::unary_function<bool, const uno::Reference<rdf::XURI> & >
 {
 public:
-    sal_Bool operator() (const uno::Reference<rdf::XURI> & i_rRef)
+    bool operator() (const uno::Reference<rdf::XURI> & i_rRef)
     {
         return !i_rRef.is();
     }
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx
index efa6ff4..e07f440 100644
--- a/xmloff/source/core/xmlexp.cxx
+++ b/xmloff/source/core/xmlexp.cxx
@@ -1844,7 +1844,7 @@ void SvXMLExport::GetViewSettingsAndViews(uno::Sequence<beans::PropertyValue>& r
         uno::Reference<container::XIndexAccess> xIndexAccess;
         xViewDataSupplier->setViewData( xIndexAccess ); // make sure we get a newly created sequence
         xIndexAccess = xViewDataSupplier->getViewData();
-        sal_Bool bAdd = sal_False;
+        bool bAdd = false;
         uno::Any aAny;
         if(xIndexAccess.is() && xIndexAccess->hasElements() )
         {
@@ -1857,7 +1857,7 @@ void SvXMLExport::GetViewSettingsAndViews(uno::Sequence<beans::PropertyValue>& r
                 {
                     if( aProps.getLength() > 0 )
                     {
-                        bAdd = sal_True;
+                        bAdd = true;
                         break;
                     }
                 }
diff --git a/xmloff/source/core/xmltkmap.cxx b/xmloff/source/core/xmltkmap.cxx
index dd6ce09..73055a8 100644
--- a/xmloff/source/core/xmltkmap.cxx
+++ b/xmloff/source/core/xmltkmap.cxx
@@ -47,13 +47,13 @@ public:
         nToken( rEntry.nToken )
     {}
 
-    sal_Bool operator==( const SvXMLTokenMapEntry_Impl& r ) const
+    bool operator==( const SvXMLTokenMapEntry_Impl& r ) const
     {
         return nPrefixKey == r.nPrefixKey &&
                sLocalName == r.sLocalName;
     }
 
-    sal_Bool operator<( const SvXMLTokenMapEntry_Impl& r ) const
+    bool operator<( const SvXMLTokenMapEntry_Impl& r ) const
     {
         return nPrefixKey < r.nPrefixKey ||
                ( nPrefixKey == r.nPrefixKey &&
diff --git a/xmloff/source/core/xmluconv.cxx b/xmloff/source/core/xmluconv.cxx
index 57e4265..1546a41 100644
--- a/xmloff/source/core/xmluconv.cxx
+++ b/xmloff/source/core/xmluconv.cxx
@@ -333,14 +333,14 @@ void SvXMLUnitConverter::convertDateTime( OUStringBuffer& rBuffer,
     else
         fCount = 0.0;
     sal_Int16 nCount = sal_Int16(fCount);
-    sal_Bool bHasTime(sal_False);
+    bool bHasTime(false);
     double fHoursValue = 0;
     double fMinsValue = 0;
     double fSecsValue = 0;
     double f100SecsValue = 0;
     if (fValue > 0.0)
     {
-        bHasTime = sal_True;
+        bHasTime = true;
         fValue *= 24;
         fHoursValue = ::rtl::math::approxFloor (fValue);
         fValue -= fHoursValue;
@@ -586,7 +586,7 @@ sal_Bool SvXMLUnitConverter::convertNumFormat(
         sal_Bool bNumberNone ) const
 {
     sal_Bool bRet = sal_True;
-    sal_Bool bExt = sal_False;
+    bool bExt = false;
 
     sal_Int32 nLen = rNumFmt.getLength();
     if( 0 == nLen )
@@ -605,7 +605,7 @@ sal_Bool SvXMLUnitConverter::convertNumFormat(
         case sal_Unicode('A'):  rType = NumberingType::CHARS_UPPER_LETTER;  break;
         case sal_Unicode('i'):  rType = NumberingType::ROMAN_LOWER; break;
         case sal_Unicode('I'):  rType = NumberingType::ROMAN_UPPER; break;
-        default:                bExt = sal_True; break;
+        default:                bExt = true; break;
         }
         if( !bExt && IsXMLToken( rNumLetterSync, XML_TRUE ) )
         {
@@ -622,7 +622,7 @@ sal_Bool SvXMLUnitConverter::convertNumFormat(
     }
     else
     {
-        bExt = sal_True;
+        bExt = true;
     }
     if( bExt )
     {
@@ -758,7 +758,7 @@ OUString SvXMLUnitConverter::encodeStyleName(
     for( sal_Int32 i = 0; i < nLen; i++ )
     {
         sal_Unicode c = rName[i];
-        sal_Bool bValidChar = sal_False;
+        bool bValidChar = false;
         if( c < 0x00ffU )
         {
             bValidChar =
@@ -775,12 +775,12 @@ OUString SvXMLUnitConverter::encodeStyleName(
             if( (c >= 0xf900U && c <= 0xfffeU) ||
                  (c >= 0x20ddU && c <= 0x20e0U))
             {
-                bValidChar = sal_False;
+                bValidChar = false;
             }
             else if( (c >= 0x02bbU && c <= 0x02c1U) || c == 0x0559 ||
                      c == 0x06e5 || c == 0x06e6 )
             {
-                bValidChar = sal_True;
+                bValidChar = true;
             }
             else if( c == 0x0387 )
             {
@@ -801,7 +801,7 @@ OUString SvXMLUnitConverter::encodeStyleName(
                 case UnicodeType::TITLECASE_LETTER:     // Lt
                 case UnicodeType::OTHER_LETTER:         // Lo
                 case UnicodeType::LETTER_NUMBER:        // Nl
-                    bValidChar = sal_True;
+                    bValidChar = true;
                     break;
                 case UnicodeType::NON_SPACING_MARK:     // Ms
                 case UnicodeType::ENCLOSING_MARK:       // Me


More information about the Libreoffice-commits mailing list