Kaydet (Commit) 4e6410ba authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:constantfunction: unotools

Change-Id: Icf543973dc9edde270016c8af7e4c08c57eff650
üst adef9563
...@@ -243,7 +243,7 @@ OUString ChooseMacro( const uno::Reference< frame::XModel >& rxLimitToDocument, ...@@ -243,7 +243,7 @@ OUString ChooseMacro( const uno::Reference< frame::XModel >& rxLimitToDocument,
SbMethod* pMethod = NULL; SbMethod* pMethod = NULL;
boost::scoped_ptr< MacroChooser > pChooser( new MacroChooser( NULL, true ) ); boost::scoped_ptr< MacroChooser > pChooser( new MacroChooser( NULL, true ) );
if ( bChooseOnly || !SvtModuleOptions().IsBasicIDE() ) if ( bChooseOnly || !SvtModuleOptions::IsBasicIDE() )
pChooser->SetMode(MacroChooser::ChooseOnly); pChooser->SetMode(MacroChooser::ChooseOnly);
if ( !bChooseOnly && rxLimitToDocument.is() ) if ( !bChooseOnly && rxLimitToDocument.is() )
......
...@@ -380,7 +380,7 @@ long HandleBasicError( StarBASIC* pBasic ) ...@@ -380,7 +380,7 @@ long HandleBasicError( StarBASIC* pBasic )
long nRet = 0; long nRet = 0;
Shell* pShell = 0; Shell* pShell = 0;
if ( SvtModuleOptions().IsBasicIDE() ) if ( SvtModuleOptions::IsBasicIDE() )
{ {
BasicManager* pBasMgr = FindBasicManager( pBasic ); BasicManager* pBasMgr = FindBasicManager( pBasic );
if ( pBasMgr ) if ( pBasMgr )
......
...@@ -296,12 +296,12 @@ public: ...@@ -296,12 +296,12 @@ public:
// dummy returns, to be implemented // dummy returns, to be implemented
inline sal_Unicode getCurrZeroChar() const inline sal_Unicode getCurrZeroChar() const
{ return cCurrZeroChar; } { return cCurrZeroChar; }
inline bool isNumLeadingZero() const static inline bool isNumLeadingZero()
{ return true; } { return true; }
/// standard decimal places /// standard decimal places
inline sal_uInt16 getNumDigits() const static inline sal_uInt16 getNumDigits()
{ return 2; } { return 2; }
inline bool isNumTrailingZeros() const static inline bool isNumTrailingZeros()
{ return true; } { return true; }
// reserved words // reserved words
......
...@@ -161,7 +161,7 @@ class UNOTOOLS_DLLPUBLIC SAL_WARN_UNUSED SvtModuleOptions : public utl::detail:: ...@@ -161,7 +161,7 @@ class UNOTOOLS_DLLPUBLIC SAL_WARN_UNUSED SvtModuleOptions : public utl::detail::
bool IsDraw () const; bool IsDraw () const;
bool IsWriter () const; bool IsWriter () const;
bool IsImpress () const; bool IsImpress () const;
bool IsBasicIDE () const; static bool IsBasicIDE () { return true; }
bool IsDataBase () const; bool IsDataBase () const;
::com::sun::star::uno::Sequence < OUString > GetAllServiceNames(); ::com::sun::star::uno::Sequence < OUString > GetAllServiceNames();
......
...@@ -870,7 +870,7 @@ bool SdrAngleItem::GetPresentation( ...@@ -870,7 +870,7 @@ bool SdrAngleItem::GetPresentation(
pIntlWrapper = pMyIntlWrapper = new IntlWrapper( pIntlWrapper = pMyIntlWrapper = new IntlWrapper(
Application::GetSettings().GetLanguageTag() ); Application::GetSettings().GetLanguageTag() );
if(pIntlWrapper->getLocaleData()->isNumLeadingZero()) if(LocaleDataWrapper::isNumLeadingZero())
nCount++; nCount++;
while(aText.getLength() < nCount) while(aText.getLength() < nCount)
......
...@@ -1224,7 +1224,7 @@ void SdrModel::TakeMetricStr(long nVal, OUString& rStr, bool bNoUnitChars, sal_I ...@@ -1224,7 +1224,7 @@ void SdrModel::TakeMetricStr(long nVal, OUString& rStr, bool bNoUnitChars, sal_I
if( -1 == nNumDigits ) if( -1 == nNumDigits )
{ {
nNumDigits = rLoc.getNumDigits(); nNumDigits = LocaleDataWrapper::getNumDigits();
} }
sal_Int32 nKomma(nUIUnitKomma); sal_Int32 nKomma(nUIUnitKomma);
...@@ -1267,7 +1267,7 @@ void SdrModel::TakeMetricStr(long nVal, OUString& rStr, bool bNoUnitChars, sal_I ...@@ -1267,7 +1267,7 @@ void SdrModel::TakeMetricStr(long nVal, OUString& rStr, bool bNoUnitChars, sal_I
// if necessary, add zeros before the decimal point // if necessary, add zeros before the decimal point
sal_Int32 nAnz = nKomma - aBuf.getLength(); sal_Int32 nAnz = nKomma - aBuf.getLength();
if(nAnz >= 0 && rLoc.isNumLeadingZero()) if(nAnz >= 0 && LocaleDataWrapper::isNumLeadingZero())
nAnz++; nAnz++;
for(sal_Int32 i=0; i<nAnz; i++) for(sal_Int32 i=0; i<nAnz; i++)
...@@ -1282,7 +1282,7 @@ void SdrModel::TakeMetricStr(long nVal, OUString& rStr, bool bNoUnitChars, sal_I ...@@ -1282,7 +1282,7 @@ void SdrModel::TakeMetricStr(long nVal, OUString& rStr, bool bNoUnitChars, sal_I
if(nKomma > 0) if(nKomma > 0)
aBuf.insert(nVorKomma, cDec); aBuf.insert(nVorKomma, cDec);
if(!rLoc.isNumTrailingZeros()) if(!LocaleDataWrapper::isNumTrailingZeros())
{ {
// Remove all trailing zeros. // Remove all trailing zeros.
while (!aBuf.isEmpty() && aBuf[aBuf.getLength()-1] == '0') while (!aBuf.isEmpty() && aBuf[aBuf.getLength()-1] == '0')
...@@ -1338,7 +1338,7 @@ void SdrModel::TakeAngleStr(long nAngle, OUString& rStr, bool bNoDegChar) const ...@@ -1338,7 +1338,7 @@ void SdrModel::TakeAngleStr(long nAngle, OUString& rStr, bool bNoDegChar) const
const LocaleDataWrapper& rLoc = aSysLoc.GetLocaleData(); const LocaleDataWrapper& rLoc = aSysLoc.GetLocaleData();
sal_Int32 nAnz = 2; sal_Int32 nAnz = 2;
if(rLoc.isNumLeadingZero()) if(LocaleDataWrapper::isNumLeadingZero())
nAnz++; nAnz++;
while(aBuf.getLength() < nAnz) while(aBuf.getLength() < nAnz)
......
...@@ -867,7 +867,7 @@ void SdrFormatter::TakeStr(long nVal, OUString& rStr) const ...@@ -867,7 +867,7 @@ void SdrFormatter::TakeStr(long nVal, OUString& rStr) const
aStr.insert(0, aNullCode); aStr.insert(0, aNullCode);
// remove superfluous decimal points // remove superfluous decimal points
sal_Int32 nNumDigits(rLoc.getNumDigits()); sal_Int32 nNumDigits(LocaleDataWrapper::getNumDigits());
sal_Int32 nWeg(nC - nNumDigits); sal_Int32 nWeg(nC - nNumDigits);
if(nWeg > 0) if(nWeg > 0)
......
...@@ -1044,11 +1044,6 @@ bool SvtModuleOptions::IsImpress() const ...@@ -1044,11 +1044,6 @@ bool SvtModuleOptions::IsImpress() const
return m_pDataContainer->IsModuleInstalled( E_SIMPRESS ); return m_pDataContainer->IsModuleInstalled( E_SIMPRESS );
} }
bool SvtModuleOptions::IsBasicIDE() const
{
return true;
}
bool SvtModuleOptions::IsDataBase() const bool SvtModuleOptions::IsDataBase() const
{ {
::osl::MutexGuard aGuard( impl_GetOwnStaticMutex() ); ::osl::MutexGuard aGuard( impl_GetOwnStaticMutex() );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment