summaryrefslogtreecommitdiff
path: root/vbahelper
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-02-26 10:58:41 +0200
committerNoel Grandin <noel@peralex.com>2016-02-26 10:59:39 +0200
commit692f14208001e646f46c9cd7f85fc93aba4b3982 (patch)
tree1a78a8cc3d7a9e50507639b62cfa49fe91278a27 /vbahelper
parent9db34a7712e277389b2041cfbd77a60476d7f7f1 (diff)
loplugin:unuseddefaultparam, ApplyChange->ApplyTempChange
to make it clear what it's doing, now that I have dropped the param Change-Id: I9fb8bb0f218aa1b01d9ba357e75af35f067625ed
Diffstat (limited to 'vbahelper')
-rw-r--r--vbahelper/source/vbahelper/vbacommandbar.cxx2
-rw-r--r--vbahelper/source/vbahelper/vbacommandbarcontrol.cxx4
-rw-r--r--vbahelper/source/vbahelper/vbacommandbarcontrols.cxx2
-rw-r--r--vbahelper/source/vbahelper/vbacommandbarhelper.cxx6
-rw-r--r--vbahelper/source/vbahelper/vbacommandbarhelper.hxx2
5 files changed, 6 insertions, 10 deletions
diff --git a/vbahelper/source/vbahelper/vbacommandbar.cxx b/vbahelper/source/vbahelper/vbacommandbar.cxx
index 8f4a32b418fb..6739f36667d5 100644
--- a/vbahelper/source/vbahelper/vbacommandbar.cxx
+++ b/vbahelper/source/vbahelper/vbacommandbar.cxx
@@ -76,7 +76,7 @@ ScVbaCommandBar::setName( const OUString& _name ) throw (uno::RuntimeException,
uno::Reference< beans::XPropertySet > xPropertySet( m_xBarSettings, uno::UNO_QUERY_THROW );
xPropertySet->setPropertyValue( "UIName" , uno::makeAny( _name ) );
- pCBarHelper->ApplyChange( m_sResourceUrl, m_xBarSettings );
+ pCBarHelper->ApplyTempChange( m_sResourceUrl, m_xBarSettings );
}
sal_Bool SAL_CALL
ScVbaCommandBar::getVisible() throw (uno::RuntimeException, std::exception)
diff --git a/vbahelper/source/vbahelper/vbacommandbarcontrol.cxx b/vbahelper/source/vbahelper/vbacommandbarcontrol.cxx
index 78fd8e7d0cc1..eb798ac7995a 100644
--- a/vbahelper/source/vbahelper/vbacommandbarcontrol.cxx
+++ b/vbahelper/source/vbahelper/vbacommandbarcontrol.cxx
@@ -32,7 +32,7 @@ void ScVbaCommandBarControl::ApplyChange() throw ( uno::RuntimeException )
{
uno::Reference< container::XIndexContainer > xIndexContainer( m_xCurrentSettings, uno::UNO_QUERY_THROW );
xIndexContainer->replaceByIndex( m_nPosition, uno::makeAny( m_aPropertyValues ) );
- pCBarHelper->ApplyChange( m_sResourceUrl, m_xBarSettings );
+ pCBarHelper->ApplyTempChange( m_sResourceUrl, m_xBarSettings );
}
OUString SAL_CALL
@@ -154,7 +154,7 @@ ScVbaCommandBarControl::Delete( ) throw (script::BasicErrorException, uno::Runt
uno::Reference< container::XIndexContainer > xIndexContainer( m_xCurrentSettings, uno::UNO_QUERY_THROW );
xIndexContainer->removeByIndex( m_nPosition );
- pCBarHelper->ApplyChange( m_sResourceUrl, m_xBarSettings );
+ pCBarHelper->ApplyTempChange( m_sResourceUrl, m_xBarSettings );
}
}
diff --git a/vbahelper/source/vbahelper/vbacommandbarcontrols.cxx b/vbahelper/source/vbahelper/vbacommandbarcontrols.cxx
index 63b9cb0bdfa0..e9986efaf454 100644
--- a/vbahelper/source/vbahelper/vbacommandbarcontrols.cxx
+++ b/vbahelper/source/vbahelper/vbacommandbarcontrols.cxx
@@ -222,7 +222,7 @@ ScVbaCommandBarControls::Add( const uno::Any& Type, const uno::Any& Id, const un
uno::Reference< container::XIndexContainer > xIndexContainer( m_xIndexAccess, uno::UNO_QUERY_THROW );
xIndexContainer->insertByIndex( nPosition, uno::makeAny( aProps ) );
- pCBarHelper->ApplyChange( m_sResourceUrl, m_xBarSettings );
+ pCBarHelper->ApplyTempChange( m_sResourceUrl, m_xBarSettings );
ScVbaCommandBarControl* pNewCommandBarControl = nullptr;
if( nType == office::MsoControlType::msoControlPopup )
diff --git a/vbahelper/source/vbahelper/vbacommandbarhelper.cxx b/vbahelper/source/vbahelper/vbacommandbarhelper.cxx
index ecfd3355dba7..671cb344a522 100644
--- a/vbahelper/source/vbahelper/vbacommandbarhelper.cxx
+++ b/vbahelper/source/vbahelper/vbacommandbarhelper.cxx
@@ -144,7 +144,7 @@ void VbaCommandBarHelper::removeSettings( const OUString& sResourceUrl ) throw (
// persistChanges();
}
-void VbaCommandBarHelper::ApplyChange( const OUString& sResourceUrl, const css::uno::Reference< css::container::XIndexAccess >& xSettings, bool bTemporary ) throw (css::uno::RuntimeException)
+void VbaCommandBarHelper::ApplyTempChange( const OUString& sResourceUrl, const css::uno::Reference< css::container::XIndexAccess >& xSettings ) throw (css::uno::RuntimeException)
{
if( m_xDocCfgMgr->hasSettings( sResourceUrl ) )
{
@@ -154,10 +154,6 @@ void VbaCommandBarHelper::ApplyChange( const OUString& sResourceUrl, const css::
{
m_xDocCfgMgr->insertSettings( sResourceUrl, xSettings );
}
- if( !bTemporary )
- {
- persistChanges();
- }
}
void VbaCommandBarHelper::persistChanges() throw (css::uno::RuntimeException)
diff --git a/vbahelper/source/vbahelper/vbacommandbarhelper.hxx b/vbahelper/source/vbahelper/vbacommandbarhelper.hxx
index b54f0016ad4c..e6aca6b11f2c 100644
--- a/vbahelper/source/vbahelper/vbacommandbarhelper.hxx
+++ b/vbahelper/source/vbahelper/vbacommandbarhelper.hxx
@@ -72,7 +72,7 @@ public:
void persistChanges() throw (css::uno::RuntimeException);
css::uno::Reference< css::container::XIndexAccess > getSettings( const OUString& sResourceUrl ) throw (css::uno::RuntimeException);
void removeSettings( const OUString& sResourceUrl ) throw (css::uno::RuntimeException);
- void ApplyChange( const OUString& sResourceUrl, const css::uno::Reference< css::container::XIndexAccess >& xSettings, bool bTemporary = true ) throw (css::uno::RuntimeException);
+ void ApplyTempChange( const OUString& sResourceUrl, const css::uno::Reference< css::container::XIndexAccess >& xSettings) throw (css::uno::RuntimeException);
css::uno::Reference< css::frame::XLayoutManager > getLayoutManager() throw (css::uno::RuntimeException);