basic/source/inc/iosys.hxx                            |    2 -
 basic/source/runtime/iosys.cxx                        |   10 ++-----
 chart2/source/view/inc/PlottingPositionHelper.hxx     |    7 +----
 compilerplugins/clang/unuseddefaultparams.py          |    4 ++-
 connectivity/source/commontools/dbexception.cxx       |    4 +--
 connectivity/source/commontools/sqlerror.cxx          |   12 ++++-----
 dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx  |    7 +++--
 dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx |    6 ++--
 dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx |    2 -
 include/connectivity/dbexception.hxx                  |    4 ---
 include/connectivity/sqlerror.hxx                     |   24 ++----------------
 include/dbaccess/dbsubcomponentcontroller.hxx         |    5 ---
 include/sfx2/childwin.hxx                             |    3 --
 include/svl/itemset.hxx                               |    2 -
 include/vcl/menu.hxx                                  |    3 --
 include/vcl/outdev.hxx                                |    5 +--
 sfx2/source/appl/childwin.cxx                         |    5 ---
 svl/source/items/itemset.cxx                          |   11 +-------
 vcl/source/outdev/text.cxx                            |   12 +++------
 vcl/source/window/menu.cxx                            |    5 +--
 20 files changed, 45 insertions(+), 88 deletions(-)

New commits:
commit 37a6bafea8416541d7d250d66a9e951400b197a3
Author: Noel Grandin <n...@peralex.com>
Date:   Fri Mar 4 14:51:52 2016 +0200

    loplugin:unuseddefaultparam in various
    
    Change-Id: I03d7381aad055cbe9bd905e4082586073f4112e0
    Reviewed-on: https://gerrit.libreoffice.org/22900
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Noel Grandin <noelgran...@gmail.com>

diff --git a/basic/source/inc/iosys.hxx b/basic/source/inc/iosys.hxx
index 0902407..151bdf1 100644
--- a/basic/source/inc/iosys.hxx
+++ b/basic/source/inc/iosys.hxx
@@ -64,7 +64,7 @@ public:
     SbError Close();
     SbError Read(OString&, sal_uInt16 = 0, bool bForceReadingPerByte=false);
     SbError Read( char& );
-    SbError Write( const OString&, sal_uInt16 = 0 );
+    SbError Write( const OString& );
 
     bool IsText() const     { return !bool(nMode & SbiStreamFlags::Binary); }
     bool IsRandom() const   { return bool(nMode & SbiStreamFlags::Random); }
diff --git a/basic/source/runtime/iosys.cxx b/basic/source/runtime/iosys.cxx
index e7c8908..46c90be 100644
--- a/basic/source/runtime/iosys.cxx
+++ b/basic/source/runtime/iosys.cxx
@@ -715,7 +715,7 @@ namespace
     }
 }
 
-SbError SbiStream::Write( const OString& rBuf, sal_uInt16 n )
+SbError SbiStream::Write( const OString& rBuf )
 {
     ExpandFile();
     if( IsAppend() )
@@ -741,15 +741,11 @@ SbError SbiStream::Write( const OString& rBuf, sal_uInt16 
n )
     }
     else
     {
-        if( !n )
-        {
-            n = nLen;
-        }
-        if( !n )
+        if( !nLen )
         {
             return nError = ERRCODE_BASIC_BAD_RECORD_LENGTH;
         }
-        pStrm->Write(rBuf.getStr(), n);
+        pStrm->Write(rBuf.getStr(), nLen);
         MapError();
     }
     return nError;
diff --git a/chart2/source/view/inc/PlottingPositionHelper.hxx 
b/chart2/source/view/inc/PlottingPositionHelper.hxx
index c4ddffe..65ed69e 100644
--- a/chart2/source/view/inc/PlottingPositionHelper.hxx
+++ b/chart2/source/view/inc/PlottingPositionHelper.hxx
@@ -59,7 +59,7 @@ public:
 
     inline bool   isStrongLowerRequested( sal_Int32 nDimensionIndex ) const;
     inline bool   isLogicVisible( double fX, double fY, double fZ ) const;
