loplugin:constantparam in sfx2

Change-Id: I53e690ab8d50fb3ce43ba633fc018e7b66e591cd
Reviewed-on: https://gerrit.libreoffice.org/23321
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
This commit is contained in:
Noel Grandin 2016-03-17 11:21:56 +02:00 committed by Noel Grandin
parent 336d816176
commit db93b92d78
53 changed files with 111 additions and 159 deletions

View File

@ -86,7 +86,7 @@ SfxPrinter* Shell::GetPrinter( bool bCreate )
return nullptr;
}
sal_uInt16 Shell::SetPrinter( SfxPrinter *pNewPrinter, SfxPrinterChangeFlags , bool )
sal_uInt16 Shell::SetPrinter( SfxPrinter *pNewPrinter, SfxPrinterChangeFlags )
{
DocShell* pDocShell = static_cast<DocShell*>(GetViewFrame()->GetObjectShell());
assert(pDocShell && "DocShell ?!");

View File

@ -170,7 +170,7 @@ public:
// virtual sal_uInt16 Print( SfxProgress &rProgress, sal_Bool bIsAPI, PrintDialog *pPrintDialog = 0 );
virtual SfxPrinter* GetPrinter( bool bCreate ) override;
virtual sal_uInt16 SetPrinter( SfxPrinter *pNewPrinter, SfxPrinterChangeFlags nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=false ) override;
virtual sal_uInt16 SetPrinter( SfxPrinter *pNewPrinter, SfxPrinterChangeFlags nDiffFlags = SFX_PRINTER_ALL ) override;
virtual OUString GetSelectionText( bool bCompleteWords ) override;
virtual bool HasSelection( bool bText ) const override;

View File

@ -404,7 +404,7 @@ IMPL_LINK_NOARG_TYPED(SvxHyperlinkInternetTp, ClickBrowseHdl_Impl, Button*, void
SfxBoolItem aBrowse( SID_BROWSE, true );
const SfxPoolItem *ppItems[] = { &aName, &aNewView, &aSilent, &aReadOnly, &aRefererItem, &aBrowse, nullptr };
static_cast<SvxHpLinkDlg*>(mpDialog.get())->GetBindings()->Execute( SID_OPENDOC, ppItems, 0, SfxCallMode::ASYNCHRON | SfxCallMode::RECORD );
static_cast<SvxHpLinkDlg*>(mpDialog.get())->GetBindings()->Execute( SID_OPENDOC, ppItems, SfxCallMode::ASYNCHRON | SfxCallMode::RECORD );
}
void SvxHyperlinkInternetTp::RefreshMarkWindow()

View File

@ -1006,9 +1006,9 @@ AbstractDialogFactory_Impl::CreateScriptErrorDialog(const css::uno::Any& rExcept
AbstractScriptSelectorDialog*
AbstractDialogFactory_Impl::CreateScriptSelectorDialog(
vcl::Window* pParent, bool bShowSlots, const Reference< frame::XFrame >& _rxFrame )
vcl::Window* pParent, const Reference< frame::XFrame >& _rxFrame )
{
VclPtrInstance<SvxScriptSelectorDialog> pDlg(pParent, bShowSlots, _rxFrame);
VclPtrInstance<SvxScriptSelectorDialog> pDlg(pParent, false/*bShowSlots*/, _rxFrame);
return new AbstractScriptSelectorDialog_Impl(pDlg);
}

View File

@ -627,7 +627,6 @@ public:
virtual AbstractScriptSelectorDialog*
CreateScriptSelectorDialog(
vcl::Window* pParent,
bool bShowSlots,
const css::uno::Reference< css::frame::XFrame >& _rxFrame
) override;

View File

@ -147,7 +147,7 @@ public:
/**
* @param pArgs Takes ownership
*/
sal_uIntPtr LoadTemplate( SfxObjectShellLock& xDoc, const OUString& rFileName, bool bCopy=true, SfxItemSet* pArgs = nullptr );
sal_uIntPtr LoadTemplate( SfxObjectShellLock& xDoc, const OUString& rFileName, SfxItemSet* pArgs = nullptr );
vcl::Window* GetTopWindow() const;
// members

View File

@ -170,11 +170,9 @@ public:
const SfxPoolItem* ExecuteSynchron( sal_uInt16 nSlot,
const SfxPoolItem **pArgs = nullptr,
sal_uInt16 nModi = 0,
const SfxPoolItem **pInternalArgs = nullptr);
bool Execute( sal_uInt16 nSlot,
const SfxPoolItem **pArgs = nullptr,
sal_uInt16 nModi = 0,
SfxCallMode nCall = SfxCallMode::SLOT,
const SfxPoolItem **pInternalArgs = nullptr);

View File

@ -82,7 +82,7 @@ class SFX2_DLLPUBLIC SfxDispatcher
private:
// Search for temporary evaluated Todos
SAL_DLLPRIVATE bool CheckVirtualStack( const SfxShell& rShell, bool bDeep );
SAL_DLLPRIVATE bool CheckVirtualStack( const SfxShell& rShell );
friend class SfxApplication;
friend class SfxViewFrame;
@ -137,11 +137,6 @@ public:
SfxCallMode nCall,
const SfxItemSet &rArgs );
const SfxPoolItem* Execute( sal_uInt16 nSlot,
SfxCallMode nCall,
sal_uInt16 nModi,
const SfxItemSet &rArgs );
const SfxSlot* GetSlot( const OUString& rCommand );
bool IsActive( const SfxShell& rShell );

View File

