[Libreoffice-commits] core.git: avmedia/source basctl/source basegfx/source canvas/source codemaker/source extensions/source hwpfilter/source i18nlangtag/source include/avmedia include/canvas include/codemaker include/i18nlangtag
Noel Grandin
noel at peralex.com
Thu Mar 3 11:40:20 UTC 2016
avmedia/source/viewer/mediawindow.cxx | 6 +----
basctl/source/inc/dlged.hxx | 2 -
basegfx/source/inc/stringconversiontools.hxx | 5 +---
canvas/source/tools/elapsedtime.cxx | 2 -
codemaker/source/codemaker/global.cxx | 13 ++----------
extensions/source/bibliography/toolbar.cxx | 4 +--
extensions/source/bibliography/toolbar.hxx | 2 -
extensions/source/dbpilots/controlwizard.cxx | 10 +++------
extensions/source/dbpilots/controlwizard.hxx | 6 +----
extensions/source/propctrlr/propertyeditor.cxx | 4 +--
extensions/source/propctrlr/propertyeditor.hxx | 2 -
extensions/source/propctrlr/propertyhandler.hxx | 7 ++----
extensions/source/update/check/download.cxx | 4 +--
hwpfilter/source/hwpreader.cxx | 4 +--
hwpfilter/source/hwpreader.hxx | 2 -
i18nlangtag/source/languagetag/languagetag.cxx | 26 +++++-------------------
include/avmedia/mediawindow.hxx | 2 -
include/canvas/elapsedtime.hxx | 7 ------
include/codemaker/global.hxx | 3 --
include/i18nlangtag/languagetag.hxx | 18 ++++++----------
20 files changed, 45 insertions(+), 84 deletions(-)
New commits:
commit 5adde1bf69828da955f5f8ae8d36a4bd52eee055
Author: Noel Grandin <noel at peralex.com>
Date: Thu Mar 3 13:04:59 2016 +0200
loplugin:unuseddefaultparams various
Change-Id: Ibf8489c957b307156689de4c7cb8440ddd4e4546
Reviewed-on: https://gerrit.libreoffice.org/22852
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
diff --git a/avmedia/source/viewer/mediawindow.cxx b/avmedia/source/viewer/mediawindow.cxx
index 5fd94ee..f28db42 100644
--- a/avmedia/source/viewer/mediawindow.cxx
+++ b/avmedia/source/viewer/mediawindow.cxx
@@ -368,8 +368,7 @@ uno::Reference< media::XPlayer > MediaWindow::createPlayer( const OUString& rURL
uno::Reference< graphic::XGraphic > MediaWindow::grabFrame( const OUString& rURL,
const OUString& rReferer,
- const OUString& sMimeType,
- double fMediaTime )
+ const OUString& sMimeType )
{
uno::Reference< media::XPlayer > xPlayer( createPlayer( rURL, rReferer, &sMimeType ) );
uno::Reference< graphic::XGraphic > xRet;
@@ -381,8 +380,7 @@ uno::Reference< graphic::XGraphic > MediaWindow::grabFrame( const OUString& rURL
if( xGrabber.is() )
{
- if( AVMEDIA_FRAMEGRABBER_DEFAULTFRAME == fMediaTime )
- fMediaTime = AVMEDIA_FRAMEGRABBER_DEFAULTFRAME_MEDIATIME;
+ double fMediaTime = AVMEDIA_FRAMEGRABBER_DEFAULTFRAME_MEDIATIME;
if( fMediaTime >= xPlayer->getDuration() )
fMediaTime = ( xPlayer->getDuration() * 0.5 );
diff --git a/basctl/source/inc/dlged.hxx b/basctl/source/inc/dlged.hxx
index 997d416..958aa1d 100644
--- a/basctl/source/inc/dlged.hxx
+++ b/basctl/source/inc/dlged.hxx
@@ -175,7 +175,7 @@ public:
bool UnmarkDialog();
bool RemarkDialog();
- void SetDialogModelChanged (bool bChanged = true) { bDialogModelChanged = bChanged; }
+ void SetDialogModelChanged() { bDialogModelChanged = true; }
bool IsModified () const;
void ClearModifyFlag();
diff --git a/basegfx/source/inc/stringconversiontools.hxx b/basegfx/source/inc/stringconversiontools.hxx
index 26fabdb..c23fb50 100644
--- a/basegfx/source/inc/stringconversiontools.hxx
+++ b/basegfx/source/inc/stringconversiontools.hxx
@@ -49,10 +49,9 @@ namespace basegfx
inline bool isOnNumberChar(const OUString& rStr,
const sal_Int32 nPos,
- bool bSignAllowed = true,
- bool bDotAllowed = true)
+ bool bSignAllowed = true)
{
- return isOnNumberChar(rStr[nPos], bSignAllowed, bDotAllowed);
+ return isOnNumberChar(rStr[nPos], bSignAllowed);
}
bool getDoubleChar(double& o_fRetval,
diff --git a/canvas/source/tools/elapsedtime.cxx b/canvas/source/tools/elapsedtime.cxx
index bde8032..d096064 100644
--- a/canvas/source/tools/elapsedtime.cxx
+++ b/canvas/source/tools/elapsedtime.cxx
@@ -142,7 +142,7 @@ void ElapsedTime::reset()
m_bInHoldMode = false;
}
-void ElapsedTime::adjustTimer( double fOffset, bool /*bLimitToLastQueriedTime*/ )
+void ElapsedTime::adjustTimer( double fOffset )
{
// to make getElapsedTime() become _larger_, have to reduce
// m_fStartTime.
diff --git a/codemaker/source/codemaker/global.cxx b/codemaker/source/codemaker/global.cxx
index aa496bd..17ec892 100644
--- a/codemaker/source/codemaker/global.cxx
+++ b/codemaker/source/codemaker/global.cxx
@@ -63,8 +63,7 @@ OString getTempDir(const OString& sFileName)
OString createFileNameFromType( const OString& destination,
const OString& typeName,
const OString& postfix,
- bool bLowerCase,
- const OString& prefix )
+ bool bLowerCase )
{
OString type(typeName.replace('.', '/'));
@@ -82,7 +81,7 @@ OString createFileNameFromType( const OString& destination,
bWithPoint = true;
}
- length += prefix.getLength() + type.getLength() + postfix.getLength();
+ length += type.getLength() + postfix.getLength();
bool bWithSeparator = false;
if (!(destination.endsWith("\\") || destination.endsWith("/"))
@@ -102,13 +101,7 @@ OString createFileNameFromType( const OString& destination,
if (bWithSeparator)
fileNameBuf.append("/", 1);
- OString tmpStr(type);
- if (!prefix.isEmpty())
- {
- tmpStr = type.replaceAt(type.lastIndexOf('/')+1, 0, prefix);
- }
-
- fileNameBuf.append(tmpStr.getStr(), tmpStr.getLength());
+ fileNameBuf.append(type.getStr(), type.getLength());
fileNameBuf.append(postfix.getStr(), postfix.getLength());
OString fileName(fileNameBuf.makeStringAndClear());
diff --git a/extensions/source/bibliography/toolbar.cxx b/extensions/source/bibliography/toolbar.cxx
index cf58128..521ef5a 100644
--- a/extensions/source/bibliography/toolbar.cxx
+++ b/extensions/source/bibliography/toolbar.cxx
@@ -409,9 +409,9 @@ void BibToolBar::UpdateSourceList(bool bFlag)
aLBSource->SetUpdateMode(bFlag);
}
-void BibToolBar::InsertSourceEntry(const OUString& aEntry, sal_Int32 nPos)
+void BibToolBar::InsertSourceEntry(const OUString& aEntry)
{
- aLBSource->InsertEntry(aEntry, nPos);
+ aLBSource->InsertEntry(aEntry);
}
void BibToolBar::SelectSourceEntry(const OUString& aStr)
diff --git a/extensions/source/bibliography/toolbar.hxx b/extensions/source/bibliography/toolbar.hxx
index dd3d4bd..c051912 100644
--- a/extensions/source/bibliography/toolbar.hxx
+++ b/extensions/source/bibliography/toolbar.hxx
@@ -154,7 +154,7 @@ class BibToolBar: public ToolBox
void ClearSourceList();
void UpdateSourceList(bool bFlag=true);
void EnableSourceList(bool bFlag=true);
- void InsertSourceEntry(const OUString&,sal_Int32 nPos=LISTBOX_APPEND );
+ void InsertSourceEntry(const OUString& );
void SelectSourceEntry(const OUString& );
void EnableQuery(bool bFlag=true);
diff --git a/extensions/source/dbpilots/controlwizard.cxx b/extensions/source/dbpilots/controlwizard.cxx
index 2e8f253..f220adb 100644
--- a/extensions/source/dbpilots/controlwizard.cxx
+++ b/extensions/source/dbpilots/controlwizard.cxx
@@ -135,10 +135,9 @@ namespace dbp
}
- void OControlWizardPage::fillListBox(ListBox& _rList, const Sequence< OUString >& _rItems, bool _bClear)
+ void OControlWizardPage::fillListBox(ListBox& _rList, const Sequence< OUString >& _rItems)
{
- if (_bClear)
- _rList.Clear();
+ _rList.Clear();
const OUString* pItems = _rItems.getConstArray();
const OUString* pEnd = pItems + _rItems.getLength();
::svt::WizardTypes::WizardState nPos;
@@ -151,10 +150,9 @@ namespace dbp
}
- void OControlWizardPage::fillListBox(ComboBox& _rList, const Sequence< OUString >& _rItems, bool _bClear)
+ void OControlWizardPage::fillListBox(ComboBox& _rList, const Sequence< OUString >& _rItems)
{
- if (_bClear)
- _rList.Clear();
+ _rList.Clear();
const OUString* pItems = _rItems.getConstArray();
const OUString* pEnd = pItems + _rItems.getLength();
::svt::WizardTypes::WizardState nPos;
diff --git a/extensions/source/dbpilots/controlwizard.hxx b/extensions/source/dbpilots/controlwizard.hxx
index 51ca221..3f2e44d 100644
--- a/extensions/source/dbpilots/controlwizard.hxx
+++ b/extensions/source/dbpilots/controlwizard.hxx
@@ -72,12 +72,10 @@ namespace dbp
protected:
static void fillListBox(
ListBox& _rList,
- const css::uno::Sequence< OUString >& _rItems,
- bool _bClear = true);
+ const css::uno::Sequence< OUString >& _rItems);
static void fillListBox(
ComboBox& _rList,
- const css::uno::Sequence< OUString >& _rItems,
- bool _bClear = true);
+ const css::uno::Sequence< OUString >& _rItems);
protected:
void enableFormDatasourceDisplay();
diff --git a/extensions/source/propctrlr/propertyeditor.cxx b/extensions/source/propctrlr/propertyeditor.cxx
index 0d7113c..fd401e5 100644
--- a/extensions/source/propctrlr/propertyeditor.cxx
+++ b/extensions/source/propctrlr/propertyeditor.cxx
@@ -297,7 +297,7 @@ namespace pcr
}
- void OPropertyEditor::forEachPage( PageOperation _pOperation, const void* _pArgument )
+ void OPropertyEditor::forEachPage( PageOperation _pOperation )
{
sal_uInt16 nCount = m_aTabControl->GetPageCount();
for ( sal_uInt16 i=0; i<nCount; ++i )
@@ -306,7 +306,7 @@ namespace pcr
OBrowserPage* pPage = static_cast< OBrowserPage* >( m_aTabControl->GetTabPage( nID ) );
if ( !pPage )
continue;
- (this->*_pOperation)( *pPage, _pArgument );
+ (this->*_pOperation)( *pPage, nullptr );
}
}
diff --git a/extensions/source/propctrlr/propertyeditor.hxx b/extensions/source/propctrlr/propertyeditor.hxx
index 3a9bf85..6162d3e 100644
--- a/extensions/source/propctrlr/propertyeditor.hxx
+++ b/extensions/source/propctrlr/propertyeditor.hxx
@@ -127,7 +127,7 @@ namespace pcr
void Update(const ::std::mem_fun_t<void,OBrowserListBox>& _aUpdateFunction);
typedef void (OPropertyEditor::*PageOperation)( OBrowserPage&, const void* );
- void forEachPage( PageOperation _pOperation, const void* _pArgument = nullptr );
+ void forEachPage( PageOperation _pOperation );
void setPageLineListener( OBrowserPage& _rPage, const void* );
void setPageControlObserver( OBrowserPage& _rPage, const void* );
diff --git a/extensions/source/propctrlr/propertyhandler.hxx b/extensions/source/propctrlr/propertyhandler.hxx
index 91fa5e2..8af1212 100644
--- a/extensions/source/propctrlr/propertyhandler.hxx
+++ b/extensions/source/propctrlr/propertyhandler.hxx
@@ -165,8 +165,7 @@ namespace pcr
*/
inline void addStringPropertyDescription(
::std::vector< css::beans::Property >& _rProperties,
- const OUString& _rPropertyName,
- sal_Int16 _nAttribs = 0
+ const OUString& _rPropertyName
) const;
/** adds a description for the given int32 property to the given property vector
@@ -304,9 +303,9 @@ namespace pcr
};
- inline void PropertyHandler::addStringPropertyDescription( ::std::vector< css::beans::Property >& _rProperties, const OUString& _rPropertyName, sal_Int16 _nAttribs ) const
+ inline void PropertyHandler::addStringPropertyDescription( ::std::vector< css::beans::Property >& _rProperties, const OUString& _rPropertyName ) const
{
- implAddPropertyDescription( _rProperties, _rPropertyName, ::cppu::UnoType<OUString>::get(), _nAttribs );
+ implAddPropertyDescription( _rProperties, _rPropertyName, ::cppu::UnoType<OUString>::get() );
}
inline void PropertyHandler::addInt32PropertyDescription( ::std::vector< css::beans::Property >& _rProperties, const OUString& _rPropertyName, sal_Int16 _nAttribs ) const
diff --git a/extensions/source/update/check/download.cxx b/extensions/source/update/check/download.cxx
index e2046f9..43320b5 100644
--- a/extensions/source/update/check/download.cxx
+++ b/extensions/source/update/check/download.cxx
@@ -113,12 +113,12 @@ getStringValue(const uno::Reference< container::XNameAccess >& xNameAccess, cons
static inline sal_Int32
getInt32Value(const uno::Reference< container::XNameAccess >& xNameAccess,
- const OUString& aName, sal_Int32 nDefault=-1)
+ const OUString& aName)
{
OSL_ASSERT(xNameAccess->hasByName(aName));
uno::Any aValue = xNameAccess->getByName(aName);
- sal_Int32 n=nDefault;
+ sal_Int32 n = -1;
aValue >>= n;
return n;
}
diff --git a/hwpfilter/source/hwpreader.cxx b/hwpfilter/source/hwpreader.cxx
index e981ce0..e27c4ca 100644
--- a/hwpfilter/source/hwpreader.cxx
+++ b/hwpfilter/source/hwpreader.cxx
@@ -4782,9 +4782,9 @@ void HwpReader::makeOutline(Outline * hbox)
}
-void HwpReader::parsePara(HWPPara * para, bool bParaStart)
+void HwpReader::parsePara(HWPPara * para)
{
-
+ bool bParaStart = false;
while (para)
{
if( para->nch == 1)
diff --git a/hwpfilter/source/hwpreader.hxx b/hwpfilter/source/hwpreader.hxx
index d11870e..8f04e6e 100644
--- a/hwpfilter/source/hwpreader.hxx
+++ b/hwpfilter/source/hwpreader.hxx
@@ -106,7 +106,7 @@ private:
void makeTextDecls();
/* -------- Paragraph Parsing --------- */
- void parsePara(HWPPara *para, bool bParaStart = false);
+ void parsePara(HWPPara *para);
void make_text_p0(HWPPara *para, bool bParaStart = false);
void make_text_p1(HWPPara *para, bool bParaStart = false);
void make_text_p3(HWPPara *para, bool bParaStart = false);
diff --git a/i18nlangtag/source/languagetag/languagetag.cxx b/i18nlangtag/source/languagetag/languagetag.cxx
index 782a7e2..dc8708b 100644
--- a/i18nlangtag/source/languagetag/languagetag.cxx
+++ b/i18nlangtag/source/languagetag/languagetag.cxx
@@ -1012,20 +1012,13 @@ void LanguageTag::resetVars()
}
-LanguageTag & LanguageTag::reset( const OUString & rBcp47LanguageTag, bool bCanonicalize )
+LanguageTag & LanguageTag::reset( const OUString & rBcp47LanguageTag )
{
resetVars();
maBcp47 = rBcp47LanguageTag;
mbSystemLocale = rBcp47LanguageTag.isEmpty();
mbInitializedBcp47 = !mbSystemLocale;
- if (bCanonicalize)
- {
- getImpl()->canonicalize();
- // Registration itself may already have canonicalized, so do an
- // unconditional sync.
- syncFromImpl();
- }
return *this;
}
@@ -2639,17 +2632,13 @@ OUString LanguageTag::convertToBcp47( const css::lang::Locale& rLocale, bool bRe
// static
-OUString LanguageTag::convertToBcp47( LanguageType nLangID, bool bResolveSystem )
+OUString LanguageTag::convertToBcp47( LanguageType nLangID )
{
- // Catch this first so we don't need the rest.
- if (!bResolveSystem && lcl_isSystem( nLangID))
- return OUString();
-
- lang::Locale aLocale( LanguageTag::convertToLocale( nLangID, bResolveSystem));
+ lang::Locale aLocale( LanguageTag::convertToLocale( nLangID ));
// If system for some reason (should not happen.. haha) could not be
// resolved DO NOT CALL LanguageTag::convertToBcp47(Locale) because that
// would recurse into this method here!
- if (aLocale.Language.isEmpty() && bResolveSystem)
+ if (aLocale.Language.isEmpty())
return OUString(); // bad luck, bail out
return LanguageTagImpl::convertToBcp47( aLocale);
}
@@ -2666,12 +2655,9 @@ css::lang::Locale LanguageTag::convertToLocale( const OUString& rBcp47, bool bRe
// static
-LanguageType LanguageTag::convertToLanguageType( const OUString& rBcp47, bool bResolveSystem )
+LanguageType LanguageTag::convertToLanguageType( const OUString& rBcp47 )
{
- if (rBcp47.isEmpty() && !bResolveSystem)
- return LANGUAGE_SYSTEM;
-
- return LanguageTag( rBcp47).getLanguageType( bResolveSystem);
+ return LanguageTag( rBcp47).getLanguageType();
}
diff --git a/include/avmedia/mediawindow.hxx b/include/avmedia/mediawindow.hxx
index 301936b..e20d740 100644
--- a/include/avmedia/mediawindow.hxx
+++ b/include/avmedia/mediawindow.hxx
@@ -106,7 +106,7 @@ namespace avmedia
static css::uno::Reference< css::media::XPlayer > createPlayer( const OUString& rURL, const OUString& rReferer, const OUString* pMimeType = nullptr );
static css::uno::Reference< css::graphic::XGraphic > grabFrame( const OUString& rURL, const OUString& rReferer,
- const OUString& sMimeType, double fMediaTime = AVMEDIA_FRAMEGRABBER_DEFAULTFRAME );
+ const OUString& sMimeType );
static BitmapEx getAudioLogo();
static BitmapEx getEmptyLogo();
diff --git a/include/canvas/elapsedtime.hxx b/include/canvas/elapsedtime.hxx
index f1d68ba..7113cff 100644
--- a/include/canvas/elapsedtime.hxx
+++ b/include/canvas/elapsedtime.hxx
@@ -113,13 +113,8 @@ namespace canvas
This value will be added to the current time, i.e. the
next call to getElapsedTime() (when performed
immediately) will be adjusted by fOffset.
-
- @param bLimitToLastQueriedTime
- Limits the given offset to the time that has been
- taken via getElapsedTime()
*/
- void adjustTimer( double fOffset,
- bool bLimitToLastQueriedTime = true );
+ void adjustTimer( double fOffset );
/** Holds the current time.
diff --git a/include/codemaker/global.hxx b/include/codemaker/global.hxx
index 17f6aa0..7fc9ac9 100644
--- a/include/codemaker/global.hxx
+++ b/include/codemaker/global.hxx
@@ -82,8 +82,7 @@ private:
::rtl::OString createFileNameFromType(const ::rtl::OString& destination,
const ::rtl::OString& type,
const ::rtl::OString& postfix,
- bool bLowerCase=false,
- const ::rtl::OString& prefix="");
+ bool bLowerCase=false);
bool fileExists(const ::rtl::OString& fileName);
bool makeValidTypeFile(const ::rtl::OString& targetFileName,
diff --git a/include/i18nlangtag/languagetag.hxx b/include/i18nlangtag/languagetag.hxx
index 0c54bfd..2bbf033 100644
--- a/include/i18nlangtag/languagetag.hxx
+++ b/include/i18nlangtag/languagetag.hxx
@@ -239,7 +239,7 @@ public:
/** Reset with existing BCP 47 language tag string. See ctor. */
- LanguageTag & reset( const OUString & rBcp47LanguageTag, bool bCanonicalize = false );
+ LanguageTag & reset( const OUString & rBcp47LanguageTag );
/** Reset with Locale. */
LanguageTag & reset( const css::lang::Locale & rLocale );
@@ -411,12 +411,10 @@ public:
/** Convert MS-LangID to BCP 47 string.
- @param bResolveSystem
- If TRUE, resolve an empty language tag denoting the system
- locale to the real locale used.
- If FALSE, return an empty OUString for such a tag.
+ Resolve an empty language tag denoting the system
+ locale to the real locale used.
*/
- static OUString convertToBcp47( LanguageType nLangID, bool bResolveSystem = true );
+ static OUString convertToBcp47( LanguageType nLangID );
/** Convert Locale to BCP 47 string.
@@ -448,12 +446,10 @@ public:
conversion so does not save anything compared to
LanguageTag(rBcp47).getLanguageType(bResolveSystem).
- @param bResolveSystem
- If TRUE, resolve an empty language tag denoting the system
- locale to the real locale used.
- If FALSE, return LANGUAGE_SYSTEM for such a tag.
+ Resolve an empty language tag denoting the system
+ locale to the real locale used.
*/
- static LanguageType convertToLanguageType( const OUString& rBcp47, bool bResolveSystem = true );
+ static LanguageType convertToLanguageType( const OUString& rBcp47 );
/** Convert BCP 47 string to MS-LangID with fallback, convenience method.
More information about the Libreoffice-commits
mailing list