[Libreoffice-commits] .: 2 commits - sw/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Dec 26 17:05:30 PST 2012


 sw/source/filter/xml/XMLRedlineImportHelper.cxx |   30 ++++++++++++------------
 sw/source/filter/xml/XMLRedlineImportHelper.hxx |    6 ++--
 sw/source/filter/xml/swxml.cxx                  |   20 ++++++++--------
 sw/source/filter/xml/wrtxml.cxx                 |   26 ++++++++++----------
 sw/source/filter/xml/wrtxml.hxx                 |    4 +--
 sw/source/filter/xml/xmlexp.hxx                 |    2 -
 6 files changed, 43 insertions(+), 45 deletions(-)

New commits:
commit 699132c269a6c6d9e815fc582e2e6a106e469233
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Wed Dec 26 20:50:41 2012 +0900

    Remove deserted variables
    
    Change-Id: Ied7eef51ad46e79f8e3d55f8bdcf38d15fa68c09

diff --git a/sw/source/filter/xml/xmlexp.hxx b/sw/source/filter/xml/xmlexp.hxx
index 5c05b42..d5c9ea2 100644
--- a/sw/source/filter/xml/xmlexp.hxx
+++ b/sw/source/filter/xml/xmlexp.hxx
@@ -56,9 +56,7 @@ class SwXMLExport : public SvXMLExport
     SvXMLItemMapEntriesRef      xTableCellItemMap;
     UniReference < XMLPropertySetMapper > xParaPropMapper;
 
-    sal_Bool                    bExportWholeDoc : 1;// export whole document?
     sal_Bool                    bBlock : 1;         // export text block?
-    sal_Bool                    bExportFirstTableOnly : 1;
     sal_Bool                    bShowProgress : 1;
     sal_Bool                    bSavedShowChanges : 1;
 
commit f832713838ced5030f9e0ae78b13c85545f69d6f
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Wed Dec 26 20:50:15 2012 +0900

    sal_Bool to bool
    
    Change-Id: I788473f88d78cd3818dfed20112fa36cea81de0d

diff --git a/sw/source/filter/xml/XMLRedlineImportHelper.cxx b/sw/source/filter/xml/XMLRedlineImportHelper.cxx
index fb942bb..d1cece0 100644
--- a/sw/source/filter/xml/XMLRedlineImportHelper.cxx
+++ b/sw/source/filter/xml/XMLRedlineImportHelper.cxx
@@ -103,7 +103,7 @@ public:
     void CopyPositionInto(SwPosition& rPos, SwDoc & rDoc);
     SwDoc* GetDoc();
 
-    sal_Bool IsValid();
+    bool IsValid();
 };
 
 XTextRangeOrNodeIndexPosition::XTextRangeOrNodeIndexPosition() :
@@ -193,7 +193,7 @@ SwDoc* XTextRangeOrNodeIndexPosition::GetDoc()
     return (NULL != pIndex) ? pIndex->GetNodes().GetDoc() : lcl_GetDocViaTunnel(xRange);
 }
 
-sal_Bool XTextRangeOrNodeIndexPosition::IsValid()
+bool XTextRangeOrNodeIndexPosition::IsValid()
 {
     return ( xRange.is() || (pIndex != NULL) );
 }
@@ -233,7 +233,7 @@ public:
     RedlineInfo* pNextRedline;
 
     /// store whether we expect an adjustment for this redline
-    sal_Bool bNeedsAdjustment;
+    bool bNeedsAdjustment;
 };
 
 RedlineInfo::RedlineInfo() :
@@ -246,7 +246,7 @@ RedlineInfo::RedlineInfo() :
     aAnchorEnd(),
     pContentIndex(NULL),
     pNextRedline(NULL),
-    bNeedsAdjustment( sal_False )
+    bNeedsAdjustment( false )
 {
 }
 
