[Libreoffice-commits] core.git: 3 commits - compilerplugins/clang cui/source filter/source include/filter include/oox oox/inc oox/source reportdesign/source sd/source

Noel Grandin noel at peralex.com
Fri Mar 4 12:01:46 UTC 2016


 compilerplugins/clang/unuseddefaultparams.cxx            |    2 -
 cui/source/customize/macropg.cxx                         |   12 +++---
 cui/source/dialogs/iconcdlg.cxx                          |    7 +--
 cui/source/dialogs/pastedlg.cxx                          |    3 -
 cui/source/inc/dlgname.hxx                               |    7 ---
 cui/source/inc/headertablistbox.hxx                      |    4 +-
 cui/source/inc/iconcdlg.hxx                              |    3 -
 cui/source/inc/pastedlg.hxx                              |    3 -
 filter/source/flash/swfwriter.cxx                        |   11 ++----
 filter/source/flash/swfwriter.hxx                        |    4 +-
 filter/source/graphicfilter/eps/eps.cxx                  |    6 +--
 filter/source/msfilter/eschesdo.hxx                      |    4 +-
 filter/source/msfilter/msdffimp.cxx                      |   15 ++------
 include/filter/msfilter/msdffimp.hxx                     |    3 -
 include/oox/core/fastparser.hxx                          |    2 -
 include/oox/helper/binaryinputstream.hxx                 |    4 +-
 include/oox/helper/binaryoutputstream.hxx                |    4 +-
 oox/inc/drawingml/textcharacterproperties.hxx            |    3 -
 oox/source/core/fastparser.cxx                           |    4 +-
 oox/source/drawingml/textcharacterproperties.cxx         |   22 +++++-------
 oox/source/helper/binaryinputstream.cxx                  |   27 ++++++---------
 oox/source/helper/binaryoutputstream.cxx                 |   10 ++---
 reportdesign/source/ui/inc/ScrollHelper.hxx              |    6 ---
 reportdesign/source/ui/report/ScrollHelper.cxx           |    4 +-
 sd/source/ui/slidesorter/controller/SlsClipboard.cxx     |    6 +--
 sd/source/ui/slidesorter/inc/controller/SlsClipboard.hxx |    4 +-
 26 files changed, 74 insertions(+), 106 deletions(-)

New commits:
commit 4d0003df737040adad22a808ae4c3d150bdd029f
Author: Noel Grandin <noel at peralex.com>
Date:   Fri Mar 4 13:48:23 2016 +0200

    loplugin:unuseddefaultparam in cui
    
    Change-Id: I83c35b7a71d0becb98e739f076f42ce58b9e1cd8

diff --git a/cui/source/customize/macropg.cxx b/cui/source/customize/macropg.cxx
index c57913a..8b1bbc0 100644
--- a/cui/source/customize/macropg.cxx
+++ b/cui/source/customize/macropg.cxx
@@ -195,16 +195,16 @@ void MacroEventListBox::ConnectElements()
     maListBox->InitHeaderBar( maHeaderBar.get() );
 }
 
-void MacroEventListBox::Show( bool bVisible )
+void MacroEventListBox::Show()
 {
-    maListBox->Show( bVisible );
-    maHeaderBar->Show( bVisible );
+    maListBox->Show();
+    maHeaderBar->Show();
 }
 
-void MacroEventListBox::Enable( bool bEnable )
+void MacroEventListBox::Enable()
 {
-    maListBox->Enable( bEnable );
-    maHeaderBar->Enable( bEnable );
+    maListBox->Enable();
+    maHeaderBar->Enable();
 }
 
 // assign button ("Add Command") is enabled only if it is not read only
diff --git a/cui/source/dialogs/iconcdlg.cxx b/cui/source/dialogs/iconcdlg.cxx
index a6a9aba..f098ac5 100644
--- a/cui/source/dialogs/iconcdlg.cxx
+++ b/cui/source/dialogs/iconcdlg.cxx
@@ -278,17 +278,16 @@ SvxIconChoiceCtrlEntry* IconChoiceDialog::AddTabPage(
     const OUString&   rIconText,
     const Image&    rChoiceIcon,
     CreatePage      pCreateFunc /* != 0 */,
-    GetPageRanges   pRangesFunc /* darf 0 sein */,
-    bool            bItemsOnDemand
+    GetPageRanges   pRangesFunc /* darf 0 sein */
 )
 {
     IconChoicePageData* pData = new IconChoicePageData ( nId, pCreateFunc,
                                                          pRangesFunc,
-                                                         bItemsOnDemand );
+                                                         false/*bItemsOnDemand*/ );
     maPageList.push_back( pData );
 
     pData->fnGetRanges = pRangesFunc;
