loplugin:unusedmethods unused return value in sd

Change-Id: I9bf87cad19b7371076fd0b2333c83697021fe0e1
This commit is contained in:
Noel Grandin 2016-01-14 11:44:28 +02:00
parent fe0e43a376
commit 06d68fb0a1
48 changed files with 80 additions and 209 deletions

View File

@ -262,7 +262,7 @@ public:
SdDrawDocument* OpenBookmarkDoc(const OUString& rBookmarkFile);
SAL_DLLPRIVATE SdDrawDocument* OpenBookmarkDoc(SfxMedium& rMedium);
SAL_DLLPRIVATE bool InsertBookmark(const std::vector<OUString> &rBookmarkList,
SAL_DLLPRIVATE void InsertBookmark(const std::vector<OUString> &rBookmarkList,
std::vector<OUString> &rExchangeList, bool bLink,
bool bReplace, sal_uInt16 nPgPos, bool bNoDialogs,
::sd::DrawDocShell* pBookmarkDocSh, bool bCopy,

View File

@ -35,7 +35,7 @@ public:
virtual void Closed() override;
virtual ::sfx2::SvBaseLink::UpdateResult DataChanged(
const OUString& rMimeType, const css::uno::Any & rValue ) override;
bool Connect() { return nullptr != SvBaseLink::GetRealObject(); }
void Connect() { SvBaseLink::GetRealObject(); }
};
#endif // INCLUDED_SD_INC_PGLINK_HXX

View File

@ -35,9 +35,8 @@ namespace sd
/** adds the given shape to this list */
void addShape( SdrObject& rObject );
/** removes the shape from this list and returns
a pointer to the next shape in list or 0*/
SdrObject* removeShape( SdrObject& rObject );
/** removes the shape from this list*/
void removeShape( SdrObject& rObject );
/** removes all shapes from this list */
void clear();

View File

@ -277,7 +277,7 @@ SdDrawDocument* SdDrawDocument::OpenBookmarkDoc(const OUString& rBookmarkFile)
}
// Inserts a bookmark (page or object)
bool SdDrawDocument::InsertBookmark(
void SdDrawDocument::InsertBookmark(
const std::vector<OUString> &rBookmarkList, // List of names of the bookmarks to be inserted
std::vector<OUString> &rExchangeList, // List of the names to be used
bool bLink, // Insert bookmarks as links?
@ -339,8 +339,6 @@ bool SdDrawDocument::InsertBookmark(
bOK = InsertBookmarkAsObject(rBookmarkList, rExchangeList, bLink,
pBookmarkDocSh, pObjPos, bCalcObjCount);
}
return bOK;
}
namespace

View File

@ -50,7 +50,7 @@ void ShapeList::addShape( SdrObject& rObject )
}
/** removes the given shape from this list */
SdrObject* ShapeList::removeShape( SdrObject& rObject )
void ShapeList::removeShape( SdrObject& rObject )
{
ListImpl::iterator aIter( std::find( maShapeList.begin(), maShapeList.end(), &rObject ) );
if( aIter != maShapeList.end() )
@ -62,15 +62,11 @@ SdrObject* ShapeList::removeShape( SdrObject& rObject )
if( bIterErased )
maIter = aIter;
if( aIter != maShapeList.end() )
return (*aIter);
}
else
{
OSL_FAIL("sd::ShapeList::removeShape(), given shape not part of list!");
}
return nullptr;
}
/** removes all shapes from this list

View File

@ -922,7 +922,7 @@ bool PPTWriter::ImplCreateDocument()
return true;
};
bool PPTWriter::ImplCreateHyperBlob( SvMemoryStream& rStrm )
void PPTWriter::ImplCreateHyperBlob( SvMemoryStream& rStrm )
{
sal_uInt32 nCurrentOfs, nParaOfs, nParaCount = 0;
@ -1000,7 +1000,6 @@ bool PPTWriter::ImplCreateHyperBlob( SvMemoryStream& rStrm )
rStrm.WriteUInt32( nCurrentOfs - ( nParaOfs + 4 ) );
rStrm.WriteUInt32( nParaCount );
rStrm.Seek( nCurrentOfs );
return true;
}
bool PPTWriter::ImplCreateMainNotes()

View File

@ -219,7 +219,7 @@ class PPTWriter : public PPTWriterBase, public PPTExBulletProvider
css::uno::Reference< css::beans::XPropertySet >& rXPagePropSet );
void ImplCreateHeaderFooters( css::uno::Reference< css::beans::XPropertySet >& rXPagePropSet );
virtual bool ImplCreateDocument() override;
bool ImplCreateHyperBlob( SvMemoryStream& rStream );
void ImplCreateHyperBlob( SvMemoryStream& rStream );
sal_uInt32 ImplInsertBookmarkURL( const OUString& rBookmark, const sal_uInt32 nType,
const OUString& rStringVer0, const OUString& rStringVer1, const OUString& rStringVer2, const OUString& rStringVer3 );
virtual bool ImplCreateMainNotes() override;

View File

@ -394,7 +394,7 @@ public:
bool InitSOIface();
bool GetPageByIndex( sal_uInt32 nIndex, PageType );
sal_uInt32 GetMasterIndex( PageType ePageType );
bool SetCurrentStyleSheet( sal_uInt32 nPageNum );
void SetCurrentStyleSheet( sal_uInt32 nPageNum );
bool GetPresObj() { return mbPresObj; }

View File

@ -505,15 +505,11 @@ sal_uInt32 PPTWriterBase::GetMasterIndex( PageType ePageType )
return nRetValue;
}
bool PPTWriterBase::SetCurrentStyleSheet( sal_uInt32 nPageNum )
void PPTWriterBase::SetCurrentStyleSheet( sal_uInt32 nPageNum )
{
bool bRet = false;
if ( nPageNum >= maStyleSheetList.size() )
nPageNum = 0;
else
bRet = true;
mpStyleSheet = maStyleSheetList[ nPageNum ];
return bRet;
}
bool PPTWriterBase::GetStyleSheets()

View File

@ -1512,7 +1512,7 @@ IMPL_LINK_NOARG_TYPED(SdPublishingDlg, LastPageHdl, Button*, void)
}
// Load Designs
bool SdPublishingDlg::Load()
void SdPublishingDlg::Load()
{
m_bDesignListDirty = false;
@ -1529,7 +1529,7 @@ bool SdPublishingDlg::Load()
delete pIStm;
if( !bOk )
return false;
return;
}
SfxMedium aMedium( aURL.GetMainURL( INetURLObject::NO_DECODE ), StreamMode::READ | StreamMode::NOCREATE );
@ -1537,13 +1537,13 @@ bool SdPublishingDlg::Load()
SvStream* pStream = aMedium.GetInStream();
if( !pStream )
return false;
return;
sal_uInt16 aCheck;
pStream->ReadUInt16( aCheck );
if(aCheck != nMagic)
return false;
return;
SdIOCompat aIO(*pStream, StreamMode::READ);
@ -1559,8 +1559,6 @@ bool SdPublishingDlg::Load()
m_aDesignList.push_back(aDesign);
}
return( pStream->GetError() == SVSTREAM_OK );
}
// Save Designs

View File

@ -2265,7 +2265,7 @@ void AnimationImporter::importAnimateRotationContainer( const Atom* pAtom, const
}
}
bool AnimationImporter::importAttributeNamesContainer( const Atom* pAtom, OUString& rAttributeNames )
void AnimationImporter::importAttributeNamesContainer( const Atom* pAtom, OUString& rAttributeNames )
{
OUStringBuffer aNames;
@ -2298,7 +2298,6 @@ bool AnimationImporter::importAttributeNamesContainer( const Atom* pAtom, OUStri
}
rAttributeNames = aNames.makeStringAndClear();
return true;
}
void AnimationImporter::importAnimationValues( const Atom* pAtom, const Reference< XAnimationNode >& xNode )
@ -2735,7 +2734,7 @@ void AnimationImporter::importAnimationActions( const Atom* pAtom, const Referen
}
}
sal_Int32 AnimationImporter::importTargetElementContainer( const Atom* pAtom, Any& rTarget, sal_Int16& rSubType )
void AnimationImporter::importTargetElementContainer( const Atom* pAtom, Any& rTarget, sal_Int16& rSubType )
{
rSubType = ShapeAnimationSubType::AS_WHOLE;
sal_Int32 nRefMode = -1;
@ -2852,8 +2851,6 @@ sal_Int32 AnimationImporter::importTargetElementContainer( const Atom* pAtom, An
}
}
return nRefMode;
}
void AnimationImporter::importPropertySetContainer( const Atom* pAtom, PropertySet& rSet )

View File

@ -72,8 +72,8 @@ private:
void importAnimateKeyPoints( const Atom* pAtom, const css::uno::Reference< css::animations::XAnimationNode >& xNode );
void importPropertySetContainer( const Atom* pAtom,PropertySet& rSet );
bool importAttributeValue( const Atom* pAtom, css::uno::Any& rAny );
bool importAttributeNamesContainer( const Atom* pAtom, OUString& rAttributeNames );
sal_Int32 importTargetElementContainer( const Atom* pAtom, css::uno::Any& rTarget, sal_Int16& nSubType );
void importAttributeNamesContainer( const Atom* pAtom, OUString& rAttributeNames );
void importTargetElementContainer( const Atom* pAtom, css::uno::Any& rTarget, sal_Int16& nSubType );
static void fillNode( css::uno::Reference< css::animations::XAnimationNode >& xTiming, const AnimationNode& rNode, const PropertySet& rSet );
static css::uno::Reference< css::animations::XAnimationNode > createNode( const Atom* pAtom, const AnimationNode& rNode );

View File

@ -71,7 +71,7 @@ public:
virtual void MouseButtonUp( const MouseEvent& rMEvt ) override;
sal_Int32 InsertCategory( const OUString& rStr, sal_Int32 nPos = LISTBOX_APPEND );
void InsertCategory( const OUString& rStr, sal_Int32 nPos = LISTBOX_APPEND );
void SetDoubleClickLink( const Link<CategoryListBox&,void>& rDoubleClickHdl ) { maDoubleClickHdl = rDoubleClickHdl; }
@ -96,13 +96,11 @@ CategoryListBox::~CategoryListBox()
{
}
sal_Int32 CategoryListBox::InsertCategory( const OUString& rStr, sal_Int32 nPos /* = LISTBOX_APPEND */ )
void CategoryListBox::InsertCategory( const OUString& rStr, sal_Int32 nPos /* = LISTBOX_APPEND */ )
{
sal_Int32 n = ListBox::InsertEntry( rStr, nPos );
if( n != LISTBOX_ENTRY_NOTFOUND )
ListBox::SetEntryFlags( n, ListBox::GetEntryFlags(n) | ListBoxEntryFlags::DisableSelection );
return n;
}
void CategoryListBox::UserDraw( const UserDrawEvent& rUDEvt )

