summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-10-31 09:47:39 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-10-31 13:29:03 +0100
commit7383ab517030db0c2d7bf4f393f38743fbcaba04 (patch)
tree7d984b86256ea53d10d305d3ce392dca68b59347 /framework
parent29adb38857d1b1cfb486d5da958b12895a1e6120 (diff)
loplugin:constantparam in f*
Change-Id: I87145db3af6c3eb180cea6b4244f98b00205a306 Reviewed-on: https://gerrit.libreoffice.org/44095 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'framework')
-rw-r--r--framework/source/dispatch/closedispatcher.cxx4
-rw-r--r--framework/source/inc/pattern/frame.hxx9
-rw-r--r--framework/source/uielement/menubarmanager.cxx10
3 files changed, 5 insertions, 18 deletions
diff --git a/framework/source/dispatch/closedispatcher.cxx b/framework/source/dispatch/closedispatcher.cxx
index 2d89836b3453..2055cdc5d517 100644
--- a/framework/source/dispatch/closedispatcher.cxx
+++ b/framework/source/dispatch/closedispatcher.cxx
@@ -465,7 +465,7 @@ bool CloseDispatcher::implts_prepareFrameForClosing(const css::uno::Reference< c
size_t i = 0;
for (i=0; i<c; ++i)
{
- if (!fpf::closeIt(aCheck.m_lModelFrames[i], false))
+ if (!fpf::closeIt(aCheck.m_lModelFrames[i]))
return false;
}
}
@@ -502,7 +502,7 @@ bool CloseDispatcher::implts_closeFrame()
// don't deliver ownership; our "UI user" will try it again if it failed.
// OK - he will get an empty frame then. But normally an empty frame
// should be closeable always :-)
- if (!fpf::closeIt(xFrame, false))
+ if (!fpf::closeIt(xFrame))
return false;
{
diff --git a/framework/source/inc/pattern/frame.hxx b/framework/source/inc/pattern/frame.hxx
index 79d8dabe9c53..5a8a6c005d48 100644
--- a/framework/source/inc/pattern/frame.hxx
+++ b/framework/source/inc/pattern/frame.hxx
@@ -48,15 +48,10 @@ namespace framework{
@param xResource
the object, which should be closed here.
- @param bDelegateOwnership
- used at the XCloseable->close() method to define
- the right owner in case closing failed.
-
@return [bool]
sal_True if closing failed.
*/
-inline bool closeIt(const css::uno::Reference< css::uno::XInterface >& xResource ,
- bool bDelegateOwnership)
+inline bool closeIt(const css::uno::Reference< css::uno::XInterface >& xResource)
{
css::uno::Reference< css::util::XCloseable > xClose (xResource, css::uno::UNO_QUERY);
css::uno::Reference< css::lang::XComponent > xDispose(xResource, css::uno::UNO_QUERY);
@@ -64,7 +59,7 @@ inline bool closeIt(const css::uno::Reference< css::uno::XInterface >& xResource
try
{
if (xClose.is())
- xClose->close(bDelegateOwnership);
+ xClose->close(false/*bDelegateOwnership*/);
else
if (xDispose.is())
xDispose->dispose();
diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx
index e47217a8faf1..3d336f00bf53 100644
--- a/framework/source/uielement/menubarmanager.cxx
+++ b/framework/source/uielement/menubarmanager.cxx
@@ -95,14 +95,6 @@ namespace framework
#define aCmdHelpMenu ".uno:HelpMenu"
#define aSpecialWindowCommand ".uno:WindowList"
-static sal_Int16 getImageTypeFromBools( bool bBig )
-{
- sal_Int16 n( 0 );
- if ( bBig )
- n |= css::ui::ImageType::SIZE_LARGE;
- return n;
-}
-
MenuBarManager::MenuBarManager(
const Reference< XComponentContext >& rxContext,
const Reference< XFrame >& rFrame,
@@ -260,7 +252,7 @@ void SAL_CALL MenuBarManager::elementInserted( const css::ui::ConfigurationEvent
return;
sal_Int16 nImageType = sal_Int16();
- sal_Int16 nCurrentImageType = getImageTypeFromBools( false );
+ sal_Int16 nCurrentImageType = css::ui::ImageType::SIZE_LARGE;
if (( Event.aInfo >>= nImageType ) &&
( nImageType == nCurrentImageType ))
RequestImages();