@ -97,7 +97,7 @@ public:
sal_uInt32 GuessFilterIgnoringContent( SfxMedium& rMedium, std::shared_ptr<const SfxFilter>& ) const;
sal_uInt32 GuessFilter( SfxMedium& rMedium, std::shared_ptr<const SfxFilter>& , SfxFilterFlags nMust = SfxFilterFlags::IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const;
sal_uInt32 GuessFilterControlDefaultUI( SfxMedium& rMedium, std::shared_ptr<const SfxFilter>&, SfxFilterFlags nMust = SfxFilterFlags::IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED, bool bDefUI = true ) const;
sal_uInt32 GuessFilterControlDefaultUI( SfxMedium& rMedium, std::shared_ptr<const SfxFilter>&, SfxFilterFlags nMust = SfxFilterFlags::IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const;
sal_uInt32 DetectFilter( SfxMedium& rMedium, std::shared_ptr<const SfxFilter>& ) const;
std::shared_ptr<const SfxFilter> GetFilter4Mime( const OUString& rMime, SfxFilterFlags nMust = SfxFilterFlags::IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED) const;

View File

@ -109,7 +109,7 @@ protected:
SAL_DLLPRIVATE void RemoveChildFrame_Impl( SfxFrame* );
SfxFrame( ); // not implemented
SAL_DLLPRIVATE SfxFrame( vcl::Window& i_rContainerWindow, bool bHidden );
SAL_DLLPRIVATE SfxFrame( vcl::Window& i_rContainerWindow );
public:
static SfxFrame* Create( const css::uno::Reference< css::frame::XFrame >& xFrame );

View File

@ -139,7 +139,6 @@ public:
virtual AbstractScriptSelectorDialog*
CreateScriptSelectorDialog(
vcl::Window* pParent,
bool bShowSlots,
const css::uno::Reference< css::frame::XFrame >& _rxFrame
) = 0;

View File

@ -27,7 +27,7 @@ public:
virtual void showRegion (ThumbnailViewItem *pItem) override;
bool loadRepository (TemplateRepository* pRepository, bool bRefresh);
bool loadRepository (TemplateRepository* pRepository);
virtual sal_uInt16 createRegion (const OUString &rName) override;

View File

@ -238,7 +238,7 @@ public:
// Printing Interface
virtual SfxPrinter* GetPrinter( bool bCreate = false );
virtual sal_uInt16 SetPrinter( SfxPrinter *pNewPrinter, SfxPrinterChangeFlags nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=false );
virtual sal_uInt16 SetPrinter( SfxPrinter *pNewPrinter, SfxPrinterChangeFlags nDiffFlags = SFX_PRINTER_ALL );
virtual bool HasPrintOptionsPage() const;
virtual VclPtr<SfxTabPage> CreatePrintOptionsPage( vcl::Window *pParent, const SfxItemSet &rOptions );
static JobSetup GetJobSetup();
@ -248,7 +248,7 @@ public:
virtual void WriteUserData( OUString&, bool bBrowse = false );
virtual void ReadUserData( const OUString&, bool bBrowse = false );
virtual void WriteUserDataSequence ( css::uno::Sequence < css::beans::PropertyValue >& );
virtual void ReadUserDataSequence ( const css::uno::Sequence < css::beans::PropertyValue >&, bool bBrowse = false );
virtual void ReadUserDataSequence ( const css::uno::Sequence < css::beans::PropertyValue >& );
virtual void QueryObjAreaPixel( Rectangle& rRect ) const;
virtual SfxObjectShell* GetObjectShell() override;

View File

@ -405,7 +405,6 @@ public:
virtual AbstractScriptSelectorDialog*
CreateScriptSelectorDialog(
vcl::Window* pParent,
bool bShowSlots,
const css::uno::Reference< css::frame::XFrame >& _rxFrame
) override = 0;

View File

@ -72,7 +72,7 @@ protected:
virtual void ReadUserData(const OUString &, bool bBrowse = false) override;
virtual void WriteUserDataSequence (css::uno::Sequence < css::beans::PropertyValue >& ) override;
virtual void ReadUserDataSequence (const css::uno::Sequence < css::beans::PropertyValue >&, bool bBrowse = false ) override;
virtual void ReadUserDataSequence (const css::uno::Sequence < css::beans::PropertyValue >& ) override;
public:
SFX_DECL_INTERFACE(SCID_PREVIEW_SHELL)
@ -104,7 +104,7 @@ public:
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
virtual SfxPrinter* GetPrinter( bool bCreate = false ) override;
virtual sal_uInt16 SetPrinter( SfxPrinter* pNewPrinter, SfxPrinterChangeFlags nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=false ) override;
virtual sal_uInt16 SetPrinter( SfxPrinter* pNewPrinter, SfxPrinterChangeFlags nDiffFlags = SFX_PRINTER_ALL ) override;
virtual bool HasPrintOptionsPage() const override;
virtual VclPtr<SfxTabPage> CreatePrintOptionsPage( vcl::Window *pParent, const SfxItemSet &rOptions ) override;

View File

@ -205,7 +205,7 @@ protected:
virtual void WriteUserData(OUString &, bool bBrowse = false) override;
virtual void ReadUserData(const OUString &, bool bBrowse = false) override;
virtual void WriteUserDataSequence (css::uno::Sequence < css::beans::PropertyValue >& ) override;
virtual void ReadUserDataSequence (const css::uno::Sequence < css::beans::PropertyValue >&, bool bBrowse = false ) override;
virtual void ReadUserDataSequence (const css::uno::Sequence < css::beans::PropertyValue >& ) override;
virtual void UIDeactivated( SfxInPlaceClient* pClient ) override;
@ -322,7 +322,7 @@ public:
// Drucken:
virtual SfxPrinter* GetPrinter( bool bCreate = false ) override;
virtual sal_uInt16 SetPrinter( SfxPrinter* pNewPrinter,
SfxPrinterChangeFlags nDiffFlags = SFX_PRINTER_ALL, bool bIsApi=false ) override;
SfxPrinterChangeFlags nDiffFlags = SFX_PRINTER_ALL ) override;
virtual bool HasPrintOptionsPage() const override;
virtual VclPtr<SfxTabPage> CreatePrintOptionsPage( vcl::Window *pParent, const SfxItemSet &rOptions ) override;

View File

@ -518,7 +518,7 @@ SfxPrinter* ScPreviewShell::GetPrinter( bool bCreate )
return pDocShell->GetPrinter(bCreate);
}
sal_uInt16 ScPreviewShell::SetPrinter( SfxPrinter *pNewPrinter, SfxPrinterChangeFlags nDiffFlags, bool )
sal_uInt16 ScPreviewShell::SetPrinter( SfxPrinter *pNewPrinter, SfxPrinterChangeFlags nDiffFlags )
{
return pDocShell->SetPrinter( pNewPrinter, nDiffFlags );
}
@ -953,7 +953,7 @@ void ScPreviewShell::WriteUserDataSequence(uno::Sequence < beans::PropertyValue
}
}
void ScPreviewShell::ReadUserDataSequence(const uno::Sequence < beans::PropertyValue >& rSeq, bool /* bBrowse */)
void ScPreviewShell::ReadUserDataSequence(const uno::Sequence < beans::PropertyValue >& rSeq)
{
sal_Int32 nCount(rSeq.getLength());
if (nCount)

View File

@ -483,7 +483,7 @@ void ScTabViewShell::ReadUserData(const OUString& rData, bool /* bBrowse */)
DoReadUserData( rData );
}
void ScTabViewShell::ReadUserDataSequence (const uno::Sequence < beans::PropertyValue >& rSettings, bool /* bBrowse */ )
void ScTabViewShell::ReadUserDataSequence (const uno::Sequence < beans::PropertyValue >& rSettings )
{
if ( !GetViewData().GetDocShell()->IsPreview() )
DoReadUserDataSequence( rSettings );
@ -1040,7 +1040,7 @@ SfxPrinter* ScTabViewShell::GetPrinter( bool bCreate )
return GetViewData().GetDocShell()->GetPrinter(bCreate);
}
sal_uInt16 ScTabViewShell::SetPrinter( SfxPrinter *pNewPrinter, SfxPrinterChangeFlags nDiffFlags, bool )
sal_uInt16 ScTabViewShell::SetPrinter( SfxPrinter *pNewPrinter, SfxPrinterChangeFlags nDiffFlags )
{
return GetViewData().GetDocShell()->SetPrinter( pNewPrinter, nDiffFlags );
}