View File

@ -919,17 +919,6 @@ SdOptionsZoom::SdOptionsZoom( sal_uInt16 nConfigId, bool bUseConfig ) :
EnableModify( true );
}
bool SdOptionsZoom::operator==( const SdOptionsZoom& rOpt ) const
{
sal_Int32 nX1, nX2, nY1, nY2;
GetScale( nX1, nY1 );
rOpt.GetScale( nX2, nY2 );
return( ( nX1 == nX2 ) &&
( nY1 == nY2 ) );
}
void SdOptionsZoom::GetPropNameArray( const char**& ppNames, sal_uLong& rCount ) const
{
static const char* aPropNames[] =
@ -1004,20 +993,6 @@ void SdOptionsGrid::SetDefaults()
SetEqualGrid( true );
}
bool SdOptionsGrid::operator==( const SdOptionsGrid& rOpt ) const
{
return( GetFieldDrawX() == rOpt.GetFieldDrawX() &&
GetFieldDivisionX() == rOpt.GetFieldDivisionX() &&
GetFieldDrawY() == rOpt.GetFieldDrawY() &&
GetFieldDivisionY() == rOpt.GetFieldDivisionY() &&
GetFieldSnapX() == rOpt.GetFieldSnapX() &&
GetFieldSnapY() == rOpt.GetFieldSnapY() &&
IsUseGridSnap() == rOpt.IsUseGridSnap() &&
IsSynchronize() == rOpt.IsSynchronize() &&
IsGridVisible() == rOpt.IsGridVisible() &&
IsEqualGrid() == rOpt.IsEqualGrid() );
}
void SdOptionsGrid::GetPropNameArray( const char**& ppNames, sal_uLong& rCount ) const
{
if( isMetricSystem() )

View File

@ -49,7 +49,7 @@ bool Assistent::InsertControl(int nDestPage, vcl::Window* pUsedControl)
return false;
}
bool Assistent::NextPage()
void Assistent::NextPage()
{
if(mnCurrentPage<mnPages)
{
@ -58,13 +58,11 @@ bool Assistent::NextPage()
nPage++;
if(nPage <= mnPages)
return GotoPage(nPage);
GotoPage(nPage);
}
return false;
}
bool Assistent::PreviousPage()
void Assistent::PreviousPage()
{
if(mnCurrentPage>1)
{
@ -73,9 +71,8 @@ bool Assistent::PreviousPage()
nPage--;
if(nPage >= 0)
return GotoPage(nPage);
GotoPage(nPage);
}
return false;
}
bool Assistent::GotoPage(const int nPageToGo)

