loplugin:unuseddefaultparam in sd

Change-Id: Ic1bb6903a7e4d4aae44b0a2a21a46590d5b4027f
This commit is contained in:
Noel Grandin
2016-03-01 15:13:33 +02:00
parent a8aafaee13
commit e65506968f
37 changed files with 70 additions and 141 deletions

View File

@@ -151,7 +151,7 @@ public:
SAL_DLLPRIVATE void setAudio( const css::uno::Reference< css::animations::XAudio >& xAudio ); SAL_DLLPRIVATE void setAudio( const css::uno::Reference< css::animations::XAudio >& xAudio );
SAL_DLLPRIVATE bool getStopAudio() const; SAL_DLLPRIVATE bool getStopAudio() const;
void setStopAudio(); void setStopAudio();
void createAudio( const css::uno::Any& rSource, double fVolume = 1.0 ); void createAudio( const css::uno::Any& rSource );
SAL_DLLPRIVATE void removeAudio(); SAL_DLLPRIVATE void removeAudio();
SAL_DLLPRIVATE const css::uno::Reference< css::animations::XAudio >& getAudio() const { return mxAudio; } SAL_DLLPRIVATE const css::uno::Reference< css::animations::XAudio >& getAudio() const { return mxAudio; }

View File

@@ -1477,7 +1477,7 @@ bool CustomAnimationEffect::setTransformationProperty( sal_Int32 nTransformType,
return bChanged; return bChanged;
} }
void CustomAnimationEffect::createAudio( const css::uno::Any& rSource, double fVolume /* = 1.0 */ ) void CustomAnimationEffect::createAudio( const css::uno::Any& rSource )
{ {
DBG_ASSERT( !mxAudio.is(), "sd::CustomAnimationEffect::createAudio(), node already has an audio!" ); DBG_ASSERT( !mxAudio.is(), "sd::CustomAnimationEffect::createAudio(), node already has an audio!" );
@@ -1486,7 +1486,7 @@ void CustomAnimationEffect::createAudio( const css::uno::Any& rSource, double fV
Reference< XComponentContext > xContext( ::comphelper::getProcessComponentContext() ); Reference< XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
Reference< XAudio > xAudio( Audio::create( xContext ) ); Reference< XAudio > xAudio( Audio::create( xContext ) );
xAudio->setSource( rSource ); xAudio->setSource( rSource );
xAudio->setVolume( fVolume ); xAudio->setVolume( 1.0 );
setAudio( xAudio ); setAudio( xAudio );
} }
catch( Exception& ) catch( Exception& )

View File

@@ -2729,8 +2729,7 @@ OUString HtmlExport::CreateLink( const OUString& aLink,
// creates a image tag // creates a image tag
OUString HtmlExport::CreateImage( const OUString& aImage, const OUString& aAltText, OUString HtmlExport::CreateImage( const OUString& aImage, const OUString& aAltText,
sal_Int16 nWidth, sal_Int16 nWidth )
sal_Int16 nHeight )
{ {
OUStringBuffer aStr( "<img src=\""); OUStringBuffer aStr( "<img src=\"");
aStr.append(aImage); aStr.append(aImage);
@@ -2753,11 +2752,6 @@ OUString HtmlExport::CreateImage( const OUString& aImage, const OUString& aAltTe
aStr.append(" width=" + OUString::number(nWidth)); aStr.append(" width=" + OUString::number(nWidth));
} }
if(nHeight > -1)
{
aStr.append(" height=" + OUString::number(nHeight));
}
aStr.append('>'); aStr.append('>');
return aStr.makeStringAndClear(); return aStr.makeStringAndClear();

View File

@@ -172,7 +172,7 @@ class HtmlExport
static OUString CreateLink( const OUString& aLink, const OUString& aText, static OUString CreateLink( const OUString& aLink, const OUString& aText,
const OUString& aTarget = OUString()); const OUString& aTarget = OUString());
static OUString CreateImage( const OUString& aImage, const OUString& aAltText, sal_Int16 nWidth = -1, sal_Int16 nHeight = -1 ); static OUString CreateImage( const OUString& aImage, const OUString& aAltText, sal_Int16 nWidth = -1 );
OUString CreateNavBar( sal_uInt16 nSdPage, bool bIsText ) const; OUString CreateNavBar( sal_uInt16 nSdPage, bool bIsText ) const;
OUString CreateBodyTag() const; OUString CreateBodyTag() const;

View File

@@ -15,9 +15,9 @@ CategoryListBox::~CategoryListBox()
{ {
} }
sal_Int32 CategoryListBox::InsertCategory( const OUString& rStr, sal_Int32 nPos /* = LISTBOX_APPEND */ ) sal_Int32 CategoryListBox::InsertCategory( const OUString& rStr )
{ {
sal_Int32 n = ListBox::InsertEntry( rStr, nPos ); sal_Int32 n = ListBox::InsertEntry( rStr );
if( n != LISTBOX_ENTRY_NOTFOUND ) if( n != LISTBOX_ENTRY_NOTFOUND )
ListBox::SetEntryFlags( n, ListBox::GetEntryFlags(n) | ListBoxEntryFlags::DisableSelection ); ListBox::SetEntryFlags( n, ListBox::GetEntryFlags(n) | ListBoxEntryFlags::DisableSelection );

View File

@@ -14,7 +14,7 @@ public:
virtual void MouseButtonUp( const MouseEvent& rMEvt ) SAL_OVERRIDE; virtual void MouseButtonUp( const MouseEvent& rMEvt ) SAL_OVERRIDE;
sal_Int32 InsertCategory( const OUString& rStr, sal_Int32 nPos = LISTBOX_APPEND ); sal_Int32 InsertCategory( const OUString& rStr );
DECL_LINK_TYPED(implDoubleClickHdl, ListBox&, void); DECL_LINK_TYPED(implDoubleClickHdl, ListBox&, void);

View File

@@ -487,21 +487,21 @@ void CustomAnimationList::KeyInput( const KeyEvent& rKEvt )
/** selects or deselects the given effect. /** selects or deselects the given effect.
Selections of other effects are not changed */ Selections of other effects are not changed */
void CustomAnimationList::select( CustomAnimationEffectPtr pEffect, bool bSelect /* = true */ ) void CustomAnimationList::select( CustomAnimationEffectPtr pEffect )
{ {
CustomAnimationListEntry* pEntry = static_cast< CustomAnimationListEntry* >(First()); CustomAnimationListEntry* pEntry = static_cast< CustomAnimationListEntry* >(First());
while( pEntry ) while( pEntry )
{ {
if( pEntry->getEffect() == pEffect ) if( pEntry->getEffect() == pEffect )
{ {
Select( pEntry, bSelect ); Select( pEntry );
MakeVisible( pEntry ); MakeVisible( pEntry );
break; break;
} }
pEntry = static_cast< CustomAnimationListEntry* >(Next( pEntry )); pEntry = static_cast< CustomAnimationListEntry* >(Next( pEntry ));
} }
if( !pEntry && bSelect ) if( !pEntry )
{ {
append( pEffect ); append( pEffect );
select( pEffect ); select( pEffect );

View File

@@ -58,7 +58,7 @@ public:
/** selects or deselects the given effect. /** selects or deselects the given effect.
Selections of other effects are not changed */ Selections of other effects are not changed */
void select( CustomAnimationEffectPtr pEffect, bool bSelect = true ); void select( CustomAnimationEffectPtr pEffect );
/** populates the list with all effects from the given MainSequence */ /** populates the list with all effects from the given MainSequence */
void update( MainSequencePtr pMainSequence ); void update( MainSequencePtr pMainSequence );

View File

@@ -42,7 +42,7 @@ void STLPropertySet::setPropertyDefaultValue( sal_Int32 nHandle, const Any& rVal
maPropertyMap[ nHandle ] = aEntry; maPropertyMap[ nHandle ] = aEntry;
} }
void STLPropertySet::setPropertyValue( sal_Int32 nHandle, const Any& rValue, sal_Int32 /* nState = STLPropertyState_DIRECT */ ) void STLPropertySet::setPropertyValue( sal_Int32 nHandle, const Any& rValue )
{ {
PropertyMapIter aIter; PropertyMapIter aIter;
if( findProperty( nHandle, aIter ) ) if( findProperty( nHandle, aIter ) )

View File

@@ -55,7 +55,7 @@ public:
~STLPropertySet(); ~STLPropertySet();
void setPropertyDefaultValue( sal_Int32 nHandle, const css::uno::Any& rValue ); void setPropertyDefaultValue( sal_Int32 nHandle, const css::uno::Any& rValue );
void setPropertyValue( sal_Int32 nHandle, const css::uno::Any& rValue, sal_Int32 nState = STLPropertyState_DIRECT ); void setPropertyValue( sal_Int32 nHandle, const css::uno::Any& rValue );
css::uno::Any getPropertyValue( sal_Int32 nHandle ) const; css::uno::Any getPropertyValue( sal_Int32 nHandle ) const;
sal_Int32 getPropertyState( sal_Int32 nHandle ) const; sal_Int32 getPropertyState( sal_Int32 nHandle ) const;

View File

@@ -523,7 +523,7 @@ TextApiObject* getTextApiObject( const Reference< XAnnotation >& xAnnotation )
return nullptr; return nullptr;
} }
void AnnotationWindow::setAnnotation( const Reference< XAnnotation >& xAnnotation, bool bGrabFocus ) void AnnotationWindow::setAnnotation( const Reference< XAnnotation >& xAnnotation )
{ {
if( (xAnnotation != mxAnnotation) && xAnnotation.is() ) if( (xAnnotation != mxAnnotation) && xAnnotation.is() )
{ {
@@ -559,9 +559,6 @@ void AnnotationWindow::setAnnotation( const Reference< XAnnotation >& xAnnotatio
sMeta += sDateTime; sMeta += sDateTime;
} }
mpMeta->SetText(sMeta); mpMeta->SetText(sMeta);
if( bGrabFocus )
GrabFocus();
} }
} }

View File

@@ -107,7 +107,7 @@ class AnnotationWindow : public FloatingWindow
SvxLanguageItem GetLanguage(); SvxLanguageItem GetLanguage();
void setAnnotation( const css::uno::Reference< css::office::XAnnotation >& xAnnotation, bool bGrabFocus = false ); void setAnnotation( const css::uno::Reference< css::office::XAnnotation >& xAnnotation );
void ExecuteSlot( sal_uInt16 nSID ); void ExecuteSlot( sal_uInt16 nSID );

View File

@@ -142,8 +142,8 @@ public:
/** Set whether to sort the template entries inside the regions. /** Set whether to sort the template entries inside the regions.
*/ */
void EnableEntrySorting (bool isEntrySortingEnabled = true) void EnableEntrySorting ()
{mbEntrySortingEnabled = isEntrySortingEnabled;} {mbEntrySortingEnabled = true;}
private: private:
/** The current state determines which step will be executed next by /** The current state determines which step will be executed next by

View File

@@ -92,12 +92,8 @@ public:
@param pWindow @param pWindow
The device to update. When the given pointer is NULL then The device to update. When the given pointer is NULL then
nothing is done. nothing is done.
@param pDocument
When given a pointer to a document then tell it to reformat all
text objects. This refomatting is necessary for the new values
to take effect.
*/ */
void Update (OutputDevice* pDevice, SdDrawDocument* pDocument=nullptr) const; void Update (OutputDevice* pDevice) const;
/** Callback that waits for notifications of a /** Callback that waits for notifications of a
<type>SvtCTLOptions</type> object. <type>SvtCTLOptions</type> object.

View File

@@ -95,8 +95,7 @@ public:
static bool StartPreview( ViewShellBase& rBase, static bool StartPreview( ViewShellBase& rBase,
const css::uno::Reference< css::drawing::XDrawPage >& xDrawPage, const css::uno::Reference< css::drawing::XDrawPage >& xDrawPage,
const css::uno::Reference< css::animations::XAnimationNode >& xAnimationNode, const css::uno::Reference< css::animations::XAnimationNode >& xAnimationNode );
vcl::Window* pParent = nullptr );
static void Stop( ViewShellBase& rBase ); static void Stop( ViewShellBase& rBase );

View File

@@ -54,20 +54,16 @@ public:
~AsynchronousCall(); ~AsynchronousCall();
/** Post a function object that is to be executed asynchronously. When /** Post a function object that is to be executed asynchronously. When
this method is called while the current function object has not bee this method is called while the current function object has not been
executed then the later is destroyed and only the given function executed then the latter is destroyed and only the given function
object will be executed. object will be executed.
@param rFunction @param rFunction
The function object that may be called asynchronously in the The function object that may be called asynchronously in the
near future. near future.
@param nTimeoutInMilliseconds
The timeout in milliseconds until the function object is
executed.
*/ */
typedef ::std::function<void ()> AsynchronousFunction; typedef ::std::function<void ()> AsynchronousFunction;
void Post ( void Post (
const AsynchronousFunction& rFunction, const AsynchronousFunction& rFunction);
sal_uInt32 nTimeoutInMilliseconds=10);
private: private:
Timer maTimer; Timer maTimer;

View File

@@ -145,7 +145,7 @@ public:
SdDrawDocument* GetDoc() const { return mpDoc; } SdDrawDocument* GetDoc() const { return mpDoc; }
bool IsImpressDocument() const { return mbImpressDoc; } bool IsImpressDocument() const { return mbImpressDoc; }
void SetModified( bool bModified = true ) throw(); void SetModified() throw();
css::uno::Reference< css::i18n::XForbiddenCharacters > getForbiddenCharsTable(); css::uno::Reference< css::i18n::XForbiddenCharacters > getForbiddenCharsTable();

View File

@@ -104,8 +104,7 @@ public:
void FireContainerChange ( void FireContainerChange (
MasterPageContainerChangeEvent::EventType eType, MasterPageContainerChangeEvent::EventType eType,
Token aToken, Token aToken);
bool bNotifyAsynchronously = false);
virtual bool UpdateDescriptor ( virtual bool UpdateDescriptor (
const SharedMasterPageDescriptor& rpDescriptor, const SharedMasterPageDescriptor& rpDescriptor,
@@ -170,7 +169,6 @@ private:
bool mbContainerCleaningPending; bool mbContainerCleaningPending;
typedef ::std::pair<MasterPageContainerChangeEvent::EventType,Token> EventData; typedef ::std::pair<MasterPageContainerChangeEvent::EventType,Token> EventData;
DECL_LINK_TYPED(AsynchronousNotifyCallback, void*, void);
Image GetPreviewSubstitution (sal_uInt16 nId, PreviewSize ePreviewSize); Image GetPreviewSubstitution (sal_uInt16 nId, PreviewSize ePreviewSize);
@@ -617,18 +615,6 @@ Size MasterPageContainer::Implementation::GetPreviewSizePixel (PreviewSize eSize
return maLargePreviewSizePixel; return maLargePreviewSizePixel;
} }
IMPL_LINK_TYPED(MasterPageContainer::Implementation,AsynchronousNotifyCallback, void*, p, void)
{
EventData* pData = static_cast<EventData*>(p);
const ::osl::MutexGuard aGuard (maMutex);
if (pData != nullptr)
{
FireContainerChange(pData->first, pData->second);
delete pData;
}
}
MasterPageContainer::Token MasterPageContainer::Implementation::PutMasterPage ( MasterPageContainer::Token MasterPageContainer::Implementation::PutMasterPage (
const SharedMasterPageDescriptor& rpDescriptor) const SharedMasterPageDescriptor& rpDescriptor)
{ {
@@ -945,16 +931,7 @@ void MasterPageContainer::Implementation::CleanContainer()
void MasterPageContainer::Implementation::FireContainerChange ( void MasterPageContainer::Implementation::FireContainerChange (
MasterPageContainerChangeEvent::EventType eType, MasterPageContainerChangeEvent::EventType eType,
Token aToken, Token aToken)
bool bNotifyAsynchronously)
{
if (bNotifyAsynchronously)
{
Application::PostUserEvent(
LINK(this,Implementation,AsynchronousNotifyCallback),
new EventData(eType,aToken));
}
else
{ {
::std::vector<Link<MasterPageContainerChangeEvent&,void>> aCopy(maChangeListeners.begin(),maChangeListeners.end()); ::std::vector<Link<MasterPageContainerChangeEvent&,void>> aCopy(maChangeListeners.begin(),maChangeListeners.end());
::std::vector<Link<MasterPageContainerChangeEvent&,void>>::iterator iListener; ::std::vector<Link<MasterPageContainerChangeEvent&,void>>::iterator iListener;
@@ -964,7 +941,6 @@ void MasterPageContainer::Implementation::FireContainerChange (
for (iListener=aCopy.begin(); iListener!=aCopy.end(); ++iListener) for (iListener=aCopy.begin(); iListener!=aCopy.end(); ++iListener)
iListener->Call(aEvent); iListener->Call(aEvent);
} }
}
bool MasterPageContainer::Implementation::UpdateDescriptor ( bool MasterPageContainer::Implementation::UpdateDescriptor (
const SharedMasterPageDescriptor& rpDescriptor, const SharedMasterPageDescriptor& rpDescriptor,

View File

@@ -317,8 +317,7 @@ IMPL_LINK_TYPED(RecentlyUsedMasterPages, MasterPageContainerChangeListener,
} }
void RecentlyUsedMasterPages::AddMasterPage ( void RecentlyUsedMasterPages::AddMasterPage (
MasterPageContainer::Token aToken, MasterPageContainer::Token aToken)
bool bMakePersistent)
{ {
// For the page to be inserted the token has to be valid and the page // For the page to be inserted the token has to be valid and the page
// has to have a valid URL. This excludes master pages that do not come // has to have a valid URL. This excludes master pages that do not come
@@ -349,7 +348,6 @@ void RecentlyUsedMasterPages::AddMasterPage (
mvMasterPages.pop_back (); mvMasterPages.pop_back ();
} }
if (bMakePersistent)
SavePersistentValues (); SavePersistentValues ();
SendEvent(); SendEvent();
} }

View File

@@ -110,15 +110,8 @@ private:
list of most recently used master pages. When the page is already a list of most recently used master pages. When the page is already a
member of that list the associated descriptor is moved to the end of member of that list the associated descriptor is moved to the end of
the list to make it the most recently used entry. the list to make it the most recently used entry.
@param bMakePersistent
When <TRUE/> is given then the new list of recently used master
pages is written back into the configuration to make it
persistent. Giving <FALSE/> to omit this is used while loading
the persistent list from the configuration.
*/ */
void AddMasterPage ( void AddMasterPage(MasterPageContainer::Token aToken);
MasterPageContainer::Token aToken,
bool bMakePersistent = true);
/** Load the list of recently used master pages from the registry where /** Load the list of recently used master pages from the registry where
it was saved to make it persistent. it was saved to make it persistent.

View File

@@ -184,12 +184,11 @@ css::uno::Reference< css::presentation::XSlideShowController > SlideShow::GetSli
bool SlideShow::StartPreview( ViewShellBase& rBase, bool SlideShow::StartPreview( ViewShellBase& rBase,
const css::uno::Reference< css::drawing::XDrawPage >& xDrawPage, const css::uno::Reference< css::drawing::XDrawPage >& xDrawPage,
const css::uno::Reference< css::animations::XAnimationNode >& xAnimationNode, const css::uno::Reference< css::animations::XAnimationNode >& xAnimationNode )
vcl::Window* pParent /* = 0 */ )
{ {
rtl::Reference< SlideShow > xSlideShow( GetSlideShow( rBase ) ); rtl::Reference< SlideShow > xSlideShow( GetSlideShow( rBase ) );
if( xSlideShow.is() ) if( xSlideShow.is() )
return xSlideShow->startPreview( xDrawPage, xAnimationNode, pParent ); return xSlideShow->startPreview( xDrawPage, xAnimationNode );
return false; return false;
} }

View File

@@ -86,9 +86,9 @@ void PageCache::InvalidatePreviewBitmap (
RequestPreviewBitmap(aKey); RequestPreviewBitmap(aKey);
} }
void PageCache::InvalidateCache (const bool bUpdateCache) void PageCache::InvalidateCache()
{ {
mpImplementation->InvalidateCache(bUpdateCache); mpImplementation->InvalidateCache(true);
} }
void PageCache::SetPreciousFlag ( void PageCache::SetPreciousFlag (

View File

@@ -201,9 +201,8 @@ void Animator::CleanUpAnimationList()
maAnimations.swap(aActiveAnimations); maAnimations.swap(aActiveAnimations);
} }
void Animator::RequestNextFrame (const double nFrameStart) void Animator::RequestNextFrame ()
{ {
(void)nFrameStart;
if ( ! maIdle.IsActive()) if ( ! maIdle.IsActive())
{ {
// Prevent redraws except for the ones in TimeoutHandler. While the // Prevent redraws except for the ones in TimeoutHandler. While the

View File

@@ -216,12 +216,12 @@ void Clipboard::HandleSlotCall (SfxRequest& rRequest)
} }
} }
void Clipboard::DoCut (vcl::Window* pWindow) void Clipboard::DoCut ()
{ {
if (mrSlideSorter.GetModel().GetPageCount() > 1) if (mrSlideSorter.GetModel().GetPageCount() > 1)
{ {
DoCopy(pWindow); DoCopy();
DoDelete(pWindow); DoDelete();
} }
} }
@@ -238,13 +238,13 @@ void Clipboard::DoCopy (vcl::Window* pWindow )
CreateSlideTransferable( pWindow, false ); CreateSlideTransferable( pWindow, false );
} }
void Clipboard::DoPaste (vcl::Window* pWindow) void Clipboard::DoPaste ()
{ {
SdTransferable* pClipTransferable = SD_MOD()->pTransferClip; SdTransferable* pClipTransferable = SD_MOD()->pTransferClip;
if (pClipTransferable!=nullptr && pClipTransferable->IsPageTransferable()) if (pClipTransferable!=nullptr && pClipTransferable->IsPageTransferable())
{ {
sal_Int32 nInsertPosition = GetInsertionPosition(pWindow); sal_Int32 nInsertPosition = GetInsertionPosition(nullptr);
if (nInsertPosition >= 0) if (nInsertPosition >= 0)
{ {

View File

@@ -166,13 +166,11 @@ void PageSelector::SelectPage (const SharedPageDescriptor& rpDescriptor)
} }
} }
void PageSelector::DeselectPage ( void PageSelector::DeselectPage (int nPageIndex)
int nPageIndex,
const bool bUpdateCurrentPage)
{ {
model::SharedPageDescriptor pDescriptor (mrModel.GetPageDescriptor(nPageIndex)); model::SharedPageDescriptor pDescriptor (mrModel.GetPageDescriptor(nPageIndex));
if (pDescriptor.get() != nullptr) if (pDescriptor.get() != nullptr)
DeselectPage(pDescriptor, bUpdateCurrentPage); DeselectPage(pDescriptor);
} }
void PageSelector::DeselectPage ( void PageSelector::DeselectPage (

View File

@@ -201,9 +201,8 @@ void SelectionManager::DeleteSelectedMasterPages (const ::std::vector<SdPage*>&
} }
} }
void SelectionManager::SelectionHasChanged (const bool bMakeSelectionVisible) void SelectionManager::SelectionHasChanged ()
{ {
if (bMakeSelectionVisible)
mbIsMakeSelectionVisiblePending = true; mbIsMakeSelectionVisiblePending = true;
ViewShell* pViewShell = mrSlideSorter.GetViewShell(); ViewShell* pViewShell = mrSlideSorter.GetViewShell();

View File

@@ -134,12 +134,8 @@ public:
/** Call this method when all preview bitmaps have to be generated anew. /** Call this method when all preview bitmaps have to be generated anew.
This is the case when the size of the page objects on the screen has This is the case when the size of the page objects on the screen has
changed or when the model has changed. changed or when the model has changed.
@param bUpdateCache
When this flags is <TRUE/> then requests for updated previews
are created. When it is <FALSE/> the existing previews are only
marked as not being up-to-date anymore.
*/ */
void InvalidateCache (const bool bUpdateCache = true); void InvalidateCache ();
/** With the precious flag you can control whether a bitmap can be /** With the precious flag you can control whether a bitmap can be
removed or reduced in size to make room for other bitmaps or is so removed or reduced in size to make room for other bitmaps or is so

View File

@@ -120,7 +120,7 @@ private:
*/ */
void CleanUpAnimationList(); void CleanUpAnimationList();
void RequestNextFrame (const double nFrameStart = 0); void RequestNextFrame();
}; };
} } } // end of namespace ::sd::slidesorter::controller } } } // end of namespace ::sd::slidesorter::controller

View File

@@ -72,11 +72,11 @@ public:
void HandleSlotCall (SfxRequest& rRequest); void HandleSlotCall (SfxRequest& rRequest);
void DoCut (vcl::Window* pWindow = nullptr); void DoCut ();
// Exported for unit test // Exported for unit test
SD_DLLPUBLIC void DoCopy(vcl::Window* pWindow = nullptr); SD_DLLPUBLIC void DoCopy(vcl::Window* pWindow = nullptr);
// Exported for unit test // Exported for unit test
SD_DLLPUBLIC void DoPaste(vcl::Window* pWindow = nullptr); SD_DLLPUBLIC void DoPaste();
void DoDelete (vcl::Window* pWindow = nullptr); void DoDelete (vcl::Window* pWindow = nullptr);
void StartDrag ( void StartDrag (

View File

@@ -93,13 +93,10 @@ public:
bool IsPageSelected (int nPageIndex); bool IsPageSelected (int nPageIndex);
/** Deselect the descriptor that is associated with the given page. /** Deselect the descriptor that is associated with the given page.
@param bUpdateCurrentPage The current page is updated to the first slide
When <TRUE/> then the current page is updated to the first slide
of the remaining selection. of the remaining selection.
*/ */
void DeselectPage ( void DeselectPage (int nPageIndex);
int nPageIndex,
const bool bUpdateCurrentPage = true);
void DeselectPage ( void DeselectPage (
const model::SharedPageDescriptor& rpDescriptor, const model::SharedPageDescriptor& rpDescriptor,
const bool bUpdateCurrentPage = true); const bool bUpdateCurrentPage = true);

View File

@@ -69,7 +69,7 @@ public:
calls to the PageSelector) to invalidate the relevant slots and send calls to the PageSelector) to invalidate the relevant slots and send
appropriate events. appropriate events.
*/ */
void SelectionHasChanged (const bool bMakeSelectionVisible = true); void SelectionHasChanged ();
/** Add a listener that is called when the selection of the slide sorter /** Add a listener that is called when the selection of the slide sorter
changes. changes.

View File

@@ -140,8 +140,7 @@ private:
SharedPageObjectRun GetRun ( SharedPageObjectRun GetRun (
view::Layouter& rLayouter, view::Layouter& rLayouter,
const InsertPosition& rInsertPosition, const InsertPosition& rInsertPosition);
const bool bCreate = true);
RunContainer::const_iterator FindRun (const sal_Int32 nRunIndex) const; RunContainer::const_iterator FindRun (const sal_Int32 nRunIndex) const;
}; };
@@ -206,8 +205,7 @@ void InsertAnimator::Implementation::SetInsertPosition (
SharedPageObjectRun InsertAnimator::Implementation::GetRun ( SharedPageObjectRun InsertAnimator::Implementation::GetRun (
view::Layouter& rLayouter, view::Layouter& rLayouter,
const InsertPosition& rInsertPosition, const InsertPosition& rInsertPosition)
const bool bCreate)
{ {
const sal_Int32 nRow (rInsertPosition.GetRow()); const sal_Int32 nRow (rInsertPosition.GetRow());
if (nRow < 0) if (nRow < 0)
@@ -217,7 +215,7 @@ SharedPageObjectRun InsertAnimator::Implementation::GetRun (
if (rLayouter.GetColumnCount() == 1) if (rLayouter.GetColumnCount() == 1)
{ {
// There is only one run that contains all slides. // There is only one run that contains all slides.
if (maRuns.empty() && bCreate) if (maRuns.empty())
maRuns.insert(SharedPageObjectRun(new PageObjectRun( maRuns.insert(SharedPageObjectRun(new PageObjectRun(
*this, *this,
0, 0,
@@ -228,7 +226,7 @@ SharedPageObjectRun InsertAnimator::Implementation::GetRun (
else else
{ {
iRun = FindRun(nRow); iRun = FindRun(nRow);
if (iRun == maRuns.end() && bCreate) if (iRun == maRuns.end())
{ {
// Create a new run. // Create a new run.
const sal_Int32 nStartIndex (rLayouter.GetIndex(nRow, 0)); const sal_Int32 nStartIndex (rLayouter.GetIndex(nRow, 0));

View File

@@ -37,12 +37,10 @@ AsynchronousCall::~AsynchronousCall()
maTimer.Stop(); maTimer.Stop();
} }
void AsynchronousCall::Post ( void AsynchronousCall::Post (const AsynchronousFunction& rFunction)
const AsynchronousFunction& rFunction,
sal_uInt32 nTimeoutInMilliseconds)
{ {
mpFunction.reset(new AsynchronousFunction(rFunction)); mpFunction.reset(new AsynchronousFunction(rFunction));
maTimer.SetTimeout(nTimeoutInMilliseconds); maTimer.SetTimeout(10);
maTimer.Start(); maTimer.Start();
} }

View File

@@ -693,7 +693,7 @@ sal_Bool SAL_CALL SdLayerManager::hasElements() throw(uno::RuntimeException, std
* If something was changed at the layers, this methods takes care that the * If something was changed at the layers, this methods takes care that the
* changes are made visible in sdbcx::View. * changes are made visible in sdbcx::View.
*/ */
void SdLayerManager::UpdateLayerView( bool modify ) const throw() void SdLayerManager::UpdateLayerView() const throw()
{ {
if(mpModel->mpDocShell) if(mpModel->mpDocShell)
{ {
@@ -706,7 +706,6 @@ void SdLayerManager::UpdateLayerView( bool modify ) const throw()
pDrViewSh->ChangeEditMode(pDrViewSh->GetEditMode(), bLayerMode); pDrViewSh->ChangeEditMode(pDrViewSh->GetEditMode(), bLayerMode);
} }
if(modify)
mpModel->mpDoc->SetChanged(); mpModel->mpDoc->SetChanged();
} }
} }

View File

@@ -170,7 +170,7 @@ private:
::sd::View* GetView() const throw(); ::sd::View* GetView() const throw();
::sd::DrawDocShell* GetDocShell() const throw() { return mpModel->mpDocShell; } ::sd::DrawDocShell* GetDocShell() const throw() { return mpModel->mpDocShell; }
void UpdateLayerView( bool modify = true ) const throw(); void UpdateLayerView() const throw();
}; };
#endif #endif

View File

@@ -563,10 +563,10 @@ SdPage* SdXImpressDocument::InsertSdPage( sal_uInt16 nPage, bool bDuplicate )
return pStandardPage; return pStandardPage;
} }
void SdXImpressDocument::SetModified( bool bModified /* = sal_True */ ) throw() void SdXImpressDocument::SetModified() throw()
{ {
if( mpDoc ) if( mpDoc )
mpDoc->SetChanged( bModified ); mpDoc->SetChanged();
} }
// XModel // XModel

View File

@@ -82,14 +82,11 @@ void WindowUpdater::SetDocument (SdDrawDocument* pDocument)
} }
void WindowUpdater::Update ( void WindowUpdater::Update (
OutputDevice* pDevice, OutputDevice* pDevice) const
SdDrawDocument* pDocument) const
{ {
if (pDevice != nullptr) if (pDevice != nullptr)
{ {
UpdateWindow (pDevice); UpdateWindow (pDevice);
if (pDocument != nullptr)
pDocument->ReformatAllTextObjects();
} }
} }