-    inline void   doLogicScaling( double* pX, double* pY, double* pZ, bool 
bClip=false ) const;
+    inline void   doLogicScaling( double* pX, double* pY, double* pZ ) const;
     inline void   doUnshiftedLogicScaling( double* pX, double* pY, double* pZ 
) const;
     inline void   clipLogicValues( double* pX, double* pY, double* pZ ) const;
            void   clipScaledLogicValues( double* pX, double* pY, double* pZ ) 
const;
@@ -300,11 +300,8 @@ bool PlottingPositionHelper::isLogicVisible(
         && fZ >= m_aScales[2].Minimum && ( isStrongLowerRequested(2) ? fZ < 
m_aScales[2].Maximum : fZ <= m_aScales[2].Maximum );
 }
 
-void PlottingPositionHelper::doLogicScaling( double* pX, double* pY, double* 
pZ, bool bClip ) const
+void PlottingPositionHelper::doLogicScaling( double* pX, double* pY, double* 
pZ ) const
 {
-    if(bClip)
-        this->clipLogicValues( pX,pY,pZ );
-
     if(pX)
     {
         if( m_aScales[0].Scaling.is())
diff --git a/compilerplugins/clang/unuseddefaultparams.py 
b/compilerplugins/clang/unuseddefaultparams.py
index 7fdce2c..0390821 100755
--- a/compilerplugins/clang/unuseddefaultparams.py
+++ b/compilerplugins/clang/unuseddefaultparams.py
@@ -10,7 +10,9 @@ callSet = set()
 
 # things we need to exclude for reasons like :
 # - it's a weird template thingy that confuses the plugin
-exclusionSet = set()
+exclusionSet = set([
+    "class boost::intrusive_ptr<class FontCharMap> 
FontCharMap::GetDefaultMap(_Bool)"
+])
 
 # clang does not always use exactly the same numbers in the type-parameter 
vars it generates
 # so I need to substitute them to ensure we can match correctly.
diff --git a/connectivity/source/commontools/dbexception.cxx 
b/connectivity/source/commontools/dbexception.cxx
index 04a71ee..15816a2 100644
--- a/connectivity/source/commontools/dbexception.cxx
+++ b/connectivity/source/commontools/dbexception.cxx
@@ -185,12 +185,12 @@ SQLExceptionInfo::operator const 
::com::sun::star::sdb::SQLContext*() const
 }
 
 
-void SQLExceptionInfo::prepend( const OUString& _rErrorMessage, const 
OUString& _rSQLState )
+void SQLExceptionInfo::prepend( const OUString& _rErrorMessage )
 {
     SQLException aException;
     aException.Message = _rErrorMessage;
     aException.ErrorCode = 0;
-    aException.SQLState = !_rSQLState.isEmpty() ? _rSQLState : "S1000";
+    aException.SQLState = "S1000";
     aException.NextException = m_aContent;
     m_aContent <<= aException;
 
diff --git a/connectivity/source/commontools/sqlerror.cxx 
b/connectivity/source/commontools/sqlerror.cxx
index 8054c59..949cba5 100644
--- a/connectivity/source/commontools/sqlerror.cxx
+++ b/connectivity/source/commontools/sqlerror.cxx
@@ -293,9 +293,9 @@ namespace connectivity
     }
 
 
-    OUString SQLError::getErrorMessage( const ErrorCondition _eCondition, 
const ParamValue& _rParamValue1, const ParamValue& _rParamValue2 ) const
+    OUString SQLError::getErrorMessage( const ErrorCondition _eCondition, 
const ParamValue& _rParamValue1 ) const
     {
-        return m_pImpl->getErrorMessage( _eCondition, _rParamValue1, 
_rParamValue2, ParamValue() );
+        return m_pImpl->getErrorMessage( _eCondition, _rParamValue1, 
ParamValue(), ParamValue() );
     }
 
 
@@ -311,16 +311,16 @@ namespace connectivity
     }
 
 
