summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/sfx2/docfile.hxx2
-rw-r--r--include/sfx2/frame.hxx4
-rw-r--r--include/sfx2/objsh.hxx2
-rw-r--r--include/sfx2/sfxbasemodel.hxx2
-rw-r--r--include/sfx2/viewfrm.hxx2
-rw-r--r--sfx2/source/doc/docfile.cxx3
-rw-r--r--sfx2/source/doc/doctemplates.cxx18
-rw-r--r--sfx2/source/doc/objstor.cxx14
-rw-r--r--sfx2/source/doc/sfxbasemodel.cxx39
-rw-r--r--sfx2/source/view/frame.cxx8
-rw-r--r--sfx2/source/view/frame2.cxx3
-rw-r--r--sfx2/source/view/viewfrm.cxx4
12 files changed, 41 insertions, 60 deletions
diff --git a/include/sfx2/docfile.hxx b/include/sfx2/docfile.hxx
index 6e9f38241f2a..d136aa85e6e0 100644
--- a/include/sfx2/docfile.hxx
+++ b/include/sfx2/docfile.hxx
@@ -151,7 +151,7 @@ public:
void SetError(ErrCode nError);
void CloseInStream();
- bool CloseOutStream();
+ void CloseOutStream();
void CloseStorage();
diff --git a/include/sfx2/frame.hxx b/include/sfx2/frame.hxx
index 151f728adc11..9a3a96a91520 100644
--- a/include/sfx2/frame.hxx
+++ b/include/sfx2/frame.hxx
@@ -97,7 +97,7 @@ private:
VclPtr<vcl::Window> pWindow;
protected:
- bool Close();
+ void Close();
virtual ~SfxFrame();
SAL_DLLPRIVATE SfxFrame( vcl::Window& i_rContainerWindow );
@@ -134,7 +134,7 @@ public:
bool IsInPlace() const;
- SAL_DLLPRIVATE bool DoClose_Impl();
+ SAL_DLLPRIVATE void DoClose_Impl();
SAL_DLLPRIVATE void SetFrameInterface_Impl( const css::uno::Reference< css::frame::XFrame >& rFrame );
SAL_DLLPRIVATE void ReleasingComponent_Impl();
SAL_DLLPRIVATE void GetViewData_Impl();
diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx
index a6bff464d369..382e4c692e87 100644
--- a/include/sfx2/objsh.hxx
+++ b/include/sfx2/objsh.hxx
@@ -339,7 +339,7 @@ public:
// called for a few slots like SID_SAVE[AS]DOC, SID_PRINTDOC[DIRECT], derived classes may abort the action
virtual bool QuerySlotExecutable( sal_uInt16 nSlotId );
- bool SaveChildren(bool bObjectsOnly=false);
+ void SaveChildren(bool bObjectsOnly=false);
bool SaveAsChildren( SfxMedium &rMedium );
bool SwitchChildrenPersistance(
const css::uno::Reference< css::embed::XStorage >& xStorage,
diff --git a/include/sfx2/sfxbasemodel.hxx b/include/sfx2/sfxbasemodel.hxx
index 33c8b4b1e3c2..8c513d515f3f 100644
--- a/include/sfx2/sfxbasemodel.hxx
+++ b/include/sfx2/sfxbasemodel.hxx
@@ -709,7 +709,7 @@ protected:
private:
/// @throws css::uno::RuntimeException
css::uno::Reference< css::ui::XUIConfigurationManager2 > getUIConfigurationManager2();
- bool impl_getPrintHelper();
+ void impl_getPrintHelper();
SAL_DLLPRIVATE void ListenForStorage_Impl( const css::uno::Reference< css::embed::XStorage >& xStorage );
SAL_DLLPRIVATE OUString GetMediumFilterName_Impl();
diff --git a/include/sfx2/viewfrm.hxx b/include/sfx2/viewfrm.hxx
index e0a7db3c2c6e..e8deab4891a6 100644
--- a/include/sfx2/viewfrm.hxx
+++ b/include/sfx2/viewfrm.hxx
@@ -130,7 +130,7 @@ public:
bool IsVisible() const;
void ToTop();
void Enable( bool bEnable );
- bool Close();
+ void Close();
virtual void Activate( bool bUI ) override;
virtual void Deactivate( bool bUI ) override;
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 4426c889af82..a7ff1009de71 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -638,10 +638,9 @@ SvStream* SfxMedium::GetOutStream()
}
-bool SfxMedium::CloseOutStream()
+void SfxMedium::CloseOutStream()
{
CloseOutStream_Impl();
- return true;
}
void SfxMedium::CloseOutStream_Impl()
diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx
index 4db2cd02e2fe..fe2cea50168b 100644
--- a/sfx2/source/doc/doctemplates.cxx
+++ b/sfx2/source/doc/doctemplates.cxx
@@ -200,7 +200,7 @@ class SfxDocTplService_Impl
bool needsUpdate();
OUString getLongName( const OUString& rShortName );
bool setTitleForURL( const OUString& rURL, const OUString& aTitle );
- bool getTitleFromURL( const OUString& rURL, OUString& aTitle, OUString& aType, bool& bDocHasTitle );
+ void getTitleFromURL( const OUString& rURL, OUString& aTitle, OUString& aType, bool& bDocHasTitle );
bool addEntry( Content& rParentFolder,
const OUString& rTitle,
@@ -641,7 +641,7 @@ bool SfxDocTplService_Impl::setTitleForURL( const OUString& rURL, const OUString
}
-bool SfxDocTplService_Impl::getTitleFromURL( const OUString& rURL, OUString& aTitle, OUString& aType, bool& bDocHasTitle )
+void SfxDocTplService_Impl::getTitleFromURL( const OUString& rURL, OUString& aTitle, OUString& aType, bool& bDocHasTitle )
{
bDocHasTitle = false;
@@ -682,8 +682,6 @@ bool SfxDocTplService_Impl::getTitleFromURL( const OUString& rURL, OUString& aTi
}
else
bDocHasTitle = true;
-
- return true;
}
@@ -1908,8 +1906,7 @@ bool SfxDocTplService_Impl::addTemplate( const OUString& rGroupName,
OUString aTitle, aType;
bool bDocHasTitle = false;
- if( !getTitleFromURL( rSourceURL, aTitle, aType, bDocHasTitle ) )
- return false;
+ getTitleFromURL( rSourceURL, aTitle, aType, bDocHasTitle );
INetURLObject aSourceObj( rSourceURL );
if ( rTemplateName == aTitle )
@@ -2365,11 +2362,7 @@ void SfxDocTplService_Impl::addHierGroup( GroupList_Impl& rList,
OUString aTmpTitle;
bool bDocHasTitle = false;
- if( !getTitleFromURL( aTargetDir, aTmpTitle, aType, bDocHasTitle ) )
- {
- SAL_WARN( "sfx.doc", "addHierGroup(): template of alien format" );
- continue;
- }
+ getTitleFromURL( aTargetDir, aTmpTitle, aType, bDocHasTitle );
if ( !aType.isEmpty() )
bUpdateType = true;
@@ -2461,8 +2454,7 @@ void SfxDocTplService_Impl::addFsysGroup( GroupList_Impl& rList,
continue;
bool bDocHasTitle = false;
- if( !getTitleFromURL( aTargetURL, aChildTitle, aType, bDocHasTitle ) )
- continue;
+ getTitleFromURL( aTargetURL, aChildTitle, aType, bDocHasTitle );
pGroup->addEntry( aChildTitle, aTargetURL, aType, OUString() );
}
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index d594da1b51fb..26d0de770931 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -164,7 +164,8 @@ void impl_addToModelCollection(const css::uno::Reference< css::frame::XModel >&
bool SfxObjectShell::Save()
{
- return SaveChildren();
+ SaveChildren();
+ return true;
}
@@ -1545,7 +1546,7 @@ bool SfxObjectShell::SaveTo_Impl
if( bOk && !bCopyTo )
// we also don't touch any graphical replacements here
- bOk = SaveChildren( true );
+ SaveChildren( true );
}
if ( bOk )
@@ -3116,15 +3117,13 @@ uno::Reference< embed::XStorage > const & SfxObjectShell::GetStorage()
}
-bool SfxObjectShell::SaveChildren( bool bObjectsOnly )
+void SfxObjectShell::SaveChildren( bool bObjectsOnly )
{
if ( pImpl->mpObjectContainer )
{
bool bOasis = ( SotStorage::GetVersion( GetStorage() ) > SOFFICE_FILEFORMAT_60 );
GetEmbeddedObjectContainer().StoreChildren(bOasis,bObjectsOnly);
}
-
- return true;
}
bool SfxObjectShell::SaveAsChildren( SfxMedium& rMedium )
@@ -3134,7 +3133,10 @@ bool SfxObjectShell::SaveAsChildren( SfxMedium& rMedium )
return false;
if ( xStorage == GetStorage() )
- return SaveChildren();
+ {
+ SaveChildren();
+ return true;
+ }
if ( pImpl->mpObjectContainer )
{
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index 488a3d7a06c8..e9b12b34621a 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -1397,26 +1397,24 @@ Sequence< beans::PropertyValue > SAL_CALL SfxBaseModel::getPrinter()
{
SfxModelGuard aGuard( *this );
- if ( impl_getPrintHelper() )
- return m_pData->m_xPrintable->getPrinter();
- else
- return Sequence< beans::PropertyValue >();
+ impl_getPrintHelper();
+ return m_pData->m_xPrintable->getPrinter();
}
void SAL_CALL SfxBaseModel::setPrinter(const Sequence< beans::PropertyValue >& rPrinter)
{
SfxModelGuard aGuard( *this );
- if ( impl_getPrintHelper() )
- m_pData->m_xPrintable->setPrinter( rPrinter );
+ impl_getPrintHelper();
+ m_pData->m_xPrintable->setPrinter( rPrinter );
}
void SAL_CALL SfxBaseModel::print(const Sequence< beans::PropertyValue >& rOptions)
{
SfxModelGuard aGuard( *this );
- if ( impl_getPrintHelper() )
- m_pData->m_xPrintable->print( rOptions );
+ impl_getPrintHelper();
+ m_pData->m_xPrintable->print( rOptions );
}
@@ -3193,24 +3191,20 @@ void SAL_CALL SfxBaseModel::addPrintJobListener( const Reference< view::XPrintJo
{
SfxModelGuard aGuard( *this, SfxModelGuard::E_INITIALIZING );
- if ( impl_getPrintHelper() )
- {
- Reference < view::XPrintJobBroadcaster > xPJB( m_pData->m_xPrintable, UNO_QUERY );
- if ( xPJB.is() )
- xPJB->addPrintJobListener( xListener );
- }
+ impl_getPrintHelper();
+ Reference < view::XPrintJobBroadcaster > xPJB( m_pData->m_xPrintable, UNO_QUERY );
+ if ( xPJB.is() )
+ xPJB->addPrintJobListener( xListener );
}
void SAL_CALL SfxBaseModel::removePrintJobListener( const Reference< view::XPrintJobListener >& xListener )
{
SfxModelGuard aGuard( *this );
- if ( impl_getPrintHelper() )
- {
- Reference < view::XPrintJobBroadcaster > xPJB( m_pData->m_xPrintable, UNO_QUERY );
- if ( xPJB.is() )
- xPJB->removePrintJobListener( xListener );
- }
+ impl_getPrintHelper();
+ Reference < view::XPrintJobBroadcaster > xPJB( m_pData->m_xPrintable, UNO_QUERY );
+ if ( xPJB.is() )
+ xPJB->removePrintJobListener( xListener );
}
sal_Int64 SAL_CALL SfxBaseModel::getSomething( const Sequence< sal_Int8 >& aIdentifier )
@@ -3725,10 +3719,10 @@ void SAL_CALL SfxBaseModel::removeStorageChangeListener(
cppu::UnoType<document::XStorageChangeListener>::get(), xListener );
}
-bool SfxBaseModel::impl_getPrintHelper()
+void SfxBaseModel::impl_getPrintHelper()
{
if ( m_pData->m_xPrintable.is() )
- return true;
+ return;
m_pData->m_xPrintable = new SfxPrintHelper();
Reference < lang::XInitialization > xInit( m_pData->m_xPrintable, UNO_QUERY );
Sequence < Any > aValues(1);
@@ -3736,7 +3730,6 @@ bool SfxBaseModel::impl_getPrintHelper()
xInit->initialize( aValues );
Reference < view::XPrintJobBroadcaster > xBrd( m_pData->m_xPrintable, UNO_QUERY );
xBrd->addPrintJobListener( new SfxPrintHelperListener_Impl( m_pData.get() ) );
- return true;
}
diff --git a/sfx2/source/view/frame.cxx b/sfx2/source/view/frame.cxx
index 82591b21c8fa..8ae28d2e291b 100644
--- a/sfx2/source/view/frame.cxx
+++ b/sfx2/source/view/frame.cxx
@@ -127,7 +127,7 @@ bool SfxFrame::DoClose()
xFrame->dispose();
}
else
- bRet = DoClose_Impl();
+ DoClose_Impl();
}
catch( css::util::CloseVetoException& )
{
@@ -142,7 +142,7 @@ bool SfxFrame::DoClose()
return bRet;
}
-bool SfxFrame::DoClose_Impl()
+void SfxFrame::DoClose_Impl()
{
SfxBindings* pBindings = nullptr;
if ( pImpl->pCurrentViewFrame )
@@ -158,9 +158,7 @@ bool SfxFrame::DoClose_Impl()
if ( pImpl->bOwnsBindings )
DELETEZ( pBindings );
- bool bRet = Close();
- DBG_ASSERT( bRet, "Impossible state: frame closes, but controller refuses!");
- return bRet;
+ Close();
}
bool SfxFrame::DocIsModified_Impl()
diff --git a/sfx2/source/view/frame2.cxx b/sfx2/source/view/frame2.cxx
index 6fc3cff26a7d..0f6c1af16799 100644
--- a/sfx2/source/view/frame2.cxx
+++ b/sfx2/source/view/frame2.cxx
@@ -343,10 +343,9 @@ SystemWindow* SfxFrame::GetTopWindow_Impl() const
}
-bool SfxFrame::Close()
+void SfxFrame::Close()
{
delete this;
- return true;
}
void SfxFrame::LockResize_Impl( bool bLock )
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index d369cf65c4b6..24f25b86f663 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -1089,7 +1089,7 @@ void SfxViewFrame::ReleaseObjectShell_Impl()
GetDispatcher()->SetDisableFlags( SfxDisableFlags::NONE );
}
-bool SfxViewFrame::Close()
+void SfxViewFrame::Close()
{
DBG_ASSERT( GetFrame().IsClosing_Impl() || !GetFrame().GetFrameInterface().is(), "ViewFrame closed too early!" );
@@ -1107,8 +1107,6 @@ bool SfxViewFrame::Close()
// manner, thus it is better to let the dispatcher be.
GetDispatcher()->Lock(true);
delete this;
-
- return true;
}
void SfxViewFrame::DoActivate( bool bUI )