-    pData->bOnDemand = bItemsOnDemand;
+    pData->bOnDemand = false;
 
     sal_uInt16 *pId = new sal_uInt16 ( nId );
     SvxIconChoiceCtrlEntry* pEntry = m_pIconCtrl->InsertEntry( rIconText, rChoiceIcon );
diff --git a/cui/source/dialogs/pastedlg.cxx b/cui/source/dialogs/pastedlg.cxx
index 4fc2e21..ecb11fe 100644
--- a/cui/source/dialogs/pastedlg.cxx
+++ b/cui/source/dialogs/pastedlg.cxx
@@ -93,8 +93,7 @@ void SvPasteObjectDialog::Insert( SotClipboardFormatId nFormat, const OUString&
 }
 
 SotClipboardFormatId SvPasteObjectDialog::GetFormat( const TransferableDataHelper& rHelper,
-                                      const DataFlavorExVector* pFormats,
-                                      const TransferableObjectDescriptor* )
+                                      const DataFlavorExVector* pFormats )
 {
     //TODO/LATER: why is the Descriptor never used?!
     TransferableObjectDescriptor aDesc;
diff --git a/cui/source/inc/dlgname.hxx b/cui/source/inc/dlgname.hxx
index ac09a3d..3576b29 100644
--- a/cui/source/inc/dlgname.hxx
+++ b/cui/source/inc/dlgname.hxx
@@ -97,14 +97,9 @@ public:
     void GetName(OUString& rName) {rName = pEdtName->GetText(); }
 
     // set handler
-    void SetCheckNameHdl(const Link<SvxObjectNameDialog&,bool>& rLink, bool bCheckImmediately = false)
+    void SetCheckNameHdl(const Link<SvxObjectNameDialog&,bool>& rLink)
     {
         aCheckNameHdl = rLink;
-
-        if(bCheckImmediately)
-        {
-            pBtnOK->Enable(rLink.Call(*this));
-        }
     }
 };
 
diff --git a/cui/source/inc/headertablistbox.hxx b/cui/source/inc/headertablistbox.hxx
index 1ec22e2..df35038 100644
--- a/cui/source/inc/headertablistbox.hxx
+++ b/cui/source/inc/headertablistbox.hxx
@@ -52,8 +52,8 @@ public:
 
     void                        ConnectElements();/**< should be called after all manipulations on elements are done
                                                              calcs real sizes depending on sizes of this */
-    void                        Show( bool bVisible = true );    ///< same meaning as Windows::Show()
-    void                        Enable( bool bEnable = true );  ///< same meaning as Windows::Enable()
+    void                        Show();    ///< same meaning as Windows::Show()
+    void                        Enable();  ///< same meaning as Windows::Enable()
 };
 
 #endif
diff --git a/cui/source/inc/iconcdlg.hxx b/cui/source/inc/iconcdlg.hxx
index 23a3cb6..01d08b5 100644
--- a/cui/source/inc/iconcdlg.hxx
+++ b/cui/source/inc/iconcdlg.hxx
@@ -180,8 +180,7 @@ public:
     // interface
     SvxIconChoiceCtrlEntry* AddTabPage(
         sal_uInt16 nId, const OUString& rIconText, const Image& rChoiceIcon,
-        CreatePage pCreateFunc /* != NULL */, GetPageRanges pRangesFunc = nullptr /* NULL allowed*/,
-        bool bItemsOnDemand = false );
+        CreatePage pCreateFunc /* != NULL */, GetPageRanges pRangesFunc = nullptr /* NULL allowed*/ );
 
     void                SetCurPageId( sal_uInt16 nId ) { mnCurrentPageId = nId; FocusOnIcon( nId ); }
     sal_uInt16          GetCurPageId() const       { return mnCurrentPageId; }