@@ -262,7 +262,7 @@ RedlineInfo::~RedlineInfo()
 //
 
 XMLRedlineImportHelper::XMLRedlineImportHelper(
-    sal_Bool bNoRedlinesPlease,
+    bool bNoRedlinesPlease,
     const Reference<XPropertySet> & rModel,
     const Reference<XPropertySet> & rImportInfo ) :
         sEmpty(),
@@ -278,9 +278,9 @@ XMLRedlineImportHelper::XMLRedlineImportHelper(
         xImportInfoPropertySet(rImportInfo)
 {
     // check to see if redline mode is handled outside of component
-    sal_Bool bHandleShowChanges = sal_True;
-    sal_Bool bHandleRecordChanges = sal_True;
-    sal_Bool bHandleProtectionKey = sal_True;
+    bool bHandleShowChanges = true;
+    bool bHandleRecordChanges = true;
+    bool bHandleProtectionKey = true;
     if ( xImportInfoPropertySet.is() )
     {
         Reference<XPropertySetInfo> xInfo =
@@ -333,7 +333,7 @@ XMLRedlineImportHelper::~XMLRedlineImportHelper()
         else
         {
             // try if only the adjustment was missing
-            pInfo->bNeedsAdjustment = sal_False;
+            pInfo->bNeedsAdjustment = false;
             if( IsReady(pInfo) )
             {
                 OSL_FAIL("RedlineInfo without adjustment; now inserted");
@@ -355,9 +355,9 @@ XMLRedlineImportHelper::~XMLRedlineImportHelper()
 
     // set redline mode, either to info property set, or directly to
     // the document
-    sal_Bool bHandleShowChanges = sal_True;
-    sal_Bool bHandleRecordChanges = sal_True;
-    sal_Bool bHandleProtectionKey = sal_True;
+    bool bHandleShowChanges = true;
+    bool bHandleRecordChanges = true;
+    bool bHandleProtectionKey = true;
     if ( xImportInfoPropertySet.is() )
     {
         Reference<XPropertySetInfo> xInfo =
@@ -535,7 +535,7 @@ void XMLRedlineImportHelper::SetCursor(
             }
 
             // also remember that we expect an adjustment for this redline
-            pInfo->bNeedsAdjustment = sal_True;
+            pInfo->bNeedsAdjustment = true;
         }
         else
         {
@@ -576,7 +576,7 @@ void XMLRedlineImportHelper::AdjustStartNodeCursor(
         // RedlineInfo found; now set Cursor
         RedlineInfo* pInfo = aFind->second;
 
-        pInfo->bNeedsAdjustment = sal_False;
+        pInfo->bNeedsAdjustment = false;
 
         // if now ready, insert into document
         if( IsReady(pInfo) )
@@ -590,7 +590,7 @@ void XMLRedlineImportHelper::AdjustStartNodeCursor(
 }
 
 
-inline sal_Bool XMLRedlineImportHelper::IsReady(RedlineInfo* pRedline)
+inline bool XMLRedlineImportHelper::IsReady(RedlineInfo* pRedline)
 {
     // we can insert a redline if we have start & end, and we don't
     // expect adjustments for either of these
diff --git a/sw/source/filter/xml/XMLRedlineImportHelper.hxx b/sw/source/filter/xml/XMLRedlineImportHelper.hxx
index c0a2103..2858d70 100644
--- a/sw/source/filter/xml/XMLRedlineImportHelper.hxx
+++ b/sw/source/filter/xml/XMLRedlineImportHelper.hxx
@@ -53,7 +53,7 @@ class XMLRedlineImportHelper
 
     /// if sal_True, no redlines should be inserted into document
     /// (This typically happen when a document is loaded in 'insert'-mode.)
-    sal_Bool bIgnoreRedlines;
+    bool bIgnoreRedlines;
 
     /// save information for saving and reconstruction of the redline mode
     ::com::sun::star::uno::Reference<
@@ -67,7 +67,7 @@ class XMLRedlineImportHelper
 public:
 
     XMLRedlineImportHelper(
-        sal_Bool bIgnoreRedlines,       /// ignore redlines mode
+        bool bIgnoreRedlines,       /// ignore redlines mode
 
         // property sets of model + import info for saving + restoring the
         // redline mode
@@ -134,7 +134,7 @@ public:
 
 private:
 
-    inline sal_Bool IsReady(RedlineInfo* pRedline);
+    inline bool IsReady(RedlineInfo* pRedline);
 
     void InsertIntoDocument(RedlineInfo* pRedline);
 
diff --git a/sw/source/filter/xml/swxml.cxx b/sw/source/filter/xml/swxml.cxx
index 897ef2c..c009af1 100644
--- a/sw/source/filter/xml/swxml.cxx
+++ b/sw/source/filter/xml/swxml.cxx
@@ -133,8 +133,8 @@ sal_Int32 ReadThroughComponent(
     const sal_Char* pFilterName,
     const Sequence<Any>& rFilterArguments,
     const OUString& rName,
-    sal_Bool bMustBeSuccessfull,
-    sal_Bool bEncrypted )
+    bool bMustBeSuccessfull,
+    bool bEncrypted )
 {
     OSL_ENSURE(xInputStream.is(), "input stream missing");
     OSL_ENSURE(xModelComponent.is(), "document missing");
@@ -188,7 +188,7 @@ sal_Int32 ReadThroughComponent(
         // sax parser sends wrapped exceptions,
         // try to find the original one
         xml::sax::SAXException aSaxEx = *(xml::sax::SAXException*)(&r);
-        sal_Bool bTryChild = sal_True;
+        bool bTryChild = true;
 
         while( bTryChild )
         {
@@ -196,7 +196,7 @@ sal_Int32 ReadThroughComponent(
             if ( aSaxEx.WrappedException >>= aTmp )
                 aSaxEx = aTmp;
             else
-                bTryChild = sal_False;
+                bTryChild = false;
         }
 
         packages::zip::ZipIOException aBrokenPackage;
@@ -303,7 +303,7 @@ sal_Int32 ReadThroughComponent(
     const sal_Char* pFilterName,
     const Sequence<Any>& rFilterArguments,
     const OUString& rName,
-    sal_Bool bMustBeSuccessfull)
+    bool bMustBeSuccessfull)
 {
     OSL_ENSURE(xStorage.is(), "Need storage!");
     OSL_ENSURE(NULL != pStreamName, "Please, please, give me a name!");
@@ -362,7 +362,7 @@ sal_Int32 ReadThroughComponent(
         Any aAny = xProps->getPropertyValue(
                 OUString( RTL_CONSTASCII_USTRINGPARAM("Encrypted") ) );
 
-        sal_Bool bEncrypted = aAny.getValueType() == ::getBooleanCppuType() &&
+        bool bEncrypted = aAny.getValueType() == ::getBooleanCppuType() &&
                 *(sal_Bool *)aAny.getValue();
 
         uno::Reference <io::XInputStream> xInputStream = xStream->getInputStream();
@@ -903,7 +903,7 @@ sal_uLong XMLReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPaM, con
         xStorage, xModelComp, "meta.xml", "Meta.xml", xServiceFactory,
         (bOASIS ? "com.sun.star.comp.Writer.XMLOasisMetaImporter"
                 : "com.sun.star.comp.Writer.XMLMetaImporter"),
-        aEmptyArgs, rName, sal_False );
+        aEmptyArgs, rName, false );
 
     sal_uInt32 nWarn2 = 0;
     if( !(IsOrganizerMode() || IsBlockMode() || aOpt.IsFmtsOnly() ||
@@ -913,21 +913,21 @@ sal_uLong XMLReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPaM, con
             xStorage, xModelComp, "settings.xml", NULL, xServiceFactory,
             (bOASIS ? "com.sun.star.comp.Writer.XMLOasisSettingsImporter"
                     : "com.sun.star.comp.Writer.XMLSettingsImporter"),
-            aFilterArgs, rName, sal_False );
+            aFilterArgs, rName, false );
     }
 
     nRet = ReadThroughComponent(
         xStorage, xModelComp, "styles.xml", NULL, xServiceFactory,
         (bOASIS ? "com.sun.star.comp.Writer.XMLOasisStylesImporter"
                 : "com.sun.star.comp.Writer.XMLStylesImporter"),
-        aFilterArgs, rName, sal_True );
+        aFilterArgs, rName, true );
 
     if( !nRet && !(IsOrganizerMode() || aOpt.IsFmtsOnly()) )
         nRet = ReadThroughComponent(
            xStorage, xModelComp, "content.xml", "Content.xml", xServiceFactory,
             (bOASIS ? "com.sun.star.comp.Writer.XMLOasisContentImporter"
                     : "com.sun.star.comp.Writer.XMLContentImporter"),
-           aFilterArgs, rName, sal_True );
+           aFilterArgs, rName, true );
 
     if( !(IsOrganizerMode() || IsBlockMode() || bInsertMode ||
           aOpt.IsFmtsOnly() ) )
diff --git a/sw/source/filter/xml/wrtxml.cxx b/sw/source/filter/xml/wrtxml.cxx
index 5cbbfd3..6f8b0cd 100644
--- a/sw/source/filter/xml/wrtxml.cxx
+++ b/sw/source/filter/xml/wrtxml.cxx
@@ -238,7 +238,7 @@ pGraphicHelper = SvXMLGraphicHelper::Create( xStg,
     }
 
     // #i69627#
-    const sal_Bool bOASIS = ( SotStorage::GetVersion( xStg ) > SOFFICE_FILEFORMAT_60 );
+    const bool bOASIS = ( SotStorage::GetVersion( xStg ) > SOFFICE_FILEFORMAT_60 );
     if ( bOASIS &&
          docfunc::HasOutlineStyleToBeWrittenAsNormalListStyle( *pDoc ) )
     {
@@ -297,7 +297,7 @@ pGraphicHelper = SvXMLGraphicHelper::Create( xStg,
     }
 
     // export sub streams for package, else full stream into a file
-    sal_Bool bWarn = sal_False, bErr = sal_False;
+    bool bWarn = false, bErr = false;
     String sWarnFile, sErrFile;
 
     // RDF metadata: export if ODF >= 1.2
@@ -324,11 +324,11 @@ pGraphicHelper = SvXMLGraphicHelper::Create( xStg,
         { /* ignore */ }
         catch (uno::Exception &)
         {
-            bWarn = sal_True;
+            bWarn = true;
         }
     }
 
-    sal_Bool bStoreMeta = ( SFX_CREATE_MODE_EMBEDDED != pDoc->GetDocShell()->GetCreateMode() );
+    bool bStoreMeta = ( SFX_CREATE_MODE_EMBEDDED != pDoc->GetDocShell()->GetCreateMode() );
     if ( !bStoreMeta )
     {
         try
@@ -352,7 +352,7 @@ pGraphicHelper = SvXMLGraphicHelper::Create( xStg,
                         : "com.sun.star.comp.Writer.XMLMetaExporter"),
                 aEmptyArgs, aProps ) )
         {
-            bWarn = sal_True;
+            bWarn = true;
             sWarnFile = String( RTL_CONSTASCII_STRINGPARAM("meta.xml"),
                                 RTL_TEXTENCODING_ASCII_US );
         }
@@ -370,7 +370,7 @@ pGraphicHelper = SvXMLGraphicHelper::Create( xStg,
             {
                 if( !bWarn )
                 {
-                    bWarn = sal_True;
+                    bWarn = true;
                     sWarnFile = String( RTL_CONSTASCII_STRINGPARAM("settings.xml"),
                                         RTL_TEXTENCODING_ASCII_US );
                 }
@@ -384,7 +384,7 @@ pGraphicHelper = SvXMLGraphicHelper::Create( xStg,
                     : "com.sun.star.comp.Writer.XMLStylesExporter"),
             aFilterArgs, aProps ) )
     {
-        bErr = sal_True;
+        bErr = true;
         sErrFile = String( RTL_CONSTASCII_STRINGPARAM("styles.xml"),
                            RTL_TEXTENCODING_ASCII_US );
     }
@@ -398,7 +398,7 @@ pGraphicHelper = SvXMLGraphicHelper::Create( xStg,
                         : "com.sun.star.comp.Writer.XMLContentExporter"),
                 aFilterArgs, aProps ) )
         {
-            bErr = sal_True;
+            bErr = true;
             sErrFile = String( RTL_CONSTASCII_STRINGPARAM("content.xml"),
                                RTL_TEXTENCODING_ASCII_US );
         }
@@ -500,7 +500,7 @@ sal_uLong SwXMLWriter::Write( SwPaM& rPaM, SfxMedium& rMed,
             : ((Writer *)this)->Write( rPaM, *rMed.GetOutStream(), pFileName );
 }
 
-sal_Bool SwXMLWriter::WriteThroughComponent(
+bool SwXMLWriter::WriteThroughComponent(
     const uno::Reference<XComponent> & xComponent,
     const sal_Char* pStreamName,
     const uno::Reference<lang::XMultiServiceFactory> & rFactory,
@@ -517,7 +517,7 @@ sal_Bool SwXMLWriter::WriteThroughComponent(
                                pStreamName );
 
     // open stream
-    sal_Bool bRet = sal_False;
+    bool bRet = false;
     try
     {
         OUString sStreamName = OUString::createFromAscii( pStreamName );
@@ -527,7 +527,7 @@ sal_Bool SwXMLWriter::WriteThroughComponent(
 
         uno::Reference <beans::XPropertySet > xSet( xStream, uno::UNO_QUERY );
         if( !xSet.is() )
-            return sal_False;
+            return false;
 
         OUString aMime( RTL_CONSTASCII_USTRINGPARAM("text/xml") );
         uno::Any aAny;
@@ -568,7 +568,7 @@ sal_Bool SwXMLWriter::WriteThroughComponent(
 
 }
 
-sal_Bool SwXMLWriter::WriteThroughComponent(
+bool SwXMLWriter::WriteThroughComponent(
     const uno::Reference<io::XOutputStream> & xOutputStream,
     const uno::Reference<XComponent> & xComponent,
     const uno::Reference<XMultiServiceFactory> & rFactory,
@@ -604,7 +604,7 @@ sal_Bool SwXMLWriter::WriteThroughComponent(
     OSL_ENSURE( xExporter.is(),
             "can't instantiate export filter component" );
     if( !xExporter.is() )
-        return sal_False;
+        return false;
     RTL_LOGFILE_CONTEXT_TRACE1( aFilterLog, "%s instantiated.", pServiceName );
 
     // connect model and filter
diff --git a/sw/source/filter/xml/wrtxml.hxx b/sw/source/filter/xml/wrtxml.hxx
index 42dc942..4ee80a0 100644
--- a/sw/source/filter/xml/wrtxml.hxx
+++ b/sw/source/filter/xml/wrtxml.hxx
@@ -59,7 +59,7 @@ private:
     // helper methods to write XML streams
 
     /// write a single XML stream into the package
-    sal_Bool WriteThroughComponent(
+    bool WriteThroughComponent(
         /// the component we export
         const ::com::sun::star::uno::Reference<
             ::com::sun::star::lang::XComponent> & xComponent,
@@ -77,7 +77,7 @@ private:
 
     /// write a single output stream
     /// (to be called either directly or by WriteThroughComponent(...))
-    sal_Bool WriteThroughComponent(
+    bool WriteThroughComponent(
         const ::com::sun::star::uno::Reference<
             ::com::sun::star::io::XOutputStream> & xOutputStream,
         const ::com::sun::star::uno::Reference<


More information about the Libreoffice-commits mailing list