View File

@ -497,7 +497,7 @@ SfxFrame* SdModule::CreateFromTemplate( const OUString& rTemplatePath, const Ref
SfxItemSet* pSet = new SfxAllItemSet( SfxGetpApp()->GetPool() );
pSet->Put( SfxBoolItem( SID_TEMPLATE, true ) );
sal_uLong lErr = SfxGetpApp()->LoadTemplate( xDocShell, rTemplatePath, true, pSet );
sal_uLong lErr = SfxGetpApp()->LoadTemplate( xDocShell, rTemplatePath, pSet );
SfxObjectShell* pDocShell = xDocShell;

View File

@ -1469,7 +1469,7 @@ void AssistentDlgImpl::UpdatePreview( bool bDocPreview )
if(bDocPreview)
pSet->Put( SfxBoolItem( SID_PREVIEW, true ) );
RestorePassword( pSet, aDocFile );
if( (lErr = pSfxApp->LoadTemplate( xDocShell, aDocFile, true, pSet )) != 0 )
if( (lErr = pSfxApp->LoadTemplate( xDocShell, aDocFile, pSet )) != 0 )
ErrorHandler::HandleError(lErr);
else
SavePassword( xDocShell, aDocFile );
@ -1513,7 +1513,7 @@ void AssistentDlgImpl::UpdatePreview( bool bDocPreview )
pSet->Put( SfxBoolItem( SID_PREVIEW, true ) );
RestorePassword( pSet, aLayoutFile );
if( (lErr = pSfxApp->LoadTemplate( xLayoutDocShell, aLayoutFile, true, pSet )) != 0 )
if( (lErr = pSfxApp->LoadTemplate( xLayoutDocShell, aLayoutFile, pSet )) != 0 )
ErrorHandler::HandleError(lErr);
SavePassword( xLayoutDocShell, aLayoutFile );
}

View File

@ -136,7 +136,7 @@ public:
/// Forwarded to the print manager.
virtual sal_uInt16 SetPrinter (
SfxPrinter* pNewPrinter,
SfxPrinterChangeFlags nDiffFlags = SFX_PRINTER_ALL, bool bIsApi=false) override;
SfxPrinterChangeFlags nDiffFlags = SFX_PRINTER_ALL) override;
/// Forward methods to main sub shell.
virtual void WriteUserDataSequence (
@ -147,8 +147,7 @@ public:
pane.
*/
virtual void ReadUserDataSequence (
const css::uno::Sequence< css::beans::PropertyValue >&,
bool bBrowse = false) override;
const css::uno::Sequence< css::beans::PropertyValue >&) override;
virtual void UIActivating( SfxInPlaceClient* ) override;
virtual void UIDeactivated( SfxInPlaceClient* ) override;

View File