diff --git a/cui/source/inc/pastedlg.hxx b/cui/source/inc/pastedlg.hxx
index 7f4831b..0814445 100644
--- a/cui/source/inc/pastedlg.hxx
+++ b/cui/source/inc/pastedlg.hxx
@@ -61,8 +61,7 @@ public:
     void        Insert( SotClipboardFormatId nFormat, const OUString & rFormatName );
     void        SetObjName( const SvGlobalName & rClass, const OUString & rObjName );
     SotClipboardFormatId GetFormat( const TransferableDataHelper& aHelper,
-                        const DataFlavorExVector* pFormats=nullptr,
-                        const TransferableObjectDescriptor* pDesc=nullptr );
+                        const DataFlavorExVector* pFormats=nullptr );
 };
 
 #endif // INCLUDED_CUI_SOURCE_INC_PASTEDLG_HXX
commit 9b3b0b1cebf9aae8a8da43b26df9b907b69d5c03
Author: Noel Grandin <noel at peralex.com>
Date:   Fri Mar 4 13:44:33 2016 +0200

    loplugin:unuseddefaultparam in filter
    
    Change-Id: Ieaad3145c01dc4ea7b3e7eb7859db89ebd1d7fe1

diff --git a/filter/source/flash/swfwriter.cxx b/filter/source/flash/swfwriter.cxx
index 6838e71..fbd90f7 100644
--- a/filter/source/flash/swfwriter.cxx
+++ b/filter/source/flash/swfwriter.cxx
@@ -206,13 +206,13 @@ void Writer::endSprite()
 }
 
 
-void Writer::placeShape( sal_uInt16 nID, sal_uInt16 nDepth, sal_Int32 x, sal_Int32 y, sal_uInt16 nClip )
+void Writer::placeShape( sal_uInt16 nID, sal_uInt16 nDepth, sal_Int32 x, sal_Int32 y )
 {
     startTag( TAG_PLACEOBJECT2 );
 
     BitStream aBits;
 
-    aBits.writeUB( sal_uInt32(nClip != 0), 1 ); // Has Clip Actions?
+    aBits.writeUB( sal_uInt32(0), 1 ); // Has Clip Actions?
     aBits.writeUB( 0, 1 );              // reserved
     aBits.writeUB( sal_uInt32(0), 1 );  // has a name
     aBits.writeUB( 0, 1 );              // no ratio
@@ -231,9 +231,6 @@ void Writer::placeShape( sal_uInt16 nID, sal_uInt16 nDepth, sal_Int32 x, sal_Int
         _Int16(static_cast<long>(map100thmm(y)*mnDocYScale))));
     mpTag->addMatrix( aMatrix );        // transformation matrix
 
-    if( nClip != 0 )
-        mpTag->addUI16( nClip );
-
     endTag();
 }
 
@@ -282,7 +279,7 @@ void Writer::showFrame()
 }
 
 
-sal_uInt16 Writer::defineShape( const GDIMetaFile& rMtf, sal_Int16 x )
+sal_uInt16 Writer::defineShape( const GDIMetaFile& rMtf )
 {
     mpVDev->SetMapMode( rMtf.GetPrefMapMode() );
     Impl_writeActions( rMtf );
@@ -301,7 +298,7 @@ sal_uInt16 Writer::defineShape( const GDIMetaFile& rMtf, sal_Int16 x )
             sal_uInt16 iDepth = 1;
             for(; aIter != aEnd; ++aIter)
             {
-                placeShape( *aIter, iDepth++, x, 0 );
+                placeShape( *aIter, iDepth++, 0, 0 );
             }
 
             endSprite();
diff --git a/filter/source/flash/swfwriter.hxx b/filter/source/flash/swfwriter.hxx
index 62ac8ca..5337f9a 100644
--- a/filter/source/flash/swfwriter.hxx
+++ b/filter/source/flash/swfwriter.hxx
@@ -284,7 +284,7 @@ public:
         A character id of a flash sprite is returned that contains all geometry
         from the metafile.
     */
-    sal_uInt16 defineShape( const GDIMetaFile& rMtf, sal_Int16 x = 0 );
+    sal_uInt16 defineShape( const GDIMetaFile& rMtf );
 
     /** defines a bitmap and returns its flash id.
     */
@@ -293,7 +293,7 @@ public:
     // control tags
 
     /** inserts a place shape tag into the movie stream or the current sprite */
-    void placeShape( sal_uInt16 nID, sal_uInt16 nDepth, sal_Int32 x, sal_Int32 y, sal_uInt16 nClipDepth = 0 );
+    void placeShape( sal_uInt16 nID, sal_uInt16 nDepth, sal_Int32 x, sal_Int32 y );
 
     /** inserts a remove shape tag into the movie stream or the current sprite */
     void removeShape( sal_uInt16 nDepth );
diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx
index 786c112..ab24328 100644
--- a/filter/source/graphicfilter/eps/eps.cxx
+++ b/filter/source/graphicfilter/eps/eps.cxx
@@ -167,7 +167,7 @@ private:
     void                ImplWriteF( sal_Int32 nNumb, sal_uLong nCount = 3, sal_uLong nMode = PS_SPACE );
 
                         // writes a double in ASCII format to stream
-    void                ImplWriteDouble( double, sal_uLong nMode = PS_SPACE );
+    void                ImplWriteDouble( double );
 
                         // writes a long in ASCII format to stream
     void                ImplWriteLong( sal_Int32 nNumb, sal_uLong nMode = PS_SPACE );
@@ -2342,7 +2342,7 @@ void PSWriter::ImplWriteLong(sal_Int32 nNumber, sal_uLong nMode)
     ImplExecMode(nMode);
 }
 