View File

@ -1117,10 +1117,8 @@ void FuText::SetInEditMode(const MouseEvent& rMEvt, bool bQuickDrag)
/**
* Text entry is started, if necessary delete the default text.
*/
bool FuText::DeleteDefaultText()
void FuText::DeleteDefaultText()
{
bool bDeleted = false;
if ( mxTextObj.is() && mxTextObj->IsEmptyPresObj() )
{
SdPage* pPage = static_cast<SdPage*>( mxTextObj->GetPage() );
@ -1151,12 +1149,9 @@ bool FuText::DeleteDefaultText()
pOutliner->SetStyleSheet(0, pSheet);
mxTextObj->SetEmptyPresObj(true);
bDeleted = true;
}
}
}
return bDeleted;
}
bool FuText::Command(const CommandEvent& rCEvt)

View File

@ -264,7 +264,7 @@ public:
bool SwitchPage(sal_uInt16 nPage);
bool IsSwitchPageAllowed() const;
bool GotoBookmark(const OUString& rBookmark);
void GotoBookmark(const OUString& rBookmark);
//Realize multi-selection of objects, If object is marked, the
//corresponding entry is set true, else the corresponding entry is set
//false.

View File

@ -111,7 +111,7 @@ public:
bool PrepareClose(bool bUI = true);
virtual bool GetAttributes( SfxItemSet& rTargetSet, bool bOnlyHardAttr = false ) const override;
virtual void GetAttributes( SfxItemSet& rTargetSet, bool bOnlyHardAttr = false ) const override;
virtual bool SetAttributes(const SfxItemSet& rSet, bool bReplaceAll = false) override;
void FillOutliner();

View File