@ -155,7 +155,7 @@ SdPage* TemplatePageObjectProvider::operator() (SdDrawDocument* pContainerDocume
SfxItemSet* pSet = new SfxAllItemSet (pSfxApp->GetPool());
pSet->Put (SfxBoolItem (SID_TEMPLATE, true));
pSet->Put (SfxBoolItem (SID_PREVIEW, true));
if (pSfxApp->LoadTemplate (mxDocumentShell, sFileName, true, pSet))
if (pSfxApp->LoadTemplate (mxDocumentShell, sFileName, pSet))
{
mxDocumentShell = nullptr;
}

View File

@ -528,8 +528,7 @@ SfxPrinter* ViewShellBase::GetPrinter (bool bCreate)
sal_uInt16 ViewShellBase::SetPrinter (
SfxPrinter* pNewPrinter,
SfxPrinterChangeFlags nDiffFlags,
bool bIsAPI)
SfxPrinterChangeFlags nDiffFlags)
{
OSL_ASSERT(mpImpl.get()!=nullptr);
@ -545,14 +544,6 @@ sal_uInt16 ViewShellBase::SetPrinter (
Size aNewSize = pNewPrinter->GetOutputSize();
bool bScaleAll = false;
if ( bIsAPI )
{
ScopedVclPtrInstance<WarningBox> aWarnBox (
GetWindow(),
(WinBits)(WB_YES_NO | WB_DEF_YES),
SD_RESSTR(STR_SCALE_OBJS_TO_PAGE));
bScaleAll = (aWarnBox->Execute() == RET_YES);
}
std::shared_ptr<DrawViewShell> pDrawViewShell (
std::dynamic_pointer_cast<DrawViewShell>(GetMainViewShell()));
@ -696,14 +687,13 @@ void ViewShellBase::WriteUserDataSequence (
}
void ViewShellBase::ReadUserDataSequence (
const css::uno::Sequence< css::beans::PropertyValue >& rSequence,
bool bBrowse)
const css::uno::Sequence< css::beans::PropertyValue >& rSequence)
{
// Forward call to main sub shell.
ViewShell* pShell = GetMainViewShell().get();
if (pShell != nullptr)
{
pShell->ReadUserDataSequence (rSequence, bBrowse);
pShell->ReadUserDataSequence (rSequence, true/*bBrowse*/);
// For certain shell types ReadUserDataSequence may have changed the
// type to another one. Make sure that the center pane shows the

View File

@ -535,7 +535,7 @@ SfxApplication::ChooseScript()
uno::Reference< frame::XFrame > xFrame( pFrame ? pFrame->GetFrameInterface() : uno::Reference< frame::XFrame >() );
std::unique_ptr<AbstractScriptSelectorDialog> pDlg(
pFact->CreateScriptSelectorDialog( nullptr, false, xFrame ));
pFact->CreateScriptSelectorDialog( nullptr, xFrame ));
SAL_INFO( "sfx.appl", "done, now exec it");

View File

@ -278,7 +278,7 @@ sal_uInt32 CheckPasswd_Impl
}
sal_uIntPtr SfxApplication::LoadTemplate( SfxObjectShellLock& xDoc, const OUString &rFileName, bool bCopy, SfxItemSet* pSet )
sal_uIntPtr SfxApplication::LoadTemplate( SfxObjectShellLock& xDoc, const OUString &rFileName, SfxItemSet* pSet )
{
std::shared_ptr<const SfxFilter> pFilter;
SfxMedium aMedium( rFileName, ( StreamMode::READ | StreamMode::SHARE_DENYNONE ) );
@ -348,34 +348,29 @@ sal_uIntPtr SfxApplication::LoadTemplate( SfxObjectShellLock& xDoc, const OUStri
}
}
if( bCopy )
try
{
try
{
// TODO: introduce error handling
// TODO: introduce error handling
uno::Reference< embed::XStorage > xTempStorage = ::comphelper::OStorageHelper::GetTemporaryStorage();
if( !xTempStorage.is() )
throw uno::RuntimeException();
uno::Reference< embed::XStorage > xTempStorage = ::comphelper::OStorageHelper::GetTemporaryStorage();
if( !xTempStorage.is() )
throw uno::RuntimeException();
xDoc->GetStorage()->copyToStorage( xTempStorage );
xDoc->GetStorage()->copyToStorage( xTempStorage );
if ( !xDoc->DoSaveCompleted( new SfxMedium( xTempStorage, OUString() ) ) )
throw uno::RuntimeException();
}
catch( uno::Exception& )
{
xDoc->DoClose();
xDoc.Clear();
// TODO: transfer correct error outside
return ERRCODE_SFX_GENERAL;
}
SetTemplate_Impl( rFileName, OUString(), xDoc );
if ( !xDoc->DoSaveCompleted( new SfxMedium( xTempStorage, OUString() ) ) )
throw uno::RuntimeException();
}
else
SetTemplate_Impl( rFileName, OUString(), xDoc );
catch( uno::Exception& )
{
xDoc->DoClose();
xDoc.Clear();
// TODO: transfer correct error outside
return ERRCODE_SFX_GENERAL;
}
SetTemplate_Impl( rFileName, OUString(), xDoc );
xDoc->SetNoName();
xDoc->InvalidateName();

View File

@ -1151,7 +1151,7 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
do // artificial loop for flow control
{
std::unique_ptr<AbstractScriptSelectorDialog> pDlg(pFact->CreateScriptSelectorDialog(
lcl_getDialogParent( xFrame, GetTopWindow() ), false, xFrame ));
lcl_getDialogParent( xFrame, GetTopWindow() ), xFrame ));
OSL_ENSURE( pDlg, "SfxApplication::OfaExec_Impl( SID_RUNMACRO ): no dialog!" );
if ( !pDlg )
break;

View File