-void PSWriter::ImplWriteDouble( double fNumber, sal_uLong nMode )
+void PSWriter::ImplWriteDouble( double fNumber )
 {
     sal_Int32   nPTemp = (sal_Int32)fNumber;
     sal_Int32   nATemp = labs( (sal_Int32)( ( fNumber - nPTemp ) * 100000 ) );
@@ -2381,7 +2381,7 @@ void PSWriter::ImplWriteDouble( double fNumber, sal_uLong nMode )
         if ( zCount )
             mpPS->SeekRel( zCount );
     }
-    ImplExecMode( nMode );
+    ImplExecMode( PS_SPACE );
 }
 
 /// Writes the number to stream: nNumber / ( 10^nCount )
diff --git a/filter/source/msfilter/eschesdo.hxx b/filter/source/msfilter/eschesdo.hxx
index 6a3f58c..7473676 100644
--- a/filter/source/msfilter/eschesdo.hxx
+++ b/filter/source/msfilter/eschesdo.hxx
@@ -56,8 +56,8 @@ public:
     bool ImplGetPropertyValue( const sal_Unicode* pString );
     bool ImplGetPropertyValue( const OUString& rString ) { return ImplGetPropertyValue(rString.getStr()); }
 
-    sal_Int32 ImplGetInt32PropertyValue( const sal_Unicode* pStr, sal_uInt32 nDef = 0 )
-    { return ImplGetPropertyValue( pStr ) ? *static_cast<sal_Int32 const *>(mAny.getValue()) : nDef; }
+    sal_Int32 ImplGetInt32PropertyValue( const sal_Unicode* pStr )
+    { return ImplGetPropertyValue( pStr ) ? *static_cast<sal_Int32 const *>(mAny.getValue()) : 0; }
     sal_Int32 ImplGetInt32PropertyValue( const OUString& rStr )
     { return ImplGetInt32PropertyValue(rStr.getStr()); }
 
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index 1bbd826..c62dea4 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -3290,7 +3290,7 @@ bool SvxMSDffManager::SeekToRec( SvStream& rSt, sal_uInt16 nRecId, sal_uLong nMa
     return bRet;
 }
 
