summaryrefslogtreecommitdiffstats
path: root/sfx2/source/doc
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source/doc')
-rw-r--r--sfx2/source/doc/docfac.cxx2
-rw-r--r--sfx2/source/doc/docfile.cxx6
-rw-r--r--sfx2/source/doc/docfilt.cxx30
-rw-r--r--sfx2/source/doc/docinsert.cxx4
-rw-r--r--sfx2/source/doc/doctempl.cxx6
-rw-r--r--sfx2/source/doc/frmdescr.cxx7
-rw-r--r--sfx2/source/doc/objmisc.cxx6
-rw-r--r--sfx2/source/doc/objxtor.cxx9
-rw-r--r--sfx2/source/doc/oleprops.cxx4
-rw-r--r--sfx2/source/doc/oleprops.hxx2
-rw-r--r--sfx2/source/doc/sfxbasemodel.cxx2
11 files changed, 26 insertions, 52 deletions
diff --git a/sfx2/source/doc/docfac.cxx b/sfx2/source/doc/docfac.cxx
index e5a98ed994b9..a244622f1185 100644
--- a/sfx2/source/doc/docfac.cxx
+++ b/sfx2/source/doc/docfac.cxx
@@ -74,7 +74,7 @@ struct SfxObjectFactory_Impl
};
-SfxFilterContainer* SfxObjectFactory::GetFilterContainer( bool /*bForceLoad*/ ) const
+SfxFilterContainer* SfxObjectFactory::GetFilterContainer() const
{
return pImpl->pFilterContainer;
}
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 705d44244f83..a10bf5bc7cbd 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -2666,7 +2666,7 @@ SfxMedium::GetInteractionHandler( bool bGetAlways )
}
-void SfxMedium::SetFilter( const SfxFilter* pFilterP, bool /*bResetOrig*/ )
+void SfxMedium::SetFilter( const SfxFilter* pFilterP )
{
pImp->m_pFilter = pFilterP;
}
@@ -2677,9 +2677,9 @@ const SfxFilter* SfxMedium::GetFilter() const
}
-const SfxFilter* SfxMedium::GetOrigFilter( bool bNotCurrent ) const
+const SfxFilter* SfxMedium::GetOrigFilter() const
{
- return ( pImp->pOrigFilter || bNotCurrent ) ? pImp->pOrigFilter : pImp->m_pFilter;
+ return pImp->pOrigFilter ? pImp->pOrigFilter : pImp->m_pFilter;
}
diff --git a/sfx2/source/doc/docfilt.cxx b/sfx2/source/doc/docfilt.cxx
index bcafad22c3ab..ac457c07381b 100644
--- a/sfx2/source/doc/docfilt.cxx
+++ b/sfx2/source/doc/docfilt.cxx
@@ -179,17 +179,11 @@ OUString SfxFilter::GetTypeFromStorage( const SotStorage& rStg )
}
OUString SfxFilter::GetTypeFromStorage(
- const uno::Reference<embed::XStorage>& xStorage, bool bTemplate, OUString* pFilterName )
+ const uno::Reference<embed::XStorage>& xStorage, bool bTemplate )
throw ( beans::UnknownPropertyException, lang::WrappedTargetException,
uno::RuntimeException, std::exception )
{
SfxFilterMatcher aMatcher;
- OUString aName;
- if ( pFilterName )
- {
- aName = *pFilterName;
- pFilterName->clear();
- }
css::uno::Reference< css::beans::XPropertySet > xProps( xStorage, css::uno::UNO_QUERY );
if ( xProps.is() )
@@ -211,25 +205,15 @@ OUString SfxFilter::GetTypeFromStorage(
// template filters shouldn't be detected if not explicitly asked for
nDont |= SfxFilterFlags::TEMPLATEPATH;
- const SfxFilter* pFilter = nullptr;
- if (!aName.isEmpty())
- // get preselected Filter if it matches the desired filter flags
- pFilter = aMatcher.GetFilter4FilterName( aName, nMust, nDont );
-
- if ( !pFilter || pFilter->GetFormat() != nClipId )
- {
- // get filter from storage MediaType
- pFilter = aMatcher.GetFilter4ClipBoardId( nClipId, nMust, nDont );
- if ( !pFilter )
- // template filter is asked for , but there isn't one; so at least the "normal" format should be detected
- // or storage *is* a template, but bTemplate is not set
- pFilter = aMatcher.GetFilter4ClipBoardId( nClipId );
- }
+ // get filter from storage MediaType
+ const SfxFilter* pFilter = aMatcher.GetFilter4ClipBoardId( nClipId, nMust, nDont );
+ if ( !pFilter )
+ // template filter is asked for , but there isn't one; so at least the "normal" format should be detected
+ // or storage *is* a template, but bTemplate is not set
+ pFilter = aMatcher.GetFilter4ClipBoardId( nClipId );
if ( pFilter )
{
- if ( pFilterName )
- *pFilterName = pFilter->GetName();
return pFilter->GetTypeName();
}
}
diff --git a/sfx2/source/doc/docinsert.cxx b/sfx2/source/doc/docinsert.cxx
index ca097d5136af..84f1ce5b1611 100644
--- a/sfx2/source/doc/docinsert.cxx
+++ b/sfx2/source/doc/docinsert.cxx
@@ -96,7 +96,7 @@ SfxMedium* DocumentInserter::CreateMedium()
pMatcher = new SfxFilterMatcher();
const SfxFilter* pFilter = nullptr;
- sal_uInt32 nError = pMatcher->DetectFilter( *pMedium, &pFilter, false );
+ sal_uInt32 nError = pMatcher->DetectFilter( *pMedium, &pFilter );
if ( nError == ERRCODE_NONE && pFilter )
pMedium->SetFilter( pFilter );
else
@@ -126,7 +126,7 @@ SfxMediumList* DocumentInserter::CreateMediumList()
SfxFilterMatcher aMatcher( m_sDocFactory );
const SfxFilter* pFilter = nullptr;
- sal_uInt32 nError = aMatcher.DetectFilter( *pMedium, &pFilter, false );
+ sal_uInt32 nError = aMatcher.DetectFilter( *pMedium, &pFilter );
if ( nError == ERRCODE_NONE && pFilter )
pMedium->SetFilter( pFilter );
else
diff --git a/sfx2/source/doc/doctempl.cxx b/sfx2/source/doc/doctempl.cxx
index 69a99d030bed..0592e28bd62b 100644
--- a/sfx2/source/doc/doctempl.cxx
+++ b/sfx2/source/doc/doctempl.cxx
@@ -1218,11 +1218,9 @@ SfxDocumentTemplates::~SfxDocumentTemplates()
pImp = nullptr;
}
-void SfxDocumentTemplates::Update( bool _bSmart )
+void SfxDocumentTemplates::Update( )
{
- if ( !_bSmart // don't be smart
- || ::svt::TemplateFolderCache( true ).needsUpdate() // update is really necessary
- )
+ if ( ::svt::TemplateFolderCache( true ).needsUpdate() ) // update is really necessary
{
if ( pImp->Construct() )
pImp->Rescan();
diff --git a/sfx2/source/doc/frmdescr.cxx b/sfx2/source/doc/frmdescr.cxx
index c0746480f33a..4ed074e08283 100644
--- a/sfx2/source/doc/frmdescr.cxx
+++ b/sfx2/source/doc/frmdescr.cxx
@@ -95,7 +95,7 @@ bool SfxFrameDescriptor::IsEditable() const
return pImp->bEditable;
}
-SfxFrameDescriptor* SfxFrameDescriptor::Clone( bool bWithIds ) const
+SfxFrameDescriptor* SfxFrameDescriptor::Clone() const
{
SfxFrameDescriptor *pFrame = new SfxFrameDescriptor;
@@ -122,10 +122,7 @@ SfxFrameDescriptor* SfxFrameDescriptor::Clone( bool bWithIds ) const
pFrame->pImp->pArgs->Put(*pImp->pArgs);
}
- if ( bWithIds )
- pFrame->nItemId = nItemId;
- else
- pFrame->nItemId = 0;
+ pFrame->nItemId = nItemId;
return pFrame;
}
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index b8fe4074acf1..6a291cbf2fa3 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -1439,7 +1439,7 @@ ErrCode SfxObjectShell::CallBasic( const OUString& rMacro,
SfxApplication* pApp = SfxGetpApp();
if( pApp->GetName() != rBasic )
{
- if ( !AdjustMacroMode( OUString() ) )
+ if ( !AdjustMacroMode() )
return ERRCODE_IO_ACCESSDENIED;
}
@@ -1694,10 +1694,10 @@ void SfxObjectShell::Invalidate( sal_uInt16 nId )
Invalidate_Impl( pFrame->GetBindings(), nId );
}
-bool SfxObjectShell::AdjustMacroMode( const OUString& /*rScriptType*/, bool bSuppressUI )
+bool SfxObjectShell::AdjustMacroMode()
{
uno::Reference< task::XInteractionHandler > xInteraction;
- if ( pMedium && !bSuppressUI )
+ if ( pMedium )
xInteraction = pMedium->GetInteractionHandler();
CheckForBrokenDocSignatures_Impl( xInteraction );
diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx
index 09172c26bba8..a3c1049e122c 100644
--- a/sfx2/source/doc/objxtor.cxx
+++ b/sfx2/source/doc/objxtor.cxx
@@ -1060,7 +1060,7 @@ SfxObjectShell* SfxObjectShell::CreateObject( const OUString& rServiceName, SfxO
return nullptr;
}
-Reference<lang::XComponent> SfxObjectShell::CreateAndLoadComponent( const SfxItemSet& rSet, SfxFrame* pFrame )
+Reference<lang::XComponent> SfxObjectShell::CreateAndLoadComponent( const SfxItemSet& rSet )
{
uno::Sequence < beans::PropertyValue > aProps;
TransformItems( SID_OPENDOC, rSet, aProps );
@@ -1074,12 +1074,7 @@ Reference<lang::XComponent> SfxObjectShell::CreateAndLoadComponent( const SfxIte
aTarget = pTargetItem->GetValue();
uno::Reference < frame::XComponentLoader > xLoader;
- if ( pFrame )
- {
- xLoader.set( pFrame->GetFrameInterface(), uno::UNO_QUERY );
- }
- else
- xLoader.set( frame::Desktop::create(comphelper::getProcessComponentContext()), uno::UNO_QUERY );
+ xLoader.set( frame::Desktop::create(comphelper::getProcessComponentContext()), uno::UNO_QUERY );
Reference <lang::XComponent> xComp;
try
diff --git a/sfx2/source/doc/oleprops.cxx b/sfx2/source/doc/oleprops.cxx
index 8e8cc0808d56..f25c14f081c4 100644
--- a/sfx2/source/doc/oleprops.cxx
+++ b/sfx2/source/doc/oleprops.cxx
@@ -817,9 +817,9 @@ void SfxOleSection::SetBoolValue( sal_Int32 nPropId, bool bValue )
SetProperty( SfxOlePropertyRef( new SfxOleBoolProperty( nPropId, bValue ) ) );
}
-bool SfxOleSection::SetStringValue( sal_Int32 nPropId, const OUString& rValue, bool bSkipEmpty )
+bool SfxOleSection::SetStringValue( sal_Int32 nPropId, const OUString& rValue )
{
- bool bInserted = !bSkipEmpty || !rValue.isEmpty();
+ bool bInserted = !rValue.isEmpty();
if( bInserted )
SetProperty( SfxOlePropertyRef( new SfxOleString8Property( nPropId, maCodePageProp, rValue ) ) );
return bInserted;
diff --git a/sfx2/source/doc/oleprops.hxx b/sfx2/source/doc/oleprops.hxx
index d0174b901df6..ffe70d30b4d4 100644
--- a/sfx2/source/doc/oleprops.hxx
+++ b/sfx2/source/doc/oleprops.hxx
@@ -301,7 +301,7 @@ public:
void SetBoolValue( sal_Int32 nPropId, bool bValue );
/** Inserts a string property with the passed value.
@return true = Property inserted; false = String was empty, property not inserted. */
- bool SetStringValue( sal_Int32 nPropId, const OUString& rValue, bool bSkipEmpty = false );
+ bool SetStringValue( sal_Int32 nPropId, const OUString& rValue );
/** Inserts a time stamp property with the passed value. */
void SetFileTimeValue( sal_Int32 nPropId, const css::util::DateTime& rValue );
/** Inserts a date property with the passed value. */
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index e510588ab1b5..e4d949dc7aea 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -2350,7 +2350,7 @@ sal_Bool SAL_CALL SfxBaseModel::getAllowMacroExecution() throw (RuntimeException
SfxModelGuard aGuard( *this );
if ( m_pData->m_pObjectShell )
- return m_pData->m_pObjectShell->AdjustMacroMode( OUString() );
+ return m_pData->m_pObjectShell->AdjustMacroMode();
return sal_False;
}