summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-10-27 10:34:56 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-10-27 10:16:08 +0000
commitc19d2b276b7a28c07315cf60cb0965098a935e5f (patch)
treecf3d2548bf3ed784b709bd74ec96eb071b167417 /svl
parente641c1740f36ce11c9f178193f74a53ac7af8465 (diff)
loplugin:expandablemethods in stoc..svl
Change-Id: I7dd701ef07a14f70589b87154bfeeda7530b628f Reviewed-on: https://gerrit.libreoffice.org/30316 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svl')
-rw-r--r--svl/source/items/poolio.cxx7
-rw-r--r--svl/source/items/visitem.cxx8
-rw-r--r--svl/source/misc/sharecontrolfile.cxx34
-rw-r--r--svl/source/numbers/zforlist.cxx18
4 files changed, 18 insertions, 49 deletions
diff --git a/svl/source/items/poolio.cxx b/svl/source/items/poolio.cxx
index 7e023fa32e5c..c695bb92788b 100644
--- a/svl/source/items/poolio.cxx
+++ b/svl/source/items/poolio.cxx
@@ -323,11 +323,6 @@ SvStream &SfxItemPool::Store(SvStream &rStream) const
return rStream;
}
-bool SfxItemPool::HasPersistentRefCounts() const
-{
- return pImpl->mbPersistentRefCounts;
-}
-
/**
* If the SfxItemPool was loaded with 'bRefCounts' == sal_False, we need
* to finish the loading of the document contents with a call of this method.
@@ -868,7 +863,7 @@ const SfxPoolItem* SfxItemPool::LoadSurrogate
return &pTarget->Put( *pItem );
// References have NOT been loaded together with the pool?
- if ( !pTarget->HasPersistentRefCounts() )
+ if ( !pTarget->pImpl->mbPersistentRefCounts )
AddRef( *pItem );
else
return pItem;
diff --git a/svl/source/items/visitem.cxx b/svl/source/items/visitem.cxx
index da59348b3550..32d75681ca36 100644
--- a/svl/source/items/visitem.cxx
+++ b/svl/source/items/visitem.cxx
@@ -45,7 +45,7 @@ bool SfxVisibilityItem::GetPresentation(SfxItemPresentation,
OUString & rText,
const IntlWrapper *) const
{
- rText = GetValueTextByVal(m_nValue.bVisible);
+ rText = m_nValue.bVisible ? OUString("TRUE") : OUString("FALSE");
return true;
}
@@ -86,10 +86,4 @@ SfxPoolItem * SfxVisibilityItem::Clone(SfxItemPool *) const
return new SfxVisibilityItem(*this);
}
-// virtual
-OUString SfxVisibilityItem::GetValueTextByVal(bool bTheValue) const
-{
- return bTheValue ? OUString("TRUE") : OUString("FALSE");
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svl/source/misc/sharecontrolfile.cxx b/svl/source/misc/sharecontrolfile.cxx
index ca95115e3ca6..205c4e2b2b26 100644
--- a/svl/source/misc/sharecontrolfile.cxx
+++ b/svl/source/misc/sharecontrolfile.cxx
@@ -54,28 +54,6 @@ namespace svt {
ShareControlFile::ShareControlFile( const OUString& aOrigURL )
: LockFileCommon( aOrigURL, OUString( ".~sharing." ) )
{
- OpenStream();
-
- if ( !IsValid() )
- throw io::NotConnectedException();
-}
-
-
-ShareControlFile::~ShareControlFile()
-{
- try
- {
- Close();
- }
- catch( uno::Exception& )
- {}
-}
-
-
-void ShareControlFile::OpenStream()
-{
- // if it is called outside of constructor the mutex must be locked already
-
if ( !m_xStream.is() && !m_aURL.isEmpty() )
{
uno::Reference< ucb::XCommandEnvironment > xDummyEnv;
@@ -125,8 +103,20 @@ void ShareControlFile::OpenStream()
m_xTruncate.set( m_xOutputStream, uno::UNO_QUERY_THROW );
m_xStream = xStream;
}
+
+ if ( !IsValid() )
+ throw io::NotConnectedException();
}
+ShareControlFile::~ShareControlFile()
+{
+ try
+ {
+ Close();
+ }
+ catch( uno::Exception& )
+ {}
+}
void ShareControlFile::Close()
{
diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index 9044d884a7a9..c2617a534a4b 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -2744,18 +2744,6 @@ void SvNumberFormatter::ImpGenerateAdditionalFormats( sal_uInt32 CLOffset,
}
-void SvNumberFormatter::ImpGetPosCurrFormat(OUStringBuffer& sPosStr, const OUString& rCurrSymbol)
-{
- NfCurrencyEntry::CompletePositiveFormatString( sPosStr,
- rCurrSymbol, xLocaleData->getCurrPositiveFormat() );
-}
-
-void SvNumberFormatter::ImpGetNegCurrFormat(OUStringBuffer& sNegStr, const OUString& rCurrSymbol)
-{
- NfCurrencyEntry::CompleteNegativeFormatString( sNegStr,
- rCurrSymbol, xLocaleData->getCurrNegativeFormat() );
-}
-
sal_Int32 SvNumberFormatter::ImpPosToken ( const OUStringBuffer & sFormat, sal_Unicode token, sal_Int32 nStartPos /* = 0*/ )
{
sal_Int32 nLength = sFormat.getLength();
@@ -2911,8 +2899,10 @@ OUString SvNumberFormatter::GenerateFormat(sal_uInt32 nIndex,
{ // "automatic" old style
OUString aSymbol, aAbbrev;
GetCompatibilityCurrency( aSymbol, aAbbrev );
- ImpGetPosCurrFormat( sString, aSymbol );
- ImpGetNegCurrFormat( sNegStr, aSymbol );
+ NfCurrencyEntry::CompletePositiveFormatString( sString,
+ aSymbol, xLocaleData->getCurrPositiveFormat() );
+ NfCurrencyEntry::CompleteNegativeFormatString( sNegStr,
+ aSymbol, xLocaleData->getCurrNegativeFormat() );
}
if (IsRed)
{