-    void SQLError::raiseException( const ErrorCondition _eCondition, const 
ParamValue& _rParamValue1, const ParamValue& _rParamValue2 ) const
+    void SQLError::raiseException( const ErrorCondition _eCondition, const 
ParamValue& _rParamValue1 ) const
     {
-        m_pImpl->raiseException( _eCondition, _rParamValue1, _rParamValue2, 
ParamValue() );
+        m_pImpl->raiseException( _eCondition, _rParamValue1, ParamValue(), 
ParamValue() );
     }
 
 
     void SQLError::raiseTypedException( const ErrorCondition _eCondition, 
const Reference< XInterface >& _rxContext,
-        const Type& _rExceptionType, const ParamValue& _rParamValue1, const 
ParamValue& _rParamValue2 ) const
+        const Type& _rExceptionType, const ParamValue& _rParamValue1 ) const
     {
-        m_pImpl->raiseTypedException( _eCondition, _rxContext, 
_rExceptionType, _rParamValue1, _rParamValue2, ParamValue() );
+        m_pImpl->raiseTypedException( _eCondition, _rxContext, 
_rExceptionType, _rParamValue1, ParamValue(), ParamValue() );
     }
 
 
diff --git a/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx 
b/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
index 3d0a423..f0f5eee 100644
--- a/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
+++ b/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
@@ -372,10 +372,11 @@ namespace dbaui
             DBSubComponentController_Base::disposing( _rSource );
     }
 