-bool SvxMSDffManager::SeekToRec2( sal_uInt16 nRecId1, sal_uInt16 nRecId2, sal_uLong nMaxFilePos, DffRecordHeader* pRecHd ) const
+bool SvxMSDffManager::SeekToRec2( sal_uInt16 nRecId1, sal_uInt16 nRecId2, sal_uLong nMaxFilePos ) const
 {
     bool bRet = false;
     sal_uLong nFPosMerk = rStCtrl.Tell();   // remember FilePos for conditionally later restoration
@@ -3302,16 +3302,11 @@ bool SvxMSDffManager::SeekToRec2( sal_uInt16 nRecId1, sal_uInt16 nRecId2, sal_uL
         if ( aHd.nRecType == nRecId1 || aHd.nRecType == nRecId2 )
         {
             bRet = true;
-            if ( pRecHd )
-                *pRecHd = aHd;
-            else
+            bool bSeekSuccess = aHd.SeekToBegOfRecord(rStCtrl);
+            if (!bSeekSuccess)
             {
-                bool bSeekSuccess = aHd.SeekToBegOfRecord(rStCtrl);
-                if (!bSeekSuccess)
-                {
-                    bRet = false;
-                    break;
-                }
+                bRet = false;
+                break;
             }
         }
         if ( !bRet )
diff --git a/include/filter/msfilter/msdffimp.hxx b/include/filter/msfilter/msdffimp.hxx
index 3e3f414..e0c23ee 100644
--- a/include/filter/msfilter/msdffimp.hxx
+++ b/include/filter/msfilter/msdffimp.hxx
@@ -525,8 +525,7 @@ public:
                     sal_uLong nSkipCount = 0 );
     bool SeekToRec2( sal_uInt16 nRecId1,
                      sal_uInt16 nRecId2,
-                     sal_uLong nMaxFilePos,
-                     DffRecordHeader* pRecHd = nullptr ) const;
+                     sal_uLong nMaxFilePos ) const;
 
     static OUString MSDFFReadZString( SvStream& rIn,
                                            sal_uInt32 nMaxLen,
commit 1fd781e7cd33f325ec7e467ecd49e0cb6ff4762b
Author: Noel Grandin <noel at peralex.com>
Date:   Fri Mar 4 13:41:22 2016 +0200

    loplugin:unuseddefaultparam in oox/reportdesign/sd
    
    Change-Id: Ia26cf182ddc7c903d86bf74a8175858adb88121c

diff --git a/compilerplugins/clang/unuseddefaultparams.cxx b/compilerplugins/clang/unuseddefaultparams.cxx
index 8074e51..e8b99d3 100644
--- a/compilerplugins/clang/unuseddefaultparams.cxx
+++ b/compilerplugins/clang/unuseddefaultparams.cxx
@@ -240,7 +240,7 @@ bool UnusedDefaultParams::VisitDeclRefExpr( const DeclRefExpr* declRefExpr )
     return true;
 }
 
-loplugin::Plugin::Registration< UnusedDefaultParams > X("unuseddefaultparams", true);
+loplugin::Plugin::Registration< UnusedDefaultParams > X("unuseddefaultparams", false);
 
 }
 
diff --git a/include/oox/core/fastparser.hxx b/include/oox/core/fastparser.hxx
index 946e6541..b1e4294 100644
--- a/include/oox/core/fastparser.hxx
+++ b/include/oox/core/fastparser.hxx
@@ -66,7 +66,7 @@ public:
         @param bCloseStream  True = closes the passed stream after parsing. */
     void                parseStream(
                             const css::uno::Reference< css::io::XInputStream >& rxInStream,
-                            const OUString& rStreamName, bool bCloseStream = false )
+                            const OUString& rStreamName )
                             throw( css::xml::sax::SAXException, css::io::IOException, css::uno::RuntimeException );
 
     /** Parses a stream from the passed storage with the specified name.
diff --git a/include/oox/helper/binaryinputstream.hxx b/include/oox/helper/binaryinputstream.hxx
index 101f1f0..4655b8a 100644
--- a/include/oox/helper/binaryinputstream.hxx
+++ b/include/oox/helper/binaryinputstream.hxx
@@ -186,9 +186,9 @@ public:
      */
     OUString     readCompressedUnicodeArray( sal_Int32 nChars, bool bCompressed, bool bAllowNulChars = false );
 
-    /** Copies nBytes bytes from the current position to the passed output stream.
+    /** Copies bytes from the current position to the passed output stream.
      */
