summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-10-19 10:06:11 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-10-20 06:11:51 +0000
commite7324c5705eaa38a2c9aa0636f01a73f033ba4d6 (patch)
treee527e81c249467a7223b603a02bc6fe31ac0b111
parent0d2797fdb06f504e7213b3859a53c363f4f56bc9 (diff)
loplugin:expandablemethodds in scaddins..sdext
Change-Id: Ife021e368efaafe9097750b4ca1a5472e94352a9 Reviewed-on: https://gerrit.libreoffice.org/30054 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--scaddins/source/analysis/analysishelper.cxx2
-rw-r--r--scaddins/source/analysis/analysishelper.hxx6
-rw-r--r--scripting/source/provider/MasterScriptProvider.cxx9
-rw-r--r--scripting/source/provider/MasterScriptProvider.hxx3
-rw-r--r--sd/inc/CustomAnimationPreset.hxx2
-rw-r--r--sd/inc/cusshow.hxx2
-rw-r--r--sd/inc/sdiocmpt.hxx1
-rw-r--r--sd/source/core/CustomAnimationPreset.cxx7
-rw-r--r--sd/source/core/cusshow.cxx2
-rw-r--r--sd/source/core/sdiocmpt.cxx7
-rw-r--r--sd/source/ui/dlg/headerfooterdlg.cxx7
-rw-r--r--sd/source/ui/inc/PreviewRenderer.hxx1
-rw-r--r--sd/source/ui/inc/headerfooterdlg.hxx1
-rw-r--r--sd/source/ui/tools/PreviewRenderer.cxx7
-rw-r--r--sd/source/ui/view/DocumentRenderer.cxx7
-rw-r--r--sdext/source/presenter/PresenterAccessibility.cxx7
16 files changed, 12 insertions, 59 deletions
diff --git a/scaddins/source/analysis/analysishelper.cxx b/scaddins/source/analysis/analysishelper.cxx
index a0e25b8d713a..80c2736e0c9e 100644
--- a/scaddins/source/analysis/analysishelper.cxx
+++ b/scaddins/source/analysis/analysishelper.cxx
@@ -2182,7 +2182,7 @@ sal_Int16 ConvertData::GetMatchingLevel( const OUString& rRef ) const
const sal_Unicode* p = aStr.getStr();
nLen = aStr.getLength();
- bool bPref = IsPrefixSupport();
+ bool bPref = bPrefixSupport;
bool bOneChar = (bPref && nLen > 1 && (aName == p + 1));
if (bOneChar || (bPref && nLen > 2 && (aName == p + 2) &&
*p == 'd' && *(p+1) == 'a'))
diff --git a/scaddins/source/analysis/analysishelper.hxx b/scaddins/source/analysis/analysishelper.hxx
index 190da12d3779..6fe803897f12 100644
--- a/scaddins/source/analysis/analysishelper.hxx
+++ b/scaddins/source/analysis/analysishelper.hxx
@@ -473,7 +473,6 @@ public:
virtual double ConvertFromBase( double fVal, sal_Int16 nMatchLevel ) const;
inline ConvertDataClass Class() const;
- inline bool IsPrefixSupport() const;
};
class ConvertDataLinear : public ConvertData
@@ -659,11 +658,6 @@ inline ConvertDataClass ConvertData::Class() const
return eClass;
}
-inline bool ConvertData::IsPrefixSupport() const
-{
- return bPrefixSupport;
-}
-
inline ConvertDataLinear::ConvertDataLinear( const sal_Char* p, double fC, double fO, ConvertDataClass e,
bool bPrefSupport ) :
ConvertData( p, fC, e, bPrefSupport ),
diff --git a/scripting/source/provider/MasterScriptProvider.cxx b/scripting/source/provider/MasterScriptProvider.cxx
index 7c6157d4d7b4..83a559358932 100644
--- a/scripting/source/provider/MasterScriptProvider.cxx
+++ b/scripting/source/provider/MasterScriptProvider.cxx
@@ -235,7 +235,7 @@ MasterScriptProvider::getScript( const OUString& scriptURI )
throw ( provider::ScriptFrameworkErrorException,
RuntimeException, std::exception )
{
- if ( !isValid() )
+ if ( !m_bIsValid )
{
throw provider::ScriptFrameworkErrorException(
"MasterScriptProvider not initialised", Reference< XInterface >(),
@@ -389,7 +389,7 @@ OUString SAL_CALL
MasterScriptProvider::getName()
throw ( css::uno::RuntimeException, std::exception )
{
- if ( !isPkgProvider() )
+ if ( !m_bIsPkgMSP )
{
OUString sCtx = getContextString();
if ( sCtx.startsWith( "vnd.sun.star.tdoc" ) )
@@ -421,9 +421,8 @@ MasterScriptProvider::getChildNodes()
{
Sequence< Reference< provider::XScriptProvider > > providers = getAllProviders();
- Reference< provider::XScriptProvider > pkgProv = getPkgProvider();
sal_Int32 size = providers.getLength();
- bool hasPkgs = pkgProv.is();
+ bool hasPkgs = m_xMSPPkg.is();
if ( hasPkgs )
{
size++;
@@ -437,7 +436,7 @@ MasterScriptProvider::getChildNodes()
if ( hasPkgs )
{
- children[ provIndex ].set( pkgProv, UNO_QUERY );
+ children[ provIndex ].set( m_xMSPPkg, UNO_QUERY );
}
diff --git a/scripting/source/provider/MasterScriptProvider.hxx b/scripting/source/provider/MasterScriptProvider.hxx
index 38f6c1fed02f..964a1a13d451 100644
--- a/scripting/source/provider/MasterScriptProvider.hxx
+++ b/scripting/source/provider/MasterScriptProvider.hxx
@@ -106,15 +106,12 @@ public:
css::uno::Sequence< css::uno::Reference< css::script::provider::XScriptProvider > > SAL_CALL
getAllProviders() throw ( css::uno::RuntimeException );
- bool isPkgProvider() { return m_bIsPkgMSP; }
- const css::uno::Reference< css::script::provider::XScriptProvider >& getPkgProvider() { return m_xMSPPkg; }
// returns context string for this provider, eg
const OUString& getContextString() { return m_sCtxString; }
private:
static OUString parseLocationName( const OUString& location );
void createPkgProvider();
- bool isValid() { return m_bIsValid;}
ProviderCache* providerCache();
/* to obtain other services if needed */
diff --git a/sd/inc/CustomAnimationPreset.hxx b/sd/inc/CustomAnimationPreset.hxx
index 10d54f6e8d67..c519d3cf9f1b 100644
--- a/sd/inc/CustomAnimationPreset.hxx
+++ b/sd/inc/CustomAnimationPreset.hxx
@@ -92,8 +92,6 @@ public:
SAL_DLLPRIVATE CustomAnimationPresets();
SAL_DLLPRIVATE virtual ~CustomAnimationPresets();
- SAL_DLLPRIVATE void init();
-
static const CustomAnimationPresets& getCustomAnimationPresets();
SAL_DLLPRIVATE css::uno::Reference< css::animations::XAnimationNode > getRandomPreset( sal_Int16 nPresetClass ) const;
diff --git a/sd/inc/cusshow.hxx b/sd/inc/cusshow.hxx
index eb915b9803f0..006a050b6f86 100644
--- a/sd/inc/cusshow.hxx
+++ b/sd/inc/cusshow.hxx
@@ -65,8 +65,6 @@ public:
void SetName(const OUString& rName);
const OUString& GetName() const { return aName;}
- SdDrawDocument* GetDoc() const { return pDoc; }
-
css::uno::Reference< css::uno::XInterface > getUnoCustomShow();
};
diff --git a/sd/inc/sdiocmpt.hxx b/sd/inc/sdiocmpt.hxx
index f1a3f7bdbf11..4016b5796cac 100644
--- a/sd/inc/sdiocmpt.hxx
+++ b/sd/inc/sdiocmpt.hxx
@@ -32,7 +32,6 @@ protected:
bool bOpen;
protected:
- void Read();
void Write();
public:
diff --git a/sd/source/core/CustomAnimationPreset.cxx b/sd/source/core/CustomAnimationPreset.cxx
index b3aefe8ac9f5..9e556b941b90 100644
--- a/sd/source/core/CustomAnimationPreset.cxx
+++ b/sd/source/core/CustomAnimationPreset.cxx
@@ -234,11 +234,6 @@ CustomAnimationPresets::~CustomAnimationPresets()
{
}
-void CustomAnimationPresets::init()
-{
- importResources();
-}
-
Reference< XAnimationNode > implImportEffects( const Reference< XMultiServiceFactory >& xServiceFactory, const OUString& rPath )
{
Reference< XAnimationNode > xRootNode;
@@ -552,7 +547,7 @@ const CustomAnimationPresets& CustomAnimationPresets::getCustomAnimationPresets(
if( !mpCustomAnimationPresets )
{
mpCustomAnimationPresets = new sd::CustomAnimationPresets();
- mpCustomAnimationPresets->init();
+ mpCustomAnimationPresets->importResources();
}
}
diff --git a/sd/source/core/cusshow.cxx b/sd/source/core/cusshow.cxx
index 6095f4cca110..1f3e6b7b4939 100644
--- a/sd/source/core/cusshow.cxx
+++ b/sd/source/core/cusshow.cxx
@@ -49,7 +49,7 @@ SdCustomShow::SdCustomShow( const SdCustomShow& rShow )
: maPages(rShow.maPages)
{
aName = rShow.GetName();
- pDoc = rShow.GetDoc();
+ pDoc = rShow.pDoc;
}
SdCustomShow::SdCustomShow(SdDrawDocument* pDrawDoc, css::uno::Reference< css::uno::XInterface > const & xShow )
diff --git a/sd/source/core/sdiocmpt.cxx b/sd/source/core/sdiocmpt.cxx
index a6eee5d70dad..68b3fa8df94e 100644
--- a/sd/source/core/sdiocmpt.cxx
+++ b/sd/source/core/sdiocmpt.cxx
@@ -37,11 +37,6 @@ old_SdrDownCompat::~old_SdrDownCompat()
CloseSubRecord();
}
-void old_SdrDownCompat::Read()
-{
- rStream.ReadUInt32( nSubRecSiz );
-}
-
void old_SdrDownCompat::Write()
{
rStream.WriteUInt32( nSubRecSiz );
@@ -56,7 +51,7 @@ void old_SdrDownCompat::OpenSubRecord()
if(nMode == StreamMode::READ)
{
- Read();
+ rStream.ReadUInt32( nSubRecSiz );
}
else if(nMode == StreamMode::WRITE)
{
diff --git a/sd/source/ui/dlg/headerfooterdlg.cxx b/sd/source/ui/dlg/headerfooterdlg.cxx
index 14c1966b3626..0230762706b5 100644
--- a/sd/source/ui/dlg/headerfooterdlg.cxx
+++ b/sd/source/ui/dlg/headerfooterdlg.cxx
@@ -274,7 +274,7 @@ IMPL_LINK_NOARG(HeaderFooterDialog, ClickApplyHdl, Button*, void)
IMPL_LINK_NOARG(HeaderFooterDialog, ClickCancelHdl, Button*, void)
{
- Cancel();
+ EndDialog();
}
short HeaderFooterDialog::Execute()
@@ -299,11 +299,6 @@ void HeaderFooterDialog::Apply()
EndDialog(1);
}
-void HeaderFooterDialog::Cancel()
-{
- EndDialog();
-}
-
void HeaderFooterDialog::apply( bool bToAll, bool bForceSlides )
{
SdUndoGroup* pUndoGroup = new SdUndoGroup(mpDoc);
diff --git a/sd/source/ui/inc/PreviewRenderer.hxx b/sd/source/ui/inc/PreviewRenderer.hxx
index fb3c4bd83211..7cccf318e29f 100644
--- a/sd/source/ui/inc/PreviewRenderer.hxx
+++ b/sd/source/ui/inc/PreviewRenderer.hxx
@@ -127,7 +127,6 @@ private:
const SdPage* pPage,
const Size& rPixelSize,
const bool bObeyHighContrastMode);
- void Cleanup();
void PaintPage (
const SdPage* pPage,
const bool bDisplayPresentationObjects);
diff --git a/sd/source/ui/inc/headerfooterdlg.hxx b/sd/source/ui/inc/headerfooterdlg.hxx
index 77a932fca101..f26fc24a4571 100644
--- a/sd/source/ui/inc/headerfooterdlg.hxx
+++ b/sd/source/ui/inc/headerfooterdlg.hxx
@@ -71,7 +71,6 @@ public:
void ApplyToAll();
void Apply();
- void Cancel();
virtual short Execute() override;
};
diff --git a/sd/source/ui/tools/PreviewRenderer.cxx b/sd/source/ui/tools/PreviewRenderer.cxx
index 8a2cf3f8d3d7..9a761123cba2 100644
--- a/sd/source/ui/tools/PreviewRenderer.cxx
+++ b/sd/source/ui/tools/PreviewRenderer.cxx
@@ -127,7 +127,7 @@ Image PreviewRenderer::RenderPage (
mpPreviewDevice->PixelToLogic(Point(0,0)),
mpPreviewDevice->PixelToLogic(aSize)));
- Cleanup();
+ mpView->HideSdrPage();
}
}
catch (const css::uno::Exception&)
@@ -272,11 +272,6 @@ bool PreviewRenderer::Initialize (
return true;
}
-void PreviewRenderer::Cleanup()
-{
- mpView->HideSdrPage();
-}
-
void PreviewRenderer::PaintPage (
const SdPage* pPage,
const bool bDisplayPresentationObjects)
diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx
index 1db185a8f82d..5eb778bf92af 100644
--- a/sd/source/ui/view/DocumentRenderer.cxx
+++ b/sd/source/ui/view/DocumentRenderer.cxx
@@ -1182,7 +1182,7 @@ public:
if (rHint.GetId() == SFX_HINT_DYING)
{
- Dispose();
+ mbIsDisposed = true;
}
}
@@ -1352,11 +1352,6 @@ private:
std::vector<sal_Int32> maSlidesPerPage;
awt::Size maPrintSize;
- void Dispose()
- {
- mbIsDisposed = true;
- }
-
sal_Int32 GetCurrentPageIndex() const
{
const ViewShell *pShell = mrBase.GetMainViewShell().get();
diff --git a/sdext/source/presenter/PresenterAccessibility.cxx b/sdext/source/presenter/PresenterAccessibility.cxx
index 766a9f87f376..03d3017f4d2c 100644
--- a/sdext/source/presenter/PresenterAccessibility.cxx
+++ b/sdext/source/presenter/PresenterAccessibility.cxx
@@ -496,7 +496,6 @@ private:
const sal_Int32 nOldCharacterIndex,
const sal_Int32 nNewParagraphIndex,
const sal_Int32 nNewCharacterIndex);
- void HandleTextChange();
};
//===== AccessibleFocusManager ================================================
@@ -1912,7 +1911,7 @@ void AccessibleNotes::SetTextView (
[this](sal_Int32 a, sal_Int32 b, sal_Int32 c, sal_Int32 d)
{ return this->NotifyCaretChange(a, b, c, d); });
mpTextView->SetTextChangeBroadcaster(
- [this]() { return this->HandleTextChange(); });
+ [this]() { return SetTextView(mpTextView); });
}
}
@@ -1975,10 +1974,6 @@ void AccessibleNotes::NotifyCaretChange (
}
}
-void AccessibleNotes::HandleTextChange()
-{
- SetTextView(mpTextView);
-}
//===== AccessibleFocusManager ================================================