@ -73,8 +73,8 @@ public:
virtual bool PrepareClose( bool bUI = true ) override;
virtual long VirtHScrollHdl(ScrollBar* pHScroll) override;
virtual long VirtVScrollHdl(ScrollBar* pVHScroll) override;
virtual void VirtHScrollHdl(ScrollBar* pHScroll) override;
virtual void VirtVScrollHdl(ScrollBar* pVHScroll) override;
virtual void Activate( bool IsMDIActivate ) override;
virtual void Deactivate( bool IsMDIActivate ) override;
@ -145,8 +145,8 @@ public:
*/
void SetCurrentPage (SdPage* pPage);
bool UpdateTitleObject( SdPage* pPage, Paragraph* pPara );
bool UpdateOutlineObject( SdPage* pPage, Paragraph* pPara );
void UpdateTitleObject( SdPage* pPage, Paragraph* pPara );
void UpdateOutlineObject( SdPage* pPage, Paragraph* pPara );
private:
void ShowSlideShow(SfxRequest& rReq);

View File

@ -85,7 +85,7 @@ public:
void CompleteRedraw( OutputDevice* pOutDev, const vcl::Region& rReg, sdr::contact::ViewObjectContactRedirector* pRedirector = nullptr) override;
virtual bool GetAttributes( SfxItemSet& rTargetSet, bool bOnlyHardAttr = false ) const;
virtual void GetAttributes( SfxItemSet& rTargetSet, bool bOnlyHardAttr = false ) const;
virtual bool SetAttributes(const SfxItemSet& rSet, bool bReplaceAll = false);
virtual void MarkListHasChanged() override;
virtual void ModelHasChanged() override;
@ -146,11 +146,11 @@ public:
SdrGrafObj* InsertGraphic( const Graphic& rGraphic,
sal_Int8& rAction, const Point& rPos,
SdrObject* pSelectedObj, ImageMap* pImageMap );
SdrMediaObj* InsertMediaURL( const OUString& rMediaURL, sal_Int8& rAction,
void InsertMediaURL( const OUString& rMediaURL, sal_Int8& rAction,
const Point& rPos, const Size& rSize,
bool const bLink );
SdrMediaObj* Insert3DModelURL( const OUString& rModelURL, sal_Int8& rAction,
void Insert3DModelURL( const OUString& rModelURL, sal_Int8& rAction,
const Point& rPos, const Size& rSize,
bool const bLink );

View File

@ -531,8 +531,8 @@ protected:
DECL_LINK_TYPED( VScrollHdl, ScrollBar *, void );
// virtual scroll handler, here, derivative classes can add themselves here
virtual long VirtHScrollHdl(ScrollBar* pHScroll);
virtual long VirtVScrollHdl(ScrollBar* pVScroll);
virtual void VirtHScrollHdl(ScrollBar* pHScroll);
virtual void VirtVScrollHdl(ScrollBar* pVScroll);
// virtual functions ruler handling
virtual SvxRuler* CreateHRuler(::sd::Window* pWin, bool bIsFirst);

View File

@ -53,9 +53,9 @@ public:
/// adds a control to the specified page
bool InsertControl(int nDestPage, vcl::Window* pUsedControl);
bool NextPage();
void NextPage();
bool PreviousPage();
void PreviousPage();
bool GotoPage(const int nPageToGo);

View File

@ -55,7 +55,7 @@ public:
virtual void Deactivate() override; ///< deactivates the function
void SetInEditMode(const MouseEvent& rMEvt, bool bQuickDrag);
bool DeleteDefaultText();
void DeleteDefaultText();
SdrTextObj* GetTextObj() { return static_cast< SdrTextObj* >( mxTextObj.get() ); }
virtual SdrObject* CreateDefaultObject(const sal_uInt16 nID, const Rectangle& rRectangle) override;

View File

@ -419,8 +419,6 @@ public:
SdOptionsZoom( sal_uInt16 nConfigId, bool bUseConfig );
virtual ~SdOptionsZoom() {}
bool operator==( const SdOptionsZoom& rOpt ) const;
void GetScale( sal_Int32& rX, sal_Int32& rY ) const { Init(); rX = nX; rY = nY; }
void SetScale( sal_Int32 nInX, sal_Int32 nInY ) { if( nX != nInX || nY != nInY ) { OptionsChanged(); nX = nInX; nY = nInY; } }
};
@ -439,7 +437,6 @@ public:
virtual ~SdOptionsGrid();
void SetDefaults();
bool operator==( const SdOptionsGrid& rOpt ) const;
sal_uInt32 GetFieldDrawX() const { Init(); return SvxOptionsGrid::GetFieldDrawX(); }
sal_uInt32 GetFieldDivisionX() const { Init(); return SvxOptionsGrid::GetFieldDivisionX(); }

View File

@ -169,7 +169,7 @@ private:
std::vector<SdPublishingDesign> m_aDesignList;
bool m_bDesignListDirty;
SdPublishingDesign* m_pDesign;
bool Load();
void Load();
bool Save();
void GetDesign( SdPublishingDesign* pDesign );

View File

@ -155,7 +155,7 @@ public:
/** sets or clears the pause state of the running slideshow.
!!!! This should only be called by the SdShowWindow !!!!*/
bool pause( bool bPause );
void pause( bool bPause );
bool swipe(const CommandSwipeData &rSwipeData);
bool longpress(const CommandLongPressData& rLongPressData);

View File

@ -92,7 +92,7 @@ private:
sal_Int32 mnTop;
sal_Int32 mnTotalHeight;
EditEngine * GetEditEngine();
void GetEditEngine();
EditEngine* CreateEditEngine();
void CheckTop();
};
@ -264,11 +264,10 @@ PresenterTextView::Implementation::~Implementation()
mpOutputDevice.disposeAndClear();
}
EditEngine * PresenterTextView::Implementation::GetEditEngine()
void PresenterTextView::Implementation::GetEditEngine()
{
if (mpEditEngine == nullptr)
mpEditEngine = CreateEditEngine ();
return mpEditEngine;
}
EditEngine* PresenterTextView::Implementation::CreateEditEngine()