@ -398,7 +398,7 @@ sal_uInt32 SfxFilterMatcher::GuessFilter( SfxMedium& rMedium, std::shared_ptr<c
}
sal_uInt32 SfxFilterMatcher::GuessFilterControlDefaultUI( SfxMedium& rMedium, std::shared_ptr<const SfxFilter>& rpFilter, SfxFilterFlags nMust, SfxFilterFlags nDont, bool /*bDefUI*/ ) const
sal_uInt32 SfxFilterMatcher::GuessFilterControlDefaultUI( SfxMedium& rMedium, std::shared_ptr<const SfxFilter>& rpFilter, SfxFilterFlags nMust, SfxFilterFlags nDont ) const
{
std::shared_ptr<const SfxFilter> pOldFilter = rpFilter;

View File

@ -1038,7 +1038,7 @@ void SfxBindings::Release( SfxControllerItem& rItem )
}
const SfxPoolItem* SfxBindings::ExecuteSynchron( sal_uInt16 nId, const SfxPoolItem** ppItems, sal_uInt16 nModi,
const SfxPoolItem* SfxBindings::ExecuteSynchron( sal_uInt16 nId, const SfxPoolItem** ppItems,
const SfxPoolItem **ppInternalArgs )
{
DBG_ASSERT( pImp->pCaches != nullptr, "SfxBindings not initialized" );
@ -1046,10 +1046,10 @@ const SfxPoolItem* SfxBindings::ExecuteSynchron( sal_uInt16 nId, const SfxPoolIt
if( !nId || !pDispatcher )
return nullptr;
return Execute_Impl( nId, ppItems, nModi, SfxCallMode::SYNCHRON, ppInternalArgs );
return Execute_Impl( nId, ppItems, 0, SfxCallMode::SYNCHRON, ppInternalArgs );
}
bool SfxBindings::Execute( sal_uInt16 nId, const SfxPoolItem** ppItems, sal_uInt16 nModi, SfxCallMode nCallMode,
bool SfxBindings::Execute( sal_uInt16 nId, const SfxPoolItem** ppItems, SfxCallMode nCallMode,
const SfxPoolItem **ppInternalArgs )
{
DBG_ASSERT( pImp->pCaches != nullptr, "SfxBindings not initialized" );
@ -1057,7 +1057,7 @@ bool SfxBindings::Execute( sal_uInt16 nId, const SfxPoolItem** ppItems, sal_uInt
if( !nId || !pDispatcher )
return false;
const SfxPoolItem* pRet = Execute_Impl( nId, ppItems, nModi, nCallMode, ppInternalArgs );
const SfxPoolItem* pRet = Execute_Impl( nId, ppItems, 0, nCallMode, ppInternalArgs );
return ( pRet != nullptr );
}

View File

@ -179,13 +179,13 @@ void SfxDispatcher::Push(SfxShell& rShell)
/** This method checks whether a particular <SfxShell> instance is
on the SfxDispatcher.
@returns sal_True The SfxShell instance is on the SfxDispatcher.
sal_False The SfxShell instance is not on the SfxDispatcher.
@returns true The SfxShell instance is on the SfxDispatcher.
false The SfxShell instance is not on the SfxDispatcher.
*/
bool SfxDispatcher::IsActive(const SfxShell& rShell)
{
return CheckVirtualStack(rShell, true);
return CheckVirtualStack(rShell);
}
/** With this method it can be determined whether the SfxDispatcher is
@ -515,7 +515,7 @@ IMPL_LINK_NOARG_TYPED( SfxDispatcher, EventHdl_Impl, Idle *, void )
This method is intended among other things to make assertions possible
without the side effect of having to flush the SfxDispathcer.
*/
bool SfxDispatcher::CheckVirtualStack(const SfxShell& rShell, bool bDeep)
bool SfxDispatcher::CheckVirtualStack(const SfxShell& rShell)
{
SFX_STACK(SfxDispatcher::CheckVirtualStack);
@ -538,11 +538,7 @@ bool SfxDispatcher::CheckVirtualStack(const SfxShell& rShell, bool bDeep)
}
}
bool bReturn;
if ( bDeep )
bReturn = std::find(aStack.begin(), aStack.end(), &rShell) != aStack.end();
else
bReturn = aStack.back() == &rShell;
bool bReturn = std::find(aStack.begin(), aStack.end(), &rShell) != aStack.end();
return bReturn;
}
@ -989,12 +985,6 @@ const SfxPoolItem* SfxDispatcher::Execute(sal_uInt16 nSlot, SfxCallMode eCall,
*/
const SfxPoolItem* SfxDispatcher::Execute(sal_uInt16 nSlot, SfxCallMode eCall,
const SfxItemSet &rArgs)
{
return Execute( nSlot, eCall, 0, rArgs );
}
const SfxPoolItem* SfxDispatcher::Execute(sal_uInt16 nSlot, SfxCallMode eCall,
sal_uInt16 nModi, const SfxItemSet &rArgs)
{
if ( IsLocked(nSlot) )
return nullptr;
@ -1011,7 +1001,7 @@ const SfxPoolItem* SfxDispatcher::Execute(sal_uInt16 nSlot, SfxCallMode eCall,
pArg = aIter.NextItem() )
MappedPut_Impl( aSet, *pArg );
SfxRequest aReq( nSlot, eCall, aSet );
aReq.SetModifier( nModi );
aReq.SetModifier( 0 );
_Execute( *pShell, *pSlot, aReq, eCall );
return aReq.GetReturnValue();
}

View File

@ -59,10 +59,10 @@ struct SfxObjectUI_Impl
bool bContext;
sal_uInt32 nFeature;
SfxObjectUI_Impl(sal_uInt16 n, sal_uInt32 nId, bool bVis, sal_uInt32 nFeat) :
SfxObjectUI_Impl(sal_uInt16 n, sal_uInt32 nId, sal_uInt32 nFeat) :
nPos(n),
nResId(nId),
bVisible(bVis),
bVisible(true),
bContext(false),
nFeature(nFeat)
{
@ -381,7 +381,7 @@ SfxObjectUI_Impl* CreateObjectBarUI_Impl(sal_uInt16 nPos, sal_uInt32 nResId, sal
if ((nPos & SFX_VISIBILITY_MASK) == 0)
nPos |= SFX_VISIBILITY_STANDARD;
return new SfxObjectUI_Impl(nPos, nResId, true, nFeature);
return new SfxObjectUI_Impl(nPos, nResId, nFeature);
}
sal_uInt32 SfxInterface::GetObjectBarId(sal_uInt16 nNo) const
@ -437,7 +437,7 @@ void SfxInterface::RegisterChildWindow(sal_uInt16 nId, bool bContext)
void SfxInterface::RegisterChildWindow(sal_uInt16 nId, bool bContext, sal_uInt32 nFeature)
{
SfxObjectUI_Impl* pUI = new SfxObjectUI_Impl(0, nId, true, nFeature);
SfxObjectUI_Impl* pUI = new SfxObjectUI_Impl(0, nId, nFeature);
pUI->bContext = bContext;
pImpData->aChildWindows.push_back(pUI);
}

View File

@ -70,12 +70,12 @@ void TemplateRemoteView::showRegion(ThumbnailViewItem * /*pItem*/)
//TODO:
}
bool TemplateRemoteView::loadRepository (TemplateRepository* pItem, bool bRefresh)
bool TemplateRemoteView::loadRepository (TemplateRepository* pItem)
{
if (!pItem)
return false;
if (!pItem->getTemplates().empty() && !bRefresh)
if (!pItem->getTemplates().empty())
{
insertItems(pItem->getTemplates());
return true;

View File

@ -223,7 +223,7 @@ IMPL_LINK_NOARG_TYPED(SfxNewFileDialog_Impl, Update, Idle*, void)
SfxItemSet* pSet = new SfxAllItemSet(pSfxApp->GetPool());
pSet->Put(SfxBoolItem(SID_TEMPLATE, true));
pSet->Put(SfxBoolItem(SID_PREVIEW, true));
lErr = pSfxApp->LoadTemplate(xDocShell, aFileName, true, pSet);
lErr = pSfxApp->LoadTemplate(xDocShell, aFileName, pSet);
if (lErr)
ErrorHandler::HandleError(lErr);
Application::SetDefDialogParent(pParent);

View File

@ -448,14 +448,12 @@ class SfxSaveGuard
public:
SfxSaveGuard(const Reference< frame::XModel >& xModel ,
IMPL_SfxBaseModel_DataContainer* pData ,
bool bRejectConcurrentSaveRequest);
IMPL_SfxBaseModel_DataContainer* pData);
~SfxSaveGuard();
};
SfxSaveGuard::SfxSaveGuard(const Reference< frame::XModel >& xModel ,
IMPL_SfxBaseModel_DataContainer* pData ,
bool bRejectConcurrentSaveRequest)
IMPL_SfxBaseModel_DataContainer* pData)
: m_xModel (xModel)
, m_pData (pData )
, m_pFramesLock(nullptr )
@ -463,13 +461,6 @@ SfxSaveGuard::SfxSaveGuard(const Reference< frame::XModel >& xModel
if ( m_pData->m_bClosed )
throw lang::DisposedException("Object already disposed.");
if (
bRejectConcurrentSaveRequest &&
m_pData->m_bSaving
)
throw io::IOException(
"Concurrent save requests on the same document are not possible.");
m_pData->m_bSaving = true;
m_pFramesLock = new SfxOwnFramesLocker(m_pData->m_pObjectShell);
}
@ -1522,7 +1513,7 @@ void SAL_CALL SfxBaseModel::storeSelf( const Sequence< beans::PropertyValue >
if ( m_pData->m_pObjectShell.Is() )
{
m_pData->m_pObjectShell->AddLog( OSL_LOG_PREFIX "storeSelf" );
SfxSaveGuard aSaveGuard(this, m_pData, false);
SfxSaveGuard aSaveGuard(this, m_pData);
bool bCheckIn = false;
for ( sal_Int32 nInd = 0; nInd < aSeqArgs.getLength(); nInd++ )
@ -1651,7 +1642,7 @@ void SAL_CALL SfxBaseModel::storeAsURL( const OUString& rURL
if ( m_pData->m_pObjectShell.Is() )
{
m_pData->m_pObjectShell->AddLog( OSL_LOG_PREFIX "storeAsURL" );
SfxSaveGuard aSaveGuard(this, m_pData, false);
SfxSaveGuard aSaveGuard(this, m_pData);
impl_store( rURL, rArgs, false );
@ -1692,7 +1683,7 @@ void SAL_CALL SfxBaseModel::storeToURL( const OUString& rURL
if ( m_pData->m_pObjectShell.Is() )
{
m_pData->m_pObjectShell->AddLog( OSL_LOG_PREFIX "storeToURL" );
SfxSaveGuard aSaveGuard(this, m_pData, false);
SfxSaveGuard aSaveGuard(this, m_pData);
try {
impl_store(rURL, rArgs, true);
}
@ -1717,7 +1708,7 @@ void SAL_CALL SfxBaseModel::storeToRecoveryFile( const OUString& i_TargetLocatio
SfxModelGuard aGuard( *this );
// delegate
SfxSaveGuard aSaveGuard( this, m_pData, false );
SfxSaveGuard aSaveGuard( this, m_pData );
impl_store( i_TargetLocation, i_MediaDescriptor, true );
// no need for subsequent calls to storeToRecoveryFile, unless we're modified, again

View File

@ -644,7 +644,7 @@ IMPL_LINK_TYPED(SfxTemplateManagerDlg, RepositoryMenuSelectHdl, Menu*, pMenu, bo
}
}
if (mpRemoteView->loadRepository(pRepository,false))
if (mpRemoteView->loadRepository(pRepository))
switchMainView(false);
}

View File

@ -41,7 +41,7 @@ class CntStaticPoolDefaults_Impl: private boost::noncopyable
SfxItemInfo* m_pItemInfos;
private:
inline void Insert( SfxPoolItem* pItem, sal_uInt16 nSID, bool bPoolable );
inline void Insert( SfxPoolItem* pItem );
public:
explicit CntStaticPoolDefaults_Impl( CntItemPool* pPool );
@ -157,14 +157,13 @@ sal_uInt16 CntItemPool::Release()
inline void CntStaticPoolDefaults_Impl::Insert(
SfxPoolItem* pItem, /* Static Pool Default Item */
sal_uInt16 nSID, bool bPoolable /* Item Info */ )
SfxPoolItem* pItem /* Static Pool Default Item */ )
{
sal_uInt16 nPos = pItem->Which() - WID_CHAOS_START;
m_ppDefaults[ nPos ] = pItem;
m_pItemInfos[ nPos ]._nSID = nSID;
m_pItemInfos[ nPos ]._bPoolable = bPoolable;
m_pItemInfos[ nPos ]._nSID = 0;
m_pItemInfos[ nPos ]._bPoolable = true;
}
@ -185,10 +184,7 @@ CntStaticPoolDefaults_Impl::CntStaticPoolDefaults_Impl( CntItemPool* /*pPool*/ )
{
memset( m_ppDefaults, 0, sizeof( SfxPoolItem* ) * m_nItems );
memset( m_pItemInfos, 0, sizeof( SfxItemInfo ) * m_nItems );
Insert(
new SfxStringItem( WID_CHAOS_START, OUString() ),
0,
true );
Insert( new SfxStringItem( WID_CHAOS_START, OUString() ) );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@ -285,12 +285,12 @@ SfxFrame* SfxFrame::Create( const Reference < XFrame >& i_rFrame )
vcl::Window* pWindow = VCLUnoHelper::GetWindow( i_rFrame->getContainerWindow() );
ENSURE_OR_THROW( pWindow, "frame without container window not allowed" );
SfxFrame* pFrame = new SfxFrame( *pWindow, false );
SfxFrame* pFrame = new SfxFrame( *pWindow );
pFrame->SetFrameInterface_Impl( i_rFrame );
return pFrame;
}
SfxFrame::SfxFrame( vcl::Window& i_rContainerWindow, bool i_bHidden )
SfxFrame::SfxFrame( vcl::Window& i_rContainerWindow )
:SvCompatWeakBase<SfxFrame>( this )
,pParentFrame( nullptr )
,pChildArr( nullptr )
@ -299,7 +299,7 @@ SfxFrame::SfxFrame( vcl::Window& i_rContainerWindow, bool i_bHidden )
{
Construct_Impl();
pImp->bHidden = i_bHidden;
pImp->bHidden = false;
InsertTopFrame_Impl( this );
pImp->pExternalContainerWindow = &i_rContainerWindow;

View File

@ -73,9 +73,9 @@ class SfxBooleanFlagGuard
bool& m_rFlag;
bool m_bLifeValue;
public:
SfxBooleanFlagGuard( bool& bFlag, bool bLifeValue )
SfxBooleanFlagGuard( bool& bFlag )
: m_rFlag( bFlag )
, m_bLifeValue( bLifeValue )
, m_bLifeValue( true )
{
m_rFlag = m_bLifeValue;
}
@ -499,7 +499,7 @@ void SAL_CALL SfxInPlaceClient_Impl::changedPlacement( const awt::Rectangle& aPo
{
// the calculation of the object area has not changed the object size
// it should be done here then
SfxBooleanFlagGuard aGuard( m_bResizeNoScale, true );
SfxBooleanFlagGuard aGuard( m_bResizeNoScale );
// new size of the object area without scaling
Size aNewObjSize( Fraction( aNewLogicRect.GetWidth() ) / m_aScaleWidth,

View File

@ -1416,7 +1416,7 @@ void SfxBaseController::ConnectSfxFrame_Impl( const ConnectSfxFrame i_eConnect )
Sequence< PropertyValue > aViewData;
OSL_VERIFY( xViewData->getByIndex( nViewDataIndex ) >>= aViewData );
if ( aViewData.getLength() > 0 )
m_pData->m_pViewShell->ReadUserDataSequence( aViewData, true );
m_pData->m_pViewShell->ReadUserDataSequence( aViewData );
}
}
catch (const Exception&)

View File

@ -884,7 +884,7 @@ SfxPrinter* SfxViewShell::GetPrinter( bool /*bCreate*/ )
return nullptr;
}
sal_uInt16 SfxViewShell::SetPrinter( SfxPrinter* /*pNewPrinter*/, SfxPrinterChangeFlags /*nDiffFlags*/, bool )
sal_uInt16 SfxViewShell::SetPrinter( SfxPrinter* /*pNewPrinter*/, SfxPrinterChangeFlags /*nDiffFlags*/ )
{
return 0;
}

View File

@ -1399,7 +1399,7 @@ void SfxViewShell::ReadUserData(const OUString&, bool )
{
}
void SfxViewShell::ReadUserDataSequence ( const uno::Sequence < beans::PropertyValue >&, bool )
void SfxViewShell::ReadUserDataSequence ( const uno::Sequence < beans::PropertyValue >& )
{
}

View File

@ -266,7 +266,7 @@ protected:
virtual SfxPrinter *GetPrinter(bool bCreate = false) override;
virtual sal_uInt16 SetPrinter(SfxPrinter *pNewPrinter,
SfxPrinterChangeFlags nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=false) override;
SfxPrinterChangeFlags nDiffFlags = SFX_PRINTER_ALL) override;
void Insert( SfxMedium& rMedium );
void InsertFrom(SfxMedium &rMedium);

View File

@ -1277,7 +1277,7 @@ SfxPrinter* SmViewShell::GetPrinter(bool bCreate)
return nullptr;
}
sal_uInt16 SmViewShell::SetPrinter(SfxPrinter *pNewPrinter, SfxPrinterChangeFlags nDiffFlags, bool )
sal_uInt16 SmViewShell::SetPrinter(SfxPrinter *pNewPrinter, SfxPrinterChangeFlags nDiffFlags )
{
SfxPrinter *pOld = GetDoc()->GetPrinter();
if ( pOld && pOld->IsPrinting() )

View File

@ -384,7 +384,7 @@ public:
virtual ErrCode DoVerb( long nVerb ) override;
virtual sal_uInt16 SetPrinter( SfxPrinter* pNew,
SfxPrinterChangeFlags nDiff = SFX_PRINTER_ALL, bool bIsAPI=false) override;
SfxPrinterChangeFlags nDiff = SFX_PRINTER_ALL) override;
ShellModes GetShellMode();
css::view::XSelectionSupplier* GetUNOObject();
@ -575,7 +575,7 @@ public:
virtual void WriteUserData(OUString &, bool bBrowse = false) override;
virtual void ReadUserData(const OUString &, bool bBrowse = false) override;
virtual void ReadUserDataSequence ( const css::uno::Sequence < css::beans::PropertyValue >&, bool bBrowse ) override;
virtual void ReadUserDataSequence ( const css::uno::Sequence < css::beans::PropertyValue >& ) override;
virtual void WriteUserDataSequence ( css::uno::Sequence < css::beans::PropertyValue >& ) override;
void SetCursorAtTop( bool bFlag, bool bCenter = false )

View File

@ -1316,7 +1316,7 @@ void SwSidebarWin::ExecuteCommand(sal_uInt16 nSlot)
case FN_DELETE_ALL_NOTES:
case FN_HIDE_ALL_NOTES:
// not possible as slot as this would require that "this" is the active postit
mrView.GetViewFrame()->GetBindings().Execute( nSlot, nullptr, 0, SfxCallMode::ASYNCHRON );
mrView.GetViewFrame()->GetBindings().Execute( nSlot, nullptr, SfxCallMode::ASYNCHRON );
break;
case FN_DELETE_NOTE_AUTHOR:
case FN_HIDE_NOTE_AUTHOR:
@ -1326,7 +1326,7 @@ void SwSidebarWin::ExecuteCommand(sal_uInt16 nSlot)
const SfxPoolItem* aItems[2];
aItems[0] = &aItem;
aItems[1] = nullptr;
mrView.GetViewFrame()->GetBindings().Execute( nSlot, aItems, 0, SfxCallMode::ASYNCHRON );
mrView.GetViewFrame()->GetBindings().Execute( nSlot, aItems, SfxCallMode::ASYNCHRON );
}
break;
default:

View File

@ -3318,7 +3318,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
if (!comphelper::LibreOfficeKit::isActive())
{
GetView().GetViewFrame()->GetBindings().Execute(
FN_FORMAT_GRAFIC_DLG, nullptr, 0,
FN_FORMAT_GRAFIC_DLG, nullptr,
SfxCallMode::RECORD|SfxCallMode::SLOT);
}
return;
@ -3337,7 +3337,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
if (!comphelper::LibreOfficeKit::isActive())
{
GetView().GetViewFrame()->GetBindings().Execute(
FN_FORMAT_FRAME_DLG, nullptr, 0,
FN_FORMAT_FRAME_DLG, nullptr,
SfxCallMode::RECORD|SfxCallMode::SLOT);
}
return;

View File

@ -199,7 +199,7 @@ class SW_DLLPUBLIC SwPagePreview: public SfxViewShell
SAL_DLLPRIVATE bool ChgPage( int eMvMode, bool bUpdateScrollbar = true );
SAL_DLLPRIVATE virtual SfxPrinter* GetPrinter( bool bCreate = false ) override;
SAL_DLLPRIVATE virtual sal_uInt16 SetPrinter( SfxPrinter *pNewPrinter, SfxPrinterChangeFlags nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=false ) override;
SAL_DLLPRIVATE virtual sal_uInt16 SetPrinter( SfxPrinter *pNewPrinter, SfxPrinterChangeFlags nDiffFlags = SFX_PRINTER_ALL ) override;
SAL_DLLPRIVATE virtual bool HasPrintOptionsPage() const override;
SAL_DLLPRIVATE virtual VclPtr<SfxTabPage> CreatePrintOptionsPage(vcl::Window *pParent, const SfxItemSet &rOptions ) override;

View File

@ -76,7 +76,7 @@ public:
void Load(SwDocShell* pDocShell);
virtual sal_uInt16 SetPrinter( SfxPrinter* pNew, SfxPrinterChangeFlags nDiff = SFX_PRINTER_ALL, bool bIsAPI=false ) override;
virtual sal_uInt16 SetPrinter( SfxPrinter* pNew, SfxPrinterChangeFlags nDiff = SFX_PRINTER_ALL ) override;
virtual SfxPrinter* GetPrinter( bool bCreate = false ) override;
sal_Int32 PrintSource( OutputDevice *pOutDev, sal_Int32 nPage, bool bCalcNumPagesOnly );

View File

@ -392,7 +392,7 @@ void SwInputWindow::ApplyFormula()
const SfxPoolItem* aArgs[2];
aArgs[0] = &aParam;
aArgs[1] = nullptr;
pView->GetViewFrame()->GetBindings().Execute( FN_EDIT_FORMULA, aArgs, 0, SfxCallMode::ASYNCHRON );
pView->GetViewFrame()->GetBindings().Execute( FN_EDIT_FORMULA, aArgs, SfxCallMode::ASYNCHRON );
}
void SwInputWindow::CancelFormula()

View File

@ -509,7 +509,7 @@ void SwPagePreviewWin::MouseButtonDown( const MouseEvent& rMEvt )
mrView.SetNewCursorPos( sNewCursorPos );
SfxViewFrame *pTmpFrame = mrView.GetViewFrame();
pTmpFrame->GetBindings().Execute( SID_VIEWSHELL0, nullptr, 0,
pTmpFrame->GetBindings().Execute( SID_VIEWSHELL0, nullptr,
SfxCallMode::ASYNCHRON );
}
else if ( bIsDocPos || bPosInEmptyPage )
@ -957,7 +957,7 @@ MOVEPAGE:
nSelPage +=2;
SetNewPage( nSelPage );
SfxViewFrame *pTmpFrame = GetViewFrame();
pTmpFrame->GetBindings().Execute( SID_VIEWSHELL0, nullptr, 0,
pTmpFrame->GetBindings().Execute( SID_VIEWSHELL0, nullptr,
SfxCallMode::ASYNCHRON );
}
break;
@ -1668,7 +1668,7 @@ SfxPrinter* SwPagePreview::GetPrinter( bool bCreate )
return pViewWin->GetViewShell()->getIDocumentDeviceAccess().getPrinter( bCreate );
}
sal_uInt16 SwPagePreview::SetPrinter( SfxPrinter *pNew, SfxPrinterChangeFlags nDiffFlags, bool )
sal_uInt16 SwPagePreview::SetPrinter( SfxPrinter *pNew, SfxPrinterChangeFlags nDiffFlags )
{
SwViewShell &rSh = *GetViewShell();
SfxPrinter* pOld = rSh.getIDocumentDeviceAccess().getPrinter( false );

View File

@ -660,7 +660,7 @@ void SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem,
}
}
sal_uInt16 SwSrcView::SetPrinter(SfxPrinter* pNew, SfxPrinterChangeFlags nDiffFlags, bool )
sal_uInt16 SwSrcView::SetPrinter(SfxPrinter* pNew, SfxPrinterChangeFlags nDiffFlags )
{
SwDocShell* pDocSh = GetDocShell();
if ( (SfxPrinterChangeFlags::JOBSETUP | SfxPrinterChangeFlags::PRINTER) & nDiffFlags )

View File

@ -1236,13 +1236,13 @@ void SwView::ReadUserData( const OUString &rUserData, bool bBrowse )
}
}
void SwView::ReadUserDataSequence ( const uno::Sequence < beans::PropertyValue >& rSequence, bool bBrowse )
void SwView::ReadUserDataSequence ( const uno::Sequence < beans::PropertyValue >& rSequence )
{
if(GetDocShell()->IsPreview()||m_bIsPreviewDoubleClick)
return;
bool bIsOwnDocument = lcl_IsOwnDocument( *this );
sal_Int32 nLength = rSequence.getLength();
if (nLength && (!m_pWrtShell->IsNewLayout() || m_pWrtShell->GetViewOptions()->getBrowseMode() || bBrowse) )
if (nLength)
{
SET_CURR_SHELL(m_pWrtShell);
const beans::PropertyValue *pValue = rSequence.getConstArray();
@ -1251,7 +1251,8 @@ void SwView::ReadUserDataSequence ( const uno::Sequence < beans::PropertyValue >
const SwViewOption* pVOpt = m_pWrtShell->GetViewOptions();
sal_Int64 nX = rRect.Left(), nY = rRect.Top(), nLeft = rVis.Left(), nTop = rVis.Top();
sal_Int64 nRight = bBrowse ? LONG_MIN : rVis.Right(), nBottom = bBrowse ? LONG_MIN : rVis.Bottom();
sal_Int64 nRight = LONG_MIN;
sal_Int64 nBottom = LONG_MIN;
sal_Int16 nZoomType = static_cast< sal_Int16 >(pVOpt->GetZoomType());
sal_Int16 nZoomFactor = static_cast < sal_Int16 > (pVOpt->GetZoom());
bool bViewLayoutBookMode = pVOpt->IsViewLayoutBookMode();
@ -1422,7 +1423,7 @@ void SwView::ReadUserDataSequence ( const uno::Sequence < beans::PropertyValue >
// go to the last editing position when opening own files
if(m_bOldShellWasPagePreview||bIsOwnDocument)
{
if ( bBrowse && bGotVisibleLeft && bGotVisibleTop )
if ( bGotVisibleLeft && bGotVisibleTop )
{
Point aTopLeft(aVis.TopLeft());
// make sure the document is still centered

View File

@ -104,7 +104,7 @@ void SetPrinter( IDocumentDeviceAccess* pIDDA, SfxPrinter* pNew, bool bWeb )
}
}
sal_uInt16 SwView::SetPrinter(SfxPrinter* pNew, SfxPrinterChangeFlags nDiffFlags, bool )
sal_uInt16 SwView::SetPrinter(SfxPrinter* pNew, SfxPrinterChangeFlags nDiffFlags )
{
SwWrtShell &rSh = GetWrtShell();
SfxPrinter* pOld = rSh.getIDocumentDeviceAccess().getPrinter( false );

View File

@ -519,7 +519,7 @@ void LoadURL( SwViewShell& rVSh, const OUString& rURL, sal_uInt16 nFilter,
nullptr
};
pViewFrame->GetDispatcher()->GetBindings()->Execute( SID_OPENDOC, aArr, 0,
pViewFrame->GetDispatcher()->GetBindings()->Execute( SID_OPENDOC, aArr,
SfxCallMode::ASYNCHRON|SfxCallMode::RECORD );
}