-    void DBSubComponentController::appendError( const OUString& 
_rErrorMessage, const ::dbtools::StandardSQLState _eSQLState )
+    void DBSubComponentController::appendError( const OUString& _rErrorMessage 
)
     {
-        m_pImpl->m_aCurrentError.append( 
::dbtools::SQLExceptionInfo::TYPE::SQLException, _rErrorMessage, 
getStandardSQLState( _eSQLState ),
-            1000 );
+        m_pImpl->m_aCurrentError.append( 
::dbtools::SQLExceptionInfo::TYPE::SQLException, _rErrorMessage,
+                                        getStandardSQLState( 
::dbtools::StandardSQLState::GENERAL_ERROR ),
+                                        1000 );
     }
     void DBSubComponentController::clearError()
     {
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx 
b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
index d6d22bb..5442ba4 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
@@ -1534,7 +1534,7 @@ void OSelectionBrowseBox::InsertColumn(OTableFieldDescRef 
pEntry, sal_uInt16& _n
     invalidateUndoRedo();
 }
 
-OTableFieldDescRef OSelectionBrowseBox::InsertField(const OJoinExchangeData& 
jxdSource, sal_uInt16 _nColumnPosition, bool bVis)
+OTableFieldDescRef OSelectionBrowseBox::InsertField(const OJoinExchangeData& 
jxdSource, sal_uInt16 _nColumnPosition)
 {
     OQueryTableWindow* pSourceWin = 
static_cast<OQueryTableWindow*>(jxdSource.pListBox->GetTabWin());
     if (!pSourceWin)
@@ -1553,9 +1553,9 @@ OTableFieldDescRef OSelectionBrowseBox::InsertField(const 
OJoinExchangeData& jxd
     aInfo->SetAlias(pSourceWin->GetAliasName());
 
     aInfo->SetDataType(pInf->GetDataType());
-    aInfo->SetVisible(bVis);
+    aInfo->SetVisible();
 
-    return InsertField(aInfo, _nColumnPosition, bVis);
+    return InsertField(aInfo, _nColumnPosition);
 }
 
 OTableFieldDescRef OSelectionBrowseBox::InsertField(const OTableFieldDescRef& 
_rInfo, sal_uInt16 _nColumnPosition, bool bVis, bool bActivate)
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx 
b/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx
index 6f80ff7..04a87c3 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx
@@ -82,7 +82,7 @@ namespace dbaui
         virtual void                dispose() override;
 
         void                        initialize();
-        OTableFieldDescRef          InsertField( const OJoinExchangeData& 
jxdSource, sal_uInt16 _nColumnPosition = BROWSER_INVALIDID, bool bVis=true );
+        OTableFieldDescRef          InsertField( const OJoinExchangeData& 
jxdSource, sal_uInt16 _nColumnPosition = BROWSER_INVALIDID );
         OTableFieldDescRef          InsertField( const OTableFieldDescRef& 
rInfo, sal_uInt16 _nColumnPosition = BROWSER_INVALIDID, bool bVis=true, bool 
bActivate=true );
         void                        InsertColumn( OTableFieldDescRef pEntry, 
sal_uInt16& _nColumnPosition );
         void                        RemoveColumn( sal_uInt16 _nColumnId );
diff --git a/include/connectivity/dbexception.hxx 
b/include/connectivity/dbexception.hxx
index e524c84..eb8bee3 100644
--- a/include/connectivity/dbexception.hxx
+++ b/include/connectivity/dbexception.hxx
@@ -91,10 +91,8 @@ public:
     /** prepends a plain error message to the chain of exceptions
         @param  _rSimpleErrorMessage
             the error message to prepend
-        @param  _rSQLState
-            the SQLState of the to-be-constructed SQLException, or NULL if 
this should be defaulted to HY000
     */
-    void    prepend( const OUString& _rErrorMessage, const OUString& 
_rSQLState = OUString() );
+    void    prepend( const OUString& _rErrorMessage );
 
     /** appends a plain message to the chain of exceptions
         @param  _eType
diff --git a/include/connectivity/sqlerror.hxx 
b/include/connectivity/sqlerror.hxx
index 87ff66f..06cc145 100644
--- a/include/connectivity/sqlerror.hxx
+++ b/include/connectivity/sqlerror.hxx
@@ -103,17 +103,11 @@ namespace connectivity
                 will happen, and <code>_rParamValue2</code> and 
<code>_rParamValue3</code> will be
                 ignored.
 
-            @param _rParamValue2
-                the value which the placeholder $2$ should be replaced with. 
If this value is
-                not present (see <code>::boost::optional::operator !</code>), 
then no replacement
-                will happen, and <code>_rParamValue3</code> will be ignored.
-
             @see css::sdb::ErrorCondition
         */
         OUString getErrorMessage(
                             const ErrorCondition _eCondition,
-                            const ParamValue& _rParamValue1 = ParamValue(),
-                            const ParamValue& _rParamValue2 = ParamValue()
+                            const ParamValue& _rParamValue1 = ParamValue()
                         ) const;
 
         /** returns the error code associated with a given error condition
@@ -193,18 +187,12 @@ namespace connectivity
                 which is associated with <arg>_eCondition</arg>, replacing the 
first placeholder
                 in this message.
 
-            @param _rParamValue2
-                a runtime-dependent value which should be filled into the 
error message
-                which is associated with <arg>_eCondition</arg>, replacing the 
second placeholder
-                in this message.
-
             @see getErrorMessage
             @see getErrorCode
         */
         void            raiseException(
                             const ErrorCondition _eCondition,
-                            const ParamValue& _rParamValue1 = ParamValue(),
-                            const ParamValue& _rParamValue2 = ParamValue()
+                            const ParamValue& _rParamValue1 = ParamValue()
                         ) const;
 
         /** raises a typed exception, that is, a UNO exception which is 
derived from
@@ -226,11 +214,6 @@ namespace connectivity
                 which is associated with <arg>_eCondition</arg>, replacing the 
first placeholder
                 in this message.
 
-            @param _rParamValue2
-                a runtime-dependent value which should be filled into the 
error message
-                which is associated with <arg>_eCondition</arg>, replacing the 
second placeholder
-                in this message.
-
             @throws ::std::bad_cast
                 if <arg>_rExceptionType</arg> does not specify an exception 
class derived from
                 css::sdbc::SQLException.
@@ -242,8 +225,7 @@ namespace connectivity
                             const ErrorCondition _eCondition,
                             const css::uno::Reference< css::uno::XInterface >& 
_rxContext,
                             const css::uno::Type& _rExceptionType,
-                            const ParamValue& _rParamValue1 = ParamValue(),
-                            const ParamValue& _rParamValue2 = ParamValue()
+                            const ParamValue& _rParamValue1 = ParamValue()
                         ) const;
 
         /** retrieves an <code>SQLException</code> object which contains 
information about
diff --git a/include/dbaccess/dbsubcomponentcontroller.hxx 
b/include/dbaccess/dbsubcomponentcontroller.hxx
index b9c9b28..6bc86be 100644
--- a/include/dbaccess/dbsubcomponentcontroller.hxx
+++ b/include/dbaccess/dbsubcomponentcontroller.hxx
@@ -105,10 +105,7 @@ namespace dbaui
 
         /** appends an error in the current environment.
         */
-        void appendError(
-                        const OUString& _rErrorMessage,
-                        const ::dbtools::StandardSQLState _eSQLState = 
::dbtools::StandardSQLState::GENERAL_ERROR
-                     );
+        void appendError( const OUString& _rErrorMessage );
 
         /** clears the error state.
         */
diff --git a/include/sfx2/childwin.hxx b/include/sfx2/childwin.hxx
index ce9bf91..bea7e9c 100644
--- a/include/sfx2/childwin.hxx
+++ b/include/sfx2/childwin.hxx
@@ -77,8 +77,7 @@ struct SAL_DLLPUBLIC_RTTI SfxChildWinInfo
                             nFlags = SfxChildWindowFlags::NONE;
                         }
     bool                GetExtraData_Impl( SfxChildAlignment    *pAlign,
-                                           SfxChildAlignment    *pLastAlign = 
nullptr,
-                                           Size                 *pSize = 
nullptr ) const;
+                                           SfxChildAlignment    *pLastAlign = 
nullptr ) const;
 };
 
 // ChildWindow factory methods
diff --git a/include/svl/itemset.hxx b/include/svl/itemset.hxx
index ac3ea8d..adfcf06 100644
--- a/include/svl/itemset.hxx
+++ b/include/svl/itemset.hxx
@@ -146,7 +146,7 @@ public:
     void                        MergeRange( sal_uInt16 nFrom, sal_uInt16 nTo );
     const SfxItemSet*           GetParent() const { return m_pParent; }
 
-    void                        Load( SvStream &, bool bDirect = false );
+    void                        Load( SvStream & );
     void                        Store( SvStream &, bool bDirect = false ) 
const;
 
     bool                        operator==(const SfxItemSet &) const;
diff --git a/include/vcl/menu.hxx b/include/vcl/menu.hxx
index 4b1682f..73e5c4d 100644
--- a/include/vcl/menu.hxx
+++ b/include/vcl/menu.hxx
@@ -250,8 +250,7 @@ public:
                     sal_uInt16 nPos = MENU_APPEND);
     void InsertItem(const ResId& rResId);
     void InsertItem(const OUString& rCommand,
-                    const css::uno::Reference<css::frame::XFrame>& rFrame,
-                    MenuItemBits nBits = MenuItemBits::NONE);
+                    const css::uno::Reference<css::frame::XFrame>& rFrame);
     void InsertSeparator(const OString &rIdent = OString(), sal_uInt16 nPos = 
MENU_APPEND);
     void RemoveItem( sal_uInt16 nPos );
     void CopyItem(const Menu& rMenu, sal_uInt16 nPos );
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index 007c985..2d8eeec 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -1130,7 +1130,7 @@ public:
     OUString                    GetEllipsisString( const OUString& rStr, long 
nMaxWidth,
                                                    DrawTextFlags nStyle = 
DrawTextFlags::EndEllipsis ) const;
 
-    long                        GetCtrlTextWidth( const OUString& rStr, 
sal_Int32 nIndex = 0 ) const;
+    long                        GetCtrlTextWidth( const OUString& rStr ) const;
 
     static OUString             GetNonMnemonicString( const OUString& rStr, 
sal_Int32& rMnemonicPos );
 
@@ -1195,8 +1195,7 @@ public:
                                               vcl::TextLayoutCache const* = 