View File

@ -168,16 +168,6 @@ int TemplatePageObjectProvider::GetCostIndex()
return 20;
}
bool TemplatePageObjectProvider::operator== (const PageObjectProvider& rProvider)
{
const TemplatePageObjectProvider* pTemplatePageObjectProvider
= dynamic_cast<const TemplatePageObjectProvider*>(&rProvider);
if (pTemplatePageObjectProvider != nullptr)
return (msURL == pTemplatePageObjectProvider->msURL);
else
return false;
}
//===== DefaultPageObjectProvider ==============================================
DefaultPageObjectProvider::DefaultPageObjectProvider()
@ -208,11 +198,6 @@ int DefaultPageObjectProvider::GetCostIndex()
return 15;
}
bool DefaultPageObjectProvider::operator== (const PageObjectProvider& rProvider)
{
return (dynamic_cast<const DefaultPageObjectProvider*>(&rProvider) != nullptr);
}
//===== ExistingPageProvider ==================================================
ExistingPageProvider::ExistingPageProvider (SdPage* pPage)
@ -232,16 +217,6 @@ int ExistingPageProvider::GetCostIndex()
return 0;
}
bool ExistingPageProvider::operator== (const PageObjectProvider& rProvider)
{
const ExistingPageProvider* pExistingPageProvider
= dynamic_cast<const ExistingPageProvider*>(&rProvider);
if (pExistingPageProvider != nullptr)
return (mpPage == pExistingPageProvider->mpPage);
else
return false;
}
} } // end of namespace sd::sidebar
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@ -54,8 +54,6 @@ public:
*/
virtual int GetCostIndex() = 0;
virtual bool operator== (const PageObjectProvider& rProvider) = 0;
protected:
~PageObjectProvider() {}
};
@ -117,7 +115,6 @@ public:
virtual ~TemplatePageObjectProvider() {};
virtual SdPage* operator () (SdDrawDocument* pDocument) override;
virtual int GetCostIndex() override;
virtual bool operator== (const PageObjectProvider& rProvider) override;
private:
OUString msURL;
SfxObjectShellLock mxDocumentShell;
@ -148,7 +145,6 @@ public:
virtual ~DefaultPageObjectProvider() {}
virtual SdPage* operator () (SdDrawDocument* pDocument) override;
virtual int GetCostIndex() override;
virtual bool operator== (const PageObjectProvider& rProvider) override;
};
/** This implementation of the PageObjectProvider simply returns an already
@ -161,7 +157,6 @@ public:
virtual ~ExistingPageProvider() {}
virtual SdPage* operator() (SdDrawDocument* pDocument) override;
virtual int GetCostIndex() override;
virtual bool operator== (const PageObjectProvider& rProvider) override;
private:
SdPage* mpPage;
};

View File

@ -305,7 +305,7 @@ void ShowWindow::Move()
::sd::Window::Move();
}
bool ShowWindow::SetEndMode()
void ShowWindow::SetEndMode()
{
if( ( SHOWWINDOWMODE_NORMAL == meShowWindowMode ) && mpViewShell && mpViewShell->GetView() )
{
@ -322,8 +322,6 @@ bool ShowWindow::SetEndMode()
Invalidate();
}
return( SHOWWINDOWMODE_END == meShowWindowMode );
}
bool ShowWindow::SetPauseMode( sal_Int32 nPageIndexToRestart, sal_Int32 nTimeout, Graphic* pLogo )

View File

@ -53,7 +53,7 @@ public:
virtual ~ShowWindow();
virtual void dispose() override;
bool SetEndMode();
void SetEndMode();
bool SetPauseMode( sal_Int32 nPageIndexToRestart, sal_Int32 nTimeoutSec = SLIDE_NO_TIMEOUT, Graphic* pLogo = nullptr );
bool SetBlankMode( sal_Int32 nPageIndexToRestart, const Color& rBlankColor );

View File

@ -1021,7 +1021,7 @@ bool SlideShow::isAlwaysOnTop()
return mxController.is() && mxController->maPresSettings.mbAlwaysOnTop;
}
bool SlideShow::pause( bool bPause )
void SlideShow::pause( bool bPause )
{
if( mxController.is() )
{
@ -1030,7 +1030,6 @@ bool SlideShow::pause( bool bPause )
else
mxController->resume();
}
return true;
}
void SlideShow::receiveRequest(SfxRequest& rReq)

View File

@ -1739,10 +1739,9 @@ sal_Bool SAL_CALL SlideshowImpl::isEndless() throw( RuntimeException, std::excep
return maPresSettings.mbEndless;
}
double SlideshowImpl::update()
void SlideshowImpl::update()
{
startUpdateTimer();
return -1;
}
void SlideshowImpl::startUpdateTimer()
@ -1770,14 +1769,14 @@ IMPL_LINK_NOARG_TYPED(SlideshowImpl, updateHdl, Timer *, void)
updateSlideShow();
}
sal_Int32 SlideshowImpl::updateSlideShow()
void SlideshowImpl::updateSlideShow()
{
// prevent me from deletion when recursing (App::EnableYieldMode does)
const rtl::Reference<SlideshowImpl> this_(this);
Reference< XSlideShow > xShow( mxShow );
if ( ! xShow.is())
return 0;
return;
try
{
@ -1819,7 +1818,6 @@ sal_Int32 SlideshowImpl::updateSlideShow()
comphelper::anyToString( cppu::getCaughtException() ),
RTL_TEXTENCODING_UTF8 )).getStr() );
}
return 0;
}
bool SlideshowImpl::keyInput(const KeyEvent& rKEvt)

View File

@ -252,7 +252,7 @@ private:
/** forces an async call to update in the main thread */
void startUpdateTimer();
double update();
void update();
void createSlideList( bool bAll, const OUString& rPresSlide );
@ -315,7 +315,7 @@ private:
its return value, wait for a certain amount of time before another
call to update() is scheduled.
*/
sal_Int32 updateSlideShow();
void updateSlideShow();
css::uno::Reference< css::presentation::XSlideShow > mxShow;
rtl::Reference<sd::SlideShowView> mxView;

View File

@ -73,7 +73,7 @@ void SlideShowViewListeners::removeListener( const Reference< util::XModifyListe
maListeners.erase( aIter );
}
bool SlideShowViewListeners::notify( const lang::EventObject& _rEvent ) throw( css::uno::Exception )
void SlideShowViewListeners::notify( const lang::EventObject& _rEvent ) throw( css::uno::Exception )
{
::osl::MutexGuard aGuard( mrMutex );
@ -91,7 +91,6 @@ bool SlideShowViewListeners::notify( const lang::EventObject& _rEvent ) throw( c
aIter = maListeners.erase( aIter );
}
}
return true;
}
void SlideShowViewListeners::disposing( const lang::EventObject& _rEventSource )

View File

@ -105,7 +105,7 @@ public:
void addListener( const css::uno::Reference< css::util::XModifyListener >& _rxListener );
void removeListener( const css::uno::Reference< css::util::XModifyListener >& _rxListener );
bool notify( const css::lang::EventObject& _rEvent ) throw( css::uno::Exception );
void notify( const css::lang::EventObject& _rEvent ) throw( css::uno::Exception );
void disposing( const css::lang::EventObject& _rEventSource );
protected:

View File

@ -140,10 +140,9 @@ void RequestQueue::PageInDestruction(const SdrPage& rPage)
RemoveRequest(&rPage);
}
bool RequestQueue::RemoveRequest (
void RequestQueue::RemoveRequest (
CacheKey aKey)
{
bool bRequestWasRemoved (false);
::osl::MutexGuard aGuard (maMutex);
while(true)
@ -162,14 +161,11 @@ bool RequestQueue::RemoveRequest (
SdrPage *pPage = const_cast<SdrPage*>(aRequestIterator->maKey);
pPage->RemovePageUser(*this);
mpRequestQueue->erase(aRequestIterator);
bRequestWasRemoved = true;
}
else
break;
}
return bRequestWasRemoved;
}
void RequestQueue::ChangeClass (

View File

@ -63,12 +63,8 @@ public:
@param aKey
It is OK when the specified request is not a member of the
queue.
@return
Returns <TRUE/> when the request has been successfully been
removed from the queue. Otherwise, e.g. because the request was
not a member of the queue, <FALSE/> is returned.
*/
bool RemoveRequest (CacheKey aKey);
void RemoveRequest (CacheKey aKey);
/** Change the priority class of the specified request.
*/

View File

@ -686,17 +686,13 @@ void SlideSorterController::UpdateAllPages()
mrSlideSorter.GetContentWindow()->Invalidate();
}
Rectangle SlideSorterController::Resize (const Rectangle& rAvailableSpace)
void SlideSorterController::Resize (const Rectangle& rAvailableSpace)
{
Rectangle aContentArea (rAvailableSpace);
if (maTotalWindowArea != rAvailableSpace)
{
maTotalWindowArea = rAvailableSpace;
aContentArea = Rearrange(true);
Rearrange(true);
}
return aContentArea;
}
Rectangle SlideSorterController::Rearrange (bool bForce)
@ -799,7 +795,7 @@ void SlideSorterController::PrepareEditModeChange()
}
}
bool SlideSorterController::ChangeEditMode (EditMode eEditMode)
void SlideSorterController::ChangeEditMode (EditMode eEditMode)
{
bool bResult (false);
if (mrModel.GetEditMode() != eEditMode)
@ -811,7 +807,6 @@ bool SlideSorterController::ChangeEditMode (EditMode eEditMode)
if (bResult)
HandleModelChange();
}
return bResult;
}
void SlideSorterController::FinishEditModeChange()

View File

@ -82,10 +82,8 @@ public:
/** Place and size the scroll bars and the browser window so that the
given rectangle is filled.
@return
The space occupied by the browser window is returned.
*/
Rectangle Resize (const Rectangle& rAvailableSpace);
void Resize (const Rectangle& rAvailableSpace);
/** Determine which of the UI elements--the scroll bars, the scroll bar
filler, the actual slide sorter view--are visible and place them in
@ -192,11 +190,8 @@ public:
has been changed. For proper saving and restoring of the selection
this method should be called between calls to
PrepareEditModeChange() and FinishEditModeChange().
@return
A return value of <TRUE/> indicates that the edit mode has
changed.
*/
bool ChangeEditMode (EditMode eEditMode);
void ChangeEditMode (EditMode eEditMode);
/** Finish the change of the edit mode. Here we may select a page or
restore a previously saved selection.

View File

@ -49,7 +49,7 @@ public:
void UpdateVisualState (const PageDescriptor& rDescriptor);
Point GetLocationOffset() const { return maLocationOffset;}
bool SetLocationOffset (const Point& rPoint);
void SetLocationOffset (const Point& rPoint);
sal_Int32 mnPageId; // For debugging

View File

@ -63,15 +63,12 @@ void VisualState::UpdateVisualState (const PageDescriptor& rDescriptor)
SetVisualState(VS_None);
}
bool VisualState::SetLocationOffset (const Point& rOffset)
void VisualState::SetLocationOffset (const Point& rOffset)
{
if (maLocationOffset != rOffset)
{
maLocationOffset = rOffset;
return true;
}
else
return false;
}
} } } // end of namespace ::sd::slidesorter::model

View File

@ -41,17 +41,15 @@
namespace sd {
bool DrawViewShell::GotoBookmark(const OUString& rBookmark)
void DrawViewShell::GotoBookmark(const OUString& rBookmark)
{
bool bRet = false;
::sd::DrawDocShell* pDocSh = GetDocSh();
if( pDocSh )
{
if( !pDocSh->GetViewShell() ) //#i26016# this case occurs if the jump-target-document was opened already with file open dialog before triggering the jump via hyperlink
pDocSh->Connect(this);
bRet = (pDocSh->GotoBookmark(rBookmark));
pDocSh->GotoBookmark(rBookmark);
}
return bRet;
}
/**

View File

@ -1070,7 +1070,7 @@ void OutlineViewShell::GetMenuState( SfxItemSet &rSet )
/**
* gets invoked when ScrollBar is used
*/
long OutlineViewShell::VirtHScrollHdl(ScrollBar* pHScroll)
void OutlineViewShell::VirtHScrollHdl(ScrollBar* pHScroll)
{
long nThumb = pHScroll->GetThumbPos();
long nRange = pHScroll->GetRange().Len();
@ -1089,11 +1089,9 @@ long OutlineViewShell::VirtHScrollHdl(ScrollBar* pHScroll)
pOutlinerView->HideCursor();
pOutlinerView->Scroll(-nDelta, 0);
pOutlinerView->ShowCursor(false);
return 0;
}
long OutlineViewShell::VirtVScrollHdl(ScrollBar* pVScroll)
void OutlineViewShell::VirtVScrollHdl(ScrollBar* pVScroll)
{
long nThumb = pVScroll->GetThumbPos();
long nRange = pVScroll->GetRange().Len();
@ -1112,8 +1110,6 @@ long OutlineViewShell::VirtVScrollHdl(ScrollBar* pVScroll)
pOutlinerView->HideCursor();
pOutlinerView->Scroll(0, -nDelta);
pOutlinerView->ShowCursor(false);
return 0;
}
/**
@ -1577,13 +1573,13 @@ void OutlineViewShell::UpdatePreview( SdPage* pPage, bool )
}
}
bool OutlineViewShell::UpdateTitleObject( SdPage* pPage, Paragraph* pPara )
void OutlineViewShell::UpdateTitleObject( SdPage* pPage, Paragraph* pPara )
{
DBG_ASSERT( pPage, "sd::OutlineViewShell::UpdateTitleObject(), pPage == 0?" );
DBG_ASSERT( pPara, "sd::OutlineViewShell::UpdateTitleObject(), pPara == 0?" );
if( !pPage || !pPara )
return false;
return;
::Outliner& rOutliner = pOlView->GetOutliner();
SdrTextObj* pTO = OutlineView::GetTitleTextObject( pPage );
@ -1653,17 +1649,15 @@ bool OutlineViewShell::UpdateTitleObject( SdPage* pPage, Paragraph* pPara )
pPage->RemoveObject(pTO->GetOrdNum());
}
}
return bNewObject;
}
bool OutlineViewShell::UpdateOutlineObject( SdPage* pPage, Paragraph* pPara )
void OutlineViewShell::UpdateOutlineObject( SdPage* pPage, Paragraph* pPara )
{
DBG_ASSERT( pPage, "sd::OutlineViewShell::UpdateOutlineObject(), pPage == 0?" );
DBG_ASSERT( pPara, "sd::OutlineViewShell::UpdateOutlineObject(), pPara == 0?" );
if( !pPage || !pPara )
return false;
return;
::Outliner& rOutliner = pOlView->GetOutliner();
OutlinerParaObject* pOPO = nullptr;
@ -1758,8 +1752,6 @@ bool OutlineViewShell::UpdateOutlineObject( SdPage* pPage, Paragraph* pPara )
pPage->RemoveObject(pTO->GetOrdNum());
}
}
return bNewObject;
}
/**

View File

@ -1040,14 +1040,13 @@ bool OutlineView::SetAttributes(const SfxItemSet& rSet, bool )
/**
* Get attributes of the selected text
*/
bool OutlineView::GetAttributes( SfxItemSet& rTargetSet, bool ) const
void OutlineView::GetAttributes( SfxItemSet& rTargetSet, bool ) const
{
OutlinerView* pOlView = GetViewByWindow(
mrOutlineViewShell.GetActiveWindow());
assert(pOlView && "keine OutlinerView gefunden");
rTargetSet.Put( pOlView->GetAttribs(), false );
return true;
}
/** creates outliner model from draw model */

View File

@ -518,9 +518,9 @@ bool View::SetAttributes(const SfxItemSet& rSet, bool bReplaceAll)
return bOk;
}
bool View::GetAttributes( SfxItemSet& rTargetSet, bool bOnlyHardAttr ) const
void View::GetAttributes( SfxItemSet& rTargetSet, bool bOnlyHardAttr ) const
{
return FmFormView::GetAttributes( rTargetSet, bOnlyHardAttr );
FmFormView::GetAttributes( rTargetSet, bOnlyHardAttr );
}
/**

View File

@ -273,7 +273,7 @@ SdrGrafObj* View::InsertGraphic( const Graphic& rGraphic, sal_Int8& rAction,
return pNewGrafObj;
}
SdrMediaObj* View::InsertMediaURL( const OUString& rMediaURL, sal_Int8& rAction,
void View::InsertMediaURL( const OUString& rMediaURL, sal_Int8& rAction,
const Point& rPos, const Size& rSize,
bool const bLink )
{
@ -287,14 +287,14 @@ SdrMediaObj* View::InsertMediaURL( const OUString& rMediaURL, sal_Int8& rAction,
uno::Reference<frame::XModel> const xModel(
GetDoc().GetObjectShell()->GetModel());
bool const bRet = ::avmedia::EmbedMedia(xModel, rMediaURL, realURL);
if (!bRet) { return nullptr; }
if (!bRet) { return; }
}
return InsertMediaObj( realURL, "application/vnd.sun.star.media", rAction, rPos, rSize );
InsertMediaObj( realURL, "application/vnd.sun.star.media", rAction, rPos, rSize );
}
#if HAVE_FEATURE_GLTF
SdrMediaObj* View::Insert3DModelURL(
void View::Insert3DModelURL(
const OUString& rModelURL, sal_Int8& rAction,
const Point& rPos, const Size& rSize,
bool const bLink )
@ -309,14 +309,13 @@ SdrMediaObj* View::Insert3DModelURL(
uno::Reference<frame::XModel> const xModel(
GetDoc().GetObjectShell()->GetModel());
bool const bRet = ::avmedia::Embed3DModel(xModel, rModelURL, sRealURL);
if (!bRet) { return nullptr; }
if (!bRet) { return; }
}
SdrMediaObj* pRetObject = InsertMediaObj( sRealURL, "model/vnd.gltf+json", rAction, rPos, rSize );
avmedia::MediaItem aItem = pRetObject->getMediaProperties();
aItem.setLoop(true);
pRetObject->setMediaProperties(aItem);
return pRetObject;
}
#endif

View File

@ -142,7 +142,7 @@ IMPL_LINK_TYPED(ViewShell, HScrollHdl, ScrollBar *, pHScroll, void )
/**
* virtual scroll handler for horizontal Scrollbars
*/
long ViewShell::VirtHScrollHdl(ScrollBar* pHScroll)
void ViewShell::VirtHScrollHdl(ScrollBar* pHScroll)
{
long nDelta = pHScroll->GetDelta();
@ -183,8 +183,6 @@ long ViewShell::VirtHScrollHdl(ScrollBar* pHScroll)
UpdateHRuler();
}
return 0;
}
/**
@ -198,7 +196,7 @@ IMPL_LINK_TYPED(ViewShell, VScrollHdl, ScrollBar *, pVScroll, void )
/**
* handling for vertical Scrollbars
*/
long ViewShell::VirtVScrollHdl(ScrollBar* pVScroll)
void ViewShell::VirtVScrollHdl(ScrollBar* pVScroll)
{
if(IsPageFlipMode())
{
@ -244,8 +242,6 @@ long ViewShell::VirtVScrollHdl(ScrollBar* pVScroll)
UpdateVRuler();
}
return 0;
}
SvxRuler* ViewShell::CreateHRuler(::sd::Window* , bool )