-    void         copyToStream( BinaryOutputStream& rOutStrm, sal_Int64 nBytes = SAL_MAX_INT64 );
+    void         copyToStream( BinaryOutputStream& rOutStrm );
 
 protected:
     /** This dummy default c'tor will never call the c'tor of the virtual base
diff --git a/include/oox/helper/binaryoutputstream.hxx b/include/oox/helper/binaryoutputstream.hxx
index 8e315fa..358e72c 100644
--- a/include/oox/helper/binaryoutputstream.hxx
+++ b/include/oox/helper/binaryoutputstream.hxx
@@ -75,9 +75,9 @@ public:
 
     void writeCompressedUnicodeArray( const OUString& rString, bool bCompressed );
 
-    void writeCharArrayUC( const OUString& rString, rtl_TextEncoding eTextEnc, bool bAllowNulChars = false );
+    void writeCharArrayUC( const OUString& rString, rtl_TextEncoding eTextEnc );
 
-    void writeUnicodeArray( const OUString& rString, bool bAllowNulChars = false );
+    void writeUnicodeArray( const OUString& rString );
 
 protected:
     /** This dummy default c'tor will never call the c'tor of the virtual base
diff --git a/oox/inc/drawingml/textcharacterproperties.hxx b/oox/inc/drawingml/textcharacterproperties.hxx
index 8f84e8a..6d7229a 100644
--- a/oox/inc/drawingml/textcharacterproperties.hxx
+++ b/oox/inc/drawingml/textcharacterproperties.hxx
@@ -71,8 +71,7 @@ struct TextCharacterProperties
     /** Writes the properties to the passed property map. */
     void                pushToPropMap(
                             PropertyMap& rPropMap,
-                            const ::oox::core::XmlFilterBase& rFilter,
-                            bool bUseOptional = false ) const;
+                            const ::oox::core::XmlFilterBase& rFilter ) const;
 
     /** Writes the properties to the passed property set. */
     void                pushToPropSet(
diff --git a/oox/source/core/fastparser.cxx b/oox/source/core/fastparser.cxx
index 6410a42..5a9121d 100644
--- a/oox/source/core/fastparser.cxx
+++ b/oox/source/core/fastparser.cxx
@@ -118,12 +118,12 @@ void FastParser::parseStream( const InputSource& rInputSource, bool bCloseStream
     mxParser->parseStream( rInputSource );
 }
 
-void FastParser::parseStream( const Reference< XInputStream >& rxInStream, const OUString& rStreamName, bool bCloseStream ) throw( SAXException, IOException, RuntimeException )
+void FastParser::parseStream( const Reference< XInputStream >& rxInStream, const OUString& rStreamName ) throw( SAXException, IOException, RuntimeException )
 {
     InputSource aInputSource;
     aInputSource.sSystemId = rStreamName;
     aInputSource.aInputStream = rxInStream;
-    parseStream( aInputSource, bCloseStream );
+    parseStream( aInputSource );
 }
 
 void FastParser::parseStream( StorageBase& rStorage, const OUString& rStreamName ) throw( SAXException, IOException, RuntimeException )
diff --git a/oox/source/drawingml/textcharacterproperties.cxx b/oox/source/drawingml/textcharacterproperties.cxx
index acf337e..3d71c2d 100644
--- a/oox/source/drawingml/textcharacterproperties.cxx
+++ b/oox/source/drawingml/textcharacterproperties.cxx
@@ -66,7 +66,7 @@ void TextCharacterProperties::assignUsed( const TextCharacterProperties& rSource
     maGradientProps.assignUsed( rSourceProps.maGradientProps );
 }
 
-void TextCharacterProperties::pushToPropMap( PropertyMap& rPropMap, const XmlFilterBase& rFilter, bool bUseOptional ) const
+void TextCharacterProperties::pushToPropMap( PropertyMap& rPropMap, const XmlFilterBase& rFilter ) const
 {
     OUString aFontName;
     sal_Int16 nFontPitch = 0;
@@ -140,19 +140,15 @@ void TextCharacterProperties::pushToPropMap( PropertyMap& rPropMap, const XmlFil
         rPropMap.setProperty( PROP_CharEscapementHeight, sal_Int8(100)); // 100%
     }
 
-    if( !bUseOptional || moBold.has() ) {
-        float fWeight = moBold.get( false ) ? awt::FontWeight::BOLD : awt::FontWeight::NORMAL;
-        rPropMap.setProperty( PROP_CharWeight, fWeight);
-        rPropMap.setProperty( PROP_CharWeightAsian, fWeight);
-        rPropMap.setProperty( PROP_CharWeightComplex, fWeight);
-    }
+    float fWeight = moBold.get( false ) ? awt::FontWeight::BOLD : awt::FontWeight::NORMAL;
+    rPropMap.setProperty( PROP_CharWeight, fWeight);
+    rPropMap.setProperty( PROP_CharWeightAsian, fWeight);
+    rPropMap.setProperty( PROP_CharWeightComplex, fWeight);
 
-    if( !bUseOptional || moItalic.has() ) {
-        awt::FontSlant eSlant = moItalic.get( false ) ? awt::FontSlant_ITALIC : awt::FontSlant_NONE;
-        rPropMap.setProperty( PROP_CharPosture, eSlant);
-        rPropMap.setProperty( PROP_CharPostureAsian, eSlant);
-        rPropMap.setProperty( PROP_CharPostureComplex, eSlant);
-    }
+    awt::FontSlant eSlant = moItalic.get( false ) ? awt::FontSlant_ITALIC : awt::FontSlant_NONE;
+    rPropMap.setProperty( PROP_CharPosture, eSlant);
+    rPropMap.setProperty( PROP_CharPostureAsian, eSlant);
+    rPropMap.setProperty( PROP_CharPostureComplex, eSlant);
 
     bool bUnderlineFillFollowText = moUnderlineFillFollowText.get( false );
     if( moUnderline.has() && maUnderlineColor.isUsed() && !bUnderlineFillFollowText )
diff --git a/oox/source/helper/binaryinputstream.cxx b/oox/source/helper/binaryinputstream.cxx
index 7f35f6d..5b5eb5b 100644
--- a/oox/source/helper/binaryinputstream.cxx
+++ b/oox/source/helper/binaryinputstream.cxx
@@ -102,23 +102,20 @@ OUString BinaryInputStream::readCompressedUnicodeArray( sal_Int32 nChars, bool b
         readUnicodeArray( nChars, bAllowNulChars );
 }
 
-void BinaryInputStream::copyToStream( BinaryOutputStream& rOutStrm, sal_Int64 nBytes )
+void BinaryInputStream::copyToStream( BinaryOutputStream& rOutStrm )
 {
-    if( nBytes > 0 )
+    sal_Int64 nBytes = SAL_MAX_INT64;
+    sal_Int32 nBufferSize = INPUTSTREAM_BUFFERSIZE;
+    StreamDataSequence aBuffer( nBufferSize );
+    while( nBytes > 0 )
     {
-        // make buffer size a multiple of the passed atom size
-        sal_Int32 nBufferSize = getLimitedValue< sal_Int32, sal_Int64 >( nBytes, 0, INPUTSTREAM_BUFFERSIZE );
-        StreamDataSequence aBuffer( nBufferSize );
-        while( nBytes > 0 )
-        {
-            sal_Int32 nReadSize = getLimitedValue< sal_Int32, sal_Int64 >( nBytes, 0, nBufferSize );
-            sal_Int32 nBytesRead = readData( aBuffer, nReadSize );
-            rOutStrm.writeData( aBuffer );
-            if( nReadSize == nBytesRead )
-                nBytes -= nReadSize;
-            else
-                nBytes = 0;
-        }
+        sal_Int32 nReadSize = getLimitedValue< sal_Int32, sal_Int64 >( nBytes, 0, nBufferSize );
+        sal_Int32 nBytesRead = readData( aBuffer, nReadSize );
+        rOutStrm.writeData( aBuffer );
+        if( nReadSize == nBytesRead )
+            nBytes -= nReadSize;
+        else
+            nBytes = 0;
     }
 }
 
diff --git a/oox/source/helper/binaryoutputstream.cxx b/oox/source/helper/binaryoutputstream.cxx
index c35f15b..c6d0f50 100644
--- a/oox/source/helper/binaryoutputstream.cxx
+++ b/oox/source/helper/binaryoutputstream.cxx
@@ -99,20 +99,18 @@ void BinaryXOutputStream::writeMemory( const void* pMem, sal_Int32 nBytes, size_
 }
 
 void
-BinaryOutputStream::writeCharArrayUC( const OUString& rString, rtl_TextEncoding eTextEnc, bool bAllowNulChars )
+BinaryOutputStream::writeCharArrayUC( const OUString& rString, rtl_TextEncoding eTextEnc )
 {
     OString sBuf( OUStringToOString( rString, eTextEnc ) );
-    if( !bAllowNulChars )
-        sBuf = sBuf.replace( '\0', '?' );
+    sBuf = sBuf.replace( '\0', '?' );
     writeMemory( static_cast< const void* >( sBuf.getStr() ), sBuf.getLength() );
 }
 
 void
-BinaryOutputStream::writeUnicodeArray( const OUString& rString, bool bAllowNulChars )
+BinaryOutputStream::writeUnicodeArray( const OUString& rString )
 {
     OUString sBuf( rString );
-    if( !bAllowNulChars )
-        sBuf = sBuf.replace( '\0', '?' );
+    sBuf = sBuf.replace( '\0', '?' );
 #ifdef OSL_BIGENDIAN
     // need a non-const buffer for swapping byte order
     sal_Unicode notConst[sBuf.getLength()];
diff --git a/reportdesign/source/ui/inc/ScrollHelper.hxx b/reportdesign/source/ui/inc/ScrollHelper.hxx
index 38f8777..809cdd5 100644
--- a/reportdesign/source/ui/inc/ScrollHelper.hxx
+++ b/reportdesign/source/ui/inc/ScrollHelper.hxx
@@ -190,12 +190,8 @@ namespace rptui
         void collapseSections(const css::uno::Sequence< css::beans::PropertyValue>& _aCollpasedSections);
 
         /** align all marked objects in all sections
-        *
-        * \param eHor
-        * \param eVert
-        * \param bBoundRects
         */
-        void alignMarkedObjects(sal_Int32 _nControlModification, bool _bAlignAtSection, bool bBoundRects = false);
+        void alignMarkedObjects(sal_Int32 _nControlModification, bool _bAlignAtSection);
 
         sal_uInt32 getMarkedObjectCount() const;
 
diff --git a/reportdesign/source/ui/report/ScrollHelper.cxx b/reportdesign/source/ui/report/ScrollHelper.cxx
index b91cf7e..1692073 100644
--- a/reportdesign/source/ui/report/ScrollHelper.cxx
+++ b/reportdesign/source/ui/report/ScrollHelper.cxx
@@ -347,9 +347,9 @@ bool OScrollWindowHelper::Notify( NotifyEvent& rNEvt )
     return OScrollWindowHelper_BASE::Notify(rNEvt);
 }
 
-void OScrollWindowHelper::alignMarkedObjects(sal_Int32 _nControlModification,bool _bAlignAtSection, bool bBoundRects)
+void OScrollWindowHelper::alignMarkedObjects(sal_Int32 _nControlModification,bool _bAlignAtSection)
 {
-    m_aReportWindow->alignMarkedObjects(_nControlModification, _bAlignAtSection, bBoundRects);
+    m_aReportWindow->alignMarkedObjects(_nControlModification, _bAlignAtSection);
 }
 
 void OScrollWindowHelper::ImplInitSettings()
diff --git a/sd/source/ui/slidesorter/controller/SlsClipboard.cxx b/sd/source/ui/slidesorter/controller/SlsClipboard.cxx
index 3d0cf86..7df784f 100644
--- a/sd/source/ui/slidesorter/controller/SlsClipboard.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsClipboard.cxx
@@ -225,7 +225,7 @@ void Clipboard::DoCut ()
     }
 }
 
-void Clipboard::DoDelete (vcl::Window* )
+void Clipboard::DoDelete()
 {
     if (mrSlideSorter.GetModel().GetPageCount() > 1)
     {
@@ -233,9 +233,9 @@ void Clipboard::DoDelete (vcl::Window* )
     }
 }
 
-void Clipboard::DoCopy (vcl::Window* pWindow )
+void Clipboard::DoCopy ()
 {
-    CreateSlideTransferable( pWindow, false );
+    CreateSlideTransferable( nullptr, false );
 }
 
 void Clipboard::DoPaste ()
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsClipboard.hxx b/sd/source/ui/slidesorter/inc/controller/SlsClipboard.hxx
index 8e3cb04..53217e2 100644
--- a/sd/source/ui/slidesorter/inc/controller/SlsClipboard.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlsClipboard.hxx
@@ -74,10 +74,10 @@ public:
 
     void DoCut ();
     // Exported for unit test
-    SD_DLLPUBLIC void DoCopy(vcl::Window* pWindow = nullptr);
+    SD_DLLPUBLIC void DoCopy();
     // Exported for unit test
     SD_DLLPUBLIC void DoPaste();
-    void DoDelete (vcl::Window* pWindow = nullptr);
+    void DoDelete ();
 
     void StartDrag (
         const Point& rDragPt,


More information about the Libreoffice-commits mailing list