nullptr) const;
 
     bool                        GetCaretPositions( const OUString&, long* 
pCaretXArray,
-                                              sal_Int32 nIndex, sal_Int32 nLen,
-                                              long* pDXAry = nullptr ) const;
+                                              sal_Int32 nIndex, sal_Int32 nLen 
) const;
     void                        DrawStretchText( const Point& rStartPt, 
sal_uLong nWidth,
                                                  const OUString& rStr,
                                                  sal_Int32 nIndex = 0, 
sal_Int32 nLen = -1);
diff --git a/sfx2/source/appl/childwin.cxx b/sfx2/source/appl/childwin.cxx
index a616833..87e70ee 100644
--- a/sfx2/source/appl/childwin.cxx
+++ b/sfx2/source/appl/childwin.cxx
@@ -578,8 +578,7 @@ bool SfxChildWindow::WantsFocus() const
 bool SfxChildWinInfo::GetExtraData_Impl
 (
     SfxChildAlignment   *pAlign,
-    SfxChildAlignment   *pLastAlign,
-    Size                *pSize
+    SfxChildAlignment   *pLastAlign
 )   const
 {
     // invalid?
@@ -628,8 +627,6 @@ bool SfxChildWinInfo::GetExtraData_Impl
     Size aChildSize;
     if ( GetPosSizeFromString( aStr, aChildPos, aChildSize ) )
     {
-        if ( pSize )
-            *pSize = aChildSize;
         return true;
     }
     return false;
diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx
index d55bfa6..6a28a9f 100644
--- a/svl/source/items/itemset.cxx
+++ b/svl/source/items/itemset.cxx
@@ -1314,14 +1314,7 @@ void SfxItemSet::Store
  */
 void SfxItemSet::Load
 (
-    SvStream&           rStream,    //  Stream we're loading from
-
-    bool                bDirect     /*  true
-                                        Items are directly read form the stream
-                                        and not via Surrogates
-
-                                        false (default)
-                                        Items are read via Surrogates */
+    SvStream&           rStream    //  Stream we're loading from
 )
 {
     assert(m_pPool);
@@ -1346,7 +1339,7 @@ void SfxItemSet::Load
     {
         // Load Surrogate/Item and resolve Surrogate
         const SfxPoolItem *pItem =
-                m_pPool->LoadItem( rStream, bDirect, pRefPool );
+                m_pPool->LoadItem( rStream, false/*bDirect*/, pRefPool );
 
         // Did we load an Item or resolve a Surrogate?
         if ( pItem )
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index 3a94f8d..711196f 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -1092,8 +1092,7 @@ long OutputDevice::GetTextArray( const OUString& rStr, 
long* pDXAry,
 }
 
 bool OutputDevice::GetCaretPositions( const OUString& rStr, long* pCaretXArray,
-                                      sal_Int32 nIndex, sal_Int32 nLen,
-                                      long* pDXAry ) const
+                                      sal_Int32 nIndex, sal_Int32 nLen ) const
 {
 
     if( nIndex >= rStr.getLength() )
@@ -1102,8 +1101,7 @@ bool OutputDevice::GetCaretPositions( const OUString& 
rStr, long* pCaretXArray,
         nLen = rStr.getLength() - nIndex;
 
     // layout complex text
-    SalLayout* pSalLayout = ImplLayout( rStr, nIndex, nLen,
-                                        Point(0,0), 0, pDXAry );
+    SalLayout* pSalLayout = ImplLayout( rStr, nIndex, nLen, Point(0,0) );
     if( !pSalLayout )
         return false;
 
@@ -2282,10 +2280,10 @@ void OutputDevice::DrawCtrlText( const Point& rPos, 
const OUString& rStr,
         mpAlphaVDev->DrawCtrlText( rPos, rStr, nIndex, nLen, nStyle, pVector, 
pDisplayText );
 }
 
-long OutputDevice::GetCtrlTextWidth( const OUString& rStr,
-                                     sal_Int32 nIndex ) const
+long OutputDevice::GetCtrlTextWidth( const OUString& rStr ) const
 {
-    sal_Int32 nLen = rStr.getLength() - nIndex;
+    sal_Int32 nLen = rStr.getLength();
+    sal_Int32 nIndex = 0;
 
     sal_Int32  nMnemonicPos;
     OUString   aStr = GetNonMnemonicString( rStr, nMnemonicPos );
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 95f3f4a..8d5bb2a 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -527,8 +527,7 @@ void Menu::InsertItem( const ResId& rResId )
     mpLayoutData = nullptr;
 }
 
-void Menu::InsertItem(const OUString& rCommand, const 
css::uno::Reference<css::frame::XFrame>& rFrame,
-                      MenuItemBits nBits)
+void Menu::InsertItem(const OUString& rCommand, const 
css::uno::Reference<css::frame::XFrame>& rFrame)
 {
     OUString 
aLabel(CommandInfoProvider::Instance().GetPopupLabelForCommand(rCommand, 
rFrame));
     OUString 
aTooltip(CommandInfoProvider::Instance().GetTooltipForCommand(rCommand, 
rFrame));
@@ -536,7 +535,7 @@ void Menu::InsertItem(const OUString& rCommand, const 
css::uno::Reference<css::f
 
     sal_uInt16 nItemId = GetItemCount() + 1;
 
-    InsertItem(nItemId, aLabel, aImage, nBits, OString());
+    InsertItem(nItemId, aLabel, aImage, MenuItemBits::NONE, OString());
     SetItemCommand(nItemId, rCommand);
     SetHelpText(nItemId, aTooltip);
 }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to