summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-01-12 13:41:12 +0200
committerNoel Grandin <noel@peralex.com>2016-01-13 08:44:45 +0200
commit38c23520d40749ff21b6b1ed5f5c0375d40fe1fc (patch)
treebe2126093be7d32e4f63d405f87fc6c063776e45
parent2fc2f752447725ece32ce55d5db21b912902b3cf (diff)
loplugin:unusedmethods unused return value in include/sfx2
Change-Id: Id4017bdfe18f8224d28a9f787865c7a880aeeed8
-rw-r--r--dbaccess/source/core/dataaccess/ModelImpl.cxx3
-rw-r--r--dbaccess/source/core/dataaccess/ModelImpl.hxx2
-rw-r--r--include/sfx2/app.hxx6
-rw-r--r--include/sfx2/docfile.hxx10
-rw-r--r--include/sfx2/docmacromode.hxx2
-rw-r--r--include/sfx2/ipclient.hxx2
-rw-r--r--include/sfx2/linkmgr.hxx4
-rw-r--r--include/sfx2/lnkbase.hxx2
-rw-r--r--include/sfx2/mnumgr.hxx4
-rw-r--r--include/sfx2/objsh.hxx4
-rw-r--r--include/sfx2/printer.hxx2
-rw-r--r--include/sfx2/shell.hxx2
-rw-r--r--include/sfx2/sidebar/FocusManager.hxx4
-rw-r--r--include/sfx2/styfitem.hxx5
-rw-r--r--include/sfx2/tbxctrl.hxx2
-rw-r--r--include/sfx2/templateabstractview.hxx15
-rw-r--r--include/sfx2/viewfrm.hxx4
-rw-r--r--include/sfx2/viewsh.hxx2
-rw-r--r--sc/source/ui/docshell/docsh.cxx6
-rw-r--r--sc/source/ui/inc/docsh.hxx2
-rw-r--r--sfx2/source/appl/appbas.cxx3
-rw-r--r--sfx2/source/appl/appcfg.cxx4
-rw-r--r--sfx2/source/appl/appinit.cxx6
-rw-r--r--sfx2/source/appl/linkmgr2.cxx12
-rw-r--r--sfx2/source/appl/lnkbase2.cxx4
-rw-r--r--sfx2/source/control/shell.cxx5
-rw-r--r--sfx2/source/control/templateabstractview.cxx7
-rw-r--r--sfx2/source/dialog/styfitem.cxx50
-rw-r--r--sfx2/source/doc/docfile.cxx28
-rw-r--r--sfx2/source/doc/objmisc.cxx5
-rw-r--r--sfx2/source/doc/objstor.cxx3
-rw-r--r--sfx2/source/doc/objxtor.cxx3
-rw-r--r--sfx2/source/doc/sfxbasemodel.cxx2
-rw-r--r--sfx2/source/inc/objshimp.hxx2
-rw-r--r--sfx2/source/menu/mnumgr.cxx5
-rw-r--r--sfx2/source/sidebar/FocusManager.cxx18
-rw-r--r--sfx2/source/toolbox/tbxitem.cxx4
-rw-r--r--sfx2/source/view/ipclient.cxx5
-rw-r--r--sfx2/source/view/printer.cxx4
-rw-r--r--sfx2/source/view/viewfrm.cxx10
-rw-r--r--sfx2/source/view/viewprn.cxx3
-rw-r--r--sfx2/source/view/viewsh.cxx2
-rw-r--r--sw/inc/docsh.hxx2
-rw-r--r--sw/source/uibase/app/docsh.cxx10
44 files changed, 98 insertions, 182 deletions
diff --git a/dbaccess/source/core/dataaccess/ModelImpl.cxx b/dbaccess/source/core/dataaccess/ModelImpl.cxx
index cd335378e557..c4c5c5e76417 100644
--- a/dbaccess/source/core/dataaccess/ModelImpl.cxx
+++ b/dbaccess/source/core/dataaccess/ModelImpl.cxx
@@ -1295,10 +1295,9 @@ sal_Int16 ODatabaseModelImpl::getCurrentMacroExecMode() const
return nCurrentMode;
}
-bool ODatabaseModelImpl::setCurrentMacroExecMode( sal_uInt16 nMacroMode )
+void ODatabaseModelImpl::setCurrentMacroExecMode( sal_uInt16 nMacroMode )
{
m_aMediaDescriptor.put( "MacroExecutionMode", nMacroMode );
- return true;
}
OUString ODatabaseModelImpl::getDocumentLocation() const
diff --git a/dbaccess/source/core/dataaccess/ModelImpl.hxx b/dbaccess/source/core/dataaccess/ModelImpl.hxx
index 2a02358f3eb0..9455767e236c 100644
--- a/dbaccess/source/core/dataaccess/ModelImpl.hxx
+++ b/dbaccess/source/core/dataaccess/ModelImpl.hxx
@@ -467,7 +467,7 @@ public:
public:
// IMacroDocumentAccess overridables
virtual sal_Int16 getCurrentMacroExecMode() const override;
- virtual bool setCurrentMacroExecMode( sal_uInt16 ) override;
+ virtual void setCurrentMacroExecMode( sal_uInt16 ) override;
virtual OUString getDocumentLocation() const override;
virtual bool documentStorageHasMacros() const override;
virtual css::uno::Reference< css::document::XEmbeddedScripts > getEmbeddedDocumentScripts() const override;
diff --git a/include/sfx2/app.hxx b/include/sfx2/app.hxx
index d00aa953b001..ed618d974854 100644
--- a/include/sfx2/app.hxx
+++ b/include/sfx2/app.hxx
@@ -175,10 +175,10 @@ public:
css::script::XLibraryContainer * GetDialogContainer();
css::script::XLibraryContainer * GetBasicContainer();
static StarBASIC* GetBasic();
- sal_uInt16 SaveBasicAndDialogContainer() const;
+ void SaveBasicAndDialogContainer() const;
// misc.
- bool GetOptions(SfxItemSet &);
+ void GetOptions(SfxItemSet &);
void SetOptions(const SfxItemSet &);
virtual void Invalidate(sal_uInt16 nId = 0) override;
void NotifyEvent(const SfxEventHint& rEvent, bool bSynchron = true );
@@ -189,7 +189,7 @@ public:
SAL_DLLPRIVATE SfxDispatcher* GetDispatcher_Impl();
SAL_DLLPRIVATE void SetOptions_Impl(const SfxItemSet &);
- SAL_DLLPRIVATE bool Initialize_Impl();
+ SAL_DLLPRIVATE void Initialize_Impl();
SAL_DLLPRIVATE SfxAppData_Impl* Get_Impl() const { return pAppData_Impl; }
diff --git a/include/sfx2/docfile.hxx b/include/sfx2/docfile.hxx
index d60596d54bfe..2dc8014c8fa4 100644
--- a/include/sfx2/docfile.hxx
+++ b/include/sfx2/docfile.hxx
@@ -61,7 +61,7 @@ class SFX2_DLLPUBLIC SfxMedium : public SvRefBase
SAL_DLLPRIVATE void SetIsRemote_Impl();
SAL_DLLPRIVATE void CloseInStream_Impl();
- SAL_DLLPRIVATE bool CloseOutStream_Impl();
+ SAL_DLLPRIVATE void CloseOutStream_Impl();
SAL_DLLPRIVATE void CloseStreams_Impl();
SAL_DLLPRIVATE void SetEncryptionDataToStorage_Impl();
@@ -204,10 +204,10 @@ public:
SAL_DLLPRIVATE void SetStorage_Impl( const css::uno::Reference< css::embed::XStorage >& xNewStorage );
SAL_DLLPRIVATE void CloseAndReleaseStreams_Impl();
- SAL_DLLPRIVATE sal_uInt16 AddVersion_Impl( css::util::RevisionTag& rVersion );
+ SAL_DLLPRIVATE void AddVersion_Impl( css::util::RevisionTag& rVersion );
SAL_DLLPRIVATE bool TransferVersionList_Impl( SfxMedium& rMedium );
- SAL_DLLPRIVATE bool SaveVersionList_Impl( bool bUseXML );
- SAL_DLLPRIVATE bool RemoveVersion_Impl( const OUString& rVersion );
+ SAL_DLLPRIVATE void SaveVersionList_Impl( bool bUseXML );
+ SAL_DLLPRIVATE void RemoveVersion_Impl( const OUString& rVersion );
SAL_DLLPRIVATE void SetExpired_Impl( const DateTime& rDateTime );
SAL_DLLPRIVATE SvKeyValueIterator* GetHeaderAttributes_Impl();
@@ -243,7 +243,7 @@ public:
SAL_DLLPRIVATE bool StorageCommit_Impl();
- SAL_DLLPRIVATE bool TransactedTransferForFS_Impl( const INetURLObject& aSource,
+ SAL_DLLPRIVATE void TransactedTransferForFS_Impl( const INetURLObject& aSource,
const INetURLObject& aDest,
const css::uno::Reference< css::ucb::XCommandEnvironment >& xComEnv );
diff --git a/include/sfx2/docmacromode.hxx b/include/sfx2/docmacromode.hxx
index 2a9efc8429a6..7011f93ece4d 100644
--- a/include/sfx2/docmacromode.hxx
+++ b/include/sfx2/docmacromode.hxx
@@ -83,7 +83,7 @@ namespace sfx2
see getCurrentMacroExecMode
*/
- virtual bool
+ virtual void
setCurrentMacroExecMode( sal_uInt16 ) = 0;
/** returns the origin of the document
diff --git a/include/sfx2/ipclient.hxx b/include/sfx2/ipclient.hxx
index b836bf41ca58..590ec7f8d0b7 100644
--- a/include/sfx2/ipclient.hxx
+++ b/include/sfx2/ipclient.hxx
@@ -71,7 +71,7 @@ public:
Rectangle GetObjArea() const;
Rectangle GetScaledObjArea() const;
void SetSizeScale( const Fraction & rScaleWidth, const Fraction & rScaleHeight );
- bool SetObjAreaAndScale( const Rectangle&, const Fraction&, const Fraction& );
+ void SetObjAreaAndScale( const Rectangle&, const Fraction&, const Fraction& );
const Fraction& GetScaleWidth() const;
const Fraction& GetScaleHeight() const;
void Invalidate();
diff --git a/include/sfx2/linkmgr.hxx b/include/sfx2/linkmgr.hxx
index c6cbcf000960..ab59dddc1ed8 100644
--- a/include/sfx2/linkmgr.hxx
+++ b/include/sfx2/linkmgr.hxx
@@ -91,13 +91,13 @@ public:
bool Insert( SvBaseLink* pLink );
// the links connect to a SvLinkSource and adds to the list
- bool InsertDDELink( SvBaseLink*,
+ void InsertDDELink( SvBaseLink*,
const OUString& rServer,
const OUString& rTopic,
const OUString& rItem );
// if everything is already set at the link!
- bool InsertDDELink( SvBaseLink* );
+ void InsertDDELink( SvBaseLink* );
// Connect the links to a pseudo-object and add to the list
bool InsertFileLink( sfx2::SvBaseLink&,
diff --git a/include/sfx2/lnkbase.hxx b/include/sfx2/lnkbase.hxx
index fe5c881440da..5baabf44b808 100644
--- a/include/sfx2/lnkbase.hxx
+++ b/include/sfx2/lnkbase.hxx
@@ -136,7 +136,7 @@ public:
void SetUpdateMode( SfxLinkUpdateMode );
SfxLinkUpdateMode GetUpdateMode() const;
SotClipboardFormatId GetContentType() const;
- bool SetContentType( SotClipboardFormatId nType );
+ void SetContentType( SotClipboardFormatId nType );
LinkManager* GetLinkManager();
const LinkManager* GetLinkManager() const;
diff --git a/include/sfx2/mnumgr.hxx b/include/sfx2/mnumgr.hxx
index 2adb619d9f28..7682fc624464 100644
--- a/include/sfx2/mnumgr.hxx
+++ b/include/sfx2/mnumgr.hxx
@@ -86,10 +86,10 @@ public:
// Changing code which relies on Popup would need much more effort.
static SfxPopupMenuManager* Popup( const ResId& rResId, SfxViewFrame* pFrame,const Point& rPoint, vcl::Window* pWindow );
- sal_uInt16 Execute( const Point& rPos, vcl::Window *pWindow );
+ void Execute( const Point& rPos, vcl::Window *pWindow );
void RemoveDisabledEntries();
- Menu* GetSVMenu();
+ Menu* GetSVMenu();
};
#endif // INCLUDED_SFX2_MNUMGR_HXX
diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx
index 6fd70b2828b6..47f804293b62 100644
--- a/include/sfx2/objsh.hxx
+++ b/include/sfx2/objsh.hxx
@@ -318,7 +318,7 @@ public:
*
* @return true if the initialization is successful, false otherwise.
*/
- bool DoInitUnitTest();
+ void DoInitUnitTest();
bool DoInitNew( SfxMedium* pMedium=nullptr );
bool DoLoad( SfxMedium* pMedium );
bool DoLoadExternal( SfxMedium* pMed );
@@ -624,7 +624,7 @@ public:
virtual bool IsChangeRecording() const;
virtual bool HasChangeRecordProtection() const;
virtual void SetChangeRecording( bool bActivate );
- virtual bool SetProtectionPassword( const OUString &rPassword );
+ virtual void SetProtectionPassword( const OUString &rPassword );
virtual bool GetProtectionHash( /*out*/ css::uno::Sequence< sal_Int8 > &rPasswordHash );
SAL_DLLPRIVATE std::shared_ptr<GDIMetaFile> CreatePreviewMetaFile_Impl( bool bFullContent ) const;
diff --git a/include/sfx2/printer.hxx b/include/sfx2/printer.hxx
index f6cda406ca41..1e9c05bb03a0 100644
--- a/include/sfx2/printer.hxx
+++ b/include/sfx2/printer.hxx
@@ -53,7 +53,7 @@ public:
VclPtr<SfxPrinter> Clone() const;
static VclPtr<SfxPrinter> Create( SvStream &rStream, SfxItemSet *pOptions );
- SvStream& Store( SvStream &rStream ) const;
+ void Store( SvStream &rStream ) const;
const SfxItemSet& GetOptions() const { return *pOptions; }
void SetOptions( const SfxItemSet &rNewOptions );
diff --git a/include/sfx2/shell.hxx b/include/sfx2/shell.hxx
index a976c933651e..488e06b8b65d 100644
--- a/include/sfx2/shell.hxx
+++ b/include/sfx2/shell.hxx
@@ -281,7 +281,7 @@ public:
/**
Asynchronous ExecuteSlot for the RELOAD
*/
- const SfxPoolItem* ExecuteSlot( SfxRequest &rReq, bool bAsync );
+ void ExecuteSlot( SfxRequest &rReq, bool bAsync );
inline SfxItemPool& GetPool() const;
inline void SetPool( SfxItemPool *pNewPool ) ;
diff --git a/include/sfx2/sidebar/FocusManager.hxx b/include/sfx2/sidebar/FocusManager.hxx
index a7ffd5e1ffa2..71096cbaa78b 100644
--- a/include/sfx2/sidebar/FocusManager.hxx
+++ b/include/sfx2/sidebar/FocusManager.hxx
@@ -131,9 +131,9 @@ private:
void FocusPanelContent(const sal_Int32 nPanelIndex);
void FocusButton(const sal_Int32 nButtonIndex);
void ClickButton(const sal_Int32 nButtonIndex);
- bool MoveFocusInsidePanel(const FocusLocation& rLocation,
+ void MoveFocusInsidePanel(const FocusLocation& rLocation,
const sal_Int32 nDirection);
- bool MoveFocusInsideDeckTitle(const FocusLocation& rLocation,
+ void MoveFocusInsideDeckTitle(const FocusLocation& rLocation,
const sal_Int32 nDirection);
void HandleKeyEvent(const vcl::KeyCode& rKeyCode,
diff --git a/include/sfx2/styfitem.hxx b/include/sfx2/styfitem.hxx
index c35ea6ccc1fd..64d092690c35 100644
--- a/include/sfx2/styfitem.hxx
+++ b/include/sfx2/styfitem.hxx
@@ -80,11 +80,8 @@ public:
requested bitmap mode, incremented by 1.</p>
<p>Usually, you will use the same resource which originally constructed the object.</p>
-
- @return
- <TRUE/> if an image list for the requested mode could be found in the given resource.
*/
- bool updateImages( const ResId& _rId );
+ void updateImages( const ResId& _rId );
};
#endif
diff --git a/include/sfx2/tbxctrl.hxx b/include/sfx2/tbxctrl.hxx
index 241e7a47efe7..b971be938910 100644
--- a/include/sfx2/tbxctrl.hxx
+++ b/include/sfx2/tbxctrl.hxx
@@ -79,7 +79,7 @@ friend class SfxFrameStatusListener;
css::uno::Reference< css::lang::XComponent > m_xStatusListener;
private:
- SfxFrameStatusListener* GetOrCreateStatusListener();
+ void GetOrCreateStatusListener();
SfxPopupWindow(SfxPopupWindow &) = delete;
void operator =(SfxPopupWindow &) = delete;
diff --git a/include/sfx2/templateabstractview.hxx b/include/sfx2/templateabstractview.hxx
index bd2b59030597..2ff5a26c596b 100644
--- a/include/sfx2/templateabstractview.hxx
+++ b/include/sfx2/templateabstractview.hxx
@@ -61,21 +61,6 @@ protected:
FILTER_APPLICATION mApp;
};
-class ViewFilter_Keyword
-{
-public:
-
- ViewFilter_Keyword (const OUString &rKeyword)
- : maKeyword(rKeyword)
- {}
-
- bool operator () (const ThumbnailViewItem *pItem);
-
-private:
-
- OUString maKeyword;
-};
-
class SFX2_DLLPUBLIC TemplateAbstractView : public ThumbnailView
{
public:
diff --git a/include/sfx2/viewfrm.hxx b/include/sfx2/viewfrm.hxx
index 5134da26edbc..6c4d090d43b3 100644
--- a/include/sfx2/viewfrm.hxx
+++ b/include/sfx2/viewfrm.hxx
@@ -141,8 +141,8 @@ public:
void UpdateTitle();
// interne Handler
- SAL_DLLPRIVATE bool SetBorderPixelImpl( const SfxViewShell *pSh, const SvBorder &rBorder );
- SAL_DLLPRIVATE const SvBorder& GetBorderPixelImpl( const SfxViewShell *pSh ) const;
+ SAL_DLLPRIVATE void SetBorderPixelImpl( const SfxViewShell *pSh, const SvBorder &rBorder );
+ SAL_DLLPRIVATE const SvBorder& GetBorderPixelImpl() const;
SAL_DLLPRIVATE void InvalidateBorderImpl( const SfxViewShell *pSh );
virtual SfxObjectShell* GetObjectShell() override;
diff --git a/include/sfx2/viewsh.hxx b/include/sfx2/viewsh.hxx
index f19d66a36420..c5e5a6380bad 100644
--- a/include/sfx2/viewsh.hxx
+++ b/include/sfx2/viewsh.hxx
@@ -304,7 +304,7 @@ public:
SAL_DLLPRIVATE void ResetAllClients_Impl( SfxInPlaceClient *pIP );
SAL_DLLPRIVATE void DiscardClients_Impl();
- SAL_DLLPRIVATE SfxPrinter* SetPrinter_Impl( VclPtr<SfxPrinter>& pNewPrinter );
+ SAL_DLLPRIVATE void SetPrinter_Impl( VclPtr<SfxPrinter>& pNewPrinter );
SAL_DLLPRIVATE bool IsShowView_Impl() const;
SAL_DLLPRIVATE bool HandleNotifyEvent_Impl( NotifyEvent& rEvent );
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index 87f2d6afd1d7..21eb4ede3bd6 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -3137,9 +3137,8 @@ void ScDocShell::SetChangeRecording( bool bActivate )
}
}
-bool ScDocShell::SetProtectionPassword( const OUString &rNewPassword )
+void ScDocShell::SetProtectionPassword( const OUString &rNewPassword )
{
- bool bRes = false;
ScChangeTrack* pChangeTrack = aDocument.GetChangeTrack();
if (pChangeTrack)
{
@@ -3158,7 +3157,6 @@ bool ScDocShell::SetProtectionPassword( const OUString &rNewPassword )
{
pChangeTrack->SetProtection( css::uno::Sequence< sal_Int8 >() );
}
- bRes = true;
if ( bProtected != pChangeTrack->IsProtected() )
{
@@ -3166,8 +3164,6 @@ bool ScDocShell::SetProtectionPassword( const OUString &rNewPassword )
SetDocumentModified();
}
}
-
- return bRes;
}
bool ScDocShell::GetProtectionHash( /*out*/ css::uno::Sequence< sal_Int8 > &rPasswordHash )
diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx
index 82b0f4988481..d01de8693c99 100644
--- a/sc/source/ui/inc/docsh.hxx
+++ b/sc/source/ui/inc/docsh.hxx
@@ -419,7 +419,7 @@ public:
virtual bool IsChangeRecording() const override;
virtual bool HasChangeRecordProtection() const override;
virtual void SetChangeRecording( bool bActivate ) override;
- virtual bool SetProtectionPassword( const OUString &rPassword ) override;
+ virtual void SetProtectionPassword( const OUString &rPassword ) override;
virtual bool GetProtectionHash( /*out*/ css::uno::Sequence< sal_Int8 > &rPasswordHash ) override;
void SnapVisArea( Rectangle& rRect ) const;
diff --git a/sfx2/source/appl/appbas.cxx b/sfx2/source/appl/appbas.cxx
index 36f917d1d19d..028c2791c3e8 100644
--- a/sfx2/source/appl/appbas.cxx
+++ b/sfx2/source/appl/appbas.cxx
@@ -88,11 +88,10 @@ using namespace ::com::sun::star::script;
using ::basic::BasicManagerRepository;
-sal_uInt16 SfxApplication::SaveBasicAndDialogContainer() const
+void SfxApplication::SaveBasicAndDialogContainer() const
{
if ( pAppData_Impl->pBasicManager->isValid() )
pAppData_Impl->pBasicManager->storeAllLibraries();
- return 0;
}
BasicManager* SfxApplication::GetBasicManager()
diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx
index f88853f32210..50f7fad3afb9 100644
--- a/sfx2/source/appl/appcfg.cxx
+++ b/sfx2/source/appl/appcfg.cxx
@@ -149,7 +149,7 @@ IMPL_LINK_TYPED(SfxEventAsyncer_Impl, IdleHdl, Idle*, pAsyncIdle, void)
-bool SfxApplication::GetOptions( SfxItemSet& rSet )
+void SfxApplication::GetOptions( SfxItemSet& rSet )
{
bool bRet = false;
SfxItemPool &rPool = GetPool();
@@ -490,8 +490,6 @@ bool SfxApplication::GetOptions( SfxItemSet& rSet )
}
pRanges++;
}
-
- return bRet;
}
// TODO/CLEANUP: Why two SetOptions Methods?
diff --git a/sfx2/source/appl/appinit.cxx b/sfx2/source/appl/appinit.cxx
index 2ac45255c8cd..2b9ebd1f1dcc 100644
--- a/sfx2/source/appl/appinit.cxx
+++ b/sfx2/source/appl/appinit.cxx
@@ -200,7 +200,7 @@ OUString GetSpecialCharsForEdit(vcl::Window* pParent, const vcl::Font& rFont)
-bool SfxApplication::Initialize_Impl()
+void SfxApplication::Initialize_Impl()
{
#ifdef TLX_VALIDATE
StgIo::SetErrorLink( LINK( this, SfxStorageErrHdl, Error ) );
@@ -270,7 +270,7 @@ bool SfxApplication::Initialize_Impl()
SetPool( pAppData_Impl->pPool );
if ( pAppData_Impl->bDowning )
- return false;
+ return;
// App-Dispatcher aufbauen
pAppData_Impl->pAppDispat->Push(*this);
@@ -282,8 +282,6 @@ bool SfxApplication::Initialize_Impl()
// Set special characters callback on vcl edit control
Edit::SetGetSpecialCharsFunction(&GetSpecialCharsForEdit);
}
-
- return true;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/appl/linkmgr2.cxx b/sfx2/source/appl/linkmgr2.cxx
index 74ef914677f8..6f1baf276bbb 100644
--- a/sfx2/source/appl/linkmgr2.cxx
+++ b/sfx2/source/appl/linkmgr2.cxx
@@ -186,33 +186,33 @@ bool LinkManager::InsertLink( SvBaseLink * pLink,
}
-bool LinkManager::InsertDDELink( SvBaseLink * pLink,
+void LinkManager::InsertDDELink( SvBaseLink * pLink,
const OUString& rServer,
const OUString& rTopic,
const OUString& rItem )
{
if( !( OBJECT_CLIENT_SO & pLink->GetObjType() ) )
- return false;
+ return;
OUString sCmd;
::sfx2::MakeLnkName( sCmd, &rServer, rTopic, rItem );
pLink->SetObjType( OBJECT_CLIENT_DDE );
pLink->SetName( sCmd );
- return Insert( pLink );
+ Insert( pLink );
}
-bool LinkManager::InsertDDELink( SvBaseLink * pLink )
+void LinkManager::InsertDDELink( SvBaseLink * pLink )
{
DBG_ASSERT( OBJECT_CLIENT_SO & pLink->GetObjType(), "no OBJECT_CLIENT_SO" );
if( !( OBJECT_CLIENT_SO & pLink->GetObjType() ) )
- return false;
+ return;
if( pLink->GetObjType() == OBJECT_CLIENT_SO )
pLink->SetObjType( OBJECT_CLIENT_DDE );
- return Insert( pLink );
+ Insert( pLink );
}
diff --git a/sfx2/source/appl/lnkbase2.cxx b/sfx2/source/appl/lnkbase2.cxx
index 930939ebdf4a..d0344768bff4 100644
--- a/sfx2/source/appl/lnkbase2.cxx
+++ b/sfx2/source/appl/lnkbase2.cxx
@@ -422,14 +422,12 @@ SotClipboardFormatId SvBaseLink::GetContentType() const
}
-bool SvBaseLink::SetContentType( SotClipboardFormatId nType )
+void SvBaseLink::SetContentType( SotClipboardFormatId nType )
{
if( OBJECT_CLIENT_SO & nObjType )
{
pImplData->ClientType.nCntntType = nType;
- return true;
}
- return false;
}
LinkManager* SvBaseLink::GetLinkManager()
diff --git a/sfx2/source/control/shell.cxx b/sfx2/source/control/shell.cxx
index ca82105253fa..c37c41d26ea2 100644
--- a/sfx2/source/control/shell.cxx
+++ b/sfx2/source/control/shell.cxx
@@ -411,17 +411,16 @@ void ShellCall_Impl( void* pObj, void* pArg )
static_cast<SfxShell*>(pObj)->ExecuteSlot( *static_cast<SfxRequest*>(pArg) );
}
-const SfxPoolItem* SfxShell::ExecuteSlot( SfxRequest& rReq, bool bAsync )
+void SfxShell::ExecuteSlot( SfxRequest& rReq, bool bAsync )
{
if( !bAsync )
- return ExecuteSlot( rReq );
+ ExecuteSlot( rReq );
else
{
if( !pImp->pExecuter )
pImp->pExecuter = new svtools::AsynchronLink(
Link<void*,void>( this, ShellCall_Impl ) );
pImp->pExecuter->Call( new SfxRequest( rReq ) );
- return nullptr;
}
}
diff --git a/sfx2/source/control/templateabstractview.cxx b/sfx2/source/control/templateabstractview.cxx
index 4a2a9138c1f2..544c3e04b111 100644
--- a/sfx2/source/control/templateabstractview.cxx
+++ b/sfx2/source/control/templateabstractview.cxx
@@ -119,13 +119,6 @@ bool ViewFilter_Application::operator () (const ThumbnailViewItem *pItem)
return true;
}
-bool ViewFilter_Keyword::operator ()(const ThumbnailViewItem *pItem)
-{
- assert(pItem);
-
- return pItem->maTitle.matchIgnoreAsciiCase(maKeyword);
-}
-
TemplateAbstractView::TemplateAbstractView (vcl::Window *pParent, WinBits nWinStyle, bool bDisableTransientChildren)
: ThumbnailView(pParent,nWinStyle,bDisableTransientChildren),
mnCurRegionId(0),
diff --git a/sfx2/source/dialog/styfitem.cxx b/sfx2/source/dialog/styfitem.cxx
index 0a8b7480f336..e5e3be7b7ae8 100644
--- a/sfx2/source/dialog/styfitem.cxx
+++ b/sfx2/source/dialog/styfitem.cxx
@@ -117,39 +117,31 @@ SfxStyleFamilies::~SfxStyleFamilies()
-bool SfxStyleFamilies::updateImages( const ResId& _rId )
+void SfxStyleFamilies::updateImages( const ResId& _rId )
{
- bool bSuccess = false;
+ ::svt::OLocalResourceAccess aLocalRes( _rId );
- {
- ::svt::OLocalResourceAccess aLocalRes( _rId );
-
- // check if the image list is present
- ResId aImageListId( (sal_uInt16) 1, *_rId.GetResMgr() );
- aImageListId.SetRT( RSC_IMAGELIST );
-
- if ( aLocalRes.IsAvailableRes( aImageListId ) )
- { // there is such a list
- ImageList aImages( aImageListId );
-
- // number of styles items/images
- sal_uInt16 nCount = aImages.GetImageCount( );
- DBG_ASSERT( aEntryList.size() == nCount, "SfxStyleFamilies::updateImages: found the image list, but missing some bitmaps!" );
- if ( nCount > aEntryList.size() )
- nCount = aEntryList.size();
-
- // set the images on the items
- for ( size_t i = 0; i < nCount; ++i )
- {
- SfxStyleFamilyItem* pItem = aEntryList[ i ];
- pItem->SetImage( aImages.GetImage( aImages.GetImageId( i ) ) );
- }
-
- bSuccess = true;
+ // check if the image list is present
+ ResId aImageListId( (sal_uInt16) 1, *_rId.GetResMgr() );
+ aImageListId.SetRT( RSC_IMAGELIST );
+
+ if ( aLocalRes.IsAvailableRes( aImageListId ) )
+ { // there is such a list
+ ImageList aImages( aImageListId );
+
+ // number of styles items/images
+ sal_uInt16 nCount = aImages.GetImageCount( );
+ DBG_ASSERT( aEntryList.size() == nCount, "SfxStyleFamilies::updateImages: found the image list, but missing some bitmaps!" );
+ if ( nCount > aEntryList.size() )
+ nCount = aEntryList.size();
+
+ // set the images on the items
+ for ( size_t i = 0; i < nCount; ++i )
+ {
+ SfxStyleFamilyItem* pItem = aEntryList[ i ];
+ pItem->SetImage( aImages.GetImage( aImages.GetImageId( i ) ) );
}
}
-
- return bSuccess;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 6c827ddfd2a3..d30d52f05bff 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -596,7 +596,7 @@ bool SfxMedium::CloseOutStream()
return true;
}
-bool SfxMedium::CloseOutStream_Impl()
+void SfxMedium::CloseOutStream_Impl()
{
if ( pImp->m_pOutStream )
{
@@ -622,8 +622,6 @@ bool SfxMedium::CloseOutStream_Impl()
if ( pImp->m_pSet )
pImp->m_pSet->ClearItem( SID_STREAM );
}
-
- return true;
}
@@ -1637,7 +1635,7 @@ bool SfxMedium::StorageCommit_Impl()
}
-bool SfxMedium::TransactedTransferForFS_Impl( const INetURLObject& aSource,
+void SfxMedium::TransactedTransferForFS_Impl( const INetURLObject& aSource,
const INetURLObject& aDest,
const Reference< css::ucb::XCommandEnvironment >& xComEnv )
{
@@ -1758,8 +1756,6 @@ bool SfxMedium::TransactedTransferForFS_Impl( const INetURLObject& aSource,
else
pImp->m_eError = ERRCODE_IO_CANTREAD;
}
-
- return bResult;
}
@@ -3263,7 +3259,7 @@ uno::Sequence < util::RevisionTag > SfxMedium::GetVersionList( const uno::Refere
return uno::Sequence < util::RevisionTag >();
}
-sal_uInt16 SfxMedium::AddVersion_Impl( util::RevisionTag& rRevision )
+void SfxMedium::AddVersion_Impl( util::RevisionTag& rRevision )
{
if ( GetStorage().is() )
{
@@ -3290,16 +3286,13 @@ sal_uInt16 SfxMedium::AddVersion_Impl( util::RevisionTag& rRevision )
pImp->aVersions.realloc( nLength+1 );
rRevision.Identifier = aRevName;
pImp->aVersions[nLength] = rRevision;
- return nKey;
}
-
- return 0;
}
-bool SfxMedium::RemoveVersion_Impl( const OUString& rName )
+void SfxMedium::RemoveVersion_Impl( const OUString& rName )
{
if ( !pImp->aVersions.getLength() )
- return false;
+ return;
sal_Int32 nLength = pImp->aVersions.getLength();
for ( sal_Int32 n=0; n<nLength; n++ )
@@ -3309,11 +3302,9 @@ bool SfxMedium::RemoveVersion_Impl( const OUString& rName )
for ( sal_Int32 m=n; m<nLength-1; m++ )
pImp->aVersions[m] = pImp->aVersions[m+1];
pImp->aVersions.realloc(nLength-1);
- return true;
+ return;
}
}
-
- return false;
}
bool SfxMedium::TransferVersionList_Impl( SfxMedium& rMedium )
@@ -3327,26 +3318,23 @@ bool SfxMedium::TransferVersionList_Impl( SfxMedium& rMedium )
return false;
}
-bool SfxMedium::SaveVersionList_Impl( bool /*bUseXML*/ )
+void SfxMedium::SaveVersionList_Impl( bool /*bUseXML*/ )
{
if ( GetStorage().is() )
{
if ( !pImp->aVersions.getLength() )
- return true;
+ return;
uno::Reference < document::XDocumentRevisionListPersistence > xWriter =
document::DocumentRevisionListPersistence::create( comphelper::getProcessComponentContext() );
try
{
xWriter->store( GetStorage(), pImp->aVersions );
- return true;
}
catch ( const uno::Exception& )
{
}
}
-
- return false;
}
bool SfxMedium::IsReadOnly() const
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index aca0fbd616d7..b721eaf30978 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -1866,17 +1866,14 @@ sal_Int16 SfxObjectShell_Impl::getCurrentMacroExecMode() const
return nImposedExecMode;
}
-bool SfxObjectShell_Impl::setCurrentMacroExecMode( sal_uInt16 nMacroMode )
+void SfxObjectShell_Impl::setCurrentMacroExecMode( sal_uInt16 nMacroMode )
{
const SfxMedium* pMedium( rDocShell.GetMedium() );
OSL_PRECOND( pMedium, "SfxObjectShell_Impl::getCurrentMacroExecMode: no medium!" );
if ( pMedium )
{
pMedium->GetItemSet()->Put( SfxUInt16Item( SID_MACROEXECMODE, nMacroMode ) );
- return true;
}
-
- return false;
}
OUString SfxObjectShell_Impl::getDocumentLocation() const
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index b18793361be5..01d7435bf2ef 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -487,10 +487,9 @@ bool SfxObjectShell::Load( SfxMedium& rMedium )
return GeneralInit_Impl( rMedium.GetStorage(), true );
}
-bool SfxObjectShell::DoInitUnitTest()
+void SfxObjectShell::DoInitUnitTest()
{
pMedium = new SfxMedium;
- return true; // always a success!
}
bool SfxObjectShell::DoInitNew( SfxMedium* pMed )
diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx
index 3bdb6f74aa07..de21929497bd 100644
--- a/sfx2/source/doc/objxtor.cxx
+++ b/sfx2/source/doc/objxtor.cxx
@@ -1166,11 +1166,10 @@ void SfxObjectShell::SetChangeRecording( bool /*bActivate*/ )
}
-bool SfxObjectShell::SetProtectionPassword( const OUString & /*rPassword*/ )
+void SfxObjectShell::SetProtectionPassword( const OUString & /*rPassword*/ )
{
// currently this function needs to be overwritten by Writer and Calc only
DBG_ASSERT( false, "function not implemented" );
- return false;
}
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index 3442c94603e2..9c21b989ddc0 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -1015,7 +1015,7 @@ Sequence< beans::PropertyValue > SAL_CALL SfxBaseModel::getArgs() throw(RuntimeE
SfxViewFrame* pFrame = SfxViewFrame::GetFirst( m_pData->m_pObjectShell );
if ( pFrame )
{
- SvBorder aBorder = pFrame->GetBorderPixelImpl( pFrame->GetViewShell() );
+ SvBorder aBorder = pFrame->GetBorderPixelImpl();
Sequence< sal_Int32 > aBorderSeq(4);
aBorderSeq[0] = aBorder.Left();
diff --git a/sfx2/source/inc/objshimp.hxx b/sfx2/source/inc/objshimp.hxx
index 36f8bdff6618..fb94a8e02978 100644
--- a/sfx2/source/inc/objshimp.hxx
+++ b/sfx2/source/inc/objshimp.hxx
@@ -152,7 +152,7 @@ struct SfxObjectShell_Impl : public ::sfx2::IMacroDocumentAccess
// IMacroDocumentAccess overridables
virtual sal_Int16 getCurrentMacroExecMode() const override;
- virtual bool setCurrentMacroExecMode( sal_uInt16 nMacroMode ) override;
+ virtual void setCurrentMacroExecMode( sal_uInt16 nMacroMode ) override;
virtual OUString getDocumentLocation() const override;
virtual bool documentStorageHasMacros() const override;
virtual css::uno::Reference< css::document::XEmbeddedScripts > getEmbeddedDocumentScripts() const override;
diff --git a/sfx2/source/menu/mnumgr.cxx b/sfx2/source/menu/mnumgr.cxx
index 00438ff78aff..31a304d47c23 100644
--- a/sfx2/source/menu/mnumgr.cxx
+++ b/sfx2/source/menu/mnumgr.cxx
@@ -251,11 +251,10 @@ void SfxPopupMenuManager::RemoveDisabledEntries()
-sal_uInt16 SfxPopupMenuManager::Execute( const Point& rPos, vcl::Window* pWindow )
+void SfxPopupMenuManager::Execute( const Point& rPos, vcl::Window* pWindow )
{
- sal_uInt16 nVal = static_cast<PopupMenu*>( GetMenu()->GetSVMenu() )->Execute( pWindow, rPos );
+ static_cast<PopupMenu*>( GetMenu()->GetSVMenu() )->Execute( pWindow, rPos );
delete pStaticThesSubMenu; pStaticThesSubMenu = nullptr;
- return nVal;
}
diff --git a/sfx2/source/sidebar/FocusManager.cxx b/sfx2/source/sidebar/FocusManager.cxx
index 556fc0d7dca9..b12995b0abba 100644
--- a/sfx2/source/sidebar/FocusManager.cxx
+++ b/sfx2/source/sidebar/FocusManager.cxx
@@ -301,7 +301,7 @@ void FocusManager::RemoveWindow (vcl::Window& rWindow)
}
}
-bool FocusManager::MoveFocusInsidePanel (
+void FocusManager::MoveFocusInsidePanel (
const FocusLocation& rFocusLocation,
const sal_Int32 nDirection)
{
@@ -314,21 +314,20 @@ bool FocusManager::MoveFocusInsidePanel (
maPanels[rFocusLocation.mnIndex]->GetTitleBar()->GetToolBox().GrabFocus();
else
FocusPanelContent(rFocusLocation.mnIndex);
- return true;
+ break;
case PC_PanelToolBox:
if (nDirection < 0 && bHasToolBoxItem)
maPanels[rFocusLocation.mnIndex]->GetTitleBar()->GrabFocus();
else
FocusPanelContent(rFocusLocation.mnIndex);
- return true;
+ break;
- default:
- return false;
+ default: break;
}
}
-bool FocusManager::MoveFocusInsideDeckTitle (
+void FocusManager::MoveFocusInsideDeckTitle (
const FocusLocation& rFocusLocation,
const sal_Int32 nDirection)
{
@@ -345,17 +344,16 @@ bool FocusManager::MoveFocusInsideDeckTitle (
FocusPanelContent(0);
else if (bHasToolBoxItem)
mpDeckTitleBar->GetToolBox().GrabFocus();
- return true;
+ break;
case PC_DeckToolBox:
if (nDirection>0 && ! IsPanelTitleVisible(0))
FocusPanelContent(0);
else
mpDeckTitleBar->GrabFocus();
- return true;
+ break;
- default:
- return false;
+ default: break;
}
}
diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx
index 35daecffe9db..f49b7dd13a35 100644
--- a/sfx2/source/toolbox/tbxitem.cxx
+++ b/sfx2/source/toolbox/tbxitem.cxx
@@ -983,7 +983,7 @@ void SfxPopupWindow::dispose()
-SfxFrameStatusListener* SfxPopupWindow::GetOrCreateStatusListener()
+void SfxPopupWindow::GetOrCreateStatusListener()
{
if ( !m_xStatusListener.is() )
{
@@ -993,8 +993,6 @@ SfxFrameStatusListener* SfxPopupWindow::GetOrCreateStatusListener()
this );
m_xStatusListener.set( static_cast< cppu::OWeakObject* >( m_pStatusListener ), UNO_QUERY );
}
-
- return m_pStatusListener;
}
diff --git a/sfx2/source/view/ipclient.cxx b/sfx2/source/view/ipclient.cxx
index 09c85461b1a6..a51e23b447ed 100644
--- a/sfx2/source/view/ipclient.cxx
+++ b/sfx2/source/view/ipclient.cxx
@@ -770,7 +770,7 @@ void SfxInPlaceClient::SetSizeScale( const Fraction & rScaleWidth, const Fractio
}
-bool SfxInPlaceClient::SetObjAreaAndScale( const Rectangle& rArea, const Fraction& rScaleWidth, const Fraction& rScaleHeight )
+void SfxInPlaceClient::SetObjAreaAndScale( const Rectangle& rArea, const Fraction& rScaleWidth, const Fraction& rScaleHeight )
{
if( rArea != m_pImp->m_aObjArea || m_pImp->m_aScaleWidth != rScaleWidth || m_pImp->m_aScaleHeight != rScaleHeight )
{
@@ -781,10 +781,7 @@ bool SfxInPlaceClient::SetObjAreaAndScale( const Rectangle& rArea, const Fractio
m_pImp->SizeHasChanged();
Invalidate();
- return true;
}
-
- return false;
}
diff --git a/sfx2/source/view/printer.cxx b/sfx2/source/view/printer.cxx
index ee07c7850f21..ee8dfef79036 100644
--- a/sfx2/source/view/printer.cxx
+++ b/sfx2/source/view/printer.cxx
@@ -85,7 +85,7 @@ VclPtr<SfxPrinter> SfxPrinter::Create( SvStream& rStream, SfxItemSet* pOptions )
-SvStream& SfxPrinter::Store( SvStream& rStream ) const
+void SfxPrinter::Store( SvStream& rStream ) const
/* [Description]
@@ -93,7 +93,7 @@ SvStream& SfxPrinter::Store( SvStream& rStream ) const
*/
{
- return WriteJobSetup( rStream, GetJobSetup() );
+ WriteJobSetup( rStream, GetJobSetup() );
}
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 87f31489ea83..321526d73f96 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -1169,7 +1169,7 @@ void SfxViewFrame::InvalidateBorderImpl( const SfxViewShell* pSh )
}
}
-bool SfxViewFrame::SetBorderPixelImpl
+void SfxViewFrame::SetBorderPixelImpl
(
const SfxViewShell* pVSh,
const SvBorder& rBorder
@@ -1207,15 +1207,9 @@ bool SfxViewFrame::SetBorderPixelImpl
aEditArea.Bottom() -= rBorder.Bottom();
pVSh->GetWindow()->SetPosSizePixel( aEditArea.TopLeft(), aEditArea.GetSize() );
}
-
- return true;
}
-const SvBorder& SfxViewFrame::GetBorderPixelImpl
-(
- const SfxViewShell* /*pSh*/
-) const
-
+const SvBorder& SfxViewFrame::GetBorderPixelImpl() const
{
return pImp->aBorder;
}
diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx
index daba22987ea5..04244896abf2 100644
--- a/sfx2/source/view/viewprn.cxx
+++ b/sfx2/source/view/viewprn.cxx
@@ -466,7 +466,7 @@ IMPL_LINK_NOARG_TYPED(SfxDialogExecutor_Impl, Execute, Button*, void)
Internal method for setting the differences between 'pNewPrinter' to the
current printer. pNewPrinter is either taken over or deleted.
*/
-SfxPrinter* SfxViewShell::SetPrinter_Impl( VclPtr<SfxPrinter>& pNewPrinter )
+void SfxViewShell::SetPrinter_Impl( VclPtr<SfxPrinter>& pNewPrinter )
{
// get current Printer
SfxPrinter *pDocPrinter = GetPrinter();
@@ -561,7 +561,6 @@ SfxPrinter* SfxViewShell::SetPrinter_Impl( VclPtr<SfxPrinter>& pNewPrinter )
if ( SfxPrinterChangeFlags::NONE != nChangedFlags )
// SetPrinter will delete the old printer if it changes
SetPrinter( pDocPrinter, nChangedFlags );
- return pDocPrinter;
}
void SfxViewShell::StartPrint( const uno::Sequence < beans::PropertyValue >& rProps, bool bIsAPI, bool bIsDirect )
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index f0a09e436be3..8e1fa3407409 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -1193,7 +1193,7 @@ const SvBorder& SfxViewShell::GetBorderPixel() const
{
DBG_ASSERT( GetViewFrame(), "SfxViewShell without SfxViewFrame" );
- return GetViewFrame()->GetBorderPixelImpl( this );
+ return GetViewFrame()->GetBorderPixelImpl();
}
diff --git a/sw/inc/docsh.hxx b/sw/inc/docsh.hxx
index 84774c17d327..f164fcf09841 100644
--- a/sw/inc/docsh.hxx
+++ b/sw/inc/docsh.hxx
@@ -306,7 +306,7 @@ public:
virtual bool IsChangeRecording() const override;
virtual bool HasChangeRecordProtection() const override;
virtual void SetChangeRecording( bool bActivate ) override;
- virtual bool SetProtectionPassword( const OUString &rPassword ) override;
+ virtual void SetProtectionPassword( const OUString &rPassword ) override;
virtual bool GetProtectionHash( /*out*/ css::uno::Sequence< sal_Int8 > &rPasswordHash ) override;
virtual void libreOfficeKitCallback(int nType, const char* pPayload) const override;
diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx
index 48f8b0500c85..19b5c9152cab 100644
--- a/sw/source/uibase/app/docsh.cxx
+++ b/sw/source/uibase/app/docsh.cxx
@@ -1285,7 +1285,7 @@ void SwDocShell::SetChangeRecording( bool bActivate )
m_pWrtShell->SetRedlineModeAndCheckInsMode( (nMode & ~nsRedlineMode_t::REDLINE_ON) | nOn);
}
-bool SwDocShell::SetProtectionPassword( const OUString &rNewPassword )
+void SwDocShell::SetProtectionPassword( const OUString &rNewPassword )
{
const SfxAllItemSet aSet( GetPool() );
const SfxItemSet* pArgs = &aSet;
@@ -1295,9 +1295,7 @@ bool SwDocShell::SetProtectionPassword( const OUString &rNewPassword )
Sequence< sal_Int8 > aPasswd = rIDRA.GetRedlinePassword();
if (pArgs && SfxItemState::SET == pArgs->GetItemState( FN_REDLINE_PROTECT, false, &pItem )
&& static_cast<const SfxBoolItem*>(pItem)->GetValue() == (aPasswd.getLength() > 0))
- return false;
-
- bool bRes = false;
+ return;
if (!rNewPassword.isEmpty())
{
@@ -1307,15 +1305,11 @@ bool SwDocShell::SetProtectionPassword( const OUString &rNewPassword )
Sequence< sal_Int8 > aNewPasswd;
SvPasswordHelper::GetHashPassword( aNewPasswd, rNewPassword );
rIDRA.SetRedlinePassword( aNewPasswd );
- bRes = true;
}
else
{
rIDRA.SetRedlinePassword( Sequence< sal_Int8 >() );
- bRes = true;
}
-
- return bRes;
}
bool SwDocShell::GetProtectionHash( /*out*/ css::uno::Sequence< sal_Int8 > &rPasswordHash )